KTextEditor
include/ktexteditor/range.h
97 * Constructor which creates a range from \e startLine, \e startColumn to \e endLine, \e endColumn.
An object representing lines from a start line to an end line.
Definition linerange.h:41
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr LineRange toLineRange() const noexcept
Convert this Range to a LineRange.
Definition include/ktexteditor/range.h:173
constexpr Cursor end() const noexcept
Get the end position of this range.
Definition include/ktexteditor/range.h:163
constexpr Cursor start() const noexcept
Get the start position of this range.
Definition include/ktexteditor/range.h:153
void setEnd(Cursor end) noexcept
Set the end cursor to end.
Definition include/ktexteditor/range.h:234
constexpr bool contains(Cursor cursor) const noexcept
Check to see if cursor is contained within this range, ie >= start() and < end().
Definition include/ktexteditor/range.h:335
constexpr friend Range operator&(Range r1, Range r2) noexcept
Intersects r1 and r2.
Definition include/ktexteditor/range.h:510
constexpr bool isEmpty() const noexcept
Returns true if this range contains no characters, ie.
Definition include/ktexteditor/range.h:301
constexpr Range(int startLine, int startColumn, int endLine, int endColumn) noexcept
Constructor which creates a range from startLine, startColumn to endLine, endColumn.
Definition include/ktexteditor/range.h:104
constexpr friend bool operator>(Range r1, Range r2) noexcept
Greater than operator.
Definition include/ktexteditor/range.h:564
constexpr bool overlaps(Range range) const noexcept
Check whether the this range overlaps with range.
Definition include/ktexteditor/range.h:371
constexpr int columnWidth() const noexcept
Returns the number of columns separating the start() and end() positions.
Definition include/ktexteditor/range.h:290
constexpr bool onSingleLine() const noexcept
Check whether this range is wholly contained within one line, ie.
Definition include/ktexteditor/range.h:268
constexpr friend bool operator<(Range r1, Range r2) noexcept
Less than operator.
Definition include/ktexteditor/range.h:578
static constexpr Range invalid() noexcept
Returns an invalid range.
Definition include/ktexteditor/range.h:121
constexpr friend Range operator-(Range r1, Range r2) noexcept
Subtraction operator.
Definition include/ktexteditor/range.h:483
friend Range & operator&=(Range &r1, Range r2) noexcept
Intersects r1 with r2 and assigns the result to r1.
Definition include/ktexteditor/range.h:523
constexpr friend bool operator!=(Range r1, Range r2) noexcept
Inequality operator.
Definition include/ktexteditor/range.h:550
constexpr Range(Cursor start, int width) noexcept
Constructor which creates a single-line range from start, extending width characters along the same l...
Definition include/ktexteditor/range.h:77
constexpr bool containsLine(int line) const noexcept
Returns true if this range wholly encompasses line.
Definition include/ktexteditor/range.h:347
constexpr Range(Cursor start, int endLine, int endColumn) noexcept
Constructor which creates a range from start, to endLine, endColumn.
Definition include/ktexteditor/range.h:90
constexpr bool contains(Range range) const noexcept
Check whether the this range wholly encompasses range.
Definition include/ktexteditor/range.h:323
constexpr bool overlapsLine(int line) const noexcept
Check whether the range overlaps at least part of line.
Definition include/ktexteditor/range.h:383
friend Range & operator-=(Range &r1, Range r2) noexcept
Subtraction assignment operator.
Definition include/ktexteditor/range.h:496
constexpr Range intersect(Range range) const noexcept
Intersects this range with another, returning the shared area of the two ranges.
Definition include/ktexteditor/range.h:427
friend Range & operator+=(Range &r1, Range r2) noexcept
Addition assignment operator.
Definition include/ktexteditor/range.h:468
constexpr bool overlapsColumn(int column) const noexcept
Check to see if this range overlaps column; that is, if column is between start()....
Definition include/ktexteditor/range.h:398
constexpr bool containsColumn(int column) const noexcept
Check whether the range contains column.
Definition include/ktexteditor/range.h:359
constexpr int numberOfLines() const noexcept
Returns the number of lines separating the start() and end() positions.
Definition include/ktexteditor/range.h:279
constexpr bool boundaryAtCursor(Cursor cursor) const noexcept
Check whether cursor is located at either of the start() or end() boundaries.
Definition include/ktexteditor/range.h:412
constexpr friend Range operator+(Range r1, Range r2) noexcept
Addition operator.
Definition include/ktexteditor/range.h:455
constexpr friend bool operator==(Range r1, Range r2) noexcept
Equality operator.
Definition include/ktexteditor/range.h:537
void setStart(Cursor start) noexcept
Set the start cursor to start.
Definition include/ktexteditor/range.h:218
constexpr Range encompass(Range range) const noexcept
Returns the smallest range which encompasses this range and the supplied range.
Definition include/ktexteditor/range.h:440
Q_SCRIPTABLE Q_NOREPLY void start()
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
KTEXTEDITOR_EXPORT size_t qHash(KTextEditor::Cursor cursor, size_t seed=0) noexcept
QHash function for KTextEditor::Cursor.
Definition ktexteditor.cpp:76
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.