summaryrefslogtreecommitdiffstats
path: root/viewer.h
blob: 8bdf471acc75ccb3346f13bd163a2b2747d0be42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef VIEWER_H
#define VIEWER_H

#include <QWidget>

class QLabel;

class Viewer : public QWidget {
    public:
        Viewer(QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
        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;
};

#endif // VIEWER_H