CCIMXDesktop
 
Loading...
Searching...
No Matches
localweathercard.h
1#ifndef LOCALWEATHERCARD_H
2#define LOCALWEATHERCARD_H
3/* Card Works as the base */
4#include "appcardwidget.h"
5
12public:
23 /* for advanced c++, use concept is better */
24
29 virtual float fetch_local_tempature() = 0;
35 virtual QString makeup_toast_message() = 0;
36};
37
43public:
48 LocalWeatherCard() = delete;
58 explicit LocalWeatherCard(
59 DesktopToast* toast, QWidget* parent = nullptr);
60
61public:
65 void invoke_preLaunch_work() override;
69 void operate_comment_label() override;
70
71protected:
76 void postAppCardWidget() override;
78 void setupSelfTextLabelStyle(QLabel* selfTextLabel) override;
79};
80
81#endif // LOCALWEATHERCARD_H
AppCardWidget is a lightweight widget used to post messages to a DesktopToast.
Definition appcardwidget.h:18
The DesktopToast class is the toast handle classes using less lock messages queue to display the mess...
Definition DesktopToast.h:15
The LocalWeatherCard class is the card widgets, press it to trigger the light service(current display...
Definition localweathercard.h:42
LocalWeatherLightFetcher * localFetcher
fetcher instance
Definition localweathercard.h:77
void postAppCardWidget() override
postAppCardWidget is the concrete implementation of the AppCardWidget
Definition localweathercard.cpp:110
Q_DISABLE_COPY(LocalWeatherCard)
disable copy
LocalWeatherCard()=delete
Construct a new Local Weather Card object default disabled.
void invoke_preLaunch_work() override
concrete implementation of the AppCardWidget
Definition localweathercard.cpp:95
void setupSelfTextLabelStyle(QLabel *selfTextLabel) override
textlabel style reset
Definition localweathercard.cpp:117
void operate_comment_label() override
operate_comment_label operating self labels
Definition localweathercard.cpp:106
The LocalWeatherLightFetcher class is the interface level class if later, the projects using C++23,...
Definition localweathercard.h:11
virtual QString makeup_toast_message()=0
makeup_toast_message is the message that will be displayed in the toast, so this functions is using i...
LocalWeatherLightFetcher()=default
Construct a new Local Weather Light Fetcher object.
Q_DISABLE_COPY(LocalWeatherLightFetcher)
disable copy
virtual float fetch_local_tempature()=0
fetch_local_tempature is the main function to fetch the local temperature