mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
0.6 branch : fix wrong behavior, in some condition when two folios report are linked together,
the value of the funtion and tension/protocol of the selected potential are not transmit to the other report. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.60@5107 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -57,7 +57,7 @@ class NewConductorPotentialSelector : public AbstractPotentialSelector
|
||||
m_is_valid = true;
|
||||
}
|
||||
|
||||
bool isValid() const {return m_is_valid;}
|
||||
bool isValid() const override {return m_is_valid;}
|
||||
|
||||
/**
|
||||
* @brief getPotential
|
||||
@@ -110,7 +110,7 @@ class NewConductorPotentialSelector : public AbstractPotentialSelector
|
||||
properties_list.append(c->properties());
|
||||
}
|
||||
|
||||
~NewConductorPotentialSelector() {}
|
||||
~NewConductorPotentialSelector() override {}
|
||||
|
||||
private :
|
||||
bool m_is_valid;
|
||||
@@ -155,9 +155,9 @@ class LinkReportPotentialSelector : public AbstractPotentialSelector
|
||||
}
|
||||
}
|
||||
|
||||
~LinkReportPotentialSelector() {}
|
||||
~LinkReportPotentialSelector() override {}
|
||||
|
||||
bool isValid() const {return m_is_valid;}
|
||||
bool isValid() const override {return m_is_valid;}
|
||||
|
||||
private:
|
||||
bool m_is_valid;
|
||||
@@ -215,8 +215,27 @@ PotentialSelectorDialog::~PotentialSelectorDialog()
|
||||
*/
|
||||
void PotentialSelectorDialog::buildWidget()
|
||||
{
|
||||
QRadioButton *rb1 = new QRadioButton(tr("Le potentiel avec numero de fil %1 est présent %2 fois").arg(m_potential_selector->m_properties_list_1.first().text).arg(m_potential_selector->m_conductor_number_1), this);
|
||||
QRadioButton *rb2 = new QRadioButton(tr("Le potentiel avec numero de fil %1 est présent %2 fois").arg(m_potential_selector->m_properties_list_2.first().text).arg(m_potential_selector->m_conductor_number_2), this);
|
||||
QString text1(tr("%n conducteurs composent le potentiel suivant :", "", m_potential_selector->m_conductor_number_1));
|
||||
ConductorProperties cp1 = m_potential_selector->m_properties_list_1.first();
|
||||
|
||||
if(!cp1.text.isEmpty())
|
||||
text1.append(tr("\nNuméro : %1").arg(cp1.text));
|
||||
if(!cp1.m_function.isEmpty())
|
||||
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));
|
||||
|
||||
QString text2(tr("%n conducteurs composent le potentiel suivant :", "", m_potential_selector->m_conductor_number_2));
|
||||
ConductorProperties cp2 = m_potential_selector->m_properties_list_2.first();
|
||||
if(!cp2.text.isEmpty())
|
||||
text2.append(tr("\nNuméro : %1").arg(cp2.text));
|
||||
if(!cp2.m_function.isEmpty())
|
||||
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));
|
||||
|
||||
QRadioButton *rb1 = new QRadioButton(text1, this);
|
||||
QRadioButton *rb2 = new QRadioButton(text2, this);
|
||||
|
||||
connect(rb1, &QRadioButton::toggled, [this](bool t)
|
||||
{
|
||||
@@ -252,7 +271,6 @@ void PotentialSelectorDialog::buildWidget()
|
||||
rb2->setChecked(true);
|
||||
}
|
||||
}
|
||||
#include <QDebug>
|
||||
|
||||
/**
|
||||
* @brief PotentialSelectorDialog::on_buttonBox_accepted
|
||||
|
||||
Reference in New Issue
Block a user