1 /*==================================================================
3 ! mardrone application AR-Drone for MeeGo
5 ! Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
8 ! Author:Kate Alhola kate.alhola@nokia.com
10 ! GNU Lesser General Public License Usage
11 ! This file may be used under the terms of the GNU Lesser
12 ! General Public License version 2.1 as published by the Free Software
13 ! Foundation and appearing in the file LICENSE.LGPL included in the
14 ! packaging of this file. Please review the following information to
15 ! ensure the GNU Lesser General Public License version 2.1 requirements
16 ! will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
20 *===================================================================*/
23 #include "qgraphicswidget.h"
24 #include "QGraphicsItem"
28 Gauge::Gauge(QGraphicsItem *parent) :
29 QGraphicsWidget(parent)
31 qDebug() << "Gauge::Gauge()";
34 void Gauge::paint(QPainter *painter,
35 const QStyleOptionGraphicsItem *option,
41 void Gauge::setValue(float val_)
44 update(boundingRect()); // Value updated, schedule redtaw
51 QRectF Gauge::boundingRect() const
53 return QRectF(0.0,0.0,size().width(),size().height());