mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 09:40:52 +01:00
WIP: Add Kabel to qet
This commit is contained in:
@@ -73,7 +73,7 @@ void ConductorPropertiesWidget::setProperties(
|
||||
{
|
||||
if (m_properties == properties)
|
||||
return;
|
||||
|
||||
|
||||
m_properties = properties;
|
||||
|
||||
int index = ui -> m_line_style_cb -> findData(QPen(m_properties.style));
|
||||
@@ -84,6 +84,8 @@ void ConductorPropertiesWidget::setProperties(
|
||||
ui->m_formula_le -> setText (m_properties.m_formula);
|
||||
ui->m_text_le -> setText (m_properties.text);
|
||||
ui->m_function_le -> setText (m_properties.m_function);
|
||||
ui->m_cable_le -> setText (m_properties.m_cable);
|
||||
ui->m_bus_le -> setText (m_properties.m_bus);
|
||||
ui->m_tension_protocol_le -> setText (m_properties.m_tension_protocol);
|
||||
ui->m_wire_color_le -> setText (m_properties.m_wire_color);
|
||||
ui->m_wire_section_le -> setText (m_properties.m_wire_section);
|
||||
@@ -128,6 +130,8 @@ ConductorProperties ConductorPropertiesWidget::properties() const
|
||||
properties_.text = ui -> m_text_le -> text();
|
||||
properties_.text_color = ui -> m_text_color_kpb->color();
|
||||
properties_.m_function = ui -> m_function_le->text();
|
||||
properties_.m_cable = ui -> m_cable_le->text();
|
||||
properties_.m_bus = ui -> m_bus_le->text();
|
||||
properties_.m_tension_protocol = ui -> m_tension_protocol_le->text();
|
||||
properties_.m_wire_color = ui -> m_wire_color_le->text();
|
||||
properties_.m_wire_section = ui -> m_wire_section_le->text();
|
||||
@@ -237,6 +241,12 @@ void ConductorPropertiesWidget::initWidget()
|
||||
connect(ui->m_formula_le, &QLineEdit::textChanged, [this](QString text) {this->ui->m_text_le->setEnabled(text.isEmpty());});
|
||||
ui->m_multiwires_gb->setChecked(true);
|
||||
ui->m_singlewire_gb->setChecked(true);
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO Add Kabel and Bus to qet")
|
||||
#else
|
||||
ui->m_cable_le->setDisabled(true);
|
||||
ui->m_bus_le->setDisabled(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,7 +272,7 @@ void ConductorPropertiesWidget::setConductorType(ConductorProperties::ConductorT
|
||||
@brief ConductorPropertiesWidget::updatePreview
|
||||
Update the preview for single lien
|
||||
@param b true: update from the value displayed by this widget
|
||||
false: update from the properties given at the constructor of this widget
|
||||
false: update from the properties given at the constructor of this widget
|
||||
*/
|
||||
void ConductorPropertiesWidget::updatePreview(bool b) {
|
||||
const QRect pixmap_rect(0, 0, 96, 96);
|
||||
|
||||
@@ -52,16 +52,50 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="m_formula_le"/>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Couleur du texte:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="m_function_le">
|
||||
<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">
|
||||
@@ -84,45 +118,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Texte :</string>
|
||||
<item row="2" column="4">
|
||||
<widget class="QLineEdit" name="m_tension_protocol_le">
|
||||
<property name="clearButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<item row="4" column="3">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Formule du texte :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" 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 resource="../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
||||
</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="3" column="3">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Couleur du conducteur</string>
|
||||
<string>Section du conducteur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -139,32 +145,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<layout class="QVBoxLayout" name="m_autonum_layout"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="m_available_autonum_cb"/>
|
||||
</item>
|
||||
<item row="5" 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="4" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Couleur du texte:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QLineEdit" name="m_wire_section_le"/>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="m_one_text_per_folio_cb">
|
||||
<property name="toolTip">
|
||||
@@ -175,10 +155,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QLineEdit" name="m_wire_color_le"/>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Fonction :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="5">
|
||||
<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">
|
||||
@@ -220,6 +204,19 @@
|
||||
</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">
|
||||
@@ -227,37 +224,60 @@
|
||||
</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="1" column="3">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Fonction :</string>
|
||||
</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="3" column="1">
|
||||
<widget class="QLineEdit" name="m_text_le">
|
||||
<item row="6" column="2">
|
||||
<widget class="QPushButton" name="m_edit_autonum_pb">
|
||||
<property name="toolTip">
|
||||
<string>Texte</string>
|
||||
<string>éditer les numérotations</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset 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>
|
||||
|
||||
Reference in New Issue
Block a user