-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.h
More file actions
87 lines (63 loc) · 1.77 KB
/
app.h
File metadata and controls
87 lines (63 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef APP_H
#define APP_H
#include <QDir>
#include <QMainWindow>
#include <QInputDialog>
#include <QWidgetAction>
#include <QMessageBox>
#include <QResizeEvent>
#include <QAbstractButton>
#include <QCloseEvent>
#include <QDateTime>
#include <QtCharts/QChart>
#include <QtCharts/QSplineSeries>
#include <QtCharts/QDateTimeAxis>
#include <QtCharts/QChartView>
#include "src/place.h"
#include "src/config.h"
#include "src/weather.h"
#include "src/weatherinputdialog.h"
QT_BEGIN_NAMESPACE
namespace Ui { class App; }
QT_END_NAMESPACE
class App : public QMainWindow {
Q_OBJECT
public:
App(QWidget *parent = nullptr);
~App();
void resizeEvent(QResizeEvent *event) override;
void closeEvent(QCloseEvent *event) override;
private slots:
void on_actionNew_City_triggered();
void on_actionOpen_City_triggered();
void on_actionAbout_this_project_triggered();
void on_actionAbout_author_triggered();
void on_actionClose_city_triggered();
void on_actionQuit_triggered();
void on_actionNew_Weather_Record_triggered();
void on_actionLoad_weather_graph_triggered();
void on_currentObservingDateEdit_dateTimeChanged(const QDateTime &dateTime);
void on_actionWarmest_and_Coldest_days_triggered();
private:
Place *getPlace();
void loadPlace(bool open);
void updateWeatherInfo();
void showWeatherWeek();
void showWeather(const Weather &weather, size_t idx);
private:
Ui::App *ui;
Place *currentPlace;
QVector<Weather> currentShownWeather;
private:
QVector<QLabel *> dateLabels;
QVector<QLabel *> imageLabels;
QVector<QLabel *> stubLabels;
// Images // renaming needed
private:
QPixmap pixmap;
QSize initSize;
QSize initLabelImageSize;
private:
QMainWindow *chartWindow;
};
#endif // APP_H