summaryrefslogtreecommitdiffstats
path: root/examples/graphicsview/padnavigator/roundrectitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/graphicsview/padnavigator/roundrectitem.h')
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/graphicsview/padnavigator/roundrectitem.h b/examples/graphicsview/padnavigator/roundrectitem.h
index b0d44dd..33e33d7 100644
--- a/examples/graphicsview/padnavigator/roundrectitem.h
+++ b/examples/graphicsview/padnavigator/roundrectitem.h
@@ -40,14 +40,15 @@
****************************************************************************/
#include <QtCore/qobject.h>
+#include <QtCore/qtimeline.h>
+#include <QtGui/qgraphicsitem.h>
#include <QtGui/qbrush.h>
-#include <QtGui/qgraphicswidget.h>
QT_BEGIN_NAMESPACE
class QGraphicsProxyWidget;
QT_END_NAMESPACE;
-class RoundRectItem : public QGraphicsWidget
+class RoundRectItem : public QObject, public QGraphicsRectItem
{
Q_OBJECT
public:
@@ -58,6 +59,9 @@ public:
void setPixmap(const QPixmap &pixmap);
+ qreal opacity() const;
+ void setOpacity(qreal opacity);
+
Q_SIGNALS:
void activated();
@@ -65,9 +69,15 @@ protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
+private slots:
+ void updateValue(qreal value);
+
private:
- QRectF m_rect;
QBrush brush;
QPixmap pix;
+ QTimeLine timeLine;
+ qreal lastVal;
+ qreal opa;
+
QGraphicsProxyWidget *proxyWidget;
};