[ca90cb1] | 1 | /* |
---|
| 2 | * Copyright (C) 2010 Ixonos Plc. |
---|
[68b2df2] | 3 | * Copyright (C) 2011 Philipp Spitzer, gregor herrmann |
---|
[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 | |
---|
| 23 | #include <QtGui/QMainWindow> |
---|
| 24 | |
---|
[9bbb44e] | 25 | #include <ui_mainwindow.h> |
---|
| 26 | |
---|
[b431d47] | 27 | #include "conferencemodel.h" |
---|
| 28 | |
---|
| 29 | class ScheduleXmlParser; |
---|
| 30 | class QNetworkAccessManager; |
---|
| 31 | class QNetworkReply; |
---|
| 32 | |
---|
[9bbb44e] | 33 | class MainWindow : public QMainWindow, private Ui::MainWindow |
---|
[e5bc908] | 34 | { |
---|
| 35 | Q_OBJECT |
---|
| 36 | public: |
---|
[d4a8bbf] | 37 | // aEventId is used to inform widget to automatically open |
---|
| 38 | // Event dialog for given Event ID |
---|
| 39 | MainWindow(int aEventId = 0, QWidget *aParent = NULL); |
---|
[3a8dc71] | 40 | ~MainWindow() {} |
---|
[b431d47] | 41 | signals: |
---|
| 42 | void conferenceRemoved(); |
---|
[72f6fe4] | 43 | private slots: |
---|
[c2d66b2] | 44 | void aboutApp(); |
---|
[872aeaa] | 45 | void eventHasChanged(int aEventId, bool aReloadModel); |
---|
[ad5c62f] | 46 | void setup(); |
---|
[b431d47] | 47 | // TODO: remove |
---|
| 48 | void showConferences(); |
---|
| 49 | void networkQueryFinished(QNetworkReply*); |
---|
| 50 | void importFromNetwork(const QString&); |
---|
| 51 | void importFromFile(const QString&); |
---|
| 52 | void removeConference(int); |
---|
| 53 | void changeConferenceUrl(int, const QString&); |
---|
| 54 | |
---|
| 55 | void useConference(int id); |
---|
| 56 | void unsetConference(); |
---|
[885a3cc] | 57 | private: |
---|
| 58 | void fillAndShowConferenceHeader(); |
---|
| 59 | void initTabs(); |
---|
[c8c414f] | 60 | void clearTabs(); |
---|
[b431d47] | 61 | void importData(const QByteArray &aData, const QString& url); |
---|
[04acaf9] | 62 | |
---|
| 63 | QString saved_title; |
---|
[b431d47] | 64 | ConferenceModel* conferenceModel; |
---|
| 65 | ScheduleXmlParser *mXmlParser; |
---|
| 66 | QNetworkAccessManager *mNetworkAccessManager; |
---|
[e5bc908] | 67 | }; |
---|
| 68 | |
---|
[001c8cf] | 69 | #endif /* MAINWINDOW_H */ |
---|
[c2d66b2] | 70 | |
---|