Debian Codegraph @

widgets/gallery.h

raw
1 #ifndef GALLERY_H
2 #define GALLERY_H
3
4 #include <QWidget>
5 #include <QLabel>
6 #include <DIconButton>
7 #include <DSpinner>
8 #include <DPageIndicator>
9 #include <QNetworkAccessManager>
10 #include <QEvent>
11 #include "mainwindow.h"
12 #include "backend/sourcemanager.h"
13
14 DWIDGET_USE_NAMESPACE
15
16 class gallery : public QWidget
17 {
18 Q_OBJECT
19
20 public:
21 gallery(QList<QUrl> imageList);
22 gallery(QList<QPair<QString, App*>> imageList, MainWindow *parent);
23
24 private:
25 QLabel *imageView;
26 int currentImage;
27 void init();
28 void changeImage(int index);
29 void changeLocalImage(int index);
30 QList<QUrl> images;
31 QList<QPair<QString, App*>> banners;
32 DIconButton *backButton;
33 DIconButton *forwardButton;
34 DSpinner *spinner;
35 DPageIndicator *pageIndicator;
36 MainWindow *mainwindow;
37 bool eventFilter(QObject *object, QEvent *event);
38 };
39
40 #endif // GALLERY_H