diff --git a/sources/ui/conductorpropertiesdialog.cpp b/sources/ui/conductorpropertiesdialog.cpp index c27642ffe..34487c0fe 100644 --- a/sources/ui/conductorpropertiesdialog.cpp +++ b/sources/ui/conductorpropertiesdialog.cpp @@ -40,7 +40,7 @@ ConductorPropertiesDialog::ConductorPropertiesDialog(Conductor *conductor, QWidg conductor -> relatedPotentialConductors().size()) { m_cpw->setDisabledShowText(); } - ui -> main_layout -> insertWidget(1, m_cpw); + ui -> main_layout -> insertWidget(0, m_cpw); } /** diff --git a/sources/ui/conductorpropertiesdialog.ui b/sources/ui/conductorpropertiesdialog.ui index be6573b3e..7822bcf99 100644 --- a/sources/ui/conductorpropertiesdialog.ui +++ b/sources/ui/conductorpropertiesdialog.ui @@ -6,27 +6,14 @@ 0 0 - 430 - 300 + 485 + 66 Éditer les propriétés d'un conducteur - - - - Qt::Vertical - - - - 20 - 40 - - - - diff --git a/sources/ui/conductorpropertieswidget.cpp b/sources/ui/conductorpropertieswidget.cpp index 3049833ef..ef2fcb34d 100644 --- a/sources/ui/conductorpropertieswidget.cpp +++ b/sources/ui/conductorpropertieswidget.cpp @@ -97,8 +97,8 @@ void ConductorPropertiesWidget::setProperties(const ConductorProperties &propert */ 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().style(); @@ -177,9 +177,11 @@ void ConductorPropertiesWidget::initWidget() { 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::initWidget() { 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; } } diff --git a/sources/ui/conductorpropertieswidget.ui b/sources/ui/conductorpropertieswidget.ui index 03ba1624d..72e782837 100644 --- a/sources/ui/conductorpropertieswidget.ui +++ b/sources/ui/conductorpropertieswidget.ui @@ -6,348 +6,335 @@ 0 0 - 633 - 470 + 354 + 329 Form - + - - - Type de conducteur + + + 0 - - - - - Multifilaire - - - Multifilaire - - - - - - - - - - - 0 + + + Type + + + + + + Multifilaire - - 0 + + true - - 0 + + false - - - - - - Texte : - - - - - - - Texte - - - true - - - - - - - Taille : - - - - - - - Taille du texte - - - 5 - - - 9 - - - - - - - Texte visible - - - Visible - - - true - - - - - - - - - - - activer l'option un texte par potentiel - - - Afficher un texte de potentiel par folio. - - - - - - - - - Rotation du texte de conducteur : - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - Vertical - - - Qt::AlignCenter - - - - - - - Horizontal - - - Qt::AlignCenter - - - - - - - - - - - - Unifilaire - - - Unifilaire - - - - - - - - - - - 0 + + + + + + + Texte : + + + + + + + Taille du texte + + + 5 + + + 9 + + + + + + + Taille : + + + + + + + Texte + + + true + + + + + + + Texte visible + + + Visible + + + true + + + + + + + + + + + activer l'option un texte par potentiel + + + Afficher un texte de potentiel par folio. + + + + + + + + + + + Vertical + + + Qt::AlignCenter + + + + + + + Horizontal + + + Qt::AlignCenter + + + + + + + Rotation du texte de conducteur : + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + + Unifilaire - - 9 + + false - - 0 + + true - - 0 + + false - - 0 + + + + + + + + 0 + 0 + + + + Nombre de phase + + + 1 + + + 3 + + + Qt::Horizontal + + + + + + + Neutre + + + neutre + + + + :/ico/16x16/neutral.png:/ico/16x16/neutral.png + + + + + + + Phase + + + phase + + + + :/ico/16x16/phase.png:/ico/16x16/phase.png + + + + + + + Nombre de phase + + + 1 + + + 3 + + + + + + + Protective Earth Neutral + + + PEN + + + + + + + Terre + + + terre + + + + :/ico/16x16/ground.png:/ico/16x16/ground.png + + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + + + + + + + + + + + Apparence + + + + + + Couleur du conducteur - - - - - - - 0 - 0 - - - - Nombre de phase - - - 1 - - - 3 - - - Qt::Horizontal - - - - - - - Neutre - - - neutre - - - - :/ico/16x16/neutral.png:/ico/16x16/neutral.png - - - - - - - Phase - - - phase - - - - :/ico/16x16/phase.png:/ico/16x16/phase.png - - - - - - - Nombre de phase - - - 1 - - - 3 - - - - - - - Protective Earth Neutral - - - PEN - - - - - - - Terre - - - terre - - - - :/ico/16x16/ground.png:/ico/16x16/ground.png - - - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - - - - - - - - - - - - - - - Apparence du conducteur - - - - - - Style du conducteur - - - - - - - Couleur du conducteur - - - Couleur : - - - - - - - Couleur du conducteur - - - - - - false - - - - - - false - - - - - - - Style du conducteur - - - Style : - - - - + + Couleur : + + + + + + + Style du conducteur + + + Style : + + + + + + + Style du conducteur + + + + + + + Couleur du conducteur + + + + + + false + + + + + + false + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + @@ -356,22 +343,6 @@ - - m_multi_rb - toggled(bool) - m_multi_gb - setEnabled(bool) - - - 88 - 73 - - - 54 - 99 - - - m_phase_slider valueChanged(int) @@ -404,22 +375,6 @@ - - m_single_rb - toggled(bool) - m_single_gb - setEnabled(bool) - - - 78 - 192 - - - 81 - 250 - - - m_phase_cb toggled(bool)