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

Kate

  • Kate
  • TextLoader
Public Member Functions

Kate::TextLoader Class Reference

File Loader, will handle reading of files + detecting encoding. More...

#include <katetextloader.h>

List of all members.

Public Member Functions

 TextLoader (const QString &filename, KEncodingProber::ProberType proberType)
 ~TextLoader ()
bool byteOrderMarkFound () const
bool eof () const
TextBuffer::EndOfLineMode eol () const
const QString & mimeTypeForFilterDev () const
bool open (QTextCodec *codec)
bool readLine (int &offset, int &length)
QTextCodec * textCodec () const
const QChar * unicode () const

Detailed Description

File Loader, will handle reading of files + detecting encoding.

Definition at line 43 of file katetextloader.h.


Constructor & Destructor Documentation

Kate::TextLoader::TextLoader ( const QString &  filename,
KEncodingProber::ProberType  proberType 
) [inline]

Construct file loader for given file.

Parameters:
filenamefile to open
proberTypeprober type

Definition at line 51 of file katetextloader.h.

Kate::TextLoader::~TextLoader ( ) [inline]

Destructor.

Definition at line 79 of file katetextloader.h.


Member Function Documentation

bool Kate::TextLoader::byteOrderMarkFound ( ) const [inline]

BOM found?

Returns:
byte order mark found?

Definition at line 129 of file katetextloader.h.

bool Kate::TextLoader::eof ( ) const [inline]

end of file reached?

Returns:
end of file reached

Definition at line 116 of file katetextloader.h.

TextBuffer::EndOfLineMode Kate::TextLoader::eol ( ) const [inline]

Detected end of line mode for this file.

Detected during reading, is valid after complete file is read.

Returns:
eol mode of this file

Definition at line 123 of file katetextloader.h.

const QString& Kate::TextLoader::mimeTypeForFilterDev ( ) const [inline]

mime type used to create filter dev

Returns:
mime-type of filter device

Definition at line 135 of file katetextloader.h.

bool Kate::TextLoader::open ( QTextCodec *  codec) [inline]

open file with given codec

Parameters:
codeccodec to use, if 0, will do some auto-dectect or fallback
Returns:
success

Definition at line 90 of file katetextloader.h.

bool Kate::TextLoader::readLine ( int &  offset,
int &  length 
) [inline]

read a line, return length + offset in unicode data

Parameters:
offsetoffset into internal unicode data for read line
lengthlenght of read line
Returns:
true if no encoding errors occured

if no codec given, do autodetection

byte order said something about encoding?

no unicode BOM found, trigger prober

Definition at line 155 of file katetextloader.h.

QTextCodec* Kate::TextLoader::textCodec ( ) const [inline]

Get codec for this loader.

Returns:
currently in use codec of this loader

Definition at line 147 of file katetextloader.h.

const QChar* Kate::TextLoader::unicode ( ) const [inline]

internal unicode data array

Returns:
internal unicode data

Definition at line 141 of file katetextloader.h.


The documentation for this class was generated from the following file:
  • katetextloader.h

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