• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Kate

KateBuffer Class Reference

The KateBuffer class maintains a collections of lines. More...

#include <katebuffer.h>

Inheritance diagram for KateBuffer:

Inheritance graph
[legend]

List of all members.


Public Slots

void codeFoldingColumnUpdate (unsigned int lineNr)

Signals

void codeFoldingUpdated ()
void tagLines (int start, int end)

Public Member Functions

bool binary () const
bool canEncode ()
void changeLine (uint i)
void clear ()
uint count () const
uint countVisible ()
bool editChanged () const
void editEnd ()
void editStart ()
uint editTagEnd () const
bool editTagFrom () const
uint editTagStart () const
KateCodeFoldingTree * foldingTree ()
KateHighlighting * highlight ()
void insertLine (uint i, KateTextLine::Ptr line)
void invalidateHighlighting ()
 KateBuffer (KateDocument *doc)
KateTextLine::Ptr line (uint i)
void lineInfo (KateLineInfo *info, unsigned int line)
uint lineNumber (uint visibleLine)
uint lineVisibleNumber (uint line)
bool loadingBorked () const
bool openFile (const QString &m_file)
KateTextLine::Ptr plainLine (uint i)
void removeLine (uint i)
bool saveFile (const QString &m_file)
void setHighlight (uint hlMode)
void setTabWidth (uint w)
uint tabWidth () const
 ~KateBuffer ()

Static Public Member Functions

static uint maxLoadedBlocks ()
static void setMaxLoadedBlocks (uint count)

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>

Christoph Cullmann <cullmann@kde.org>

Definition at line 341 of file katebuffer.h.


Constructor & Destructor Documentation

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 (  ) 

Goodbye buffer.

Cleanup on destruction.

Definition at line 352 of file katebuffer.cpp.


Member Function Documentation

bool KateBuffer::binary (  )  const [inline]

is this file a binary?

Returns:
binary file?

Definition at line 469 of file katebuffer.h.

bool KateBuffer::canEncode (  ) 

Can the current codec handle all chars.

Returns:
chars can be encoded

Definition at line 540 of file katebuffer.cpp.

void KateBuffer::changeLine ( uint  i  ) 

Mark line i as changed !

Definition at line 702 of file katebuffer.cpp.

void KateBuffer::clear (  ) 

Clear the buffer.

Definition at line 431 of file katebuffer.cpp.

void KateBuffer::codeFoldingColumnUpdate ( unsigned int  lineNr  )  [slot]

Definition at line 1260 of file katebuffer.cpp.

void KateBuffer::codeFoldingUpdated (  )  [signal]

Emittend if codefolding returned with a changed list.

uint KateBuffer::count (  )  const [inline]

Return the total number of lines in the buffer.

Definition at line 524 of file katebuffer.h.

uint KateBuffer::countVisible (  )  [inline]

Definition at line 568 of file katebuffer.h.

bool KateBuffer::editChanged (  )  const [inline]

were there changes in the current running editing session?

Returns:
changes done?

Definition at line 394 of file katebuffer.h.

void KateBuffer::editEnd (  ) 

finish some editing action

Definition at line 379 of file katebuffer.cpp.

void KateBuffer::editStart (  ) 

start some editing action

Definition at line 363 of file katebuffer.cpp.

uint KateBuffer::editTagEnd (  )  const [inline]

dirty lines end

Returns:
end line

Definition at line 406 of file katebuffer.h.

bool KateBuffer::editTagFrom (  )  const [inline]

line inserted/removed?

Returns:
line inserted/removed?

Definition at line 412 of file katebuffer.h.

uint KateBuffer::editTagStart (  )  const [inline]

dirty lines start

Returns:
start line

Definition at line 400 of file katebuffer.h.

KateCodeFoldingTree* KateBuffer::foldingTree (  )  [inline]

Definition at line 596 of file katebuffer.h.

KateHighlighting* KateBuffer::highlight (  )  [inline]

Definition at line 589 of file katebuffer.h.

void KateBuffer::insertLine ( uint  i,
KateTextLine::Ptr  line 
)

Insert line in front of line i.

Definition at line 723 of file katebuffer.cpp.

void KateBuffer::invalidateHighlighting (  ) 

Invalidate highlighting of whole buffer.

Definition at line 892 of file katebuffer.cpp.

KateTextLine::Ptr KateBuffer::line ( uint  i  )  [inline]

Return line i.

Definition at line 488 of file katebuffer.h.

void KateBuffer::lineInfo ( KateLineInfo *  info,
unsigned int  line 
) [inline]

Definition at line 574 of file katebuffer.h.

uint KateBuffer::lineNumber ( uint  visibleLine  )  [inline]

Definition at line 570 of file katebuffer.h.

uint KateBuffer::lineVisibleNumber ( uint  line  )  [inline]

Definition at line 572 of file katebuffer.h.

bool KateBuffer::loadingBorked (  )  const [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.

static uint KateBuffer::maxLoadedBlocks (  )  [inline, static]

maximal loaded block count

Returns:
max loaded blocks

Definition at line 352 of file katebuffer.h.

bool KateBuffer::openFile ( const QString &  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.

KateTextLine::Ptr KateBuffer::plainLine ( uint  i  )  [inline]

Return line i without triggering highlighting.

Definition at line 512 of file katebuffer.h.

void KateBuffer::removeLine ( uint  i  ) 

Remove line i.

Definition at line 772 of file katebuffer.cpp.

bool KateBuffer::saveFile ( const QString &  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.

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.

void KateBuffer::setMaxLoadedBlocks ( uint  count  )  [static]

modifier for max loaded blocks limit

Parameters:
count new limit

Definition at line 79 of file katebuffer.cpp.

void KateBuffer::setTabWidth ( uint  w  ) 

Definition at line 845 of file katebuffer.cpp.

uint KateBuffer::tabWidth (  )  const [inline]

Definition at line 576 of file katebuffer.h.

void KateBuffer::tagLines ( int  start,
int  end 
) [signal]

Emitted when the highlighting of a certain range has changed.


The documentation for this class was generated from the following files:
  • katebuffer.h
  • katebuffer.cpp

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal