From fe2162bd0fb5fef2dd38e4f08824a33eb46ba818 Mon Sep 17 00:00:00 2001
From: Boris Pozdena
Date: Thu, 10 Feb 2022 18:03:22 +0100
Subject: [PATCH] -
---
src/__thrash/OneDriveGUI-backup.py | 307 ++++++++++++++++++++
src/__thrash/OneDriveGUI-bob-Manja.py | 262 +++++++++++++++++
src/__thrash/config | 47 +++
src/__thrash/dict_parser_test.py | 120 ++++++++
src/__thrash/file_dialog_test.py | 50 ++++
src/__thrash/form.ui | 22 ++
src/__thrash/list_test.py | 106 +++++++
src/__thrash/mainwindow.py | 52 ++++
src/__thrash/message_box_test.py | 39 +++
src/__thrash/new_window_test.py | 43 +++
src/__thrash/output_parser_test.py | 136 +++++++++
src/__thrash/re_test.py | 58 ++++
src/__thrash/setup_wizard.py | 232 +++++++++++++++
src/__thrash/system_tray.py | 39 +++
src/__thrash/test.py | 13 +
src/__thrash/ui/settings-good-backup.ui | 223 ++++++++++++++
src/__thrash/ui/settings2.ui | 236 +++++++++++++++
src/__thrash/ui/settings_qt5_web-test.ui | 245 ++++++++++++++++
src/__thrash/ui/settings_ui.py | 229 +++++++++++++++
src/__thrash/ui/ui_OneDriveGUI.py | 127 ++++++++
src/__thrash/ui/ui_settings-good-backup.py | 229 +++++++++++++++
src/__thrash/ui/ui_settings2.py | 240 +++++++++++++++
src/__thrash/ui/ui_settings_qt5_web-test.py | 229 +++++++++++++++
src/__thrash/ui/ui_settings_web.py | 229 +++++++++++++++
src/__thrash/ui_list_item_widget.py_ | 83 ++++++
src/__thrash/ui_setup_wizard.py | 150 ++++++++++
src/__thrash/ui_wizardPage_welcome.py | 43 +++
src/__thrash/version2.py | 20 ++
src/__thrash/wizardPage_welcome.ui | 45 +++
src/__thrash/wizard_test.py | 81 ++++++
src/__thrash/wizard_test2.py | 95 ++++++
31 files changed, 4030 insertions(+)
create mode 100644 src/__thrash/OneDriveGUI-backup.py
create mode 100644 src/__thrash/OneDriveGUI-bob-Manja.py
create mode 100644 src/__thrash/config
create mode 100644 src/__thrash/dict_parser_test.py
create mode 100644 src/__thrash/file_dialog_test.py
create mode 100644 src/__thrash/form.ui
create mode 100644 src/__thrash/list_test.py
create mode 100644 src/__thrash/mainwindow.py
create mode 100644 src/__thrash/message_box_test.py
create mode 100644 src/__thrash/new_window_test.py
create mode 100644 src/__thrash/output_parser_test.py
create mode 100644 src/__thrash/re_test.py
create mode 100644 src/__thrash/setup_wizard.py
create mode 100644 src/__thrash/system_tray.py
create mode 100644 src/__thrash/test.py
create mode 100644 src/__thrash/ui/settings-good-backup.ui
create mode 100644 src/__thrash/ui/settings2.ui
create mode 100644 src/__thrash/ui/settings_qt5_web-test.ui
create mode 100644 src/__thrash/ui/settings_ui.py
create mode 100644 src/__thrash/ui/ui_OneDriveGUI.py
create mode 100644 src/__thrash/ui/ui_settings-good-backup.py
create mode 100644 src/__thrash/ui/ui_settings2.py
create mode 100644 src/__thrash/ui/ui_settings_qt5_web-test.py
create mode 100644 src/__thrash/ui/ui_settings_web.py
create mode 100644 src/__thrash/ui_list_item_widget.py_
create mode 100644 src/__thrash/ui_setup_wizard.py
create mode 100644 src/__thrash/ui_wizardPage_welcome.py
create mode 100644 src/__thrash/version2.py
create mode 100644 src/__thrash/wizardPage_welcome.ui
create mode 100644 src/__thrash/wizard_test.py
create mode 100644 src/__thrash/wizard_test2.py
diff --git a/src/__thrash/OneDriveGUI-backup.py b/src/__thrash/OneDriveGUI-backup.py
new file mode 100644
index 0000000..a882da4
--- /dev/null
+++ b/src/__thrash/OneDriveGUI-backup.py
@@ -0,0 +1,307 @@
+import sys, psutil, os, subprocess, signal
+from configparser import ConfigParser
+
+from PySide6.QtWidgets import (QWidget, QApplication, QMainWindow, QMenu, QSystemTrayIcon, QDialog)
+from PySide6.QtGui import QIcon
+from PySide6.QtCore import QTimer, QUrl
+
+from ui.ui_mainwindow import Ui_MainWindow
+from ui.ui_settings import Ui_Form
+from ui.ui_login import Ui_LoginWindow
+
+CONFIG_FILE = os.path.expanduser('~/.config/onedrive/config')
+
+class MainWindow(QMainWindow, Ui_MainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+ self.setupUi(self)
+
+ # Open Settings window
+ self.pushButton_3.clicked.connect(lambda: self.show_settings())
+
+ # Update OneDrive Status
+ self.pushButton_10.clicked.connect(lambda: self.oneDriveProcessStatus())
+
+ # Start OneDrive service
+ self.pushButton_4.clicked.connect(lambda: os.system('systemctl --user start onedrive'))
+
+ # Stop OneDrive service
+ self.pushButton_7.clicked.connect(lambda: os.system('systemctl --user stop onedrive'))
+
+ # Restart OneDrive service
+ self.pushButton_9.clicked.connect(lambda: os.system('systemctl --user restart onedrive'))
+
+ # Start OneDrive monitoring
+ self.pushButton_5.clicked.connect(lambda: self.oneDriveMonitor('onedrive --monitor'))
+
+ # Stop OneDrive monitoring
+ self.pushButton_6.clicked.connect(lambda: os.system('pkill onedrive'))
+
+ # Force OneDrive resync
+ # self.pushButton_6.clicked.connect(lambda: os.system('pkill onedrive'))
+ #
+
+ # Open login form TODO: testing
+ self.pushButton_2.setText("login")
+ self.pushButton_2.clicked.connect(lambda: self.show_login())
+
+
+ # Refresh Sync Status
+ self.pushButton_11.clicked.connect(lambda: self.label_4.setText("Retreiving status..."))
+ self.pushButton_11.clicked.connect(lambda: self.oneDriveSyncStatus())
+
+ self.text_timer = QTimer()
+ self.text_timer.setSingleShot(False)
+ self.text_timer.timeout.connect(lambda: self.oneDriveProcessStatus())
+ self.text_timer.start(1000)
+
+
+
+ # System Tray
+
+ self.tray = QSystemTrayIcon()
+ if self.tray.isSystemTrayAvailable():
+
+ icon = QIcon("icons8-clouds-48.png")
+ menu = QMenu()
+
+ actionshow = menu.addAction("Show/Hide")
+ actionshow.triggered.connect(lambda: self.hide() if self.isVisible() else self.show())
+ settingAction = menu.addAction("Settings")
+ settingAction.triggered.connect(self.show_settings)
+ quitAction = menu.addAction("Quit")
+ quitAction.triggered.connect(sys.exit)
+
+ self.tray.setIcon(icon)
+ self.tray.setContextMenu(menu)
+ self.tray.show()
+ self.tray.setToolTip("This is OneDriveGUI")
+ # self.tray.showMessage("OneDriveGUI", "OneDriveGUI started sucessfully.")
+ else:
+ self.tray = None
+
+ # Check OneDrive status
+ def oneDriveProcessStatus(self):
+ for onedrive_process in psutil.process_iter():
+ if onedrive_process.name().lower() == 'onedrive' and onedrive_process.status() != 'zombie':
+ # print("OneDrive is running.")
+ self.label_3.setText("running")
+ return True
+ # print("OneDrive is NOT running.")
+ self.label_3.setText("not running")
+ return False
+
+ def oneDriveSyncStatus(self):
+
+ status = subprocess.check_output(['onedrive', '--display-sync-status'])
+ if 'in sync' in str(status):
+ self.label_4.setText("In Sync")
+ return True
+ else:
+ self.label_4.setText("Out of Sync")
+ return False
+
+ # def oneDriveMonitor(self, state):
+ # if state == 'start':
+ # self.onedrive_process = subprocess.Popen('onedrive --monitor -v', stdout=subprocess.PIPE, shell=True, preexec_fn=os.setsid)
+ # while True:
+ # onedrive_output = self.onedrive_process.communicate()
+ # print(onedrive_output)
+ # elif state == 'stop':
+ # os.killpg(os.getpgid(self.onedrive_process.pid), signal.SIGTERM)
+
+
+
+ # # def status_checker():
+ # # timer = QTimer()
+ # # timer.setSingleShot(True)
+ # # timer.timeout.connect(status_checker)
+ # # timer.start(1000)
+
+ # # status_checker()
+
+ async def oneDriveMonitor(self, command):
+ self.onedrive_process = subprocess.Popen(command,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ shell=True,
+ universal_newlines=True)
+
+
+ while self.onedrive_process.poll() == None:
+
+ if self.onedrive_process.stdout:
+ stdout = self.onedrive_process.stdout.readline()
+
+ if 'Authorize this app visiting' in stdout:
+ # os.killpg(os.getpgid(self.onedrive_process.pid), signal.SIGTERM)
+ self.onedrive_process.kill()
+ self.show_login()
+ if 'time' in stdout:
+ print('# ' + stdout)
+ else:
+ print('@@ ' + stdout.strip())
+
+
+ if self.onedrive_process.stderr:
+ stderr = self.onedrive_process.stderr.readline()
+ print('!!!!ERROR ' + stderr)
+
+ if 'command not found' in stderr:
+ print("Onedrive does not seem to be installed. Please install it as per instruction at https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md ")
+ elif '--resync is required' in stderr:
+ print(stderr.decode() + " Starting resync.")
+ self.oneDriveMonitor("onedrive --monitor --resync")
+ else:
+ print('@@ERROR' + stderr)
+
+
+
+ def show_login(self):
+ self.window1 = QWidget()
+ self.lw = Ui_LoginWindow()
+ self.lw.setupUi(self.window1)
+ self.window1.show()
+
+ # use static URL for now. TODO: use auth files in the future
+ url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient'
+ self.lw.loginFrame.setUrl(QUrl(url))
+
+ # Wait for user to login and obtain response URL
+ self.lw.loginFrame.urlChanged.connect(lambda: self.getResponseUrl(self.lw.loginFrame.url().toString()))
+
+
+ def getResponseUrl(self, response_url):
+ if 'nativeclient?code=' in response_url:
+ os.system(f'onedrive --auth-response "{response_url}"')
+ print("Login performed")
+ else:
+ pass
+
+
+
+
+
+ def show_settings(self):
+ self.window2 = QWidget()
+ self.ui = Ui_Form()
+ self.ui.setupUi(self.window2)
+
+ self.window2.show()
+
+ self.ui.lineEdit_4.setText(settings['onedrive']['sync_dir'].strip('"'))
+ self.ui.lineEdit_4.textChanged.connect(lambda: settings.set('onedrive', 'sync_dir', f'"{self.ui.lineEdit_4.text()}"'))
+
+ self.ui.lineEdit.setText(settings['onedrive']['log_dir'].strip('"'))
+ self.ui.lineEdit.textChanged.connect(lambda: settings.set('onedrive', 'log_dir', f'"{self.ui.lineEdit.text()}"'))
+
+
+ skip_files = settings['onedrive']['skip_file'].strip('"').split('|')
+ self.ui.listWidget.addItems(skip_files)
+ self.ui.pushButton_6.clicked.connect(lambda: self.add_item_to_Qlist(self.ui.lineEdit_2, self.ui.listWidget, skip_files))
+ self.ui.pushButton_6.clicked.connect(lambda: settings.set('onedrive', 'skip_file', '"' + '|'.join(skip_files) + '"' ))
+ self.ui.pushButton_6.clicked.connect(self.ui.lineEdit_2.clear)
+
+ # self.ui.listWidget.itemChanged.connect(lambda: print("something changed"))
+ # self.ui.listWidget.itemChanged.connect(lambda: settings.set('onedrive', 'skip_file', "|".join(skip_files)))
+
+
+ skip_dirs = settings['onedrive']['skip_dir'].strip('"').split('|')
+ self.ui.listWidget_2.addItems(skip_dirs)
+ self.ui.pushButton_7.clicked.connect(lambda: self.add_item_to_Qlist(self.ui.lineEdit_3, self.ui.listWidget_2, skip_dirs))
+ self.ui.pushButton_7.clicked.connect(lambda: settings.set('onedrive', 'skip_dir', '"' + '|'.join(skip_dirs) + '"' ))
+ self.ui.pushButton_7.clicked.connect(self.ui.lineEdit_3.clear)
+
+ # self.button2 = QtWidgets.QPushButton("save")
+ # self.pushButton_4.setText("save")
+ # self.button2.clicked.connect(lambda: settings.set('onedrive', 'skip_dir', f'"{self.input.text()}"'))
+ self.ui.pushButton_4.clicked.connect(lambda: save_config(settings))
+
+ # url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient'
+ # self.ui.webEngineView.setUrl(QUrl(url))
+ # self.ui.webEngineView.urlChanged.connect(lambda: print("the url is"))
+ # self.ui.webEngineView.urlChanged.connect(lambda: print(str(self.ui.webEngineView.url().toString())))
+
+ # Rate limit
+ self.ui.lineEdit_5.setText(settings['onedrive']['rate_limit'].strip('"'))
+ self.ui.label_6.setText(str(round(int(self.ui.lineEdit_5.text()) * 8 / 1024 / 1024, 2)) + " MiB/s")
+ self.ui.lineEdit_5.textChanged.connect(lambda: settings.set('onedrive', 'rate_limit', f'"{self.ui.lineEdit_5.text()}"'))
+ self.ui.lineEdit_5.textChanged.connect(lambda: self.ui.label_6.setText(str(round(int(self.ui.lineEdit_5.text()) * 8 / 1024 / 1024, 2)) + " MiB/s"))
+
+
+
+
+ def add_item_to_Qlist(self, source_widget, destination_widget, list):
+ if source_widget.text() == "":
+ print("Inoring empty value.")
+ elif source_widget.text() in list:
+ print("Item already in exemption list.")
+ else:
+ list.append(source_widget.text())
+ destination_widget.addItem(source_widget.text())
+
+
+
+ def remove_item_from_Qlist(self, QListWidget_name):
+ for item in QListWidget_name.selectedItems():
+ print("Removing: " + item.text())
+ items.remove(item.text())
+ QListWidget_name.takeItem(QListWidget_name.row(item))
+
+
+
+
+
+
+
+def read_config(config_file):
+ with open(config_file, 'r') as f:
+ config_string = '[onedrive]\n' + f.read()
+
+ config = ConfigParser()
+ config.read_string(config_string)
+
+ return config
+
+
+def save_config(new_settings):
+ # config = ConfigParser()
+ # config.read_dict
+
+ new_settings.write
+ print(new_settings)
+ print(new_settings['onedrive']['sync_dir'])
+ print('saved')
+
+ # new_settings.set('onedrive', 'testoption', '"QQQQQ"')
+
+ with open(CONFIG_FILE, 'w') as configfile:
+ new_settings.write(configfile)
+
+ # remove first line (section) from config file
+ with open(CONFIG_FILE, 'r') as fin:
+ data = fin.read().splitlines(True)
+ with open(CONFIG_FILE, 'w') as fout:
+ fout.writelines(data[1:])
+
+
+ config = ConfigParser()
+ config.read(new_settings)
+ # print(config['onedrive']['skip_dir'])
+
+
+
+
+
+
+
+if __name__ == "__main__":
+ settings = read_config(CONFIG_FILE)
+
+ app = QApplication(sys.argv)
+ window = MainWindow()
+
+ window.show()
+ app.exec()
+
+
diff --git a/src/__thrash/OneDriveGUI-bob-Manja.py b/src/__thrash/OneDriveGUI-bob-Manja.py
new file mode 100644
index 0000000..d48aaee
--- /dev/null
+++ b/src/__thrash/OneDriveGUI-bob-Manja.py
@@ -0,0 +1,262 @@
+import sys, psutil, os, subprocess, signal
+from configparser import ConfigParser
+
+from PySide6.QtWidgets import (QWidget, QApplication, QMainWindow, QMenu, QSystemTrayIcon, QDialog)
+from PySide6.QtGui import QIcon
+from PySide6.QtCore import QTimer, QUrl
+
+from ui.ui_mainwindow import Ui_MainWindow
+from ui.ui_settings import Ui_Form
+from ui.ui_login import Ui_LoginWindow
+
+CONFIG_FILE = os.path.expanduser('~/.config/onedrive/config')
+
+class MainWindow(QMainWindow, Ui_MainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+ self.setupUi(self)
+
+ # Open Settings window
+ self.pushButton_3.clicked.connect(lambda: self.show_settings())
+
+ # Update OneDrive Status
+ self.pushButton_10.clicked.connect(lambda: self.oneDriveProcessStatus())
+
+ # Start OneDrive service
+ self.pushButton_4.clicked.connect(lambda: os.system('systemctl --user start onedrive'))
+
+ # Stop OneDrive service
+ self.pushButton_7.clicked.connect(lambda: os.system('systemctl --user stop onedrive'))
+
+ # Restart OneDrive service
+ self.pushButton_9.clicked.connect(lambda: os.system('systemctl --user restart onedrive'))
+
+ # Start OneDrive monitoring
+ self.pushButton_5.clicked.connect(lambda: subprocess.Popen('onedrive --monitor', shell=True))
+
+ # Stop OneDrive monitoring
+ self.pushButton_6.clicked.connect(lambda: os.system('pkill onedrive'))
+
+ # Force OneDrive resync
+ # self.pushButton_6.clicked.connect(lambda: os.system('pkill onedrive'))
+ #
+
+ # Open login form TODO: testing
+ self.pushButton_2.setText("login")
+ self.pushButton_2.clicked.connect(lambda: self.show_login())
+
+
+ # Refresh Sync Status
+ self.pushButton_11.clicked.connect(lambda: self.label_4.setText("Retreiving status..."))
+ self.pushButton_11.clicked.connect(lambda: self.oneDriveSyncStatus())
+
+ self.text_timer = QTimer()
+ self.text_timer.setSingleShot(False)
+ self.text_timer.timeout.connect(lambda: self.oneDriveProcessStatus())
+ self.text_timer.start(1000)
+
+
+
+ # System Tray
+
+ self.tray = QSystemTrayIcon()
+ if self.tray.isSystemTrayAvailable():
+
+ icon = QIcon("icons8-clouds-48.png")
+ menu = QMenu()
+
+ actionshow = menu.addAction("Show/Hide")
+ actionshow.triggered.connect(lambda: self.hide() if self.isVisible() else self.show())
+ settingAction = menu.addAction("Settings")
+ settingAction.triggered.connect(self.show_settings)
+ quitAction = menu.addAction("Quit")
+ quitAction.triggered.connect(sys.exit)
+
+ self.tray.setIcon(icon)
+ self.tray.setContextMenu(menu)
+ self.tray.show()
+ self.tray.setToolTip("This is OneDriveGUI")
+ # self.tray.showMessage("OneDriveGUI", "OneDriveGUI started sucessfully.")
+ else:
+ self.tray = None
+
+ # Check OneDrive status
+ def oneDriveProcessStatus(self):
+ for onedrive_process in psutil.process_iter():
+ if onedrive_process.name().lower() == 'onedrive' and onedrive_process.status() != 'zombie':
+ # print("OneDrive is running.")
+ self.label_3.setText("running")
+ return True
+ # print("OneDrive is NOT running.")
+ self.label_3.setText("not running")
+ return False
+
+ def oneDriveSyncStatus(self):
+
+ status = subprocess.check_output(['onedrive', '--display-sync-status'])
+ if 'in sync' in str(status):
+ self.label_4.setText("In Sync")
+ return True
+ else:
+ self.label_4.setText("Out of Sync")
+ return False
+
+ def startOneDriveMonitor(self, state):
+ if state == 'start':
+ self.onedrive_process = subprocess.Popen('onedrive --monitor', stdout=subprocess.PIPE, shell=True, preexec_fn=os.setsid)
+ elif state == 'stop':
+ os.killpg(os.getpgid(self.onedrive_process.pid), signal.SIGTERM)
+
+
+
+ # def status_checker():
+ # timer = QTimer()
+ # timer.setSingleShot(True)
+ # timer.timeout.connect(status_checker)
+ # timer.start(1000)
+
+ # status_checker()
+
+ def show_login(self):
+ self.window1 = QWidget()
+ self.lw = Ui_LoginWindow()
+ self.lw.setupUi(self.window1)
+ self.window1.show()
+
+ # use static URL for now. TODO: use auth files in the future
+ url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient'
+ self.lw.loginFrame.setUrl(QUrl(url))
+
+ # Wait for user to login and obtain response URL
+ self.lw.loginFrame.urlChanged.connect(lambda: self.getResponseUrl(self.lw.loginFrame.url().toString()))
+
+
+ def getResponseUrl(self, response_url):
+ if 'nativeclient?code=' in response_url:
+ os.system(f'onedrive --auth-response "{response_url}"')
+ print("Login performed")
+ else:
+ pass
+
+
+
+
+
+ def show_settings(self):
+ self.window2 = QWidget()
+ self.ui = Ui_Form()
+ self.ui.setupUi(self.window2)
+
+ self.window2.show()
+
+ self.ui.lineEdit_4.setText(settings['onedrive']['sync_dir'].strip('"'))
+ self.ui.lineEdit_4.textChanged.connect(lambda: settings.set('onedrive', 'sync_dir', f'"{self.ui.lineEdit_4.text()}"'))
+
+ self.ui.lineEdit.setText(settings['onedrive']['log_dir'].strip('"'))
+ self.ui.lineEdit.textChanged.connect(lambda: settings.set('onedrive', 'log_dir', f'"{self.ui.lineEdit.text()}"'))
+
+
+ skip_files = settings['onedrive']['skip_file'].strip('"').split('|')
+ self.ui.listWidget.addItems(skip_files)
+ self.ui.pushButton_6.clicked.connect(lambda: self.add_item_to_Qlist(self.ui.lineEdit_2, self.ui.listWidget, skip_files))
+ self.ui.pushButton_6.clicked.connect(lambda: settings.set('onedrive', 'skip_file', '"' + '|'.join(skip_files) + '"' ))
+ self.ui.pushButton_6.clicked.connect(self.ui.lineEdit_2.clear)
+
+ # self.ui.listWidget.itemChanged.connect(lambda: print("something changed"))
+ # self.ui.listWidget.itemChanged.connect(lambda: settings.set('onedrive', 'skip_file', "|".join(skip_files)))
+
+
+ skip_dirs = settings['onedrive']['skip_dir'].strip('"').split('|')
+ self.ui.listWidget_2.addItems(skip_dirs)
+ self.ui.pushButton_7.clicked.connect(lambda: self.add_item_to_Qlist(self.ui.lineEdit_3, self.ui.listWidget_2, skip_dirs))
+ self.ui.pushButton_7.clicked.connect(lambda: settings.set('onedrive', 'skip_dir', '"' + '|'.join(skip_dirs) + '"' ))
+ self.ui.pushButton_7.clicked.connect(self.ui.lineEdit_3.clear)
+
+ # self.button2 = QtWidgets.QPushButton("save")
+ # self.pushButton_4.setText("save")
+ # self.button2.clicked.connect(lambda: settings.set('onedrive', 'skip_dir', f'"{self.input.text()}"'))
+ self.ui.pushButton_4.clicked.connect(lambda: save_config(settings))
+
+ # url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient'
+ # self.ui.webEngineView.setUrl(QUrl(url))
+ # self.ui.webEngineView.urlChanged.connect(lambda: print("the url is"))
+ # self.ui.webEngineView.urlChanged.connect(lambda: print(str(self.ui.webEngineView.url().toString())))
+
+
+
+
+
+ def add_item_to_Qlist(self, source_widget, destination_widget, list):
+ if source_widget.text() == "":
+ print("Inoring empty value.")
+ elif source_widget.text() in list:
+ print("Item already in exemption list.")
+ else:
+ list.append(source_widget.text())
+ destination_widget.addItem(source_widget.text())
+
+
+
+ def remove_item_from_Qlist(self, QListWidget_name):
+ for item in QListWidget_name.selectedItems():
+ print("Removing: " + item.text())
+ items.remove(item.text())
+ QListWidget_name.takeItem(QListWidget_name.row(item))
+
+
+
+
+
+
+
+def read_config(config_file):
+ with open(config_file, 'r') as f:
+ config_string = '[onedrive]\n' + f.read()
+
+ config = ConfigParser()
+ config.read_string(config_string)
+
+ return config
+
+
+def save_config(new_settings):
+ # config = ConfigParser()
+ # config.read_dict
+
+ new_settings.write
+ print(new_settings)
+ print(new_settings['onedrive']['sync_dir'])
+ print('saved')
+
+ # new_settings.set('onedrive', 'testoption', '"QQQQQ"')
+
+ with open(CONFIG_FILE, 'w') as configfile:
+ new_settings.write(configfile)
+
+ # remove first line (section) from config file
+ with open(CONFIG_FILE, 'r') as fin:
+ data = fin.read().splitlines(True)
+ with open(CONFIG_FILE, 'w') as fout:
+ fout.writelines(data[1:])
+
+
+ config = ConfigParser()
+ config.read(new_settings)
+ # print(config['onedrive']['skip_dir'])
+
+
+
+
+
+
+
+if __name__ == "__main__":
+ settings = read_config(CONFIG_FILE)
+
+ app = QApplication(sys.argv)
+ window = MainWindow()
+
+ window.show()
+ app.exec()
+
+
diff --git a/src/__thrash/config b/src/__thrash/config
new file mode 100644
index 0000000..e1cc097
--- /dev/null
+++ b/src/__thrash/config
@@ -0,0 +1,47 @@
+sync_dir = ""~/OneDrive2""
+skip_file = "~*|.~*|*.tmp"
+monitor_interval = "300"
+skip_dir = "akjshdaskhdsakjh"
+log_dir = "/var/log/onedrive/"
+drive_id = ""
+upload_only = "false"
+check_nomount = "false"
+check_nosync = "false"
+download_only = "false"
+disable_notifications = "false"
+disable_upload_validation = "false"
+enable_logging = ""true1""
+force_http_2 = "false"
+local_first = "false"
+no_remote_delete = "false"
+skip_symlinks = "false"
+debug_https = "false"
+skip_dotfiles = "false"
+dry_run = "false"
+min_notify_changes = "5"
+monitor_log_frequency = "5"
+monitor_fullscan_frequency = "10"
+sync_root_files = "false"
+classify_as_big_delete = "1000"
+user_agent = ""
+remove_source_files = "false"
+skip_dir_strict_match = "false"
+application_id = ""
+resync = "false"
+bypass_data_preservation = "false"
+azure_ad_endpoint = ""
+azure_tenant_id = "common"
+sync_business_shared_folders = "false"
+sync_dir_permissions = "700"
+sync_file_permissions = "600"
+rate_limit = "131072"
+webhook_enabled = "false"
+webhook_public_url = ""
+webhook_listening_host = ""
+webhook_listening_port = "8888"
+webhook_expiration_interval = "86400"
+webhook_renewal_interval = "43200"
+operation_timeout = "3600"
+testoption = "QQQQQ"
+testoption2 = "testvalueCC2a"
+
diff --git a/src/__thrash/dict_parser_test.py b/src/__thrash/dict_parser_test.py
new file mode 100644
index 0000000..e06fb1b
--- /dev/null
+++ b/src/__thrash/dict_parser_test.py
@@ -0,0 +1,120 @@
+from configparser import ConfigParser
+
+global_config = {
+ "boris@pozdena.eu": {
+ "config_file": "/home/bob/.config/onedrive/accounts/boris@pozdena.eu/config",
+ "enable_debug": "True",
+ "mode": "monitor",
+ "onedrive": {
+ "sync_dir": '"/home/bob/OneDrive/"',
+ "skip_file": '"~*|.~*|*.tmp|*.txt|*.exe|.testfile"',
+ "monitor_interval": '"15"',
+ "skip_dir": '"__pycache__|env|venv"',
+ "log_dir": '"/var/log/onedrive/"',
+ "drive_id": '""',
+ "upload_only": '"false"',
+ "check_nomount": '"false"',
+ "check_nosync": '"false"',
+ "download_only": '"false"',
+ "disable_notifications": '"false"',
+ "disable_upload_validation": '"false"',
+ "enable_logging": '"false"',
+ "force_http_2": '"false"',
+ "local_first": '"false"',
+ "no_remote_delete": '"false"',
+ "skip_symlinks": '"false"',
+ "debug_https": '"false"',
+ "skip_dotfiles": '"false"',
+ "dry_run": '"false"',
+ "min_notify_changes": '"5"',
+ "monitor_log_frequency": '"5"',
+ "monitor_fullscan_frequency": '"1"',
+ "sync_root_files": '"false"',
+ "classify_as_big_delete": '"1000"',
+ "user_agent": '""',
+ "remove_source_files": '"false"',
+ "skip_dir_strict_match": '"false"',
+ "application_id": '""',
+ "resync": '"false"',
+ "bypass_data_preservation": '"false"',
+ "azure_ad_endpoint": '""',
+ "azure_tenant_id": '"common"',
+ "sync_business_shared_folders": '"false"',
+ "sync_dir_permissions": '"700"',
+ "sync_file_permissions": '"600"',
+ "rate_limit": '"185700000"',
+ "operation_timeout": '"3600"',
+ "webhook_enabled": '"false"',
+ "webhook_public_url": '""',
+ "webhook_listening_host": '""',
+ "webhook_listening_port": '"8888"',
+ "webhook_expiration_interval": '"86400"',
+ "webhook_renewal_interval": '"43200"',
+ },
+ },
+ "bpozdena@gmail.com": {
+ "config_file": "/home/bob/.config/onedrive/accounts/pozdenab@gmail.com/config",
+ "enable_debug": "True",
+ "mode": "monitor",
+ "onedrive": {
+ "sync_dir": '"~/OneDrive222"',
+ "skip_file": '"~*|.~*|*.tmp|*.txt|*.exe"',
+ "monitor_interval": '"15"',
+ "skip_dir": '"__pycache__|env|venv|ignore_filder"',
+ "log_dir": '"/var/log/onedrive/"',
+ "drive_id": '""',
+ "upload_only": '"false"',
+ "check_nomount": '"false"',
+ "check_nosync": '"false"',
+ "download_only": '"false"',
+ "disable_notifications": '"false"',
+ "disable_upload_validation": '"false"',
+ "enable_logging": '"false"',
+ "force_http_2": '"false"',
+ "local_first": '"false"',
+ "no_remote_delete": '"false"',
+ "skip_symlinks": '"false"',
+ "debug_https": '"false"',
+ "skip_dotfiles": '"false"',
+ "dry_run": '"false"',
+ "min_notify_changes": '"5"',
+ "monitor_log_frequency": '"5"',
+ "monitor_fullscan_frequency": '"1"',
+ "sync_root_files": '"false"',
+ "classify_as_big_delete": '"1000"',
+ "user_agent": '""',
+ "remove_source_files": '"false"',
+ "skip_dir_strict_match": '"false"',
+ "application_id": '""',
+ "resync": '"false"',
+ "bypass_data_preservation": '"false"',
+ "azure_ad_endpoint": '""',
+ "azure_tenant_id": '"common"',
+ "sync_business_shared_folders": '"false"',
+ "sync_dir_permissions": '"700"',
+ "sync_file_permissions": '"600"',
+ "rate_limit": '"185700000"',
+ "operation_timeout": '"3600"',
+ "webhook_enabled": '"false"',
+ "webhook_public_url": '""',
+ "webhook_listening_host": '""',
+ "webhook_listening_port": '"8888"',
+ "webhook_expiration_interval": '"86400"',
+ "webhook_renewal_interval": '"43200"',
+ },
+ },
+}
+
+
+
+test = {}
+test['onedrive'] = global_config['boris@pozdena.eu']
+
+od_config = ConfigParser()
+
+print(test)
+
+
+od_config.read_dict(test)
+
+print(od_config)
\ No newline at end of file
diff --git a/src/__thrash/file_dialog_test.py b/src/__thrash/file_dialog_test.py
new file mode 100644
index 0000000..530f467
--- /dev/null
+++ b/src/__thrash/file_dialog_test.py
@@ -0,0 +1,50 @@
+import sys
+from PySide6.QtWidgets import QApplication, QWidget, QInputDialog, QLineEdit, QFileDialog
+from PySide6.QtGui import QIcon
+
+class App(QWidget):
+
+ def __init__(self):
+ super().__init__()
+ self.title = 'PyQt5 file dialogs - pythonspot.com'
+ self.left = 10
+ self.top = 10
+ self.width = 640
+ self.height = 480
+ self.initUI()
+
+ def initUI(self):
+ self.setWindowTitle(self.title)
+ self.setGeometry(self.left, self.top, self.width, self.height)
+
+ self.openFileNameDialog()
+ # self.openFileNamesDialog()
+ # self.saveFileDialog()
+
+ self.show()
+
+ def openFileNameDialog(self):
+ options = QFileDialog.Options()
+ options |= QFileDialog.DontUseNativeDialog
+ fileName, _ = QFileDialog.getOpenFileName(self,"QFileDialog.getOpenFileName()", "","All Files (*);;Python Files (*.py)", options=options)
+ if fileName:
+ print(fileName)
+
+ # def openFileNamesDialog(self):
+ # options = QFileDialog.Options()
+ # options |= QFileDialog.DontUseNativeDialog
+ # files, _ = QFileDialog.getOpenFileNames(self,"QFileDialog.getOpenFileNames()", "","All Files (*);;Python Files (*.py)", options=options)
+ # if files:
+ # print(files)
+
+ # def saveFileDialog(self):
+ # options = QFileDialog.Options()
+ # options |= QFileDialog.DontUseNativeDialog
+ # fileName, _ = QFileDialog.getSaveFileName(self,"QFileDialog.getSaveFileName()","","All Files (*);;Text Files (*.txt)", options=options)
+ # if fileName:
+ # print(fileName)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ ex = App()
+ sys.exit(app.exec_())
diff --git a/src/__thrash/form.ui b/src/__thrash/form.ui
new file mode 100644
index 0000000..b232854
--- /dev/null
+++ b/src/__thrash/form.ui
@@ -0,0 +1,22 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 800
+ 600
+
+
+
+ MainWindow
+
+
+
+
+
+
+
+
diff --git a/src/__thrash/list_test.py b/src/__thrash/list_test.py
new file mode 100644
index 0000000..78a7dbf
--- /dev/null
+++ b/src/__thrash/list_test.py
@@ -0,0 +1,106 @@
+import sys
+from PySide6 import QtGui, QtCore
+from PySide6.QtWidgets import *
+
+
+class LayerObject(object):
+
+ def __init__(self, **kwargs):
+ self.name = kwargs.get('name', '')
+ self.enabled = kwargs.get('enabled', False)
+
+
+class LayerManager(QtGui.QWidget):
+ def __init__(self):
+ super(LayerManager, self).__init__()
+ self.resize(400, 300)
+ self.list_widget = QtGui.QListWidget()
+ main_layout = QtGui.QHBoxLayout(self)
+ main_layout.addWidget(self.list_widget)
+ self.add_layers()
+
+ def add_layers(self):
+ layers = [
+ LayerObject(name='Layer001', enabled=False),
+ LayerObject(name='Layer002', enabled=False),
+ LayerObject(name='Layer003', enabled=True),
+ LayerObject(name='Layer004', enabled=False),
+ LayerObject(name='Layer005', enabled=True),
+ LayerObject(name='Layer006', enabled=False),
+ LayerObject(name='Layer007', enabled=False),
+ LayerObject(name='Layer008', enabled=True),
+ LayerObject(name='Layer009', enabled=False),
+ LayerObject(name='Layer010', enabled=True)
+ ]
+
+ for x in layers:
+ widget = LayerWidget(layer=x)
+ item = QtGui.QListWidgetItem()
+ self.list_widget.insertItem(self.list_widget.count(), item)
+ self.list_widget.setItemWidget(item, widget)
+ item.setSizeHint(widget.sizeHint())
+
+
+ # properties
+ @property
+ def layer(self):
+ return self._layer
+
+ @layer.setter
+ def layer(self, value):
+ self._layer== value
+ self.ui_layername.setText(value.name)
+ self.ui_enabled.setChecked(value.enabled)
+
+
+class LayerManager(QWidget):
+ def __init__(self):
+ super(LayerManager, self).__init__()
+ self.resize(400, 300)
+
+ # controls
+ self.ui_scroll = QWidget()
+ self.ui_scroll_layout = QtGui.QVBoxLayout()
+ self.ui_scroll.setLayout(self.ui_scroll_layout)
+
+ self.ui_scroll_area = QtGui.QScrollArea()
+ self.ui_scroll_area.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
+ self.ui_scroll_area.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ self.ui_scroll_area.setWidgetResizable(True)
+ self.ui_scroll_area.setWidget(self.ui_scroll)
+
+ main_layout = QtGui.QHBoxLayout()
+ main_layout.addWidget(self.ui_scroll_area)
+ self.setLayout(main_layout)
+
+
+ self.add_layers()
+
+ def add_layers(self):
+ layers = [
+ LayerObject(name='Layer001', enabled=False),
+ LayerObject(name='Layer002', enabled=False),
+ LayerObject(name='Layer003', enabled=True),
+ LayerObject(name='Layer004', enabled=False),
+ LayerObject(name='Layer005', enabled=True),
+ LayerObject(name='Layer006', enabled=False),
+ LayerObject(name='Layer007', enabled=False),
+ LayerObject(name='Layer008', enabled=True),
+ LayerObject(name='Layer009', enabled=False),
+ LayerObject(name='Layer010', enabled=True)
+ ]
+
+ for x in layers:
+ widget = LayerWidget(layer=x)
+ self.ui_scroll_layout.addWidget(widget)
+
+
+def main():
+ app = QtGui.QApplication(sys.argv)
+ ex = LayerManager()
+ ex.show()
+ sys.exit(app.exec_())
+
+
+if __name__ == '__main__':
+ main()
\ No newline at end of file
diff --git a/src/__thrash/mainwindow.py b/src/__thrash/mainwindow.py
new file mode 100644
index 0000000..e74898b
--- /dev/null
+++ b/src/__thrash/mainwindow.py
@@ -0,0 +1,52 @@
+# This Python file uses the following encoding: utf-8
+import os
+from pathlib import Path
+import sys
+
+from PySide6.QtWidgets import QApplication, QMainWindow, QListWidgetItem, QWidget, QLabel, QPushButton, QHBoxLayout, QLayout, QListWidget
+from PySide6.QtCore import QFile
+from PySide6.QtUiTools import QUiLoader
+
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+ self.load_ui()
+
+ funList = QListWidget()
+
+ itemN = QListWidgetItem()
+ # Create widget
+ widget = QWidget()
+ widgetText = QLabel("I love PyQt!")
+ widgetButton = QPushButton("Push Me")
+ widgetLayout = QHBoxLayout()
+ widgetLayout.addWidget(widgetText)
+ widgetLayout.addWidget(widgetButton)
+ widgetLayout.addStretch()
+
+ widgetLayout.setSizeConstraint(QLayout.SetFixedSize)
+ widget.setLayout(widgetLayout)
+ itemN.setSizeHint(widget.sizeHint())
+
+ # Add widget to QListWidget funList
+ funList.addItem(itemN)
+ funList.setItemWidget(itemN, widget)
+
+ funList.show()
+
+
+ def load_ui(self):
+ loader = QUiLoader()
+ path = os.fspath(Path(__file__).resolve().parent / "form.ui")
+ ui_file = QFile(path)
+ ui_file.open(QFile.ReadOnly)
+ loader.load(ui_file, self)
+ ui_file.close()
+
+
+if __name__ == "__main__":
+ app = QApplication([])
+ widget = MainWindow()
+ widget.show()
+ sys.exit(app.exec_())
diff --git a/src/__thrash/message_box_test.py b/src/__thrash/message_box_test.py
new file mode 100644
index 0000000..0d45f27
--- /dev/null
+++ b/src/__thrash/message_box_test.py
@@ -0,0 +1,39 @@
+import sys
+
+from PySide6.QtWidgets import QApplication, QDialog, QMainWindow, QMessageBox, QPushButton
+
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ super().__init__()
+
+ self.setWindowTitle("My App")
+
+ button = QPushButton("Press me for a dialog!")
+ button.clicked.connect(self.button_clicked)
+ self.setCentralWidget(button)
+
+ def button_clicked(self, s):
+
+ button = QMessageBox.critical(
+ self,
+ "Oh dear!",
+ "Something went very wrong.",
+ buttons=QMessageBox.Discard | QMessageBox.NoToAll | QMessageBox.Ignore,
+ defaultButton=QMessageBox.Discard,
+ )
+
+ if button == QMessageBox.Discard:
+ print("Discard!")
+ elif button == QMessageBox.NoToAll:
+ print("No to all!")
+ else:
+ print("Ignore!")
+
+
+app = QApplication(sys.argv)
+
+window = MainWindow()
+window.show()
+
+app.exec()
\ No newline at end of file
diff --git a/src/__thrash/new_window_test.py b/src/__thrash/new_window_test.py
new file mode 100644
index 0000000..184a086
--- /dev/null
+++ b/src/__thrash/new_window_test.py
@@ -0,0 +1,43 @@
+from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QLabel, QVBoxLayout, QWidget
+
+import sys
+
+from random import randint
+
+
+class AnotherWindow(QWidget):
+ """
+ This "window" is a QWidget. If it has no parent, it
+ will appear as a free-floating window as we want.
+ """
+ def __init__(self):
+ super().__init__()
+ layout = QVBoxLayout()
+ self.label = QLabel("Another Window % d" % randint(0,100))
+ layout.addWidget(self.label)
+ self.setLayout(layout)
+
+
+class MainWindow(QMainWindow):
+
+ def __init__(self):
+ super().__init__()
+ self.w = None # No external window yet.
+ self.button = QPushButton("Push for Window")
+ self.button.clicked.connect(self.show_new_window)
+ self.setCentralWidget(self.button)
+
+ def show_new_window(self, checked):
+ if self.w is None:
+ self.w = AnotherWindow()
+ self.w.show()
+
+ else:
+ self.w.close() # Close window.
+ self.w = None # Discard reference.
+
+
+app = QApplication(sys.argv)
+w = MainWindow()
+w.show()
+app.exec()
\ No newline at end of file
diff --git a/src/__thrash/output_parser_test.py b/src/__thrash/output_parser_test.py
new file mode 100644
index 0000000..2c93f53
--- /dev/null
+++ b/src/__thrash/output_parser_test.py
@@ -0,0 +1,136 @@
+import subprocess, os, signal, time, shlex, sys, re
+
+
+# def run_command(command):
+# process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
+# while True:
+# output = process.stdout.readline()
+# if output == '' and process.poll() is not None:
+# break
+# # if 'one' in str(output):
+# # print("MATCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
+# if output:
+# print(output.strip())
+
+# rc = process.poll()
+# return rc
+
+# run_command("sudo -S tcpdump -i homebr0 proto 1 <<< C@rnival1")
+
+
+
+
+# app = subprocess.Popen("journalctl -f", shell=True, stdout = subprocess.PIPE, universal_newlines = True)
+
+# while True:
+# print(app.communicate()[0])
+
+# invoke process
+# command = 'sudo -S tcpdump -i homebr0 "proto 1" <<< C@rnival1'
+# process = subprocess.Popen(command,shell=True,stdout=subprocess.PIPE)
+
+# # Poll process.stdout to show stdout live
+# while True:
+# output = process.stdout.readline()
+# print(output)
+# if process.poll() is not None:
+# break
+# if output:
+# print(output.strip())
+# rc = process.poll()
+
+
+######################
+
+
+
+
+# command = shlex.split("ping -c 5 asdasdasdsad.com")
+
+# def oneDriveMonitor(command="onedrive --monitor"):
+
+# process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, universal_newlines=False)
+
+# # while True:
+# while process.poll() == None:
+# stdout = process.stdout.readline()
+# try:
+# stderr = process.stderr.readline()
+# except:
+# pass
+# if stdout != '':
+# if '1.1.1.1' in stdout:
+# print('pinging one.one.one')
+# if 'time' in stdout:
+# print('# ' + stdout)
+# else:
+# print('@@ ' + stdout.strip())
+
+# if stderr != '':
+# if 'command not found' in stderr:
+# print("Onedrive does not seem to be installed. Please install it as per instruction at https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md ")
+# elif '--resync is required' in stderr:
+# print(str(stderr) + " Starting resync.")
+# # oneDriveMonitor("onedrive --monitor --resync")
+# else:
+# print('@@ERROR' + stderr)
+
+
+ # match line:
+ # case "1.1.1.1" in line:
+ # print(line)
+
+
+# oneDriveMonitor()
+
+
+
+# else:
+# break
+
+
+
+# output, err = process.communicate()
+# print(output)
+
+
+
+
+
+
+def oneDriveMonitor(command):
+ # command = "onedrive --monitor -v"
+ process = subprocess.Popen( command,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ shell=True,
+ universal_newlines=True)
+
+
+ while process.poll() == None:
+
+ if process.stdout:
+ stdout = process.stdout.readline()
+
+ if 'Authorize this app visiting' in stdout:
+ self.show_login()
+ if 'time' in stdout:
+ print('# ' + stdout)
+ else:
+ print('@@ ' + stdout.strip())
+
+
+ if process.stderr:
+ stderr = process.stderr.readline()
+ print('!!!!ERROR ' + stderr)
+
+ if 'command not found' in stderr:
+ print("Onedrive does not seem to be installed. Please install it as per instruction at https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md ")
+ elif '--resync is required' in stderr:
+ print(stderr.decode() + " Starting resync.")
+ oneDriveMonitor("onedrive --monitor --resync")
+ else:
+ print('@@ERROR' + stderr)
+
+
+oneDriveMonitor("onedrive --monitor")
diff --git a/src/__thrash/re_test.py b/src/__thrash/re_test.py
new file mode 100644
index 0000000..da63189
--- /dev/null
+++ b/src/__thrash/re_test.py
@@ -0,0 +1,58 @@
+import re
+
+file_path = '/home/bob/OneDrive/Python/One DriveGUI_POC/OneDri veGUI.spec'
+
+root_folder = re.search(r".+/([^/]+)/.+$", file_path)
+
+print(root_folder.group(1))
+
+
+# stdout = '# Uploading new file Hitchhiking _italy/New Folder/ui_s)(+ěš+ěčšř čýřý*&^&*(etting@#$%^&*s_qt5_$web-test.py ... done.'
+# stdout = 'Uploading new file ./config ... done.'
+
+# file_operation = re.search(r'\b([Uploading|Downloading]+)*', stdout)
+# file_path = re.search(r'^.*[a-zA-Z]+\s[a-zA-Z]+_([a-zA-Z]+( [a-zA-Z]+)+)/)[a-zA-Z]+\s\.+$', stdout)
+# file_path = re.search(r'.*\b[file](.*)/[a-zA-Z0-9.-_]+\s+\.+$', stdout)
+# file_name = re.search(r".*/([a-zA-Z0-9.-_]+)\s+\.+", stdout)
+
+# file_name = re.search(r".*/(.+)\s+\.\.\.", stdout)
+
+
+# transfer_complete = 'done.' in stdout
+# print(transfer_complete)
+
+
+# file_path = re.search(r"\b[file]+\s(.+)\s+\.\.\.", stdout)
+# print(file_path)
+# print(file_path.group(1))
+
+
+# print("Operation is: " + file_operation.group(1))
+# # print("Path is: " + file_path.group(1))
+# # print(file_name)
+# # print("Filename is: " + file_name.group(1))
+# print(transfer_complete)
+
+
+# progress = re.search(r'\s([0-9]+)%', stdout)
+# print(progress.group(1))
+
+# # transfer_complete = progress.group(1) == '100'
+
+# # print(progress.group(1))
+# # print(transfer_complete)
+
+# # print("test")
+# # matches = ['Downloading1 file', 'Downloading2 file', 'Uploading new file', 'Downloading new file']
+# # test = any(x in stdout for x in matches)
+# # print(test)
+
+
+# transfer_progress = {
+# "file_operation": file_operation.group(1),
+# "file_name": 'Resuming last file...' if file_name is None else file_name.group(1),
+# # "progress": progress,
+# "transfer_complete": transfer_complete
+# }
+
+# print(transfer_progress)
\ No newline at end of file
diff --git a/src/__thrash/setup_wizard.py b/src/__thrash/setup_wizard.py
new file mode 100644
index 0000000..e33f707
--- /dev/null
+++ b/src/__thrash/setup_wizard.py
@@ -0,0 +1,232 @@
+import subprocess
+import re
+import os
+from configparser import ConfigParser
+
+from PySide6.QtGui import QPixmap, QIcon
+from PySide6.QtCore import Property, Qt
+from PySide6.QtWidgets import (
+ QWizard,
+ QGridLayout,
+ QLineEdit,
+ QWizardPage,
+ QLabel,
+ QVBoxLayout,
+ QComboBox,
+ QApplication,
+ QCheckBox,
+ QPushButton,
+)
+
+from OneDriveGUI import read_config
+
+
+class SetupWizard(QWizard):
+ def __init__(self, parent=None):
+ super(SetupWizard, self).__init__(parent)
+ self.setWindowIcon(QIcon("resources/images/icons8-clouds-48.png"))
+ self.setPage(1, WizardPage_welcome(self))
+ self.setPage(2, wizardPage_version_check(self))
+ self.setPage(3, wizardPage_create_import(self))
+ self.setPage(4, wizardPage_import(self))
+
+ self.setWindowTitle("OneDriveGUI Setup Wizard")
+ self.resize(640, 480)
+
+ self.currentIdChanged.connect(self.on_page_change)
+
+ def on_page_change(self):
+ if self.currentId() == 2:
+ print("Checking installed OneDrive version")
+ self.page(2).check_onedrive_version()
+
+
+class WizardPage_welcome(QWizardPage):
+ def __init__(self, parent=None):
+ super(WizardPage_welcome, self).__init__(parent)
+
+ self.setTitle("Welcome to OneDriveGUI")
+ # self.setSubTitle("SubTitle")
+
+ # self.label1 = QLabel()
+ # self.label1.setText("Welcome to OneDriveGUI")
+
+ self.label_2 = QLabel()
+ self.label_2.setText("This wizard will help you with initial OneDrive profile creation/import.")
+
+ layout = QVBoxLayout()
+ # layout.addWidget(self.label1)
+ layout.addWidget(self.label_2)
+ self.setLayout(layout)
+
+
+
+class wizardPage_version_check(QWizardPage):
+ def __init__(self, parent=None):
+ super(wizardPage_version_check, self).__init__(parent)
+ self.setTitle("OneDrive version check")
+
+ # self.label_3 = QLabel()
+ # self.label_3.setText("Installed OneDrive version:")
+
+ self.label_4 = QLabel()
+ self.label_4.setText("Installed/Not Installed/ version")
+
+ self.label_5 = QLabel()
+ self.label_5.setWordWrap(True)
+ self.label_5.setText(
+ "OneDrive Client for Linux does not seem to be installed. Please install it by following " \
+ "instructions for your distro. "
+ )
+
+ layout = QVBoxLayout()
+ # layout.addWidget(self.label_3)
+ layout.addWidget(self.label_4)
+ layout.addWidget(self.label_5)
+ self.setLayout(layout)
+
+ def check_onedrive_version(self):
+ # Check if OneDrive is installed
+ od_version_check = subprocess.check_output(["onedrive", "--version"])
+ if "onedrive v" in str(od_version_check):
+ self.od_version = re.search(r".\s(v[0-9.]+)", str(od_version_check)).group(1)
+ print(f"OneDrive {self.od_version} detected.")
+ self.label_4.setText(f"OneDrive {self.od_version} detected.")
+ self.label_5.hide()
+ return True
+ else:
+ self.label_4.setText("OneDrive not detected.")
+ return False
+
+
+
+class wizardPage_create_import(QWizardPage):
+ def __init__(self, parent=None):
+ super(wizardPage_create_import, self).__init__(parent)
+ self.setTitle("Create/Import OneDrive profile")
+
+ self.checkBox_create = QCheckBox()
+ self.checkBox_create.setText("Create new OneDrive profile")
+ self.checkBox_create.stateChanged.connect(self.on_checkbox_change)
+
+ self.checkBox_import = QCheckBox()
+ self.checkBox_import.setText("Import existing OneDrive profile/config")
+ self.checkBox_import.stateChanged.connect(self.on_checkbox_change)
+
+ layout = QVBoxLayout()
+ layout.addWidget(self.checkBox_create)
+ layout.addWidget(self.checkBox_import)
+ self.setLayout(layout)
+
+
+ def on_checkbox_change(self):
+ if self.checkBox_create.isChecked():
+ print(f"Create new profile is checked")
+ self.checkBox_import.setDisabled(True)
+ # self.wizardPage_create_import.completeChanged()
+
+ elif self.checkBox_import.isChecked():
+ print(f"Import profile is checked")
+ self.checkBox_create.setDisabled(True)
+ # self.wizardPage_create_import.completeChanged()
+
+ else:
+ print(f"No option is unchecked")
+ self.checkBox_import.setDisabled(False)
+ self.checkBox_create.setDisabled(False)
+
+
+class wizardPage_import(QWizardPage):
+ def __init__(self, parent=None):
+ super(wizardPage_import, self).__init__(parent)
+ self.setTitle("Create/Import OneDrive profile")
+
+ self.label_profile_name = QLabel()
+ self.label_profile_name.setText("Profile name")
+
+ self.label_config_path = QLabel()
+ self.label_config_path.setText("Config fil path")
+
+
+ self.lineEdit_profile_name = QLineEdit()
+ self.lineEdit_profile_name.setPlaceholderText("E.g. john@live.com")
+
+ self.lineEdit_config_path = QLineEdit()
+ self.lineEdit_config_path.setPlaceholderText("E.g. ~/.config/onedrive/config")
+
+
+ self.pushButton_import = QPushButton()
+
+
+ layout = QVBoxLayout()
+ layout.addWidget(self.label_profile_name)
+ layout.addWidget(self.label_config_path)
+ layout.addWidget(self.lineEdit_profile_name)
+ layout.addWidget(self.lineEdit_config_path)
+ layout.addWidget(self.pushButton_import)
+ self.setLayout(layout)
+
+ def import_profile(self):
+ """
+ Imports pre-existing OneDrive profile.
+ Loads default values firt, then overwrite them with user settings.
+ This is to handle cases where imported config contains only some properties.
+ """
+
+ profile_name = self.lineEdit_profile_name.text()
+ config_path = os.path.expanduser(self.lineEdit_config_path.text())
+
+ # Load all default values.
+ _default_od_config = read_config("resources/default_config")
+ default_od_config = _default_od_config._sections
+
+ # Load user's settings.
+ _new_od_config = read_config(config_path)
+ new_od_config = _new_od_config._sections
+
+ # Construct dict with user profile settings.
+ new_profile = {profile_name: {"config_file": config_path, "enable_debug": False, "mode": "monitor"}}
+
+ # Load existing user profiles and add the new profile.
+ _profiles = ConfigParser()
+ _profiles.read(PROFILES_FILE)
+ _profiles[profile_name] = new_profile[profile_name]
+
+ # Create profile config file if it does not exist.
+ profiles_dir = re.search(r"(.+)/profiles$", PROFILES_FILE).group(1)
+ if not os.path.exists(profiles_dir):
+ os.makedirs(profiles_dir)
+
+ # Save the new profile.
+ with open(PROFILES_FILE, "w") as configfile:
+ _profiles.write(configfile)
+
+ # Append OD config
+ new_profile[profile_name].update(default_od_config)
+ new_profile[profile_name].update(new_od_config)
+
+ # Append new profile into running global profile
+ global_config.update(new_profile)
+ # print(new_profile)
+ # print(global_config)
+
+ self.settings_window.listWidget_profiles.addItem(profile_name)
+ self.setting_page = ProfileSettingsPage(profile_name)
+ self.settings_window.stackedLayout.addWidget(self.setting_page)
+
+ # Add status page widget for new profile
+ main_window.comboBox.addItem(profile_name)
+ main_window.profile_status_pages[profile_name] = ProfileStatusPage(profile_name)
+ main_window.stackedLayout.addWidget(main_window.profile_status_pages[profile_name])
+
+ # Hide "Create profile" push button from main windows.
+ main_window.pushButton_new_profile.hide()
+
+ print(f"Account {profile_name} has been imported")
+ self.pushButton_import.setText("Done")
+ self.pushButton_import.setDisabled(True)
+
+
+
+
+
diff --git a/src/__thrash/system_tray.py b/src/__thrash/system_tray.py
new file mode 100644
index 0000000..110d3b9
--- /dev/null
+++ b/src/__thrash/system_tray.py
@@ -0,0 +1,39 @@
+import sys
+from PySide6.QtCore import *
+from PySide6.QtGui import *
+from PySide6.QtWidgets import *
+
+
+class App:
+ def __init__(self):
+ # Create a Qt application
+ self.app = QApplication(sys.argv)
+
+ icon = QIcon("icons8-clouds-48.png")
+ menu = QMenu()
+ settingAction = menu.addAction("setting")
+ settingAction.triggered.connect(self.setting)
+ exitAction = menu.addAction("exit")
+ exitAction.triggered.connect(sys.exit)
+
+ self.tray = QSystemTrayIcon()
+ self.tray.setIcon(icon)
+ self.tray.setContextMenu(menu)
+ self.tray.show()
+ self.tray.setToolTip("unko!")
+ self.tray.showMessage("hoge", "moge")
+ self.tray.showMessage("fuga", "moge")
+
+ def run(self):
+ # Enter Qt application main loop
+ self.app.exec_()
+ sys.exit()
+
+ def setting(self):
+ self.dialog = QDialog()
+ self.dialog.setWindowTitle("Setting Dialog")
+ self.dialog.show()
+
+if __name__ == "__main__":
+ app = App()
+ app.run()
\ No newline at end of file
diff --git a/src/__thrash/test.py b/src/__thrash/test.py
new file mode 100644
index 0000000..b356047
--- /dev/null
+++ b/src/__thrash/test.py
@@ -0,0 +1,13 @@
+import psutil
+
+def OneDriveStatus():
+ for proc in psutil.process_iter():
+ if proc.name().lower() == 'onedrive' and proc.status() != 'zombie':
+ print("OneDrive is running.")
+ return True
+ print("OneDrive is NOT running.")
+ return False
+
+
+
+OneDriveStatus()
\ No newline at end of file
diff --git a/src/__thrash/ui/settings-good-backup.ui b/src/__thrash/ui/settings-good-backup.ui
new file mode 100644
index 0000000..00c0575
--- /dev/null
+++ b/src/__thrash/ui/settings-good-backup.ui
@@ -0,0 +1,223 @@
+
+
+ Form
+
+
+
+ 0
+ 0
+ 437
+ 718
+
+
+
+ Form
+
+
+ -
+
+
-
+
+
+ 0
+
+
+
+ Monitored Files
+
+
+
-
+
+
-
+
+
+ Skip Hidden Files
+
+
+
+ -
+
+
+ Sync Folder:
+
+
+
+ -
+
+
+ -
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Skip files:
+
+
+
+ -
+
+
-
+
+
+ -
+
+
+ Add
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Remove
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Skip directories:
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Remove
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Add
+
+
+
+
+
+
+
+
+
+ Logging
+
+
+ -
+
+
-
+
+
+ Enable Logging
+
+
+
+ -
+
+
+ Log location:
+
+
+
+ -
+
+
+ -
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+ Page
+
+
+
+
+ Page
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Save
+
+
+
+
+
+
+
+
+
+
diff --git a/src/__thrash/ui/settings2.ui b/src/__thrash/ui/settings2.ui
new file mode 100644
index 0000000..24284c2
--- /dev/null
+++ b/src/__thrash/ui/settings2.ui
@@ -0,0 +1,236 @@
+
+
+ settings_new
+
+
+
+ 0
+ 0
+ 619
+ 892
+
+
+
+ MainWindow
+
+
+
+ -
+
+
-
+
+
+ Save
+
+
+
+
+
+ -
+
+
-
+
+
+ 0
+
+
+
+ Monitored Files
+
+
+
-
+
+
-
+
+
+ Skip Hidden Files
+
+
+
+ -
+
+
+ Sync Folder:
+
+
+
+ -
+
+
+ -
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Skip files:
+
+
+
+ -
+
+
-
+
+
+ -
+
+
+ Add
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Remove
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Skip directories:
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Remove
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Add
+
+
+
+
+
+
+
+
+
+ Logging
+
+
+ -
+
+
-
+
+
+ Enable Logging
+
+
+
+ -
+
+
+ Log location:
+
+
+
+ -
+
+
+ -
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+ Page
+
+
+
+
+ Page
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/__thrash/ui/settings_qt5_web-test.ui b/src/__thrash/ui/settings_qt5_web-test.ui
new file mode 100644
index 0000000..632a9d2
--- /dev/null
+++ b/src/__thrash/ui/settings_qt5_web-test.ui
@@ -0,0 +1,245 @@
+
+
+ Form
+
+
+
+ 0
+ 0
+ 697
+ 846
+
+
+
+ Form
+
+
+ -
+
+
-
+
+
+ 3
+
+
+
+ Monitored Files
+
+
+
-
+
+
-
+
+
+ Skip Hidden Files
+
+
+
+ -
+
+
+ Sync Folder:
+
+
+
+ -
+
+
+ -
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Skip files:
+
+
+
+ -
+
+
-
+
+
+ -
+
+
+ Add
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Remove
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Skip directories:
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Remove
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Add
+
+
+
+
+
+
+
+
+
+ Logging
+
+
+ -
+
+
-
+
+
+ Enable Logging
+
+
+
+ -
+
+
+ Log location:
+
+
+
+ -
+
+
+ -
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+ Page
+
+
+
+
+ Page
+
+
+
+
+ 30
+ 150
+ 611
+ 461
+
+
+
+
+ https://www.seznam.cz/
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+ Save
+
+
+
+
+
+
+
+
+
+ QWebEngineView
+ QWidget
+ QtWebEngineWidgets/QWebEngineView
+
+
+
+
+
diff --git a/src/__thrash/ui/settings_ui.py b/src/__thrash/ui/settings_ui.py
new file mode 100644
index 0000000..054379b
--- /dev/null
+++ b/src/__thrash/ui/settings_ui.py
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'settings.ui'
+##
+## Created by: Qt User Interface Compiler version 6.2.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QCheckBox, QGridLayout, QHBoxLayout,
+ QLabel, QLineEdit, QListWidget, QListWidgetItem,
+ QPushButton, QSizePolicy, QSpacerItem, QTabWidget,
+ QVBoxLayout, QWidget)
+
+class Ui_Form(object):
+ def setupUi(self, Form):
+ if not Form.objectName():
+ Form.setObjectName(u"Form")
+ Form.resize(878, 1011)
+ self.verticalLayout_2 = QVBoxLayout(Form)
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
+ self.verticalLayout = QVBoxLayout()
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.tabWidget = QTabWidget(Form)
+ self.tabWidget.setObjectName(u"tabWidget")
+ self.exemptions_tab = QWidget()
+ self.exemptions_tab.setObjectName(u"exemptions_tab")
+ self.verticalLayout_3 = QVBoxLayout(self.exemptions_tab)
+ self.verticalLayout_3.setObjectName(u"verticalLayout_3")
+ self.gridLayout_3 = QGridLayout()
+ self.gridLayout_3.setObjectName(u"gridLayout_3")
+ self.checkBox_2 = QCheckBox(self.exemptions_tab)
+ self.checkBox_2.setObjectName(u"checkBox_2")
+
+ self.gridLayout_3.addWidget(self.checkBox_2, 1, 0, 1, 2)
+
+ self.label = QLabel(self.exemptions_tab)
+ self.label.setObjectName(u"label")
+
+ self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
+
+ self.lineEdit_4 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_4.setObjectName(u"lineEdit_4")
+
+ self.gridLayout_3.addWidget(self.lineEdit_4, 0, 1, 1, 1)
+
+ self.pushButton = QPushButton(self.exemptions_tab)
+ self.pushButton.setObjectName(u"pushButton")
+
+ self.gridLayout_3.addWidget(self.pushButton, 0, 2, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_3)
+
+ self.label_4 = QLabel(self.exemptions_tab)
+ self.label_4.setObjectName(u"label_4")
+
+ self.verticalLayout_3.addWidget(self.label_4)
+
+ self.gridLayout_2 = QGridLayout()
+ self.gridLayout_2.setObjectName(u"gridLayout_2")
+ self.lineEdit_2 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_2.setObjectName(u"lineEdit_2")
+
+ self.gridLayout_2.addWidget(self.lineEdit_2, 1, 0, 1, 1)
+
+ self.pushButton_6 = QPushButton(self.exemptions_tab)
+ self.pushButton_6.setObjectName(u"pushButton_6")
+
+ self.gridLayout_2.addWidget(self.pushButton_6, 1, 1, 1, 1)
+
+ self.pushButton_5 = QPushButton(self.exemptions_tab)
+ self.pushButton_5.setObjectName(u"pushButton_5")
+ sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.pushButton_5.sizePolicy().hasHeightForWidth())
+ self.pushButton_5.setSizePolicy(sizePolicy)
+
+ self.gridLayout_2.addWidget(self.pushButton_5, 0, 1, 1, 1)
+
+ self.listWidget = QListWidget(self.exemptions_tab)
+ self.listWidget.setObjectName(u"listWidget")
+
+ self.gridLayout_2.addWidget(self.listWidget, 0, 0, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_2)
+
+ self.label_5 = QLabel(self.exemptions_tab)
+ self.label_5.setObjectName(u"label_5")
+
+ self.verticalLayout_3.addWidget(self.label_5)
+
+ self.gridLayout = QGridLayout()
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.pushButton_8 = QPushButton(self.exemptions_tab)
+ self.pushButton_8.setObjectName(u"pushButton_8")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
+ sizePolicy1.setHorizontalStretch(0)
+ sizePolicy1.setVerticalStretch(0)
+ sizePolicy1.setHeightForWidth(self.pushButton_8.sizePolicy().hasHeightForWidth())
+ self.pushButton_8.setSizePolicy(sizePolicy1)
+
+ self.gridLayout.addWidget(self.pushButton_8, 0, 1, 1, 1)
+
+ self.listWidget_2 = QListWidget(self.exemptions_tab)
+ self.listWidget_2.setObjectName(u"listWidget_2")
+ sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Expanding)
+ sizePolicy2.setHorizontalStretch(0)
+ sizePolicy2.setVerticalStretch(0)
+ sizePolicy2.setHeightForWidth(self.listWidget_2.sizePolicy().hasHeightForWidth())
+ self.listWidget_2.setSizePolicy(sizePolicy2)
+
+ self.gridLayout.addWidget(self.listWidget_2, 0, 0, 1, 1)
+
+ self.lineEdit_3 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_3.setObjectName(u"lineEdit_3")
+
+ self.gridLayout.addWidget(self.lineEdit_3, 1, 0, 1, 1)
+
+ self.pushButton_7 = QPushButton(self.exemptions_tab)
+ self.pushButton_7.setObjectName(u"pushButton_7")
+ sizePolicy3 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
+ sizePolicy3.setHorizontalStretch(0)
+ sizePolicy3.setVerticalStretch(0)
+ sizePolicy3.setHeightForWidth(self.pushButton_7.sizePolicy().hasHeightForWidth())
+ self.pushButton_7.setSizePolicy(sizePolicy3)
+
+ self.gridLayout.addWidget(self.pushButton_7, 1, 1, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout)
+
+ self.tabWidget.addTab(self.exemptions_tab, "")
+ self.logging_tab = QWidget()
+ self.logging_tab.setObjectName(u"logging_tab")
+ self.verticalLayout_4 = QVBoxLayout(self.logging_tab)
+ self.verticalLayout_4.setObjectName(u"verticalLayout_4")
+ self.gridLayout_4 = QGridLayout()
+ self.gridLayout_4.setObjectName(u"gridLayout_4")
+ self.checkBox = QCheckBox(self.logging_tab)
+ self.checkBox.setObjectName(u"checkBox")
+
+ self.gridLayout_4.addWidget(self.checkBox, 0, 0, 1, 2)
+
+ self.label_3 = QLabel(self.logging_tab)
+ self.label_3.setObjectName(u"label_3")
+
+ self.gridLayout_4.addWidget(self.label_3, 1, 0, 1, 1)
+
+ self.lineEdit = QLineEdit(self.logging_tab)
+ self.lineEdit.setObjectName(u"lineEdit")
+
+ self.gridLayout_4.addWidget(self.lineEdit, 1, 1, 1, 1)
+
+ self.pushButton_2 = QPushButton(self.logging_tab)
+ self.pushButton_2.setObjectName(u"pushButton_2")
+
+ self.gridLayout_4.addWidget(self.pushButton_2, 1, 2, 1, 1)
+
+
+ self.verticalLayout_4.addLayout(self.gridLayout_4)
+
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
+
+ self.verticalLayout_4.addItem(self.verticalSpacer)
+
+ self.tabWidget.addTab(self.logging_tab, "")
+ self.tab_3 = QWidget()
+ self.tab_3.setObjectName(u"tab_3")
+ self.tabWidget.addTab(self.tab_3, "")
+ self.tab_4 = QWidget()
+ self.tab_4.setObjectName(u"tab_4")
+ self.tabWidget.addTab(self.tab_4, "")
+
+ self.verticalLayout.addWidget(self.tabWidget)
+
+
+ self.verticalLayout_2.addLayout(self.verticalLayout)
+
+ self.horizontalLayout = QHBoxLayout()
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.pushButton_4 = QPushButton(Form)
+ self.pushButton_4.setObjectName(u"pushButton_4")
+
+ self.horizontalLayout.addWidget(self.pushButton_4)
+
+
+ self.verticalLayout_2.addLayout(self.horizontalLayout)
+
+
+ self.retranslateUi(Form)
+
+ self.tabWidget.setCurrentIndex(0)
+
+
+ QMetaObject.connectSlotsByName(Form)
+ # setupUi
+
+ def retranslateUi(self, Form):
+ Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
+ self.checkBox_2.setText(QCoreApplication.translate("Form", u"Skip Hidden Files", None))
+ self.label.setText(QCoreApplication.translate("Form", u"Sync Folder:", None))
+ self.pushButton.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.label_4.setText(QCoreApplication.translate("Form", u"Skip files:", None))
+ self.pushButton_6.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.pushButton_5.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.label_5.setText(QCoreApplication.translate("Form", u"Skip directories:", None))
+ self.pushButton_8.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.pushButton_7.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.exemptions_tab), QCoreApplication.translate("Form", u"Monitored Files", None))
+ self.checkBox.setText(QCoreApplication.translate("Form", u"Enable Logging", None))
+ self.label_3.setText(QCoreApplication.translate("Form", u"Log location:", None))
+ self.pushButton_2.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.logging_tab), QCoreApplication.translate("Form", u"Logging", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("Form", u"Page", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QCoreApplication.translate("Form", u"Page", None))
+ self.pushButton_4.setText(QCoreApplication.translate("Form", u"Save", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui/ui_OneDriveGUI.py b/src/__thrash/ui/ui_OneDriveGUI.py
new file mode 100644
index 0000000..988b6ee
--- /dev/null
+++ b/src/__thrash/ui/ui_OneDriveGUI.py
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'OneDriveGUIAnUifJ.ui'
+##
+## Created by: Qt User Interface Compiler version 5.15.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide2.QtCore import *
+from PySide2.QtGui import *
+from PySide2.QtWidgets import *
+
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ if not MainWindow.objectName():
+ MainWindow.setObjectName(u"MainWindow")
+ MainWindow.resize(1115, 781)
+ self.centralwidget = QWidget(MainWindow)
+ self.centralwidget.setObjectName(u"centralwidget")
+ self.listView = QListView(self.centralwidget)
+ self.listView.setObjectName(u"listView")
+ self.listView.setGeometry(QRect(10, 70, 401, 531))
+ self.pushButton = QPushButton(self.centralwidget)
+ self.pushButton.setObjectName(u"pushButton")
+ self.pushButton.setGeometry(QRect(20, 623, 101, 81))
+ self.pushButton_2 = QPushButton(self.centralwidget)
+ self.pushButton_2.setObjectName(u"pushButton_2")
+ self.pushButton_2.setGeometry(QRect(150, 620, 101, 81))
+ self.pushButton_3 = QPushButton(self.centralwidget)
+ self.pushButton_3.setObjectName(u"pushButton_3")
+ self.pushButton_3.setGeometry(QRect(290, 620, 101, 81))
+ self.toolButton = QToolButton(self.centralwidget)
+ self.toolButton.setObjectName(u"toolButton")
+ self.toolButton.setGeometry(QRect(240, 640, 32, 33))
+ self.toolButton_2 = QToolButton(self.centralwidget)
+ self.toolButton_2.setObjectName(u"toolButton_2")
+ self.toolButton_2.setGeometry(QRect(20, 20, 32, 33))
+ self.label = QLabel(self.centralwidget)
+ self.label.setObjectName(u"label")
+ self.label.setGeometry(QRect(80, 20, 191, 31))
+ self.frame = QFrame(self.centralwidget)
+ self.frame.setObjectName(u"frame")
+ self.frame.setGeometry(QRect(440, 10, 661, 721))
+ self.frame.setFrameShape(QFrame.StyledPanel)
+ self.frame.setFrameShadow(QFrame.Raised)
+ self.tabWidget = QTabWidget(self.frame)
+ self.tabWidget.setObjectName(u"tabWidget")
+ self.tabWidget.setGeometry(QRect(20, 40, 621, 631))
+ self.exemptions_tab = QWidget()
+ self.exemptions_tab.setObjectName(u"exemptions_tab")
+ self.textEdit = QTextEdit(self.exemptions_tab)
+ self.textEdit.setObjectName(u"textEdit")
+ self.textEdit.setGeometry(QRect(40, 340, 501, 231))
+ self.textEdit_2 = QTextEdit(self.exemptions_tab)
+ self.textEdit_2.setObjectName(u"textEdit_2")
+ self.textEdit_2.setGeometry(QRect(40, 50, 501, 241))
+ self.label_4 = QLabel(self.exemptions_tab)
+ self.label_4.setObjectName(u"label_4")
+ self.label_4.setGeometry(QRect(40, 20, 58, 18))
+ self.label_5 = QLabel(self.exemptions_tab)
+ self.label_5.setObjectName(u"label_5")
+ self.label_5.setGeometry(QRect(40, 310, 111, 18))
+ self.tabWidget.addTab(self.exemptions_tab, "")
+ self.logging_tab = QWidget()
+ self.logging_tab.setObjectName(u"logging_tab")
+ self.checkBox = QCheckBox(self.logging_tab)
+ self.checkBox.setObjectName(u"checkBox")
+ self.checkBox.setGeometry(QRect(150, 30, 88, 22))
+ self.label_2 = QLabel(self.logging_tab)
+ self.label_2.setObjectName(u"label_2")
+ self.label_2.setGeometry(QRect(30, 30, 101, 18))
+ self.lineEdit = QLineEdit(self.logging_tab)
+ self.lineEdit.setObjectName(u"lineEdit")
+ self.lineEdit.setGeometry(QRect(150, 60, 421, 32))
+ self.label_3 = QLabel(self.logging_tab)
+ self.label_3.setObjectName(u"label_3")
+ self.label_3.setGeometry(QRect(30, 70, 101, 18))
+ self.tabWidget.addTab(self.logging_tab, "")
+ self.tab_3 = QWidget()
+ self.tab_3.setObjectName(u"tab_3")
+ self.tabWidget.addTab(self.tab_3, "")
+ self.tab_4 = QWidget()
+ self.tab_4.setObjectName(u"tab_4")
+ self.tabWidget.addTab(self.tab_4, "")
+ self.pushButton_4 = QPushButton(self.frame)
+ self.pushButton_4.setObjectName(u"pushButton_4")
+ self.pushButton_4.setGeometry(QRect(540, 680, 88, 34))
+ MainWindow.setCentralWidget(self.centralwidget)
+ self.menubar = QMenuBar(MainWindow)
+ self.menubar.setObjectName(u"menubar")
+ self.menubar.setGeometry(QRect(0, 0, 1115, 30))
+ MainWindow.setMenuBar(self.menubar)
+ self.statusbar = QStatusBar(MainWindow)
+ self.statusbar.setObjectName(u"statusbar")
+ MainWindow.setStatusBar(self.statusbar)
+
+ self.retranslateUi(MainWindow)
+
+ self.tabWidget.setCurrentIndex(0)
+
+
+ QMetaObject.connectSlotsByName(MainWindow)
+ # setupUi
+
+ def retranslateUi(self, MainWindow):
+ MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
+ self.pushButton.setText(QCoreApplication.translate("MainWindow", u"Open Folder", None))
+ self.pushButton_2.setText(QCoreApplication.translate("MainWindow", u"Sync", None))
+ self.pushButton_3.setText(QCoreApplication.translate("MainWindow", u"Settings", None))
+ self.toolButton.setText(QCoreApplication.translate("MainWindow", u"...", None))
+ self.toolButton_2.setText(QCoreApplication.translate("MainWindow", u"...", None))
+ self.label.setText(QCoreApplication.translate("MainWindow", u"Status", None))
+ self.label_4.setText(QCoreApplication.translate("MainWindow", u"Skip files:", None))
+ self.label_5.setText(QCoreApplication.translate("MainWindow", u"Skip directories:", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.exemptions_tab), QCoreApplication.translate("MainWindow", u"Exemptions", None))
+ self.checkBox.setText("")
+ self.label_2.setText(QCoreApplication.translate("MainWindow", u"Enable logging:", None))
+ self.label_3.setText(QCoreApplication.translate("MainWindow", u"Log location:", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.logging_tab), QCoreApplication.translate("MainWindow", u"Logging", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("MainWindow", u"Page", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QCoreApplication.translate("MainWindow", u"Page", None))
+ self.pushButton_4.setText(QCoreApplication.translate("MainWindow", u"Save", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui/ui_settings-good-backup.py b/src/__thrash/ui/ui_settings-good-backup.py
new file mode 100644
index 0000000..31b648f
--- /dev/null
+++ b/src/__thrash/ui/ui_settings-good-backup.py
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'settingsfQdOxi.ui'
+##
+## Created by: Qt User Interface Compiler version 6.2.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QCheckBox, QGridLayout, QHBoxLayout,
+ QLabel, QLineEdit, QListWidget, QListWidgetItem,
+ QPushButton, QSizePolicy, QSpacerItem, QTabWidget,
+ QVBoxLayout, QWidget)
+
+class Ui_Form(object):
+ def setupUi(self, Form):
+ if not Form.objectName():
+ Form.setObjectName(u"Form")
+ Form.resize(437, 718)
+ self.verticalLayout_2 = QVBoxLayout(Form)
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
+ self.verticalLayout = QVBoxLayout()
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.tabWidget = QTabWidget(Form)
+ self.tabWidget.setObjectName(u"tabWidget")
+ self.exemptions_tab = QWidget()
+ self.exemptions_tab.setObjectName(u"exemptions_tab")
+ self.verticalLayout_3 = QVBoxLayout(self.exemptions_tab)
+ self.verticalLayout_3.setObjectName(u"verticalLayout_3")
+ self.gridLayout_3 = QGridLayout()
+ self.gridLayout_3.setObjectName(u"gridLayout_3")
+ self.checkBox_2 = QCheckBox(self.exemptions_tab)
+ self.checkBox_2.setObjectName(u"checkBox_2")
+
+ self.gridLayout_3.addWidget(self.checkBox_2, 1, 0, 1, 2)
+
+ self.label = QLabel(self.exemptions_tab)
+ self.label.setObjectName(u"label")
+
+ self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
+
+ self.lineEdit_4 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_4.setObjectName(u"lineEdit_4")
+
+ self.gridLayout_3.addWidget(self.lineEdit_4, 0, 1, 1, 1)
+
+ self.pushButton = QPushButton(self.exemptions_tab)
+ self.pushButton.setObjectName(u"pushButton")
+
+ self.gridLayout_3.addWidget(self.pushButton, 0, 2, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_3)
+
+ self.label_4 = QLabel(self.exemptions_tab)
+ self.label_4.setObjectName(u"label_4")
+
+ self.verticalLayout_3.addWidget(self.label_4)
+
+ self.gridLayout_2 = QGridLayout()
+ self.gridLayout_2.setObjectName(u"gridLayout_2")
+ self.lineEdit_2 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_2.setObjectName(u"lineEdit_2")
+
+ self.gridLayout_2.addWidget(self.lineEdit_2, 1, 0, 1, 1)
+
+ self.pushButton_6 = QPushButton(self.exemptions_tab)
+ self.pushButton_6.setObjectName(u"pushButton_6")
+
+ self.gridLayout_2.addWidget(self.pushButton_6, 1, 1, 1, 1)
+
+ self.pushButton_5 = QPushButton(self.exemptions_tab)
+ self.pushButton_5.setObjectName(u"pushButton_5")
+ sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.pushButton_5.sizePolicy().hasHeightForWidth())
+ self.pushButton_5.setSizePolicy(sizePolicy)
+
+ self.gridLayout_2.addWidget(self.pushButton_5, 0, 1, 1, 1)
+
+ self.listWidget = QListWidget(self.exemptions_tab)
+ self.listWidget.setObjectName(u"listWidget")
+
+ self.gridLayout_2.addWidget(self.listWidget, 0, 0, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_2)
+
+ self.label_5 = QLabel(self.exemptions_tab)
+ self.label_5.setObjectName(u"label_5")
+
+ self.verticalLayout_3.addWidget(self.label_5)
+
+ self.gridLayout = QGridLayout()
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.pushButton_8 = QPushButton(self.exemptions_tab)
+ self.pushButton_8.setObjectName(u"pushButton_8")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
+ sizePolicy1.setHorizontalStretch(0)
+ sizePolicy1.setVerticalStretch(0)
+ sizePolicy1.setHeightForWidth(self.pushButton_8.sizePolicy().hasHeightForWidth())
+ self.pushButton_8.setSizePolicy(sizePolicy1)
+
+ self.gridLayout.addWidget(self.pushButton_8, 0, 1, 1, 1)
+
+ self.listWidget_2 = QListWidget(self.exemptions_tab)
+ self.listWidget_2.setObjectName(u"listWidget_2")
+ sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Expanding)
+ sizePolicy2.setHorizontalStretch(0)
+ sizePolicy2.setVerticalStretch(0)
+ sizePolicy2.setHeightForWidth(self.listWidget_2.sizePolicy().hasHeightForWidth())
+ self.listWidget_2.setSizePolicy(sizePolicy2)
+
+ self.gridLayout.addWidget(self.listWidget_2, 0, 0, 1, 1)
+
+ self.lineEdit_3 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_3.setObjectName(u"lineEdit_3")
+
+ self.gridLayout.addWidget(self.lineEdit_3, 1, 0, 1, 1)
+
+ self.pushButton_7 = QPushButton(self.exemptions_tab)
+ self.pushButton_7.setObjectName(u"pushButton_7")
+ sizePolicy3 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
+ sizePolicy3.setHorizontalStretch(0)
+ sizePolicy3.setVerticalStretch(0)
+ sizePolicy3.setHeightForWidth(self.pushButton_7.sizePolicy().hasHeightForWidth())
+ self.pushButton_7.setSizePolicy(sizePolicy3)
+
+ self.gridLayout.addWidget(self.pushButton_7, 1, 1, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout)
+
+ self.tabWidget.addTab(self.exemptions_tab, "")
+ self.logging_tab = QWidget()
+ self.logging_tab.setObjectName(u"logging_tab")
+ self.verticalLayout_4 = QVBoxLayout(self.logging_tab)
+ self.verticalLayout_4.setObjectName(u"verticalLayout_4")
+ self.gridLayout_4 = QGridLayout()
+ self.gridLayout_4.setObjectName(u"gridLayout_4")
+ self.checkBox = QCheckBox(self.logging_tab)
+ self.checkBox.setObjectName(u"checkBox")
+
+ self.gridLayout_4.addWidget(self.checkBox, 0, 0, 1, 2)
+
+ self.label_3 = QLabel(self.logging_tab)
+ self.label_3.setObjectName(u"label_3")
+
+ self.gridLayout_4.addWidget(self.label_3, 1, 0, 1, 1)
+
+ self.lineEdit = QLineEdit(self.logging_tab)
+ self.lineEdit.setObjectName(u"lineEdit")
+
+ self.gridLayout_4.addWidget(self.lineEdit, 1, 1, 1, 1)
+
+ self.pushButton_2 = QPushButton(self.logging_tab)
+ self.pushButton_2.setObjectName(u"pushButton_2")
+
+ self.gridLayout_4.addWidget(self.pushButton_2, 1, 2, 1, 1)
+
+
+ self.verticalLayout_4.addLayout(self.gridLayout_4)
+
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
+
+ self.verticalLayout_4.addItem(self.verticalSpacer)
+
+ self.tabWidget.addTab(self.logging_tab, "")
+ self.tab_3 = QWidget()
+ self.tab_3.setObjectName(u"tab_3")
+ self.tabWidget.addTab(self.tab_3, "")
+ self.tab_4 = QWidget()
+ self.tab_4.setObjectName(u"tab_4")
+ self.tabWidget.addTab(self.tab_4, "")
+
+ self.verticalLayout.addWidget(self.tabWidget)
+
+
+ self.verticalLayout_2.addLayout(self.verticalLayout)
+
+ self.horizontalLayout = QHBoxLayout()
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.pushButton_4 = QPushButton(Form)
+ self.pushButton_4.setObjectName(u"pushButton_4")
+
+ self.horizontalLayout.addWidget(self.pushButton_4)
+
+
+ self.verticalLayout_2.addLayout(self.horizontalLayout)
+
+
+ self.retranslateUi(Form)
+
+ self.tabWidget.setCurrentIndex(0)
+
+
+ QMetaObject.connectSlotsByName(Form)
+ # setupUi
+
+ def retranslateUi(self, Form):
+ Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
+ self.checkBox_2.setText(QCoreApplication.translate("Form", u"Skip Hidden Files", None))
+ self.label.setText(QCoreApplication.translate("Form", u"Sync Folder:", None))
+ self.pushButton.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.label_4.setText(QCoreApplication.translate("Form", u"Skip files:", None))
+ self.pushButton_6.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.pushButton_5.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.label_5.setText(QCoreApplication.translate("Form", u"Skip directories:", None))
+ self.pushButton_8.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.pushButton_7.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.exemptions_tab), QCoreApplication.translate("Form", u"Monitored Files", None))
+ self.checkBox.setText(QCoreApplication.translate("Form", u"Enable Logging", None))
+ self.label_3.setText(QCoreApplication.translate("Form", u"Log location:", None))
+ self.pushButton_2.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.logging_tab), QCoreApplication.translate("Form", u"Logging", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("Form", u"Page", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QCoreApplication.translate("Form", u"Page", None))
+ self.pushButton_4.setText(QCoreApplication.translate("Form", u"Save", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui/ui_settings2.py b/src/__thrash/ui/ui_settings2.py
new file mode 100644
index 0000000..a048186
--- /dev/null
+++ b/src/__thrash/ui/ui_settings2.py
@@ -0,0 +1,240 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'settings2DclElV.ui'
+##
+## Created by: Qt User Interface Compiler version 6.2.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QCheckBox, QGridLayout, QHBoxLayout,
+ QLabel, QLineEdit, QListWidget, QListWidgetItem,
+ QMainWindow, QMenuBar, QPushButton, QSizePolicy,
+ QSpacerItem, QStatusBar, QTabWidget, QVBoxLayout,
+ QWidget)
+
+class Ui_settings_new(object):
+ def setupUi(self, settings_new):
+ if not settings_new.objectName():
+ settings_new.setObjectName(u"settings_new")
+ settings_new.resize(619, 892)
+ self.centralwidget = QWidget(settings_new)
+ self.centralwidget.setObjectName(u"centralwidget")
+ self.verticalLayout_2 = QVBoxLayout(self.centralwidget)
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
+ self.horizontalLayout = QHBoxLayout()
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.pushButton_4 = QPushButton(self.centralwidget)
+ self.pushButton_4.setObjectName(u"pushButton_4")
+
+ self.horizontalLayout.addWidget(self.pushButton_4)
+
+
+ self.verticalLayout_2.addLayout(self.horizontalLayout)
+
+ self.verticalLayout = QVBoxLayout()
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.tabWidget = QTabWidget(self.centralwidget)
+ self.tabWidget.setObjectName(u"tabWidget")
+ self.exemptions_tab = QWidget()
+ self.exemptions_tab.setObjectName(u"exemptions_tab")
+ self.verticalLayout_3 = QVBoxLayout(self.exemptions_tab)
+ self.verticalLayout_3.setObjectName(u"verticalLayout_3")
+ self.gridLayout_3 = QGridLayout()
+ self.gridLayout_3.setObjectName(u"gridLayout_3")
+ self.checkBox_2 = QCheckBox(self.exemptions_tab)
+ self.checkBox_2.setObjectName(u"checkBox_2")
+
+ self.gridLayout_3.addWidget(self.checkBox_2, 1, 0, 1, 2)
+
+ self.label = QLabel(self.exemptions_tab)
+ self.label.setObjectName(u"label")
+
+ self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
+
+ self.lineEdit_4 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_4.setObjectName(u"lineEdit_4")
+
+ self.gridLayout_3.addWidget(self.lineEdit_4, 0, 1, 1, 1)
+
+ self.pushButton = QPushButton(self.exemptions_tab)
+ self.pushButton.setObjectName(u"pushButton")
+
+ self.gridLayout_3.addWidget(self.pushButton, 0, 2, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_3)
+
+ self.label_4 = QLabel(self.exemptions_tab)
+ self.label_4.setObjectName(u"label_4")
+
+ self.verticalLayout_3.addWidget(self.label_4)
+
+ self.gridLayout_2 = QGridLayout()
+ self.gridLayout_2.setObjectName(u"gridLayout_2")
+ self.lineEdit_2 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_2.setObjectName(u"lineEdit_2")
+
+ self.gridLayout_2.addWidget(self.lineEdit_2, 1, 0, 1, 1)
+
+ self.pushButton_6 = QPushButton(self.exemptions_tab)
+ self.pushButton_6.setObjectName(u"pushButton_6")
+
+ self.gridLayout_2.addWidget(self.pushButton_6, 1, 1, 1, 1)
+
+ self.pushButton_5 = QPushButton(self.exemptions_tab)
+ self.pushButton_5.setObjectName(u"pushButton_5")
+ sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.pushButton_5.sizePolicy().hasHeightForWidth())
+ self.pushButton_5.setSizePolicy(sizePolicy)
+
+ self.gridLayout_2.addWidget(self.pushButton_5, 0, 1, 1, 1)
+
+ self.listWidget = QListWidget(self.exemptions_tab)
+ self.listWidget.setObjectName(u"listWidget")
+
+ self.gridLayout_2.addWidget(self.listWidget, 0, 0, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_2)
+
+ self.label_5 = QLabel(self.exemptions_tab)
+ self.label_5.setObjectName(u"label_5")
+
+ self.verticalLayout_3.addWidget(self.label_5)
+
+ self.gridLayout = QGridLayout()
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.pushButton_8 = QPushButton(self.exemptions_tab)
+ self.pushButton_8.setObjectName(u"pushButton_8")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
+ sizePolicy1.setHorizontalStretch(0)
+ sizePolicy1.setVerticalStretch(0)
+ sizePolicy1.setHeightForWidth(self.pushButton_8.sizePolicy().hasHeightForWidth())
+ self.pushButton_8.setSizePolicy(sizePolicy1)
+
+ self.gridLayout.addWidget(self.pushButton_8, 0, 1, 1, 1)
+
+ self.listWidget_2 = QListWidget(self.exemptions_tab)
+ self.listWidget_2.setObjectName(u"listWidget_2")
+ sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Expanding)
+ sizePolicy2.setHorizontalStretch(0)
+ sizePolicy2.setVerticalStretch(0)
+ sizePolicy2.setHeightForWidth(self.listWidget_2.sizePolicy().hasHeightForWidth())
+ self.listWidget_2.setSizePolicy(sizePolicy2)
+
+ self.gridLayout.addWidget(self.listWidget_2, 0, 0, 1, 1)
+
+ self.lineEdit_3 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_3.setObjectName(u"lineEdit_3")
+
+ self.gridLayout.addWidget(self.lineEdit_3, 1, 0, 1, 1)
+
+ self.pushButton_7 = QPushButton(self.exemptions_tab)
+ self.pushButton_7.setObjectName(u"pushButton_7")
+ sizePolicy3 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
+ sizePolicy3.setHorizontalStretch(0)
+ sizePolicy3.setVerticalStretch(0)
+ sizePolicy3.setHeightForWidth(self.pushButton_7.sizePolicy().hasHeightForWidth())
+ self.pushButton_7.setSizePolicy(sizePolicy3)
+
+ self.gridLayout.addWidget(self.pushButton_7, 1, 1, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout)
+
+ self.tabWidget.addTab(self.exemptions_tab, "")
+ self.logging_tab = QWidget()
+ self.logging_tab.setObjectName(u"logging_tab")
+ self.verticalLayout_4 = QVBoxLayout(self.logging_tab)
+ self.verticalLayout_4.setObjectName(u"verticalLayout_4")
+ self.gridLayout_4 = QGridLayout()
+ self.gridLayout_4.setObjectName(u"gridLayout_4")
+ self.checkBox = QCheckBox(self.logging_tab)
+ self.checkBox.setObjectName(u"checkBox")
+
+ self.gridLayout_4.addWidget(self.checkBox, 0, 0, 1, 2)
+
+ self.label_3 = QLabel(self.logging_tab)
+ self.label_3.setObjectName(u"label_3")
+
+ self.gridLayout_4.addWidget(self.label_3, 1, 0, 1, 1)
+
+ self.lineEdit = QLineEdit(self.logging_tab)
+ self.lineEdit.setObjectName(u"lineEdit")
+
+ self.gridLayout_4.addWidget(self.lineEdit, 1, 1, 1, 1)
+
+ self.pushButton_2 = QPushButton(self.logging_tab)
+ self.pushButton_2.setObjectName(u"pushButton_2")
+
+ self.gridLayout_4.addWidget(self.pushButton_2, 1, 2, 1, 1)
+
+
+ self.verticalLayout_4.addLayout(self.gridLayout_4)
+
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
+
+ self.verticalLayout_4.addItem(self.verticalSpacer)
+
+ self.tabWidget.addTab(self.logging_tab, "")
+ self.tab_3 = QWidget()
+ self.tab_3.setObjectName(u"tab_3")
+ self.tabWidget.addTab(self.tab_3, "")
+ self.tab_4 = QWidget()
+ self.tab_4.setObjectName(u"tab_4")
+ self.tabWidget.addTab(self.tab_4, "")
+
+ self.verticalLayout.addWidget(self.tabWidget)
+
+
+ self.verticalLayout_2.addLayout(self.verticalLayout)
+
+ settings_new.setCentralWidget(self.centralwidget)
+ self.menubar = QMenuBar(settings_new)
+ self.menubar.setObjectName(u"menubar")
+ self.menubar.setGeometry(QRect(0, 0, 619, 19))
+ settings_new.setMenuBar(self.menubar)
+ self.statusbar = QStatusBar(settings_new)
+ self.statusbar.setObjectName(u"statusbar")
+ settings_new.setStatusBar(self.statusbar)
+
+ self.retranslateUi(settings_new)
+
+ self.tabWidget.setCurrentIndex(0)
+
+
+ QMetaObject.connectSlotsByName(settings_new)
+ # setupUi
+
+ def retranslateUi(self, settings_new):
+ settings_new.setWindowTitle(QCoreApplication.translate("settings_new", u"MainWindow", None))
+ self.pushButton_4.setText(QCoreApplication.translate("settings_new", u"Save", None))
+ self.checkBox_2.setText(QCoreApplication.translate("settings_new", u"Skip Hidden Files", None))
+ self.label.setText(QCoreApplication.translate("settings_new", u"Sync Folder:", None))
+ self.pushButton.setText(QCoreApplication.translate("settings_new", u"Browse", None))
+ self.label_4.setText(QCoreApplication.translate("settings_new", u"Skip files:", None))
+ self.pushButton_6.setText(QCoreApplication.translate("settings_new", u"Add", None))
+ self.pushButton_5.setText(QCoreApplication.translate("settings_new", u"Remove", None))
+ self.label_5.setText(QCoreApplication.translate("settings_new", u"Skip directories:", None))
+ self.pushButton_8.setText(QCoreApplication.translate("settings_new", u"Remove", None))
+ self.pushButton_7.setText(QCoreApplication.translate("settings_new", u"Add", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.exemptions_tab), QCoreApplication.translate("settings_new", u"Monitored Files", None))
+ self.checkBox.setText(QCoreApplication.translate("settings_new", u"Enable Logging", None))
+ self.label_3.setText(QCoreApplication.translate("settings_new", u"Log location:", None))
+ self.pushButton_2.setText(QCoreApplication.translate("settings_new", u"Browse", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.logging_tab), QCoreApplication.translate("settings_new", u"Logging", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("settings_new", u"Page", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QCoreApplication.translate("settings_new", u"Page", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui/ui_settings_qt5_web-test.py b/src/__thrash/ui/ui_settings_qt5_web-test.py
new file mode 100644
index 0000000..0b8a514
--- /dev/null
+++ b/src/__thrash/ui/ui_settings_qt5_web-test.py
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'settings_qt5_web-testdOxRon.ui'
+##
+## Created by: Qt User Interface Compiler version 5.15.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide2.QtCore import *
+from PySide2.QtGui import *
+from PySide2.QtWidgets import *
+
+from PySide2.QtWebEngineWidgets import QWebEngineView
+
+
+
+class Ui_Form(object):
+ def setupUi(self, Form):
+ if not Form.objectName():
+ Form.setObjectName(u"Form")
+ Form.resize(697, 846)
+ self.verticalLayout_2 = QVBoxLayout(Form)
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
+ self.verticalLayout = QVBoxLayout()
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.tabWidget = QTabWidget(Form)
+ self.tabWidget.setObjectName(u"tabWidget")
+ self.exemptions_tab = QWidget()
+ self.exemptions_tab.setObjectName(u"exemptions_tab")
+ self.verticalLayout_3 = QVBoxLayout(self.exemptions_tab)
+ self.verticalLayout_3.setObjectName(u"verticalLayout_3")
+ self.gridLayout_3 = QGridLayout()
+ self.gridLayout_3.setObjectName(u"gridLayout_3")
+ self.checkBox_2 = QCheckBox(self.exemptions_tab)
+ self.checkBox_2.setObjectName(u"checkBox_2")
+
+ self.gridLayout_3.addWidget(self.checkBox_2, 1, 0, 1, 2)
+
+ self.label = QLabel(self.exemptions_tab)
+ self.label.setObjectName(u"label")
+
+ self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
+
+ self.lineEdit_4 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_4.setObjectName(u"lineEdit_4")
+
+ self.gridLayout_3.addWidget(self.lineEdit_4, 0, 1, 1, 1)
+
+ self.pushButton = QPushButton(self.exemptions_tab)
+ self.pushButton.setObjectName(u"pushButton")
+
+ self.gridLayout_3.addWidget(self.pushButton, 0, 2, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_3)
+
+ self.label_4 = QLabel(self.exemptions_tab)
+ self.label_4.setObjectName(u"label_4")
+
+ self.verticalLayout_3.addWidget(self.label_4)
+
+ self.gridLayout_2 = QGridLayout()
+ self.gridLayout_2.setObjectName(u"gridLayout_2")
+ self.lineEdit_2 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_2.setObjectName(u"lineEdit_2")
+
+ self.gridLayout_2.addWidget(self.lineEdit_2, 1, 0, 1, 1)
+
+ self.pushButton_6 = QPushButton(self.exemptions_tab)
+ self.pushButton_6.setObjectName(u"pushButton_6")
+
+ self.gridLayout_2.addWidget(self.pushButton_6, 1, 1, 1, 1)
+
+ self.pushButton_5 = QPushButton(self.exemptions_tab)
+ self.pushButton_5.setObjectName(u"pushButton_5")
+ sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.pushButton_5.sizePolicy().hasHeightForWidth())
+ self.pushButton_5.setSizePolicy(sizePolicy)
+
+ self.gridLayout_2.addWidget(self.pushButton_5, 0, 1, 1, 1)
+
+ self.listWidget = QListWidget(self.exemptions_tab)
+ self.listWidget.setObjectName(u"listWidget")
+
+ self.gridLayout_2.addWidget(self.listWidget, 0, 0, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_2)
+
+ self.label_5 = QLabel(self.exemptions_tab)
+ self.label_5.setObjectName(u"label_5")
+
+ self.verticalLayout_3.addWidget(self.label_5)
+
+ self.gridLayout = QGridLayout()
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.pushButton_8 = QPushButton(self.exemptions_tab)
+ self.pushButton_8.setObjectName(u"pushButton_8")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
+ sizePolicy1.setHorizontalStretch(0)
+ sizePolicy1.setVerticalStretch(0)
+ sizePolicy1.setHeightForWidth(self.pushButton_8.sizePolicy().hasHeightForWidth())
+ self.pushButton_8.setSizePolicy(sizePolicy1)
+
+ self.gridLayout.addWidget(self.pushButton_8, 0, 1, 1, 1)
+
+ self.listWidget_2 = QListWidget(self.exemptions_tab)
+ self.listWidget_2.setObjectName(u"listWidget_2")
+ sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Expanding)
+ sizePolicy2.setHorizontalStretch(0)
+ sizePolicy2.setVerticalStretch(0)
+ sizePolicy2.setHeightForWidth(self.listWidget_2.sizePolicy().hasHeightForWidth())
+ self.listWidget_2.setSizePolicy(sizePolicy2)
+
+ self.gridLayout.addWidget(self.listWidget_2, 0, 0, 1, 1)
+
+ self.lineEdit_3 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_3.setObjectName(u"lineEdit_3")
+
+ self.gridLayout.addWidget(self.lineEdit_3, 1, 0, 1, 1)
+
+ self.pushButton_7 = QPushButton(self.exemptions_tab)
+ self.pushButton_7.setObjectName(u"pushButton_7")
+ sizePolicy3 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
+ sizePolicy3.setHorizontalStretch(0)
+ sizePolicy3.setVerticalStretch(0)
+ sizePolicy3.setHeightForWidth(self.pushButton_7.sizePolicy().hasHeightForWidth())
+ self.pushButton_7.setSizePolicy(sizePolicy3)
+
+ self.gridLayout.addWidget(self.pushButton_7, 1, 1, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout)
+
+ self.tabWidget.addTab(self.exemptions_tab, "")
+ self.logging_tab = QWidget()
+ self.logging_tab.setObjectName(u"logging_tab")
+ self.verticalLayout_4 = QVBoxLayout(self.logging_tab)
+ self.verticalLayout_4.setObjectName(u"verticalLayout_4")
+ self.gridLayout_4 = QGridLayout()
+ self.gridLayout_4.setObjectName(u"gridLayout_4")
+ self.checkBox = QCheckBox(self.logging_tab)
+ self.checkBox.setObjectName(u"checkBox")
+
+ self.gridLayout_4.addWidget(self.checkBox, 0, 0, 1, 2)
+
+ self.label_3 = QLabel(self.logging_tab)
+ self.label_3.setObjectName(u"label_3")
+
+ self.gridLayout_4.addWidget(self.label_3, 1, 0, 1, 1)
+
+ self.lineEdit = QLineEdit(self.logging_tab)
+ self.lineEdit.setObjectName(u"lineEdit")
+
+ self.gridLayout_4.addWidget(self.lineEdit, 1, 1, 1, 1)
+
+ self.pushButton_2 = QPushButton(self.logging_tab)
+ self.pushButton_2.setObjectName(u"pushButton_2")
+
+ self.gridLayout_4.addWidget(self.pushButton_2, 1, 2, 1, 1)
+
+
+ self.verticalLayout_4.addLayout(self.gridLayout_4)
+
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
+
+ self.verticalLayout_4.addItem(self.verticalSpacer)
+
+ self.tabWidget.addTab(self.logging_tab, "")
+ self.tab_3 = QWidget()
+ self.tab_3.setObjectName(u"tab_3")
+ self.tabWidget.addTab(self.tab_3, "")
+ self.tab_4 = QWidget()
+ self.tab_4.setObjectName(u"tab_4")
+ self.webEngineView = QWebEngineView(self.tab_4)
+ self.webEngineView.setObjectName(u"webEngineView")
+ self.webEngineView.setGeometry(QRect(30, 150, 611, 461))
+ self.webEngineView.setUrl(QUrl(u"https://www.seznam.cz/"))
+ self.tabWidget.addTab(self.tab_4, "")
+
+ self.verticalLayout.addWidget(self.tabWidget)
+
+
+ self.verticalLayout_2.addLayout(self.verticalLayout)
+
+ self.horizontalLayout = QHBoxLayout()
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.pushButton_4 = QPushButton(Form)
+ self.pushButton_4.setObjectName(u"pushButton_4")
+
+ self.horizontalLayout.addWidget(self.pushButton_4)
+
+
+ self.verticalLayout_2.addLayout(self.horizontalLayout)
+
+
+ self.retranslateUi(Form)
+
+ self.tabWidget.setCurrentIndex(3)
+
+
+ QMetaObject.connectSlotsByName(Form)
+ # setupUi
+
+ def retranslateUi(self, Form):
+ Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
+ self.checkBox_2.setText(QCoreApplication.translate("Form", u"Skip Hidden Files", None))
+ self.label.setText(QCoreApplication.translate("Form", u"Sync Folder:", None))
+ self.pushButton.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.label_4.setText(QCoreApplication.translate("Form", u"Skip files:", None))
+ self.pushButton_6.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.pushButton_5.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.label_5.setText(QCoreApplication.translate("Form", u"Skip directories:", None))
+ self.pushButton_8.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.pushButton_7.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.exemptions_tab), QCoreApplication.translate("Form", u"Monitored Files", None))
+ self.checkBox.setText(QCoreApplication.translate("Form", u"Enable Logging", None))
+ self.label_3.setText(QCoreApplication.translate("Form", u"Log location:", None))
+ self.pushButton_2.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.logging_tab), QCoreApplication.translate("Form", u"Logging", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("Form", u"Page", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QCoreApplication.translate("Form", u"Page", None))
+ self.pushButton_4.setText(QCoreApplication.translate("Form", u"Save", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui/ui_settings_web.py b/src/__thrash/ui/ui_settings_web.py
new file mode 100644
index 0000000..8d75edd
--- /dev/null
+++ b/src/__thrash/ui/ui_settings_web.py
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'settingsHGXEPD.ui'
+##
+## Created by: Qt User Interface Compiler version 5.15.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import *
+from PySide6.QtGui import *
+from PySide6.QtWidgets import *
+
+from PySide6.QtWebEngineWidgets import QWebEngineView
+
+
+
+class Ui_Form(object):
+ def setupUi(self, Form):
+ if not Form.objectName():
+ Form.setObjectName(u"Form")
+ Form.resize(647, 732)
+ self.verticalLayout_2 = QVBoxLayout(Form)
+ self.verticalLayout_2.setObjectName(u"verticalLayout_2")
+ self.verticalLayout = QVBoxLayout()
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.tabWidget = QTabWidget(Form)
+ self.tabWidget.setObjectName(u"tabWidget")
+ self.exemptions_tab = QWidget()
+ self.exemptions_tab.setObjectName(u"exemptions_tab")
+ self.verticalLayout_3 = QVBoxLayout(self.exemptions_tab)
+ self.verticalLayout_3.setObjectName(u"verticalLayout_3")
+ self.gridLayout_3 = QGridLayout()
+ self.gridLayout_3.setObjectName(u"gridLayout_3")
+ self.checkBox_2 = QCheckBox(self.exemptions_tab)
+ self.checkBox_2.setObjectName(u"checkBox_2")
+
+ self.gridLayout_3.addWidget(self.checkBox_2, 1, 0, 1, 2)
+
+ self.label = QLabel(self.exemptions_tab)
+ self.label.setObjectName(u"label")
+
+ self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
+
+ self.lineEdit_4 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_4.setObjectName(u"lineEdit_4")
+
+ self.gridLayout_3.addWidget(self.lineEdit_4, 0, 1, 1, 1)
+
+ self.pushButton = QPushButton(self.exemptions_tab)
+ self.pushButton.setObjectName(u"pushButton")
+
+ self.gridLayout_3.addWidget(self.pushButton, 0, 2, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_3)
+
+ self.label_4 = QLabel(self.exemptions_tab)
+ self.label_4.setObjectName(u"label_4")
+
+ self.verticalLayout_3.addWidget(self.label_4)
+
+ self.gridLayout_2 = QGridLayout()
+ self.gridLayout_2.setObjectName(u"gridLayout_2")
+ self.lineEdit_2 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_2.setObjectName(u"lineEdit_2")
+
+ self.gridLayout_2.addWidget(self.lineEdit_2, 1, 0, 1, 1)
+
+ self.pushButton_6 = QPushButton(self.exemptions_tab)
+ self.pushButton_6.setObjectName(u"pushButton_6")
+
+ self.gridLayout_2.addWidget(self.pushButton_6, 1, 1, 1, 1)
+
+ self.pushButton_5 = QPushButton(self.exemptions_tab)
+ self.pushButton_5.setObjectName(u"pushButton_5")
+ sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.pushButton_5.sizePolicy().hasHeightForWidth())
+ self.pushButton_5.setSizePolicy(sizePolicy)
+
+ self.gridLayout_2.addWidget(self.pushButton_5, 0, 1, 1, 1)
+
+ self.listWidget = QListWidget(self.exemptions_tab)
+ self.listWidget.setObjectName(u"listWidget")
+
+ self.gridLayout_2.addWidget(self.listWidget, 0, 0, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout_2)
+
+ self.label_5 = QLabel(self.exemptions_tab)
+ self.label_5.setObjectName(u"label_5")
+
+ self.verticalLayout_3.addWidget(self.label_5)
+
+ self.gridLayout = QGridLayout()
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.pushButton_8 = QPushButton(self.exemptions_tab)
+ self.pushButton_8.setObjectName(u"pushButton_8")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Minimum)
+ sizePolicy1.setHorizontalStretch(0)
+ sizePolicy1.setVerticalStretch(0)
+ sizePolicy1.setHeightForWidth(self.pushButton_8.sizePolicy().hasHeightForWidth())
+ self.pushButton_8.setSizePolicy(sizePolicy1)
+
+ self.gridLayout.addWidget(self.pushButton_8, 0, 1, 1, 1)
+
+ self.listWidget_2 = QListWidget(self.exemptions_tab)
+ self.listWidget_2.setObjectName(u"listWidget_2")
+ sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Expanding)
+ sizePolicy2.setHorizontalStretch(0)
+ sizePolicy2.setVerticalStretch(0)
+ sizePolicy2.setHeightForWidth(self.listWidget_2.sizePolicy().hasHeightForWidth())
+ self.listWidget_2.setSizePolicy(sizePolicy2)
+
+ self.gridLayout.addWidget(self.listWidget_2, 0, 0, 1, 1)
+
+ self.lineEdit_3 = QLineEdit(self.exemptions_tab)
+ self.lineEdit_3.setObjectName(u"lineEdit_3")
+
+ self.gridLayout.addWidget(self.lineEdit_3, 1, 0, 1, 1)
+
+ self.pushButton_7 = QPushButton(self.exemptions_tab)
+ self.pushButton_7.setObjectName(u"pushButton_7")
+ sizePolicy3 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
+ sizePolicy3.setHorizontalStretch(0)
+ sizePolicy3.setVerticalStretch(0)
+ sizePolicy3.setHeightForWidth(self.pushButton_7.sizePolicy().hasHeightForWidth())
+ self.pushButton_7.setSizePolicy(sizePolicy3)
+
+ self.gridLayout.addWidget(self.pushButton_7, 1, 1, 1, 1)
+
+
+ self.verticalLayout_3.addLayout(self.gridLayout)
+
+ self.tabWidget.addTab(self.exemptions_tab, "")
+ self.logging_tab = QWidget()
+ self.logging_tab.setObjectName(u"logging_tab")
+ self.verticalLayout_4 = QVBoxLayout(self.logging_tab)
+ self.verticalLayout_4.setObjectName(u"verticalLayout_4")
+ self.gridLayout_4 = QGridLayout()
+ self.gridLayout_4.setObjectName(u"gridLayout_4")
+ self.checkBox = QCheckBox(self.logging_tab)
+ self.checkBox.setObjectName(u"checkBox")
+
+ self.gridLayout_4.addWidget(self.checkBox, 0, 0, 1, 2)
+
+ self.label_3 = QLabel(self.logging_tab)
+ self.label_3.setObjectName(u"label_3")
+
+ self.gridLayout_4.addWidget(self.label_3, 1, 0, 1, 1)
+
+ self.lineEdit = QLineEdit(self.logging_tab)
+ self.lineEdit.setObjectName(u"lineEdit")
+
+ self.gridLayout_4.addWidget(self.lineEdit, 1, 1, 1, 1)
+
+ self.pushButton_2 = QPushButton(self.logging_tab)
+ self.pushButton_2.setObjectName(u"pushButton_2")
+
+ self.gridLayout_4.addWidget(self.pushButton_2, 1, 2, 1, 1)
+
+
+ self.verticalLayout_4.addLayout(self.gridLayout_4)
+
+ self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
+
+ self.verticalLayout_4.addItem(self.verticalSpacer)
+
+ self.tabWidget.addTab(self.logging_tab, "")
+ self.tab_3 = QWidget()
+ self.tab_3.setObjectName(u"tab_3")
+ self.tabWidget.addTab(self.tab_3, "")
+ self.tab_4 = QWidget()
+ self.tab_4.setObjectName(u"tab_4")
+ self.webEngineView = QWebEngineView(self.tab_4)
+ self.webEngineView.setObjectName(u"webEngineView")
+ self.webEngineView.setGeometry(QRect(10, 40, 611, 501))
+ self.webEngineView.setUrl(QUrl(u"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite Files.ReadWrite.all Sites.Read.All Sites.ReadWrite.All offline_access&response_type=code&prompt=login&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient"))
+ self.tabWidget.addTab(self.tab_4, "")
+
+ self.verticalLayout.addWidget(self.tabWidget)
+
+
+ self.verticalLayout_2.addLayout(self.verticalLayout)
+
+ self.horizontalLayout = QHBoxLayout()
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.pushButton_4 = QPushButton(Form)
+ self.pushButton_4.setObjectName(u"pushButton_4")
+
+ self.horizontalLayout.addWidget(self.pushButton_4)
+
+
+ self.verticalLayout_2.addLayout(self.horizontalLayout)
+
+
+ self.retranslateUi(Form)
+
+ self.tabWidget.setCurrentIndex(3)
+
+
+ QMetaObject.connectSlotsByName(Form)
+ # setupUi
+
+ def retranslateUi(self, Form):
+ Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
+ self.checkBox_2.setText(QCoreApplication.translate("Form", u"Skip Hidden Files", None))
+ self.label.setText(QCoreApplication.translate("Form", u"Sync Folder:", None))
+ self.pushButton.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.label_4.setText(QCoreApplication.translate("Form", u"Skip files:", None))
+ self.pushButton_6.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.pushButton_5.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.label_5.setText(QCoreApplication.translate("Form", u"Skip directories:", None))
+ self.pushButton_8.setText(QCoreApplication.translate("Form", u"Remove", None))
+ self.pushButton_7.setText(QCoreApplication.translate("Form", u"Add", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.exemptions_tab), QCoreApplication.translate("Form", u"Monitored Files", None))
+ self.checkBox.setText(QCoreApplication.translate("Form", u"Enable Logging", None))
+ self.label_3.setText(QCoreApplication.translate("Form", u"Log location:", None))
+ self.pushButton_2.setText(QCoreApplication.translate("Form", u"Browse", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.logging_tab), QCoreApplication.translate("Form", u"Logging", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QCoreApplication.translate("Form", u"Page", None))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QCoreApplication.translate("Form", u"Page", None))
+ self.pushButton_4.setText(QCoreApplication.translate("Form", u"Save", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui_list_item_widget.py_ b/src/__thrash/ui_list_item_widget.py_
new file mode 100644
index 0000000..e2c4779
--- /dev/null
+++ b/src/__thrash/ui_list_item_widget.py_
@@ -0,0 +1,83 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'list_item_widget.ui'
+##
+## Created by: Qt User Interface Compiler version 6.2.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QGridLayout, QLabel, QProgressBar,
+ QSizePolicy, QToolButton, QWidget)
+
+class Ui_list_item_widget(object):
+ def setupUi(self, list_item_widget):
+ if not list_item_widget.objectName():
+ list_item_widget.setObjectName(u"list_item_widget")
+ list_item_widget.resize(426, 79)
+ list_item_widget.setMinimumSize(QSize(50, 60))
+ self.gridLayout = QGridLayout(list_item_widget)
+ self.gridLayout.setObjectName(u"gridLayout")
+ self.toolButton = QToolButton(list_item_widget)
+ self.toolButton.setObjectName(u"toolButton")
+ self.toolButton.setEnabled(True)
+ self.toolButton.setMinimumSize(QSize(40, 65))
+ self.toolButton.setAutoFillBackground(False)
+ icon = QIcon()
+ icon.addFile(u"../resources/images/icons8-clouds-48.png", QSize(), QIcon.Normal, QIcon.Off)
+ self.toolButton.setIcon(icon)
+ self.toolButton.setIconSize(QSize(50, 75))
+
+ self.gridLayout.addWidget(self.toolButton, 0, 0, 5, 1)
+
+ self.ls_label_file_name = QLabel(list_item_widget)
+ self.ls_label_file_name.setObjectName(u"ls_label_file_name")
+
+ self.gridLayout.addWidget(self.ls_label_file_name, 0, 1, 1, 1)
+
+ self.ls_label_task = QLabel(list_item_widget)
+ self.ls_label_task.setObjectName(u"ls_label_task")
+
+ self.gridLayout.addWidget(self.ls_label_task, 2, 1, 1, 1)
+
+ self.ls_label_dir = QLabel(list_item_widget)
+ self.ls_label_dir.setObjectName(u"ls_label_dir")
+
+ self.gridLayout.addWidget(self.ls_label_dir, 4, 1, 1, 1)
+
+ self.ls_label_status = QLabel(list_item_widget)
+ self.ls_label_status.setObjectName(u"ls_label_status")
+
+ self.gridLayout.addWidget(self.ls_label_status, 2, 2, 1, 1)
+
+ self.ls_progressBar = QProgressBar(list_item_widget)
+ self.ls_progressBar.setObjectName(u"ls_progressBar")
+ self.ls_progressBar.setMaximumSize(QSize(16777215, 5))
+ self.ls_progressBar.setValue(24)
+ self.ls_progressBar.setTextVisible(False)
+
+ self.gridLayout.addWidget(self.ls_progressBar, 1, 1, 1, 2)
+
+
+ self.retranslateUi(list_item_widget)
+
+ QMetaObject.connectSlotsByName(list_item_widget)
+ # setupUi
+
+ def retranslateUi(self, list_item_widget):
+ list_item_widget.setWindowTitle(QCoreApplication.translate("list_item_widget", u"Form", None))
+ self.toolButton.setText(QCoreApplication.translate("list_item_widget", u"...", None))
+ self.ls_label_file_name.setText(QCoreApplication.translate("list_item_widget", u"FileName", None))
+ self.ls_label_task.setText(QCoreApplication.translate("list_item_widget", u"Downloading/Uploading ", None))
+ self.ls_label_dir.setText(QCoreApplication.translate("list_item_widget", u"Uploaded to Downloads", None))
+ self.ls_label_status.setText(QCoreApplication.translate("list_item_widget", u"60KB of 100KB", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui_setup_wizard.py b/src/__thrash/ui_setup_wizard.py
new file mode 100644
index 0000000..92ac5ec
--- /dev/null
+++ b/src/__thrash/ui_setup_wizard.py
@@ -0,0 +1,150 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'setup_wizard.ui'
+##
+## Created by: Qt User Interface Compiler version 6.2.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QCheckBox, QLabel, QLineEdit,
+ QPushButton, QSizePolicy, QWidget, QWizard,
+ QWizardPage)
+
+class Ui_SetupWizard(object):
+ def setupUi(self, SetupWizard):
+ if not SetupWizard.objectName():
+ SetupWizard.setObjectName(u"SetupWizard")
+ SetupWizard.resize(640, 480)
+ SetupWizard.setMinimumSize(QSize(640, 480))
+ SetupWizard.setMaximumSize(QSize(640, 480))
+ SetupWizard.setWizardStyle(QWizard.ClassicStyle)
+ self.wizardPage_welcome = QWizardPage()
+ self.wizardPage_welcome.setObjectName(u"wizardPage_welcome")
+ self.label = QLabel(self.wizardPage_welcome)
+ self.label.setObjectName(u"label")
+ self.label.setGeometry(QRect(230, 80, 271, 18))
+ self.label_2 = QLabel(self.wizardPage_welcome)
+ self.label_2.setObjectName(u"label_2")
+ self.label_2.setGeometry(QRect(110, 200, 441, 20))
+ SetupWizard.setPage(1, self.wizardPage_welcome)
+ self.wizardPage_version_check = QWizardPage()
+ self.wizardPage_version_check.setObjectName(u"wizardPage_version_check")
+ self.label_3 = QLabel(self.wizardPage_version_check)
+ self.label_3.setObjectName(u"label_3")
+ self.label_3.setGeometry(QRect(20, 80, 171, 18))
+ self.label_4 = QLabel(self.wizardPage_version_check)
+ self.label_4.setObjectName(u"label_4")
+ self.label_4.setGeometry(QRect(200, 80, 211, 18))
+ self.label_5 = QLabel(self.wizardPage_version_check)
+ self.label_5.setObjectName(u"label_5")
+ self.label_5.setGeometry(QRect(10, 160, 531, 111))
+ SetupWizard.setPage(2, self.wizardPage_version_check)
+ self.wizardPage_create_import = QWizardPage()
+ self.wizardPage_create_import.setObjectName(u"wizardPage_create_import")
+ self.label_6 = QLabel(self.wizardPage_create_import)
+ self.label_6.setObjectName(u"label_6")
+ self.label_6.setGeometry(QRect(30, 70, 481, 18))
+ self.checkBox_create = QCheckBox(self.wizardPage_create_import)
+ self.checkBox_create.setObjectName(u"checkBox_create")
+ self.checkBox_create.setGeometry(QRect(30, 140, 171, 22))
+ self.checkBox_import = QCheckBox(self.wizardPage_create_import)
+ self.checkBox_import.setObjectName(u"checkBox_import")
+ self.checkBox_import.setGeometry(QRect(30, 180, 251, 22))
+ SetupWizard.setPage(3, self.wizardPage_create_import)
+ self.wizardPage_import = QWizardPage()
+ self.wizardPage_import.setObjectName(u"wizardPage_import")
+ self.label_7 = QLabel(self.wizardPage_import)
+ self.label_7.setObjectName(u"label_7")
+ self.label_7.setGeometry(QRect(30, 60, 291, 18))
+ self.label_profile_name = QLabel(self.wizardPage_import)
+ self.label_profile_name.setObjectName(u"label_profile_name")
+ self.label_profile_name.setGeometry(QRect(7, 166, 107, 32))
+#if QT_CONFIG(tooltip)
+ self.label_profile_name.setToolTip(u"")
+#endif // QT_CONFIG(tooltip)
+ self.label_profile_name.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
+ self.label_config_path = QLabel(self.wizardPage_import)
+ self.label_config_path.setObjectName(u"label_config_path")
+ self.label_config_path.setGeometry(QRect(7, 210, 107, 32))
+#if QT_CONFIG(tooltip)
+ self.label_config_path.setToolTip(u"")
+#endif // QT_CONFIG(tooltip)
+ self.label_config_path.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
+ self.lineEdit_profile_name = QLineEdit(self.wizardPage_import)
+ self.lineEdit_profile_name.setObjectName(u"lineEdit_profile_name")
+ self.lineEdit_profile_name.setGeometry(QRect(120, 166, 308, 32))
+ self.lineEdit_config_path = QLineEdit(self.wizardPage_import)
+ self.lineEdit_config_path.setObjectName(u"lineEdit_config_path")
+ self.lineEdit_config_path.setGeometry(QRect(120, 210, 308, 32))
+ self.pushButton_import = QPushButton(self.wizardPage_import)
+ self.pushButton_import.setObjectName(u"pushButton_import")
+ self.pushButton_import.setGeometry(QRect(120, 310, 391, 34))
+ SetupWizard.setPage(4, self.wizardPage_import)
+ self.wizardPage_create = QWizardPage()
+ self.wizardPage_create.setObjectName(u"wizardPage_create")
+ self.label_10 = QLabel(self.wizardPage_create)
+ self.label_10.setObjectName(u"label_10")
+ self.label_10.setGeometry(QRect(40, 70, 231, 18))
+ self.lineEdit_sync_dir = QLineEdit(self.wizardPage_create)
+ self.lineEdit_sync_dir.setObjectName(u"lineEdit_sync_dir")
+ self.lineEdit_sync_dir.setGeometry(QRect(145, 219, 249, 32))
+ self.lineEdit_new_profile_name = QLineEdit(self.wizardPage_create)
+ self.lineEdit_new_profile_name.setObjectName(u"lineEdit_new_profile_name")
+ self.lineEdit_new_profile_name.setGeometry(QRect(145, 180, 249, 32))
+ self.label_new_profile_name = QLabel(self.wizardPage_create)
+ self.label_new_profile_name.setObjectName(u"label_new_profile_name")
+ self.label_new_profile_name.setGeometry(QRect(30, 180, 109, 32))
+ self.label_sync_dir = QLabel(self.wizardPage_create)
+ self.label_sync_dir.setObjectName(u"label_sync_dir")
+ self.label_sync_dir.setGeometry(QRect(30, 219, 109, 32))
+ self.pushButton_create = QPushButton(self.wizardPage_create)
+ self.pushButton_create.setObjectName(u"pushButton_create")
+ self.pushButton_create.setGeometry(QRect(170, 340, 351, 34))
+ SetupWizard.setPage(5, self.wizardPage_create)
+ self.wizardPage_finish = QWizardPage()
+ self.wizardPage_finish.setObjectName(u"wizardPage_finish")
+ self.label_13 = QLabel(self.wizardPage_finish)
+ self.label_13.setObjectName(u"label_13")
+ self.label_13.setGeometry(QRect(20, 80, 591, 171))
+ self.label_13.setWordWrap(True)
+ SetupWizard.setPage(6, self.wizardPage_finish)
+
+ self.retranslateUi(SetupWizard)
+
+ QMetaObject.connectSlotsByName(SetupWizard)
+ # setupUi
+
+ def retranslateUi(self, SetupWizard):
+ SetupWizard.setWindowTitle(QCoreApplication.translate("SetupWizard", u"Wizard", None))
+ self.label.setText(QCoreApplication.translate("SetupWizard", u"Welcome to OneDriveGUI", None))
+ self.label_2.setText(QCoreApplication.translate("SetupWizard", u"This wizard will help you with initial OneDrive profile creation/import.", None))
+ self.label_3.setText(QCoreApplication.translate("SetupWizard", u"Installed OneDrive version:", None))
+ self.label_4.setText(QCoreApplication.translate("SetupWizard", u"Installed/Not Installed/ version", None))
+ self.label_5.setText(QCoreApplication.translate("SetupWizard", u"
OneDrive Client for Linux does not seem to be installed.
Please install it by following instructions for your distro.
", None))
+ self.label_6.setText(QCoreApplication.translate("SetupWizard", u"Would you like to create a new OneDrive profile or import existing one?", None))
+ self.checkBox_create.setText(QCoreApplication.translate("SetupWizard", u"Create new profile", None))
+ self.checkBox_import.setText(QCoreApplication.translate("SetupWizard", u"Import existing profile/config. ", None))
+ self.label_7.setText(QCoreApplication.translate("SetupWizard", u"Import existing profile/config", None))
+ self.label_profile_name.setText(QCoreApplication.translate("SetupWizard", u"Profile Name", None))
+ self.label_config_path.setText(QCoreApplication.translate("SetupWizard", u"Path to config file", None))
+ self.lineEdit_profile_name.setPlaceholderText(QCoreApplication.translate("SetupWizard", u"E.g. john@live.com", None))
+ self.lineEdit_config_path.setPlaceholderText(QCoreApplication.translate("SetupWizard", u"E.g. ~/.config/onedrive/config", None))
+ self.pushButton_import.setText(QCoreApplication.translate("SetupWizard", u"Import profile", None))
+ self.label_10.setText(QCoreApplication.translate("SetupWizard", u"Create new profile", None))
+ self.lineEdit_sync_dir.setPlaceholderText(QCoreApplication.translate("SetupWizard", u"E.g. ~/OneDrive_john@live.com/", None))
+ self.lineEdit_new_profile_name.setPlaceholderText(QCoreApplication.translate("SetupWizard", u"E.g. john@live.com", None))
+ self.label_new_profile_name.setText(QCoreApplication.translate("SetupWizard", u"New profile name", None))
+ self.label_sync_dir.setText(QCoreApplication.translate("SetupWizard", u"Sync directory", None))
+ self.pushButton_create.setText(QCoreApplication.translate("SetupWizard", u"Create new profile", None))
+ self.label_13.setText(QCoreApplication.translate("SetupWizard", u"Your OneDrive profile has been created.
You can adjust advanced profile options if needed. Once you are happy with the profile settings, start sync with OneDrive. You will be automatically presented with a OneDrive login page if you have not logged on previously.
", None))
+ # retranslateUi
+
diff --git a/src/__thrash/ui_wizardPage_welcome.py b/src/__thrash/ui_wizardPage_welcome.py
new file mode 100644
index 0000000..a4d9dab
--- /dev/null
+++ b/src/__thrash/ui_wizardPage_welcome.py
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'wizardPage_welcome.ui'
+##
+## Created by: Qt User Interface Compiler version 6.2.2
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QLabel, QSizePolicy, QWidget,
+ QWizardPage)
+
+class Ui_WizardPage(object):
+ def setupUi(self, WizardPage):
+ if not WizardPage.objectName():
+ WizardPage.setObjectName(u"WizardPage")
+ WizardPage.resize(628, 420)
+ self.label = QLabel(WizardPage)
+ self.label.setObjectName(u"label")
+ self.label.setGeometry(QRect(230, 160, 271, 18))
+ self.label_2 = QLabel(WizardPage)
+ self.label_2.setObjectName(u"label_2")
+ self.label_2.setGeometry(QRect(110, 280, 441, 20))
+
+ self.retranslateUi(WizardPage)
+
+ QMetaObject.connectSlotsByName(WizardPage)
+ # setupUi
+
+ def retranslateUi(self, WizardPage):
+ WizardPage.setWindowTitle(QCoreApplication.translate("WizardPage", u"WizardPage", None))
+ self.label.setText(QCoreApplication.translate("WizardPage", u"Welcome to OneDriveGUI", None))
+ self.label_2.setText(QCoreApplication.translate("WizardPage", u"This wizard will help you with initial OneDrive profile creation/import.", None))
+ # retranslateUi
+
diff --git a/src/__thrash/version2.py b/src/__thrash/version2.py
new file mode 100644
index 0000000..8472f7f
--- /dev/null
+++ b/src/__thrash/version2.py
@@ -0,0 +1,20 @@
+import sys
+from PySide6.QtWidgets import QApplication, QMainWindow
+from PySide6.QtCore import QFile
+from ui.ui_mainwindow import Ui_MainWindow
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+ self.ui = Ui_MainWindow()
+ self.ui.setupUi(self)
+
+ self.ui.label.setText("test text")
+
+if __name__ == "__main__":
+ app = QApplication(sys.argv)
+
+ window = MainWindow()
+ window.show()
+
+ sys.exit(app.exec())
\ No newline at end of file
diff --git a/src/__thrash/wizardPage_welcome.ui b/src/__thrash/wizardPage_welcome.ui
new file mode 100644
index 0000000..eed8899
--- /dev/null
+++ b/src/__thrash/wizardPage_welcome.ui
@@ -0,0 +1,45 @@
+
+
+ WizardPage
+
+
+
+ 0
+ 0
+ 628
+ 420
+
+
+
+ WizardPage
+
+
+
+
+ 230
+ 160
+ 271
+ 18
+
+
+
+ Welcome to OneDriveGUI
+
+
+
+
+
+ 110
+ 280
+ 441
+ 20
+
+
+
+ This wizard will help you with initial OneDrive profile creation/import.
+
+
+
+
+
+
diff --git a/src/__thrash/wizard_test.py b/src/__thrash/wizard_test.py
new file mode 100644
index 0000000..67c81d2
--- /dev/null
+++ b/src/__thrash/wizard_test.py
@@ -0,0 +1,81 @@
+from PySide6.QtGui import QPixmap, QIcon
+from PySide6.QtCore import Property, Qt
+from PySide6.QtWidgets import (
+ QWizard,
+ QGridLayout,
+ QLineEdit,
+ QWizardPage,
+ QLabel,
+ QVBoxLayout,
+ QComboBox,
+ QApplication,
+)
+
+
+class QIComboBox(QComboBox):
+ def __init__(self, parent=None):
+ super(QIComboBox, self).__init__(parent)
+
+
+class MagicWizard(QWizard):
+ def __init__(self, parent=None):
+ super(MagicWizard, self).__init__(parent)
+ self.addPage(WizardPage_welcome(self))
+ self.addPage(wizardPage_version_check(self))
+ self.setWindowTitle("OneDriveGUI Setup Wizard")
+ self.resize(640, 480)
+ self.setWindowIcon(QIcon("resources/images/icons8-clouds-48.png"))
+
+
+class WizardPage_welcome(QWizardPage):
+ def __init__(self, parent=None):
+ super(WizardPage_welcome, self).__init__(parent)
+ self.setTitle("Welcome to OneDriveGUI")
+ # self.setSubTitle("SubTitle")
+
+ # self.label1 = QLabel()
+ # self.label1.setText("Welcome to OneDriveGUI")
+
+ self.label_2 = QLabel()
+ self.label_2.setText("This wizard will help you with initial OneDrive profile creation/import.")
+
+ layout = QVBoxLayout()
+ # layout.addWidget(self.label1)
+ layout.addWidget(self.label_2)
+ self.setLayout(layout)
+
+
+class wizardPage_version_check(QWizardPage):
+ def __init__(self, parent=None):
+ super(wizardPage_version_check, self).__init__(parent)
+ self.setTitle("OneDrive version check")
+
+ # self.label_3 = QLabel()
+ # self.label_3.setText("Installed OneDrive version:")
+
+ self.label_4 = QLabel()
+ self.label_4.setText("Installed/Not Installed/ version")
+
+ self.label_5 = QLabel()
+ self.label_5.setWordWrap(True)
+ self.label_5.setText(
+ "OneDrive Client for Linux does not seem to be installed. Please install it by following " \
+ "instructions for your distro. "
+ )
+
+ layout = QVBoxLayout()
+ # layout.addWidget(self.label_3)
+ layout.addWidget(self.label_4)
+ layout.addWidget(self.label_5)
+ self.setLayout(layout)
+
+
+
+
+if __name__ == "__main__":
+ import sys
+
+ app = QApplication(sys.argv)
+ wizard = MagicWizard()
+ wizard.show()
+ sys.exit(app.exec_())
diff --git a/src/__thrash/wizard_test2.py b/src/__thrash/wizard_test2.py
new file mode 100644
index 0000000..4d8af46
--- /dev/null
+++ b/src/__thrash/wizard_test2.py
@@ -0,0 +1,95 @@
+from PySide6.QtCore import QImage
+from PySide6.QtGui import QImage, QPixmap
+from PySide6.QtCore import Property, QImage, QPixmap, Qt
+from PySide6.QtWidgets import QWizard, QGridLayout, QPixmap, QLineEdit, QWizardPage, QLabel, QVBoxLayout, QgsProjectionSelectionTreeWidget
+
+icon_path = '/home/nyall/nr_logo.png'
+
+class ProjectWizard(QWizard):
+
+ def __init__(self, parent=None):
+ super().__init__(parent)
+
+ self.addPage(Page1(self))
+ self.addPage(Page2(self))
+ self.setWindowTitle("New Project")
+
+ logo_image=QImage('path_to_logo.png')
+ self.setPixmap(QWizard.LogoPixmap, QPixmap.fromImage(logo_image))
+
+ self.setOption(QWizard.NoCancelButton, True)
+ self.setWindowFlags(self.windowFlags() | Qt.CustomizeWindowHint)
+ self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint)
+ def reject(self):
+ pass
+
+class Page1(QWizardPage):
+
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ self.setTitle('General Properties')
+ self.setSubTitle('Enter general properties for this project.')
+
+ # create some widgets
+ self.project_number_line_edit = QLineEdit()
+ self.project_title_line_edit = QLineEdit()
+ self.author_line_edit = QLineEdit()
+
+ # set the page layout
+ layout = QGridLayout()
+ layout.addWidget(QLabel('Project Number'),0,0)
+ layout.addWidget(self.project_number_line_edit,0,1)
+ layout.addWidget(QLabel('Title'),1,0)
+ layout.addWidget(self.project_title_line_edit,1,1)
+ layout.addWidget(QLabel('Author'),2,0)
+ layout.addWidget(self.author_line_edit,2,1)
+ self.setLayout(layout)
+
+ self.registerField('number*',self.project_number_line_edit)
+ self.registerField('title*',self.project_title_line_edit)
+ self.registerField('author*',self.author_line_edit)
+
+
+class Page2(QWizardPage):
+
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ self.setTitle('Project Coordinate System')
+ self.setSubTitle('Choosing an appropriate projection is important to ensure accurate distance and area measurements.')
+
+ self.proj_selector = QgsProjectionSelectionTreeWidget()
+ layout = QVBoxLayout()
+ layout.addWidget(self.proj_selector)
+ self.setLayout(layout)
+
+ self.registerField('crs',self.proj_selector)
+ self.proj_selector.crsSelected.connect(self.crs_selected)
+
+ def crs_selected(self):
+ self.setField('crs',self.proj_selector.crs())
+ self.completeChanged.emit()
+
+ def isComplete(self):
+ return self.proj_selector.crs().isValid()
+
+
+def runNewProjectWizard():
+ d=ProjectWizard()
+ d.exec()
+
+ # Set the project crs
+ crs=d.field('crs')
+ QgsProject.instance().setCrs(crs)
+
+ # Set the project title
+ title=d.field('title')
+ QgsProject.instance().setTitle(d.field('title'))
+
+ # Create expression variables for the author and project number
+ number=d.field('number')
+ QgsExpressionContextUtils.setProjectVariable(QgsProject.instance(),'project_number', number)
+ author=d.field('author')
+ QgsExpressionContextUtils.setProjectVariable(QgsProject.instance(),'project_author', author)
+
+
+iface.newProjectCreated.connect(runNewProjectWizard)
\ No newline at end of file