AppSettings-Dialog um PDF-Projekte erweitert
This commit is contained in:
+3
-3
@@ -11,7 +11,7 @@ app_name = "DocuMentor"
|
||||
|
||||
if platform == "win32":
|
||||
config_path = f"%APPDATA%\\{app_name}\\config.json"
|
||||
elif platform in ("linux", "linux2"):
|
||||
elif platform in ("linux", "linux2"):
|
||||
config_path = f"~/.config/{app_name}/config.json"
|
||||
elif platform == "darwin":
|
||||
config_path = f"~/Library/Application Support/{app_name}/͏͏͏͏config.json"
|
||||
@@ -90,8 +90,8 @@ class AppSettings(BaseSettings):
|
||||
|
||||
def save(self):
|
||||
global config_path
|
||||
# Ordner existert nicht
|
||||
if not config_path.parent.exists():
|
||||
# Ordner existert nicht
|
||||
config_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Konfiguration speichern
|
||||
@@ -100,7 +100,7 @@ class AppSettings(BaseSettings):
|
||||
|
||||
|
||||
app_settings = AppSettings()
|
||||
print(app_settings)
|
||||
|
||||
|
||||
class PdfProjectSettings(BaseSettings):
|
||||
"""
|
||||
|
||||
+77
-6
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>833</width>
|
||||
<height>513</height>
|
||||
<height>387</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -20,7 +20,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabXsls">
|
||||
<attribute name="title">
|
||||
@@ -374,6 +374,74 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabPdfProject">
|
||||
<attribute name="title">
|
||||
<string>PDF-Projekte</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tablePdfProjekts">
|
||||
<property name="columnCount">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<column/>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Shadow::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeProject">
|
||||
<property name="text">
|
||||
<string>Hinzufügen</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::ListAdd"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addProject">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Entfernen</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="QIcon::ThemeIcon::ListRemove"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -384,6 +452,9 @@
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||
</property>
|
||||
<property name="centerButtons">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -397,8 +468,8 @@
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
<x>257</x>
|
||||
<y>377</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
@@ -413,8 +484,8 @@
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
<x>325</x>
|
||||
<y>377</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'AppSettings.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.9.0
|
||||
## Created by: Qt User Interface Compiler version 6.9.1
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
@@ -24,7 +24,7 @@ class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
if not Dialog.objectName():
|
||||
Dialog.setObjectName(u"Dialog")
|
||||
Dialog.resize(833, 513)
|
||||
Dialog.resize(833, 387)
|
||||
self.verticalLayout = QVBoxLayout(Dialog)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.tabSettings = QTabWidget(Dialog)
|
||||
@@ -226,6 +226,44 @@ class Ui_Dialog(object):
|
||||
self.verticalLayout_6.addWidget(self.frame_5)
|
||||
|
||||
self.tabSettings.addTab(self.tabDiffPdf, "")
|
||||
self.tabPdfProject = QWidget()
|
||||
self.tabPdfProject.setObjectName(u"tabPdfProject")
|
||||
self.verticalLayout_7 = QVBoxLayout(self.tabPdfProject)
|
||||
self.verticalLayout_7.setObjectName(u"verticalLayout_7")
|
||||
self.tablePdfProjekts = QTableWidget(self.tabPdfProject)
|
||||
if (self.tablePdfProjekts.columnCount() < 1):
|
||||
self.tablePdfProjekts.setColumnCount(1)
|
||||
self.tablePdfProjekts.setObjectName(u"tablePdfProjekts")
|
||||
self.tablePdfProjekts.setColumnCount(1)
|
||||
|
||||
self.verticalLayout_7.addWidget(self.tablePdfProjekts)
|
||||
|
||||
self.frame_6 = QFrame(self.tabPdfProject)
|
||||
self.frame_6.setObjectName(u"frame_6")
|
||||
sizePolicy.setHeightForWidth(self.frame_6.sizePolicy().hasHeightForWidth())
|
||||
self.frame_6.setSizePolicy(sizePolicy)
|
||||
self.frame_6.setFrameShape(QFrame.Shape.StyledPanel)
|
||||
self.frame_6.setFrameShadow(QFrame.Shadow.Raised)
|
||||
self.horizontalLayout_6 = QHBoxLayout(self.frame_6)
|
||||
self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
|
||||
self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0)
|
||||
self.removeProject = QPushButton(self.frame_6)
|
||||
self.removeProject.setObjectName(u"removeProject")
|
||||
self.removeProject.setIcon(icon)
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.removeProject)
|
||||
|
||||
self.addProject = QPushButton(self.frame_6)
|
||||
self.addProject.setObjectName(u"addProject")
|
||||
self.addProject.setEnabled(False)
|
||||
self.addProject.setIcon(icon1)
|
||||
|
||||
self.horizontalLayout_6.addWidget(self.addProject)
|
||||
|
||||
|
||||
self.verticalLayout_7.addWidget(self.frame_6)
|
||||
|
||||
self.tabSettings.addTab(self.tabPdfProject, "")
|
||||
|
||||
self.verticalLayout.addWidget(self.tabSettings)
|
||||
|
||||
@@ -233,6 +271,7 @@ class Ui_Dialog(object):
|
||||
self.buttonBox.setObjectName(u"buttonBox")
|
||||
self.buttonBox.setOrientation(Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton.Cancel|QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setCenterButtons(True)
|
||||
|
||||
self.verticalLayout.addWidget(self.buttonBox)
|
||||
|
||||
@@ -241,7 +280,7 @@ class Ui_Dialog(object):
|
||||
self.buttonBox.accepted.connect(Dialog.accept)
|
||||
self.buttonBox.rejected.connect(Dialog.reject)
|
||||
|
||||
self.tabSettings.setCurrentIndex(0)
|
||||
self.tabSettings.setCurrentIndex(5)
|
||||
|
||||
|
||||
QMetaObject.connectSlotsByName(Dialog)
|
||||
@@ -264,5 +303,8 @@ class Ui_Dialog(object):
|
||||
self.addDiffPdf.setText(QCoreApplication.translate("Dialog", u"Hinzuf\u00fcgen", None))
|
||||
self.removeDiffPdf.setText(QCoreApplication.translate("Dialog", u"Entfernen", None))
|
||||
self.tabSettings.setTabText(self.tabSettings.indexOf(self.tabDiffPdf), QCoreApplication.translate("Dialog", u"Diff-PDF", None))
|
||||
self.removeProject.setText(QCoreApplication.translate("Dialog", u"Hinzuf\u00fcgen", None))
|
||||
self.addProject.setText(QCoreApplication.translate("Dialog", u"Entfernen", None))
|
||||
self.tabSettings.setTabText(self.tabSettings.indexOf(self.tabPdfProject), QCoreApplication.translate("Dialog", u"PDF-Projekte", None))
|
||||
# retranslateUi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user