diff --git a/GraphicsView/include/CGAL/Qt/GraphicsItem.h b/GraphicsView/include/CGAL/Qt/GraphicsItem.h index c560041dc79..b6ddbdb806c 100644 --- a/GraphicsView/include/CGAL/Qt/GraphicsItem.h +++ b/GraphicsView/include/CGAL/Qt/GraphicsItem.h @@ -41,7 +41,7 @@ class CGAL_QT4_EXPORT GraphicsItem : public QObject, public QGraphicsItem { #if QT_VERSION >= 0x040600 Q_INTERFACES(QGraphicsItem) #endif -public slots: +public Q_SLOTS: virtual void modelChanged() = 0; }; diff --git a/GraphicsView/include/CGAL/Qt/GraphicsViewInput.h b/GraphicsView/include/CGAL/Qt/GraphicsViewInput.h index a9d896020d2..b489ca4509c 100644 --- a/GraphicsView/include/CGAL/Qt/GraphicsViewInput.h +++ b/GraphicsView/include/CGAL/Qt/GraphicsViewInput.h @@ -40,11 +40,11 @@ public: : QObject(parent) {} -signals: +Q_SIGNALS: void generate(CGAL::Object o); void modelChanged(); -public slots: +public Q_SLOTS: virtual void processInput(CGAL::Object /*o*/) {} diff --git a/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation.h b/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation.h index 76e9352e74e..90f6ec5b8c3 100644 --- a/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation.h +++ b/GraphicsView/include/CGAL/Qt/GraphicsViewNavigation.h @@ -43,7 +43,7 @@ class CGAL_QT4_EXPORT GraphicsViewNavigation: public QObject { Q_OBJECT - signals: + Q_SIGNALS: void mouseCoordinates(QString); public: diff --git a/GraphicsView/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h b/GraphicsView/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h index 0b6eae0176c..2817e2aaa4b 100644 --- a/GraphicsView/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h +++ b/GraphicsView/include/CGAL/Qt/GraphicsViewPolygonWithHolesInput.h @@ -60,7 +60,7 @@ public: GraphicsViewPolygonWithHolesInput(QObject *parent, QGraphicsScene* s); ~GraphicsViewPolygonWithHolesInput(); -public slots: +public Q_SLOTS: void processInput(CGAL::Object o); typedef CGAL::Polygon_2 Polygon; @@ -141,7 +141,7 @@ GraphicsViewPolygonWithHolesInput::processInput(CGAL::Object o) it++; pwh = Polygon_with_holes(holes.front(), it, holes.end()); } - emit(modelChanged()); + Q_EMIT( modelChanged()); polygon_input = false; } } @@ -172,11 +172,11 @@ GraphicsViewPolygonWithHolesInput::eventFilter(QObject *obj, QEvent *event) polygon_input = true; return pi->eventFilter(obj, event); } else if(mouseEvent->button() == ::Qt::RightButton) { - emit(generate(CGAL::make_object(pwh))); + Q_EMIT( generate(CGAL::make_object(pwh))); pwh.clear(); holes.clear(); polygon_input = false; - emit(modelChanged()); + Q_EMIT( modelChanged()); } return true; } else if (event->type() == QEvent::KeyPress) { diff --git a/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h b/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h index c9078d3c76d..730cdac1ab5 100644 --- a/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h +++ b/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h @@ -100,7 +100,7 @@ protected: if(closed_ && points.size()>2){ points.push_back(points.front()); } - emit(generate(CGAL::make_object(points))); + Q_EMIT( generate(CGAL::make_object(points))); } }; // end class GraphicsViewPolylineInput diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index 70fede49d89..9f6319be551 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -28,6 +28,8 @@ include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR}) if ( CGAL_FOUND AND CGAL_Qt4_FOUND AND QT4_FOUND ) +add_definitions(-DQT_NO_KEYWORDS) + include(${QT_USE_FILE}) # UI files (Qt Designer files) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp index 69aaf464a2b..fdb924c8fd9 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp @@ -107,10 +107,10 @@ private: void loadPoly(QString); void loadOSM (QString); -protected slots: +protected Q_SLOTS: void open(QString); -public slots: +public Q_SLOTS: void processInput(CGAL::Object o); @@ -130,7 +130,7 @@ public slots: double getThreshold() ; -signals: +Q_SIGNALS: void changed(); }; @@ -238,10 +238,10 @@ MainWindow::processInput(CGAL::Object o) out << *it << std::endl; } #endif - emit(changed()); + Q_EMIT( changed()); } } - emit(changed()); + Q_EMIT( changed()); } @@ -274,7 +274,7 @@ MainWindow::on_actionClear_triggered() { m_pct.clear(); mGI->modelChanged(); - emit(changed()); + Q_EMIT( changed()); } Mode MainWindow::getSimplificationMode() @@ -325,7 +325,7 @@ void MainWindow::on_actionSimplify_triggered() // default cursor QApplication::restoreOverrideCursor(); mGI->modelChanged(); - emit(changed()); + Q_EMIT( changed()); } @@ -447,7 +447,7 @@ void MainWindow::loadPoly(QString fileName) } } - emit(changed()); + Q_EMIT( changed()); actionRecenter->trigger(); } @@ -522,7 +522,7 @@ void MainWindow::loadOSM(QString fileName) statusBar()->showMessage(QString("Exception ocurred")); } - emit(changed()); + Q_EMIT( changed()); actionRecenter->trigger(); }