Archetype: qt_history_dialog_ui.mustache
Qt Designer XML for {EntityPascal}HistoryDialog.ui: the read-only twin of the detail dialog, with the same per-field widget switch plus a trailing metadata block (version, recorded-by, recorded-at, comment) positioned via metadata_start_row / metadata_start_row_plus_N computed by the generator. Consumed by the qt profile; output projects/ores.qt.{component}/ui/{EntityPascal}HistoryDialog.ui — same pre-regroup path caveat as the detail dialog. Qt UI component: model/view class or dialog wired to the service layer via request/response messages.
See the Template variable reference for the complete list of available variables and their semantics.
Template
The full template source. Edit here and re-tangle with
compass build --direct tangle_codegen_templates to regenerate
library/templates/qt_history_dialog_ui.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/assets.org. Edit the org source. }}
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>{{domain_entity.entity_pascal}}HistoryDialog</class>
<widget class="QWidget" name="{{domain_entity.entity_pascal}}HistoryDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>900</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>{{domain_entity.entity_title}} History</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="titleLabel">
<property name="font">
<font>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>{{domain_entity.entity_title}} History</string>
</property>
</widget>
</item>
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTableWidget" name="versionListWidget">
<property name="minimumHeight">
<number>150</number>
</property>
<property name="maximumHeight">
<number>250</number>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<column>
<property name="text">
<string>Version</string>
</property>
</column>
<column>
<property name="text">
<string>Recorded At</string>
</property>
</column>
<column>
<property name="text">
<string>Modified By</string>
</property>
</column>
<column>
<property name="text">
<string>Commentary</string>
</property>
</column>
</widget>
<widget class="QWidget" name="detailWidget">
<layout class="QVBoxLayout" name="detailLayout">
<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="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="changesTab">
<attribute name="title">
<string>Changes</string>
</attribute>
<layout class="QVBoxLayout" name="changesTabLayout">
<item>
<widget class="QTableWidget" name="changesTableWidget">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<column>
<property name="text">
<string>Field</string>
</property>
</column>
<column>
<property name="text">
<string>Old Value</string>
</property>
</column>
<column>
<property name="text">
<string>New Value</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="fullDetailsTab">
<attribute name="title">
<string>Full Details</string>
</attribute>
<layout class="QVBoxLayout" name="fullDetailsTabLayout">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>560</width>
<height>450</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
{{#domain_entity.qt.detail_fields}}
<item row="{{_row_index}}" column="0">
<widget class="QLabel" name="{{field}}Label">
<property name="text">
<string>{{label}}:</string>
</property>
</widget>
</item>
<item row="{{_row_index}}" column="1">
<widget class="QLabel" name="{{value_widget}}">
<property name="text">
<string/>
</property>
{{#is_text_edit}}
<property name="wordWrap">
<bool>true</bool>
</property>
{{/is_text_edit}}
</widget>
</item>
{{/domain_entity.qt.detail_fields}}
<item row="{{domain_entity.qt.metadata_start_row}}" column="0">
<widget class="QLabel" name="versionNumberLabel">
<property name="text">
<string>Version:</string>
</property>
</widget>
</item>
<item row="{{domain_entity.qt.metadata_start_row}}" column="1">
<widget class="QLabel" name="versionNumberValue">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="{{domain_entity.qt.metadata_start_row_plus_1}}" column="0">
<widget class="QLabel" name="modifiedByLabel">
<property name="text">
<string>Modified By:</string>
</property>
</widget>
</item>
<item row="{{domain_entity.qt.metadata_start_row_plus_1}}" column="1">
<widget class="QLabel" name="modifiedByValue">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="{{domain_entity.qt.metadata_start_row_plus_2}}" column="0">
<widget class="QLabel" name="recordedAtLabel">
<property name="text">
<string>Recorded At:</string>
</property>
</widget>
</item>
<item row="{{domain_entity.qt.metadata_start_row_plus_2}}" column="1">
<widget class="QLabel" name="recordedAtValue">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="{{domain_entity.qt.metadata_start_row_plus_3}}" column="0">
<widget class="QLabel" name="changeCommentaryLabel">
<property name="text">
<string>Change Commentary:</string>
</property>
</widget>
</item>
<item row="{{domain_entity.qt.metadata_start_row_plus_3}}" column="1">
<widget class="QLabel" name="changeCommentaryValue">
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="buttonLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size><width>40</width><height>20</height></size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="closeButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
See also
- Parent facet: Asset templates
- Template variable reference