blob: d9a99eb38dd21871f76f2b11a92efb710f6e4778 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
//
// C++ Interface: kileeventfilter
//
// Description:
//
//
// Author: Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef KILEEVENTFILTER_H
#define KILEEVENTFILTER_H
#include <qobject.h>
#include <qregexp.h>
class QEvent;
namespace Kate {class View; }
namespace KileDocument { class EditorExtension; };
/**
* This class is capable of intercepting key-strokes from the editor. It can complete a \begin{env}
* with a \end{env} when enter is pressed.
**/
class KileEventFilter : public QObject
{
Q_OBJECT
public:
KileEventFilter(KileDocument::EditorExtension *edit);
public slots:
void readConfig();
protected:
bool eventFilter(QObject *o, QEvent *e);
private:
bool m_bCompleteEnvironment;
KileDocument::EditorExtension *m_edit;
};
#endif
|