CCIMXDesktop
 
Loading...
Searching...
No Matches
WeatherAppMainWindow.h
1#ifndef WEATHERAPPMAINWINDOW_H
2#define WEATHERAPPMAINWINDOW_H
3#include <QMainWindow>
4#include <QNetworkReply>
7class DesktopToast;
8class QLineEdit;
9QT_BEGIN_NAMESPACE
10namespace Ui {
12}
13QT_END_NAMESPACE
14
19class WeatherAppMainWindow : public QMainWindow {
20 Q_OBJECT
21 static constexpr const char* default_city = "changchun";
22 static constexpr const char* def_indicate_label_text = "Current Searching City: ";
23
24public:
25 static constexpr const char* WEB_URL = _DEF_WEATHER_URL;
31 WeatherAppMainWindow(QWidget* parent = nullptr);
37
43
44private slots:
49 void makeup_errors(QNetworkReply* reply);
53 void switch_city();
54
55private:
60 void setup_internal();
64 void setup_connections();
69 void reach_result();
70 void post_setup_ui();
71 Ui::WeatherAppMainWindow* ui;
72 /* App request and result */
73 AppWeatherResult* result;
74 AppWeatherRequest* request;
75 DesktopToast* toast;
76 QLineEdit* lineEdit { nullptr };
77};
78#endif // WEATHERAPPMAINWINDOW_H
The AppWeatherRequest class provides the weather request and implements the WeatherRequest functional...
Definition AppWeatherRequest.h:61
The AppWeatherResult class provides the weather result and implements the WeatherResult functionality...
Definition AppWeatherRequest.h:9
The DesktopToast class is the toast handle classes using less lock messages queue to display the mess...
Definition DesktopToast.h:15
The WeatherAppMainWindow class The WeatherAppMainWindow class provides the weather app main window.
Definition WeatherAppMainWindow.h:19
~WeatherAppMainWindow()
Destroy the Weather App Main Window object.
Definition WeatherAppMainWindow.cpp:17
static constexpr const char * WEB_URL
request base url
Definition WeatherAppMainWindow.h:25
void refresh_post_request()
refresh_post_request This function is used to refresh the post request
Definition WeatherAppMainWindow.cpp:22