diff options
Diffstat (limited to 'viewer.h')
-rw-r--r-- | viewer.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/viewer.h b/viewer.h new file mode 100644 index 0000000..a790b9a --- /dev/null +++ b/viewer.h @@ -0,0 +1,27 @@ +#ifndef VIEWER_H
+#define VIEWER_H
+
+#include <QWidget>
+
+class QLabel;
+
+class Viewer : public QWidget {
+ public:
+ Viewer(QWidget *parent = 0, Qt::WindowFlags f = 0);
+ void setFile(const QString &file, bool allFiles = true);
+ void preview(const QString &file);
+
+ protected:
+ virtual void wheelEvent(QWheelEvent *event);
+
+ private slots:
+ void displayFile(int index);
+
+ private:
+ int mCurIndex;
+ QLabel *mLabel;
+ QStringList mFiles;
+ QSize mMaxSize;
+};
+
+#endif // VIEWER_H
|