CCIMXDesktop
 
Loading...
Searching...
No Matches
WeatherCard.h
Go to the documentation of this file.
1
6#ifndef WEATHERCARD_H
7#define WEATHERCARD_H
8
9#include "DesktopPluginWidgetBase.h" // Base class for desktop plugin widgets
10#include "WeatherData.h" // Data structure for weather information
11#include <QObject> // Base class for WeatherCard_Plugins (for Q_OBJECT)
12#include <QWidget> // Base class for WeatherCard
13#include <QtPlugin> // For Q_PLUGIN_METADATA and Q_INTERFACES
14
15// Forward declaration of the UI namespace generated by Qt Designer
16namespace Ui {
17class WeatherCard;
18}
19
20// Forward declaration to avoid heavy includes
22
32class WeatherCard : public QWidget {
33Q_OBJECT // Enables Qt's meta-object system features like signals and slots
34
35 public :
40 explicit WeatherCard(QWidget* parent = nullptr);
41
48
49private slots:
57 void receiveDatas(const WeatherData data);
58
59private:
65 Ui::WeatherCard* ui;
66
73};
74
83class WeatherCard_Plugins : public QObject, public DesktopPluginWidgetBase {
84Q_OBJECT // Enables Qt's meta-object system features
85
91Q_PLUGIN_METADATA(IID "com.DesktopPluginWidgetBase.DesktopPluginWidgetBase/1.0" FILE "WeatherCard_plugin.json")
92
93
97 Q_INTERFACES(DesktopPluginWidgetBase)
98
99 public :
107 QWidget* factorize_widget(QWidget* parent = nullptr) override {
108 return new WeatherCard(parent);
109 }
110};
111
112#endif // WEATHERCARD_H
Defines data structures for weather information and geographical location.
A plugin factory class for creating WeatherCard instances.
Definition WeatherCard.h:83
QWidget * factorize_widget(QWidget *parent=nullptr) override
Qt plugin metadata macro.
Definition WeatherCard.h:107
A custom QWidget that displays current weather information.
Definition WeatherCard.h:32
~WeatherCard()
Destroys the WeatherCard object.
Definition WeatherCard.cpp:148
Handles the logic for requesting geographical and weather data from network services.
Definition WeatherRequestEngine.h:28
The DesktopPluginWidgetBase class is such a simple interface class marking in Dynamic Loadable Librar...
Definition DesktopPluginWidgetBase.h:9
Represents a snapshot of weather conditions for a specific location and time.
Definition WeatherData.h:19