QCodeEdit  2.2
qeditorinputbindinginterface.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
4 **
5 ** This file is part of the Edyuk project <http://edyuk.org>
6 **
7 ** This file may be used under the terms of the GNU General Public License
8 ** version 3 as published by the Free Software Foundation and appearing in the
9 ** file GPL.txt included in the packaging of this file.
10 **
11 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 **
14 ****************************************************************************/
15 
16 #ifndef _QEDITOR_INPUT_BINDING_INTERFACE_H_
17 #define _QEDITOR_INPUT_BINDING_INTERFACE_H_
18 
19 #include "qce-config.h"
20 
21 class QEditor;
22 
23 class QString;
24 class QKeyEvent;
25 class QMouseEvent;
26 class QInputMethodEvent;
27 class QContextMenuEvent;
28 
30 {
31  public:
32  virtual ~QEditorInputBindingInterface() {}
33 
34  virtual QString id() const = 0;
35  virtual QString name() const = 0;
36 
37  virtual bool isExclusive() const = 0;
38 
39  virtual bool keyPressEvent(QKeyEvent *event, QEditor *editor) = 0;
40  virtual void postKeyPressEvent(QKeyEvent *event, QEditor *editor) = 0;
41 
42  virtual bool inputMethodEvent(QInputMethodEvent* event, QEditor *editor) = 0;
43  virtual void postInputMethodEvent(QInputMethodEvent *event, QEditor *editor) = 0;
44 
45  virtual bool mouseMoveEvent(QMouseEvent *event, QEditor *editor) = 0;
46  virtual void postMouseMoveEvent(QMouseEvent *event, QEditor *editor) = 0;
47 
48  virtual bool mousePressEvent(QMouseEvent *event, QEditor *editor) = 0;
49  virtual void postMousePressEvent(QMouseEvent *event, QEditor *editor) = 0;
50 
51  virtual bool mouseReleaseEvent(QMouseEvent *event, QEditor *editor) = 0;
52  virtual void postMouseReleaseEvent(QMouseEvent *event, QEditor *editor) = 0;
53 
54  virtual bool mouseDoubleClickEvent(QMouseEvent *event, QEditor *editor) = 0;
55  virtual void postMouseDoubleClickEvent(QMouseEvent *event, QEditor *editor) = 0;
56 
57  virtual bool contextMenuEvent(QContextMenuEvent *event, QEditor *editor) = 0;
58 };
59 
60 #endif // _QEDITOR_INPUT_BINDING_INTERFACE_H_
Utility file for shared library creation.
A text editing widget.
Definition: qeditor.h:55
A class designed to allow extending user input in a transparent way.
Definition: qeditorinputbindinginterface.h:29