summaryrefslogtreecommitdiffstats
path: root/src/kile/kileeventfilter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kile/kileeventfilter.h')
-rw-r--r--src/kile/kileeventfilter.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/kile/kileeventfilter.h b/src/kile/kileeventfilter.h
new file mode 100644
index 0000000..d9a99eb
--- /dev/null
+++ b/src/kile/kileeventfilter.h
@@ -0,0 +1,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