Settings work
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user