##// END OF EJS Templates
Refactoring continued: restored ChartItem class
Refactoring continued: restored ChartItem class

File last commit:

r104:192e41096b68
r104:192e41096b68
Show More
bar.h
45 lines | 932 B | text/x-c | CLexer
#ifndef BAR_H
#define BAR_H
#include "chartitem_p.h"
#include "qchartglobal.h"
#include <QGraphicsItem>
QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Single bar item of chart
class Bar : public ChartItem
{
public:
Bar(QGraphicsItem *parent=0);
public: // from ChartItemControl
void setSize(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