]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/mainwindow.h
optimization
[toast/confclerk.git] / src / gui / mainwindow.h
index bf3429d99f1f8aa4359af81d69abcd8bc2e2216d..c01f6bf014c41ab2b4fa41a0e0cd5b673bca2437 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2010 Ixonos Plc.
+ *
+ * This file is part of fosdem-schedule.
+ *
+ * fosdem-schedule 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.
+ *
+ * fosdem-schedule 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
+ * fosdem-schedule.  If not, see <http://www.gnu.org/licenses/>.
+ */
 #ifndef MAINWINDOW_H
 #define MAINWINDOW_H
 
 
 #include <ui_mainwindow.h>
 
-class SqlEngine;
+#include "conferencemodel.h"
+
 class ScheduleXmlParser;
+class QNetworkAccessManager;
+class QNetworkReply;
 
 class MainWindow : public QMainWindow, private Ui::MainWindow
 {
     Q_OBJECT
 public:
-    MainWindow(QWidget *parent = 0);
-    ~MainWindow();
+    // aEventId is used to inform widget to automatically open
+    // Event dialog for given Event ID
+    MainWindow(int aEventId = 0, QWidget *aParent = NULL);
+    ~MainWindow() {}
+signals:
+    void conferenceRemoved();
 private slots:
-    void importSchedule();
-    void showParsingProgress(int aStatus);
+    void scheduleImported(int aConfId);
+    void scheduleDeleted(const QString& title);
     void aboutApp();
-    void updateDayView(const QDate &aDate);
-    void updateFavView();
-    void updateFavViewComplete();
+    void conferenceMapClicked();
+    void eventHasChanged(int aEventId, bool aReloadModel);
+    void setup();
+    // TODO: remove
+    void showConferences();
+    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 */