The AppWidget class represents an application widget placed on the desktop.
More...
#include <appwidget.h>
The AppWidget class represents an application widget placed on the desktop.
It displays an icon and app name, manages the underlying ApplicationWrapper, and handles launching and status updates.
◆ AppStatus
Enum representing the application status.
Enumerator |
---|
AppOk | Application is running or available.
|
AppNonExsits | Application does not exist.
|
◆ AppWidget()
AppWidget::AppWidget |
( |
const QPixmap & |
icon, |
|
|
const QString & |
name, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs an AppWidget with the given icon and app name.
- Parameters
-
icon | The icon to display. |
name | The application name. |
parent | Optional parent widget. |
◆ app_name()
QString AppWidget::app_name |
( |
| ) |
const |
Get the application name.
- Returns
- The app name string.
◆ bindApp()
◆ currentFont()
QFont AppWidget::currentFont |
( |
| ) |
const |
currentFont get the current displaying font
- Returns
- displaying font
◆ do_daptch()
void AppWidget::do_daptch |
( |
| ) |
|
|
protectedvirtual |
◆ eventFilter()
bool AppWidget::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
event |
|
) |
| |
|
overrideprotected |
Event filter to handle user interaction events.
- Parameters
-
watched | The object being watched. |
event | The event being filtered. |
- Returns
- true if the event was handled, false otherwise.
◆ get_app()
◆ icon()
QPixmap AppWidget::icon |
( |
| ) |
const |
Get the current icon pixmap.
- Returns
- The icon pixmap.
◆ iconSize()
int AppWidget::iconSize |
( |
| ) |
const |
iconSize
- Returns
- icon size
◆ postAppStatus
Signal emitted to notify about the application status.
- Parameters
-
status | The current status of the app. |
◆ set_displayed_font()
void AppWidget::set_displayed_font |
( |
const QFont & |
f | ) |
|
set_displayed_font setFonts of displayed label
- Parameters
-
◆ setAppName()
void AppWidget::setAppName |
( |
const QString & |
name | ) |
|
|
noexcept |
Set the application name displayed by this widget.
- Parameters
-
◆ setDummy()
void AppWidget::setDummy |
( |
bool |
dummy | ) |
|
Set this widget as dummy mode.
When set to dummy, the widget is visible but does not respond to any real interaction or launch requests.
- Parameters
-
dummy | True to enable dummy mode; false to disable. |
◆ setFontColor()
void AppWidget::setFontColor |
( |
const QColor & |
color | ) |
|
setFontColor set the font color
- Parameters
-
◆ setIcon()
void AppWidget::setIcon |
( |
const QPixmap & |
icon | ) |
|
|
noexcept |
Set the icon displayed by this widget.
- Parameters
-
icon | The pixmap to set as icon. |
◆ setIconSize()
void AppWidget::setIconSize |
( |
int |
iconSize | ) |
|
Set the Icon size.
- Parameters
-
◆ showIconOnly()
void AppWidget::showIconOnly |
( |
bool |
st | ) |
|
Show or hide only the icon (hides other UI elements).
- Parameters
-
st | True to show icon only; false to show full widget. |
The documentation for this class was generated from the following files: