KTextEditor
linerange.h
An object representing lines from a start line to an end line.
Definition linerange.h:41
constexpr friend bool operator<(LineRange r1, LineRange r2) noexcept
Less than operator.
Definition linerange.h:479
constexpr int start() const noexcept
Get the start line of this line range.
Definition linerange.h:105
static constexpr LineRange invalid() noexcept
Returns an invalid line range.
Definition linerange.h:73
bool confineToRange(LineRange range) noexcept
Confine this range if necessary to fit within range.
Definition linerange.h:221
constexpr int numberOfLines() const noexcept
Returns the number of lines separating the start() and end() line.
Definition linerange.h:254
constexpr bool overlapsLine(int line) const noexcept
Check whether the range overlaps at least part of line.
Definition linerange.h:312
constexpr bool overlaps(LineRange range) const noexcept
Check whether the this range overlaps with range.
Definition linerange.h:300
constexpr bool containsLine(int line) const noexcept
Returns true if this range wholly encompasses line.
Definition linerange.h:288
constexpr LineRange encompass(LineRange range) const noexcept
Returns the smallest range which encompasses this line range and the supplied range.
Definition linerange.h:341
friend LineRange & operator&=(LineRange &r1, LineRange r2) noexcept
Intersects r1 with r2 and assigns the result to r1.
Definition linerange.h:424
friend LineRange & operator+=(LineRange &r1, LineRange r2) noexcept
Addition assignment operator.
Definition linerange.h:369
constexpr friend LineRange operator+(LineRange r1, LineRange r2) noexcept
Addition operator.
Definition linerange.h:356
bool expandToRange(LineRange range) noexcept
Expand this line range if necessary to contain range.
Definition linerange.h:197
constexpr bool contains(LineRange range) const noexcept
Check whether the this range wholly encompasses range.
Definition linerange.h:276
constexpr LineRange intersect(LineRange range) const noexcept
Intersects this line range with another, returning the shared lines of the two line ranges.
Definition linerange.h:327
void setRange(LineRange range) noexcept
Set the start and end lines to start and end respectively.
Definition linerange.h:128
constexpr friend bool operator>(LineRange r1, LineRange r2) noexcept
Greater than operator.
Definition linerange.h:465
constexpr bool onSingleLine() const noexcept
Check whether this line range is on one line.
Definition linerange.h:243
friend LineRange & operator-=(LineRange &r1, LineRange r2) noexcept
Subtraction assignment operator.
Definition linerange.h:397
constexpr friend LineRange operator&(LineRange r1, LineRange r2) noexcept
Intersects r1 and r2.
Definition linerange.h:411
void setRange(int start, int end) noexcept
Set the start and end lines to start and end respectively.
Definition linerange.h:141
constexpr friend LineRange operator-(LineRange r1, LineRange r2) noexcept
Subtraction operator.
Definition linerange.h:384
constexpr friend bool operator==(LineRange r1, LineRange r2) noexcept
Equality operator.
Definition linerange.h:438
constexpr friend bool operator!=(LineRange r1, LineRange r2) noexcept
Inequality operator.
Definition linerange.h:451
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 Mon Nov 18 2024 12:11:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.