gui::QSDict Class Reference

QObject wrapper around CDict. More...

#include <qsdict.h>

Inheritance diagram for gui::QSDict:
gui::QSIProperty gui::QSCObject

List of all members.

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)
QSCObjectchild (const QString &name)
int count ()
void delProperty (const QString &name)
bool exist (const QString &name)
QString getText ()
QSCObjectproperty (const QString &name)
QSCObjectpropertyDef (const QString &name, int defValue)
QSCObjectpropertyDef (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< CDictget ()

Detailed Description

QObject wrapper around CDict.


Constructor & Destructor Documentation

gui::QSDict::QSDict ( QSDict source  ) 

Copy constructor

Parameters:
source Source object to copy
gui::QSDict::QSDict ( boost::shared_ptr< CDict _dict,
BaseCore _base 
)

Construct wrapper with given CDict

Parameters:
_dict CDict
_base scripting base
gui::QSDict::~QSDict (  )  [virtual]

destructor


Member Function Documentation

void gui::QSDict::add ( const QString &  name,
int  ip 
) [slot]

Add integer to dictionary as property

See also:
CDict::addProperty
Parameters:
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

See also:
CDict::addProperty
Parameters:
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]

Add property to dictionary

See also:
CDict::addProperty
Parameters:
name Property name
ip Property to add

References add().

void gui::QSDict::add ( const QString &  name,
QSIProperty ip 
) [slot]

Add property to dictionary

See also:
CDict::addProperty
Parameters:
name Property name
ip Property to add

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

Parameters:
name Path to property
Returns:
specified property

References gui::QSCObject::base, gui::QSImporter::createQSObject(), gui::QSIProperty::obj, property(), and util::recursiveProperty().

int gui::QSDict::count (  )  [slot]
void gui::QSDict::delProperty ( const QString &  name  )  [slot]

Delete property from dictionary

See also:
CDict::delProperty
Parameters:
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

Parameters:
name Name of property
Returns:
True, if property exists in dictionary, false if not

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

See also:
CDict::getStringRepresentation
Returns:
string representation

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

See also:
CDict::getProperty
Parameters:
name Name of property
Returns:
the property, or NULL if not found

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

Parameters:
name Name of property
defValue default value for property
Returns:
Properry from dictionary

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

Parameters:
name Name of property
defValue default value for property
Returns:
Properry from dictionary

References add(), and property().

QStringList gui::QSDict::propertyNames (  )  [slot]

Return list of all property names in this dictionary

See also:
CDict::getAllPropertyNames
Returns:
List of all property names

References util::convertToUnicode(), pdfobjects::CDict::getAllPropertyNames(), gui::QSIProperty::obj, and util::PDF.


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