QObject wrapper around CDict. More...
#include <qsdict.h>
Public Slots | |
| 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) |
| QSCObject * | child (const QString &name) |
| int | count () |
| void | delProperty (const QString &name) |
| bool | exist (const QString &name) |
| QString | getText () |
| QSCObject * | property (const QString &name) |
| QSCObject * | propertyDef (const QString &name, int defValue) |
| QSCObject * | propertyDef (const QString &name, QString defValue) |
| QStringList | propertyNames () |
Public Member Functions | |
| QSDict (QSDict &source) | |
| QSDict (boost::shared_ptr< CDict > _dict, BaseCore *_base) | |
| virtual | ~QSDict () |
| boost::shared_ptr< CDict > | get () |
QObject wrapper around CDict.
| gui::QSDict::QSDict | ( | QSDict & | source | ) |
Copy constructor
| source | Source object to copy |
Construct wrapper with given CDict
| _dict | CDict | |
| _base | scripting base |
| gui::QSDict::~QSDict | ( | ) | [virtual] |
destructor
| void gui::QSDict::add | ( | const QString & | name, | |
| int | ip | |||
| ) | [slot] |
Add integer to 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::QSDict::add | ( | const QString & | name, | |
| const QString & | ip | |||
| ) | [slot] |
Add string to 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::QSDict::add | ( | const QString & | name, | |
| QObject * | ip | |||
| ) | [slot] |
| void gui::QSDict::add | ( | const QString & | name, | |
| QSIProperty * | ip | |||
| ) | [slot] |
Add property to dictionary
References util::convertFromUnicode(), gui::QSIProperty::get(), OP_BEGIN, OP_END, util::PDF, and pdfobjects::pName.
Referenced by add(), and propertyDef().
| QSCObject * gui::QSDict::child | ( | const QString & | name | ) | [slot] |
recursive CDict/CArray getProperty(...) Will take the name as slash-separated list of childs to traverse to get to target property. References on the way are automatically dereferenced
| name | Path to property |
References gui::QSCObject::base, gui::QSImporter::createQSObject(), gui::QSIProperty::obj, property(), and util::recursiveProperty().
| int gui::QSDict::count | ( | ) | [slot] |
call CDict::getPropertyCount()
References pdfobjects::CDict::getPropertyCount(), and gui::QSIProperty::obj.
| void gui::QSDict::delProperty | ( | const QString & | name | ) | [slot] |
Delete property from dictionary
| name | Property name |
References util::convertFromUnicode(), OP_BEGIN, OP_END, util::PDF, and pdfobjects::pName.
| bool gui::QSDict::exist | ( | const QString & | name | ) | [slot] |
Check if given property exists in dictionary
| name | Name of property |
References pdfobjects::CDict::containsProperty(), util::convertFromUnicode(), gui::QSIProperty::obj, and util::PDF.
| boost::shared_ptr< CDict > gui::QSDict::get | ( | ) |
get CDict held inside this class. Not exposed to scripting
References gui::QSIProperty::obj.
| QString gui::QSDict::getText | ( | ) | [slot] |
Return text representation of dictionary
Reimplemented from gui::QSIProperty.
References util::convertToUnicode(), pdfobjects::CDict::getStringRepresentation(), gui::QSIProperty::obj, and util::PDF.
| QSCObject * gui::QSDict::property | ( | const QString & | name | ) | [slot] |
Get property by its name
| name | Name of property |
References gui::QSCObject::base, util::convertFromUnicode(), gui::QSImporter::createQSObject(), pdfobjects::CDict::getProperty(), gui::QSIProperty::obj, and util::PDF.
Referenced by add(), child(), and propertyDef().
| QSCObject * gui::QSDict::propertyDef | ( | const QString & | name, | |
| QString | defValue | |||
| ) | [slot] |
call CDict::getProperty(name), if property does not exist, property with defValue in it is added to dict and returned
| name | Name of property | |
| defValue | default value for property |
References add(), and property().
| QSCObject * gui::QSDict::propertyDef | ( | const QString & | name, | |
| int | defValue | |||
| ) | [slot] |
call CDict::getProperty(name), if property does not exist, property with defValue in it is added to dict and returned
| name | Name of property | |
| defValue | default value for property |
References add(), and property().
| QStringList gui::QSDict::propertyNames | ( | ) | [slot] |
Return list of all property names in this dictionary
References util::convertToUnicode(), pdfobjects::CDict::getAllPropertyNames(), gui::QSIProperty::obj, and util::PDF.