KateBuffer Class Reference
The KateBuffer class maintains a collections of lines. More...
#include <katebuffer.h>
Inheritance diagram for KateBuffer:

Public Slots | |
bool | openFile (const QString &m_file) |
bool | canEncode () |
bool | saveFile (const QString &m_file) |
uint | count () const |
uint | countVisible () |
uint | lineNumber (uint visibleLine) |
uint | lineVisibleNumber (uint line) |
void | lineInfo (KateLineInfo *info, unsigned int line) |
KateCodeFoldingTree * | foldingTree () |
void | setHlUpdate (bool b) |
void | dumpRegionTree () |
TextLine::Ptr | line (uint i) |
TextLine::Ptr | plainLine (uint i) |
QString | textLine (uint i, bool withoutTrailingSpaces=false) |
void | insertLine (uint i, TextLine::Ptr line) |
void | removeLine (uint i) |
void | changeLine (uint i) |
void | clear () |
void | setHighlight (Highlight *highlight) |
Highlight * | highlight () |
void | updateHighlighting (uint from, uint to, bool invalidate) |
void | invalidateHighlighting () |
QString | text () |
QString | text (uint startLine, uint startCol, uint endLine, uint endCol, bool blockwise=false) |
uint | length () |
int | lineLength (uint line) |
void | setLineVisible (unsigned int lineNr, bool visible) |
bool | loadingBorked () const |
void | setTabWidth (uint w) |
uint | tabWidth () const |
Signals | |
void | linesChanged (int lines) |
void | codeFoldingUpdated () |
void | tagLines (int start, int end) |
void | loadingFinished () |
Public Methods | |
KateBuffer (KateDocument *doc) | |
~KateBuffer () | |
KateDocument * | document () const |
Detailed Description
The KateBuffer class maintains a collections of lines.It allows to maintain state information in a lazy way. It handles swapping out of data using secondary storage.
It is designed to handle large amounts of text-data efficiently with respect to CPU and memory usage.
- Author:
- Waldo Bastian <bastian@kde.org>
Definition at line 50 of file katebuffer.h.
Constructor & Destructor Documentation
|
Create an empty buffer. (with one block with one empty line) Definition at line 215 of file katebuffer.cpp. References clear(), QObject::connect(), and QPtrList< KateBufBlock >::setAutoDelete(). |
|
Goodbye buffer.
Definition at line 245 of file katebuffer.cpp. References QPtrList< KateBufBlock >::clear(). |
Member Function Documentation
|
Open a file, use the given filename + codec (internal use of qtextstream).
Definition at line 505 of file katebuffer.cpp. References QPtrList< KateBufBlock >::append(), QPtrList< KateBufBlock >::clear(), clear(), count(), QFile::encodeName(), QPtrList< KateBufBlock >::isEmpty(), linesChanged(), and loadingFinished(). |
|
Can the current codec handle all chars.
Definition at line 638 of file katebuffer.cpp. References QTextCodec::canEncode(), QTextCodec::name(), and plainLine(). |
|
Save the buffer to a file, use the given filename + codec + end of line chars (internal use of qtextstream).
Definition at line 662 of file katebuffer.cpp. References QFile::close(), QString::fill(), QString::length(), QFile::open(), plainLine(), QTextStream::setCodec(), QTextStream::setEncoding(), and textLine(). |
|
Return the total number of lines in the buffer.
Definition at line 86 of file katebuffer.h. |
|
Return line
Definition at line 750 of file katebuffer.cpp. Referenced by insertLine(). |
|
Return line
Definition at line 1168 of file katebuffer.cpp. Referenced by canEncode(), saveFile(), setLineVisible(), and text(). |
|
Return text from line
Definition at line 1185 of file katebuffer.cpp. |
|
Insert
Definition at line 1202 of file katebuffer.cpp. References QPtrList< KateBufBlock >::findRef(), and line(). |
|
Remove line
Definition at line 1235 of file katebuffer.cpp. References QPtrList< KateBufBlock >::findRef(), and QPtrList< KateBufBlock >::removeRef(). |
|
Change line
Definition at line 1275 of file katebuffer.cpp. Referenced by setLineVisible(). |
|
Clear the buffer.
Definition at line 452 of file katebuffer.cpp. References QPtrList< KateBufBlock >::append(), QPtrList< KateBufBlock >::clear(), QObject::connect(), linesChanged(), and setLineVisible(). Referenced by KateBuffer(), and openFile(). |
|
Use
Definition at line 496 of file katebuffer.cpp. References invalidateHighlighting(). |
|
Update the highlighting.
PRE-condition: All lines prior to
POST-condition: All lines till at least Definition at line 1023 of file katebuffer.cpp. |
|
Invalidate highlighting of whole buffer.
Definition at line 1094 of file katebuffer.cpp. Referenced by setHighlight(). |
|
Get the whole text in the buffer as a string.
Definition at line 1321 of file katebuffer.cpp. References QString::append(), count(), and textLine(). |
|
Get the text between the two given positions.
Definition at line 1335 of file katebuffer.cpp. References QString::append(), count(), QString::length(), plainLine(), and textLine(). |
|
change the visibility of a given line.
Definition at line 1288 of file katebuffer.cpp. References changeLine(), and plainLine(). Referenced by clear(). |
|
was the last loading broken because of not enough tmp disk space ? (will be reseted on successful save of the file, user gets warning if he really wants to do it).
Definition at line 192 of file katebuffer.h. |
|
Emitted during loading when the line count changes.
|
|
Emittend if codefolding returned with a changed list.
|
|
Emitted when the highlighting of a certain range has changed.
|
|
Loading of the file finished.
Referenced by openFile(). |
The documentation for this class was generated from the following files: