# class KTextEditor.SmartRangeNotifier

###

Table of contents
Modules
ktexteditor Classes
All Classes

Module | ktexteditor
Namespace | ktexteditor
Class | KTextEditor.SmartRangeNotifier
Inherits | QObject

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\>

### methods

- SmartRangeNotifier ()

  returns nothing

  Default constructor.

- caretEnteredRange (range, view) signal

  returns nothing
  SIGNAL ("caretEnteredRange (KTextEditor.SmartRange*, KTextEditor.View*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  view | KTextEditor.View |

  The caret on view entered range.

  To do: 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.

  range - pointer to the range which generated the notification.

  view - view over which the mouse moved to generate the notification

- caretExitedRange (range, view) signal

  returns nothing
  SIGNAL ("caretExitedRange (KTextEditor.SmartRange*, KTextEditor.View*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  view | KTextEditor.View |

  The caret on view exited range.

  To do: 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.

  range - pointer to the range which generated the notification.

  view - view over which the mouse moved to generate the notification

- childRangeInserted (range, child) signal

  returns nothing
  SIGNAL ("childRangeInserted (KTextEditor.SmartRange*, KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  child | KTextEditor.SmartRange |

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

  range - pointer to the range which generated the notification.

  child - pointer to the range which was inserted as a child range.

- childRangeRemoved (range, child) signal

  returns nothing
  SIGNAL ("childRangeRemoved (KTextEditor.SmartRange*, KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  child | KTextEditor.SmartRange |

  The child range child was removed from the current range.

  range - pointer to the range which generated the notification.

  child - pointer to the child range which was removed.

- mouseEnteredRange (range, view) signal

  returns nothing
  SIGNAL ("mouseEnteredRange (KTextEditor.SmartRange*, KTextEditor.View*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  view | KTextEditor.View |

  The mouse cursor on view entered range.

  To do: 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.

  range - pointer to the range which generated the notification.

  view - view over which the mouse moved to generate the notification

- mouseExitedRange (range, view) signal

  returns nothing
  SIGNAL ("mouseExitedRange (KTextEditor.SmartRange*, KTextEditor.View*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  view | KTextEditor.View |

  The mouse cursor on view exited range.

  To do: 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.

  range - pointer to the range which generated the notification.

  view - view over which the mouse moved to generate the notification

- parentRangeChanged (range, newParent, oldParent) signal

  returns nothing
  SIGNAL ("parentRangeChanged (KTextEditor.SmartRange*, KTextEditor.SmartRange*, KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  newParent | KTextEditor.SmartRange |
  oldParent | KTextEditor.SmartRange |

  The range's parent was changed.

  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.

- rangeAttributeChanged (range, currentAttribute, previousAttribute) signal

  returns nothing
  SIGNAL ("rangeAttributeChanged (KTextEditor.SmartRange*, KTextEditor.Attribute.Ptr, KTextEditor.Attribute.Ptr)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  currentAttribute | KTextEditor.Attribute.Ptr |
  previousAttribute | KTextEditor.Attribute.Ptr |

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

  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

- rangeContentsChanged (range) signal

  returns nothing
  SIGNAL ("rangeContentsChanged (KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |

  The contents of the range changed.

  range - pointer to the range which generated the notification.

- rangeContentsChanged (range, mostSpecificChild) signal

  returns nothing
  SIGNAL ("rangeContentsChanged (KTextEditor.SmartRange*, KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |
  mostSpecificChild | KTextEditor.SmartRange |

  The contents of the range changed. 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).

  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.

- rangeDeleted (range) signal

  returns nothing
  SIGNAL ("rangeDeleted (KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |

  The SmartRange instance specified by range is being deleted.

  range - pointer to the range which is about to be deleted. It is still safe to access information at this point.

- rangeEliminated (range) signal

  returns nothing
  SIGNAL ("rangeEliminated (KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |

  The range now contains no characters (ie. the start and end cursors are the same).

  range - pointer to the range which generated the notification.

- rangePositionChanged (range) signal

  returns nothing
  SIGNAL ("rangePositionChanged (KTextEditor.SmartRange*)")

  Argument | Type | Default
  --- | --- | ---
  range | KTextEditor.SmartRange |

  The range's position changed.

  range - pointer to the range which generated the notification.

- setWantsDirectChanges (wantsDirectChanges)

  returns nothing

  Argument | Type | Default
  --- | --- | ---
  wantsDirectChanges | bool |

  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.

  wantsDirectChanges - whether this watcher should provide notifications for direct changes.

- wantsDirectChanges ()

  returns (bool)

  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.