|
game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
|
Checkbox that shows the associated environment variable. More...
#include <env_var_checkbox.h>
Public Member Functions | |
| EnvVarCheckBox (const QString &label, const QString &envVar, const QString &tooltip=QString(), QWidget *parent=nullptr, ThemeManager *themeManager=nullptr) | |
| Construct an EnvVarCheckBox. | |
| QString | envVarKey () const |
| Get the environment variable key (everything before '='). | |
| QString | envVarString () const |
| Get the full environment variable string. | |
| bool | isChecked () const |
| void | setChecked (bool checked) |
| void | setEnabled (bool enabled) |
| void | toggled (bool checked) |
Checkbox that shows the associated environment variable.
Displays the checkbox label and the actual env var that will be set, providing transparency for power users.
Visual layout: [x] Enable Feature ENV_VAR_NAME=value
Definition at line 28 of file env_var_checkbox.h.
| EnvVarCheckBox::EnvVarCheckBox | ( | const QString & | label, |
| const QString & | envVar, | ||
| const QString & | tooltip = QString(), | ||
| QWidget * | parent = nullptr, | ||
| ThemeManager * | themeManager = nullptr ) |
Construct an EnvVarCheckBox.
| label | User-friendly label for the checkbox |
| envVar | Environment variable string to display (e.g., "PROTON_USE_NTSYNC=1") |
| tooltip | Optional tooltip explaining the option |
| parent | Parent widget |
| themeManager | Optional ThemeManager. Falls back to the singleton when nullptr so existing call sites compile unchanged; tests can inject a fake. |
Definition at line 14 of file env_var_checkbox.cpp.
References ThemeManager::themeChanged(), and toggled().
| QString EnvVarCheckBox::envVarKey | ( | ) | const |
Get the environment variable key (everything before '=').
Definition at line 67 of file env_var_checkbox.cpp.
|
inline |
Get the full environment variable string.
Definition at line 54 of file env_var_checkbox.h.
| bool EnvVarCheckBox::isChecked | ( | ) | const |
Definition at line 51 of file env_var_checkbox.cpp.
| void EnvVarCheckBox::setChecked | ( | bool | checked | ) |
Definition at line 56 of file env_var_checkbox.cpp.
| void EnvVarCheckBox::setEnabled | ( | bool | enabled | ) |
Definition at line 61 of file env_var_checkbox.cpp.
| void EnvVarCheckBox::toggled | ( | bool | checked | ) |
Referenced by EnvVarCheckBox().