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 Member Functions | |
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(), KateBuffer(), and QPtrList< KateBufBlock >::setAutoDelete(). Referenced by KateBuffer(). |
|
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(), QPtrList< KateBufBlock >::isEmpty(), kdDebug(), linesChanged(), loadingFinished(), and openFile(). Referenced by openFile(). |
|
Can the current codec handle all chars.
Definition at line 638 of file katebuffer.cpp. References QTextCodec::canEncode(), endl(), kdDebug(), 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(), QFile::open(), plainLine(), saveFile(), QTextStream::setCodec(), QTextStream::setEncoding(), and textLine(). Referenced by saveFile(). |
|
Return the total number of lines in the buffer.
Definition at line 86 of file katebuffer.h. Referenced by openFile(), and text(). |
|
Return line
Definition at line 750 of file katebuffer.cpp. References line(). Referenced by line(). |
|
Return line
Definition at line 1168 of file katebuffer.cpp. References plainLine(). Referenced by canEncode(), plainLine(), saveFile(), setLineVisible(), and text(). |
|
Return text from line
Definition at line 1185 of file katebuffer.cpp. References textLine(). Referenced by saveFile(), text(), and textLine(). |
|
Insert
Definition at line 1202 of file katebuffer.cpp. References QPtrList< KateBufBlock >::findRef(), and insertLine(). Referenced by insertLine(). |
|
Remove line
Definition at line 1235 of file katebuffer.cpp. References QPtrList< KateBufBlock >::findRef(), removeLine(), and QPtrList< KateBufBlock >::removeRef(). Referenced by removeLine(). |
|
Change line
Definition at line 1275 of file katebuffer.cpp. References changeLine(). Referenced by changeLine(), and setLineVisible(). |
|
Clear the buffer.
Definition at line 452 of file katebuffer.cpp. References QPtrList< KateBufBlock >::append(), QPtrList< KateBufBlock >::clear(), linesChanged(), and setLineVisible(). Referenced by KateBuffer(), and openFile(). |
|
Use
Definition at line 496 of file katebuffer.cpp. References invalidateHighlighting(), and setHighlight(). Referenced by setHighlight(). |
|
Update the highlighting.
PRE-condition: All lines prior to
POST-condition: All lines till at least Definition at line 1023 of file katebuffer.cpp. References updateHighlighting(). Referenced by updateHighlighting(). |
|
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(), plainLine(), and textLine(). |
|
change the visibility of a given line
Definition at line 1288 of file katebuffer.cpp. References changeLine(), endl(), kdDebug(), plainLine(), and setLineVisible(). Referenced by clear(), and setLineVisible(). |
|
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.
Referenced by clear(), and openFile(). |
|
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: