Try to make getchoo requested changes

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2025-03-27 00:37:39 +00:00
parent e2b85a2e2b
commit 910febeeb0
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E
8 changed files with 266 additions and 300 deletions

View file

@ -44,13 +44,14 @@ CustomCommands::~CustomCommands()
CustomCommands::CustomCommands(QWidget* parent) : QWidget(parent), ui(new Ui::CustomCommands)
{
ui->setupUi(this);
connect(ui->overrideCheckBox, &QCheckBox::toggled, ui->customCommandsWidget, &QWidget::setEnabled);
}
void CustomCommands::initialize(bool checkable, bool checked, const QString& prelaunch, const QString& wrapper, const QString& postexit)
{
ui->customCommandsGroupBox->setCheckable(checkable);
ui->overrideCheckBox->setVisible(checkable);
if (checkable) {
ui->customCommandsGroupBox->setChecked(checked);
ui->overrideCheckBox->setChecked(checked);
}
ui->preLaunchCmdTextBox->setText(prelaunch);
ui->wrapperCmdTextBox->setText(wrapper);
@ -64,9 +65,9 @@ void CustomCommands::retranslate()
bool CustomCommands::checked() const
{
if (!ui->customCommandsGroupBox->isCheckable())
if (!ui->overrideCheckBox->isVisible())
return true;
return ui->customCommandsGroupBox->isChecked();
return ui->overrideCheckBox->isChecked();
}
QString CustomCommands::prelaunchCommand() const