##// END OF EJS Templates
Refactored themes; now enabled for line, scatter and pies...
Refactored themes; now enabled for line, scatter and pies Draft themes implemented for most of the series types. The themes are still missing most of the features, only the line color and line width can be defined.

File last commit:

r103:399cbfcd557c
r103:399cbfcd557c
Show More
axisitem_p.h
49 lines | 1.1 KiB | text/x-c | CLexer
Michal Klocek
Add zoom support...
r67 #ifndef AXISITEM_H_
#define AXISITEM_H_
#include "plotdomain_p.h"
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 #include "chartitemcontrol.h"
Michal Klocek
Add zoom support...
r67 #include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 class AxisItem: public QGraphicsItem, public ChartItemControl
Michal Klocek
Add zoom support...
r67 {
public:
enum AxisType{X_AXIS,Y_AXIS};
AxisItem(AxisType type = X_AXIS,QGraphicsItem* parent = 0);
~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
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 public: // from ChartItemControl
void setPos (const QPointF & pos);
void resize(const QSize &size);
void setTheme(ChartTheme *theme);
Michal Klocek
Add zoom support...
r67 void setPlotDomain(const PlotDomain& data);
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 public:
Michal Klocek
Add zoom support...
r67 void setLength(int length);
void setWidth(int width);
AxisType axisType() const {return m_type;};
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:
QRectF m_rect;
int m_ticks;
PlotDomain m_plotDomain;
QPainterPath m_path;
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
Add zoom support...
r67 AxisType m_type;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif /* AXISITEM_H_ */