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();
69 void forecastTypeChanged(const QString label, MedardDownloader::ForecastType type);
70 void forecastDateOffsetChanged(int offset);
72 void forecastDomainChanged(int index);
74 void forecastDomainChanged(QAction *action);
77 void downloadedFinished(const QString &filename, const QDateTime &date);
78 void downloadFailed();
85 void showNavigationButtons();
86 void hideNavigationButtons(bool showRetryButton);
87 void updateNavigationButtons();
90 MedardDownloader *m_downloader;
92 ForecastWidget *m_forecast;
94 MLabel *m_forecastTypeLabel;
95 MLabel *m_forecastInitialDateLabel;
96 MLabel *m_forecastDateLabel;
98 MButton *m_downloadRetryButton;
100 MButton *m_minusDayButton;
101 MButton *m_plusDayButton;
102 MButton *m_minusHourButton;
103 MButton *m_plusHourButton;
105 MComboBox *m_domainComboBox;
107 QLabel *m_forecastTypeLabel;
108 QLabel *m_forecastInitialDateLabel;
109 QLabel *m_forecastDateLabel;
111 QPushButton *m_downloadRetryButton;
113 QPushButton *m_minusDayButton;
114 QPushButton *m_plusDayButton;
115 QPushButton *m_minusHourButton;
116 QPushButton *m_plusHourButton;
118 QActionGroup *m_domainActionGroup;
123 #endif // MAINWINDOW_H