Files
cgal/GraphicsView/include/CGAL/IO/QtNavigation.h
T
Laurent Rineau 40f5ba9ec6 Move some header to include/CGAL/IO/, and rename the corresponding classes:
- "Qt" as prefix, instead of a simple "Q",
  - no "_2" suffix.

(Next commit will be the move of some .cpp files to src/CGALQt4/ and the
creation of a new CGAL library.)
2008-06-18 10:57:39 +00:00

50 lines
849 B
C++

#ifndef CGAL_Q_NAVIGATION_H
#define CGAL_Q_NAVIGATION_H
#include <QObject>
#include <QPointF>
#include <QString>
#include <QCursor>
#include <QRect>
#include <QRectF>
class QGraphicsView;
class QEvent;
class QGraphicsRectItem;
namespace CGAL {
class QtNavigation: public QObject {
Q_OBJECT
signals:
void mouseCoordinates(QString);
public:
QtNavigation(QGraphicsView* v_);
~QtNavigation();
bool eventFilter(QObject *obj, QEvent *event);
private:
void scaleView(qreal scaleFactor);
void translateView(int dx, int dy);
void drag_to(QPoint new_pos);
QRectF mapToScene(QRect rect) const;
void display_parameters();
QGraphicsView* v;
QGraphicsRectItem* rectItem;
QPointF rect_first_point;
bool dragging;
QPointF dragging_start;
QCursor cursor_backup;
};
} // namespace CGAL
#endif // CGAL_Q_NAVIGATION_H