Scribus
Open source desktop publishing at your fingertips
canvasgesture_cellselect.h
1 /*
2 Copyright (C) 2011 Elvis Stansvik <elvstone@gmail.com>
3 
4 For general Scribus (>=1.3.2) copyright and licensing information please refer
5 to the COPYING file provided with the program. Following this notice may exist
6 a copyright and/or license notice that predates the release of Scribus 1.3.2
7 for which a new license (GPL+exception) is in place.
8 */
9 #ifndef CANVASGESTURE_CELLSELECT_H
10 #define CANVASGESTURE_CELLSELECT_H
11 
12 #include "tablecell.h"
13 
14 #include "canvasgesture_table.h"
15 
16 class PageItem_Table;
17 class QMouseEvent;
18 class QKeyEvent;
19 class QPainter;
20 
31 class SCRIBUS_API CellSelect : public TableGesture
32 {
33  Q_OBJECT
34 
35 public:
36  explicit CellSelect(CanvasMode* parent) : TableGesture(parent) {}
37  virtual ~CellSelect() {}
38 
39  virtual void activate(bool fromGesture) {}
40  virtual void deactivate(bool forGesture);
41  virtual void keyPressEvent(QKeyEvent* event);
42  virtual void mousePressEvent(QMouseEvent* event);
43  virtual void mouseReleaseEvent(QMouseEvent* event);
44  virtual void mouseMoveEvent(QMouseEvent* event);
45  virtual bool handleKeyEvents() { return true; }
46  virtual void drawControls(QPainter* p);
47 
49  void setup(PageItem_Table* table, const TableCell& cell);
50 
51 private:
53  TableCell m_startCell;
55  TableCell m_endCell;
56 };
57 
58 #endif // CANVASGESTURE_CELLSELECT_H
virtual void deactivate(bool forGesture)
Definition: canvasmode.h:91
virtual void drawControls(QPainter *p)
Definition: canvasmode.h:121
Definition: canvasgesture_cellselect.h:31
Definition: canvasmode.h:72
virtual void activate(bool fromGesture)
Definition: canvasgesture_cellselect.h:39
Definition: tablecell.h:97
Definition: canvasgesture_table.h:30
Definition: pageitem_table.h:49