• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Kate

Signals | Public Member Functions

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.

Signals

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

Public Member Functions

 KateBuffer (KateDocument *doc)
 ~KateBuffer ()
bool brokenEncoding () const
bool canEncode ()
void clear ()
void codeFoldingColumnUpdate (int lineNr)
int count () const
int countVisible ()
bool editChanged () const
void editEnd ()
void editStart ()
int editTagEnd () const
bool editTagFrom () const
int editTagStart () const
void ensureHighlighted (int line)
KateCodeFoldingTree * foldingTree ()
KateHighlighting * highlight ()
void invalidateHighlighting ()
void lineInfo (KateLineInfo *info, int line)
int lineNumber (int visibleLine)
int lineVisibleNumber (int line)
bool openFile (const QString &m_file)
Kate::TextLine plainLine (int lineno)
bool saveFile (const QString &m_file)
void setHighlight (int hlMode)
void setTabWidth (int w)
int tabWidth () const
void unwrapLine (int line)
void wrapLine (const KTextEditor::Cursor &position)

Detailed Description

The KateBuffer class maintains a collections of lines.

Author:
Waldo Bastian <bastian@kde.org>
Christoph Cullmann <cullmann@kde.org>

Definition at line 40 of file katebuffer.h.


Constructor & Destructor Documentation

KateBuffer::KateBuffer ( KateDocument *  doc) [explicit]

Create an empty buffer.

Parameters:
docparent document

(with one block with one empty line)

Definition at line 67 of file katebuffer.cpp.

KateBuffer::~KateBuffer ( )

Goodbye buffer.

Cleanup on destruction.

Definition at line 85 of file katebuffer.cpp.


Member Function Documentation

bool KateBuffer::brokenEncoding ( ) const [inline]

Did encoding errors occured on load?

Returns:
encoding errors occured on load?

Definition at line 109 of file katebuffer.h.

bool KateBuffer::canEncode ( )

Can the current codec handle all chars.

Returns:
chars can be encoded

Definition at line 181 of file katebuffer.cpp.

void KateBuffer::clear ( ) [virtual]

Clear the buffer.

Reimplemented from Kate::TextBuffer.

Definition at line 129 of file katebuffer.cpp.

void KateBuffer::codeFoldingColumnUpdate ( int  lineNr)

Definition at line 732 of file katebuffer.cpp.

void KateBuffer::codeFoldingUpdated ( ) [signal]

Emittend if codefolding returned with a changed list.

int KateBuffer::count ( ) const [inline]

Return the total number of lines in the buffer.

Definition at line 148 of file katebuffer.h.

int KateBuffer::countVisible ( ) [inline]

Definition at line 167 of file katebuffer.h.

bool KateBuffer::editChanged ( ) const [inline]

were there changes in the current running editing session?

Returns:
changes done?

Definition at line 72 of file katebuffer.h.

void KateBuffer::editEnd ( )

finish some editing action

Definition at line 101 of file katebuffer.cpp.

void KateBuffer::editStart ( )

start some editing action

Definition at line 95 of file katebuffer.cpp.

int KateBuffer::editTagEnd ( ) const [inline]

dirty lines end

Returns:
end line

Definition at line 84 of file katebuffer.h.

bool KateBuffer::editTagFrom ( ) const [inline]

line inserted/removed?

Returns:
line inserted/removed?

Definition at line 90 of file katebuffer.h.

int KateBuffer::editTagStart ( ) const [inline]

dirty lines start

Returns:
start line

Definition at line 78 of file katebuffer.h.

void KateBuffer::ensureHighlighted ( int  line)

Update highlighting of given line line, if needed.

Definition at line 232 of file katebuffer.cpp.

KateCodeFoldingTree* KateBuffer::foldingTree ( ) [inline]

Definition at line 195 of file katebuffer.h.

KateHighlighting* KateBuffer::highlight ( ) [inline]

Definition at line 188 of file katebuffer.h.

void KateBuffer::invalidateHighlighting ( )

Invalidate highlighting of whole buffer.

Definition at line 320 of file katebuffer.cpp.

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

Definition at line 173 of file katebuffer.h.

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

Definition at line 169 of file katebuffer.h.

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

Definition at line 171 of file katebuffer.h.

bool KateBuffer::openFile ( const QString &  m_file)

Open a file, use the given filename.

Parameters:
m_filefilename to open
Returns:
success

Definition at line 143 of file katebuffer.cpp.

Kate::TextLine KateBuffer::plainLine ( int  lineno) [inline]

Return line lineno.

Highlighting of returned line might be out-dated, which may be sufficient for pure text manipulation functions, like search/replace. If you require highlighting to be up to date, call ensureHighlighted prior to this method.

Definition at line 132 of file katebuffer.h.

void KateBuffer::respellCheckBlock ( int  start,
int  end 
) [signal]
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_filefilename to save to
Returns:
success

Definition at line 205 of file katebuffer.cpp.

void KateBuffer::setHighlight ( int  hlMode)

Use highlight for highlighting.

highlight may be 0 in which case highlighting will be disabled.

Definition at line 284 of file katebuffer.cpp.

void KateBuffer::setTabWidth ( int  w)

Definition at line 273 of file katebuffer.cpp.

int KateBuffer::tabWidth ( ) const [inline]

Definition at line 175 of file katebuffer.h.

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

Emitted when the highlighting of a certain range has changed.

void KateBuffer::unwrapLine ( int  line) [virtual]

Unwrap given line.

Parameters:
lineline to unwrap

Reimplemented from Kate::TextBuffer.

Definition at line 262 of file katebuffer.cpp.

void KateBuffer::wrapLine ( const KTextEditor::Cursor &  position) [virtual]

Wrap line at given cursor position.

Parameters:
positionline/column as cursor where to wrap

Reimplemented from Kate::TextBuffer.

Definition at line 250 of file katebuffer.cpp.


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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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