forked from thelineva/tvkaistagui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreenshotwindow.h
59 lines (51 loc) · 1.41 KB
/
screenshotwindow.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef SCREENSHOTWINDOW_H
#define SCREENSHOTWINDOW_H
#include <QMainWindow>
#include <QNetworkReply>
#include "programme.h"
#include "thumbnail.h"
namespace Ui {
class ScreenshotWindow;
}
class QLabel;
class QComboBox;
class QSettings;
class TvkaistaClient;
class ScreenshotWindow : public QMainWindow {
Q_OBJECT
public:
ScreenshotWindow(QSettings *settings, QWidget *parent = 0);
~ScreenshotWindow();
void setClient(TvkaistaClient *client);
TvkaistaClient* client() const;
void fetchScreenshots(const Programme &programme);
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *e);
private slots:
void stopDownloading();
void numScreenshotsChanged();
void feedRequestFinished();
void thumbnailRequestFinished();
void networkError(QNetworkReply::NetworkError error);
void thumbnailsToQueue();
private:
void fetchNextScreenshot();
void startLoadingAnimation();
void stopLoadingAnimation();
void screenshotsNotFound();
void changeHostToUrls(const QString &host);
Ui::ScreenshotWindow *ui;
QSettings *m_settings;
QLabel *m_loadLabel;
QComboBox *m_numScreenshotsComboBox;
QMovie *m_loadMovie;
TvkaistaClient *m_client;
QNetworkReply *m_reply;
QList<Thumbnail> m_thumbnails;
QList<Thumbnail> m_queue;
int m_redirections;
int m_numErrors;
Programme m_programme;
};
#endif // SCREENSHOTWINDOW_H