-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainwindow.h
80 lines (66 loc) · 2.14 KB
/
mainwindow.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QByteArrayList>
#include <QGraphicsView>
#include <QString>
#include <QJsonArray>
#include <QLabel>
#include "viewimage.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
bool eventFilter(QObject *watched, QEvent *event);
void replyFinished(QNetworkReply *reply);
void slot_netwManagerFinished(QNetworkReply *reply);
void setImage(int nextcountset);
void qPrint();
void loadNext();
void loadingGif(int viewno);
void on_pushButtonExit_clicked();
void on_pushButtonSearch_clicked();
void on_pushButton_SetDefaultPrinter_clicked();
void on_pushButton_Next_clicked();
void on_pushButton_Back_clicked();
void on_pushButton_cancel_clicked();
void on_actionExit_triggered();
private:
Ui::MainWindow *ui;
// Members
QByteArrayList jpegData;
int nextCount = 0;
bool loaded[12] = { false }; // 0 to 11 for graphicsview 1 to 12
QString nextCode = "";
QString hashTag = "";
QJsonArray nodesArray;
QNetworkRequest request;
QGraphicsView *currentFrame = new QGraphicsView;
QGraphicsView *currentFrameload = new QGraphicsView;
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
QNetworkAccessManager *m_netwManager = new QNetworkAccessManager(this);
QMovie *movie;
viewImage vio;
// Constants
const QString windowTitle = "Hash Tag Printer"; // Application window title
const QString windowIcon = ":/loadimg/icon.png"; // Application icon
const int maxFrame = 12; // Number of image frames can be display at one time
const QString movieLoadingGif = ":/loadimg/Spinner.gif";
const QString pushButtonBackLoading = "Back ...... Please wait";
const QString pushButtonBackDefault = "Back";
const QString pushButtonSearchDefault = "Search";
const QString urlFirstPart = "https://www.instagram.com/explore/tags/";
const QString urlSecondPart = "/?__a=1";
const QString urlNextPagePart = "&max_id=";
// Methods
void removeAllFiles();
};
#endif // MAINWINDOW_H