diff options
author | Arno <arno@disconnect.de> | 2015-08-27 06:43:54 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2015-08-27 06:43:54 +0200 |
commit | 921eb687af0335c030d7095da7c7be1069f10490 (patch) | |
tree | d1b7ccdcad3bd8e384015a68ae2ee3309a20ed22 /pictureviewer2.h | |
parent | 9eedf8c619c15302d080ee55b513e07a2bf5d591 (diff) | |
download | SheMov-921eb687af0335c030d7095da7c7be1069f10490.tar.gz SheMov-921eb687af0335c030d7095da7c7be1069f10490.tar.bz2 SheMov-921eb687af0335c030d7095da7c7be1069f10490.zip |
Make PictureViewer2 controls work
Now the controls actually do something. Not still as promised, but they
kinda work!
Diffstat (limited to 'pictureviewer2.h')
-rw-r--r-- | pictureviewer2.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pictureviewer2.h b/pictureviewer2.h index a3f1f2d..1592b5d 100644 --- a/pictureviewer2.h +++ b/pictureviewer2.h @@ -58,6 +58,9 @@ class PictureViewer2 : public QGraphicsView { void previous(); void skip(int amount); void selectPic(const QString &path); + void stopSlide(); + void startSlide(); + void startSlideAll(); void toggleSlide(bool slide); void slide(bool); void slideThrouhghAll(bool); @@ -71,6 +74,7 @@ class PictureViewer2 : public QGraphicsView { void addToNewPics(); void markCurrent(); void clearMarks(); + void doControl(QGraphicsItem *item); protected: virtual void wheelEvent(QWheelEvent *event); @@ -102,6 +106,7 @@ class PictureViewer2 : public QGraphicsView { int mCurPos; int mConfigInfoPos; int mConfigMapPos; + int mCursorOffset; QTimer *mSlideTimer; QTimer *mSlideTimerAll; QTimer *mCurTimer; @@ -119,6 +124,7 @@ class PictureViewer2 : public QGraphicsView { QGraphicsTextItem *mSlideAllC; bool mUseGradient; QColor mBgColor; + QColor mDefaultTextColor; QPointF mInfoPos; QPointF mMappingPos; QPointF mBoundingPos; @@ -166,11 +172,19 @@ class BoundingRectItem : public QGraphicsItem { }; class PictureViewerGraphicsScene : public QGraphicsScene { + Q_OBJECT public: explicit PictureViewerGraphicsScene(QObject *parent = 0) : QGraphicsScene(parent) {} + void setCursorOffset(int offset) { mCursorOffset = offset; } + + signals: + void itemClicked(QGraphicsItem *item); protected: virtual void mousePressEvent(QGraphicsSceneMouseEvent *e); + + private: + int mCursorOffset; }; #endif // PICTUREVIEWER2_H |