Made settings editable when instance is running
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
0975dbc3dd
commit
820892d7cc
@ -60,17 +60,13 @@ InstanceSettingsPage::InstanceSettingsPage(BaseInstance *inst, QWidget *parent)
|
|||||||
m_settings = inst->settings();
|
m_settings = inst->settings();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
// As the signal will (probably) not be triggered once we click edit, let's update it manually instead.
|
|
||||||
updateRunningStatus(m_instance->isRunning());
|
|
||||||
|
|
||||||
connect(m_instance, &BaseInstance::runningStatusChanged, this, &InstanceSettingsPage::updateRunningStatus);
|
|
||||||
connect(ui->openGlobalJavaSettingsButton, &QCommandLinkButton::clicked, this, &InstanceSettingsPage::globalSettingsButtonClicked);
|
connect(ui->openGlobalJavaSettingsButton, &QCommandLinkButton::clicked, this, &InstanceSettingsPage::globalSettingsButtonClicked);
|
||||||
connect(APPLICATION, &Application::globalSettingsAboutToOpen, this, &InstanceSettingsPage::applySettings);
|
connect(APPLICATION, &Application::globalSettingsAboutToOpen, this, &InstanceSettingsPage::applySettings);
|
||||||
connect(APPLICATION, &Application::globalSettingsClosed, this, &InstanceSettingsPage::loadSettings);
|
connect(APPLICATION, &Application::globalSettingsClosed, this, &InstanceSettingsPage::loadSettings);
|
||||||
connect(ui->instanceAccountSelector, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &InstanceSettingsPage::changeInstanceAccount);
|
connect(ui->instanceAccountSelector, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||||
|
&InstanceSettingsPage::changeInstanceAccount);
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
|
|
||||||
updateThresholds();
|
updateThresholds();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,8 +519,3 @@ void InstanceSettingsPage::updateThresholds()
|
|||||||
ui->labelMaxMemIcon->setPixmap(pix);
|
ui->labelMaxMemIcon->setPixmap(pix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstanceSettingsPage::updateRunningStatus(bool running)
|
|
||||||
{
|
|
||||||
setEnabled(!running);
|
|
||||||
}
|
|
||||||
|
@ -79,8 +79,7 @@ public:
|
|||||||
|
|
||||||
void updateThresholds();
|
void updateThresholds();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateRunningStatus(bool running);
|
|
||||||
void on_javaDetectBtn_clicked();
|
void on_javaDetectBtn_clicked();
|
||||||
void on_javaTestBtn_clicked();
|
void on_javaTestBtn_clicked();
|
||||||
void on_javaBrowseBtn_clicked();
|
void on_javaBrowseBtn_clicked();
|
||||||
|
Loading…
Reference in New Issue
Block a user