• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KTextEditor

KTextEditor::SmartRangeNotifier

KTextEditor::SmartRangeNotifier Class Reference
[Smart Cursors and Ranges]

A class which provides notifications of state changes to a SmartRange via QObject signals. More...

#include <rangefeedback.h>

Inheritance diagram for KTextEditor::SmartRangeNotifier:
QObject

List of all members.

Signals

void caretEnteredRange (KTextEditor::SmartRange *range, KTextEditor::View *view)
void caretExitedRange (KTextEditor::SmartRange *range, KTextEditor::View *view)
void childRangeInserted (KTextEditor::SmartRange *range, KTextEditor::SmartRange *child)
void childRangeRemoved (KTextEditor::SmartRange *range, KTextEditor::SmartRange *child)
void mouseEnteredRange (KTextEditor::SmartRange *range, KTextEditor::View *view)
void mouseExitedRange (KTextEditor::SmartRange *range, KTextEditor::View *view)
void parentRangeChanged (KTextEditor::SmartRange *range, KTextEditor::SmartRange *newParent, KTextEditor::SmartRange *oldParent)
void rangeAttributeChanged (KTextEditor::SmartRange *range, KTextEditor::Attribute::Ptr currentAttribute, KTextEditor::Attribute::Ptr previousAttribute)
void rangeContentsChanged (KTextEditor::SmartRange *range, KTextEditor::SmartRange *mostSpecificChild)
void rangeContentsChanged (KTextEditor::SmartRange *range)
void rangeDeleted (KTextEditor::SmartRange *range)
void rangeEliminated (KTextEditor::SmartRange *range)
void rangePositionChanged (KTextEditor::SmartRange *range)

Public Member Functions

void setWantsDirectChanges (bool wantsDirectChanges)
 SmartRangeNotifier ()
bool wantsDirectChanges () const

Detailed Description

A class which provides notifications of state changes to a SmartRange via QObject signals.

This class provides notifications of changes to the position or contents of a SmartRange via QObject signals.

If you prefer to receive notifications via virtual inheritance, see SmartRangeWatcher.

See also:
SmartRange, SmartRangeWatcher
Author:
Hamish Rodda <rodda@kde.org>

Definition at line 48 of file rangefeedback.h.


Constructor & Destructor Documentation

SmartRangeNotifier::SmartRangeNotifier (  ) 

Default constructor.

Definition at line 27 of file rangefeedback.cpp.


Member Function Documentation

void KTextEditor::SmartRangeNotifier::caretEnteredRange ( KTextEditor::SmartRange *  range,
KTextEditor::View *  view 
) [signal]

The caret on view entered range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
range pointer to the range which generated the notification.
view view over which the mouse moved to generate the notification
void KTextEditor::SmartRangeNotifier::caretExitedRange ( KTextEditor::SmartRange *  range,
KTextEditor::View *  view 
) [signal]

The caret on view exited range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
range pointer to the range which generated the notification.
view view over which the mouse moved to generate the notification
void KTextEditor::SmartRangeNotifier::childRangeInserted ( KTextEditor::SmartRange *  range,
KTextEditor::SmartRange *  child 
) [signal]

The range child was inserted as a child range into the current range.

Parameters:
range pointer to the range which generated the notification.
child pointer to the range which was inserted as a child range.
void KTextEditor::SmartRangeNotifier::childRangeRemoved ( KTextEditor::SmartRange *  range,
KTextEditor::SmartRange *  child 
) [signal]

The child range child was removed from the current range.

Parameters:
range pointer to the range which generated the notification.
child pointer to the child range which was removed.
void KTextEditor::SmartRangeNotifier::mouseEnteredRange ( KTextEditor::SmartRange *  range,
KTextEditor::View *  view 
) [signal]

The mouse cursor on view entered range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
range pointer to the range which generated the notification.
view view over which the mouse moved to generate the notification
void KTextEditor::SmartRangeNotifier::mouseExitedRange ( KTextEditor::SmartRange *  range,
KTextEditor::View *  view 
) [signal]

The mouse cursor on view exited range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
range pointer to the range which generated the notification.
view view over which the mouse moved to generate the notification
void KTextEditor::SmartRangeNotifier::parentRangeChanged ( KTextEditor::SmartRange *  range,
KTextEditor::SmartRange *  newParent,
KTextEditor::SmartRange *  oldParent 
) [signal]

The range's parent was changed.

Parameters:
range pointer to the range which generated the notification.
newParent pointer to the range which was is now the parent range.
oldParent pointer to the range which used to be the parent range.
void KTextEditor::SmartRangeNotifier::rangeAttributeChanged ( KTextEditor::SmartRange *  range,
KTextEditor::Attribute::Ptr  currentAttribute,
KTextEditor::Attribute::Ptr  previousAttribute 
) [signal]

The highlighting attribute of range was changed from previousAttribute to currentAttribute.

Parameters:
range pointer to the range which generated the notification.
currentAttribute the attribute newly assigned to this range
previousAttribute the attribute previously assigned to this range
void KTextEditor::SmartRangeNotifier::rangeContentsChanged ( KTextEditor::SmartRange *  range,
KTextEditor::SmartRange *  mostSpecificChild 
) [signal]

The contents of the range changed.

Warning:
This notification is special in that it is only emitted by the top range of a heirachy, and also gives the furthest descendant child range which still encompasses the whole change (see contents).
Parameters:
range pointer to the range which generated the notification.
mostSpecificChild the child range which both contains the entire change and is the furthest descendant of this range.
void KTextEditor::SmartRangeNotifier::rangeContentsChanged ( KTextEditor::SmartRange *  range  )  [signal]

The contents of the range changed.

Parameters:
range pointer to the range which generated the notification.
void KTextEditor::SmartRangeNotifier::rangeDeleted ( KTextEditor::SmartRange *  range  )  [signal]

The SmartRange instance specified by range is being deleted.

Parameters:
range pointer to the range which is about to be deleted. It is still safe to access information at this point.
void KTextEditor::SmartRangeNotifier::rangeEliminated ( KTextEditor::SmartRange *  range  )  [signal]

The range now contains no characters (ie.

the start and end cursors are the same).

Parameters:
range pointer to the range which generated the notification.
void KTextEditor::SmartRangeNotifier::rangePositionChanged ( KTextEditor::SmartRange *  range  )  [signal]

The range's position changed.

Parameters:
range pointer to the range which generated the notification.
void SmartRangeNotifier::setWantsDirectChanges ( bool  wantsDirectChanges  ) 

Set whether this notifier should notify of changes that happen directly to the range, e.g.

by calls to SmartCursor::setRange(), or by direct assignment to either of the start() or end() cursors, rather than just when surrounding text changes.

Parameters:
wantsDirectChanges whether this watcher should provide notifications for direct changes.

Definition at line 37 of file rangefeedback.cpp.

bool SmartRangeNotifier::wantsDirectChanges (  )  const

Returns whether this notifier will notify of changes that happen directly to the range, e.g.

by calls to SmartCursor::setRange(), or by direct assignment to either of the start() or end() cursors, rather than just when surrounding text changes.

Definition at line 32 of file rangefeedback.cpp.


The documentation for this class was generated from the following files:
  • rangefeedback.h
  • rangefeedback.cpp

KTextEditor

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal