CCIMXDesktop
 
Loading...
Searching...
No Matches
WeatherCard_Plugins Class Reference

A plugin factory class for creating WeatherCard instances. More...

#include <WeatherCard.h>

Inheritance diagram for WeatherCard_Plugins:
DesktopPluginWidgetBase

Public Member Functions

QWidget * factorize_widget (QWidget *parent=nullptr) override
 Qt plugin metadata macro.
 

Detailed Description

A plugin factory class for creating WeatherCard instances.

This class serves as the entry point for dynamically loading WeatherCard as a plugin within a Qt application. It implements the DesktopPluginWidgetBase interface, allowing it to be discovered and instantiated by a plugin server.

Member Function Documentation

◆ factorize_widget()

QWidget * WeatherCard_Plugins::factorize_widget ( QWidget *  parent = nullptr)
inlineoverridevirtual

Qt plugin metadata macro.

  • Specifies the unique identifier (IID) for the plugin interface and the path to the JSON file containing additional plugin metadata (e.g., version, dependencies).

Declares that this class implements the DesktopPluginWidgetBase interface. This is crucial for Qt's plugin system to correctly identify and use this class.

Factory method to create and return a new instance of WeatherCard.

  • This method is part of the DesktopPluginWidgetBase interface. When the plugin is loaded, this method is called to create the actual widget that will be displayed.
    Parameters
    parentA pointer to the parent widget for the new WeatherCard instance. Defaults to nullptr.
    Returns
    A pointer to a newly created WeatherCard widget. Ownership is transferred to the caller.

Implements DesktopPluginWidgetBase.


The documentation for this class was generated from the following file: