diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-07 14:15:36 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-06 17:08:03 +0000 |
commit | 8cf812231405e011b422a1505d9a219618fe5cee (patch) | |
tree | 99603ff6fd301dfbdc8104fd0b470d3b9aa3262c /examples/widgets/animation/easing | |
parent | cf27d9e8a5e14ebe083f4b0fa2204d0646e7ed5e (diff) |
Cleanup Widgets examples - new signal/slot syntax
Cleanup the Widget examples - use the new signal/slot syntax where
possible - animation, effects and graphicsview subdirectory
Change-Id: I6cbaea6e628eb06f8e0ca6a0b795030a66b83878
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/widgets/animation/easing')
-rw-r--r-- | examples/widgets/animation/easing/window.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp index 8c03e0534d..aa12147388 100644 --- a/examples/widgets/animation/easing/window.cpp +++ b/examples/widgets/animation/easing/window.cpp @@ -66,11 +66,16 @@ Window::Window(QWidget *parent) m_ui.amplitudeSpinBox->setValue(dummy.amplitude()); m_ui.overshootSpinBox->setValue(dummy.overshoot()); - connect(m_ui.easingCurvePicker, SIGNAL(currentRowChanged(int)), this, SLOT(curveChanged(int))); - connect(buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(pathChanged(int))); - connect(m_ui.periodSpinBox, SIGNAL(valueChanged(double)), this, SLOT(periodChanged(double))); - connect(m_ui.amplitudeSpinBox, SIGNAL(valueChanged(double)), this, SLOT(amplitudeChanged(double))); - connect(m_ui.overshootSpinBox, SIGNAL(valueChanged(double)), this, SLOT(overshootChanged(double))); + connect(m_ui.easingCurvePicker, &QListWidget::currentRowChanged, + this, &Window::curveChanged); + connect(buttonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), + this, &Window::pathChanged); + connect(m_ui.periodSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), + this, &Window::periodChanged); + connect(m_ui.amplitudeSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), + this, &Window::amplitudeChanged); + connect(m_ui.overshootSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), + this, &Window::overshootChanged); createCurveIcons(); QPixmap pix(QLatin1String(":/images/qt-logo.png")); |