diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index aba358d1883..7e9565e4c7f 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -154,7 +154,6 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) Scene_polyhedron_item_k_ring_selection.cpp ) qt4_automoc( Scene_implicit_function_item.cpp ) - qt4_automoc( Custom_manipulated_frame.cpp ) # AUXILIARY LIBRARIES @@ -208,10 +207,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) target_link_libraries(scene_combinatorial_map_item scene_polyhedron_item) add_item(scene_polylines_item Scene_polylines_item.cpp Scene_polylines_item.moc) - - add_item(custom_manipulated_frame Custom_manipulated_frame.cpp Custom_manipulated_frame.moc) - add_item(scene_polyhedron_item_k_ring_selection Scene_polyhedron_item_k_ring_selection.cpp Scene_polyhedron_item_k_ring_selection.moc) target_link_libraries(scene_polyhedron_item_k_ring_selection scene_polyhedron_item) @@ -422,7 +418,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) qt4_automoc( Scene_edit_polyhedron_item.cpp ) add_item(scene_edit_polyhedron_item Scene_edit_polyhedron_item.cpp Scene_edit_polyhedron_item.moc ${editionUI_FILES}) - target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item scene_polyhedron_item_k_ring_selection custom_manipulated_frame) + target_link_libraries(scene_edit_polyhedron_item scene_polyhedron_item scene_polyhedron_item_k_ring_selection) polyhedron_demo_plugin(edit_polyhedron_plugin Polyhedron_demo_edit_polyhedron_plugin ${editionUI_FILES}) target_link_libraries(edit_polyhedron_plugin scene_polyhedron_item scene_edit_polyhedron_item) diff --git a/Polyhedron/demo/Polyhedron/Custom_manipulated_frame.cpp b/Polyhedron/demo/Polyhedron/Custom_manipulated_frame.cpp deleted file mode 100644 index 1e1a7165c04..00000000000 --- a/Polyhedron/demo/Polyhedron/Custom_manipulated_frame.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "Custom_manipulated_frame.h" - -CustomManipulatedFrame::CustomManipulatedFrame(int timer_msec) : isHoldingMouse(false) -{ - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(timerUpdate())); - timer->start(timer_msec); -} - -void CustomManipulatedFrame::mousePressEvent(QMouseEvent* const event, qglviewer::Camera* const camera) -{ - isHoldingMouse = true; - ManipulatedFrame::mousePressEvent(event, camera); -} - -void CustomManipulatedFrame::mouseReleaseEvent(QMouseEvent* const event, qglviewer::Camera* const camera) -{ - isHoldingMouse = false; - ManipulatedFrame::mouseReleaseEvent(event, camera); -} - -void CustomManipulatedFrame::timerUpdate() -{ - if(isHoldingMouse) - { emit modified(); } -} - -#include "Custom_manipulated_frame.moc" diff --git a/Polyhedron/demo/Polyhedron/Custom_manipulated_frame.h b/Polyhedron/demo/Polyhedron/Custom_manipulated_frame.h deleted file mode 100644 index 7b977f76756..00000000000 --- a/Polyhedron/demo/Polyhedron/Custom_manipulated_frame.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef CUSTOM_MANIPULATED_FRAME_H -#define CUSTOM_MANIPULATED_FRAME_H -#include "Custom_manipulated_frame_config.h" - -#include -#include -#include -/* - * Holds mouse pressing state by interleaving mousePressEvent and mouseReleaseEvent of base class --ManipulatedFrame. - * Uses a timer to emit modified signal of base class while mouse is pressed. - */ -class CUSTOM_MANIPULATED_FRAME_EXPORT CustomManipulatedFrame - : public qglviewer::ManipulatedFrame -{ - Q_OBJECT - public: - CustomManipulatedFrame(int timer_msec = 50/*20 fps*/); - protected: - virtual void mousePressEvent(QMouseEvent* const event, qglviewer::Camera* const camera); - virtual void mouseReleaseEvent(QMouseEvent* const event, qglviewer::Camera* const camera); - - public slots: - void timerUpdate(); - - private: - bool isHoldingMouse; - QTimer* timer; -}; -#endif \ No newline at end of file diff --git a/Polyhedron/demo/Polyhedron/Custom_manipulated_frame_config.h b/Polyhedron/demo/Polyhedron/Custom_manipulated_frame_config.h deleted file mode 100644 index 0edf8359287..00000000000 --- a/Polyhedron/demo/Polyhedron/Custom_manipulated_frame_config.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef CUSTOM_MANIPULATED_FRAME_CONFIG_H -#define CUSTOM_MANIPULATED_FRAME_CONFIG_H - -#ifdef custom_manipulated_frame_EXPORTS -# define CUSTOM_MANIPULATED_FRAME_EXPORT Q_DECL_EXPORT -#else -# define CUSTOM_MANIPULATED_FRAME_EXPORT Q_DECL_IMPORT -#endif - -#endif // CUSTOM_MANIPULATED_FRAME_CONFIG_H