##// 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
#ifndef BAR_H
#define BAR_H
#include "chartitemcontrol.h"
#include "qchartglobal.h"
#include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Single bar item of chart
class Bar : public QGraphicsItem, public ChartItemControl
{
public:
Bar(QGraphicsItem *parent=0);
public: // from ChartItemControl
void setPos (const QPointF & pos);
void resize(const QSize &size);
void setTheme(ChartTheme *theme);
void setPlotDomain(const PlotDomain& data);
// 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;
PlotDomain mPlotDomain;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BAR_H