• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • interfaces
  • ktexteditor
smartrangenotifier.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2003-2005 Hamish Rodda <rodda@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#ifndef KDELIBS_KTEXTEDITOR_SMARTRANGENOTIFIER_H
20#define KDELIBS_KTEXTEDITOR_SMARTRANGENOTIFIER_H
21
22#include <ktexteditor/ktexteditor_export.h>
23#include <QtCore/QObject>
24
25#include <ktexteditor/attribute.h>
26
27// TODO: Should SmartRangeWatcher become a base class for SmartRangeNotifier?
28
29namespace KTextEditor
30{
31class SmartRange;
32class View;
33
48class KTEXTEDITOR_EXPORT SmartRangeNotifier : public QObject
49{
50 Q_OBJECT
51 friend class SmartRange;
52
53 public:
57 SmartRangeNotifier();
58
65 bool wantsDirectChanges() const;
66
75 void setWantsDirectChanges(bool wantsDirectChanges);
76
77 Q_SIGNALS:
83 void rangePositionChanged(KTextEditor::SmartRange* range);
84
90 void rangeContentsChanged(KTextEditor::SmartRange* range);
91
103 void rangeContentsChanged(KTextEditor::SmartRange* range, KTextEditor::SmartRange* mostSpecificChild);
104
115 void mouseEnteredRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
116
127 void mouseExitedRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
128
139 void caretEnteredRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
140
151 void caretExitedRange(KTextEditor::SmartRange* range, KTextEditor::View* view);
152
158 void rangeEliminated(KTextEditor::SmartRange* range);
159
166 void rangeDeleted(KTextEditor::SmartRange* range);
167
175 void parentRangeChanged(KTextEditor::SmartRange* range, KTextEditor::SmartRange* newParent, KTextEditor::SmartRange* oldParent);
176
183 void childRangeInserted(KTextEditor::SmartRange* range, KTextEditor::SmartRange* child);
184
191 void childRangeRemoved(KTextEditor::SmartRange* range, KTextEditor::SmartRange* child);
192
201 void rangeAttributeChanged(KTextEditor::SmartRange* range, KTextEditor::Attribute::Ptr currentAttribute, KTextEditor::Attribute::Ptr previousAttribute);
202
203 private:
204 bool m_wantDirectChanges;
205};
206
207}
208
209#endif
210
211// kate: space-indent on; indent-width 2; replace-tabs on;
attribute.h
KSharedPtr< Attribute >
KTextEditor::SmartRangeNotifier
A class which provides notifications of state changes to a SmartRange via QObject signals.
Definition: smartrangenotifier.h:49
KTextEditor::SmartRangeNotifier::caretEnteredRange
void caretEnteredRange(KTextEditor::SmartRange *range, KTextEditor::View *view)
The caret on view entered range.
KTextEditor::SmartRangeNotifier::rangeEliminated
void rangeEliminated(KTextEditor::SmartRange *range)
The range now contains no characters (ie.
KTextEditor::SmartRangeNotifier::childRangeRemoved
void childRangeRemoved(KTextEditor::SmartRange *range, KTextEditor::SmartRange *child)
The child range child was removed from the current range.
KTextEditor::SmartRangeNotifier::mouseExitedRange
void mouseExitedRange(KTextEditor::SmartRange *range, KTextEditor::View *view)
The mouse cursor on view exited range.
KTextEditor::SmartRangeNotifier::rangeAttributeChanged
void rangeAttributeChanged(KTextEditor::SmartRange *range, KTextEditor::Attribute::Ptr currentAttribute, KTextEditor::Attribute::Ptr previousAttribute)
The highlighting attribute of range was changed from previousAttribute to currentAttribute.
KTextEditor::SmartRangeNotifier::caretExitedRange
void caretExitedRange(KTextEditor::SmartRange *range, KTextEditor::View *view)
The caret on view exited range.
KTextEditor::SmartRangeNotifier::rangeContentsChanged
void rangeContentsChanged(KTextEditor::SmartRange *range)
The contents of the range changed.
KTextEditor::SmartRangeNotifier::rangeContentsChanged
void rangeContentsChanged(KTextEditor::SmartRange *range, KTextEditor::SmartRange *mostSpecificChild)
The contents of the range changed.
KTextEditor::SmartRangeNotifier::childRangeInserted
void childRangeInserted(KTextEditor::SmartRange *range, KTextEditor::SmartRange *child)
The range child was inserted as a child range into the current range.
KTextEditor::SmartRangeNotifier::parentRangeChanged
void parentRangeChanged(KTextEditor::SmartRange *range, KTextEditor::SmartRange *newParent, KTextEditor::SmartRange *oldParent)
The range's parent was changed.
KTextEditor::SmartRangeNotifier::mouseEnteredRange
void mouseEnteredRange(KTextEditor::SmartRange *range, KTextEditor::View *view)
The mouse cursor on view entered range.
KTextEditor::SmartRangeNotifier::rangeDeleted
void rangeDeleted(KTextEditor::SmartRange *range)
The SmartRange instance specified by range is being deleted.
KTextEditor::SmartRangeNotifier::rangePositionChanged
void rangePositionChanged(KTextEditor::SmartRange *range)
The range's position changed.
KTextEditor::SmartRange
A Range which is bound to a specific Document, and maintains its position.
Definition: smartrange.h:95
KTextEditor::View
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:146
QObject
ktexteditor_export.h
KTextEditor
Namespace for the KDE Text Editor Interfaces.
Definition: annotationinterface.h:31
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal