Show and hide autostart/autostop timer widgets when the mode settings are toggled

This commit is contained in:
Micah Lee 2019-11-02 18:08:14 -07:00
parent ed1c3e1bc8
commit f04452777d
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
3 changed files with 64 additions and 51 deletions

View file

@ -28,6 +28,7 @@ class ModeSettingsWidget(QtWidgets.QWidget):
"""
change_persistent = QtCore.pyqtSignal(int, bool)
update_server_status = QtCore.pyqtSignal()
def __init__(self, common, tab_id, mode_settings):
super(ModeSettingsWidget, self).__init__()
@ -149,11 +150,13 @@ class ModeSettingsWidget(QtWidgets.QWidget):
self.settings.set(
"general", "autostart_timer", self.autostart_timer_checkbox.isChecked()
)
self.update_server_status.emit()
def autostop_timer_checkbox_clicked(self):
self.settings.set(
"general", "autostop_timer", self.autostop_timer_checkbox.isChecked()
)
self.update_server_status.emit()
def legacy_checkbox_clicked(self):
self.settings.set("general", "legacy", self.legacy_checkbox.isChecked())