AnalyseMorphologique/utils/gui/pyqt/settings/UI_Settings.py
Djalim Simaila 5a6be4717b 🚀 feat(MainWindow.py, PreProcessWorker.py, Settings.py, UI_Settings.py, settings.ui): add support for verticalising scanned objects
 feat(Settings.py, UI_Settings.py, settings.ui): add checkbox to enable/disable verticalisation of scanned objects
The changes add support for verticalising scanned objects before processing them. A new checkbox has been added to the settings UI to enable/disable this feature.

🔧 refactor(SettingManager.py): add default settings dictionary and refactor createInitialSettings method
 feat(SettingManager.py): add new settings to the config file if they are not present
The `default_settings` dictionary is added to the `SettingManager` class to store the default values for the settings. The `createInitialSettings` method is refactored to use the `default_settings` dictionary to set the initial values of the settings. If new settings are added to the `default_settings` dictionary, they are added to the config file if they are not already present. The `remove_changed` method is added to remove the `has_changed` flag.
2023-05-12 09:44:20 +02:00

84 lines
4.8 KiB
Python

# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'settings.ui'
#
# Created by: PyQt5 UI code generator 5.15.9
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Settings(object):
def setupUi(self, Settings):
Settings.setObjectName("Settings")
Settings.resize(712, 226)
self.centralwidget = QtWidgets.QWidget(Settings)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName("gridLayout")
self.gridLayout_2 = QtWidgets.QGridLayout()
self.gridLayout_2.setObjectName("gridLayout_2")
self.discretisation_method_label = QtWidgets.QLabel(self.centralwidget)
self.discretisation_method_label.setObjectName("discretisation_method_label")
self.gridLayout_2.addWidget(self.discretisation_method_label, 0, 0, 1, 1)
self.raw_data_suffix = QtWidgets.QLineEdit(self.centralwidget)
self.raw_data_suffix.setObjectName("raw_data_suffix")
self.gridLayout_2.addWidget(self.raw_data_suffix, 2, 1, 1, 1)
self.discretisation_method = QtWidgets.QComboBox(self.centralwidget)
self.discretisation_method.setObjectName("discretisation_method")
self.gridLayout_2.addWidget(self.discretisation_method, 0, 1, 1, 1)
self.extention = QtWidgets.QLineEdit(self.centralwidget)
self.extention.setObjectName("extention")
self.gridLayout_2.addWidget(self.extention, 4, 1, 1, 1)
self.raw_data_suffix_label = QtWidgets.QLabel(self.centralwidget)
self.raw_data_suffix_label.setObjectName("raw_data_suffix_label")
self.gridLayout_2.addWidget(self.raw_data_suffix_label, 2, 0, 1, 1)
self.separator_label = QtWidgets.QLabel(self.centralwidget)
self.separator_label.setObjectName("separator_label")
self.gridLayout_2.addWidget(self.separator_label, 5, 0, 1, 1)
self.discrete_data_suffix_label = QtWidgets.QLabel(self.centralwidget)
self.discrete_data_suffix_label.setObjectName("discrete_data_suffix_label")
self.gridLayout_2.addWidget(self.discrete_data_suffix_label, 3, 0, 1, 1)
self.discrete_data_suffix = QtWidgets.QLineEdit(self.centralwidget)
self.discrete_data_suffix.setObjectName("discrete_data_suffix")
self.gridLayout_2.addWidget(self.discrete_data_suffix, 3, 1, 1, 1)
self.extention_label = QtWidgets.QLabel(self.centralwidget)
self.extention_label.setObjectName("extention_label")
self.gridLayout_2.addWidget(self.extention_label, 4, 0, 1, 1)
self.prettify = QtWidgets.QCheckBox(self.centralwidget)
self.prettify.setText("")
self.prettify.setObjectName("prettify")
self.gridLayout_2.addWidget(self.prettify, 6, 1, 1, 1)
self.prettify_label = QtWidgets.QLabel(self.centralwidget)
self.prettify_label.setObjectName("prettify_label")
self.gridLayout_2.addWidget(self.prettify_label, 6, 0, 1, 1)
self.separator = QtWidgets.QLineEdit(self.centralwidget)
self.separator.setObjectName("separator")
self.gridLayout_2.addWidget(self.separator, 5, 1, 1, 1)
self.should_verticalise_label = QtWidgets.QLabel(self.centralwidget)
self.should_verticalise_label.setObjectName("should_verticalise_label")
self.gridLayout_2.addWidget(self.should_verticalise_label, 1, 0, 1, 1)
self.should_verticalise = QtWidgets.QCheckBox(self.centralwidget)
self.should_verticalise.setText("")
self.should_verticalise.setObjectName("should_verticalise")
self.gridLayout_2.addWidget(self.should_verticalise, 1, 1, 1, 1)
self.gridLayout.addLayout(self.gridLayout_2, 0, 0, 1, 1)
Settings.setCentralWidget(self.centralwidget)
self.retranslateUi(Settings)
QtCore.QMetaObject.connectSlotsByName(Settings)
def retranslateUi(self, Settings):
_translate = QtCore.QCoreApplication.translate
Settings.setWindowTitle(_translate("Settings", "Préférences"))
self.discretisation_method_label.setText(_translate("Settings", "Methode de discretisation"))
self.raw_data_suffix_label.setText(_translate("Settings", "Suffixe des fichiers de données brutes"))
self.separator_label.setText(_translate("Settings", "Separateur de colone"))
self.discrete_data_suffix_label.setText(_translate("Settings", "Suffixe des fichiers de données discretisées"))
self.extention_label.setText(_translate("Settings", "Extensions des fichiers de sorties"))
self.prettify_label.setText(_translate("Settings", "Aligner les colones"))
self.should_verticalise_label.setText(_translate("Settings", "Mettre l\'objet droit"))