diff options
author | aavit <qt-info@nokia.com> | 2010-11-19 12:30:09 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2010-11-19 12:30:09 (GMT) |
commit | 8034cab2cce55b43dcc1100d0b22f8c85eb733c2 (patch) | |
tree | 5a1637fa48ce23e12c6a51490f6a481fd1ca1a5a /demos/chip/view.h | |
parent | e614223831f2b3cc9051ae88586370a7d5b63db2 (diff) | |
parent | 1d152964adec62d03ce2f4a45ca40ddbd05819ae (diff) | |
download | Qt-8034cab2cce55b43dcc1100d0b22f8c85eb733c2.zip Qt-8034cab2cce55b43dcc1100d0b22f8c85eb733c2.tar.gz Qt-8034cab2cce55b43dcc1100d0b22f8c85eb733c2.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2
Diffstat (limited to 'demos/chip/view.h')
-rw-r--r-- | demos/chip/view.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/demos/chip/view.h b/demos/chip/view.h index 8047b8b..67c7675 100644 --- a/demos/chip/view.h +++ b/demos/chip/view.h @@ -43,12 +43,27 @@ #define VIEW_H #include <QFrame> +#include <QGraphicsView> -QT_FORWARD_DECLARE_CLASS(QGraphicsView) QT_FORWARD_DECLARE_CLASS(QLabel) QT_FORWARD_DECLARE_CLASS(QSlider) QT_FORWARD_DECLARE_CLASS(QToolButton) +class View; + +class GraphicsView : public QGraphicsView +{ + Q_OBJECT +public: + GraphicsView(View *v) : QGraphicsView(), view(v) { } + +protected: + void wheelEvent(QWheelEvent *); + +private: + View *view; +}; + class View : public QFrame { Q_OBJECT @@ -57,22 +72,27 @@ public: QGraphicsView *view() const; +public slots: + void zoomIn(int level = 1); + void zoomOut(int level = 1); + private slots: void resetView(); void setResetButtonEnabled(); void setupMatrix(); + void togglePointerMode(); void toggleOpenGL(); void toggleAntialiasing(); void print(); - - void zoomIn(); - void zoomOut(); void rotateLeft(); void rotateRight(); - + private: - QGraphicsView *graphicsView; + GraphicsView *graphicsView; QLabel *label; + QLabel *label2; + QToolButton *selectModeButton; + QToolButton *dragModeButton; QToolButton *openGlButton; QToolButton *antialiasButton; QToolButton *printButton; |