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

Kate

  • Kate
  • TextLoader
Public Member Functions | List of all members
Kate::TextLoader Class Reference

#include <katetextloader.h>

Public Member Functions

 TextLoader (const QString &filename, KEncodingProber::ProberType proberType)
 
 ~TextLoader ()
 
bool byteOrderMarkFound () const
 
QByteArray digest ()
 
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 44 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 52 of file katetextloader.h.

Kate::TextLoader::~TextLoader ( )
inline

Destructor.

Definition at line 81 of file katetextloader.h.

Member Function Documentation

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

BOM found?

Returns
byte order mark found?

Definition at line 131 of file katetextloader.h.

QByteArray Kate::TextLoader::digest ( )
inline

Definition at line 357 of file katetextloader.h.

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

end of file reached?

Returns
end of file reached

Definition at line 118 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 125 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 137 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 92 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
lengthlength of read line
Returns
true if no encoding errors occurred

did we read two time but got no stuff? encoding error fixes problem with one character latin-1 files, which lead to crash otherwise! bug 272579

reading loop

if no codec given, do autodetection

byte order said something about encoding?

no unicode BOM found, trigger prober

Definition at line 157 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 149 of file katetextloader.h.

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

internal unicode data array

Returns
internal unicode data

Definition at line 143 of file katetextloader.h.


The documentation for this class was generated from the following file:
  • katetextloader.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal