-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwidget.h
82 lines (75 loc) · 2.13 KB
/
widget.h
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
#ifndef WIDGET_H
#define WIDGET_H
#include <QPainter>
#include <QStyleOption>
#include <QWidget>
#include <QFile>
#include <stylehelper.h>
#include <QFontDatabase>
#include "getcitylist.h"
#include <QCompleter>
#include <QStringListModel>
#include <sendrequest.h>
#include <QDateTime>
#include <QTimer>
#include <QMouseEvent>
#include <QJsonArray>
#include <QSettings>
#include <QTimeZone>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
private:
Ui::Widget *ui;
void setStyleForWidget();
void setStyleForcityLineEdit();
QMap<QString, QString> dayOfTheWeekMap;
QMap<QString, QString> dayOfMonth;
void setQMapDayWeek();
QDateTime date;
void paintEvent(QPaintEvent *);
GetCityList * getCityListItem;
void createCityList();
QString cityFull;
QString city;
void exitButtonActivate();
void todayDateTime();
void setQTimer();
QString returnDayOfTheWeek(QDateTime day);
QString returnMonth(QDateTime month);
int utc;
void setcityDateLabel();
void setCityName(QString cityName);
void defaultCityName();
SendRequest * req;
void defaultReq();
void changeDayReq();
QPoint mpos;
// for window moving
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
QString formURL(QString lat,QString longt, QString startDate, QString finishDate);
QString latitude;
QString longtitude;
QString dateStart;
QString dateFinish;
void setCurrentParametrs(QStringList parametrs);
void setFiveDayForecastParametrs(QList<int> weatherCode, QList<int> temp);
void setTodayForecastParametrs(QList<int> weatherCode, QList<int> temp, QList<int> windSpeed, QList<int> windDirection);
QString analyzeWeatherCode(int code);
void widgetsHide();
void widgetsShow();
public slots:
void updateCurrentTime();
void dateChanged();
void SendPushButtonClicked();
void requestReadyToReadDedault(QJsonObject & obj);
void requestReadyToReadChangeDay(QJsonObject & obj);
};
#endif // WIDGET_H