##// END OF EJS Templates
enablers for tooltip and floating values, bug fixing, updated examples. tidying up the code
enablers for tooltip and floating values, bug fixing, updated examples. tidying up the code

File last commit:

r291:2b7ffa40a22f
r296:8254aab7233d
Show More
axisitem_p.h
78 lines | 2.0 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;
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
Adds more axis handling...
r176 AxisItem(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);
public slots:
Michal Klocek
Adds ZOrder enum to presenter
r262 void handleAxisUpdate(QChartAxis* axis); //look and feel
void handleLabelsChanged(QChartAxis* axis,const QStringList& labels); //labels from dataset
void handleGeometryChanged(const QRectF& size); // geometry from presenter
Michal Klocek
Refactors axis layout managment...
r291 public:
virtual void updateItems(QVector<qreal>& points);
virtual void calculateLayout(QVector<qreal>& points);
virtual void applyLayout(const QVector<qreal>& points);
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 private:
Michal Klocek
Refactors axis layout managment...
r291 void clear(int count);
Michal Klocek
Refactors axis handling...
r223 void createItems(int count);
Michal Klocek
Add zoom support...
r67 private:
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 handling...
r223 QStringList m_thicksList;
Michal Klocek
Refactors axis layout managment...
r291 QVector<qreal> m_layoutVector;
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Add zoom support...
r67 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif /* AXISITEM_H_ */