AppCardWidget is a lightweight widget used to post messages to a DesktopToast.
More...
#include <appcardwidget.h>
|
|
| Q_DISABLE_COPY (AppCardWidget) |
| | Disable copy constructor and assignment operator.
|
| |
|
| AppCardWidget ()=delete |
| | Default constructor deleted to force usage of parameterized constructor.
|
| |
| | AppCardWidget (DesktopToast *toast, QWidget *parent=nullptr) |
| | Constructs an AppCardWidget.
|
| |
|
| ~AppCardWidget () |
| | Virtual destructor.
|
| |
| virtual void | setCurrentIcon (const QPixmap &icons) |
| | Set the current icon for the app card.
|
| |
| virtual void | invoke_preLaunch_work ()=0 |
| | Abstract method to invoke pre-launch operations.
|
| |
| virtual void | operate_comment_label ()=0 |
| | operate_comment_label
|
| |
|
void | invoke_textlabel_stylefresh () |
| | invoke_textlabel_stylefresh
|
| |
| bool | eventFilter (QObject *watched, QEvent *event) override |
| | Event filter to handle user interaction events.
|
| |
|
|
DesktopToast * | binding_toast |
| | Pointer to the toast widget used for posting messages.
|
| |
|
Ui::AppCardWidget * | ui |
| | UI object generated from the Qt Designer form.
|
| |
AppCardWidget is a lightweight widget used to post messages to a DesktopToast.
This is an abstract base class representing an application card UI component. It is responsible for handling pre-launch work and posting messages via toast notifications.
◆ AppCardWidget()
| AppCardWidget::AppCardWidget |
( |
DesktopToast * |
toast, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs an AppCardWidget.
- Parameters
-
| toast | Pointer to the DesktopToast object used to show messages. |
| parent | Optional parent widget. |
◆ eventFilter()
| bool AppCardWidget::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
event |
|
) |
| |
|
override |
Event filter to handle user interaction events.
- Parameters
-
| watched | The QObject being watched. |
| event | The event being filtered. |
- Returns
- true if the event was handled, otherwise false.
◆ invoke_preLaunch_work()
| virtual void AppCardWidget::invoke_preLaunch_work |
( |
| ) |
|
|
pure virtual |
Abstract method to invoke pre-launch operations.
Derived classes should implement this to perform necessary preparations before the system starts or the app card becomes active.
Implemented in LocalWeatherCard, and NetCardGadget.
◆ operate_comment_label()
| virtual void AppCardWidget::operate_comment_label |
( |
| ) |
|
|
pure virtual |
◆ postAppCardWidget()
| virtual void AppCardWidget::postAppCardWidget |
( |
| ) |
|
|
protectedpure virtual |
Abstract method to post messages to the bound DesktopToast.
Derived classes implement this to send notifications or status updates through the toast system.
Implemented in LocalWeatherCard, and NetCardGadget.
◆ setCurrentIcon()
| void AppCardWidget::setCurrentIcon |
( |
const QPixmap & |
icons | ) |
|
|
virtual |
Set the current icon for the app card.
This function allows derived classes to customize the app card icon by providing a QPixmap.
- Parameters
-
| icons | The pixmap to be used as the icon. |
◆ setHelperFunction()
| void AppCardWidget::setHelperFunction |
( |
const QString & |
what | ) |
|
|
protectedvirtual |
setHelperFunction: plainly set the text for shown
- Parameters
-
◆ setupSelfTextLabelStyle()
| virtual void AppCardWidget::setupSelfTextLabelStyle |
( |
QLabel * |
selfTextLabel | ) |
|
|
protectedpure virtual |
The documentation for this class was generated from the following files: