summaryrefslogtreecommitdiffstats
path: root/pictureviewer2.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-03-10 07:29:20 +0100
committerArno <am@disconnect.de>2012-03-10 07:29:20 +0100
commit08c7cc837379ae4f085a6cc0d44a8b58bdb5a030 (patch)
tree50e3a3a69a2abc68d2cbb18f5e8668dba374a40c /pictureviewer2.h
parent8aae1eea458695a19a7ff36bdffbe59c9e7d4cf2 (diff)
downloadSheMov-08c7cc837379ae4f085a6cc0d44a8b58bdb5a030.tar.gz
SheMov-08c7cc837379ae4f085a6cc0d44a8b58bdb5a030.tar.bz2
SheMov-08c7cc837379ae4f085a6cc0d44a8b58bdb5a030.zip
Slide show
Implement slide show in Pictureviewer2. Slide over all available files and wrap around when reaching the end of the list. Also added some more artwork.
Diffstat (limited to 'pictureviewer2.h')
-rw-r--r--pictureviewer2.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/pictureviewer2.h b/pictureviewer2.h
index 21e6454..9610da1 100644
--- a/pictureviewer2.h
+++ b/pictureviewer2.h
@@ -15,6 +15,8 @@
class QGraphicsScene;
class QGraphicsPixmapItem;
class QWheelEvent;
+class QContextMenuEvent;
+class QTimer;
typedef QList<QVariant> PicData;
typedef QList<QList<QVariant> > PicDataList;
@@ -30,9 +32,11 @@ class PictureViewer2 : public QGraphicsView {
public slots:
void next();
void previous();
+ void slide();
protected:
- void wheelEvent(QWheelEvent *event);
+ virtual void wheelEvent(QWheelEvent *event);
+ virtual void contextMenuEvent(QContextMenuEvent *e);
private slots:
void showFile(const PicData &file);
@@ -46,6 +50,7 @@ class PictureViewer2 : public QGraphicsView {
QSize mMinimunSize;
QGraphicsPixmapItem *mCur;
int mCurPos;
+ QTimer *mSlideTimer;
const QString mDefaultFile;
};