Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Private Member Functions | Private Attributes
TxtIm Class Reference

#include <txtim.h>

List of all members.

Public Member Functions

 TxtIm (const QString &fname, const QString &enc, bool textOnly, gtWriter *w)
 ~TxtIm ()
void write ()

Private Member Functions

void loadText ()
void toUnicode ()

Private Attributes

QString filename
QString encoding
QString text
gtWriter * writer
bool textOnly

Detailed Description

Definition at line 19 of file txtim.h.

Constructor & Destructor Documentation

TxtIm::TxtIm ( const QString &  fname,
const QString &  enc,
bool  textOnly,
gtWriter *  w 

Definition at line 35 of file txtim.cpp.

       filename = fname;
       encoding = enc;
       writer = w;
       textOnly = textO;

Here is the call graph for this function:

Definition at line 79 of file txtim.cpp.



Member Function Documentation

void TxtIm::loadText ( ) [private]

Definition at line 50 of file txtim.cpp.

       text = "";
       QFile f(filename);
       QFileInfo fi(f);
       if (!fi.exists())
       uint posi;
       QByteArray bb(f.size());
       if (
              f.readBlock(, f.size());
              for (posi = 0; posi < bb.size(); ++posi)
                     text += QChar(bb[posi]);

Here is the caller graph for this function:

void TxtIm::toUnicode ( ) [private]

Definition at line 68 of file txtim.cpp.

       QTextCodec *codec;
       if (encoding.isEmpty())
              codec = QTextCodec::codecForLocale();
              codec = QTextCodec::codecForName(encoding);
       QString dec = codec->toUnicode( text );
       text = dec;

Here is the caller graph for this function:

void TxtIm::write ( )

Definition at line 45 of file txtim.cpp.


Here is the caller graph for this function:

Member Data Documentation

QString TxtIm::encoding [private]

Definition at line 27 of file txtim.h.

QString TxtIm::filename [private]

Definition at line 26 of file txtim.h.

QString TxtIm::text [private]

Definition at line 28 of file txtim.h.

bool TxtIm::textOnly [private]

Definition at line 30 of file txtim.h.

gtWriter* TxtIm::writer [private]

Definition at line 29 of file txtim.h.

The documentation for this class was generated from the following files: