summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellogl2/window.cpp
diff options
context:
space:
mode:
authorBenjamin Summerton <ben.16bpp@gmail.com>2015-06-28 17:39:24 -0500
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-29 11:30:01 +0000
commit2a526b12ce4759e815f59b28ef55186259b7db42 (patch)
treeaa9a52b5eb8bc3a3450168cfc566af6f4ebdfd3a /examples/opengl/hellogl2/window.cpp
parent2a81516835c680c29f3de9241a8c28027624ce4f (diff)
Updated Hello GL2 Example to new Signal/Slot syntax
The Hello GL2 Example was using the older Signal/Slot syntax that made use of the macros `SIGNAL()` and `SLOT()`. I changed it to the newer one. Change-Id: I8e55015383847a04b07f751fe9fc94b81956a896 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'examples/opengl/hellogl2/window.cpp')
-rw-r--r--examples/opengl/hellogl2/window.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/opengl/hellogl2/window.cpp b/examples/opengl/hellogl2/window.cpp
index e60de3b05b..11a5ae68a9 100644
--- a/examples/opengl/hellogl2/window.cpp
+++ b/examples/opengl/hellogl2/window.cpp
@@ -59,12 +59,12 @@ Window::Window(MainWindow *mw)
ySlider = createSlider();
zSlider = createSlider();
- connect(xSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setXRotation(int)));
- connect(glWidget, SIGNAL(xRotationChanged(int)), xSlider, SLOT(setValue(int)));
- connect(ySlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setYRotation(int)));
- connect(glWidget, SIGNAL(yRotationChanged(int)), ySlider, SLOT(setValue(int)));
- connect(zSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setZRotation(int)));
- connect(glWidget, SIGNAL(zRotationChanged(int)), zSlider, SLOT(setValue(int)));
+ connect(xSlider, &QSlider::valueChanged, glWidget, &GLWidget::setXRotation);
+ connect(glWidget, &GLWidget::xRotationChanged, xSlider, &QSlider::setValue);
+ connect(ySlider, &QSlider::valueChanged, glWidget, &GLWidget::setYRotation);
+ connect(glWidget, &GLWidget::yRotationChanged, ySlider, &QSlider::setValue);
+ connect(zSlider, &QSlider::valueChanged, glWidget, &GLWidget::setZRotation);
+ connect(glWidget, &GLWidget::zRotationChanged, zSlider, &QSlider::setValue);
QVBoxLayout *mainLayout = new QVBoxLayout;
QHBoxLayout *container = new QHBoxLayout;
@@ -77,7 +77,7 @@ Window::Window(MainWindow *mw)
w->setLayout(container);
mainLayout->addWidget(w);
dockBtn = new QPushButton(tr("Undock"), this);
- connect(dockBtn, SIGNAL(clicked()), this, SLOT(dockUndock()));
+ connect(dockBtn, &QPushButton::clicked, this, &Window::dockUndock);
mainLayout->addWidget(dockBtn);
setLayout(mainLayout);