##// END OF EJS Templates
Fixed bug with changing theme when several series exist
Fixed bug with changing theme when several series exist

File last commit:

r531:64f37cf5241e
r538:3b2495c81f70
Show More
axisitem_p.h
96 lines | 2.3 KiB | text/x-c | CLexer
Michal Klocek
Add zoom support...
r67 #ifndef AXISITEM_H_
#define AXISITEM_H_
Michal Klocek
Adds refactored axis to presenter
r140 #include "domain_p.h"
Tero Ahola
Refactoring continued: restored ChartItem class
r104 #include "chartitem_p.h"
Michal Klocek
Add zoom support...
r67 #include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Adds refactored axis to presenter
r140 class QChartAxis;
Michal Klocek
Animation refactor...
r530 class ChartPresenter;
Michal Klocek
Adds refactored axis to presenter
r140
class AxisItem : public QObject, public ChartItem
Michal Klocek
Add zoom support...
r67 {
Michal Klocek
Adds refactored axis to presenter
r140 Q_OBJECT
Michal Klocek
Add zoom support...
r67 public:
enum AxisType{X_AXIS,Y_AXIS};
Michal Klocek
Animation refactor...
r530 AxisItem(QChartAxis* axis,ChartPresenter* presenter,AxisType type = X_AXIS,QGraphicsItem* parent = 0);
Michal Klocek
Add zoom support...
r67 ~AxisItem();
//from QGraphicsItem
QRectF boundingRect() const;
Michal Klocek
Adds more axis handling...
r176 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
Michal Klocek
Add zoom support...
r67
Michal Klocek
Adds more axis handling...
r176 AxisType axisType() const {return m_type;};
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Fixes wrong shades zvalues
r184 void setAxisOpacity(qreal opacity);
qreal axisOpacity() const;
Michal Klocek
Adds more axis handling...
r176 void setGridOpacity(qreal opacity);
qreal gridOpacity() const;
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Adds more axis handling...
r176 void setLabelsOpacity(qreal opacity);
qreal labelsOpacity() const;
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Adds more axis handling...
r176 void setShadesOpacity(qreal opacity);
qreal shadesOpacity() const;
Michal Klocek
Add zoom support...
r67
Michal Klocek
Adds more axis handling...
r176 void setLabelsAngle(int angle);
int labelsAngle()const { return m_labelsAngle; }
void setShadesBrush(const QBrush& brush);
void setShadesPen(const QPen& pen);
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Fixes wrong shades zvalues
r184 void setAxisPen(const QPen& pen);
Michal Klocek
Adds more axis handling...
r176 void setGridPen(const QPen& pen);
void setLabelsPen(const QPen& pen);
void setLabelsBrush(const QBrush& brush);
void setLabelsFont(const QFont& font);
Michal Klocek
Adding zoom in out animation support
r513 inline QRectF geometry() const { return m_rect; }
Michal Klocek
Animation refactor...
r530 inline QVector<qreal> layout() { return m_layoutVector;};
Michal Klocek
Fix grid animation to do not go out of bound
r504
Michal Klocek
Adds more axis handling...
r176 public slots:
Michal Klocek
Axis refactoring to support better barcharts
r502 void handleAxisUpdated();
void handleAxisCategoriesUpdated();
Michal Klocek
Adds scroll support...
r531 void handleRangeChanged(qreal min , qreal max,int tickCount);
Michal Klocek
Axis refactoring to support better barcharts
r502 void handleGeometryChanged(const QRectF& size);
Michal Klocek
Refactor domain model...
r439
Michal Klocek
Clean up axis animation code
r393
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 private:
Michal Klocek
Refacotr axisitem to handle ticks changes
r452 inline bool isEmpty();
Michal Klocek
Refactors axis handling...
r223 void createItems(int count);
Michal Klocek
Axis refactoring to support better barcharts
r502 void deleteItems(int count);
Michal Klocek
Animation refactor...
r530
Michal Klocek
Axis refactoring to support better barcharts
r502 QVector<qreal> calculateLayout() const;
Michal Klocek
Animation refactor...
r530 void updateLayout(QVector<qreal>& layout);
void setLayout(QVector<qreal>& layout);
Michal Klocek
Axis refactoring to support better barcharts
r502 QStringList createLabels(int ticks, qreal min, qreal max) const;
Michal Klocek
Adds draft of axis bar label support
r497
Michal Klocek
Add zoom support...
r67 private:
Michal Klocek
Animation refactor...
r530 ChartPresenter* m_presenter;
Michal Klocek
Refactor domain model...
r439 QChartAxis* m_chartAxis;
Michal Klocek
Adds refactored axis to presenter
r140 AxisType m_type;
QRectF m_rect;
Michal Klocek
Adds more axis handling...
r176 int m_labelsAngle;
QGraphicsItemGroup m_grid;
QGraphicsItemGroup m_shades;
QGraphicsItemGroup m_labels;
Michal Klocek
Fix zorder of axis, and ticks
r272 QGraphicsItemGroup m_axis;
Michal Klocek
Refactors axis layout managment...
r291 QVector<qreal> m_layoutVector;
Michal Klocek
Refacotr axisitem to handle ticks changes
r452 qreal m_min;
qreal m_max;
Michal Klocek
Axis refactoring to support better barcharts
r502 int m_ticksCount;
Michal Klocek
Adding zoom in out animation support
r513 qreal m_zoomFactor;
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Animation refactor...
r530 friend class AxisAnimation;
Michal Klocek
Add zoom support...
r67 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif /* AXISITEM_H_ */