summaryrefslogtreecommitdiffstats
path: root/viewer.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2016-11-27 06:52:50 +0100
committerArno <arno@disconnect.de>2016-11-27 06:52:50 +0100
commit9c89e2f83415c876f28f15ebff31c8325754a936 (patch)
tree81262fcd178af3071187cf89b415fc70cdb8d977 /viewer.h
parentd1cf6c418855004a249d44fd383c889cbd1e7662 (diff)
downloadShemovCleaner-9c89e2f83415c876f28f15ebff31c8325754a936.tar.gz
ShemovCleaner-9c89e2f83415c876f28f15ebff31c8325754a936.tar.bz2
ShemovCleaner-9c89e2f83415c876f28f15ebff31c8325754a936.zip
Add picture viewer
Opens on doubleclick when it's image/*.
Diffstat (limited to 'viewer.h')
-rw-r--r--viewer.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/viewer.h b/viewer.h
new file mode 100644
index 0000000..6f9537e
--- /dev/null
+++ b/viewer.h
@@ -0,0 +1,26 @@
+#ifndef VIEWER_H
+#define VIEWER_H
+
+#include <QWidget>
+
+class QLabel;
+class QWheelEvent;
+
+class Viewer : public QWidget {
+ public:
+ Viewer(QWidget *parent = 0, Qt::WindowFlags f = 0);
+ void setFile(const QString &file, bool allFiles = true);
+
+ protected:
+ virtual void wheelEvent(QWheelEvent *event);
+
+ private slots:
+ void displayFile(int index);
+
+ private:
+ int mCurIndex;
+ QLabel *mLabel;
+ QStringList mFiles;
+};
+
+#endif // VIEWER_H