KTextEditor
cursorfeedback.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KDELIBS_KTEXTEDITOR_CURSORFEEDBACK_H
00020 #define KDELIBS_KTEXTEDITOR_CURSORFEEDBACK_H
00021
00022 #include <ktexteditor/ktexteditor_export.h>
00023 #include <QtCore/QObject>
00024 #include <kdebug.h>
00025
00026 namespace KTextEditor
00027 {
00028 class SmartCursor;
00029
00045 class KTEXTEDITOR_EXPORT SmartCursorWatcher
00046 {
00047 public:
00051 SmartCursorWatcher();
00052
00056 virtual ~SmartCursorWatcher();
00057
00063 bool wantsDirectChanges() const;
00064
00072 void setWantsDirectChanges(bool wantsDirectChanges);
00073
00079 virtual void positionChanged(SmartCursor* cursor);
00080
00087 virtual void positionDeleted(SmartCursor* cursor);
00088
00097 virtual void characterDeleted(SmartCursor* cursor, bool deletedBefore);
00098
00107 virtual void characterInserted(SmartCursor* cursor, bool insertedBefore);
00108
00115 virtual void deleted(SmartCursor* cursor);
00116
00117 private:
00118 bool m_wantDirectChanges;
00119 };
00120
00136 class KTEXTEDITOR_EXPORT SmartCursorNotifier : public QObject
00137 {
00138 Q_OBJECT
00139
00140 public:
00144 SmartCursorNotifier();
00145
00151 bool wantsDirectChanges() const;
00152
00160 void setWantsDirectChanges(bool wantsDirectChanges);
00161
00162 Q_SIGNALS:
00168 void positionChanged(KTextEditor::SmartCursor* cursor);
00169
00176 void positionDeleted(KTextEditor::SmartCursor* cursor);
00177
00186 void characterDeleted(KTextEditor::SmartCursor* cursor, bool deletedBefore);
00187
00196 void characterInserted(KTextEditor::SmartCursor* cursor, bool insertedBefore);
00197
00204 void deleted(KTextEditor::SmartCursor* cursor);
00205
00206 private:
00207 bool m_wantDirectChanges;
00208 };
00209
00210 }
00211
00212 #endif
00213
00214