##// END OF EJS Templates
Bar chart prototyping
Bar chart prototyping

File last commit:

r10:2932e9eb12b3
r10:2932e9eb12b3
Show More
qbarchartbar.h
31 lines | 628 B | text/x-c | CLexer
sauimone
Bar chart prototyping
r10 #ifndef QBARCHARTBAR_H
#define QBARCHARTBAR_H
#include <QGraphicsItem>
// Single bar item of chart
class QBarChartBar : public QGraphicsItem
{
public:
QBarChartBar(QGraphicsItem *parent=0);
// Layout Stuff
void setSize( int h, int w ); // Size of bar. in screen coordinates.
void setColor( QColor col ); // Color of bar
public:
// From QGraphicsItem
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
QRectF boundingRect() const;
private:
int mHeight;
int mWidth;
QPointF mPos;
QColor mColor;
};
#endif // QBARCHARTBAR_H