Scribus
Open source desktop publishing at your fingertips
canvasgesture_pan.h
1 /*
2  For general Scribus (>=1.3.2) copyright and licensing information please refer
3  to the COPYING file provided with the program. Following this notice may exist
4  a copyright and/or license notice that predates the release of Scribus 1.3.2
5  for which a new license (GPL+exception) is in place.
6  */
7 /***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15 
16 #ifndef CANVAS_GESTURE_LINEMOVE_H
17 #define CANVAS_GESTURE_LINEMOVE_H
18 
19 #include "scribusapi.h"
20 #include "canvasgesture.h"
21 #include "canvasmode.h"
22 
23 #include <QCursor>
24 #include <QPointF>
25 
26 class SCRIBUS_API PanGesture : public CanvasGesture
27 {
28 public:
29  explicit PanGesture (CanvasMode* parent);
30  virtual ~PanGesture() {}
31 
32  virtual void activate(bool);
33  virtual void deactivate(bool);
34  virtual void mouseReleaseEvent(QMouseEvent *m);
35  virtual void mouseMoveEvent(QMouseEvent *m);
36 
37  virtual void mousePressEvent(QMouseEvent *m);
38  virtual void drawControls(QPainter*);
39 
40 private:
41  QCursor m_cursor;
42  QPointF m_canvasRefPoint;
43 };
44 
45 #endif
virtual void deactivate(bool forGesture)
Definition: canvasmode.h:91
virtual void drawControls(QPainter *p)
Definition: canvasmode.h:121
Definition: canvasgesture_pan.h:26
Definition: canvasmode.h:72
Definition: canvasgesture.h:47
virtual void activate(bool fromGesture)
Definition: canvasmode.h:86