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 211 of file katebuffer.cpp. References clear(), QObject::connect(), and QPtrList< KateBufBlock >::setAutoDelete(). | 
| 
 | 
| Goodbye buffer. 
 Definition at line 241 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 501 of file katebuffer.cpp. References QPtrList< KateBufBlock >::append(), QPtrList< KateBufBlock >::clear(), clear(), count(), QPtrList< KateBufBlock >::isEmpty(), kdDebug(), linesChanged(), and loadingFinished(). | 
| 
 | 
| Can the current codec handle all chars. 
 Definition at line 618 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 642 of file katebuffer.cpp. References QFile::close(), QString::fill(), QFile::open(), QString::replace(), QTextStream::setCodec(), QTextStream::setEncoding(), and textLine(). | 
| 
 | 
| 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 688 of file katebuffer.cpp. | 
| 
 | 
| 
Return line  
 Definition at line 1106 of file katebuffer.cpp. Referenced by canEncode(), setLineVisible(), and text(). | 
| 
 | ||||||||||||
| 
Return text from line  
 Definition at line 1123 of file katebuffer.cpp. Referenced by saveFile(), and text(). | 
| 
 | ||||||||||||
| 
Insert  
 Definition at line 1140 of file katebuffer.cpp. References QPtrList< KateBufBlock >::findRef(). | 
| 
 | 
| 
Remove line  
 Definition at line 1173 of file katebuffer.cpp. References QPtrList< KateBufBlock >::findRef(), and QPtrList< KateBufBlock >::removeRef(). | 
| 
 | 
| 
Change line  
 Definition at line 1213 of file katebuffer.cpp. Referenced by setLineVisible(). | 
| 
 | 
| Clear the buffer. 
 Definition at line 448 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 492 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 961 of file katebuffer.cpp. | 
| 
 | 
| Invalidate highlighting of whole buffer. 
 Definition at line 1032 of file katebuffer.cpp. Referenced by setHighlight(). | 
| 
 | 
| Get the whole text in the buffer as a string. 
 Definition at line 1259 of file katebuffer.cpp. References QString::append(), count(), and textLine(). | 
| 
 | ||||||||||||||||||||||||
| Get the text between the two given positions. 
 Definition at line 1273 of file katebuffer.cpp. References QString::append(), count(), plainLine(), and textLine(). | 
| 
 | ||||||||||||
| change the visibility of a given line 
 Definition at line 1226 of file katebuffer.cpp. References changeLine(), endl(), kdDebug(), 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. 
 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:

