2016-10-17 23:14:07 +02:00
|
|
|
#ifndef GRIDITEM_H
|
|
|
|
#define GRIDITEM_H
|
|
|
|
|
|
|
|
#include <QGraphicsItem>
|
|
|
|
|
|
|
|
class GridItem : public QGraphicsItem
|
|
|
|
{
|
|
|
|
public:
|
2018-05-18 20:11:41 +02:00
|
|
|
GridItem(QGraphicsItem *parent = 0): QGraphicsItem(parent) {}
|
2016-10-17 23:14:07 +02:00
|
|
|
|
|
|
|
QRectF boundingRect() const {return _boundingRect;}
|
|
|
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|
|
|
QWidget *widget);
|
|
|
|
|
|
|
|
void setTicks(const QList<qreal> &x, const QList<qreal> &y);
|
|
|
|
void setSize(const QSizeF &size);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QRectF _boundingRect;
|
|
|
|
QList<qreal> _xTicks, _yTicks;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GRIDITEM_H
|