forked from Wobbl/Wobuzz
Added "library_path" setting, added a gui for the settings, changed the window layout and did a bunch of other things.
This commit is contained in:
parent
259ec72442
commit
6498f43d5f
10 changed files with 124 additions and 37 deletions
25
wobuzz/gui_communication/settings.py
Normal file
25
wobuzz/gui_communication/settings.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
|
||||
class Settings:
|
||||
def __init__(self, app):
|
||||
self.app = app
|
||||
|
||||
self.settings = self.app.gui.window.settings
|
||||
|
||||
self.connect()
|
||||
|
||||
def connect(self):
|
||||
self.settings.file_settings.library_path_input.returnPressed.connect(self.write_settings)
|
||||
|
||||
def update_all(self):
|
||||
self.settings.file_settings.library_path_input.setText(self.app.settings.library_path)
|
||||
|
||||
def update_settings(self, key, value):
|
||||
match key:
|
||||
case "library_path":
|
||||
self.settings.file_settings.library_path_input.setText(value)
|
||||
|
||||
def write_settings(self):
|
||||
self.app.settings.library_path = self.settings.file_settings.library_path_input.text()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue