#include <katebuffer.h>
Inherits TQObject.
Public Slots | |
void | codeFoldingColumnUpdate (unsigned int lineNr) |
Signals | |
void | codeFoldingUpdated () |
void | tagLines (int start, int end) |
Public Member Functions | |
KateBuffer (KateDocument *doc) | |
~KateBuffer () | |
void | editStart () |
void | editEnd () |
bool | editChanged () const |
uint | editTagStart () const |
uint | editTagEnd () const |
bool | editTagFrom () const |
void | clear () |
bool | openFile (const TQString &m_file) |
bool | loadingBorked () const |
bool | binary () const |
bool | canEncode () |
bool | saveFile (const TQString &m_file) |
KateTextLine::Ptr | line (uint i) |
KateTextLine::Ptr | plainLine (uint i) |
uint | count () const |
void | changeLine (uint i) |
void | insertLine (uint i, KateTextLine::Ptr line) |
void | removeLine (uint i) |
uint | countVisible () |
uint | lineNumber (uint visibleLine) |
uint | lineVisibleNumber (uint line) |
void | lineInfo (KateLineInfo *info, unsigned int line) |
uint | tabWidth () const |
void | setTabWidth (uint w) |
void | setHighlight (uint hlMode) |
KateHighlighting * | highlight () |
void | invalidateHighlighting () |
KateCodeFoldingTree * | foldingTree () |
Static Public Member Functions | |
static uint | maxLoadedBlocks () |
static void | setMaxLoadedBlocks (uint count) |
Friends | |
class | KateBufBlock |
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.
Definition at line 341 of file katebuffer.h.
Constructor & Destructor Documentation
◆ KateBuffer()
KateBuffer::KateBuffer | ( | KateDocument * | doc | ) |
Create an empty buffer.
- Parameters
-
doc parent document
(with one block with one empty line)
Definition at line 323 of file katebuffer.cpp.
◆ ~KateBuffer()
KateBuffer::~KateBuffer | ( | ) |
Member Function Documentation
◆ binary()
|
inline |
◆ canEncode()
bool KateBuffer::canEncode | ( | ) |
Can the current codec handle all chars.
- Returns
- chars can be encoded
Definition at line 540 of file katebuffer.cpp.
◆ changeLine()
void KateBuffer::changeLine | ( | uint | i | ) |
Mark line i
as changed !
Definition at line 702 of file katebuffer.cpp.
◆ clear()
void KateBuffer::clear | ( | ) |
Clear the buffer.
Definition at line 431 of file katebuffer.cpp.
◆ codeFoldingUpdated
|
signal |
Emittend if codefolding returned with a changed list.
◆ count()
|
inline |
Return the total number of lines in the buffer.
Definition at line 524 of file katebuffer.h.
◆ editChanged()
|
inline |
were there changes in the current running editing session?
- Returns
- changes done?
Definition at line 394 of file katebuffer.h.
◆ editEnd()
void KateBuffer::editEnd | ( | ) |
finish some editing action
Definition at line 379 of file katebuffer.cpp.
◆ editStart()
void KateBuffer::editStart | ( | ) |
start some editing action
Definition at line 363 of file katebuffer.cpp.
◆ editTagEnd()
|
inline |
◆ editTagFrom()
|
inline |
◆ editTagStart()
|
inline |
◆ insertLine()
void KateBuffer::insertLine | ( | uint | i, |
KateTextLine::Ptr | line | ||
) |
Insert line
in front of line i
.
Definition at line 723 of file katebuffer.cpp.
◆ invalidateHighlighting()
void KateBuffer::invalidateHighlighting | ( | ) |
Invalidate highlighting of whole buffer.
Definition at line 892 of file katebuffer.cpp.
◆ line()
|
inline |
Return line i
.
Definition at line 488 of file katebuffer.h.
◆ loadingBorked()
|
inline |
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)
- Returns
- was loading borked?
Definition at line 463 of file katebuffer.h.
◆ maxLoadedBlocks()
|
inlinestatic |
◆ openFile()
bool KateBuffer::openFile | ( | const TQString & | m_file | ) |
Open a file, use the given filename.
- Parameters
-
m_file filename to open
- Returns
- success
Definition at line 458 of file katebuffer.cpp.
◆ plainLine()
|
inline |
Return line i
without triggering highlighting.
Definition at line 512 of file katebuffer.h.
◆ removeLine()
void KateBuffer::removeLine | ( | uint | i | ) |
Remove line i
.
Definition at line 772 of file katebuffer.cpp.
◆ saveFile()
bool KateBuffer::saveFile | ( | const TQString & | m_file | ) |
Save the buffer to a file, use the given filename + codec + end of line chars (internal use of qtextstream)
- Parameters
-
m_file filename to save to
- Returns
- success
Definition at line 564 of file katebuffer.cpp.
◆ setHighlight()
void KateBuffer::setHighlight | ( | uint | hlMode | ) |
Use highlight
for highlighting.
highlight
may be 0 in which case highlighting will be disabled.
Definition at line 856 of file katebuffer.cpp.
◆ setMaxLoadedBlocks()
|
static |
modifier for max loaded blocks limit
- Parameters
-
count new limit
Definition at line 79 of file katebuffer.cpp.
◆ tagLines
|
signal |
Emitted when the highlighting of a certain range has changed.
The documentation for this class was generated from the following files: