KTextEditor
smartrangenotifier.h
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 2003-2005 Hamish Rodda <rodda@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef KDELIBS_KTEXTEDITOR_SMARTRANGENOTIFIER_H 00020 #define KDELIBS_KTEXTEDITOR_SMARTRANGENOTIFIER_H 00021 00022 #include <ktexteditor/ktexteditor_export.h> 00023 #include <QtCore/QObject> 00024 00025 #include <ktexteditor/attribute.h> 00026 00027 // TODO: Should SmartRangeWatcher become a base class for SmartRangeNotifier? 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 00207 } 00208 00209 #endif 00210 00211 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE 4.6 API Reference