Settings work

This commit is contained in:
Simone
2024-01-23 13:03:34 +01:00
parent e3cc520fa5
commit 46bb91ec31
9 changed files with 87 additions and 7 deletions

View File

@@ -13,10 +13,11 @@ SettingsWindow::SettingsWindow() : QWidget(nullptr) {
setWindowTitle("Settings");
cpuSettings = new CPUSettings(settings);
audioSettings = new AudioSettings(settings);
auto* tabs = new QTabWidget;
tabs->addTab(cpuSettings, tr("CPU"));
//tabs->addTab(new PermissionsTab, tr("Audio"));
tabs->addTab(audioSettings, tr("Audio"));
apply->setEnabled(false);
@@ -24,6 +25,10 @@ SettingsWindow::SettingsWindow() : QWidget(nullptr) {
apply->setEnabled(true);
});
connect(audioSettings, &AudioSettings::modified, this, [&]() {
apply->setEnabled(true);
});
connect(apply, &QPushButton::pressed, this, [&]() {
apply->setEnabled(false);
std::ofstream file("resources/settings.json");