From 8cf812231405e011b422a1505d9a219618fe5cee Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 7 Dec 2018 14:15:36 +0100 Subject: Cleanup Widgets examples - new signal/slot syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleanup the Widget examples - use the new signal/slot syntax where possible - animation, effects and graphicsview subdirectory Change-Id: I6cbaea6e628eb06f8e0ca6a0b795030a66b83878 Reviewed-by: Luca Beldi Reviewed-by: Topi Reiniƶ --- examples/widgets/animation/easing/window.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'examples/widgets/animation/easing') 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::of(&QButtonGroup::buttonClicked), + this, &Window::pathChanged); + connect(m_ui.periodSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &Window::periodChanged); + connect(m_ui.amplitudeSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &Window::amplitudeChanged); + connect(m_ui.overshootSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), + this, &Window::overshootChanged); createCurveIcons(); QPixmap pix(QLatin1String(":/images/qt-logo.png")); -- cgit v1.2.3