mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Element info widget: check box "show" work in live edit mode
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3998 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -37,7 +37,7 @@ ElementInfoPartWidget::ElementInfoPartWidget(QString key, QString translated_key
|
|||||||
|
|
||||||
connect(ui->line_edit, &QLineEdit::textEdited, this, &ElementInfoPartWidget::textEdited);
|
connect(ui->line_edit, &QLineEdit::textEdited, this, &ElementInfoPartWidget::textEdited);
|
||||||
connect(ui->line_edit, &QLineEdit::textChanged, this, &ElementInfoPartWidget::textChanged);
|
connect(ui->line_edit, &QLineEdit::textChanged, this, &ElementInfoPartWidget::textChanged);
|
||||||
|
connect(ui->checkBox, &QCheckBox::clicked, this, &ElementInfoPartWidget::showClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class ElementInfoPartWidget : public QWidget
|
|||||||
signals:
|
signals:
|
||||||
void textEdited (const QString & text);
|
void textEdited (const QString & text);
|
||||||
void textChanged (const QString & text);
|
void textChanged (const QString & text);
|
||||||
|
void showClicked (bool checked);
|
||||||
|
|
||||||
//ATTRIBUTES
|
//ATTRIBUTES
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -151,7 +151,10 @@ bool ElementInfoWidget::event(QEvent *event)
|
|||||||
void ElementInfoWidget::enableLiveEdit()
|
void ElementInfoWidget::enableLiveEdit()
|
||||||
{
|
{
|
||||||
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
|
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
|
||||||
|
{
|
||||||
connect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
|
connect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
|
||||||
|
connect(eipw, &ElementInfoPartWidget::showClicked, this, &ElementInfoWidget::apply);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,7 +164,10 @@ void ElementInfoWidget::enableLiveEdit()
|
|||||||
void ElementInfoWidget::disableLiveEdit()
|
void ElementInfoWidget::disableLiveEdit()
|
||||||
{
|
{
|
||||||
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
|
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
|
||||||
|
{
|
||||||
disconnect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
|
disconnect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
|
||||||
|
disconnect(eipw, &ElementInfoPartWidget::showClicked, this, &ElementInfoWidget::apply);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user