1 #include "qnlygraphicsgrid.h"
3 QnlyGraphicsGrid::QnlyGraphicsGrid(QGraphicsItem* parent, QGraphicsScene* scene)
4 : QGraphicsRectItem(parent, scene)
9 QnlyGraphicsGrid::~QnlyGraphicsGrid()
14 void QnlyGraphicsGrid::setStep(qreal step)
19 qreal QnlyGraphicsGrid::getStep()
24 void QnlyGraphicsGrid::setPen(QPen pen)
29 QPen QnlyGraphicsGrid::getPen()
34 void QnlyGraphicsGrid::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
44 painter->drawLine(w,0,w,r.height());
50 while (h < r.height())
52 painter->drawLine(0,h,r.width(),h);