CCIMXDesktop
 
Loading...
Searching...
No Matches
appcardwidget.h
1#ifndef APPCARDWIDGET_H
2#define APPCARDWIDGET_H
3
4#include <QWidget>
5
6class DesktopToast;
7class QLabel;
8namespace Ui {
9class AppCardWidget;
10}
11
18class AppCardWidget : public QWidget {
19 Q_OBJECT
20
21public:
26
30 AppCardWidget() = delete;
31
37 explicit AppCardWidget(DesktopToast* toast, QWidget* parent = nullptr);
38
43
52 virtual void setCurrentIcon(const QPixmap& icons);
53
60 virtual void invoke_preLaunch_work() = 0;
64 virtual void operate_comment_label() = 0;
65
70
71protected:
78 virtual void postAppCardWidget() = 0;
79
84 virtual void setHelperFunction(const QString& what);
85
86 virtual void setupSelfTextLabelStyle(QLabel* selfTextLabel) = 0;
87
89 Ui::AppCardWidget* ui;
90
91public:
98 bool eventFilter(QObject* watched, QEvent* event) override;
99};
100
101#endif // APPCARDWIDGET_H
AppCardWidget is a lightweight widget used to post messages to a DesktopToast.
Definition appcardwidget.h:18
virtual void setHelperFunction(const QString &what)
setHelperFunction: plainly set the text for shown
Definition appcardwidget.cpp:36
virtual void setCurrentIcon(const QPixmap &icons)
Set the current icon for the app card.
Definition appcardwidget.cpp:27
~AppCardWidget()
Virtual destructor.
Definition appcardwidget.cpp:40
virtual void invoke_preLaunch_work()=0
Abstract method to invoke pre-launch operations.
Q_DISABLE_COPY(AppCardWidget)
Disable copy constructor and assignment operator.
bool eventFilter(QObject *watched, QEvent *event) override
Event filter to handle user interaction events.
Definition appcardwidget.cpp:44
void invoke_textlabel_stylefresh()
invoke_textlabel_stylefresh
Definition appcardwidget.cpp:32
virtual void operate_comment_label()=0
operate_comment_label
AppCardWidget()=delete
Default constructor deleted to force usage of parameterized constructor.
DesktopToast * binding_toast
Pointer to the toast widget used for posting messages.
Definition appcardwidget.h:88
virtual void postAppCardWidget()=0
Abstract method to post messages to the bound DesktopToast.
Ui::AppCardWidget * ui
UI object generated from the Qt Designer form.
Definition appcardwidget.h:89
The DesktopToast class is the toast handle classes using less lock messages queue to display the mess...
Definition DesktopToast.h:15