game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
EnvVarCheckBox Class Reference

Checkbox that shows the associated environment variable. More...

#include <env_var_checkbox.h>

Inheritance diagram for EnvVarCheckBox:
Collaboration diagram for EnvVarCheckBox:

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)

Detailed Description

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.

Constructor & Destructor Documentation

◆ EnvVarCheckBox()

EnvVarCheckBox::EnvVarCheckBox ( const QString & label,
const QString & envVar,
const QString & tooltip = QString(),
QWidget * parent = nullptr,
ThemeManager * themeManager = nullptr )

Construct an EnvVarCheckBox.

Parameters
labelUser-friendly label for the checkbox
envVarEnvironment variable string to display (e.g., "PROTON_USE_NTSYNC=1")
tooltipOptional tooltip explaining the option
parentParent widget
themeManagerOptional 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().

Member Function Documentation

◆ envVarKey()

QString EnvVarCheckBox::envVarKey ( ) const

Get the environment variable key (everything before '=').

Definition at line 67 of file env_var_checkbox.cpp.

◆ envVarString()

QString EnvVarCheckBox::envVarString ( ) const
inline

Get the full environment variable string.

Definition at line 54 of file env_var_checkbox.h.

◆ isChecked()

bool EnvVarCheckBox::isChecked ( ) const

Definition at line 51 of file env_var_checkbox.cpp.

◆ setChecked()

void EnvVarCheckBox::setChecked ( bool checked)

Definition at line 56 of file env_var_checkbox.cpp.

◆ setEnabled()

void EnvVarCheckBox::setEnabled ( bool enabled)

Definition at line 61 of file env_var_checkbox.cpp.

◆ toggled()

void EnvVarCheckBox::toggled ( bool checked)

Referenced by EnvVarCheckBox().


The documentation for this class was generated from the following files: