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
23 #include <QMainWindow>
24 #include <QActionGroup>
26 #include <QPushButton>
28 #include "forecastwidget.h"
29 #include "medarddownloader.h"
31 class MainWindow : public QMainWindow
36 MainWindow(QWidget *parent = 0);
37 virtual ~MainWindow();
40 void seaLevelPreasureMenuClicked();
41 void precipitationMenuClicked();
42 void windVelocityMenuClicked();
43 void cloudinessMenuClicked();
44 void temperatureMenuClicked();
45 void aboutMenuClicked();
47 void downloadAgainClicked();
49 void plusDayClicked();
50 void minusDayClicked();
51 void plusHourClicked();
52 void minusHourClicked();
54 void forecastTypeChanged(const QString label, MedardDownloader::ForecastType type);
55 void forecastDateOffsetChanged(int offset);
56 void forecastDomainChanged(QAction *action);
58 void downloadedFinished(const QString &filename, const QDateTime &date);
59 void downloadFailed();
66 void showNavigationButtons();
67 void hideNavigationButtons(bool showRetryButton);
68 void updateNavigationButtons();
71 MedardDownloader *m_downloader;
73 ForecastWidget *m_forecast;
74 QLabel *m_forecastTypeLabel;
75 QLabel *m_forecastInitialDateLabel;
76 QLabel *m_forecastDateLabel;
78 QPushButton *m_downloadRetryButton;
80 QPushButton *m_minusDayButton;
81 QPushButton *m_plusDayButton;
82 QPushButton *m_minusHourButton;
83 QPushButton *m_plusHourButton;
85 QActionGroup *m_domainActionGroup;
88 #endif // MAINWINDOW_H