KTextEditor
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.
Defines | |
| #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) |
Define Documentation
| #define DEBUG_CHILD_ORDER |
Definition at line 58 of file smartrange.cpp.
| #define DEBUG_CHILD_OVERLAP |
Definition at line 101 of file smartrange.cpp.
| #define DEBUG_PARENT_OVERLAP |
Definition at line 102 of file smartrange.cpp.
Function Documentation
| 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:
-
range For searching, and smartRange for equality comparison.
Definition at line 157 of file smartrange.cpp.
| 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.
| 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.
| static bool rangeEndLessThan | ( | const SmartRange * | s1, | |
| const SmartRange * | s2 | |||
| ) | [static] |
Definition at line 656 of file smartrange.cpp.
KDE 4.3 API Reference