1 | /* |
---|
2 | * Copyright (C) 2010 Ixonos Plc. |
---|
3 | * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl |
---|
4 | * |
---|
5 | * This file is part of ConfClerk. |
---|
6 | * |
---|
7 | * ConfClerk is free software: you can redistribute it and/or modify it |
---|
8 | * under the terms of the GNU General Public License as published by the Free |
---|
9 | * Software Foundation, either version 2 of the License, or (at your option) |
---|
10 | * any later version. |
---|
11 | * |
---|
12 | * ConfClerk is distributed in the hope that it will be useful, but |
---|
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
---|
14 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
15 | * more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU General Public License along with |
---|
18 | * ConfClerk. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | */ |
---|
20 | #ifndef MAINWINDOW_H |
---|
21 | #define MAINWINDOW_H |
---|
22 | |
---|
23 | #include "qglobal.h" |
---|
24 | #if QT_VERSION >= 0x050000 |
---|
25 | #include <QtWidgets> |
---|
26 | #else |
---|
27 | #include <QtGui/QMainWindow> |
---|
28 | #endif |
---|
29 | #include <QSslError> |
---|
30 | |
---|
31 | #include "ui_mainwindow.h" |
---|
32 | |
---|
33 | #include "conferencemodel.h" |
---|
34 | |
---|
35 | class ScheduleXmlParser; |
---|
36 | class QNetworkAccessManager; |
---|
37 | class QNetworkReply; |
---|
38 | |
---|
39 | class MainWindow : public QMainWindow, private Ui::MainWindow |
---|
40 | { |
---|
41 | Q_OBJECT |
---|
42 | public: |
---|
43 | MainWindow(QWidget *parent = 0); |
---|
44 | ~MainWindow(); |
---|
45 | signals: |
---|
46 | void conferenceRemoved(); |
---|
47 | private slots: |
---|
48 | void on_conferencesAction_triggered(); |
---|
49 | void on_settingsAction_triggered(); |
---|
50 | void on_aboutAction_triggered(); |
---|
51 | void on_reloadAction_triggered(); |
---|
52 | void on_nowAction_triggered(); |
---|
53 | void on_searchAction_triggered(); |
---|
54 | void on_expandAllAction_triggered(); |
---|
55 | void on_collapseAllAction_triggered(); |
---|
56 | |
---|
57 | void onEventChanged(int aEventId, bool favouriteChanged); |
---|
58 | void onSearchResultChanged(); |
---|
59 | |
---|
60 | void sslErrors(QNetworkReply*,const QList<QSslError> &errors); |
---|
61 | void networkQueryFinished(QNetworkReply*); |
---|
62 | void importFromNetwork(const QString&, int conferenceId); |
---|
63 | void importFromFile(const QString&, int conferenceId); |
---|
64 | void removeConference(int); |
---|
65 | void changeConferenceUrl(int, const QString&); |
---|
66 | void onSystemTrayMessageClicked(); |
---|
67 | void onAlarmTimerTimeout(); |
---|
68 | |
---|
69 | void useConference(int conferenceId); |
---|
70 | void unsetConference(); |
---|
71 | |
---|
72 | void showError(const QString& message); |
---|
73 | private: |
---|
74 | void fillAndShowConferenceHeader(); |
---|
75 | void initTabs(); ///< called on startup and on change of a conference |
---|
76 | void clearTabs(); |
---|
77 | void importData(const QByteArray &aData, const QString& url, int conferenceId); |
---|
78 | |
---|
79 | QString saved_title; |
---|
80 | SqlEngine* sqlEngine; |
---|
81 | ConferenceModel* conferenceModel; |
---|
82 | ScheduleXmlParser *mXmlParser; |
---|
83 | QNetworkAccessManager *mNetworkAccessManager; |
---|
84 | QSystemTrayIcon* systemTrayIcon; ///< to be able to show notifications |
---|
85 | QTimer* alarmTimer; ///< timer that triggers every minute to be able to show alarms |
---|
86 | }; |
---|
87 | |
---|
88 | #endif /* MAINWINDOW_H */ |
---|
89 | |
---|