Edit-Dialoge: XSLT-Parameter nebeneinander + Force-Transformation
UI-Redesign für TreeNodeEditDialog und XslFileEditDialog: - XSLT-Parameter-Tabellen werden jetzt nebeneinander angezeigt - Eigene Parameter (editierbar) links, geerbte Parameter (read-only) rechts - Bessere Übersicht durch direkten visuellen Vergleich - Fensterbreite auf ~870px erhöht für optimale Darstellung - Icons für Hinzufügen/Entfernen-Buttons hinzugefügt - Kompakteres Layout durch reduzierte Margins Neue Funktionalität: Force-Transformation nach Bearbeitung - Neue CheckBox "Alle XML-Dateien neu transformieren (force)" in beiden Dialogen - Beim Schließen mit OK werden alle untergeordneten XML-Dateien transformiert - TreeNodeEditDialog: Transformiert rekursiv alle XML-Dateien unter dem Knoten - XslFileEditDialog: Transformiert alle XML-Dateien der XSL-Datei - Transformation erfolgt auch bei bereits aktuellem Output (force=True) Implementierungsdetails: - TreeNodeEditDialog.get_data() gibt jetzt force_transform zurück - XslFileEditDialog.get_data() gibt jetzt force_transform zurück - MainWindow._find_item_by_node() findet Item nach TreeWidget-Neuladen - MainWindow._edit_tree_node() startet Force-Transformation bei Bedarf - MainWindow._edit_xsl_file() startet Force-Transformation bei Bedarf 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
+169
-140
@@ -1,140 +1,169 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'XslFileEditDialog.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.9.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 (QAbstractButton, QAbstractItemView, QApplication, QDialog,
|
||||
QDialogButtonBox, QFormLayout, QGroupBox, QHBoxLayout,
|
||||
QHeaderView, QLabel, QLayout, QLineEdit,
|
||||
QPushButton, QSizePolicy, QSpacerItem, QTableWidget,
|
||||
QTableWidgetItem, QVBoxLayout, QWidget)
|
||||
|
||||
class Ui_XslFileEditDialog(object):
|
||||
def setupUi(self, XslFileEditDialog):
|
||||
if not XslFileEditDialog.objectName():
|
||||
XslFileEditDialog.setObjectName(u"XslFileEditDialog")
|
||||
XslFileEditDialog.resize(600, 400)
|
||||
XslFileEditDialog.setModal(True)
|
||||
self.verticalLayout = QVBoxLayout(XslFileEditDialog)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.formLayout = QFormLayout()
|
||||
self.formLayout.setObjectName(u"formLayout")
|
||||
self.formLayout.setSizeConstraint(QLayout.SizeConstraint.SetMaximumSize)
|
||||
self.bezLabel = QLabel(XslFileEditDialog)
|
||||
self.bezLabel.setObjectName(u"bezLabel")
|
||||
|
||||
self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.bezLabel)
|
||||
|
||||
self.bezEdit = QLineEdit(XslFileEditDialog)
|
||||
self.bezEdit.setObjectName(u"bezEdit")
|
||||
|
||||
self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.bezEdit)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.formLayout)
|
||||
|
||||
self.xsltParamsGroupBox = QGroupBox(XslFileEditDialog)
|
||||
self.xsltParamsGroupBox.setObjectName(u"xsltParamsGroupBox")
|
||||
self.xsltParamsLayout = QVBoxLayout(self.xsltParamsGroupBox)
|
||||
self.xsltParamsLayout.setObjectName(u"xsltParamsLayout")
|
||||
self.xsltParamsTable = QTableWidget(self.xsltParamsGroupBox)
|
||||
if (self.xsltParamsTable.columnCount() < 2):
|
||||
self.xsltParamsTable.setColumnCount(2)
|
||||
__qtablewidgetitem = QTableWidgetItem()
|
||||
self.xsltParamsTable.setHorizontalHeaderItem(0, __qtablewidgetitem)
|
||||
__qtablewidgetitem1 = QTableWidgetItem()
|
||||
self.xsltParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem1)
|
||||
self.xsltParamsTable.setObjectName(u"xsltParamsTable")
|
||||
self.xsltParamsTable.setColumnCount(2)
|
||||
self.xsltParamsTable.horizontalHeader().setVisible(True)
|
||||
|
||||
self.xsltParamsLayout.addWidget(self.xsltParamsTable)
|
||||
|
||||
self.xsltParamsButtonLayout = QHBoxLayout()
|
||||
self.xsltParamsButtonLayout.setObjectName(u"xsltParamsButtonLayout")
|
||||
self.addParamButton = QPushButton(self.xsltParamsGroupBox)
|
||||
self.addParamButton.setObjectName(u"addParamButton")
|
||||
|
||||
self.xsltParamsButtonLayout.addWidget(self.addParamButton)
|
||||
|
||||
self.removeParamButton = QPushButton(self.xsltParamsGroupBox)
|
||||
self.removeParamButton.setObjectName(u"removeParamButton")
|
||||
|
||||
self.xsltParamsButtonLayout.addWidget(self.removeParamButton)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
||||
|
||||
self.xsltParamsButtonLayout.addItem(self.horizontalSpacer)
|
||||
|
||||
|
||||
self.xsltParamsLayout.addLayout(self.xsltParamsButtonLayout)
|
||||
|
||||
|
||||
self.verticalLayout.addWidget(self.xsltParamsGroupBox)
|
||||
|
||||
self.parentParamsGroupBox = QGroupBox(XslFileEditDialog)
|
||||
self.parentParamsGroupBox.setObjectName(u"parentParamsGroupBox")
|
||||
self.parentParamsLayout = QVBoxLayout(self.parentParamsGroupBox)
|
||||
self.parentParamsLayout.setObjectName(u"parentParamsLayout")
|
||||
self.parentParamsTable = QTableWidget(self.parentParamsGroupBox)
|
||||
if (self.parentParamsTable.columnCount() < 2):
|
||||
self.parentParamsTable.setColumnCount(2)
|
||||
__qtablewidgetitem2 = QTableWidgetItem()
|
||||
self.parentParamsTable.setHorizontalHeaderItem(0, __qtablewidgetitem2)
|
||||
__qtablewidgetitem3 = QTableWidgetItem()
|
||||
self.parentParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem3)
|
||||
self.parentParamsTable.setObjectName(u"parentParamsTable")
|
||||
self.parentParamsTable.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.parentParamsTable.setColumnCount(2)
|
||||
self.parentParamsTable.horizontalHeader().setVisible(True)
|
||||
|
||||
self.parentParamsLayout.addWidget(self.parentParamsTable)
|
||||
|
||||
|
||||
self.verticalLayout.addWidget(self.parentParamsGroupBox)
|
||||
|
||||
self.buttonBox = QDialogButtonBox(XslFileEditDialog)
|
||||
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)
|
||||
|
||||
|
||||
self.retranslateUi(XslFileEditDialog)
|
||||
self.buttonBox.accepted.connect(XslFileEditDialog.accept)
|
||||
self.buttonBox.rejected.connect(XslFileEditDialog.reject)
|
||||
|
||||
QMetaObject.connectSlotsByName(XslFileEditDialog)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, XslFileEditDialog):
|
||||
XslFileEditDialog.setWindowTitle(QCoreApplication.translate("XslFileEditDialog", u"XSL-Datei bearbeiten", None))
|
||||
self.bezLabel.setText(QCoreApplication.translate("XslFileEditDialog", u"Bezeichnung:", None))
|
||||
self.xsltParamsGroupBox.setTitle(QCoreApplication.translate("XslFileEditDialog", u"XSLT-Parameter", None))
|
||||
___qtablewidgetitem = self.xsltParamsTable.horizontalHeaderItem(0)
|
||||
___qtablewidgetitem.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter", None));
|
||||
___qtablewidgetitem1 = self.xsltParamsTable.horizontalHeaderItem(1)
|
||||
___qtablewidgetitem1.setText(QCoreApplication.translate("XslFileEditDialog", u"Wert", None));
|
||||
self.addParamButton.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter hinzuf\u00fcgen", None))
|
||||
self.removeParamButton.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter entfernen", None))
|
||||
self.parentParamsGroupBox.setTitle(QCoreApplication.translate("XslFileEditDialog", u"Geerbte XSLT-Parameter (nur anzeigen)", None))
|
||||
___qtablewidgetitem2 = self.parentParamsTable.horizontalHeaderItem(0)
|
||||
___qtablewidgetitem2.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter", None));
|
||||
___qtablewidgetitem3 = self.parentParamsTable.horizontalHeaderItem(1)
|
||||
___qtablewidgetitem3.setText(QCoreApplication.translate("XslFileEditDialog", u"Wert", None));
|
||||
# retranslateUi
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'XslFileEditDialog.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.9.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 (QAbstractButton, QAbstractItemView, QApplication, QCheckBox,
|
||||
QDialog, QDialogButtonBox, QFormLayout, QFrame,
|
||||
QGroupBox, QHBoxLayout, QHeaderView, QLabel,
|
||||
QLayout, QLineEdit, QPushButton, QSizePolicy,
|
||||
QSpacerItem, QTableWidget, QTableWidgetItem, QVBoxLayout,
|
||||
QWidget)
|
||||
|
||||
class Ui_XslFileEditDialog(object):
|
||||
def setupUi(self, XslFileEditDialog):
|
||||
if not XslFileEditDialog.objectName():
|
||||
XslFileEditDialog.setObjectName(u"XslFileEditDialog")
|
||||
XslFileEditDialog.resize(865, 400)
|
||||
XslFileEditDialog.setModal(True)
|
||||
self.verticalLayout = QVBoxLayout(XslFileEditDialog)
|
||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||
self.formLayout = QFormLayout()
|
||||
self.formLayout.setObjectName(u"formLayout")
|
||||
self.formLayout.setSizeConstraint(QLayout.SizeConstraint.SetMaximumSize)
|
||||
self.bezLabel = QLabel(XslFileEditDialog)
|
||||
self.bezLabel.setObjectName(u"bezLabel")
|
||||
|
||||
self.formLayout.setWidget(0, QFormLayout.ItemRole.LabelRole, self.bezLabel)
|
||||
|
||||
self.bezEdit = QLineEdit(XslFileEditDialog)
|
||||
self.bezEdit.setObjectName(u"bezEdit")
|
||||
|
||||
self.formLayout.setWidget(0, QFormLayout.ItemRole.FieldRole, self.bezEdit)
|
||||
|
||||
|
||||
self.verticalLayout.addLayout(self.formLayout)
|
||||
|
||||
self.frame = QFrame(XslFileEditDialog)
|
||||
self.frame.setObjectName(u"frame")
|
||||
self.frame.setFrameShape(QFrame.Shape.NoFrame)
|
||||
self.frame.setFrameShadow(QFrame.Shadow.Raised)
|
||||
self.horizontalLayout = QHBoxLayout(self.frame)
|
||||
self.horizontalLayout.setObjectName(u"horizontalLayout")
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.xsltParamsGroupBox = QGroupBox(self.frame)
|
||||
self.xsltParamsGroupBox.setObjectName(u"xsltParamsGroupBox")
|
||||
self.xsltParamsLayout = QVBoxLayout(self.xsltParamsGroupBox)
|
||||
self.xsltParamsLayout.setObjectName(u"xsltParamsLayout")
|
||||
self.xsltParamsLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.xsltParamsTable = QTableWidget(self.xsltParamsGroupBox)
|
||||
if (self.xsltParamsTable.columnCount() < 2):
|
||||
self.xsltParamsTable.setColumnCount(2)
|
||||
__qtablewidgetitem = QTableWidgetItem()
|
||||
self.xsltParamsTable.setHorizontalHeaderItem(0, __qtablewidgetitem)
|
||||
__qtablewidgetitem1 = QTableWidgetItem()
|
||||
self.xsltParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem1)
|
||||
self.xsltParamsTable.setObjectName(u"xsltParamsTable")
|
||||
self.xsltParamsTable.setFrameShape(QFrame.Shape.NoFrame)
|
||||
self.xsltParamsTable.setColumnCount(2)
|
||||
self.xsltParamsTable.horizontalHeader().setVisible(True)
|
||||
|
||||
self.xsltParamsLayout.addWidget(self.xsltParamsTable)
|
||||
|
||||
self.xsltParamsButtonLayout = QHBoxLayout()
|
||||
self.xsltParamsButtonLayout.setObjectName(u"xsltParamsButtonLayout")
|
||||
self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
||||
|
||||
self.xsltParamsButtonLayout.addItem(self.horizontalSpacer_2)
|
||||
|
||||
self.addParamButton = QPushButton(self.xsltParamsGroupBox)
|
||||
self.addParamButton.setObjectName(u"addParamButton")
|
||||
icon = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.ListAdd))
|
||||
self.addParamButton.setIcon(icon)
|
||||
|
||||
self.xsltParamsButtonLayout.addWidget(self.addParamButton)
|
||||
|
||||
self.removeParamButton = QPushButton(self.xsltParamsGroupBox)
|
||||
self.removeParamButton.setObjectName(u"removeParamButton")
|
||||
icon1 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.ListRemove))
|
||||
self.removeParamButton.setIcon(icon1)
|
||||
|
||||
self.xsltParamsButtonLayout.addWidget(self.removeParamButton)
|
||||
|
||||
self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)
|
||||
|
||||
self.xsltParamsButtonLayout.addItem(self.horizontalSpacer)
|
||||
|
||||
|
||||
self.xsltParamsLayout.addLayout(self.xsltParamsButtonLayout)
|
||||
|
||||
|
||||
self.horizontalLayout.addWidget(self.xsltParamsGroupBox)
|
||||
|
||||
self.parentParamsGroupBox = QGroupBox(self.frame)
|
||||
self.parentParamsGroupBox.setObjectName(u"parentParamsGroupBox")
|
||||
self.parentParamsLayout = QVBoxLayout(self.parentParamsGroupBox)
|
||||
self.parentParamsLayout.setObjectName(u"parentParamsLayout")
|
||||
self.parentParamsLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.parentParamsTable = QTableWidget(self.parentParamsGroupBox)
|
||||
if (self.parentParamsTable.columnCount() < 2):
|
||||
self.parentParamsTable.setColumnCount(2)
|
||||
__qtablewidgetitem2 = QTableWidgetItem()
|
||||
self.parentParamsTable.setHorizontalHeaderItem(0, __qtablewidgetitem2)
|
||||
__qtablewidgetitem3 = QTableWidgetItem()
|
||||
self.parentParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem3)
|
||||
self.parentParamsTable.setObjectName(u"parentParamsTable")
|
||||
self.parentParamsTable.setFrameShape(QFrame.Shape.NoFrame)
|
||||
self.parentParamsTable.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.parentParamsTable.setColumnCount(2)
|
||||
self.parentParamsTable.horizontalHeader().setVisible(True)
|
||||
|
||||
self.parentParamsLayout.addWidget(self.parentParamsTable)
|
||||
|
||||
|
||||
self.horizontalLayout.addWidget(self.parentParamsGroupBox)
|
||||
|
||||
|
||||
self.verticalLayout.addWidget(self.frame)
|
||||
|
||||
self.alle_xml_transformieren = QCheckBox(XslFileEditDialog)
|
||||
self.alle_xml_transformieren.setObjectName(u"alle_xml_transformieren")
|
||||
|
||||
self.verticalLayout.addWidget(self.alle_xml_transformieren)
|
||||
|
||||
self.buttonBox = QDialogButtonBox(XslFileEditDialog)
|
||||
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)
|
||||
|
||||
|
||||
self.retranslateUi(XslFileEditDialog)
|
||||
self.buttonBox.accepted.connect(XslFileEditDialog.accept)
|
||||
self.buttonBox.rejected.connect(XslFileEditDialog.reject)
|
||||
|
||||
QMetaObject.connectSlotsByName(XslFileEditDialog)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, XslFileEditDialog):
|
||||
XslFileEditDialog.setWindowTitle(QCoreApplication.translate("XslFileEditDialog", u"XSL-Datei bearbeiten", None))
|
||||
self.bezLabel.setText(QCoreApplication.translate("XslFileEditDialog", u"Bezeichnung:", None))
|
||||
self.xsltParamsGroupBox.setTitle(QCoreApplication.translate("XslFileEditDialog", u"XSLT-Parameter", None))
|
||||
___qtablewidgetitem = self.xsltParamsTable.horizontalHeaderItem(0)
|
||||
___qtablewidgetitem.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter", None));
|
||||
___qtablewidgetitem1 = self.xsltParamsTable.horizontalHeaderItem(1)
|
||||
___qtablewidgetitem1.setText(QCoreApplication.translate("XslFileEditDialog", u"Wert", None));
|
||||
self.addParamButton.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter hinzuf\u00fcgen", None))
|
||||
self.removeParamButton.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter entfernen", None))
|
||||
self.parentParamsGroupBox.setTitle(QCoreApplication.translate("XslFileEditDialog", u"Geerbte XSLT-Parameter (nur anzeigen)", None))
|
||||
___qtablewidgetitem2 = self.parentParamsTable.horizontalHeaderItem(0)
|
||||
___qtablewidgetitem2.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter", None));
|
||||
___qtablewidgetitem3 = self.parentParamsTable.horizontalHeaderItem(1)
|
||||
___qtablewidgetitem3.setText(QCoreApplication.translate("XslFileEditDialog", u"Wert", None));
|
||||
self.alle_xml_transformieren.setText(QCoreApplication.translate("XslFileEditDialog", u"Alle XML-Dateien neu transformieren (force)", None))
|
||||
# retranslateUi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user