|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Base class for clickable status bar indicators. More...
#include <status_indicators.h>
Public Member Functions | |
| StatusIndicator (QWidget *parent=nullptr, ThemeManager *themeManager=nullptr) | |
| void | clicked () |
| void | setIcon (const QString &icon) |
| void | setText (const QString &text) |
| void | setTooltipText (const QString &tip) |
Protected Member Functions | |
| void | enterEvent (QEnterEvent *event) override |
| void | leaveEvent (QEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | paintEvent (QPaintEvent *event) override |
| void | updateTextColors () |
Protected Attributes | |
| bool | hovered_ = false |
| QLabel * | iconLabel_ = nullptr |
| bool | pressed_ = false |
| QLabel * | textLabel_ = nullptr |
| ThemeManager * | themeManager_ |
Base class for clickable status bar indicators.
Provides consistent styling and click behavior for status bar widgets.
Definition at line 43 of file status_indicators.h.
|
explicit |
Definition at line 27 of file status_indicators.cpp.
References iconLabel_, textLabel_, themeManager_, and updateTextColors().
Referenced by DownloadsIndicator::DownloadsIndicator(), LibraryStatsIndicator::LibraryStatsIndicator(), RunningGamesIndicator::RunningGamesIndicator(), and UpdatesIndicator::UpdatesIndicator().
| void StatusIndicator::clicked | ( | ) |
|
overrideprotected |
Definition at line 103 of file status_indicators.cpp.
References hovered_, and updateTextColors().
|
overrideprotected |
Definition at line 111 of file status_indicators.cpp.
References hovered_, pressed_, and updateTextColors().
|
overrideprotected |
Definition at line 120 of file status_indicators.cpp.
References pressed_, and updateTextColors().
|
overrideprotected |
Definition at line 130 of file status_indicators.cpp.
References clicked(), pressed_, and updateTextColors().
|
overrideprotected |
Definition at line 64 of file status_indicators.cpp.
References ThemeColors::accent, ThemeColors::hoverBackground, hovered_, pressed_, and themeManager_.
| void StatusIndicator::setIcon | ( | const QString & | icon | ) |
Definition at line 49 of file status_indicators.cpp.
References iconLabel_.
Referenced by DownloadsIndicator::DownloadsIndicator(), LibraryStatsIndicator::LibraryStatsIndicator(), RunningGamesIndicator::RunningGamesIndicator(), and UpdatesIndicator::UpdatesIndicator().
| void StatusIndicator::setText | ( | const QString & | text | ) |
Definition at line 54 of file status_indicators.cpp.
References textLabel_.
Referenced by DownloadsIndicator::DownloadsIndicator(), LibraryStatsIndicator::LibraryStatsIndicator(), RunningGamesIndicator::RunningGamesIndicator(), UpdatesIndicator::UpdatesIndicator(), DownloadsIndicator::refresh(), LibraryStatsIndicator::refresh(), RunningGamesIndicator::refresh(), and UpdatesIndicator::refresh().
| void StatusIndicator::setTooltipText | ( | const QString & | tip | ) |
Definition at line 59 of file status_indicators.cpp.
Referenced by RunningGamesIndicator::RunningGamesIndicator(), DownloadsIndicator::refresh(), LibraryStatsIndicator::refresh(), RunningGamesIndicator::refresh(), and UpdatesIndicator::refresh().
|
protected |
Definition at line 91 of file status_indicators.cpp.
References iconLabel_, pressed_, IconFont::solidFamily(), textLabel_, ThemeColors::textOnAccent, ThemeColors::textPrimary, and themeManager_.
Referenced by StatusIndicator(), enterEvent(), leaveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
protected |
Definition at line 68 of file status_indicators.h.
Referenced by enterEvent(), leaveEvent(), and paintEvent().
|
protected |
Definition at line 66 of file status_indicators.h.
Referenced by StatusIndicator(), setIcon(), and updateTextColors().
|
protected |
Definition at line 69 of file status_indicators.h.
Referenced by leaveEvent(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), and updateTextColors().
|
protected |
Definition at line 67 of file status_indicators.h.
Referenced by StatusIndicator(), setText(), and updateTextColors().
|
protected |
Definition at line 70 of file status_indicators.h.
Referenced by StatusIndicator(), paintEvent(), and updateTextColors().