Scribus
Open source desktop publishing at your fingertips
canvasmode_eyedropper.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_MODE_EYEDROPPER_H
17 #define CANVAS_MODE_EYEDROPPER_H
18 
19 #include "canvasmode.h"
20 
21 class ScribusMainWindow;
22 class ScribusView;
23 
24 
25 // This class encapsulate the old code for mouse interaction from scribusview.cpp
26 
28 {
29  Q_OBJECT
30 
31 public:
32  explicit CanvasMode_EyeDropper(ScribusView* view);
33  virtual ~CanvasMode_EyeDropper() {}
34 
35  virtual void enterEvent(QEvent *);
36  virtual void leaveEvent(QEvent *);
37 
38  virtual void activate(bool);
39  virtual void deactivate(bool);
40  virtual void mouseDoubleClickEvent(QMouseEvent *m);
41  virtual void mouseReleaseEvent(QMouseEvent *m);
42  virtual void mouseMoveEvent(QMouseEvent *m);
43  virtual void mousePressEvent(QMouseEvent *m);
44  virtual void drawControls(QPainter* p);
45 
46 // protected:
47 // void setResizeCursor(int);
48 
49 private:
50  bool m_mouseGrabbed;
51  ScribusMainWindow* m_ScMW;
52 
53  void grabMouse(void);
54  void releaseMouse(void);
55 };
56 
57 
58 #endif
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
virtual void activate(bool)
Definition: canvasmode_eyedropper.cpp:81
virtual void drawControls(QPainter *p)
Definition: canvasmode_eyedropper.cpp:66
Definition: canvasmode.h:72
Definition: canvasmode_eyedropper.h:27
virtual void deactivate(bool)
Definition: canvasmode_eyedropper.cpp:99
Definition: scribusview.h:87