##// END OF EJS Templates

File last commit:

r56:c2f871dd8e7e
r70:f6809ce9f999 merge
Show More
bar.h
37 lines | 725 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
#include <QGraphicsItem>
#include "qchartglobal.h"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
// Single bar item of chart
class Bar : public QGraphicsItem
{
public:
Bar(QGraphicsItem *parent=0);
// 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;
};
QTCOMMERCIALCHART_END_NAMESPACE
#endif // BAR_H