]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/mainwindow.h
Add Stefan as a copyright holder to source files, too.
[toast/confclerk.git] / src / gui / mainwindow.h
index 6986e1598aa05baaeb0150d40b3dd2d1311cd11f..fd9a0d100787f2b47428d75c87466e10fe281813 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
+ *
+ * This file is part of ConfClerk.
+ *
+ * ConfClerk 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)
+ * any later version.
+ *
+ * ConfClerk 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
+ * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
+ */
 #ifndef MAINWINDOW_H
 #define MAINWINDOW_H
 
@@ -5,7 +24,11 @@
 
 #include <ui_mainwindow.h>
 
-class SqlEngine;
+#include "conferencemodel.h"
+
+class ScheduleXmlParser;
+class QNetworkAccessManager;
+class QNetworkReply;
 
 class MainWindow : public QMainWindow, private Ui::MainWindow
 {
@@ -14,28 +37,41 @@ public:
     // aEventId is used to inform widget to automatically open
     // Event dialog for given Event ID
     MainWindow(int aEventId = 0, QWidget *aParent = NULL);
-    ~MainWindow();
+    ~MainWindow() {}
+signals:
+    void conferenceRemoved();
 private slots:
-    void scheduleImported(int aConfId);
-    void aboutApp();
-    void updateDayView(const QDate &aDate);
-    void updateTracksView(const QDate &aDate);
-    void updateFavouritesView(const QDate &aDate);
-    void updateSearchView(const QDate &aDate);
-    void updateNowView();
-    void updateRoomView(const QDate &aDate);
-    void itemClicked(const QModelIndex &aIndex);
-    void displayMap(const QModelIndex &aIndex);
-    void displayWarning(const QModelIndex &aIndex);
-    void searchClicked();
-       void searchAgainClicked();
-    void conferenceMapClicked();
-    void tabHasChanged(int aIndex);
-    void eventHasChanged(int aEventId);
-    void timerUpdateNowView();
+    void on_conferencesAction_triggered();
+    void on_settingsAction_triggered();
+    void on_aboutAction_triggered();
+    void on_reloadAction_triggered();
+    void on_nowAction_triggered();
+    void on_searchAction_triggered();
+    void on_expandAllAction_triggered();
+    void on_collapseAllAction_triggered();
+
+    void onEventChanged(int aEventId, bool favouriteChanged);
+    void onSearchResultChanged();
+    // TODO: remove
+    void networkQueryFinished(QNetworkReply*);
+    void importFromNetwork(const QString&);
+    void importFromFile(const QString&);
+    void removeConference(int);
+    void changeConferenceUrl(int, const QString&);
+
+    void useConference(int id);
+    void unsetConference();
 private:
-    SqlEngine *mSqlEngine;
+    void fillAndShowConferenceHeader();
+    void initTabs();
+    void clearTabs();
+    void importData(const QByteArray &aData, const QString& url);
+
+    QString saved_title;
+    ConferenceModel* conferenceModel;
+    ScheduleXmlParser *mXmlParser;
+    QNetworkAccessManager *mNetworkAccessManager;
 };
 
-#endif // MAINWINDOW_H
+#endif /* MAINWINDOW_H */