##// END OF EJS Templates
minor cleaning of unused code
minor cleaning of unused code

File last commit:

r145:251cad7c49ee
r175:05f9f3d08ff3
Show More
axisitem_p.h
63 lines | 1.1 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 refactored axis to presenter
r140 AxisItem(QChartAxis* axis,AxisType type = X_AXIS,QGraphicsItem* parent = 0);
Michal Klocek
Add zoom support...
r67 ~AxisItem();
//from QGraphicsItem
QRectF boundingRect() const;
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget){};
Michal Klocek
Add zoom support...
r67
Michal Klocek
Adds refactored axis to presenter
r140 protected slots:
void handleAxisChanged();
void handleDomainChanged(const Domain& domain);
void handleGeometryChanged(const QRectF& size);
protected:
void updateDomain();
private:
void clear();
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 public:
Michal Klocek
Add zoom support...
r67 AxisType axisType() const {return m_type;};
Michal Klocek
Adds refactored axis to presenter
r140 protected:
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 private:
void createItems();
Michal Klocek
Add zoom support...
r67 private:
Michal Klocek
Adds refactored axis to presenter
r140
QChartAxis* m_axis;
AxisType m_type;
Michal Klocek
Add zoom support...
r67 int m_ticks;
Michal Klocek
Adds refactored axis to presenter
r140 Domain m_domain;
QRectF m_rect;
Michal Klocek
Add zoom support...
r67 QPainterPath m_path;
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Refactora axis and line chart to use graphics items insted of painter.
r85 QList<QGraphicsLineItem*> m_grid;
QList<QGraphicsRectItem*> m_shades;
QList<QGraphicsSimpleTextItem*> m_labels;
Michal Klocek
Adds refactored axis to presenter
r140
Michal Klocek
Add zoom support...
r67 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif /* AXISITEM_H_ */