[ca90cb1] | 1 | /* |
---|
| 2 | * Copyright (C) 2010 Ixonos Plc. |
---|
[de5d0f1] | 3 | * Copyright (C) 2011-2017 Philipp Spitzer, gregor herrmann, Stefan Stahl |
---|
[ca90cb1] | 4 | * |
---|
[6df32f2] | 5 | * This file is part of ConfClerk. |
---|
[ca90cb1] | 6 | * |
---|
[6df32f2] | 7 | * ConfClerk is free software: you can redistribute it and/or modify it |
---|
[ca90cb1] | 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 | * |
---|
[6df32f2] | 12 | * ConfClerk is distributed in the hope that it will be useful, but |
---|
[ca90cb1] | 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 |
---|
[6df32f2] | 18 | * ConfClerk. If not, see <http://www.gnu.org/licenses/>. |
---|
[ca90cb1] | 19 | */ |
---|
[e5bc908] | 20 | #ifndef MAINWINDOW_H |
---|
| 21 | #define MAINWINDOW_H |
---|
| 22 | |
---|
[79a7671] | 23 | #include "qglobal.h" |
---|
| 24 | #if QT_VERSION >= 0x050000 |
---|
[4b6ae6b] | 25 | #include <QtWidgets> |
---|
[79a7671] | 26 | #else |
---|
| 27 | #include <QtGui/QMainWindow> |
---|
| 28 | #endif |
---|
[f94ab1d] | 29 | #include <QSslError> |
---|
[e5bc908] | 30 | |
---|
[8d6798d] | 31 | #include "ui_mainwindow.h" |
---|
[9bbb44e] | 32 | |
---|
[b431d47] | 33 | #include "conferencemodel.h" |
---|
| 34 | |
---|
| 35 | class ScheduleXmlParser; |
---|
| 36 | class QNetworkAccessManager; |
---|
| 37 | class QNetworkReply; |
---|
| 38 | |
---|
[9bbb44e] | 39 | class MainWindow : public QMainWindow, private Ui::MainWindow |
---|
[e5bc908] | 40 | { |
---|
| 41 | Q_OBJECT |
---|
| 42 | public: |
---|
[8bd618c] | 43 | MainWindow(QWidget *parent = 0); |
---|
[4d8493b] | 44 | ~MainWindow(); |
---|
[b431d47] | 45 | signals: |
---|
| 46 | void conferenceRemoved(); |
---|
[72f6fe4] | 47 | private slots: |
---|
[264f5e7] | 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(); |
---|
[167a532] | 54 | void on_expandAllAction_triggered(); |
---|
| 55 | void on_collapseAllAction_triggered(); |
---|
[264f5e7] | 56 | |
---|
[dc66a91] | 57 | void onEventChanged(int aEventId, bool favouriteChanged); |
---|
[ac2b0b2] | 58 | void onSearchResultChanged(); |
---|
[54a377c] | 59 | |
---|
[f94ab1d] | 60 | void sslErrors(QNetworkReply*,const QList<QSslError> &errors); |
---|
[b431d47] | 61 | void networkQueryFinished(QNetworkReply*); |
---|
[2dffed3] | 62 | void importFromNetwork(const QString&, int conferenceId); |
---|
| 63 | void importFromFile(const QString&, int conferenceId); |
---|
[b431d47] | 64 | void removeConference(int); |
---|
| 65 | void changeConferenceUrl(int, const QString&); |
---|
[54a377c] | 66 | void onSystemTrayMessageClicked(); |
---|
| 67 | void onAlarmTimerTimeout(); |
---|
[b431d47] | 68 | |
---|
[8bd618c] | 69 | void useConference(int conferenceId); |
---|
[b431d47] | 70 | void unsetConference(); |
---|
[61346c9] | 71 | |
---|
| 72 | void showError(const QString& message); |
---|
[885a3cc] | 73 | private: |
---|
| 74 | void fillAndShowConferenceHeader(); |
---|
[3720891] | 75 | void initTabs(); ///< called on startup and on change of a conference |
---|
[c8c414f] | 76 | void clearTabs(); |
---|
[2dffed3] | 77 | void importData(const QByteArray &aData, const QString& url, int conferenceId); |
---|
[04acaf9] | 78 | |
---|
| 79 | QString saved_title; |
---|
[61346c9] | 80 | SqlEngine* sqlEngine; |
---|
[b431d47] | 81 | ConferenceModel* conferenceModel; |
---|
| 82 | ScheduleXmlParser *mXmlParser; |
---|
| 83 | QNetworkAccessManager *mNetworkAccessManager; |
---|
[54a377c] | 84 | QSystemTrayIcon* systemTrayIcon; ///< to be able to show notifications |
---|
| 85 | QTimer* alarmTimer; ///< timer that triggers every minute to be able to show alarms |
---|
[e5bc908] | 86 | }; |
---|
| 87 | |
---|
[001c8cf] | 88 | #endif /* MAINWINDOW_H */ |
---|
[c2d66b2] | 89 | |
---|