Files
qelectrotech-source-mirror/sources/TerminalStrip/ui/terminalstripeditor.ui
T
Laurent Trinques 015811d243 Terminal strip editor: add spare terminals, numbered, counted in the nomenclature
A spare (reserved) terminal is a terminal of a strip which is drawn on no
folio. RealTerminal already foresaw it ("a terminal set by user but not
present on any folio") but every terminal needed an element.

- RealTerminal::createSpare(): a terminal without element, with its own
  data (label, type, function, led, informations: section, width, catalog
  terminal, color, manufacturer...). Saved in the strip:
  <real_terminal spare_uuid="..." type="..." function="..."><informations>
  Older versions ignore these terminals.
- TerminalStrip::insertSpareTerminals() / insertTerminals(): insert at a
  position of the strip. Undoable commands AddSpareTerminalsCommand and
  ChangeSpareTerminalDataCommand.
- Terminal strip editor: "Add spare terminals..." button. The terminals
  are inserted after the selected terminal (at the end if none), numbered
  from its label ("X1:12" -> "X1:13", "X1:14", leading zeros kept), with
  its properties if asked. The labels can be changed or removed in the
  table, like the other cells; the Xref column shows "Spare". Moving a
  spare terminal to the independent terminals removes it (undoable).
- Nomenclature: the spare terminals are in the new spare_terminal table,
  added to element_nomenclature_view (UNION ALL, same columns), after the
  folios, in the order of their strip. exclude_from_bom is honoured.
- The modified cells of the editor model are kept by real terminal, not by
  element, since a spare terminal has none.
2026-10-18 16:34:41 +02:00

411 lines
13 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TerminalStripEditor</class>
<widget class="QWidget" name="TerminalStripEditor">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>873</width>
<height>483</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTabWidget" name="m_tab_widget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="m_layout_tab">
<attribute name="title">
<string>Disposition</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QTableView" name="m_table_widget"/>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QGridLayout" name="gridLayout_2">
<property name="topMargin">
<number>0</number>
</property>
<item row="8" column="1" colspan="2">
<widget class="QComboBox" name="m_led_cb">
<item>
<property name="text">
<string>Without</string>
</property>
</item>
<item>
<property name="text">
<string>With</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="m_move_to_pb">
<property name="toolTip">
<string>Make the move</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset theme="dialog-ok"/>
</property>
</widget>
</item>
<item row="14" column="1" colspan="2">
<widget class="KColorCombo" name="m_bridge_color_cb"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Stage :</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Type:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Bridge color :</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2">
<widget class="QComboBox" name="m_type_cb">
<item>
<property name="text">
<string>Generic</string>
</property>
</item>
<item>
<property name="text">
<string>Fuse</string>
</property>
</item>
<item>
<property name="text">
<string>Sectionable</string>
</property>
</item>
<item>
<property name="text">
<string>Diode</string>
</property>
</item>
<item>
<property name="text">
<string>Ground</string>
</property>
</item>
<item>
<property name="text">
<string>Anti-parallel diodes</string>
</property>
</item>
<item>
<property name="text">
<string>Resistor</string>
</property>
</item>
<item>
<property name="text">
<string>Varistor</string>
</property>
</item>
<item>
<property name="text">
<string>Test socket</string>
</property>
</item>
<item>
<property name="text">
<string>Diode (reversed)</string>
</property>
</item>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>LED :</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_cable">
<property name="text">
<string>Cable :</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="9" column="1" colspan="2">
<widget class="QLineEdit" name="m_cable_le">
<property name="toolTip">
<string>Name of the cable of the selected terminals</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="2">
<widget class="QPushButton" name="m_cable_apply_pb">
<property name="toolTip">
<string>Set the cable name to all the selected terminals</string>
</property>
<property name="text">
<string>Apply the cable to the selection</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="3">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="m_manufacturer_label">
<property name="text">
<string>Manufacturer :</string>
</property>
</widget>
</item>
<item row="15" column="1" colspan="2">
<widget class="QComboBox" name="m_manufacturer_cb">
<property name="toolTip">
<string>Manufacturer of the terminals proposed in the Width column</string>
</property>
</widget>
</item>
<item row="16" column="1" colspan="2">
<widget class="QPushButton" name="m_add_spare_pb">
<property name="toolTip">
<string>Add spare terminals, on no folio, after the selected terminal</string>
</property>
<property name="text">
<string>Add spare terminals...</string>
</property>
</widget>
</item>
<item row="17" column="0">
<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="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Function :</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="m_move_to_label">
<property name="text">
<string>Move to :</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="7" column="1" colspan="2">
<widget class="QComboBox" name="m_function_cb">
<item>
<property name="text">
<string>Generic</string>
</property>
</item>
<item>
<property name="text">
<string>Phase</string>
</property>
</item>
<item>
<property name="text">
<string>Neutral</string>
</property>
</item>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="m_move_to_cb">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QSpinBox" name="m_level_sb">
<property name="maximum">
<number>6</number>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QPushButton" name="m_auto_ordering_pb">
<property name="text">
<string>Automatic position</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QPushButton" name="m_group_terminals_pb">
<property name="text">
<string>Group the terminals</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QPushButton" name="m_ungroup_pb">
<property name="text">
<string>Ungroup the terminals</string>
</property>
</widget>
</item>
<item row="12" column="1" colspan="2">
<widget class="QPushButton" name="m_bridge_terminals_pb">
<property name="text">
<string>Bridging the terminals</string>
</property>
</widget>
</item>
<item row="13" column="1" colspan="2">
<widget class="QPushButton" name="m_unbridge_terminals_pb">
<property name="text">
<string>Unbridge the terminals</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="m_data_tab">
<attribute name="title">
<string>Properties</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Name:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Comment :</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Plant:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="m_location_le"/>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="m_installation_le"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="m_comment_le"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Location :</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="m_name_le"/>
</item>
<item row="5" column="0" colspan="2">
<widget class="QPlainTextEdit" name="m_description_te"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KColorCombo</class>
<extends>QComboBox</extends>
<header>kcolorcombo.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../../../qelectrotech.qrc"/>
</resources>
<connections/>
</ui>