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

File last commit:

r10:2932e9eb12b3
r10:2932e9eb12b3
Show More
qbarchartgrid.h
33 lines | 666 B | text/x-c | CLexer
sauimone
Bar chart prototyping
r10 #ifndef QBARCHARTGRID_H
#define QBARCHARTGRID_H
#include <QGraphicsItem>
class QBarChartGrid : public QGraphicsItem
{
public:
QBarChartGrid(QGraphicsItem *parent = 0);
// Data api:
void setLimits( int min, int max );
void setHorizontalLineCount( int count );
// Layout api:
void setSize( int h, int w );
// From QGraphicsItem
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect() const;
private:
int mWidth;
int mHeight;
int mMin;
int mMax;
int mHorizontalLineCount; // Draw this many horizontal lines to grid
};
#endif // QBARCHARTGRID_H