mirror of https://github.com/CGAL/cgal
remove custom_manipulated_frame (I don't think there will be any need in the future)
This commit is contained in:
parent
2ed14db17a
commit
71b2a6b16b
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef CUSTOM_MANIPULATED_FRAME_H
|
||||
#define CUSTOM_MANIPULATED_FRAME_H
|
||||
#include "Custom_manipulated_frame_config.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <QGLViewer/manipulatedFrame.h>
|
||||
/*
|
||||
* 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
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue