Kate
#include <katetextline.h>
Classes | |
class | Attribute |
Public Types | |
typedef QVector< short > | ContextStack |
enum | Flags { flagHlContinue = 1, flagAutoWrapped = 2, flagFoldingStartAttribute = 4, flagFoldingStartIndentation = 8, flagLineModified = 16, flagLineSavedOnDisk = 32 } |
Detailed Description
Class representing a single text line.
For efficience reasons, not only pure text is stored here, but also additional data. Will be only accessed over shared pointers.
Definition at line 37 of file katetextline.h.
Member Typedef Documentation
typedef QVector<short> Kate::TextLineData::ContextStack |
Context stack.
Definition at line 47 of file katetextline.h.
Member Enumeration Documentation
Flags of TextLineData.
Enumerator | |
---|---|
flagHlContinue | |
flagAutoWrapped | |
flagFoldingStartAttribute | |
flagFoldingStartIndentation | |
flagLineModified | |
flagLineSavedOnDisk |
Definition at line 93 of file katetextline.h.
Constructor & Destructor Documentation
Kate::TextLineData::TextLineData | ( | ) |
Construct an empty text line.
Definition at line 25 of file katetextline.cpp.
Kate::TextLineData::TextLineData | ( | const QString & | text | ) |
Construct an text line with given text.
- Parameters
-
text text to use for this line
Definition at line 30 of file katetextline.cpp.
Kate::TextLineData::~TextLineData | ( | ) |
Destruct the text line.
Definition at line 36 of file katetextline.cpp.
Member Function Documentation
void Kate::TextLineData::addAttribute | ( | const Attribute & | attribute | ) |
Add attribute to this line.
- Parameters
-
attribute new attribute to append
Definition at line 185 of file katetextline.cpp.
|
inline |
Returns the character at the given column.
If column is out of range, the return value is QChar().
- Parameters
-
column column you want char for
- Returns
- char at given column or QChar()
Definition at line 159 of file katetextline.h.
|
inline |
Gets the attribute at the given position use KRenderer::attributes to get the KTextAttribute for this.
- Parameters
-
pos position of attribute requested
- Returns
- value of attribute
Definition at line 376 of file katetextline.h.
|
inline |
Accessor to attributes.
- Returns
- attributes of this line
Definition at line 367 of file katetextline.h.
|
inline |
Clear attributes of this line.
Definition at line 361 of file katetextline.h.
|
inline |
Clear folding start status.
Definition at line 222 of file katetextline.h.
|
inline |
Returns true, if the line ends with match, otherwise returns false.
Definition at line 338 of file katetextline.h.
int Kate::TextLineData::firstChar | ( | ) | const |
Returns the position of the first non-whitespace character.
- Returns
- position of first non-whitespace char or -1 if there is none
Definition at line 40 of file katetextline.cpp.
int Kate::TextLineData::fromVirtualColumn | ( | int | column, |
int | tabWidth | ||
) | const |
Returns the "real" column where each tab only counts one character.
The conversion calculates with tabWidth characters for each tab.
Definition at line 144 of file katetextline.cpp.
|
inline |
Returns true, if the line's hl-continue flag is set, otherwise returns false.
The hl-continue flag is set in the hl-definition files.
- Returns
- hl-continue flag is set
Definition at line 273 of file katetextline.h.
int Kate::TextLineData::indentDepth | ( | int | tabWidth | ) | const |
Returns the indentation depth with each tab expanded into tabWidth characters.
Definition at line 81 of file katetextline.cpp.
|
inline |
Returns true, if the line was automagically wrapped, otherwise returns false.
- Returns
- was this line auto-wrapped?
Definition at line 280 of file katetextline.h.
int Kate::TextLineData::lastChar | ( | ) | const |
Returns the position of the last non-whitespace character.
- Returns
- position of last non-whitespace char or -1 if there is none
Definition at line 45 of file katetextline.cpp.
QString Kate::TextLineData::leadingWhitespace | ( | ) | const |
Leading whitespace of this line.
- Returns
- leading whitespace of this line
Definition at line 73 of file katetextline.cpp.
|
inline |
Returns the line's length.
Definition at line 266 of file katetextline.h.
|
inline |
Mark as folding start line of an attribute based folding.
Definition at line 248 of file katetextline.h.
|
inline |
Mark as folding start line of an indentation based folding.
Definition at line 257 of file katetextline.h.
|
inline |
Definition at line 180 of file katetextline.h.
|
inline |
Definition at line 195 of file katetextline.h.
|
inline |
Is on this line a folding start?
- Returns
- folding start line or not?
Definition at line 214 of file katetextline.h.
|
inline |
Is on this line a folding start per attribute?
- Returns
- folding start line per attribute? or not?
Definition at line 231 of file katetextline.h.
|
inline |
Is on this line a folding start per indentation?
- Returns
- folding start line per indentation? or not?
Definition at line 240 of file katetextline.h.
|
inline |
Definition at line 190 of file katetextline.h.
|
inline |
Definition at line 205 of file katetextline.h.
Returns true, if match equals to the text at position column, otherwise returns false.
Definition at line 103 of file katetextline.cpp.
int Kate::TextLineData::nextNonSpaceChar | ( | int | pos | ) | const |
Find the position of the next char that is not a space.
- Parameters
-
pos Column of the character which is examined first.
- Returns
- True if the specified or a following character is not a space Otherwise false.
Definition at line 50 of file katetextline.cpp.
|
inline |
Same as at().
- Parameters
-
column column you want char for
- Returns
- char at given column or QChar()
Definition at line 172 of file katetextline.h.
int Kate::TextLineData::previousNonSpaceChar | ( | int | pos | ) | const |
Find the position of the previous char that is not a space.
- Parameters
-
pos Column of the character which is examined first.
- Returns
- The position of the first non-whitespace character preceding pos, or -1 if none is found.
Definition at line 61 of file katetextline.cpp.
|
inline |
set auto-wrapped property
- Parameters
-
wrapped line was wrapped?
Definition at line 404 of file katetextline.h.
|
inline |
Sets the syntax highlight context number.
- Parameters
-
val new context array
Definition at line 350 of file katetextline.h.
|
inline |
Returns true, if the line starts with match, otherwise returns false.
Definition at line 333 of file katetextline.h.
|
inline |
Returns the complete text line (as a QString reference).
- Returns
- text of this line, read-only
Definition at line 286 of file katetextline.h.
|
inline |
Returns the substring with length beginning at the given column.
- Parameters
-
column start column of text to return length length of text to return
- Returns
- wanted part of text
Definition at line 294 of file katetextline.h.
|
inline |
Accessor to the text contained in this line.
- Returns
- text of this line as constant reference
Definition at line 123 of file katetextline.h.
int Kate::TextLineData::toVirtualColumn | ( | int | column, |
int | tabWidth | ||
) | const |
Returns the column with each tab expanded into tabWidth characters.
Definition at line 124 of file katetextline.cpp.
int Kate::TextLineData::virtualLength | ( | int | tabWidth | ) | const |
Returns the text length with each tab expanded into tabWidth characters.
Definition at line 168 of file katetextline.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.