Archetype: qt_detail_dialog_ui.mustache
Qt Designer XML for {EntityPascal}DetailDialog.ui: a form layout with one row per detail_fields entry, widget chosen by the field's kind flag. Consumed by the qt profile; output projects/ores.qt.{component}/ui/{EntityPascal}DetailDialog.ui — note this is the pre-regroup layout, tracked by the stale facet_catalogue.org capture. 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_detail_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}}DetailDialog</class>
<widget class="QWidget" name="{{domain_entity.entity_pascal}}DetailDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>500</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>500</height>
</size>
</property>
<property name="windowTitle">
<string>{{domain_entity.entity_title}} Details</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"><number>0</number></property>
<widget class="QWidget" name="generalTab">
<attribute name="title"><string>General</string></attribute>
<layout class="QVBoxLayout" name="generalLayout">
<item>
<widget class="QGroupBox" name="basicInfoGroup">
<property name="title">
<string>Basic Information</string>
</property>
<layout class="QFormLayout" name="formLayout">
{{#domain_entity.qt.detail_fields}}
<item row="{{_row_index}}" column="0">
<widget class="QLabel" name="{{label_widget}}">
<property name="text">
<string>{{label}}:</string>
</property>
</widget>
</item>
<item row="{{_row_index}}" column="1">
{{#is_line_edit}}
<widget class="QLineEdit" name="{{widget}}">
<property name="placeholderText">
<string>{{placeholder}}</string>
</property>
</widget>
{{/is_line_edit}}
{{#is_text_edit}}
<widget class="QPlainTextEdit" name="{{widget}}">
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>150</height>
</size>
</property>
<property name="placeholderText">
<string>{{placeholder}}</string>
</property>
</widget>
{{/is_text_edit}}
{{#is_static_combo}}
<widget class="QComboBox" name="{{widget}}">
<property name="insertPolicy">
<enum>QComboBox::NoInsert</enum>
</property>
</widget>
{{/is_static_combo}}
{{#is_dynamic_combo}}
<widget class="QComboBox" name="{{widget}}">
<property name="insertPolicy">
<enum>QComboBox::NoInsert</enum>
</property>
</widget>
{{/is_dynamic_combo}}
{{#is_check_box}}
<widget class="QCheckBox" name="{{widget}}">
<property name="text">
<string/>
</property>
{{#is_tristate}}
<property name="tristate">
<bool>true</bool>
</property>
{{/is_tristate}}
</widget>
{{/is_check_box}}
{{#is_spin_box}}
<widget class="QSpinBox" name="{{widget}}">
<property name="minimum">
<number>{{spin_min}}</number>
</property>
<property name="maximum">
<number>{{spin_max}}</number>
</property>
{{#is_nullable_int}}
<property name="specialValueText">
<string>(unset)</string>
</property>
{{/is_nullable_int}}
</widget>
{{/is_spin_box}}
</item>
{{/domain_entity.qt.detail_fields}}
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="provenanceTab">
<attribute name="title"><string>Provenance</string></attribute>
<layout class="QVBoxLayout" name="provenanceTabLayout">
<item>
<widget class="ores::qt::ProvenanceWidget" name="provenanceWidget" native="true"/>
</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="deleteButton">
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closeButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveButton">
<property name="text">
<string>Save</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ores::qt::ProvenanceWidget</class>
<extends>QWidget</extends>
<header>ores.qt/ProvenanceWidget.hpp</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
See also
- Parent facet: Asset templates
- Template variable reference