Scribus
Open source desktop publishing at your fingertips
sctextstream.h
1 //
2 // C++ Interface: sclocale
3 //
4 // Description:
5 //
6 //
7 // Author: Pierre Marchand <pierremarc@oep-h.com>, (C) 2009
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 
13 #ifndef SCTEXTSTREAM_H
14 #define SCTEXTSTREAM_H
15 
16 #include <QString>
17 #include <QTextStream>
18 
19 #include "scribusapi.h"
20 
24 class SCRIBUS_API ScTextStream
25 {
26 private:
27  QTextStream qts;
28 
29 public:
30  ScTextStream() : qts() {}
31  ScTextStream(QIODevice* device) : qts(device) {}
32  ScTextStream(QString * string, QIODevice::OpenMode openMode = QIODevice::ReadWrite) : qts(string, openMode) {}
33  ScTextStream(QByteArray * array, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) : qts(array, openMode) {}
34 
35  ScTextStream & operator<< ( const QString & val );
36  ScTextStream & operator<< ( double val );
37 
38  ScTextStream & operator>> ( QString & val );
39  ScTextStream & operator>> ( double & val );
40  ScTextStream & operator>> ( float & val );
41  ScTextStream & operator>> ( int & val );
42 
43  QString readAll ();
44  QString readLine ( qint64 maxlen = 0 );
45 
46  bool atEnd () const;
47 };
48 
49 #endif // SCTEXTSTREAM_H
50 
51 
Definition: sctextstream.h:24
std::ostream & operator<<(std::ostream &out_file, const Geom::Matrix &m)
Definition: matrix.h:109