Conflicts: Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt Alpha_shapes_3/demo/Alpha_shapes_3/MainWindow.cpp Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt GraphicsView/demo/Bounding_volumes/CMakeLists.txt GraphicsView/demo/Circular_kernel_2/CMakeLists.txt GraphicsView/demo/Generator/CMakeLists.txt GraphicsView/demo/GraphicsView/CMakeLists.txt GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt GraphicsView/demo/Snap_rounding_2/CMakeLists.txt GraphicsView/demo/Spatial_searching_2/CMakeLists.txt GraphicsView/demo/Stream_lines_2/CMakeLists.txt GraphicsView/demo/Triangulation_2/CMakeLists.txt Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt Mesh_3/demo/Mesh_3/CMakeLists.txt Mesh_3/demo/Mesh_3/include/CGAL_demo/Scene_item_with_display_list.h Mesh_3/demo/Mesh_3/src/CGAL_demo/Scene.cpp Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp Polyhedron/demo/Polyhedron/CMakeLists.txt Polyhedron/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp Polyhedron/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp Polyhedron/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp Polyhedron/demo/Polyhedron/Scene.cpp Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.h Polyhedron/demo/Polyhedron/Scene_implicit_function_item.h Polyhedron/demo/Polyhedron/Scene_plane_item.h Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp Polyhedron/demo/Polyhedron/Scene_polyhedron_item.cpp Polyhedron/demo/Polyhedron/Scene_polyhedron_item.h Polyhedron/demo/Polyhedron/Scene_polyhedron_transform_item.h Polyhedron/demo/Polyhedron/Scene_polylines_item.h Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt Surface_mesher/demo/Surface_mesher/CMakeLists.txt Triangulation_3/demo/Triangulation_3/CMakeLists.txt Triangulation_3/demo/Triangulation_3/MainWindow.cpp
74 lines
1.8 KiB
C++
74 lines
1.8 KiB
C++
// Copyright (c) 2008 GeometryFactory Sarl (France).
|
|
// All rights reserved.
|
|
//
|
|
// This file is part of CGAL (www.cgal.org).
|
|
// You can redistribute it and/or modify it under the terms of the GNU
|
|
// General Public License as published by the Free Software Foundation,
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
//
|
|
// Licensees holding a valid commercial license may use this file in
|
|
// accordance with the commercial license agreement provided with the software.
|
|
//
|
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
//
|
|
// $URL$
|
|
// $Id$
|
|
//
|
|
//
|
|
// Author(s) : Andreas Fabri <Andreas.Fabri@geometryfactory.com>
|
|
// Laurent Rineau <Laurent.Rineau@geometryfactory.com>
|
|
|
|
#ifndef CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
|
|
#define CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
|
|
|
|
#include <CGAL/auto_link/Qt.h>
|
|
#include <CGAL/export/Qt.h>
|
|
|
|
#include <QObject>
|
|
#include <QPointF>
|
|
#include <QString>
|
|
#include <QCursor>
|
|
#include <QRect>
|
|
#include <QRectF>
|
|
|
|
class QGraphicsView;
|
|
class QGraphicsScene;
|
|
class QEvent;
|
|
class QGraphicsRectItem;
|
|
|
|
namespace CGAL {
|
|
namespace Qt {
|
|
|
|
class CGAL_QT_EXPORT GraphicsViewNavigation: public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
Q_SIGNALS:
|
|
void mouseCoordinates(QString);
|
|
|
|
public:
|
|
GraphicsViewNavigation();
|
|
~GraphicsViewNavigation();
|
|
|
|
bool eventFilter(QObject *obj, QEvent *event);
|
|
|
|
private:
|
|
|
|
void scaleView(QGraphicsView*, qreal scaleFactor);
|
|
void translateView(QGraphicsView*, int dx, int dy);
|
|
void drag_to(QGraphicsView*, QPoint new_pos);
|
|
void display_parameters(QGraphicsView*);
|
|
|
|
QGraphicsRectItem* rectItem;
|
|
QPointF rect_first_point;
|
|
bool dragging;
|
|
QPointF dragging_start;
|
|
QCursor cursor_backup;
|
|
};
|
|
|
|
} // namespace Qt
|
|
} // namespace CGAL
|
|
|
|
#endif // CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H
|