[qet] [4164] Conductor properties widget : minor change |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4164
Author: blacksun
Date: 2015-08-26 23:46:47 +0200 (Wed, 26 Aug 2015)
Log Message:
-----------
Conductor properties widget : minor change
Modified Paths:
--------------
trunk/sources/ui/conductorpropertiesdialog.cpp
trunk/sources/ui/conductorpropertiesdialog.ui
trunk/sources/ui/conductorpropertieswidget.cpp
trunk/sources/ui/conductorpropertieswidget.ui
Modified: trunk/sources/ui/conductorpropertiesdialog.cpp
===================================================================
--- trunk/sources/ui/conductorpropertiesdialog.cpp 2015-08-26 21:17:55 UTC (rev 4163)
+++ trunk/sources/ui/conductorpropertiesdialog.cpp 2015-08-26 21:46:47 UTC (rev 4164)
@@ -40,7 +40,7 @@
conductor -> relatedPotentialConductors().size()) {
m_cpw->setDisabledShowText();
}
- ui -> main_layout -> insertWidget(1, m_cpw);
+ ui -> main_layout -> insertWidget(0, m_cpw);
}
/**
Modified: trunk/sources/ui/conductorpropertiesdialog.ui
===================================================================
--- trunk/sources/ui/conductorpropertiesdialog.ui 2015-08-26 21:17:55 UTC (rev 4163)
+++ trunk/sources/ui/conductorpropertiesdialog.ui 2015-08-26 21:46:47 UTC (rev 4164)
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>430</width>
- <height>300</height>
+ <width>485</width>
+ <height>66</height>
</rect>
</property>
<property name="windowTitle">
@@ -15,19 +15,6 @@
</property>
<layout class="QVBoxLayout" name="main_layout">
<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>
- <item>
<widget class="QCheckBox" name="m_apply_all_cb">
<property name="text">
<string>Appliquer les propriétés à l'ensemble des conducteurs de ce potentiel</string>
Modified: trunk/sources/ui/conductorpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/conductorpropertieswidget.cpp 2015-08-26 21:17:55 UTC (rev 4163)
+++ trunk/sources/ui/conductorpropertieswidget.cpp 2015-08-26 21:46:47 UTC (rev 4164)
@@ -97,8 +97,8 @@
*/
ConductorProperties ConductorPropertiesWidget::properties() const {
ConductorProperties properties_;
- if (ui -> m_multi_rb -> isChecked()) properties_.type = ConductorProperties::Multi;
- else if (ui -> m_single_rb -> isChecked()) properties_.type = ConductorProperties::Single;
+ if (ui -> m_multiwires_gb -> isChecked()) properties_.type = ConductorProperties::Multi;
+ else if (ui -> m_singlewire_gb -> isChecked()) properties_.type = ConductorProperties::Single;
properties_.color = ui -> m_color_pb->palette().color(QPalette::Button);
properties_.style = ui -> m_line_style_cb->itemData(ui->m_line_style_cb->currentIndex()).value<QPen>().style();
@@ -177,9 +177,11 @@
ui -> m_line_style_cb -> addItem(tr("Traits et points", "conductor style: dashed and dotted line"), QPen(Qt::DashDotLine));
ui -> m_update_preview_pb -> setHidden(true);
- //Check this checkbox for init the associated groupbox
- ui -> m_single_rb -> setChecked(true);
- ui -> m_multi_rb -> setChecked(true);
+
+ connect(ui->m_multiwires_gb, &QGroupBox::toggled, [this](bool toggle) {this->ui->m_singlewire_gb->setChecked(!toggle);});
+ connect(ui->m_singlewire_gb, &QGroupBox::toggled, [this](bool toggle) {this->ui->m_multiwires_gb->setChecked(!toggle);});
+ ui->m_multiwires_gb->setChecked(true);
+ ui->m_singlewire_gb->setChecked(true);
}
/**
@@ -190,13 +192,13 @@
void ConductorPropertiesWidget::setConductorType(ConductorProperties::ConductorType type) {
switch (type) {
case ConductorProperties::Multi:
- ui -> m_multi_rb -> setChecked(true);
+ ui -> m_multiwires_gb -> setChecked(true);
break;
case ConductorProperties::Single:
- ui -> m_single_rb -> setChecked(true);
+ ui -> m_singlewire_gb -> setChecked(true);
break;
default:
- ui -> m_multi_rb -> setChecked(true);
+ ui -> m_multiwires_gb -> setChecked(true);
break;
}
}
Modified: trunk/sources/ui/conductorpropertieswidget.ui
===================================================================
--- trunk/sources/ui/conductorpropertieswidget.ui 2015-08-26 21:17:55 UTC (rev 4163)
+++ trunk/sources/ui/conductorpropertieswidget.ui 2015-08-26 21:46:47 UTC (rev 4164)
@@ -6,350 +6,337 @@
<rect>
<x>0</x>
<y>0</y>
- <width>633</width>
- <height>470</height>
+ <width>354</width>
+ <height>329</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QGroupBox" name="m_type_gb">
- <property name="title">
- <string>Type de conducteur</string>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QRadioButton" name="m_multi_rb">
- <property name="toolTip">
- <string>Multifilaire</string>
- </property>
- <property name="text">
- <string>Multifilaire</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="m_multi_gb">
- <property name="title">
- <string/>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="topMargin">
- <number>0</number>
+ <widget class="QWidget" name="type">
+ <attribute name="title">
+ <string>Type</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QGroupBox" name="m_multiwires_gb">
+ <property name="title">
+ <string>Multifilaire</string>
</property>
- <property name="rightMargin">
- <number>0</number>
+ <property name="checkable">
+ <bool>true</bool>
</property>
- <property name="bottomMargin">
- <number>0</number>
+ <property name="checked">
+ <bool>false</bool>
</property>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Texte :</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="m_text_le">
- <property name="toolTip">
- <string>Texte</string>
- </property>
- <property name="clearButtonEnabled">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Taille :</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="m_text_size_sb">
- <property name="toolTip">
- <string>Taille du texte</string>
- </property>
- <property name="minimum">
- <number>5</number>
- </property>
- <property name="maximum">
- <number>9</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="m_show_text_cb">
- <property name="toolTip">
- <string>Texte visible</string>
- </property>
- <property name="text">
- <string>Visible</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="m_autonum_layout">
- <item>
- <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>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Rotation du texte de conducteur :</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QGridLayout" name="m_text_angle_gl">
- <item row="0" column="0">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Vertical</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Horizontal</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="m_single_rb">
- <property name="toolTip">
- <string>Unifilaire</string>
- </property>
- <property name="text">
- <string>Unifilaire</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="m_single_gb">
- <property name="title">
- <string/>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <property name="spacing">
- <number>0</number>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Texte :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QSpinBox" name="m_text_size_sb">
+ <property name="toolTip">
+ <string>Taille du texte</string>
+ </property>
+ <property name="minimum">
+ <number>5</number>
+ </property>
+ <property name="maximum">
+ <number>9</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Taille :</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" 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="0" column="4">
+ <widget class="QCheckBox" name="m_show_text_cb">
+ <property name="toolTip">
+ <string>Texte visible</string>
+ </property>
+ <property name="text">
+ <string>Visible</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="m_autonum_layout">
+ <item>
+ <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>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" name="m_text_angle_gl">
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Vertical</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Horizontal</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="2">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Rotation du texte de conducteur :</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="m_singlewire_gb">
+ <property name="title">
+ <string>Unifilaire</string>
</property>
- <property name="leftMargin">
- <number>9</number>
+ <property name="flat">
+ <bool>false</bool>
</property>
- <property name="topMargin">
- <number>0</number>
+ <property name="checkable">
+ <bool>true</bool>
</property>
- <property name="rightMargin">
- <number>0</number>
+ <property name="checked">
+ <bool>false</bool>
</property>
- <property name="bottomMargin">
- <number>0</number>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <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="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 resource="../../qelectrotech.qrc">
+ <normaloff>:/ico/16x16/neutral.png</normaloff>:/ico/16x16/neutral.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 resource="../../qelectrotech.qrc">
+ <normaloff>:/ico/16x16/phase.png</normaloff>:/ico/16x16/phase.png</iconset>
+ </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="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>
+ <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 resource="../../qelectrotech.qrc">
+ <normaloff>:/ico/16x16/ground.png</normaloff>:/ico/16x16/ground.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <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="0" column="2">
+ <widget class="QPushButton" name="m_update_preview_pb">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </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="0">
+ <widget class="QLabel" name="label_6">
+ <property name="toolTip">
+ <string>Couleur du conducteur</string>
</property>
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <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="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 resource="../../qelectrotech.qrc">
- <normaloff>:/ico/16x16/neutral.png</normaloff>:/ico/16x16/neutral.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 resource="../../qelectrotech.qrc">
- <normaloff>:/ico/16x16/phase.png</normaloff>:/ico/16x16/phase.png</iconset>
- </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="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>
- <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 resource="../../qelectrotech.qrc">
- <normaloff>:/ico/16x16/ground.png</normaloff>:/ico/16x16/ground.png</iconset>
- </property>
- </widget>
- </item>
- <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="0" column="2">
- <widget class="QPushButton" name="m_update_preview_pb">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
+ <property name="text">
+ <string>Couleur :</string>
+ </property>
+ </widget>
+ </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="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="1">
+ <widget class="QPushButton" name="m_color_pb">
+ <property name="toolTip">
+ <string>Couleur du conducteur</string>
+ </property>
+ <property name="accessibleName">
+ <string/>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" 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>
+ </layout>
+ </widget>
</widget>
</item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>Apparence du conducteur</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="3" column="2">
- <widget class="QComboBox" name="m_line_style_cb">
- <property name="toolTip">
- <string>Style du conducteur</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="label_6">
- <property name="toolTip">
- <string>Couleur du conducteur</string>
- </property>
- <property name="text">
- <string>Couleur :</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QPushButton" name="m_color_pb">
- <property name="toolTip">
- <string>Couleur du conducteur</string>
- </property>
- <property name="accessibleName">
- <string/>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="label_7">
- <property name="toolTip">
- <string>Style du conducteur</string>
- </property>
- <property name="text">
- <string>Style :</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
</layout>
</widget>
<resources>
@@ -357,22 +344,6 @@
</resources>
<connections>
<connection>
- <sender>m_multi_rb</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_multi_gb</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>88</x>
- <y>73</y>
- </hint>
- <hint type="destinationlabel">
- <x>54</x>
- <y>99</y>
- </hint>
- </hints>
- </connection>
- <connection>
<sender>m_phase_slider</sender>
<signal>valueChanged(int)</signal>
<receiver>m_phase_sb</receiver>
@@ -405,22 +376,6 @@
</hints>
</connection>
<connection>
- <sender>m_single_rb</sender>
- <signal>toggled(bool)</signal>
- <receiver>m_single_gb</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>78</x>
- <y>192</y>
- </hint>
- <hint type="destinationlabel">
- <x>81</x>
- <y>250</y>
- </hint>
- </hints>
- </connection>
- <connection>
<sender>m_phase_cb</sender>
<signal>toggled(bool)</signal>
<receiver>m_phase_slider</receiver>