Added First version of MeeGo Harmattan port from pure QT to MTF.
[medard] / src / mainwindow.h
index c4f224e..499c69a 100644 (file)
 #ifndef MAINWINDOW_H
 #define MAINWINDOW_H
 
+#ifdef Q_WS_MAEMO_6
+#include <MApplicationPage>
+#include <MLabel>
+#include <MButton>
+#include <MComboBox>
+#else
 #include <QMainWindow>
 #include <QActionGroup>
 #include <QLabel>
 #include <QPushButton>
+#endif
 
 #include "forecastwidget.h"
 #include "medarddownloader.h"
 
+#ifdef Q_WS_MAEMO_6
+class MainWindow : public MApplicationPage
+#else
 class MainWindow : public QMainWindow
+#endif
 {
     Q_OBJECT
 
 public:
+#ifdef Q_WS_MAEMO_6
+    MainWindow(QGraphicsItem *parent = 0);
+#else
     MainWindow(QWidget *parent = 0);
+#endif
     virtual ~MainWindow();
 
 private slots:
@@ -53,7 +68,11 @@ private slots:
 
     void forecastTypeChanged(const QString label, MedardDownloader::ForecastType type);
     void forecastDateOffsetChanged(int offset);
+#if Q_WS_MAEMO_6
+    void forecastDomainChanged(int index);
+#else
     void forecastDomainChanged(QAction *action);
+#endif
 
     void downloadedFinished(const QString &filename, const QDateTime &date);
     void downloadFailed();
@@ -71,6 +90,20 @@ private:
     MedardDownloader *m_downloader;
 
     ForecastWidget *m_forecast;
+#if Q_WS_MAEMO_6
+    MLabel *m_forecastTypeLabel;
+    MLabel *m_forecastInitialDateLabel;
+    MLabel *m_forecastDateLabel;
+
+    MButton *m_downloadRetryButton;
+
+    MButton *m_minusDayButton;
+    MButton *m_plusDayButton;
+    MButton *m_minusHourButton;
+    MButton *m_plusHourButton;
+
+    MComboBox *m_domainComboBox;
+#else
     QLabel *m_forecastTypeLabel;
     QLabel *m_forecastInitialDateLabel;
     QLabel *m_forecastDateLabel;
@@ -83,6 +116,8 @@ private:
     QPushButton *m_plusHourButton;
 
     QActionGroup *m_domainActionGroup;
+#endif
+
 };
 
 #endif // MAINWINDOW_H