forked from javierllorente/qactus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
134 lines (114 loc) · 3.29 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*
* Qactus - A Qt based OBS notifier
*
* Copyright (C) 2010-2015 Javier Llorente <[email protected]>
* Copyright (C) 2010-2011 Sivan Greenberg <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QNetworkReply>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QAuthenticator>
#include <QApplication>
#include <QDebug>
#include <QDesktopWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QUrl>
#include <QMainWindow>
#include <QMessageBox>
#include <QXmlStreamReader>
#include <QHttpRequestHeader>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QAction>
#include <QTimer>
#include <QSslError>
#include <QCoreApplication>
#include "trayicon.h"
namespace Ui {
class MainWindow;
}
class Login;
class TrayIcon;
class OBSxmlReader;
class Configure;
class OBSaccess;
class OBSpackage;
class OBSrequest;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
protected:
void changeEvent(QEvent *e);
private:
Ui::MainWindow *ui;
OBSaccess *obsAccess;
OBSpackage *obsPackage;
QList<OBSrequest*> obsRequests;
QToolBar *toolBar;
void createToolbar();
QAction *action_Add;
QAction *action_Remove;
QAction *action_Refresh;
QAction *action_Timer;
QAction *action_aboutQt;
TrayIcon *trayIcon;
void createActions();
QAction *action_About;
QAction *action_Quit;
QAction *action_Restore;
// QAction *action_Configure;
void createTreePackages();
void createTreeRequests();
void createStatusBar();
void writeSettings();
void readSettings();
void readSettingsTimer();
QString packageErrors;
void insertBuildStatus(OBSpackage*, const int&);
void insertRequests(QList<OBSrequest*>);
QString breakLine(QString&, const int&);
QColor getColorForStatus(const QString&);
void toggleItemFont(QTreeWidgetItem*);
void closeEvent(QCloseEvent*);
bool event(QEvent *event);
Login *loginDialog;
Configure *configureDialog;
private slots:
void enableButtons(bool);
void getDescription(QTreeWidgetItem*, int);
void addRow();
void editRow(QTreeWidgetItem*, int);
void removeRow();
void refreshView();
void lineEdit_Password_returnPressed();
void pushButton_Login_clicked();
void on_actionAbout_triggered(bool);
void on_actionQuit_triggered(bool);
void trayIconClicked(QSystemTrayIcon::ActivationReason);
void toggleVisibility();
void about();
void on_actionConfigure_Qactus_triggered();
void on_actionLogin_triggered();
void on_tabWidget_currentChanged(const int&);
};
#endif // MAINWINDOW_H