|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Terminal panel widget that embeds a terminal emulator. More...
#include <terminalpanel.h>
Public Member Functions | |
| TerminalPanel (QWidget *parent=nullptr) | |
| ~TerminalPanel () override | |
| bool | isPaused () const |
| Check if the terminal process is currently paused. | |
| void | pauseProcess () |
| Pause the terminal process (suspends btop/htop to save CPU) Call when panel is hidden or window is minimized. | |
| void | processFinished (int exitCode) |
| Emitted when the terminal process finishes. | |
| void | resumeProcess () |
| Resume the terminal process Call when panel becomes visible again. | |
| void | startBtop () |
| Start or restart the terminal with btop++. | |
| void | startCommand (const QString &command) |
| Start the terminal with a custom command. | |
Static Public Member Functions | |
| static QString | getBestMonitorCommand () |
| Get the best available system monitor command. | |
| static bool | isBtopAvailable () |
| Check if btop++ is available on the system. | |
| static bool | isHtopAvailable () |
| Check if htop is available as a fallback. | |
Terminal panel widget that embeds a terminal emulator.
Provides an embedded terminal for running btop++, htop, or other terminal-based system monitoring tools directly within the game launcher.
Definition at line 31 of file terminalpanel.h.
|
explicit |
Definition at line 24 of file terminalpanel.cpp.
|
overridedefault |
|
static |
Get the best available system monitor command.
Definition at line 77 of file terminalpanel.cpp.
References isBtopAvailable(), and isHtopAvailable().
Referenced by startBtop().
|
static |
Check if btop++ is available on the system.
Definition at line 65 of file terminalpanel.cpp.
Referenced by getBestMonitorCommand().
|
static |
Check if htop is available as a fallback.
Definition at line 71 of file terminalpanel.cpp.
Referenced by getBestMonitorCommand().
|
inline |
Check if the terminal process is currently paused.
Definition at line 84 of file terminalpanel.h.
| void TerminalPanel::pauseProcess | ( | ) |
Pause the terminal process (suspends btop/htop to save CPU) Call when panel is hidden or window is minimized.
Definition at line 93 of file terminalpanel.cpp.
| void TerminalPanel::processFinished | ( | int | exitCode | ) |
Emitted when the terminal process finishes.
| exitCode | The exit code of the process |
| void TerminalPanel::resumeProcess | ( | ) |
Resume the terminal process Call when panel becomes visible again.
Definition at line 111 of file terminalpanel.cpp.
| void TerminalPanel::startBtop | ( | ) |
Start or restart the terminal with btop++.
Definition at line 36 of file terminalpanel.cpp.
References getBestMonitorCommand(), and startCommand().
| void TerminalPanel::startCommand | ( | const QString & | command | ) |
Start the terminal with a custom command.
| command | The command to execute in the terminal |
Definition at line 41 of file terminalpanel.cpp.
Referenced by startBtop().