Gui: move to new style connect()
This commit is contained in:
@@ -673,13 +673,13 @@ DlgCustomizeSpaceball::DlgCustomizeSpaceball(QWidget *parent)
|
||||
|
||||
setupButtonModelView();
|
||||
setupCommandModelView();
|
||||
connect(buttonView, SIGNAL(changeCommandSelection(const QString&)),
|
||||
commandView, SLOT(goChangeCommandSelection(const QString&)));
|
||||
connect(commandView, SIGNAL(changedCommand(const QString&)),
|
||||
buttonView, SLOT(goChangedCommand(const QString&)));
|
||||
connect(buttonView, &ButtonView::changeCommandSelection,
|
||||
commandView, &CommandView::goChangeCommandSelection);
|
||||
connect(commandView, &CommandView::changedCommand,
|
||||
buttonView, &ButtonView::goChangedCommand);
|
||||
setupLayout();
|
||||
connect(clearButton, SIGNAL(clicked()), this, SLOT(goClear()));
|
||||
connect(printReference, SIGNAL(clicked()), this, SLOT(goPrint()));
|
||||
connect(clearButton, &QPushButton::clicked, this, &DlgCustomizeSpaceball::goClear);
|
||||
connect(printReference, &QPushButton::clicked, this, &DlgCustomizeSpaceball::goPrint);
|
||||
}
|
||||
|
||||
DlgCustomizeSpaceball::~DlgCustomizeSpaceball()
|
||||
@@ -706,8 +706,8 @@ void DlgCustomizeSpaceball::setupButtonModelView()
|
||||
buttonView->setModel(buttonModel);
|
||||
|
||||
//had to do this here as the views default selection model is not created until after construction.
|
||||
connect(buttonView->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
|
||||
buttonView, SLOT(goSelectionChanged(const QItemSelection&, const QItemSelection&)));
|
||||
connect(buttonView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
||||
buttonView, &ButtonView::goSelectionChanged);
|
||||
}
|
||||
|
||||
void DlgCustomizeSpaceball::setupCommandModelView()
|
||||
|
||||
@@ -48,10 +48,8 @@ namespace Gui
|
||||
void selectButton(int number);
|
||||
Q_SIGNALS:
|
||||
void changeCommandSelection(const QString& commandName);
|
||||
private Q_SLOTS:
|
||||
void goSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
|
||||
public Q_SLOTS:
|
||||
void goSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
void goChangedCommand(const QString& commandName);
|
||||
};
|
||||
|
||||
|
||||
@@ -123,8 +123,8 @@ void DlgObjectSelection::init(const std::vector<App::DocumentObject*> &objs,
|
||||
ui->treeWidget->headerItem()->setText(0, tr("Selections"));
|
||||
ui->treeWidget->header()->setStretchLastSection(false);
|
||||
|
||||
connect(ui->treeWidget, SIGNAL(itemExpanded(QTreeWidgetItem*)),
|
||||
this, SLOT(onItemExpanded(QTreeWidgetItem*)));
|
||||
connect(ui->treeWidget, &QTreeWidget::itemExpanded,
|
||||
this, &DlgObjectSelection::onItemExpanded);
|
||||
|
||||
allItem = new QTreeWidgetItem(ui->treeWidget);
|
||||
allItem->setText(0, QStringLiteral("<%1>").arg(tr("All")));
|
||||
|
||||
@@ -78,22 +78,23 @@ DlgPropertyLink::DlgPropertyLink(QWidget* parent)
|
||||
|
||||
timer = new QTimer(this);
|
||||
timer->setSingleShot(true);
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(onTimer()));
|
||||
|
||||
connect(timer, &QTimer::timeout, this, &DlgPropertyLink::onTimer);
|
||||
|
||||
ui->treeWidget->setEditTriggers(QAbstractItemView::DoubleClicked);
|
||||
ui->treeWidget->setItemDelegate(new ItemDelegate(this));
|
||||
ui->treeWidget->setMouseTracking(true);
|
||||
connect(ui->treeWidget, SIGNAL(itemEntered(QTreeWidgetItem*, int)),
|
||||
this, SLOT(onItemEntered(QTreeWidgetItem*)));
|
||||
connect(ui->treeWidget, &QTreeWidget::itemEntered,
|
||||
this, &DlgPropertyLink::onItemEntered);
|
||||
|
||||
connect(ui->treeWidget, SIGNAL(itemExpanded(QTreeWidgetItem*)),
|
||||
this, SLOT(onItemExpanded(QTreeWidgetItem*)));
|
||||
connect(ui->treeWidget, &QTreeWidget::itemExpanded,
|
||||
this, &DlgPropertyLink::onItemExpanded);
|
||||
|
||||
connect(ui->treeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onItemSelectionChanged()));
|
||||
connect(ui->treeWidget, &QTreeWidget::itemSelectionChanged, this, &DlgPropertyLink::onItemSelectionChanged);
|
||||
|
||||
connect(ui->searchBox, SIGNAL(returnPressed()), this, SLOT(onItemSearch()));
|
||||
connect(ui->searchBox, &QLineEdit::returnPressed, this, &DlgPropertyLink::onItemSearch);
|
||||
|
||||
connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(onClicked(QAbstractButton*)));
|
||||
connect(ui->buttonBox, &QDialogButtonBox::clicked, this, &DlgPropertyLink::onClicked);
|
||||
|
||||
refreshButton = ui->buttonBox->addButton(tr("Reset"), QDialogButtonBox::ActionRole);
|
||||
resetButton = ui->buttonBox->addButton(tr("Clear"), QDialogButtonBox::ResetRole);
|
||||
|
||||
@@ -707,9 +707,9 @@ void ExpressionTextEdit::setDocumentObject(const App::DocumentObject * currentDo
|
||||
completer->setFilterMode(Qt::MatchContains);
|
||||
completer->setWidget(this);
|
||||
completer->setCaseSensitivity(Qt::CaseInsensitive);
|
||||
connect(completer, SIGNAL(activated(QString)), this, SLOT(slotCompleteText(QString)));
|
||||
connect(completer, SIGNAL(highlighted(QString)), this, SLOT(slotCompleteText(QString)));
|
||||
connect(this, SIGNAL(textChanged2(QString,int)), completer, SLOT(slotUpdate(QString,int)));
|
||||
connect(completer, qOverload<const QString&>(&QCompleter::activated), this, &ExpressionTextEdit::slotCompleteText);
|
||||
connect(completer, qOverload<const QString&>(&QCompleter::highlighted), this, &ExpressionTextEdit::slotCompleteText);
|
||||
connect(this, &ExpressionTextEdit::textChanged2, completer, &ExpressionCompleter::slotUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user