Mercurial > projects > qtd
diff examples/opengl/hellogl/glwidget.d @ 323:7a3c43424dca signals
make all examples compile with new signals/slots
author | eldar_ins@eldar-laptop |
---|---|
date | Mon, 28 Dec 2009 16:28:55 +0500 |
parents | 1f6923c8cba0 |
children |
line wrap: on
line diff
--- a/examples/opengl/hellogl/glwidget.d Sun Dec 27 21:13:38 2009 +0500 +++ b/examples/opengl/hellogl/glwidget.d Mon Dec 28 16:28:55 2009 +0500 @@ -69,19 +69,19 @@ glDeleteLists(object, 1); } - QSize minimumSizeHint() + QSize minimumSizeHint() const { return QSize(50, 50); } - QSize sizeHint() + QSize sizeHint() const { return QSize(400, 400); } public: // slots: - void setXRotation(int angle) + void slot_setXRotation(int angle) { normalizeAngle(&angle); if (angle != xRot) { @@ -91,7 +91,7 @@ } } - void setYRotation(int angle) + void slot_setYRotation(int angle) { normalizeAngle(&angle); if (angle != yRot) { @@ -101,7 +101,7 @@ } } - void setZRotation(int angle) + void slot_setZRotation(int angle) { normalizeAngle(&angle); if (angle != zRot) { @@ -110,11 +110,13 @@ updateGL(); } } - - mixin Signal!("xRotationChanged", int); - mixin Signal!("yRotationChanged", int); - mixin Signal!("zRotationChanged", int); - + + final // signals + { + void signal_xRotationChanged(int); + void signal_yRotationChanged(int); + void signal_zRotationChanged(int); + } protected: void initializeGL() @@ -264,4 +266,6 @@ QPoint lastPos; QColor trolltechGreen; QColor trolltechPurple; + + mixin Q_OBJECT; } \ No newline at end of file