3 * Copyright (C) 2011 Roman Moravcik
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include <MApplicationPage>
29 #include <QMainWindow>
30 #include <QActionGroup>
32 #include <QPushButton>
35 #include "forecastwidget.h"
36 #include "medarddownloader.h"
39 class MainWindow : public MApplicationPage
41 class MainWindow : public QMainWindow
48 MainWindow(QGraphicsItem *parent = 0);
50 MainWindow(QWidget *parent = 0);
52 virtual ~MainWindow();
55 void seaLevelPreasureMenuClicked();
56 void precipitationMenuClicked();
57 void windVelocityMenuClicked();
58 void cloudinessMenuClicked();
59 void temperatureMenuClicked();
60 void aboutMenuClicked();
62 void downloadAgainClicked();
64 void plusDayClicked();
65 void minusDayClicked();
66 void plusHourClicked();
67 void minusHourClicked();
70 void forecastDomainChanged(int index);
71 void forecastTypeChanged(int index);
73 void forecastDomainChanged(QAction *action);
76 void downloadedFinished(const QString &filename, const QDateTime &date);
77 void downloadFailed();
84 void showNavigationButtons();
85 void hideNavigationButtons(bool showRetryButton);
86 void updateNavigationButtons();
88 void setForecastType(const QString label, MedardDownloader::ForecastType type);
89 void setForecastDateOffset(int offset);
92 MedardDownloader *m_downloader;
94 ForecastWidget *m_forecast;
96 MLabel *m_forecastTypeLabel;
97 MLabel *m_forecastInitialDateLabel;
98 MLabel *m_forecastDateLabel;
100 MButton *m_downloadRetryButton;
102 MButton *m_minusDayButton;
103 MButton *m_plusDayButton;
104 MButton *m_minusHourButton;
105 MButton *m_plusHourButton;
107 MComboBox *m_forecastDomainComboBox;
108 MComboBox *m_forecastTypeComboBox;
110 QLabel *m_forecastTypeLabel;
111 QLabel *m_forecastInitialDateLabel;
112 QLabel *m_forecastDateLabel;
114 QPushButton *m_downloadRetryButton;
116 QPushButton *m_minusDayButton;
117 QPushButton *m_plusDayButton;
118 QPushButton *m_minusHourButton;
119 QPushButton *m_plusHourButton;
121 QActionGroup *m_domainActionGroup;
126 #endif // MAINWINDOW_H