2 #include "qgraphicswidget.h"
3 #include "QGraphicsItem"
7 Gauge::Gauge(QGraphicsItem *parent) :
8 QGraphicsWidget(parent)
10 qDebug() << "Gauge::Gauge()";
13 void Gauge::paint(QPainter *painter,
14 const QStyleOptionGraphicsItem *option,
20 void Gauge::setValue(float val_)
23 update(boundingRect()); // Value updated, schedule redtaw
30 QRectF Gauge::boundingRect() const
32 return QRectF(0.0,0.0,size().width(),size().height());