mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-09 08:59:59 +01:00
Conductor : improve one text per folio and remove option no one text per folio
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3375 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -37,6 +37,10 @@ ConductorPropertiesDialog::ConductorPropertiesDialog(Conductor *conductor, QWidg
|
||||
ui->setupUi(this);
|
||||
m_cpw = new ConductorPropertiesWidget(conductor->properties());
|
||||
m_cpw -> setHiddenOneTextPerFolio(true);
|
||||
if (conductor -> diagram() -> defaultConductorProperties.m_one_text_per_folio == true &&
|
||||
conductor -> relatedPotentialConductors().size()) {
|
||||
m_cpw->setDisabledShowText();
|
||||
}
|
||||
ui -> main_layout -> insertWidget(1, m_cpw);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ void ConductorPropertiesWidget::setProperties(const ConductorProperties &propert
|
||||
ui -> m_text_size_sb -> setValue (m_properties.text_size);
|
||||
ui -> m_show_text_cb -> setChecked (m_properties.m_show_text);
|
||||
ui -> m_one_text_per_folio_cb -> setChecked (m_properties.m_one_text_per_folio);
|
||||
ui -> m_no_one_text_per_folio_cb -> setChecked (m_properties.m_no_one_text_per_folio);
|
||||
ui -> m_earth_cb -> setChecked (m_properties.singleLineProperties.hasGround);
|
||||
ui -> m_neutral_cb -> setChecked (m_properties.singleLineProperties.hasNeutral);
|
||||
ui -> m_pen_cb -> setChecked (m_properties.singleLineProperties.isPen());
|
||||
@@ -104,7 +103,6 @@ ConductorProperties ConductorPropertiesWidget::properties() const {
|
||||
properties_.text_size = ui -> m_text_size_sb -> value();
|
||||
properties_.m_show_text = ui -> m_show_text_cb -> isChecked();
|
||||
properties_.m_one_text_per_folio = ui -> m_one_text_per_folio_cb -> isChecked();
|
||||
properties_.m_no_one_text_per_folio = ui -> m_no_one_text_per_folio_cb -> isChecked();
|
||||
properties_.verti_rotate_text = m_verti_select -> value();
|
||||
properties_.horiz_rotate_text = m_horiz_select -> value();
|
||||
|
||||
@@ -141,11 +139,11 @@ void ConductorPropertiesWidget::setHiddenOneTextPerFolio(const bool &hide) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ConductorPropertiesWidget::setHiddenNoOneTextPerFolio
|
||||
* @param hide
|
||||
* @brief ConductorPropertiesWidget::setDisabledShowText
|
||||
* @param disable
|
||||
*/
|
||||
void ConductorPropertiesWidget::setHiddenNoOneTextPerFolio(const bool &hide) {
|
||||
ui -> m_no_one_text_per_folio_cb -> setHidden(hide);
|
||||
void ConductorPropertiesWidget::setDisabledShowText(const bool &disable) {
|
||||
ui->m_show_text_cb->setDisabled(disable==true? true : false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ class ConductorPropertiesWidget : public QWidget
|
||||
|
||||
void addAutonumWidget (QWidget *widget);
|
||||
void setHiddenOneTextPerFolio (const bool &hide);
|
||||
void setHiddenNoOneTextPerFolio (const bool &hide);
|
||||
void setDisabledShowText (const bool &disable = true);
|
||||
|
||||
private:
|
||||
void initWidget();
|
||||
|
||||
@@ -111,16 +111,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_no_one_text_per_folio_cb">
|
||||
<property name="toolTip">
|
||||
<string>Ne pas subir l'option un texte par potentiel</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ne pas subir l'option : Afficher un texte de potentiel par folio. (expérimental)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -64,7 +64,6 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
|
||||
|
||||
//Conductor widget
|
||||
ConductorPropertiesWidget *cpw = new ConductorPropertiesWidget(conductors, this);
|
||||
cpw -> setHiddenNoOneTextPerFolio(true);
|
||||
cpw -> setReadOnly(diagram_is_read_only);
|
||||
|
||||
//Conductor autonum
|
||||
|
||||
Reference in New Issue
Block a user