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

KTextEditor

  • interfaces
  • ktexteditor
Macros | Functions
smartrange.cpp File Reference
#include "smartrange.h"
#include <QtCore/QStack>
#include "document.h"
#include "view.h"
#include "attribute.h"
#include "rangefeedback.h"
#include <kaction.h>
#include <kdebug.h>

Go to the source code of this file.

Macros

#define DEBUG_CHILD_ORDER
 
#define DEBUG_CHILD_OVERLAP
 
#define DEBUG_PARENT_OVERLAP
 

Functions

static int findIndex (const QList< SmartRange * > &ranges, const SmartRange *smartRange, const Range *range)
 
static int lowerBound (const QList< SmartRange * > &ranges, const Cursor &pos)
 
static int lowerBoundRange (const QList< SmartRange * > &ranges, const Cursor &pos, const SmartRange *range)
 
static bool rangeEndLessThan (const SmartRange *s1, const SmartRange *s2)
 

Macro Definition Documentation

◆ DEBUG_CHILD_ORDER

#define DEBUG_CHILD_ORDER

Definition at line 58 of file smartrange.cpp.

◆ DEBUG_CHILD_OVERLAP

#define DEBUG_CHILD_OVERLAP

Definition at line 101 of file smartrange.cpp.

◆ DEBUG_PARENT_OVERLAP

#define DEBUG_PARENT_OVERLAP

Definition at line 102 of file smartrange.cpp.

Function Documentation

◆ findIndex()

static int findIndex ( const QList< SmartRange * > &  ranges,
const SmartRange *  smartRange,
const Range *  range 
)
static

Finds the index of the given SmartRange in the sorted list using binary search. Uses.

Parameters
rangeFor searching, and
smartRangefor equality comparison.

Definition at line 157 of file smartrange.cpp.

◆ lowerBound()

static int lowerBound ( const QList< SmartRange * > &  ranges,
const Cursor &  pos 
)
static

Returns the index of the first range that ends behind pos The list must be sorted by the ranges end-positions.

Definition at line 107 of file smartrange.cpp.

◆ lowerBoundRange()

static int lowerBoundRange ( const QList< SmartRange * > &  ranges,
const Cursor &  pos,
const SmartRange *  range 
)
static

Searches for the given range, or a lower bound for the given position.

Does not work correctly in case of overlaps, but for that case we have a fallback. Only for use in findIndex.

Definition at line 130 of file smartrange.cpp.

◆ rangeEndLessThan()

static bool rangeEndLessThan ( const SmartRange *  s1,
const SmartRange *  s2 
)
static

Definition at line 656 of file smartrange.cpp.

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