summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-10-30 08:38:32 (GMT)
committerAndreas Cord-Landwehr <cordlandwehr@kde.org>2016-10-30 08:38:32 (GMT)
commitfa49fe6ec90b7691f5c8b746841b08ef9c7feb27 (patch)
treeb3ed73a75474427bfeea22b203ab01813651af75
parentf99c8eda2cb6ad94c91465293be4d7b2e82584c4 (diff)
Use new connect mechanism
-rw-r--r--src/tools/moleculeview.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/tools/moleculeview.cpp b/src/tools/moleculeview.cpp
index 9d2753d..7199f10 100644
--- a/src/tools/moleculeview.cpp
+++ b/src/tools/moleculeview.cpp
@@ -95,35 +95,35 @@ MoleculeDialog::MoleculeDialog(QWidget * parent)
ui.styleCombo->setModel(
qobject_cast<QAbstractItemModel*>(&ui.glWidget->sceneModel()));
- connect(ui.tabWidget, SIGNAL(currentChanged(int)),
- this, SLOT(setViewEdit(int)));
+ connect(ui.tabWidget, &QTabWidget::currentChanged,
+ this, &MoleculeDialog::setViewEdit);
- connect(ui.labelsCombo, SIGNAL(activated(int)),
- ui.glWidget, SLOT(setLabels(int)));
+ connect(ui.labelsCombo, static_cast<void (QComboBox::*)(int)>(&KComboBox::activated),
+ ui.glWidget, &KalziumGLWidget::setLabels);
// Editing parameters
- connect(ui.elementCombo, SIGNAL(currentIndexChanged(int)),
- this, SLOT(slotElementChanged(int)));
- connect(ui.bondCombo, SIGNAL(currentIndexChanged(int)),
- this, SLOT(slotBondOrderChanged(int)));
- connect(ui.hydrogenBox, SIGNAL(stateChanged(int)),
- this, SLOT(slotAddHydrogensChanged(int)));
- connect(ui.hydrogensButton, SIGNAL(clicked()),
- this, SLOT(slotAdjustHydrogens()));
- connect(ui.optimizeButton, SIGNAL(clicked()),
- this, SLOT(slotGeometryOptimize()));
- connect(ui.clearDrawingButton, SIGNAL(clicked()),
- this, SLOT(clearAllElementsInEditor()));
+ connect(ui.elementCombo, static_cast<void (QComboBox::*)(int)>(&KComboBox::currentIndexChanged),
+ this, &MoleculeDialog::slotElementChanged);
+ connect(ui.bondCombo, static_cast<void (QComboBox::*)(int)>(&KComboBox::currentIndexChanged),
+ this, &MoleculeDialog::slotBondOrderChanged);
+ connect(ui.hydrogenBox, &QCheckBox::stateChanged,
+ this, &MoleculeDialog::slotAddHydrogensChanged);
+ connect(ui.hydrogensButton, &QPushButton::clicked,
+ this, &MoleculeDialog::slotAdjustHydrogens);
+ connect(ui.optimizeButton, &QPushButton::clicked,
+ this, &MoleculeDialog::slotGeometryOptimize);
+ connect(ui.clearDrawingButton, &QPushButton::clicked,
+ this, &MoleculeDialog::clearAllElementsInEditor);
connect(ui.glWidget->molecule(), &Avogadro::QtGui::Molecule::changed,
this, &MoleculeDialog::slotUpdateStatistics);
- connect(this, SIGNAL(user1Clicked()),
- this, SLOT(slotLoadMolecule()));
- connect(this, SIGNAL(user2Clicked()),
- this, SLOT(slotDownloadNewStuff()));
- connect(this, SIGNAL(user3Clicked()),
- this, SLOT(slotSaveMolecule()));
+ connect(this, &KDialog::user1Clicked,
+ this, &MoleculeDialog::slotLoadMolecule);
+ connect(this, &KDialog::user2Clicked,
+ this, &MoleculeDialog::slotDownloadNewStuff);
+ connect(this, &KDialog::user3Clicked,
+ this, &MoleculeDialog::slotSaveMolecule);
// Check that we have managed to load up some tools and engines
int nTools = ui.glWidget->tools().size();