mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-05 20:20:52 +01:00
Add new conductors properties color and section
This commit is contained in:
@@ -82,6 +82,8 @@ void ConductorPropertiesWidget::setProperties(const ConductorProperties &propert
|
||||
ui->m_text_le -> setText (m_properties.text);
|
||||
ui->m_function_le -> setText (m_properties.m_function);
|
||||
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);
|
||||
ui->m_text_size_sb -> setValue (m_properties.text_size);
|
||||
ui->m_cond_size_sb -> setValue (m_properties.cond_size);
|
||||
ui->m_show_text_cb -> setChecked (m_properties.m_show_text);
|
||||
@@ -122,6 +124,8 @@ ConductorProperties ConductorPropertiesWidget::properties() const
|
||||
properties_.text = ui -> m_text_le -> text();
|
||||
properties_.m_function = ui -> m_function_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();
|
||||
properties_.text_size = ui -> m_text_size_sb -> value();
|
||||
properties_.cond_size = ui -> m_cond_size_sb -> value();
|
||||
properties_.m_show_text = ui -> m_show_text_cb -> isChecked();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="type">
|
||||
<attribute name="title">
|
||||
@@ -37,7 +37,14 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,0,0,0,0,0">
|
||||
<layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,0,0,0,0,0,0,0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="m_autonum_label">
|
||||
<property name="text">
|
||||
<string>Autonumérotation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
@@ -45,6 +52,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Couleur du conducteur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="m_available_autonum_cb"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="m_formula_le"/>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Fonction :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="m_function_le">
|
||||
<property name="clearButtonEnabled">
|
||||
@@ -52,6 +79,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" 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="6" column="1">
|
||||
<widget class="QLineEdit" name="m_tension_protocol_le">
|
||||
<property name="clearButtonEnabled">
|
||||
@@ -59,6 +96,27 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Tension / Protocole :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Texte :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Formule du texte :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QCheckBox" name="m_show_text_cb">
|
||||
<property name="toolTip">
|
||||
@@ -104,57 +162,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="m_formula_le"/>
|
||||
</item>
|
||||
<item row="2" 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="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Texte :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Fonction :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Formule du texte :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Tension / Protocole :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="m_autonum_label">
|
||||
<property name="text">
|
||||
<string>Autonumérotation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="m_available_autonum_cb"/>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="m_edit_autonum_pb">
|
||||
<property name="toolTip">
|
||||
@@ -169,6 +176,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Section du conducteur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="m_wire_color_le"/>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="m_wire_section_le"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -1782,6 +1782,10 @@ QStringList DynamicTextItemDelegate::availableInfo(DynamicElementTextItem *deti)
|
||||
qstrl << "function";
|
||||
if(!cond->properties().m_tension_protocol.isEmpty())
|
||||
qstrl << "tension-protocol";
|
||||
if(!cond->properties().m_wire_color.isEmpty())
|
||||
qstrl << "couleur-conducteur";
|
||||
if(!cond->properties().m_wire_section.isEmpty())
|
||||
qstrl << "section-conducteur";
|
||||
}
|
||||
|
||||
return qstrl;
|
||||
|
||||
@@ -279,6 +279,12 @@ void LinkSingleElementWidget::buildTree()
|
||||
str_list << cp.m_tension_protocol;
|
||||
if (!str_list.last().isEmpty())
|
||||
search_list << str_list.last();
|
||||
str_list << cp.m_wire_color;
|
||||
if (!str_list.last().isEmpty())
|
||||
search_list << str_list.last();
|
||||
str_list << cp.m_wire_section;
|
||||
if (!str_list.last().isEmpty())
|
||||
search_list << str_list.last();
|
||||
}
|
||||
else
|
||||
str_list << "" << "" << "";
|
||||
@@ -421,11 +427,11 @@ void LinkSingleElementWidget::setUpHeaderLabels()
|
||||
{
|
||||
if (settings.value("genericpanel/folio", false).toBool())
|
||||
{
|
||||
list << tr("N° de fil") << tr("Fonction") << tr("Tension / Protocole") << tr("Label de folio") << tr("Position") << tr("Titre de folio");
|
||||
list << tr("N° de fil") << tr("Fonction") << tr("Tension / Protocole") << tr("Couleur du conducteur") << tr("Section du conducteur") << tr("Label de folio") << tr("Position") << tr("Titre de folio");
|
||||
}
|
||||
else
|
||||
{
|
||||
list << tr("N° de fil") << tr("Fonction") << tr("Tension / Protocole") << tr("N° de folio") << tr("Position") << tr("Titre de folio");
|
||||
list << tr("N° de fil") << tr("Fonction") << tr("Tension / Protocole") << tr("Couleur du conducteur") << tr("Section du conducteur") << tr("N° de folio") << tr("Position") << tr("Titre de folio");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,6 +191,10 @@ ConductorProperties PotentialSelectorDialog::chosenProperties(QList<ConductorPro
|
||||
text.append(tr("\nFonction : %1").arg(cp.m_function));
|
||||
if(!cp.m_tension_protocol.isEmpty())
|
||||
text.append(tr("\nTension/protocole : %1").arg(cp.m_tension_protocol));
|
||||
if(!cp.m_wire_color.isEmpty())
|
||||
text.append(tr("\nCouleur du conducteur : %1").arg(cp.m_wire_color));
|
||||
if(!cp.m_wire_section.isEmpty())
|
||||
text.append(tr("\nSection du conducteur : %1").arg(cp.m_wire_section));
|
||||
|
||||
QRadioButton *b = new QRadioButton(text, &dialog);
|
||||
layout.addWidget(b);
|
||||
@@ -272,6 +276,10 @@ void PotentialSelectorDialog::buildWidget()
|
||||
text1.append(tr("\nFonction : %1").arg(cp1.m_function));
|
||||
if(!cp1.m_tension_protocol.isEmpty())
|
||||
text1.append(tr("\nTension/protocole : %1").arg(cp1.m_tension_protocol));
|
||||
if(!cp1.m_wire_color.isEmpty())
|
||||
text1.append(tr("\nCouleur du conducteur : %1").arg(cp1.m_wire_color));
|
||||
if(!cp1.m_wire_section.isEmpty())
|
||||
text1.append(tr("\nSection du conducteur : %1").arg(cp1.m_wire_section));
|
||||
|
||||
QString text2(tr("%n conducteurs composent le potentiel suivant :", "", m_potential_selector->m_conductor_number_2));
|
||||
ConductorProperties cp2;
|
||||
@@ -284,6 +292,10 @@ void PotentialSelectorDialog::buildWidget()
|
||||
text2.append(tr("\nFonction : %1").arg(cp2.m_function));
|
||||
if(!cp2.m_tension_protocol.isEmpty())
|
||||
text2.append(tr("\nTension/protocole : %1").arg(cp2.m_tension_protocol));
|
||||
if(!cp2.m_wire_color.isEmpty())
|
||||
text2.append(tr("\nCouleur du conducteur : %1").arg(cp2.m_wire_color));
|
||||
if(!cp2.m_wire_section.isEmpty())
|
||||
text2.append(tr("\nSection du conducteur : %1").arg(cp2.m_wire_section));
|
||||
|
||||
QRadioButton *rb1 = new QRadioButton(text1, this);
|
||||
QRadioButton *rb2 = new QRadioButton(text2, this);
|
||||
|
||||
Reference in New Issue
Block a user