SeaView now inherits QDeclarativeViev instead of QGraphicsView
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Mon, 25 Jul 2011 03:02:28 +0000 (06:02 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Mon, 25 Jul 2011 03:02:28 +0000 (06:02 +0300)
ghostsoverboard.pro
seaview.cpp
seaview.h

index 31cee3c..4ada6ab 100644 (file)
@@ -6,6 +6,7 @@
 
 QT       += core gui
 QT      += dbus
+QT      += declarative
 
 TARGET = ghostsoverboard
 TEMPLATE = app
index 64dc8d7..a811488 100644 (file)
@@ -27,7 +27,7 @@
 #include <QDebug>
 
 SeaView::SeaView(QWidget *parent) :
-    QGraphicsView(parent)
+    QDeclarativeView(parent)
 {
 
 
@@ -56,7 +56,7 @@ SeaView::SeaView(QWidget *parent) :
 void  SeaView::mousePressEvent(QMouseEvent *event)
 {
 
-    QGraphicsView::mousePressEvent(event);
+    QDeclarativeView::mousePressEvent(event);
     emit screenTapped();
 
 
@@ -90,7 +90,7 @@ bool SeaView::event(QEvent *event)
 
 
     //pass the event to the ancestor for handling
-    return QGraphicsView::event(event);
+    return QDeclarativeView::event(event);
 
  }
 
index a36992c..d767d99 100644 (file)
--- a/seaview.h
+++ b/seaview.h
 #ifndef SEAVIEW_H
 #define SEAVIEW_H
 
-#include <QGraphicsView>
+#include <QDeclarativeView>
 #include "seascene.h"
 
-class SeaView : public QGraphicsView
+class SeaView : public QDeclarativeView
 {
     Q_OBJECT
 public: