QObject wrapper around CStream. More...
#include <qsstream.h>
Public Slots | |
| void | setBuffer (const QByteArray &a) |
| void | setBuffer (const QString &s) |
| void | setRawBuffer (const QByteArray &a) |
| void | setRawBuffer (const QString &s) |
| bool | loadBuffer (const QString &fileName) |
| bool | loadRawBuffer (const QString &fileName) |
| QString | getBufferString () |
| QByteArray | getBuffer () |
| bool | saveBuffer (const QString &fileName) |
| QString | getDecoded () |
| QByteArray | getRawDecoded () |
| void | add (const QString &name, QSIProperty *ip) |
| void | add (const QString &name, QObject *ip) |
| void | add (const QString &name, const QString &ip) |
| void | add (const QString &name, int ip) |
| int | count () |
| void | delProperty (const QString &name) |
| bool | exist (const QString &name) |
| QSCObject * | property (const QString &name) |
| QStringList | propertyNames () |
Public Member Functions | |
| QSStream (boost::shared_ptr< CStream > _cs, BaseCore *_base) | |
| virtual | ~QSStream () |
Static Public Member Functions | |
| static bool | loadFile (const QString &fileName, QByteArray &qb) |
| static QByteArray | arrayFromBuffer (const CStream::Buffer &b) |
| static const CStream::Buffer | arrayToBuffer (const QByteArray &a) |
| static const CStream::Buffer | stringToBuffer (const QString &s) |
| static QString | stringFromBuffer (const CStream::Buffer &b) |
QObject wrapper around CStream.
Construct wrapper with given CStream
| _cs | CStream shared pointer | |
| _base | scripting base |
| gui::QSStream::~QSStream | ( | ) | [virtual] |
destructor
| void gui::QSStream::add | ( | const QString & | name, | |
| int | ip | |||
| ) | [slot] |
Add integer to stream dictionary as property
| name | Property name | |
| ip | integer to add |
References util::convertFromUnicode(), OP_BEGIN, OP_END, util::PDF, pdfobjects::pName, and property().
| void gui::QSStream::add | ( | const QString & | name, | |
| const QString & | ip | |||
| ) | [slot] |
Add string to stream dictionary as property
| name | Property name | |
| ip | string to add |
References util::convertFromUnicode(), OP_BEGIN, OP_END, util::PDF, pdfobjects::pName, and property().
| void gui::QSStream::add | ( | const QString & | name, | |
| QObject * | ip | |||
| ) | [slot] |
| void gui::QSStream::add | ( | const QString & | name, | |
| QSIProperty * | ip | |||
| ) | [slot] |
Add property to stream dictionary
References util::convertFromUnicode(), gui::QSIProperty::get(), OP_BEGIN, OP_END, util::PDF, and pdfobjects::pName.
Referenced by add().
| QByteArray gui::QSStream::arrayFromBuffer | ( | const CStream::Buffer & | b | ) | [static] |
Convert CStream::Buffer (basically vector of chars) to QByteArray
| b | Buffer used as input |
Referenced by getBuffer(), and saveBuffer().
| const CStream::Buffer gui::QSStream::arrayToBuffer | ( | const QByteArray & | a | ) | [static] |
Convert QByteArray to CStream::Buffer (basically vector of chars)
| a | QByteArray used as input |
Referenced by loadBuffer(), loadRawBuffer(), setBuffer(), and setRawBuffer().
| int gui::QSStream::count | ( | ) | [slot] |
call CDict::getPropertyCount() for stream dictionary
References pdfobjects::CStream::getPropertyCount(), and gui::QSIProperty::obj.
| void gui::QSStream::delProperty | ( | const QString & | name | ) | [slot] |
Delete property from stream dictionary
| name | Property name |
References util::convertFromUnicode(), OP_BEGIN, OP_END, util::PDF, and pdfobjects::pName.
| bool gui::QSStream::exist | ( | const QString & | name | ) | [slot] |
Check if given property exists in stream dictionary
| name | Name of property |
References pdfobjects::CStream::containsProperty(), util::convertFromUnicode(), gui::QSIProperty::obj, and util::PDF.
| QByteArray gui::QSStream::getBuffer | ( | ) | [slot] |
Return data from buffer
References arrayFromBuffer(), pdfobjects::CStream::getBuffer(), and gui::QSIProperty::obj.
| QString gui::QSStream::getBufferString | ( | ) | [slot] |
Return data from buffer
References pdfobjects::CStream::getBuffer(), gui::QSIProperty::obj, and stringFromBuffer().
| QString gui::QSStream::getDecoded | ( | ) | [slot] |
Call CStream::getDecodedStringRepresentation(ret); return ret (as unicode)
References util::convertToUnicode(), OP_BEGIN, OP_END, and util::PDF.
| QByteArray gui::QSStream::getRawDecoded | ( | ) | [slot] |
| bool gui::QSStream::loadBuffer | ( | const QString & | fileName | ) | [slot] |
Load buffer from contents of given file
| fileName | name of the file |
References arrayToBuffer(), loadFile(), OP_BEGIN, and OP_END.
| bool gui::QSStream::loadFile | ( | const QString & | fileName, | |
| QByteArray & | qb | |||
| ) | [static] |
Load contents of given file into specified QByteArray
| fileName | name of the file | |
| qb | [out] QByteArray into which the file will be loaded |
Referenced by loadBuffer(), and loadRawBuffer().
| bool gui::QSStream::loadRawBuffer | ( | const QString & | fileName | ) | [slot] |
Load raw buffer from contents of given file
| fileName | name of the file |
References arrayToBuffer(), loadFile(), OP_BEGIN, and OP_END.
| QSCObject * gui::QSStream::property | ( | const QString & | name | ) | [slot] |
Get property by its name
| name | Name of property |
References gui::QSCObject::base, util::convertFromUnicode(), gui::QSImporter::createQSObject(), pdfobjects::CStream::getProperty(), gui::QSIProperty::obj, and util::PDF.
Referenced by add().
| QStringList gui::QSStream::propertyNames | ( | ) | [slot] |
Return list of all property names in stream dictionary
References util::convertToUnicode(), pdfobjects::CStream::getAllPropertyNames(), gui::QSIProperty::obj, and util::PDF.
| bool gui::QSStream::saveBuffer | ( | const QString & | fileName | ) | [slot] |
Save contents of buffer to given file
| fileName | name of the file |
References arrayFromBuffer(), pdfobjects::CStream::getBuffer(), and gui::QSIProperty::obj.
| void gui::QSStream::setBuffer | ( | const QString & | s | ) | [slot] |
Set buffer from given string
| s | Data to set into buffer |
References OP_BEGIN, OP_END, and stringToBuffer().
| void gui::QSStream::setBuffer | ( | const QByteArray & | a | ) | [slot] |
Set buffer from given byte array
| a | Data to set into buffer |
References arrayToBuffer(), OP_BEGIN, and OP_END.
| void gui::QSStream::setRawBuffer | ( | const QString & | s | ) | [slot] |
Set raw buffer from given string
| s | Data to set into buffer |
References OP_BEGIN, OP_END, and stringToBuffer().
| void gui::QSStream::setRawBuffer | ( | const QByteArray & | a | ) | [slot] |
Set raw buffer from given byte array
| a | Data to set into buffer |
References arrayToBuffer(), OP_BEGIN, and OP_END.
| QString gui::QSStream::stringFromBuffer | ( | const CStream::Buffer & | b | ) | [static] |
Convert CStream::Buffer (basically vector of chars) to QString (unicode string) characters 0-255 are mapped to unicode characters with code 0-255
| b | Buffer used as input |
Referenced by getBufferString().
| const CStream::Buffer gui::QSStream::stringToBuffer | ( | const QString & | s | ) | [static] |
Convert QString (unicode string) to CStream::Buffer (basically vector of chars) unicode characters 0-255 are mapped to characters with code 0-255 Mapping of characters outside of range 0-255 is undefined
| s | QString used as input |
Referenced by setBuffer(), and setRawBuffer().