|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Compact widget showing running game status in the toolbar. More...
#include <running_game_status_widget.h>
Public Member Functions | |
| RunningGameStatusWidget (QWidget *parent=nullptr, ThemeManager *themeManager=nullptr) | |
| ~RunningGameStatusWidget () override=default | |
| void | applyTheme () |
| Apply current theme colors. | |
| void | clear () |
| Clear the widget (no game running). | |
| void | clicked () |
| Emitted when widget is clicked. | |
| QString | currentGameId () const |
| Get current game ID. | |
| bool | hasActiveGame () const |
| Check if widget has active game data. | |
| void | setLaunchInfo (const QStringList &optimizations, const QString &runner, const QString &protonVersion) |
| Set detailed tooltip info about launch configuration. | |
| void | showDetailsRequested (const QString &gameId) |
| Emitted when user wants to show details for this game. | |
| void | updateStatus (const QString &gameId, const QString &gameName, int runningSeconds, double fps, double frametime, const std::vector< double > &frametimeHistory, const QString &trackedProcessName=QString()) |
| Update the widget with current game info. | |
Protected Member Functions | |
| void | enterEvent (QEnterEvent *event) override |
| void | leaveEvent (QEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | paintEvent (QPaintEvent *event) override |
Compact widget showing running game status in the toolbar.
Displays when a game is running and the details panel is hidden. Shows: game name, running time, FPS, and a mini frametime sparkline. Hover shows detailed optimization/launch info. Click reveals the details panel.
Definition at line 23 of file running_game_status_widget.h.
|
explicit |
Definition at line 13 of file running_game_status_widget.cpp.
References applyTheme(), FA::ClockRotateLeft, FA::Play, IconFont::solidFamily(), IconFont::text(), and ThemeManager::themeChanged().
|
overridedefault |
| void RunningGameStatusWidget::applyTheme | ( | ) |
Apply current theme colors.
Definition at line 443 of file running_game_status_widget.cpp.
References ThemeColors::success.
Referenced by RunningGameStatusWidget().
| void RunningGameStatusWidget::clear | ( | ) |
Clear the widget (no game running).
Definition at line 217 of file running_game_status_widget.cpp.
| void RunningGameStatusWidget::clicked | ( | ) |
Emitted when widget is clicked.
Referenced by mousePressEvent(), and ToolbarManager::setupToolbar().
|
inline |
Get current game ID.
Definition at line 72 of file running_game_status_widget.h.
|
overrideprotected |
Definition at line 429 of file running_game_status_widget.cpp.
|
inline |
Check if widget has active game data.
Definition at line 64 of file running_game_status_widget.h.
|
overrideprotected |
Definition at line 436 of file running_game_status_widget.cpp.
|
overrideprotected |
Definition at line 416 of file running_game_status_widget.cpp.
References clicked(), and showDetailsRequested().
|
overrideprotected |
Definition at line 304 of file running_game_status_widget.cpp.
| void RunningGameStatusWidget::setLaunchInfo | ( | const QStringList & | optimizations, |
| const QString & | runner, | ||
| const QString & | protonVersion ) |
Set detailed tooltip info about launch configuration.
| optimizations | List of applied optimizations (e.g., "MangoHud", "GameMode") |
| runner | Runner type (e.g., "Proton", "Wine", "Native") |
| protonVersion | Proton version if applicable |
Definition at line 208 of file running_game_status_widget.cpp.
| void RunningGameStatusWidget::showDetailsRequested | ( | const QString & | gameId | ) |
Emitted when user wants to show details for this game.
Referenced by mousePressEvent().
| void RunningGameStatusWidget::updateStatus | ( | const QString & | gameId, |
| const QString & | gameName, | ||
| int | runningSeconds, | ||
| double | fps, | ||
| double | frametime, | ||
| const std::vector< double > & | frametimeHistory, | ||
| const QString & | trackedProcessName = QString() ) |
Update the widget with current game info.
| gameId | Game identifier |
| gameName | Display name of the game |
| runningSeconds | How long the game has been running |
| fps | Current FPS (0 if unavailable) |
| frametime | Current frametime in ms (0 if unavailable) |
| frametimeHistory | Recent frametimes for sparkline |
| trackedProcessName | Optional - actual game process name (e.g., "WoWClassic.exe" when gameName is "Battle.net") |
Definition at line 110 of file running_game_status_widget.cpp.
References ThemeColors::error, ThemeColors::success, ThemeColors::textMuted, and ThemeColors::warning.