Merge branch 'feat/settings' into 'main'
feat: Added settings window See merge request CodeByMrFinchum/OptimaLab35!29
This commit is contained in:
commit
11acc94567
12 changed files with 938 additions and 434 deletions
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -1,5 +1,22 @@
|
|||
# Changelog
|
||||
|
||||
## 0.12.x
|
||||
### 0.12.0: New Settings Menu & Patches
|
||||
|
||||
- **New Settings Window:**
|
||||
- The updater window has been reworked into a settings window.
|
||||
- **Initial settings (first tab) include:**
|
||||
1. Option to change the theme (with an optional dependency installation).
|
||||
2. Reset selectable EXIF data to default.
|
||||
- The updater UI has been moved to the second tab.
|
||||
- Added a link to the changelog for easier access to update details.
|
||||
|
||||
- **Patches:**
|
||||
- Fixed an issue where links in labels (About window) did not open a browser.
|
||||
- Added a changelog link in the About window.
|
||||
- Minor changes to `utility.py` to handle settings.
|
||||
---
|
||||
|
||||
## 0.11.x
|
||||
### 0.11.1: Fixed pipeline
|
||||
- Fixed pipeline publish error
|
||||
|
|
|
@ -13,14 +13,14 @@ from optima35.core import OptimaManager
|
|||
from OptimaLab35.utils.utility import Utilities
|
||||
from OptimaLab35.ui.main_window import Ui_MainWindow
|
||||
from OptimaLab35.ui.preview_window import Ui_Preview_Window
|
||||
from OptimaLab35.ui.updater_window import Ui_Updater_Window
|
||||
from OptimaLab35.ui.settings_window import Ui_Settings_Window
|
||||
from OptimaLab35.ui.exif_handler_window import ExifEditor
|
||||
from OptimaLab35.ui.simple_dialog import SimpleDialog # Import the SimpleDialog class
|
||||
from OptimaLab35 import __version__
|
||||
|
||||
from PySide6.QtCore import QRunnable, QThreadPool, Signal, QObject, QRegularExpression, Qt, QTimer, Slot, QDir
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6 import QtWidgets, QtCore
|
||||
from PySide6.QtWidgets import (
|
||||
QMessageBox,
|
||||
QApplication,
|
||||
|
@ -45,8 +45,10 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
self.name = "OptimaLab35"
|
||||
self.version = __version__
|
||||
self.o = OptimaManager()
|
||||
self.u = Utilities()
|
||||
self.u.program_configs()
|
||||
self.u = Utilities(os.path.expanduser("~/.config/OptimaLab35"))
|
||||
self.app_settings = self.u.load_settings()
|
||||
print(self.app_settings)
|
||||
|
||||
self.thread_pool = QThreadPool() # multi thread ChatGPT
|
||||
# Initiate internal object
|
||||
self.exif_file = os.path.expanduser("~/.config/OptimaLab35/exif.yaml")
|
||||
|
@ -98,7 +100,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
|
||||
self.ui.actionAbout.triggered.connect(self.info_window)
|
||||
self.ui.preview_Button.clicked.connect(self.open_preview_window)
|
||||
self.ui.actionUpdate.triggered.connect(self.open_updater_window)
|
||||
self.ui.actionSettings.triggered.connect(self.open_updater_window)
|
||||
|
||||
regex = QRegularExpression(r"^\d{1,2}\.\d{1,6}$")
|
||||
validator = QRegularExpressionValidator(regex)
|
||||
|
@ -114,7 +116,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
self.preview_window.showMaximized()
|
||||
|
||||
def open_updater_window(self):
|
||||
self.updater_window = UpdaterWindow(self.version, self.o.version)
|
||||
self.updater_window = SettingsWindow(self.version, self.o.version)
|
||||
self.updater_window.show()
|
||||
|
||||
def update_values(self, value1, value2, checkbox_state):
|
||||
|
@ -140,6 +142,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
|
||||
<p>For more details, visit:</p>
|
||||
<ul>
|
||||
<li><a href="https://gitlab.com/CodeByMrFinchum/OptimaLab35/-/blob/main/CHANGELOG.md?ref_type=heads">Changelog</a></li>
|
||||
<li><a href="https://gitlab.com/CodeByMrFinchum/OptimaLab35">OptimaLab35 GitLab</a></li>
|
||||
<li><a href="https://gitlab.com/CodeByMrFinchum/optima35">optima35 GitLab</a></li>
|
||||
</ul>
|
||||
|
@ -486,14 +489,15 @@ class OptimaLab35(QMainWindow, Ui_MainWindow):
|
|||
QApplication.closeAllWindows()
|
||||
event.accept()
|
||||
|
||||
class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
||||
class SettingsWindow(QMainWindow, Ui_Settings_Window):
|
||||
# Mixture of code by me, code/functions refactored by ChatGPT and code directly from ChatGPT
|
||||
def __init__(self, optimalab35_localversion, optima35_localversion):
|
||||
super(UpdaterWindow, self).__init__()
|
||||
self.ui = Ui_Updater_Window()
|
||||
super(SettingsWindow, self).__init__()
|
||||
self.ui = Ui_Settings_Window()
|
||||
self.ui.setupUi(self)
|
||||
self.u = Utilities(os.path.expanduser("~/.config/OptimaLab35"))
|
||||
self.app_settings = self.u.load_settings()
|
||||
self.dev_mode = True if optimalab35_localversion == "0.0.1" else False
|
||||
#self.set_dev_ui()
|
||||
from PyPiUpdater import PyPiUpdater
|
||||
# Update log file location
|
||||
self.update_log_file = os.path.expanduser("~/.config/OptimaLab35/update_log.json")
|
||||
|
@ -512,25 +516,9 @@ class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
|||
|
||||
self.define_gui_interaction()
|
||||
|
||||
def start_long_press(self):
|
||||
"""Start the timer when button is pressed."""
|
||||
# brave AI
|
||||
self.timer.start(1000) # 1-second long press
|
||||
|
||||
def cancel_long_press(self):
|
||||
"""Cancel long press if released early."""
|
||||
# brave AI
|
||||
self.timer.stop()
|
||||
|
||||
def toggle_dev_ui(self):
|
||||
"""Show or hide the hidden UI when long press is detected."""
|
||||
self.ui.dev_widget.setVisible(True)
|
||||
|
||||
self.ui.check_local_Button.clicked.connect(self.local_check_for_updates)
|
||||
self.ui.update_local_Button.clicked.connect(self.local_update)
|
||||
|
||||
def define_gui_interaction(self):
|
||||
"""Setup UI interactions."""
|
||||
# Updater related
|
||||
self.ui.label_optimalab35_localversion.setText(self.optimalab35_localversion)
|
||||
self.ui.label_optima35_localversion.setText(self.optima35_localversion)
|
||||
|
||||
|
@ -554,6 +542,115 @@ class UpdaterWindow(QMainWindow, Ui_Updater_Window):
|
|||
# Connect button press/release
|
||||
self.ui.check_for_update_Button.pressed.connect(self.start_long_press)
|
||||
self.ui.check_for_update_Button.released.connect(self.cancel_long_press)
|
||||
self.ui.label_5.setText('<li><a href="https://gitlab.com/CodeByMrFinchum/OptimaLab35/-/blob/main/CHANGELOG.md?ref_type=heads">Changelog</a></li>')
|
||||
self.ui.label_5.setOpenExternalLinks(True)
|
||||
#settings related
|
||||
self.load_settings_into_ui()
|
||||
self.ui.reset_exif_Button.clicked.connect(self.ask_reset_exif)
|
||||
self.ui.save_and_close_Button.clicked.connect(self.save_and_close)
|
||||
self.ui.save_and_restart_Button.clicked.connect(self.save_and_restart)
|
||||
# setting related
|
||||
|
||||
def load_settings_into_ui(self):
|
||||
"""Loads the settings into the UI elements."""
|
||||
settings = self.app_settings
|
||||
theme_mode = settings["theme"]["mode"]
|
||||
use_custom_theme = settings["theme"]["use_custom_theme"]
|
||||
pkg_available = settings["theme"]["theme_pkg"]
|
||||
|
||||
if pkg_available:
|
||||
index = self.ui.theme_selection_comboBox.findText(theme_mode, QtCore.Qt.MatchFlag.MatchExactly)
|
||||
if index != -1:
|
||||
self.ui.theme_selection_comboBox.setCurrentIndex(index)
|
||||
self.ui.enable_theme_checkBox.setChecked(use_custom_theme)
|
||||
self.ui.install_pkg_Button.setVisible(False)
|
||||
self.ui.enable_theme_checkBox.setEnabled(True)
|
||||
else:
|
||||
self.ui.enable_theme_checkBox.setEnabled(False)
|
||||
self.ui.install_pkg_Button.clicked.connect(self.install_theme_pkg)
|
||||
|
||||
|
||||
def install_theme_pkg(self):
|
||||
a = self.ppu_ol35.install_package("PyQtDarkTheme-fork")
|
||||
self.ui.install_pkg_Button.setEnabled(False)
|
||||
self.ui.install_pkg_Button.setText("Please wait...")
|
||||
|
||||
msg_box = QMessageBox()
|
||||
msg_box.setIcon(QMessageBox.Information)
|
||||
msg_box.setWindowTitle("Message")
|
||||
msg_box.setText(a[1])
|
||||
msg_box.setStandardButtons(QMessageBox.Ok)
|
||||
msg_box.exec()
|
||||
if a[0]:
|
||||
print("before", self.app_settings)
|
||||
self.app_settings["theme"]["theme_pkg"] = True
|
||||
print("After:::", self.app_settings)
|
||||
self.load_settings_into_ui()
|
||||
else:
|
||||
self.ui.install_pkg_Button.setEnabled(True)
|
||||
self.ui.install_pkg_Button.setText("Try again?")
|
||||
|
||||
def save_settings(self):
|
||||
self.app_settings["theme"]["mode"] = self.ui.theme_selection_comboBox.currentText()
|
||||
self.app_settings["theme"]["use_custom_theme"] = self.ui.enable_theme_checkBox.isChecked()
|
||||
self.u.save_settings(self.app_settings)
|
||||
|
||||
def save_and_close(self):
|
||||
self.save_settings()
|
||||
self.close()
|
||||
|
||||
def save_and_restart(self):
|
||||
msg = QMessageBox()
|
||||
msg.setIcon(QMessageBox.Icon.Question)
|
||||
msg.setWindowTitle("Confirm Reset")
|
||||
msg.setText("Are you sure you want to restart the app?")
|
||||
msg.setStandardButtons(QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
|
||||
|
||||
# Show the message box and wait for the user's response
|
||||
response = msg.exec()
|
||||
|
||||
# Check response and perform action
|
||||
if response == QMessageBox.StandardButton.Yes:
|
||||
self.save_settings()
|
||||
self.restart_program()
|
||||
else:
|
||||
pass # Do nothing if "No" is selected
|
||||
|
||||
def ask_reset_exif(self):
|
||||
"""Shows a dialog to ask the user if they are sure about resetting EXIF options to default."""
|
||||
# Create a QMessageBox with a Yes/No question
|
||||
msg = QMessageBox()
|
||||
msg.setIcon(QMessageBox.Icon.Question)
|
||||
msg.setWindowTitle("Confirm Reset")
|
||||
msg.setText("Are you sure you want to reset the EXIF options to default?")
|
||||
msg.setStandardButtons(QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
|
||||
|
||||
# Show the message box and wait for the user's response
|
||||
response = msg.exec()
|
||||
|
||||
# Check response and perform action
|
||||
if response == QMessageBox.StandardButton.Yes:
|
||||
self.u.default_exif() # Reset EXIF options to default
|
||||
else:
|
||||
pass # Do nothing if "No" is selected
|
||||
|
||||
# update related parts
|
||||
def start_long_press(self):
|
||||
"""Start the timer when button is pressed."""
|
||||
# brave AI
|
||||
self.timer.start(1000) # 1-second long press
|
||||
|
||||
def cancel_long_press(self):
|
||||
"""Cancel long press if released early."""
|
||||
# brave AI
|
||||
self.timer.stop()
|
||||
|
||||
def toggle_dev_ui(self):
|
||||
"""Show or hide the hidden UI when long press is detected."""
|
||||
self.ui.dev_widget.setVisible(True)
|
||||
|
||||
self.ui.check_local_Button.clicked.connect(self.local_check_for_updates)
|
||||
self.ui.update_local_Button.clicked.connect(self.local_update)
|
||||
|
||||
def local_check_for_updates(self):
|
||||
dist_folder = os.path.expanduser("~/.config/OptimaLab35/dist/")
|
||||
|
@ -881,7 +978,21 @@ class ImageProcessorWorker(QRunnable):
|
|||
self.callback(None)
|
||||
|
||||
def main():
|
||||
u = Utilities(os.path.expanduser("~/.config/OptimaLab35"))
|
||||
app_settings = u.load_settings()
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
try:
|
||||
import qdarktheme
|
||||
app_settings["theme"]["theme_pkg"] = True
|
||||
except Exception:
|
||||
app_settings["theme"]["theme_pkg"] = False
|
||||
|
||||
if app_settings["theme"]["use_custom_theme"] and app_settings["theme"]["theme_pkg"]:
|
||||
app.setStyleSheet(qdarktheme.load_stylesheet(app_settings["theme"]["mode"].lower()))
|
||||
|
||||
u.save_settings(app_settings)
|
||||
del u
|
||||
window = OptimaLab35()
|
||||
window.show()
|
||||
app.exec()
|
||||
|
|
|
@ -37,8 +37,8 @@ class Ui_MainWindow(object):
|
|||
self.actionPreview.setObjectName(u"actionPreview")
|
||||
self.actionAbout = QAction(MainWindow)
|
||||
self.actionAbout.setObjectName(u"actionAbout")
|
||||
self.actionUpdate = QAction(MainWindow)
|
||||
self.actionUpdate.setObjectName(u"actionUpdate")
|
||||
self.actionSettings = QAction(MainWindow)
|
||||
self.actionSettings.setObjectName(u"actionSettings")
|
||||
self.centralwidget = QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
self.gridLayout = QGridLayout(self.centralwidget)
|
||||
|
@ -567,7 +567,7 @@ class Ui_MainWindow(object):
|
|||
self.menuBar.addAction(self.menuSettings.menuAction())
|
||||
self.menuBar.addAction(self.menuHelp.menuAction())
|
||||
self.menuHelp.addAction(self.actionAbout)
|
||||
self.menuSettings.addAction(self.actionUpdate)
|
||||
self.menuSettings.addAction(self.actionSettings)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.rename_checkbox.toggled.connect(self.filename.setEnabled)
|
||||
|
@ -605,7 +605,7 @@ class Ui_MainWindow(object):
|
|||
self.actionInfo.setText(QCoreApplication.translate("MainWindow", u"About", None))
|
||||
self.actionPreview.setText(QCoreApplication.translate("MainWindow", u"Preview image", None))
|
||||
self.actionAbout.setText(QCoreApplication.translate("MainWindow", u"About", None))
|
||||
self.actionUpdate.setText(QCoreApplication.translate("MainWindow", u"Update", None))
|
||||
self.actionSettings.setText(QCoreApplication.translate("MainWindow", u"Preferences...", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.input_folder_button.setToolTip(QCoreApplication.translate("MainWindow", u"Open a file browser to select a folder for loading images.", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
|
|
|
@ -928,7 +928,7 @@
|
|||
<property name="title">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<addaction name="actionUpdate"/>
|
||||
<addaction name="actionSettings"/>
|
||||
</widget>
|
||||
<addaction name="menuSettings"/>
|
||||
<addaction name="menuHelp"/>
|
||||
|
@ -948,9 +948,9 @@
|
|||
<string>About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionUpdate">
|
||||
<action name="actionSettings">
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
<string>Preferences...</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
|
306
src/OptimaLab35/ui/settings_window.py
Normal file
306
src/OptimaLab35/ui/settings_window.py
Normal file
|
@ -0,0 +1,306 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'settings_window.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.8.1
|
||||
##
|
||||
## 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, QComboBox, QGridLayout,
|
||||
QHBoxLayout, QLabel, QMainWindow, QPushButton,
|
||||
QSizePolicy, QSpacerItem, QTabWidget, QVBoxLayout,
|
||||
QWidget)
|
||||
|
||||
class Ui_Settings_Window(object):
|
||||
def setupUi(self, Settings_Window):
|
||||
if not Settings_Window.objectName():
|
||||
Settings_Window.setObjectName(u"Settings_Window")
|
||||
Settings_Window.setEnabled(True)
|
||||
Settings_Window.resize(400, 300)
|
||||
Settings_Window.setMinimumSize(QSize(400, 300))
|
||||
Settings_Window.setMaximumSize(QSize(500, 500))
|
||||
self.centralwidget = QWidget(Settings_Window)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
self.verticalLayout = QVBoxLayout(self.centralwidget)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.tabWidget = QTabWidget(self.centralwidget)
|
||||
self.tabWidget.setObjectName(u"tabWidget")
|
||||
self.tabWidgetPage1 = QWidget()
|
||||
self.tabWidgetPage1.setObjectName(u"tabWidgetPage1")
|
||||
self.verticalLayout_2 = QVBoxLayout(self.tabWidgetPage1)
|
||||
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
|
||||
self.widget_3 = QWidget(self.tabWidgetPage1)
|
||||
self.widget_3.setObjectName(u"widget_3")
|
||||
self.gridLayout_3 = QGridLayout(self.widget_3)
|
||||
self.gridLayout_3.setObjectName(u"gridLayout_3")
|
||||
self.label_3 = QLabel(self.widget_3)
|
||||
self.label_3.setObjectName(u"label_3")
|
||||
|
||||
self.gridLayout_3.addWidget(self.label_3, 0, 0, 1, 3)
|
||||
|
||||
self.theme_selection_comboBox = QComboBox(self.widget_3)
|
||||
self.theme_selection_comboBox.addItem("")
|
||||
self.theme_selection_comboBox.addItem("")
|
||||
self.theme_selection_comboBox.setObjectName(u"theme_selection_comboBox")
|
||||
self.theme_selection_comboBox.setEnabled(False)
|
||||
self.theme_selection_comboBox.setMinimumSize(QSize(100, 0))
|
||||
self.theme_selection_comboBox.setMaximumSize(QSize(100, 16777215))
|
||||
|
||||
self.gridLayout_3.addWidget(self.theme_selection_comboBox, 1, 2, 1, 1)
|
||||
|
||||
self.enable_theme_checkBox = QCheckBox(self.widget_3)
|
||||
self.enable_theme_checkBox.setObjectName(u"enable_theme_checkBox")
|
||||
self.enable_theme_checkBox.setChecked(False)
|
||||
|
||||
self.gridLayout_3.addWidget(self.enable_theme_checkBox, 1, 0, 1, 1)
|
||||
|
||||
self.horizontalSpacer_2 = QSpacerItem(98, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
||||
|
||||
self.gridLayout_3.addItem(self.horizontalSpacer_2, 1, 1, 1, 1)
|
||||
|
||||
self.install_pkg_Button = QPushButton(self.widget_3)
|
||||
self.install_pkg_Button.setObjectName(u"install_pkg_Button")
|
||||
|
||||
self.gridLayout_3.addWidget(self.install_pkg_Button, 2, 0, 1, 3)
|
||||
|
||||
|
||||
self.verticalLayout_2.addWidget(self.widget_3)
|
||||
|
||||
self.widget_4 = QWidget(self.tabWidgetPage1)
|
||||
self.widget_4.setObjectName(u"widget_4")
|
||||
self.horizontalLayout_3 = QHBoxLayout(self.widget_4)
|
||||
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
|
||||
self.label_4 = QLabel(self.widget_4)
|
||||
self.label_4.setObjectName(u"label_4")
|
||||
self.label_4.setWordWrap(True)
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.label_4)
|
||||
|
||||
self.reset_exif_Button = QPushButton(self.widget_4)
|
||||
self.reset_exif_Button.setObjectName(u"reset_exif_Button")
|
||||
self.reset_exif_Button.setMinimumSize(QSize(100, 0))
|
||||
self.reset_exif_Button.setMaximumSize(QSize(100, 16777215))
|
||||
|
||||
self.horizontalLayout_3.addWidget(self.reset_exif_Button)
|
||||
|
||||
|
||||
self.verticalLayout_2.addWidget(self.widget_4)
|
||||
|
||||
self.verticalSpacer = QSpacerItem(20, 237, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
|
||||
|
||||
self.verticalLayout_2.addItem(self.verticalSpacer)
|
||||
|
||||
self.widget_5 = QWidget(self.tabWidgetPage1)
|
||||
self.widget_5.setObjectName(u"widget_5")
|
||||
self.horizontalLayout_4 = QHBoxLayout(self.widget_5)
|
||||
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
|
||||
self.save_and_close_Button = QPushButton(self.widget_5)
|
||||
self.save_and_close_Button.setObjectName(u"save_and_close_Button")
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.save_and_close_Button)
|
||||
|
||||
self.save_and_restart_Button = QPushButton(self.widget_5)
|
||||
self.save_and_restart_Button.setObjectName(u"save_and_restart_Button")
|
||||
|
||||
self.horizontalLayout_4.addWidget(self.save_and_restart_Button)
|
||||
|
||||
|
||||
self.verticalLayout_2.addWidget(self.widget_5)
|
||||
|
||||
self.tabWidget.addTab(self.tabWidgetPage1, "")
|
||||
self.tabWidgetPage2 = QWidget()
|
||||
self.tabWidgetPage2.setObjectName(u"tabWidgetPage2")
|
||||
self.verticalLayout_3 = QVBoxLayout(self.tabWidgetPage2)
|
||||
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
|
||||
self.widget_6 = QWidget(self.tabWidgetPage2)
|
||||
self.widget_6.setObjectName(u"widget_6")
|
||||
self.label_last_check = QLabel(self.widget_6)
|
||||
self.label_last_check.setObjectName(u"label_last_check")
|
||||
self.label_last_check.setGeometry(QRect(0, 10, 131, 22))
|
||||
self.label_last_check_2 = QLabel(self.widget_6)
|
||||
self.label_last_check_2.setObjectName(u"label_last_check_2")
|
||||
self.label_last_check_2.setEnabled(True)
|
||||
self.label_last_check_2.setGeometry(QRect(190, 10, 67, 22))
|
||||
self.label_last_check_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.verticalLayout_3.addWidget(self.widget_6)
|
||||
|
||||
self.widget_2 = QWidget(self.tabWidgetPage2)
|
||||
self.widget_2.setObjectName(u"widget_2")
|
||||
self.gridLayout = QGridLayout(self.widget_2)
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.label_optima35_latestversion = QLabel(self.widget_2)
|
||||
self.label_optima35_latestversion.setObjectName(u"label_optima35_latestversion")
|
||||
self.label_optima35_latestversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optima35_latestversion, 2, 2, 1, 1)
|
||||
|
||||
self.label_latest_version = QLabel(self.widget_2)
|
||||
self.label_latest_version.setObjectName(u"label_latest_version")
|
||||
self.label_latest_version.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_latest_version, 0, 2, 1, 1)
|
||||
|
||||
self.label = QLabel(self.widget_2)
|
||||
self.label.setObjectName(u"label")
|
||||
|
||||
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
||||
|
||||
self.label_optimalab35_latestversion = QLabel(self.widget_2)
|
||||
self.label_optimalab35_latestversion.setObjectName(u"label_optimalab35_latestversion")
|
||||
self.label_optimalab35_latestversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optimalab35_latestversion, 1, 2, 1, 1)
|
||||
|
||||
self.label_9 = QLabel(self.widget_2)
|
||||
self.label_9.setObjectName(u"label_9")
|
||||
|
||||
self.gridLayout.addWidget(self.label_9, 0, 0, 1, 1)
|
||||
|
||||
self.label_optimalab35_localversion = QLabel(self.widget_2)
|
||||
self.label_optimalab35_localversion.setObjectName(u"label_optimalab35_localversion")
|
||||
self.label_optimalab35_localversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optimalab35_localversion, 1, 1, 1, 1)
|
||||
|
||||
self.label_6 = QLabel(self.widget_2)
|
||||
self.label_6.setObjectName(u"label_6")
|
||||
self.label_6.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_6, 0, 1, 1, 1)
|
||||
|
||||
self.label_2 = QLabel(self.widget_2)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
|
||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||
|
||||
self.label_optima35_localversion = QLabel(self.widget_2)
|
||||
self.label_optima35_localversion.setObjectName(u"label_optima35_localversion")
|
||||
self.label_optima35_localversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optima35_localversion, 2, 1, 1, 1)
|
||||
|
||||
|
||||
self.verticalLayout_3.addWidget(self.widget_2)
|
||||
|
||||
self.dev_widget = QWidget(self.tabWidgetPage2)
|
||||
self.dev_widget.setObjectName(u"dev_widget")
|
||||
self.horizontalLayout_2 = QHBoxLayout(self.dev_widget)
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.check_local_Button = QPushButton(self.dev_widget)
|
||||
self.check_local_Button.setObjectName(u"check_local_Button")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.check_local_Button)
|
||||
|
||||
self.update_local_Button = QPushButton(self.dev_widget)
|
||||
self.update_local_Button.setObjectName(u"update_local_Button")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.update_local_Button)
|
||||
|
||||
|
||||
self.verticalLayout_3.addWidget(self.dev_widget)
|
||||
|
||||
self.verticalSpacer_2 = QSpacerItem(20, 9, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
|
||||
|
||||
self.verticalLayout_3.addItem(self.verticalSpacer_2)
|
||||
|
||||
self.label_5 = QLabel(self.tabWidgetPage2)
|
||||
self.label_5.setObjectName(u"label_5")
|
||||
|
||||
self.verticalLayout_3.addWidget(self.label_5)
|
||||
|
||||
self.widget = QWidget(self.tabWidgetPage2)
|
||||
self.widget.setObjectName(u"widget")
|
||||
self.horizontalLayout = QHBoxLayout(self.widget)
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.check_for_update_Button = QPushButton(self.widget)
|
||||
self.check_for_update_Button.setObjectName(u"check_for_update_Button")
|
||||
|
||||
self.horizontalLayout.addWidget(self.check_for_update_Button)
|
||||
|
||||
self.update_and_restart_Button = QPushButton(self.widget)
|
||||
self.update_and_restart_Button.setObjectName(u"update_and_restart_Button")
|
||||
|
||||
self.horizontalLayout.addWidget(self.update_and_restart_Button)
|
||||
|
||||
self.restart_checkBox = QCheckBox(self.widget)
|
||||
self.restart_checkBox.setObjectName(u"restart_checkBox")
|
||||
self.restart_checkBox.setChecked(True)
|
||||
|
||||
self.horizontalLayout.addWidget(self.restart_checkBox)
|
||||
|
||||
|
||||
self.verticalLayout_3.addWidget(self.widget)
|
||||
|
||||
self.tabWidget.addTab(self.tabWidgetPage2, "")
|
||||
|
||||
self.verticalLayout.addWidget(self.tabWidget)
|
||||
|
||||
Settings_Window.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(Settings_Window)
|
||||
self.enable_theme_checkBox.toggled.connect(self.theme_selection_comboBox.setEnabled)
|
||||
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(Settings_Window)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, Settings_Window):
|
||||
Settings_Window.setWindowTitle(QCoreApplication.translate("Settings_Window", u"Settings", None))
|
||||
self.label_3.setText(QCoreApplication.translate("Settings_Window", u"Change theme from OS to PyQT Dark or Light", None))
|
||||
self.theme_selection_comboBox.setItemText(0, QCoreApplication.translate("Settings_Window", u"Dark", None))
|
||||
self.theme_selection_comboBox.setItemText(1, QCoreApplication.translate("Settings_Window", u"Light", None))
|
||||
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.theme_selection_comboBox.setToolTip(QCoreApplication.translate("Settings_Window", u"App needs to restart before changes take effect.", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.enable_theme_checkBox.setToolTip(QCoreApplication.translate("Settings_Window", u"App needs to restart before changes take effect.", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.enable_theme_checkBox.setText(QCoreApplication.translate("Settings_Window", u"Custom theme", None))
|
||||
self.install_pkg_Button.setText(QCoreApplication.translate("Settings_Window", u"Install package for custom theme", None))
|
||||
self.label_4.setText(QCoreApplication.translate("Settings_Window", u"Reset selectable EXIF data to default", None))
|
||||
self.reset_exif_Button.setText(QCoreApplication.translate("Settings_Window", u"Reset", None))
|
||||
self.save_and_close_Button.setText(QCoreApplication.translate("Settings_Window", u"Save and close", None))
|
||||
self.save_and_restart_Button.setText(QCoreApplication.translate("Settings_Window", u"Save and restart", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabWidgetPage1), QCoreApplication.translate("Settings_Window", u"Preferences", None))
|
||||
self.label_last_check.setText(QCoreApplication.translate("Settings_Window", u"Last update check:", None))
|
||||
self.label_last_check_2.setText(QCoreApplication.translate("Settings_Window", u"TextLabel", None))
|
||||
self.label_optima35_latestversion.setText(QCoreApplication.translate("Settings_Window", u"unknown", None))
|
||||
self.label_latest_version.setText(QCoreApplication.translate("Settings_Window", u"Latest version", None))
|
||||
self.label.setText(QCoreApplication.translate("Settings_Window", u"OptimaLab35", None))
|
||||
self.label_optimalab35_latestversion.setText(QCoreApplication.translate("Settings_Window", u"unknown", None))
|
||||
self.label_9.setText(QCoreApplication.translate("Settings_Window", u"Package", None))
|
||||
self.label_optimalab35_localversion.setText(QCoreApplication.translate("Settings_Window", u"0.0.0", None))
|
||||
self.label_6.setText(QCoreApplication.translate("Settings_Window", u"Local Version", None))
|
||||
self.label_2.setText(QCoreApplication.translate("Settings_Window", u"optima35", None))
|
||||
self.label_optima35_localversion.setText(QCoreApplication.translate("Settings_Window", u"0.0.0", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.check_local_Button.setToolTip(QCoreApplication.translate("Settings_Window", u"FOR DEVELOPER", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.check_local_Button.setText(QCoreApplication.translate("Settings_Window", u"Check local", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.update_local_Button.setToolTip(QCoreApplication.translate("Settings_Window", u"FOR DEVELOPER", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.update_local_Button.setText(QCoreApplication.translate("Settings_Window", u"Update local", None))
|
||||
self.label_5.setText(QCoreApplication.translate("Settings_Window", u"TextLabel", None))
|
||||
self.check_for_update_Button.setText(QCoreApplication.translate("Settings_Window", u"Check for update", None))
|
||||
self.update_and_restart_Button.setText(QCoreApplication.translate("Settings_Window", u"Update", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.restart_checkBox.setToolTip(QCoreApplication.translate("Settings_Window", u"Restarts the app after update.", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.restart_checkBox.setText(QCoreApplication.translate("Settings_Window", u"Restart", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabWidgetPage2), QCoreApplication.translate("Settings_Window", u"Updater", None))
|
||||
# retranslateUi
|
||||
|
424
src/OptimaLab35/ui/settings_window.ui
Normal file
424
src/OptimaLab35/ui/settings_window.ui
Normal file
|
@ -0,0 +1,424 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Settings_Window</class>
|
||||
<widget class="QMainWindow" name="Settings_Window">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabWidgetPage1" native="true">
|
||||
<attribute name="title">
|
||||
<string>Preferences</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Change theme from OS to PyQT Dark or Light</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="theme_selection_comboBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>App needs to restart before changes take effect.</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dark</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Light</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="enable_theme_checkBox">
|
||||
<property name="toolTip">
|
||||
<string>App needs to restart before changes take effect.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Custom theme</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>98</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QPushButton" name="install_pkg_Button">
|
||||
<property name="text">
|
||||
<string>Install package for custom theme</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_4" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Reset selectable EXIF data to default</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="reset_exif_Button">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>237</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_5" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="save_and_close_Button">
|
||||
<property name="text">
|
||||
<string>Save and close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="save_and_restart_Button">
|
||||
<property name="text">
|
||||
<string>Save and restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabWidgetPage2" native="true">
|
||||
<attribute name="title">
|
||||
<string>Updater</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_6" native="true">
|
||||
<widget class="QLabel" name="label_last_check">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>10</y>
|
||||
<width>131</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Last update check:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_last_check_2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>10</y>
|
||||
<width>67</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_optima35_latestversion">
|
||||
<property name="text">
|
||||
<string>unknown</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_latest_version">
|
||||
<property name="text">
|
||||
<string>Latest version</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>OptimaLab35</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_optimalab35_latestversion">
|
||||
<property name="text">
|
||||
<string>unknown</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Package</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_optimalab35_localversion">
|
||||
<property name="text">
|
||||
<string>0.0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Local Version</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>optima35</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_optima35_localversion">
|
||||
<property name="text">
|
||||
<string>0.0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="dev_widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="check_local_Button">
|
||||
<property name="toolTip">
|
||||
<string>FOR DEVELOPER</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check local</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="update_local_Button">
|
||||
<property name="toolTip">
|
||||
<string>FOR DEVELOPER</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Update local</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>9</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="check_for_update_Button">
|
||||
<property name="text">
|
||||
<string>Check for update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="update_and_restart_Button">
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="restart_checkBox">
|
||||
<property name="toolTip">
|
||||
<string>Restarts the app after update.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restart</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>enable_theme_checkBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>theme_selection_comboBox</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>112</x>
|
||||
<y>103</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>103</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -17,6 +17,7 @@ class SimpleDialog(QDialog):
|
|||
self.message_label.setWordWrap(True) # Enable word wrapping
|
||||
self.message_label.setAlignment(Qt.AlignLeft | Qt.AlignTop) # Align text
|
||||
self.message_label.setMaximumWidth(400) # Set max width so it wraps text
|
||||
self.message_label.setOpenExternalLinks(True)
|
||||
|
||||
# Create the close button
|
||||
close_button = QPushButton("Close", self)
|
||||
|
|
|
@ -1,179 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'updater_window.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.8.1
|
||||
##
|
||||
## 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, QMainWindow, QPushButton, QSizePolicy,
|
||||
QWidget)
|
||||
|
||||
class Ui_Updater_Window(object):
|
||||
def setupUi(self, Updater_Window):
|
||||
if not Updater_Window.objectName():
|
||||
Updater_Window.setObjectName(u"Updater_Window")
|
||||
Updater_Window.setEnabled(True)
|
||||
Updater_Window.resize(340, 200)
|
||||
Updater_Window.setMinimumSize(QSize(336, 200))
|
||||
Updater_Window.setMaximumSize(QSize(340, 300))
|
||||
self.centralwidget = QWidget(Updater_Window)
|
||||
self.centralwidget.setObjectName(u"centralwidget")
|
||||
self.gridLayout_2 = QGridLayout(self.centralwidget)
|
||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||
self.widget_2 = QWidget(self.centralwidget)
|
||||
self.widget_2.setObjectName(u"widget_2")
|
||||
self.gridLayout = QGridLayout(self.widget_2)
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.label = QLabel(self.widget_2)
|
||||
self.label.setObjectName(u"label")
|
||||
|
||||
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
||||
|
||||
self.label_optima35_localversion = QLabel(self.widget_2)
|
||||
self.label_optima35_localversion.setObjectName(u"label_optima35_localversion")
|
||||
self.label_optima35_localversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optima35_localversion, 2, 1, 1, 1)
|
||||
|
||||
self.label_9 = QLabel(self.widget_2)
|
||||
self.label_9.setObjectName(u"label_9")
|
||||
|
||||
self.gridLayout.addWidget(self.label_9, 0, 0, 1, 1)
|
||||
|
||||
self.label_optima35_latestversion = QLabel(self.widget_2)
|
||||
self.label_optima35_latestversion.setObjectName(u"label_optima35_latestversion")
|
||||
self.label_optima35_latestversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optima35_latestversion, 2, 2, 1, 1)
|
||||
|
||||
self.label_optimalab35_localversion = QLabel(self.widget_2)
|
||||
self.label_optimalab35_localversion.setObjectName(u"label_optimalab35_localversion")
|
||||
self.label_optimalab35_localversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optimalab35_localversion, 1, 1, 1, 1)
|
||||
|
||||
self.label_6 = QLabel(self.widget_2)
|
||||
self.label_6.setObjectName(u"label_6")
|
||||
self.label_6.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_6, 0, 1, 1, 1)
|
||||
|
||||
self.label_optimalab35_latestversion = QLabel(self.widget_2)
|
||||
self.label_optimalab35_latestversion.setObjectName(u"label_optimalab35_latestversion")
|
||||
self.label_optimalab35_latestversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_optimalab35_latestversion, 1, 2, 1, 1)
|
||||
|
||||
self.label_latest_version = QLabel(self.widget_2)
|
||||
self.label_latest_version.setObjectName(u"label_latest_version")
|
||||
self.label_latest_version.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout.addWidget(self.label_latest_version, 0, 2, 1, 1)
|
||||
|
||||
self.label_2 = QLabel(self.widget_2)
|
||||
self.label_2.setObjectName(u"label_2")
|
||||
|
||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
||||
|
||||
|
||||
self.gridLayout_2.addWidget(self.widget_2, 1, 0, 1, 2)
|
||||
|
||||
self.widget = QWidget(self.centralwidget)
|
||||
self.widget.setObjectName(u"widget")
|
||||
self.horizontalLayout = QHBoxLayout(self.widget)
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.check_for_update_Button = QPushButton(self.widget)
|
||||
self.check_for_update_Button.setObjectName(u"check_for_update_Button")
|
||||
|
||||
self.horizontalLayout.addWidget(self.check_for_update_Button)
|
||||
|
||||
self.update_and_restart_Button = QPushButton(self.widget)
|
||||
self.update_and_restart_Button.setObjectName(u"update_and_restart_Button")
|
||||
|
||||
self.horizontalLayout.addWidget(self.update_and_restart_Button)
|
||||
|
||||
self.restart_checkBox = QCheckBox(self.widget)
|
||||
self.restart_checkBox.setObjectName(u"restart_checkBox")
|
||||
self.restart_checkBox.setChecked(True)
|
||||
|
||||
self.horizontalLayout.addWidget(self.restart_checkBox)
|
||||
|
||||
|
||||
self.gridLayout_2.addWidget(self.widget, 2, 0, 1, 2)
|
||||
|
||||
self.label_last_check = QLabel(self.centralwidget)
|
||||
self.label_last_check.setObjectName(u"label_last_check")
|
||||
|
||||
self.gridLayout_2.addWidget(self.label_last_check, 0, 0, 1, 1)
|
||||
|
||||
self.label_last_check_2 = QLabel(self.centralwidget)
|
||||
self.label_last_check_2.setObjectName(u"label_last_check_2")
|
||||
self.label_last_check_2.setEnabled(True)
|
||||
self.label_last_check_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
|
||||
|
||||
self.gridLayout_2.addWidget(self.label_last_check_2, 0, 1, 1, 1)
|
||||
|
||||
self.dev_widget = QWidget(self.centralwidget)
|
||||
self.dev_widget.setObjectName(u"dev_widget")
|
||||
self.horizontalLayout_2 = QHBoxLayout(self.dev_widget)
|
||||
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
|
||||
self.check_local_Button = QPushButton(self.dev_widget)
|
||||
self.check_local_Button.setObjectName(u"check_local_Button")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.check_local_Button)
|
||||
|
||||
self.update_local_Button = QPushButton(self.dev_widget)
|
||||
self.update_local_Button.setObjectName(u"update_local_Button")
|
||||
|
||||
self.horizontalLayout_2.addWidget(self.update_local_Button)
|
||||
|
||||
|
||||
self.gridLayout_2.addWidget(self.dev_widget, 3, 0, 1, 2)
|
||||
|
||||
Updater_Window.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(Updater_Window)
|
||||
|
||||
QMetaObject.connectSlotsByName(Updater_Window)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, Updater_Window):
|
||||
Updater_Window.setWindowTitle(QCoreApplication.translate("Updater_Window", u"Updater", None))
|
||||
self.label.setText(QCoreApplication.translate("Updater_Window", u"OptimaLab35", None))
|
||||
self.label_optima35_localversion.setText(QCoreApplication.translate("Updater_Window", u"0.0.0", None))
|
||||
self.label_9.setText(QCoreApplication.translate("Updater_Window", u"Package", None))
|
||||
self.label_optima35_latestversion.setText(QCoreApplication.translate("Updater_Window", u"unknown", None))
|
||||
self.label_optimalab35_localversion.setText(QCoreApplication.translate("Updater_Window", u"0.0.0", None))
|
||||
self.label_6.setText(QCoreApplication.translate("Updater_Window", u"Local Version", None))
|
||||
self.label_optimalab35_latestversion.setText(QCoreApplication.translate("Updater_Window", u"unknown", None))
|
||||
self.label_latest_version.setText(QCoreApplication.translate("Updater_Window", u"Latest version", None))
|
||||
self.label_2.setText(QCoreApplication.translate("Updater_Window", u"optima35", None))
|
||||
self.check_for_update_Button.setText(QCoreApplication.translate("Updater_Window", u"Check for update", None))
|
||||
self.update_and_restart_Button.setText(QCoreApplication.translate("Updater_Window", u"Update", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.restart_checkBox.setToolTip(QCoreApplication.translate("Updater_Window", u"Restarts the app after update.", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.restart_checkBox.setText(QCoreApplication.translate("Updater_Window", u"Restart", None))
|
||||
self.label_last_check.setText(QCoreApplication.translate("Updater_Window", u"Last update check:", None))
|
||||
self.label_last_check_2.setText(QCoreApplication.translate("Updater_Window", u"TextLabel", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.check_local_Button.setToolTip(QCoreApplication.translate("Updater_Window", u"FOR DEVELOPER", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.check_local_Button.setText(QCoreApplication.translate("Updater_Window", u"Check local", None))
|
||||
#if QT_CONFIG(tooltip)
|
||||
self.update_local_Button.setToolTip(QCoreApplication.translate("Updater_Window", u"FOR DEVELOPER", None))
|
||||
#endif // QT_CONFIG(tooltip)
|
||||
self.update_local_Button.setText(QCoreApplication.translate("Updater_Window", u"Update local", None))
|
||||
# retranslateUi
|
||||
|
|
@ -1,204 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Updater_Window</class>
|
||||
<widget class="QMainWindow" name="Updater_Window">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>340</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>336</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>340</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Updater</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>OptimaLab35</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_optima35_localversion">
|
||||
<property name="text">
|
||||
<string>0.0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Package</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_optima35_latestversion">
|
||||
<property name="text">
|
||||
<string>unknown</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_optimalab35_localversion">
|
||||
<property name="text">
|
||||
<string>0.0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Local Version</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_optimalab35_latestversion">
|
||||
<property name="text">
|
||||
<string>unknown</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_latest_version">
|
||||
<property name="text">
|
||||
<string>Latest version</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>optima35</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="check_for_update_Button">
|
||||
<property name="text">
|
||||
<string>Check for update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="update_and_restart_Button">
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="restart_checkBox">
|
||||
<property name="toolTip">
|
||||
<string>Restarts the app after update.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restart</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_last_check">
|
||||
<property name="text">
|
||||
<string>Last update check:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_last_check_2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QWidget" name="dev_widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="check_local_Button">
|
||||
<property name="toolTip">
|
||||
<string>FOR DEVELOPER</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check local</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="update_local_Button">
|
||||
<property name="toolTip">
|
||||
<string>FOR DEVELOPER</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Update local</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -2,8 +2,12 @@ import yaml
|
|||
import os
|
||||
|
||||
class Utilities:
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self, app_folder_path):
|
||||
self.folder_path = app_folder_path
|
||||
self._ensure_program_folder_exists()
|
||||
self.exif_path = os.path.expanduser(f"{app_folder_path}/exif.yaml")
|
||||
self.settings_path = os.path.expanduser(f"{app_folder_path}/settings.yaml")
|
||||
self._prepear_exif_config()
|
||||
|
||||
def read_yaml(self, yaml_file):
|
||||
try:
|
||||
|
@ -12,29 +16,38 @@ class Utilities:
|
|||
return data
|
||||
except (FileNotFoundError, PermissionError) as e:
|
||||
print(f"Error loading settings file: {e}")
|
||||
return
|
||||
return None
|
||||
|
||||
def write_yaml(self, yaml_file, data):
|
||||
try:
|
||||
with open(yaml_file, "w") as file:
|
||||
yaml.dump(data, file)
|
||||
return True
|
||||
except PermissionError as e:
|
||||
print(f"Error saving setings: {e}")
|
||||
return False
|
||||
|
||||
def program_configs(self):
|
||||
def _prepear_exif_config(self):
|
||||
"""Prepear folder for config and generate default exif if non aviable"""
|
||||
program_folder = self._ensure_program_folder_exists()
|
||||
if not os.path.isfile(f"{program_folder}/exif.yaml"):
|
||||
self._default_exif(f"{program_folder}/exif.yaml")
|
||||
if not os.path.isfile(self.exif_path):
|
||||
self.default_exif(self.exif_path)
|
||||
|
||||
def _ensure_program_folder_exists(self):
|
||||
program_folder = os.path.expanduser("~/.config/OptimaLab35")
|
||||
if not os.path.exists(program_folder):
|
||||
print("in not, make folder")
|
||||
os.makedirs(program_folder)
|
||||
return program_folder
|
||||
if not os.path.exists(self.folder_path):
|
||||
os.makedirs(self.folder_path)
|
||||
|
||||
def _default_exif(self, file):
|
||||
def load_settings(self):
|
||||
"""Loads settings from file, or creates default settings if missing."""
|
||||
if os.path.exists(self.settings_path):
|
||||
settings = self.read_yaml(self.settings_path)
|
||||
return settings if settings else self._default_settings()
|
||||
return self._default_settings()
|
||||
|
||||
def save_settings(self, settings):
|
||||
if not self.write_yaml(self.settings_path, settings):
|
||||
print("Error writing file")
|
||||
|
||||
def default_exif(self):
|
||||
"""Makes a default exif file."""
|
||||
print("Making default")
|
||||
def_exif = {
|
||||
|
@ -78,7 +91,19 @@ class Utilities:
|
|||
"Scanner: NA"
|
||||
]
|
||||
}
|
||||
self.write_yaml(file, def_exif)
|
||||
self.write_yaml(self.exif_path, def_exif)
|
||||
|
||||
def _default_settings(self):
|
||||
"""Returns default settings and writes them if the settings file does not exist."""
|
||||
settings = {
|
||||
"theme": {
|
||||
"theme_pkg": False,
|
||||
"use_custom_theme": False,
|
||||
"mode": "Dark"
|
||||
}
|
||||
}
|
||||
self.write_yaml(self.settings_path, settings)
|
||||
return settings
|
||||
|
||||
def append_number_to_name(self, base_name: str, current_image: int, total_images: int, invert: bool):
|
||||
""""Returns name, combination of base_name and ending number."""
|
||||
|
|
|
@ -11,11 +11,14 @@ readme = "../pip_README.md"
|
|||
requires-python = ">=3.8"
|
||||
dependencies = [
|
||||
"optima35>=1.0.0, <2.0.0",
|
||||
"PyPiUpdater>=0.6.0, <1.0.0",
|
||||
"PyPiUpdater>=0.7.0, <1.0.0",
|
||||
"pyside6",
|
||||
"PyYAML",
|
||||
]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: X11 Applications :: Qt",
|
||||
"Topic :: Multimedia :: Graphics :: Editors",
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
|
||||
"Operating System :: OS Independent",
|
||||
|
|
|
@ -4,5 +4,5 @@ echo "Update main window."
|
|||
pyside6-uic OptimaLab35/ui/main_window.ui -o OptimaLab35/ui/main_window.py
|
||||
echo "Update preview window."
|
||||
pyside6-uic OptimaLab35/ui/preview_window.ui -o OptimaLab35/ui/preview_window.py
|
||||
echo "Update updater window."
|
||||
pyside6-uic OptimaLab35/ui/updater_window.ui -o OptimaLab35/ui/updater_window.py
|
||||
echo "Update settings window."
|
||||
pyside6-uic OptimaLab35/ui/settings_window.ui -o OptimaLab35/ui/settings_window.py
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue