mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-15 11:04:12 +02:00
Update old fashioned SIGNAL/SLOT to point-to-member. Only simple and clear cases.
This commit is contained in:
@@ -69,10 +69,8 @@ ElementScene::ElementScene(QETElementEditor *editor, QObject *parent) :
|
||||
initPasteArea();
|
||||
m_undo_stack.setClean();
|
||||
m_decorator_lock = new QMutex();
|
||||
connect(&m_undo_stack, SIGNAL(indexChanged(int)),
|
||||
this, SLOT(managePrimitivesGroups()));
|
||||
connect(this, SIGNAL(selectionChanged()),
|
||||
this, SLOT(managePrimitivesGroups()));
|
||||
connect(&m_undo_stack, &QUndoStack::indexChanged, this, &ElementScene::managePrimitivesGroups);
|
||||
connect(this, &ElementScene::selectionChanged, this, &ElementScene::managePrimitivesGroups);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,8 +100,7 @@ void ElementScene::setElementData(ElementData data)
|
||||
ElementScene::~ElementScene()
|
||||
{
|
||||
//Disconnect to avoid crash, see bug report N° 122.
|
||||
disconnect(&m_undo_stack, SIGNAL(indexChanged(int)),
|
||||
this, SLOT(managePrimitivesGroups()));
|
||||
disconnect(&m_undo_stack, &QUndoStack::indexChanged, this, &ElementScene::managePrimitivesGroups);
|
||||
delete m_decorator_lock;
|
||||
|
||||
if (m_event_interface)
|
||||
@@ -907,8 +904,8 @@ void ElementScene::slot_editAuthorInformations()
|
||||
QDialogButtonBox::Ok
|
||||
| QDialogButtonBox::Cancel);
|
||||
dialog_layout -> addWidget(dialog_buttons);
|
||||
connect(dialog_buttons, SIGNAL(accepted()),&dialog_author, SLOT(accept()));
|
||||
connect(dialog_buttons, SIGNAL(rejected()),&dialog_author, SLOT(reject()));
|
||||
connect(dialog_buttons, &QDialogButtonBox::accepted, &dialog_author, &QDialog::accept);
|
||||
connect(dialog_buttons, &QDialogButtonBox::rejected, &dialog_author, &QDialog::reject);
|
||||
|
||||
// start the dialogue
|
||||
// lance le dialogue
|
||||
@@ -1399,9 +1396,7 @@ void ElementScene::managePrimitivesGroups()
|
||||
if (!m_decorator)
|
||||
{
|
||||
m_decorator = new ElementPrimitiveDecorator();
|
||||
connect(m_decorator,
|
||||
SIGNAL(actionFinished(ElementEditionCommand*)),
|
||||
this, SLOT(stackAction(ElementEditionCommand *)));
|
||||
connect(m_decorator, &ElementPrimitiveDecorator::actionFinished, this, &ElementScene::stackAction);
|
||||
addItem(m_decorator);
|
||||
m_decorator -> hide();
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ ElementView::ElementView(ElementScene *scene, QWidget *parent) :
|
||||
setResizeAnchor(QGraphicsView::AnchorUnderMouse);
|
||||
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
||||
zoomReset();
|
||||
connect(m_scene, SIGNAL(pasteAreaDefined(const QRectF &)), this, SLOT(pasteAreaDefined(const QRectF &)));
|
||||
connect(m_scene, SIGNAL(needZoomFit()), this, SLOT(zoomFit()));
|
||||
connect(m_scene, &ElementScene::pasteAreaDefined, this, &ElementView::pasteAreaDefined);
|
||||
connect(m_scene, &ElementScene::needZoomFit, this, &ElementView::zoomFit);
|
||||
}
|
||||
|
||||
/// Destructeur
|
||||
|
||||
@@ -50,10 +50,10 @@ PartText::PartText(QETElementEditor *editor, QGraphicsItem *parent) :
|
||||
|
||||
adjustItemPosition(1);
|
||||
// adjust textfield position after line additions/deletions
|
||||
connect(document(),
|
||||
SIGNAL(blockCountChanged(int)),
|
||||
this,
|
||||
SLOT(adjustItemPosition(int)));
|
||||
connect(document(),
|
||||
&QTextDocument::blockCountChanged,
|
||||
this,
|
||||
&PartText::adjustItemPosition);
|
||||
connect(document(),
|
||||
SIGNAL(contentsChanged()),
|
||||
this,
|
||||
|
||||
@@ -222,7 +222,7 @@ void ElementPropertiesEditorWidget::setUpInterface()
|
||||
ui->m_tree->setItemDelegate(new EditorDelegate(this));
|
||||
|
||||
// NEU: Checkbox mit der Zahlenbox verbinden (Aktivieren/Deaktivieren)
|
||||
connect(ui->max_slaves_checkbox, SIGNAL(toggled(bool)), ui->max_slaves_spinbox, SLOT(setEnabled(bool)));
|
||||
connect(ui->max_slaves_checkbox, &QCheckBox::toggled, ui->max_slaves_spinbox, &QWidget::setEnabled);
|
||||
connect(ui->max_slaves_spinbox, QOverload<int>::of(&QSpinBox::valueChanged), [this](int) {
|
||||
if (ui->m_slave_groups_checkbox->isChecked()) {
|
||||
populateSlaveGroupsTable();
|
||||
|
||||
Reference in New Issue
Block a user