From 8e6aaffb2c5dd9ff852549d347bf71f917844043 Mon Sep 17 00:00:00 2001 From: bigtedde Date: Tue, 5 Sep 2023 18:44:41 -0700 Subject: [PATCH] sidebar created, settings tab created --- src/vorta/assets/UI/mainwindow.ui | 376 ++++++++++++++++-------------- src/vorta/views/main_window.py | 14 +- 2 files changed, 215 insertions(+), 175 deletions(-) diff --git a/src/vorta/assets/UI/mainwindow.ui b/src/vorta/assets/UI/mainwindow.ui index a8b67caea..566577737 100644 --- a/src/vorta/assets/UI/mainwindow.ui +++ b/src/vorta/assets/UI/mainwindow.ui @@ -12,7 +12,7 @@ - 800 + 1000 600 @@ -23,28 +23,9 @@ 1.000000000000000 - + - - - 12 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - + @@ -54,10 +35,10 @@ - + - 300 - 0 + 150 + 50 @@ -66,171 +47,218 @@ - - - Add a new profile (Dropdown: Import from file) - - - - 16 - 16 - - - - QToolButton::MenuButtonPopup - - - - - - - Rename current profile - - - - 16 - 16 - - - - - - - - Export current profile - - - - - - - - - - Delete current profile - - - - - + + + + + Add a new profile (Dropdown: Import from file) + + + + 16 + 16 + + + + QToolButton::MenuButtonPopup + + + + + + + Rename current profile + + + + 16 + 16 + + + + + + + + Export current profile + + + + + + + + + + Delete current profile + + + + + + + - + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 20 + 40 - - - - - - - 0 - 0 - - - - false - - - false - - - - - 0 - 0 - - - - Repository - - - - - Sources - - - - - Schedule - - - - - Archives - - - - - Misc - - - - - - - - - - false - - - - 150 - 0 - - - - false - + + - Cancel - - - false - - - - - - - - 0 - 0 - - - - true - - - - - - - - 0 - 0 - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true + Settings + + + + + + + 0 + 0 + + + + false + + + false + + + + + 0 + 0 + + + + Settings + + + + + About + + + + + Profile Settings + + + + + + + + + 0 + 0 + + + + false + + + false + + + + + 0 + 0 + + + + Repository + + + + + Sources + + + + + Schedule + + + + + Archives + + + + + + + + + + false + + + + 150 + 0 + + + + false + + + Cancel + + + false + + + + + + + + 0 + 0 + + + + true + + + + + + + + 0 + 0 + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + diff --git a/src/vorta/views/main_window.py b/src/vorta/views/main_window.py index 1f0c42e73..0211c61ac 100644 --- a/src/vorta/views/main_window.py +++ b/src/vorta/views/main_window.py @@ -71,8 +71,9 @@ def __init__(self, parent=None): self.sourceTab = SourceTab(self.sourceTabSlot) self.archiveTab = ArchiveTab(self.archiveTabSlot, app=self.app) self.scheduleTab = ScheduleTab(self.scheduleTabSlot) - self.miscTab = MiscTab(self.miscTabSlot) + self.miscTab = MiscTab(self.SettingsTabSlot) self.miscTab.set_borg_details(borg_compat.version, borg_compat.path) + self.settingsWidget.hide() self.tabWidget.setCurrentIndex(0) self.repoTab.repo_changed.connect(self.archiveTab.populate_from_profile) @@ -80,6 +81,7 @@ def __init__(self, parent=None): self.repoTab.repo_added.connect(self.archiveTab.refresh_archive_list) self.miscTab.refresh_archive.connect(self.archiveTab.populate_from_profile) + self.settingsButton.clicked.connect(self.loadMiscTab) self.createStartBtn.clicked.connect(self.app.create_backup_action) self.cancelButton.clicked.connect(self.app.backup_cancelled_event.emit) @@ -266,6 +268,16 @@ def profile_add_edit_result(self, profile_name, profile_id): self.profileSelector.addItem(profile_name, profile_id) self.profileSelector.setCurrentIndex(self.profileSelector.count() - 1) + def loadMiscTab(self): + if self.settingsWidget.isVisible(): + self.settingsWidget.hide() + self.tabWidget.setCurrentIndex(0) + self.tabWidget.show() + else: + self.tabWidget.hide() + self.settingsWidget.setCurrentIndex(0) + self.settingsWidget.show() + def backup_started_event(self): self._toggle_buttons(create_enabled=False) self.archiveTab._toggle_all_buttons(enabled=False)