Files
qelectrotech-source-mirror/sources/ui/conductorpropertieswidget.ui
T
Jeff Patterson 8ef130a59d Add a "qet" icon theme and load icons by name
QET had no icon theme: the 446 entries of the icon table and the 116
iconsets in .ui files each named a resource path, so an icon could only
ever be one file, and a variant for another palette or a vector source
had nowhere to go (GitHub #466, #690, #870). This adds the theme layout
without changing a single pixel; a dark variant comes in a follow-up.

The theme "qet" follows the freedesktop layout Qt's icon loader
understands. misc/make_icon_themes.py generates ico/icon-themes.qrc,
which aliases the existing ico/<size>/<name>.png files into
themes/qet/<size>/<name>.png, and ico/themes/qet/index.theme. No file
moves. The four table entries that paired a 16 pixel file with a 22
pixel file of another name (ConductorSettings, DiagramAdd,
DiagramDelete, DialogInformation) get the 22 pixel file aliased under
the 16 pixel name.

QETApp::initIconTheme() registers the theme before initIcons() and makes
it current on every platform, so a desktop icon theme cannot replace
QET's icons. Icons are then looked up by name: QIcon::fromTheme() in
qeticons.cpp and in the few places that built a QIcon from a resource
path directly, and theme="..." on the iconsets in .ui files, with the
resource path kept as fallback. Flags, color swatches, application and
MIME icons stay on their paths.

One entry does not go through the theme. The elements panel draws the
project root with ProjectFileGP in the 50 pixel slot it reserves for
element previews, and the name "project" also carries the 128 pixel
file the configuration dialog uses. On a 2x display Qt's loader picks
that file for a 50 pixel request and fills the slot. ProjectFileGP
loads the 16 and 22 pixel files directly, as before.

tests/qttest/tst_qeticons: every name in the theme resolves, the four
aliases resolve at 22 pixels, a Fusion tool button shows its icon at
3:1 with disabled weaker than enabled, and the project root icon stays
at 22 pixels or less when asked for 50 at 2x while the configuration
dialog still gets its 128 pixel file. The rendering helpers shared
with tst_qetpalette moved to tests/qttest/inkcontrast.h.
2026-09-17 05:41:50 -05:00

769 lines
25 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConductorPropertiesWidget</class>
<widget class="QWidget" name="ConductorPropertiesWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>666</width>
<height>418</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="type">
<attribute name="title">
<string>Type</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget_2">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="Multifilaire">
<attribute name="title">
<string>&amp;Multifilaire</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QGroupBox" name="m_multiwires_gb">
<property name="minimumSize">
<size>
<width>600</width>
<height>0</height>
</size>
</property>
<property name="title">
<string>&amp;Multifilaire</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="4" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Couleur du texte:</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Couleur du conducteur</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="m_available_autonum_cb"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="m_text_le">
<property name="toolTip">
<string>Texte</string>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Tension / Protocole :</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="m_autonum_label">
<property name="text">
<string>Autonumérotation</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="KColorButton" name="m_text_color_kpb"/>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="m_text_size_sb">
<property name="toolTip">
<string>Taille du texte</string>
</property>
<property name="wrapping">
<bool>false</bool>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::UpDownArrows</enum>
</property>
<property name="prefix">
<string/>
</property>
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>99</number>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLineEdit" name="m_tension_protocol_le">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Section du conducteur</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="m_show_text_cb">
<property name="toolTip">
<string>Texte visible</string>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="m_one_text_per_folio_cb">
<property name="toolTip">
<string>activer l'option un texte par potentiel</string>
</property>
<property name="text">
<string>Afficher un texte de potentiel par folio. </string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Fonction :</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="5">
<layout class="QGridLayout" name="m_text_angle_gl">
<item row="1" column="0">
<widget class="QComboBox" name="m_verti_cb">
<item>
<property name="text">
<string>Vertical à gauche</string>
</property>
</item>
<item>
<property name="text">
<string>Vertical à droite</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Position et rotation du texte de conducteur :</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="m_horiz_cb">
<item>
<property name="text">
<string>Horizontal en haut</string>
</property>
</item>
<item>
<property name="text">
<string>Horizontal en bas</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="7" column="0" colspan="2">
<layout class="QVBoxLayout" name="m_autonum_layout"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Texte :</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QLineEdit" name="m_wire_color_le"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Taille du texte :</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QPushButton" name="m_edit_autonum_pb">
<property name="toolTip">
<string>éditer les numérotations</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="configure" resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLineEdit" name="m_function_le">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QLineEdit" name="m_wire_section_le"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Formule du texte :</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="m_formula_le"/>
</item>
<item row="6" column="3">
<widget class="QLabel" name="label_15">
<property name="text">
<string>cable</string>
</property>
</widget>
</item>
<item row="6" column="4">
<widget class="QLineEdit" name="m_cable_le"/>
</item>
<item row="7" column="3">
<widget class="QLabel" name="label_16">
<property name="text">
<string>bus</string>
</property>
</widget>
</item>
<item row="7" column="4">
<widget class="QLineEdit" name="m_bus_le"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_2">
<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="Unifilaire">
<attribute name="title">
<string>Unifilaire</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QGroupBox" name="m_singlewire_gb">
<property name="maximumSize">
<size>
<width>450</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Unifilaire</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" rowspan="3">
<widget class="QLabel" name="m_preview_label">
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="m_phase_sb">
<property name="toolTip">
<string>Nombre de phase</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>3</number>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="m_update_preview_pb">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="m_neutral_cb">
<property name="toolTip">
<string>Neutre</string>
</property>
<property name="text">
<string>neutre</string>
</property>
<property name="icon">
<iconset theme="neutral" resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/neutral.png</normaloff>:/ico/16x16/neutral.png</iconset>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="m_earth_cb">
<property name="toolTip">
<string>Terre</string>
</property>
<property name="text">
<string>terre</string>
</property>
<property name="icon">
<iconset theme="ground" resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/ground.png</normaloff>:/ico/16x16/ground.png</iconset>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="m_phase_cb">
<property name="toolTip">
<string>Phase</string>
</property>
<property name="text">
<string>phase</string>
</property>
<property name="icon">
<iconset theme="phase" resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/phase.png</normaloff>:/ico/16x16/phase.png</iconset>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QSlider" name="m_phase_slider">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Nombre de phase</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>3</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="m_pen_cb">
<property name="toolTip">
<string>Protective Earth Neutral</string>
</property>
<property name="text">
<string>PEN</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_3">
<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>
</item>
</layout>
</widget>
<widget class="QWidget" name="appearance">
<attribute name="title">
<string>Apparence</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="1">
<widget class="KColorButton" name="m_color_kpb"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Taille :</string>
</property>
</widget>
</item>
<item row="4" column="1">
<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>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="toolTip">
<string>Style du conducteur</string>
</property>
<property name="text">
<string>Style :</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="m_color_2_gb">
<property name="title">
<string>Couleur secondaire :</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Taille de trait :</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="m_dash_size_sb">
<property name="suffix">
<string>px</string>
</property>
<property name="minimum">
<number>2</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Couleur :</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KColorButton" name="m_color_2_kpb"/>
</item>
</layout>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="m_cond_size_sb">
<property name="minimum">
<double>0.400000000000000</double>
</property>
<property name="maximum">
<double>20.000000000000000</double>
</property>
<property name="singleStep">
<double>0.200000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="m_line_style_cb">
<property name="toolTip">
<string>Style du conducteur</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="toolTip">
<string>Couleur du conducteur</string>
</property>
<property name="text">
<string>Couleur :</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorButton</class>
<extends>QPushButton</extends>
<header>kcolorbutton.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>tabWidget_2</tabstop>
<tabstop>m_multiwires_gb</tabstop>
<tabstop>m_one_text_per_folio_cb</tabstop>
<tabstop>m_text_size_sb</tabstop>
<tabstop>m_formula_le</tabstop>
<tabstop>m_text_le</tabstop>
<tabstop>m_show_text_cb</tabstop>
<tabstop>m_text_color_kpb</tabstop>
<tabstop>m_available_autonum_cb</tabstop>
<tabstop>m_edit_autonum_pb</tabstop>
<tabstop>m_function_le</tabstop>
<tabstop>m_tension_protocol_le</tabstop>
<tabstop>m_wire_color_le</tabstop>
<tabstop>m_wire_section_le</tabstop>
<tabstop>m_cable_le</tabstop>
<tabstop>m_bus_le</tabstop>
<tabstop>m_verti_cb</tabstop>
<tabstop>m_horiz_cb</tabstop>
<tabstop>m_singlewire_gb</tabstop>
<tabstop>m_phase_sb</tabstop>
<tabstop>m_update_preview_pb</tabstop>
<tabstop>m_neutral_cb</tabstop>
<tabstop>m_earth_cb</tabstop>
<tabstop>m_phase_cb</tabstop>
<tabstop>m_phase_slider</tabstop>
<tabstop>m_pen_cb</tabstop>
<tabstop>m_color_kpb</tabstop>
<tabstop>m_color_2_gb</tabstop>
<tabstop>m_dash_size_sb</tabstop>
<tabstop>m_color_2_kpb</tabstop>
<tabstop>m_cond_size_sb</tabstop>
<tabstop>m_line_style_cb</tabstop>
</tabstops>
<resources>
<include location="../../qelectrotech.qrc"/>
</resources>
<connections>
<connection>
<sender>m_phase_slider</sender>
<signal>valueChanged(int)</signal>
<receiver>m_phase_sb</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel">
<x>238</x>
<y>324</y>
</hint>
<hint type="destinationlabel">
<x>337</x>
<y>332</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_phase_sb</sender>
<signal>valueChanged(int)</signal>
<receiver>m_phase_slider</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel">
<x>356</x>
<y>322</y>
</hint>
<hint type="destinationlabel">
<x>207</x>
<y>325</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_phase_cb</sender>
<signal>toggled(bool)</signal>
<receiver>m_phase_slider</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>152</x>
<y>328</y>
</hint>
<hint type="destinationlabel">
<x>208</x>
<y>329</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_phase_cb</sender>
<signal>toggled(bool)</signal>
<receiver>m_phase_sb</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>106</x>
<y>326</y>
</hint>
<hint type="destinationlabel">
<x>338</x>
<y>323</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_earth_cb</sender>
<signal>clicked()</signal>
<receiver>m_update_preview_pb</receiver>
<slot>click()</slot>
<hints>
<hint type="sourcelabel">
<x>142</x>
<y>249</y>
</hint>
<hint type="destinationlabel">
<x>228</x>
<y>249</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_neutral_cb</sender>
<signal>clicked()</signal>
<receiver>m_update_preview_pb</receiver>
<slot>click()</slot>
<hints>
<hint type="sourcelabel">
<x>158</x>
<y>304</y>
</hint>
<hint type="destinationlabel">
<x>269</x>
<y>246</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_phase_cb</sender>
<signal>clicked()</signal>
<receiver>m_update_preview_pb</receiver>
<slot>click()</slot>
<hints>
<hint type="sourcelabel">
<x>126</x>
<y>340</y>
</hint>
<hint type="destinationlabel">
<x>254</x>
<y>248</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_pen_cb</sender>
<signal>clicked()</signal>
<receiver>m_update_preview_pb</receiver>
<slot>click()</slot>
<hints>
<hint type="sourcelabel">
<x>222</x>
<y>276</y>
</hint>
<hint type="destinationlabel">
<x>242</x>
<y>245</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_phase_sb</sender>
<signal>valueChanged(int)</signal>
<receiver>m_update_preview_pb</receiver>
<slot>click()</slot>
<hints>
<hint type="sourcelabel">
<x>357</x>
<y>340</y>
</hint>
<hint type="destinationlabel">
<x>305</x>
<y>248</y>
</hint>
</hints>
</connection>
</connections>
</ui>