Scribus
Open source desktop publishing at your fingertips
txtim.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef TXTIM_H
8 #define TXTIM_H
9 
10 #include "pluginapi.h"
11 #include "gtwriter.h"
12 
13 extern "C" PLUGIN_API void GetText(QString filename, QString encoding, bool textOnly, gtWriter *writer);
14 
15 extern "C" PLUGIN_API QString FileFormatName();
16 
17 extern "C" PLUGIN_API QStringList FileExtensions();
18 
19 class QByteArray;
20 
21 class TxtIm
22 {
23 public:
24  TxtIm(const QString& fname, const QString& enc, bool textOnly, gtWriter *w);
25  ~TxtIm();
26  void write();
27 private:
28  QString filename;
29  QString encoding;
30  QString text;
31  gtWriter *writer;
32  bool textOnly;
33  void loadText();
34  QString toUnicode(const QByteArray& rawText);
35 };
36 
37 #endif // TXTIM_H
Definition: gtwriter.h:38
Definition: txtim.h:21