CCIMXDesktop
 
Loading...
Searching...
No Matches
AppCardWidget Class Referenceabstract

AppCardWidget is a lightweight widget used to post messages to a DesktopToast. More...

#include <appcardwidget.h>

Inheritance diagram for AppCardWidget:
LocalWeatherCard NetCardGadget

Public Member Functions

 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.
 

Protected Member Functions

virtual void postAppCardWidget ()=0
 Abstract method to post messages to the bound DesktopToast.
 
virtual void setHelperFunction (const QString &what)
 setHelperFunction: plainly set the text for shown
 
virtual void setupSelfTextLabelStyle (QLabel *selfTextLabel)=0
 

Protected Attributes

DesktopToastbinding_toast
 Pointer to the toast widget used for posting messages.
 
Ui::AppCardWidget * ui
 UI object generated from the Qt Designer form.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AppCardWidget()

AppCardWidget::AppCardWidget ( DesktopToast toast,
QWidget *  parent = nullptr 
)
explicit

Constructs an AppCardWidget.

Parameters
toastPointer to the DesktopToast object used to show messages.
parentOptional parent widget.

Member Function Documentation

◆ eventFilter()

bool AppCardWidget::eventFilter ( QObject *  watched,
QEvent *  event 
)
override

Event filter to handle user interaction events.

Parameters
watchedThe QObject being watched.
eventThe 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

operate_comment_label

Implemented in LocalWeatherCard, and NetCardGadget.

◆ 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
iconsThe pixmap to be used as the icon.

◆ setHelperFunction()

void AppCardWidget::setHelperFunction ( const QString &  what)
protectedvirtual

setHelperFunction: plainly set the text for shown

Parameters
what

◆ setupSelfTextLabelStyle()

virtual void AppCardWidget::setupSelfTextLabelStyle ( QLabel *  selfTextLabel)
protectedpure virtual

Implemented in LocalWeatherCard, and NetCardGadget.


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