summaryrefslogtreecommitdiffstats
path: root/demos/boxes/qtbox.h
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-09-01 08:06:38 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-09-01 10:10:13 (GMT)
commitc15e07884a29be26f1110e4d54a56da0001e3c53 (patch)
treeb81650fe5652e3fdd4592da73c3a6f3902bed3e1 /demos/boxes/qtbox.h
parentc78d75db9467af9f5638073f74bed437c24c3584 (diff)
downloadQt-c15e07884a29be26f1110e4d54a56da0001e3c53.zip
Qt-c15e07884a29be26f1110e4d54a56da0001e3c53.tar.gz
Qt-c15e07884a29be26f1110e4d54a56da0001e3c53.tar.bz2
dynamic_cast in the demo was failing to build without rtti
Reviewed-by: Kim Motoyoshi Kalland
Diffstat (limited to 'demos/boxes/qtbox.h')
-rw-r--r--demos/boxes/qtbox.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/boxes/qtbox.h b/demos/boxes/qtbox.h
index 6f39b0d..9465911 100644
--- a/demos/boxes/qtbox.h
+++ b/demos/boxes/qtbox.h
@@ -47,10 +47,11 @@
#include <QtGui/qvector3d.h>
#include "glbuffers.h"
-class ItemBase : public QObject, public QGraphicsItem
+class ItemBase : public QGraphicsItem
{
- Q_OBJECT
public:
+ enum { Type = UserType + 1 };
+
ItemBase(int size, int x, int y);
virtual ~ItemBase();
virtual QRectF boundingRect() const;
@@ -64,6 +65,7 @@ protected:
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
virtual void keyPressEvent(QKeyEvent *event);
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
+ virtual int type() const;
bool isInResizeArea(const QPointF &pos);
static void duplicateSelectedItems(QGraphicsScene *scene);