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:
@@ -887,6 +887,39 @@ class MainWindow(QMainWindow):
|
|||||||
print(f"Fehler beim Bestimmen des Node-Typs aus Daten: {e}")
|
print(f"Fehler beim Bestimmen des Node-Typs aus Daten: {e}")
|
||||||
return "Unknown"
|
return "Unknown"
|
||||||
|
|
||||||
|
def _find_item_by_node(self, node_obj):
|
||||||
|
"""
|
||||||
|
Findet ein TreeWidgetItem basierend auf einem Node-Objekt.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
node_obj: Das Node-Objekt (TreeNode, XslFile oder XmlFile)
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
QTreeWidgetItem oder None wenn nicht gefunden
|
||||||
|
"""
|
||||||
|
def search_recursive(item):
|
||||||
|
"""Rekursive Suche durch TreeWidget."""
|
||||||
|
# Prüfe aktuelles Item
|
||||||
|
item_node = item.data(0, Qt.ItemDataRole.UserRole)
|
||||||
|
if item_node is node_obj:
|
||||||
|
return item
|
||||||
|
|
||||||
|
# Durchsuche Kinder
|
||||||
|
for i in range(item.childCount()):
|
||||||
|
child = item.child(i)
|
||||||
|
result = search_recursive(child)
|
||||||
|
if result:
|
||||||
|
return result
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Durchsuche alle Root-Items
|
||||||
|
for i in range(self.ui.treeWidget.topLevelItemCount()):
|
||||||
|
root_item = self.ui.treeWidget.topLevelItem(i)
|
||||||
|
result = search_recursive(root_item)
|
||||||
|
if result:
|
||||||
|
return result
|
||||||
|
return None
|
||||||
|
|
||||||
def _find_node_by_id(self, nodes, target_id):
|
def _find_node_by_id(self, nodes, target_id):
|
||||||
"""
|
"""
|
||||||
Sucht rekursiv nach einem Node mit der angegebenen ID.
|
Sucht rekursiv nach einem Node mit der angegebenen ID.
|
||||||
@@ -1650,6 +1683,16 @@ class MainWindow(QMainWindow):
|
|||||||
# Aktualisiere das TreeWidget
|
# Aktualisiere das TreeWidget
|
||||||
self._load_nodes_to_tree()
|
self._load_nodes_to_tree()
|
||||||
|
|
||||||
|
# Wenn Force-Transformation gewünscht, führe sie aus
|
||||||
|
if data.get("force_transform", False):
|
||||||
|
# Finde das neue Item nach dem Neuladen
|
||||||
|
new_item = self._find_item_by_node(node)
|
||||||
|
if new_item:
|
||||||
|
logger.info(f"Starte Force-Transformation für TreeNode '{node.bez}'")
|
||||||
|
self._transform_tree_node(new_item, force=True)
|
||||||
|
else:
|
||||||
|
logger.warning(f"Konnte Item für TreeNode '{node.bez}' nicht finden")
|
||||||
|
|
||||||
# QMessageBox.information(self, "Erfolg", "TreeNode wurde erfolgreich aktualisiert.")
|
# QMessageBox.information(self, "Erfolg", "TreeNode wurde erfolgreich aktualisiert.")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -1811,6 +1854,16 @@ class MainWindow(QMainWindow):
|
|||||||
# Aktualisiere das TreeWidget
|
# Aktualisiere das TreeWidget
|
||||||
self._load_nodes_to_tree()
|
self._load_nodes_to_tree()
|
||||||
|
|
||||||
|
# Wenn Force-Transformation gewünscht, führe sie aus
|
||||||
|
if data.get("force_transform", False):
|
||||||
|
# Finde das neue Item nach dem Neuladen
|
||||||
|
new_item = self._find_item_by_node(node)
|
||||||
|
if new_item:
|
||||||
|
logger.info(f"Starte Force-Transformation für XslFile '{node.bez}'")
|
||||||
|
self._transform_xsl_file(new_item, force=True)
|
||||||
|
else:
|
||||||
|
logger.warning(f"Konnte Item für XslFile '{node.bez}' nicht finden")
|
||||||
|
|
||||||
# QMessageBox.information(self, "Erfolg", "XSL-Datei wurde erfolgreich aktualisiert.")
|
# QMessageBox.information(self, "Erfolg", "XSL-Datei wurde erfolgreich aktualisiert.")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -145,9 +145,13 @@ class TreeNodeEditDialog(QDialog):
|
|||||||
if key: # Nur Parameter mit nicht-leerem Schlüssel hinzufügen
|
if key: # Nur Parameter mit nicht-leerem Schlüssel hinzufügen
|
||||||
xslt_params[key] = value
|
xslt_params[key] = value
|
||||||
|
|
||||||
|
# CheckBox für Force-Transformation prüfen
|
||||||
|
force_transform = self.ui.alle_xml_transformieren.isChecked()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"bez": bez,
|
"bez": bez,
|
||||||
"xslt_params": xslt_params
|
"xslt_params": xslt_params,
|
||||||
|
"force_transform": force_transform
|
||||||
}
|
}
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>870</width>
|
||||||
<height>400</height>
|
<height>400</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -34,14 +34,50 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QGroupBox" name="xsltParamsGroupBox">
|
<widget class="QGroupBox" name="xsltParamsGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>XSLT-Parameter</string>
|
<string>XSLT-Parameter</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="xsltParamsLayout">
|
<layout class="QVBoxLayout" name="xsltParamsLayout">
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QTableWidget" name="xsltParamsTable">
|
<widget class="QTableWidget" name="xsltParamsTable">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
|
</property>
|
||||||
<property name="columnCount">
|
<property name="columnCount">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -62,11 +98,27 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="xsltParamsButtonLayout">
|
<layout class="QHBoxLayout" name="xsltParamsButtonLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addParamButton">
|
<widget class="QPushButton" name="addParamButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Parameter hinzufügen</string>
|
<string>Parameter hinzufügen</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::ListAdd"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -74,6 +126,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Parameter entfernen</string>
|
<string>Parameter entfernen</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::ListRemove"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -100,8 +155,23 @@
|
|||||||
<string>Geerbte XSLT-Parameter (nur anzeigen)</string>
|
<string>Geerbte XSLT-Parameter (nur anzeigen)</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="parentParamsLayout">
|
<layout class="QVBoxLayout" name="parentParamsLayout">
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QTableWidget" name="parentParamsTable">
|
<widget class="QTableWidget" name="parentParamsTable">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
|
</property>
|
||||||
<property name="editTriggers">
|
<property name="editTriggers">
|
||||||
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
||||||
</property>
|
</property>
|
||||||
@@ -126,6 +196,16 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="alle_xml_transformieren">
|
||||||
|
<property name="text">
|
||||||
|
<string>Alle XML-Dateien neu transformieren (force)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'TreeNodeEditDialog.ui'
|
## Form generated from reading UI file 'TreeNodeEditDialog.ui'
|
||||||
##
|
##
|
||||||
## Created by: Qt User Interface Compiler version 6.9.1
|
## Created by: Qt User Interface Compiler version 6.9.2
|
||||||
##
|
##
|
||||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -15,17 +15,18 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
|||||||
QFont, QFontDatabase, QGradient, QIcon,
|
QFont, QFontDatabase, QGradient, QIcon,
|
||||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||||
from PySide6.QtWidgets import (QAbstractButton, QAbstractItemView, QApplication, QDialog,
|
from PySide6.QtWidgets import (QAbstractButton, QAbstractItemView, QApplication, QCheckBox,
|
||||||
QDialogButtonBox, QFormLayout, QGroupBox, QHBoxLayout,
|
QDialog, QDialogButtonBox, QFormLayout, QFrame,
|
||||||
QHeaderView, QLabel, QLayout, QLineEdit,
|
QGroupBox, QHBoxLayout, QHeaderView, QLabel,
|
||||||
QPushButton, QSizePolicy, QSpacerItem, QTableWidget,
|
QLayout, QLineEdit, QPushButton, QSizePolicy,
|
||||||
QTableWidgetItem, QVBoxLayout, QWidget)
|
QSpacerItem, QTableWidget, QTableWidgetItem, QVBoxLayout,
|
||||||
|
QWidget)
|
||||||
|
|
||||||
class Ui_TreeNodeEditDialog(object):
|
class Ui_TreeNodeEditDialog(object):
|
||||||
def setupUi(self, TreeNodeEditDialog):
|
def setupUi(self, TreeNodeEditDialog):
|
||||||
if not TreeNodeEditDialog.objectName():
|
if not TreeNodeEditDialog.objectName():
|
||||||
TreeNodeEditDialog.setObjectName(u"TreeNodeEditDialog")
|
TreeNodeEditDialog.setObjectName(u"TreeNodeEditDialog")
|
||||||
TreeNodeEditDialog.resize(600, 400)
|
TreeNodeEditDialog.resize(870, 400)
|
||||||
TreeNodeEditDialog.setModal(True)
|
TreeNodeEditDialog.setModal(True)
|
||||||
self.verticalLayout = QVBoxLayout(TreeNodeEditDialog)
|
self.verticalLayout = QVBoxLayout(TreeNodeEditDialog)
|
||||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||||
@@ -45,10 +46,18 @@ class Ui_TreeNodeEditDialog(object):
|
|||||||
|
|
||||||
self.verticalLayout.addLayout(self.formLayout)
|
self.verticalLayout.addLayout(self.formLayout)
|
||||||
|
|
||||||
self.xsltParamsGroupBox = QGroupBox(TreeNodeEditDialog)
|
self.frame = QFrame(TreeNodeEditDialog)
|
||||||
|
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.xsltParamsGroupBox.setObjectName(u"xsltParamsGroupBox")
|
||||||
self.xsltParamsLayout = QVBoxLayout(self.xsltParamsGroupBox)
|
self.xsltParamsLayout = QVBoxLayout(self.xsltParamsGroupBox)
|
||||||
self.xsltParamsLayout.setObjectName(u"xsltParamsLayout")
|
self.xsltParamsLayout.setObjectName(u"xsltParamsLayout")
|
||||||
|
self.xsltParamsLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
self.xsltParamsTable = QTableWidget(self.xsltParamsGroupBox)
|
self.xsltParamsTable = QTableWidget(self.xsltParamsGroupBox)
|
||||||
if (self.xsltParamsTable.columnCount() < 2):
|
if (self.xsltParamsTable.columnCount() < 2):
|
||||||
self.xsltParamsTable.setColumnCount(2)
|
self.xsltParamsTable.setColumnCount(2)
|
||||||
@@ -57,6 +66,7 @@ class Ui_TreeNodeEditDialog(object):
|
|||||||
__qtablewidgetitem1 = QTableWidgetItem()
|
__qtablewidgetitem1 = QTableWidgetItem()
|
||||||
self.xsltParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem1)
|
self.xsltParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem1)
|
||||||
self.xsltParamsTable.setObjectName(u"xsltParamsTable")
|
self.xsltParamsTable.setObjectName(u"xsltParamsTable")
|
||||||
|
self.xsltParamsTable.setFrameShape(QFrame.Shape.NoFrame)
|
||||||
self.xsltParamsTable.setColumnCount(2)
|
self.xsltParamsTable.setColumnCount(2)
|
||||||
self.xsltParamsTable.horizontalHeader().setVisible(True)
|
self.xsltParamsTable.horizontalHeader().setVisible(True)
|
||||||
|
|
||||||
@@ -64,13 +74,21 @@ class Ui_TreeNodeEditDialog(object):
|
|||||||
|
|
||||||
self.xsltParamsButtonLayout = QHBoxLayout()
|
self.xsltParamsButtonLayout = QHBoxLayout()
|
||||||
self.xsltParamsButtonLayout.setObjectName(u"xsltParamsButtonLayout")
|
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 = QPushButton(self.xsltParamsGroupBox)
|
||||||
self.addParamButton.setObjectName(u"addParamButton")
|
self.addParamButton.setObjectName(u"addParamButton")
|
||||||
|
icon = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.ListAdd))
|
||||||
|
self.addParamButton.setIcon(icon)
|
||||||
|
|
||||||
self.xsltParamsButtonLayout.addWidget(self.addParamButton)
|
self.xsltParamsButtonLayout.addWidget(self.addParamButton)
|
||||||
|
|
||||||
self.removeParamButton = QPushButton(self.xsltParamsGroupBox)
|
self.removeParamButton = QPushButton(self.xsltParamsGroupBox)
|
||||||
self.removeParamButton.setObjectName(u"removeParamButton")
|
self.removeParamButton.setObjectName(u"removeParamButton")
|
||||||
|
icon1 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.ListRemove))
|
||||||
|
self.removeParamButton.setIcon(icon1)
|
||||||
|
|
||||||
self.xsltParamsButtonLayout.addWidget(self.removeParamButton)
|
self.xsltParamsButtonLayout.addWidget(self.removeParamButton)
|
||||||
|
|
||||||
@@ -82,12 +100,13 @@ class Ui_TreeNodeEditDialog(object):
|
|||||||
self.xsltParamsLayout.addLayout(self.xsltParamsButtonLayout)
|
self.xsltParamsLayout.addLayout(self.xsltParamsButtonLayout)
|
||||||
|
|
||||||
|
|
||||||
self.verticalLayout.addWidget(self.xsltParamsGroupBox)
|
self.horizontalLayout.addWidget(self.xsltParamsGroupBox)
|
||||||
|
|
||||||
self.parentParamsGroupBox = QGroupBox(TreeNodeEditDialog)
|
self.parentParamsGroupBox = QGroupBox(self.frame)
|
||||||
self.parentParamsGroupBox.setObjectName(u"parentParamsGroupBox")
|
self.parentParamsGroupBox.setObjectName(u"parentParamsGroupBox")
|
||||||
self.parentParamsLayout = QVBoxLayout(self.parentParamsGroupBox)
|
self.parentParamsLayout = QVBoxLayout(self.parentParamsGroupBox)
|
||||||
self.parentParamsLayout.setObjectName(u"parentParamsLayout")
|
self.parentParamsLayout.setObjectName(u"parentParamsLayout")
|
||||||
|
self.parentParamsLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
self.parentParamsTable = QTableWidget(self.parentParamsGroupBox)
|
self.parentParamsTable = QTableWidget(self.parentParamsGroupBox)
|
||||||
if (self.parentParamsTable.columnCount() < 2):
|
if (self.parentParamsTable.columnCount() < 2):
|
||||||
self.parentParamsTable.setColumnCount(2)
|
self.parentParamsTable.setColumnCount(2)
|
||||||
@@ -96,6 +115,7 @@ class Ui_TreeNodeEditDialog(object):
|
|||||||
__qtablewidgetitem3 = QTableWidgetItem()
|
__qtablewidgetitem3 = QTableWidgetItem()
|
||||||
self.parentParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem3)
|
self.parentParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem3)
|
||||||
self.parentParamsTable.setObjectName(u"parentParamsTable")
|
self.parentParamsTable.setObjectName(u"parentParamsTable")
|
||||||
|
self.parentParamsTable.setFrameShape(QFrame.Shape.NoFrame)
|
||||||
self.parentParamsTable.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
self.parentParamsTable.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||||
self.parentParamsTable.setColumnCount(2)
|
self.parentParamsTable.setColumnCount(2)
|
||||||
self.parentParamsTable.horizontalHeader().setVisible(True)
|
self.parentParamsTable.horizontalHeader().setVisible(True)
|
||||||
@@ -103,7 +123,15 @@ class Ui_TreeNodeEditDialog(object):
|
|||||||
self.parentParamsLayout.addWidget(self.parentParamsTable)
|
self.parentParamsLayout.addWidget(self.parentParamsTable)
|
||||||
|
|
||||||
|
|
||||||
self.verticalLayout.addWidget(self.parentParamsGroupBox)
|
self.horizontalLayout.addWidget(self.parentParamsGroupBox)
|
||||||
|
|
||||||
|
|
||||||
|
self.verticalLayout.addWidget(self.frame)
|
||||||
|
|
||||||
|
self.alle_xml_transformieren = QCheckBox(TreeNodeEditDialog)
|
||||||
|
self.alle_xml_transformieren.setObjectName(u"alle_xml_transformieren")
|
||||||
|
|
||||||
|
self.verticalLayout.addWidget(self.alle_xml_transformieren)
|
||||||
|
|
||||||
self.buttonBox = QDialogButtonBox(TreeNodeEditDialog)
|
self.buttonBox = QDialogButtonBox(TreeNodeEditDialog)
|
||||||
self.buttonBox.setObjectName(u"buttonBox")
|
self.buttonBox.setObjectName(u"buttonBox")
|
||||||
@@ -136,5 +164,6 @@ class Ui_TreeNodeEditDialog(object):
|
|||||||
___qtablewidgetitem2.setText(QCoreApplication.translate("TreeNodeEditDialog", u"Parameter", None));
|
___qtablewidgetitem2.setText(QCoreApplication.translate("TreeNodeEditDialog", u"Parameter", None));
|
||||||
___qtablewidgetitem3 = self.parentParamsTable.horizontalHeaderItem(1)
|
___qtablewidgetitem3 = self.parentParamsTable.horizontalHeaderItem(1)
|
||||||
___qtablewidgetitem3.setText(QCoreApplication.translate("TreeNodeEditDialog", u"Wert", None));
|
___qtablewidgetitem3.setText(QCoreApplication.translate("TreeNodeEditDialog", u"Wert", None));
|
||||||
|
self.alle_xml_transformieren.setText(QCoreApplication.translate("TreeNodeEditDialog", u"Alle XML-Dateien neu transformieren (force)", None))
|
||||||
# retranslateUi
|
# retranslateUi
|
||||||
|
|
||||||
|
|||||||
@@ -145,9 +145,13 @@ class XslFileEditDialog(QDialog):
|
|||||||
if key: # Nur Parameter mit nicht-leerem Schlüssel hinzufügen
|
if key: # Nur Parameter mit nicht-leerem Schlüssel hinzufügen
|
||||||
xslt_params[key] = value
|
xslt_params[key] = value
|
||||||
|
|
||||||
|
# CheckBox für Force-Transformation prüfen
|
||||||
|
force_transform = self.ui.alle_xml_transformieren.isChecked()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"bez": bez,
|
"bez": bez,
|
||||||
"xslt_params": xslt_params
|
"xslt_params": xslt_params,
|
||||||
|
"force_transform": force_transform
|
||||||
}
|
}
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>865</width>
|
||||||
<height>400</height>
|
<height>400</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -34,14 +34,50 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Shadow::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QGroupBox" name="xsltParamsGroupBox">
|
<widget class="QGroupBox" name="xsltParamsGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>XSLT-Parameter</string>
|
<string>XSLT-Parameter</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="xsltParamsLayout">
|
<layout class="QVBoxLayout" name="xsltParamsLayout">
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QTableWidget" name="xsltParamsTable">
|
<widget class="QTableWidget" name="xsltParamsTable">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
|
</property>
|
||||||
<property name="columnCount">
|
<property name="columnCount">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -62,11 +98,27 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="xsltParamsButtonLayout">
|
<layout class="QHBoxLayout" name="xsltParamsButtonLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="addParamButton">
|
<widget class="QPushButton" name="addParamButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Parameter hinzufügen</string>
|
<string>Parameter hinzufügen</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::ListAdd"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -74,6 +126,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Parameter entfernen</string>
|
<string>Parameter entfernen</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="QIcon::ThemeIcon::ListRemove"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -100,8 +155,23 @@
|
|||||||
<string>Geerbte XSLT-Parameter (nur anzeigen)</string>
|
<string>Geerbte XSLT-Parameter (nur anzeigen)</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="parentParamsLayout">
|
<layout class="QVBoxLayout" name="parentParamsLayout">
|
||||||
|
<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>
|
<item>
|
||||||
<widget class="QTableWidget" name="parentParamsTable">
|
<widget class="QTableWidget" name="parentParamsTable">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::NoFrame</enum>
|
||||||
|
</property>
|
||||||
<property name="editTriggers">
|
<property name="editTriggers">
|
||||||
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
|
||||||
</property>
|
</property>
|
||||||
@@ -126,6 +196,16 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="alle_xml_transformieren">
|
||||||
|
<property name="text">
|
||||||
|
<string>Alle XML-Dateien neu transformieren (force)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'XslFileEditDialog.ui'
|
## Form generated from reading UI file 'XslFileEditDialog.ui'
|
||||||
##
|
##
|
||||||
## Created by: Qt User Interface Compiler version 6.9.1
|
## Created by: Qt User Interface Compiler version 6.9.2
|
||||||
##
|
##
|
||||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -15,17 +15,18 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
|||||||
QFont, QFontDatabase, QGradient, QIcon,
|
QFont, QFontDatabase, QGradient, QIcon,
|
||||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||||
from PySide6.QtWidgets import (QAbstractButton, QAbstractItemView, QApplication, QDialog,
|
from PySide6.QtWidgets import (QAbstractButton, QAbstractItemView, QApplication, QCheckBox,
|
||||||
QDialogButtonBox, QFormLayout, QGroupBox, QHBoxLayout,
|
QDialog, QDialogButtonBox, QFormLayout, QFrame,
|
||||||
QHeaderView, QLabel, QLayout, QLineEdit,
|
QGroupBox, QHBoxLayout, QHeaderView, QLabel,
|
||||||
QPushButton, QSizePolicy, QSpacerItem, QTableWidget,
|
QLayout, QLineEdit, QPushButton, QSizePolicy,
|
||||||
QTableWidgetItem, QVBoxLayout, QWidget)
|
QSpacerItem, QTableWidget, QTableWidgetItem, QVBoxLayout,
|
||||||
|
QWidget)
|
||||||
|
|
||||||
class Ui_XslFileEditDialog(object):
|
class Ui_XslFileEditDialog(object):
|
||||||
def setupUi(self, XslFileEditDialog):
|
def setupUi(self, XslFileEditDialog):
|
||||||
if not XslFileEditDialog.objectName():
|
if not XslFileEditDialog.objectName():
|
||||||
XslFileEditDialog.setObjectName(u"XslFileEditDialog")
|
XslFileEditDialog.setObjectName(u"XslFileEditDialog")
|
||||||
XslFileEditDialog.resize(600, 400)
|
XslFileEditDialog.resize(865, 400)
|
||||||
XslFileEditDialog.setModal(True)
|
XslFileEditDialog.setModal(True)
|
||||||
self.verticalLayout = QVBoxLayout(XslFileEditDialog)
|
self.verticalLayout = QVBoxLayout(XslFileEditDialog)
|
||||||
self.verticalLayout.setObjectName(u"verticalLayout")
|
self.verticalLayout.setObjectName(u"verticalLayout")
|
||||||
@@ -45,10 +46,18 @@ class Ui_XslFileEditDialog(object):
|
|||||||
|
|
||||||
self.verticalLayout.addLayout(self.formLayout)
|
self.verticalLayout.addLayout(self.formLayout)
|
||||||
|
|
||||||
self.xsltParamsGroupBox = QGroupBox(XslFileEditDialog)
|
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.xsltParamsGroupBox.setObjectName(u"xsltParamsGroupBox")
|
||||||
self.xsltParamsLayout = QVBoxLayout(self.xsltParamsGroupBox)
|
self.xsltParamsLayout = QVBoxLayout(self.xsltParamsGroupBox)
|
||||||
self.xsltParamsLayout.setObjectName(u"xsltParamsLayout")
|
self.xsltParamsLayout.setObjectName(u"xsltParamsLayout")
|
||||||
|
self.xsltParamsLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
self.xsltParamsTable = QTableWidget(self.xsltParamsGroupBox)
|
self.xsltParamsTable = QTableWidget(self.xsltParamsGroupBox)
|
||||||
if (self.xsltParamsTable.columnCount() < 2):
|
if (self.xsltParamsTable.columnCount() < 2):
|
||||||
self.xsltParamsTable.setColumnCount(2)
|
self.xsltParamsTable.setColumnCount(2)
|
||||||
@@ -57,6 +66,7 @@ class Ui_XslFileEditDialog(object):
|
|||||||
__qtablewidgetitem1 = QTableWidgetItem()
|
__qtablewidgetitem1 = QTableWidgetItem()
|
||||||
self.xsltParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem1)
|
self.xsltParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem1)
|
||||||
self.xsltParamsTable.setObjectName(u"xsltParamsTable")
|
self.xsltParamsTable.setObjectName(u"xsltParamsTable")
|
||||||
|
self.xsltParamsTable.setFrameShape(QFrame.Shape.NoFrame)
|
||||||
self.xsltParamsTable.setColumnCount(2)
|
self.xsltParamsTable.setColumnCount(2)
|
||||||
self.xsltParamsTable.horizontalHeader().setVisible(True)
|
self.xsltParamsTable.horizontalHeader().setVisible(True)
|
||||||
|
|
||||||
@@ -64,13 +74,21 @@ class Ui_XslFileEditDialog(object):
|
|||||||
|
|
||||||
self.xsltParamsButtonLayout = QHBoxLayout()
|
self.xsltParamsButtonLayout = QHBoxLayout()
|
||||||
self.xsltParamsButtonLayout.setObjectName(u"xsltParamsButtonLayout")
|
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 = QPushButton(self.xsltParamsGroupBox)
|
||||||
self.addParamButton.setObjectName(u"addParamButton")
|
self.addParamButton.setObjectName(u"addParamButton")
|
||||||
|
icon = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.ListAdd))
|
||||||
|
self.addParamButton.setIcon(icon)
|
||||||
|
|
||||||
self.xsltParamsButtonLayout.addWidget(self.addParamButton)
|
self.xsltParamsButtonLayout.addWidget(self.addParamButton)
|
||||||
|
|
||||||
self.removeParamButton = QPushButton(self.xsltParamsGroupBox)
|
self.removeParamButton = QPushButton(self.xsltParamsGroupBox)
|
||||||
self.removeParamButton.setObjectName(u"removeParamButton")
|
self.removeParamButton.setObjectName(u"removeParamButton")
|
||||||
|
icon1 = QIcon(QIcon.fromTheme(QIcon.ThemeIcon.ListRemove))
|
||||||
|
self.removeParamButton.setIcon(icon1)
|
||||||
|
|
||||||
self.xsltParamsButtonLayout.addWidget(self.removeParamButton)
|
self.xsltParamsButtonLayout.addWidget(self.removeParamButton)
|
||||||
|
|
||||||
@@ -82,12 +100,13 @@ class Ui_XslFileEditDialog(object):
|
|||||||
self.xsltParamsLayout.addLayout(self.xsltParamsButtonLayout)
|
self.xsltParamsLayout.addLayout(self.xsltParamsButtonLayout)
|
||||||
|
|
||||||
|
|
||||||
self.verticalLayout.addWidget(self.xsltParamsGroupBox)
|
self.horizontalLayout.addWidget(self.xsltParamsGroupBox)
|
||||||
|
|
||||||
self.parentParamsGroupBox = QGroupBox(XslFileEditDialog)
|
self.parentParamsGroupBox = QGroupBox(self.frame)
|
||||||
self.parentParamsGroupBox.setObjectName(u"parentParamsGroupBox")
|
self.parentParamsGroupBox.setObjectName(u"parentParamsGroupBox")
|
||||||
self.parentParamsLayout = QVBoxLayout(self.parentParamsGroupBox)
|
self.parentParamsLayout = QVBoxLayout(self.parentParamsGroupBox)
|
||||||
self.parentParamsLayout.setObjectName(u"parentParamsLayout")
|
self.parentParamsLayout.setObjectName(u"parentParamsLayout")
|
||||||
|
self.parentParamsLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
self.parentParamsTable = QTableWidget(self.parentParamsGroupBox)
|
self.parentParamsTable = QTableWidget(self.parentParamsGroupBox)
|
||||||
if (self.parentParamsTable.columnCount() < 2):
|
if (self.parentParamsTable.columnCount() < 2):
|
||||||
self.parentParamsTable.setColumnCount(2)
|
self.parentParamsTable.setColumnCount(2)
|
||||||
@@ -96,6 +115,7 @@ class Ui_XslFileEditDialog(object):
|
|||||||
__qtablewidgetitem3 = QTableWidgetItem()
|
__qtablewidgetitem3 = QTableWidgetItem()
|
||||||
self.parentParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem3)
|
self.parentParamsTable.setHorizontalHeaderItem(1, __qtablewidgetitem3)
|
||||||
self.parentParamsTable.setObjectName(u"parentParamsTable")
|
self.parentParamsTable.setObjectName(u"parentParamsTable")
|
||||||
|
self.parentParamsTable.setFrameShape(QFrame.Shape.NoFrame)
|
||||||
self.parentParamsTable.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
self.parentParamsTable.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||||
self.parentParamsTable.setColumnCount(2)
|
self.parentParamsTable.setColumnCount(2)
|
||||||
self.parentParamsTable.horizontalHeader().setVisible(True)
|
self.parentParamsTable.horizontalHeader().setVisible(True)
|
||||||
@@ -103,7 +123,15 @@ class Ui_XslFileEditDialog(object):
|
|||||||
self.parentParamsLayout.addWidget(self.parentParamsTable)
|
self.parentParamsLayout.addWidget(self.parentParamsTable)
|
||||||
|
|
||||||
|
|
||||||
self.verticalLayout.addWidget(self.parentParamsGroupBox)
|
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 = QDialogButtonBox(XslFileEditDialog)
|
||||||
self.buttonBox.setObjectName(u"buttonBox")
|
self.buttonBox.setObjectName(u"buttonBox")
|
||||||
@@ -136,5 +164,6 @@ class Ui_XslFileEditDialog(object):
|
|||||||
___qtablewidgetitem2.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter", None));
|
___qtablewidgetitem2.setText(QCoreApplication.translate("XslFileEditDialog", u"Parameter", None));
|
||||||
___qtablewidgetitem3 = self.parentParamsTable.horizontalHeaderItem(1)
|
___qtablewidgetitem3 = self.parentParamsTable.horizontalHeaderItem(1)
|
||||||
___qtablewidgetitem3.setText(QCoreApplication.translate("XslFileEditDialog", u"Wert", None));
|
___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
|
# retranslateUi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user