##// 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
bar.h
46 lines | 1004 B | text/x-c | CLexer
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 #ifndef BAR_H
#define BAR_H
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 #include "chartitemcontrol.h"
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 #include "qchartglobal.h"
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 #include <QGraphicsItem>
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Single bar item of chart
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 class Bar : public QGraphicsItem, public ChartItemControl
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 {
public:
Tero Ahola
Refactored themes; now enabled for line, scatter and pies...
r103 Bar(QGraphicsItem *parent=0);
sauimone
BarGroup and Bar as ChartItems instead of GraphicItems
r74
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);
void setPlotDomain(const PlotDomain& data);
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56
// Layout Stuff
void resize( int w, int h ); // Size of bar. in screen coordinates.
void setColor( QColor col ); // Color of bar
void setPos(qreal x, qreal y);
public:
// From QGraphicsItem
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QRectF boundingRect() const;
private:
int mHeight;
int mWidth;
qreal mXpos;
qreal mYpos;
QColor mColor;
sauimone
BarGroup and Bar as ChartItems instead of GraphicItems
r74
PlotDomain mPlotDomain;
sauimone
Integrating bar chart. Cleaned up old implementation. TODO: show this in test application. how?
r56 };
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BAR_H