mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-25 14:49:59 +01:00
Cross ref item: when xref is show has table, user can add prefix to the text of power and delay contact.
Minor improvemnt: the table update is size according to his content git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3060 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -31,7 +31,7 @@ XRefPropertiesWidget::XRefPropertiesWidget(XRefProperties properties, QWidget *p
|
||||
m_properties(properties)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->m_display_has_cross_rb, SIGNAL(toggled(bool)), ui->m_show_power_cb, SLOT(setEnabled(bool)));
|
||||
connect(ui->m_display_has_cross_rb, SIGNAL(toggled(bool)), ui->m_cross_properties_gb, SLOT(setEnabled(bool)));
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ XRefPropertiesWidget::XRefPropertiesWidget(XRefProperties properties, QWidget *p
|
||||
*/
|
||||
XRefPropertiesWidget::~XRefPropertiesWidget()
|
||||
{
|
||||
disconnect(ui->m_display_has_cross_rb, SIGNAL(toggled(bool)), ui->m_show_power_cb, SLOT(setEnabled(bool)));
|
||||
disconnect(ui->m_display_has_cross_rb, SIGNAL(toggled(bool)), ui->m_cross_properties_gb, SLOT(setEnabled(bool)));
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,8 @@ XRefProperties XRefPropertiesWidget::properties() {
|
||||
if (ui->m_display_has_cross_rb->isChecked()) m_properties.setDisplayHas(XRefProperties::Cross);
|
||||
else if (ui->m_display_has_contacts_rb->isChecked()) m_properties.setDisplayHas(XRefProperties::Contacts);
|
||||
m_properties.setShowPowerContac(ui->m_show_power_cb->isChecked());
|
||||
m_properties.setPrefix("power", ui->m_power_prefix_le->text());
|
||||
m_properties.setPrefix("delay", ui->m_delay_prefix_le->text());
|
||||
|
||||
return m_properties;
|
||||
}
|
||||
@@ -77,9 +79,9 @@ void XRefPropertiesWidget::setReadOnly(bool ro) {
|
||||
ui->m_display_has_contacts_rb->setDisabled(ro);
|
||||
|
||||
if (m_properties.displayHas() != XRefProperties::Cross)
|
||||
ui->m_show_power_cb->setDisabled(true);
|
||||
ui->m_cross_properties_gb->setDisabled(true);
|
||||
else
|
||||
ui->m_show_power_cb->setDisabled(ro);
|
||||
ui->m_cross_properties_gb->setDisabled(ro);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,5 +98,7 @@ void XRefPropertiesWidget::updateDisplay() {
|
||||
}
|
||||
|
||||
ui->m_show_power_cb->setChecked(m_properties.showPowerContact());
|
||||
ui->m_show_power_cb->setDisabled(!ui->m_display_has_cross_rb->isChecked());
|
||||
ui->m_power_prefix_le->setText(m_properties.prefix("power"));
|
||||
ui->m_delay_prefix_le->setText(m_properties.prefix("delay"));
|
||||
ui->m_cross_properties_gb->setDisabled(!ui->m_display_has_cross_rb->isChecked());
|
||||
}
|
||||
|
||||
@@ -42,25 +42,58 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_show_power_cb">
|
||||
<property name="text">
|
||||
<string>Afficher les contacts de puissance dans la croix</string>
|
||||
<widget class="QGroupBox" name="m_cross_properties_gb">
|
||||
<property name="title">
|
||||
<string>Option d'affichage en croix</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="m_show_power_cb">
|
||||
<property name="text">
|
||||
<string>Afficher les contacts de puissance dans la croix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="m_delay_prefix_le"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="m_power_prefix_le"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Préfixe des contacts de puissance:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Préfixe des contacts temporisés:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>253</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
||||
Reference in New Issue
Block a user