KTextEditor
rangefeedback.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_RANGEFEEDBACK_H
00020 #define KDELIBS_KTEXTEDITOR_RANGEFEEDBACK_H
00021
00022 #include <ktexteditor/ktexteditor_export.h>
00023 #include <QtCore/QObject>
00024
00025 #include <ktexteditor/attribute.h>
00026
00027
00028
00029 namespace KTextEditor
00030 {
00031 class SmartRange;
00032 class View;
00033
00048 class KTEXTEDITOR_EXPORT SmartRangeNotifier : public QObject
00049 {
00050 Q_OBJECT
00051 friend class SmartRange;
00052
00053 public:
00057 SmartRangeNotifier();
00058
00065 bool wantsDirectChanges() const;
00066
00075 void setWantsDirectChanges(bool wantsDirectChanges);
00076
00077 Q_SIGNALS:
00083 void rangePositionChanged(KTextEditor::SmartRange* range);
00084
00090 void rangeContentsChanged(KTextEditor::SmartRange* range);
00091
00103 void rangeContentsChanged(KTextEditor::SmartRange* range, KTextEditor::SmartRange* mostSpecificChild);
00104
00115 void mouseEnteredRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00116
00127 void mouseExitedRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00128
00139 void caretEnteredRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00140
00151 void caretExitedRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
00152
00158 void rangeEliminated(KTextEditor::SmartRange* range);
00159
00166 void rangeDeleted(KTextEditor::SmartRange* range);
00167
00175 void parentRangeChanged(KTextEditor::SmartRange* range, KTextEditor::SmartRange* newParent, KTextEditor::SmartRange* oldParent);
00176
00183 void childRangeInserted(KTextEditor::SmartRange* range, KTextEditor::SmartRange* child);
00184
00191 void childRangeRemoved(KTextEditor::SmartRange* range, KTextEditor::SmartRange* child);
00192
00201 void rangeAttributeChanged(KTextEditor::SmartRange* range, KTextEditor::Attribute::Ptr currentAttribute, KTextEditor::Attribute::Ptr previousAttribute);
00202
00203 private:
00204 bool m_wantDirectChanges;
00205 };
00206
00223 class KTEXTEDITOR_EXPORT SmartRangeWatcher
00224 {
00225 public:
00229 SmartRangeWatcher();
00230
00234 virtual ~SmartRangeWatcher();
00235
00242 bool wantsDirectChanges() const;
00243
00252 void setWantsDirectChanges(bool wantsDirectChanges);
00253
00259 virtual void rangePositionChanged(SmartRange* range);
00260
00266 virtual void rangeContentsChanged(SmartRange* range);
00267
00277 virtual void rangeContentsChanged(SmartRange* range, SmartRange* mostSpecificChild);
00278
00289 virtual void mouseEnteredRange(SmartRange* range, View* view);
00290
00301 virtual void mouseExitedRange(SmartRange* range, View* view);
00302
00313 virtual void caretEnteredRange(SmartRange* range, View* view);
00314
00325 virtual void caretExitedRange(SmartRange* range, View* view);
00326
00332 virtual void rangeEliminated(SmartRange* range);
00333
00340 virtual void rangeDeleted(SmartRange* range);
00341
00349 virtual void parentRangeChanged(SmartRange* range, SmartRange* newParent, SmartRange* oldParent);
00350
00357 virtual void childRangeInserted(SmartRange* range, SmartRange* child);
00358
00365 virtual void childRangeRemoved(SmartRange* range, SmartRange* child);
00366
00375 virtual void rangeAttributeChanged(SmartRange* range, Attribute::Ptr currentAttribute, Attribute::Ptr previousAttribute);
00376
00377 private:
00378 bool m_wantDirectChanges;
00379 };
00380
00381 }
00382
00383 #endif
00384
00385