QObject wrapper around IProperty. More...
#include <qsiproperty.h>
Public Slots | |
| bool | equals (QObject *otherObject) |
| QVariant | value () |
| QString | getText () |
| QSCObject * | ref () |
| int | getInt () |
| QString | getType () |
| QString | getTypeName () |
| void | set (const QString &value) |
| void | set (int value) |
| void | set (double value) |
| void | set (bool value) |
Public Member Functions | |
| QSIProperty (boost::shared_ptr< IProperty > _ip, BaseCore *_base) | |
| QSIProperty (QSIProperty &source) | |
| virtual | ~QSIProperty () |
| boost::shared_ptr< IProperty > | get () const |
Protected Member Functions | |
| QSIProperty (boost::shared_ptr< IProperty > _ip, QString _className, BaseCore *_base) | |
Protected Attributes | |
| boost::shared_ptr< IProperty > | obj |
QObject wrapper around IProperty.
Construct wrapper with given IProperty
| _ip | IProperty wrapped in this object | |
| _base | Scripting base |
References obj.
| gui::QSIProperty::QSIProperty | ( | QSIProperty & | source | ) |
| gui::QSIProperty::~QSIProperty | ( | ) | [virtual] |
destructor
| gui::QSIProperty::QSIProperty | ( | boost::shared_ptr< IProperty > | _ip, | |
| QString | _className, | |||
| BaseCore * | _base | |||
| ) | [protected] |
Construct wrapper with given IProperty and given type name
This constructor is available only to subclasses - they can set their own class name here
| _ip | IProperty wrapped in this object | |
| _className | type name of this object | |
| _base | Scripting base |
References obj.
| bool gui::QSIProperty::equals | ( | QObject * | otherObject | ) | [slot] |
| boost::shared_ptr< IProperty > gui::QSIProperty::get | ( | ) | const |
get IProperty held inside this class. Not exposed to scripting
References obj.
Referenced by gui::QSStream::add(), gui::QSDict::add(), gui::QSArray::add(), gui::QSIPropertyArray::append(), and equals().
| int gui::QSIProperty::getInt | ( | ) | [slot] |
Try to convert value to a number. Return 0 if it cannot be represented as number
References value().
| QString gui::QSIProperty::getText | ( | ) | [slot] |
Return text representation of property
Reimplemented in gui::QSArray, and gui::QSDict.
References util::convertToUnicode(), obj, and util::PDF.
| QString gui::QSIProperty::getType | ( | ) | [slot] |
Get type identifier of this Property Can be one of: Null, Bool, Int, Real, String, Name, Ref, Array, Dict, Stream
References util::getTypeId(), and obj.
| QString gui::QSIProperty::getTypeName | ( | ) | [slot] |
| QSCObject * gui::QSIProperty::ref | ( | ) | [slot] |
Return reference to this property, but if the property is a reference, create and return the reference target. This way you will always get dereferenced property for correct manipulation. If new item was created this way, caller is responsible for freeing the item.
References gui::QSCObject::base, gui::QSImporter::createQSObject(), util::dereference(), obj, and pdfobjects::pRef.
Referenced by gui::QSTreeItem::itemref(), and value().
| void gui::QSIProperty::set | ( | bool | value | ) | [slot] |
Set value of this property to specified string. Work only on Bool, Int, Real, String or Name types, tries to "inteligently" convert value if type of property is different than type of parameter Will do nothing if called on different types
| value | new value for the property |
References gui::QSCObject::base, gui::BaseCore::errorException(), obj, pdfobjects::pBool, pdfobjects::pInt, pdfobjects::pName, pdfobjects::pReal, pdfobjects::pString, and pdfobjects::CObjectSimple< Tp >::setValue().
| void gui::QSIProperty::set | ( | double | value | ) | [slot] |
Set value of this property to specified string. Work only on Bool, Int, Real, String or Name types, tries to "inteligently" convert value if type of property is different than type of parameter Will do nothing if called on different types
| value | new value for the property |
References gui::QSCObject::base, gui::BaseCore::errorException(), obj, pdfobjects::pBool, pdfobjects::pInt, pdfobjects::pName, pdfobjects::pReal, pdfobjects::pString, and pdfobjects::CObjectSimple< Tp >::setValue().
| void gui::QSIProperty::set | ( | int | value | ) | [slot] |
Set value of this property to specified string. Work only on Bool, Int, Real, String or Name types, tries to "inteligently" convert value if type of property is different than type of parameter Will do nothing if called on different types
| value | new value for the property |
References gui::QSCObject::base, gui::BaseCore::errorException(), obj, pdfobjects::pBool, pdfobjects::pInt, pdfobjects::pName, pdfobjects::pReal, pdfobjects::pString, and pdfobjects::CObjectSimple< Tp >::setValue().
| void gui::QSIProperty::set | ( | const QString & | value | ) | [slot] |
Set value of this property to specified string. Work only on Bool, Int, Real, String or Name types, tries to "inteligently" convert value if type of property is different than type of parameter Will do nothing if called on different types
| value | new value for the property |
References gui::QSCObject::base, util::convertFromUnicode(), gui::BaseCore::errorException(), obj, pdfobjects::pBool, util::PDF, pdfobjects::pInt, pdfobjects::pName, pdfobjects::pReal, pdfobjects::pString, and pdfobjects::CObjectSimple< Tp >::setValue().
| QVariant gui::QSIProperty::value | ( | ) | [slot] |
Return Value of property
References util::convertToUnicode(), pdfobjects::IndiRef::gen, pdfobjects::CObjectSimple< Tp >::getValue(), pdfobjects::IndiRef::num, obj, util::PDF, and ref().
Referenced by getInt().
boost::shared_ptr<IProperty> gui::QSIProperty::obj [protected] |
Object held in class
Referenced by gui::QSDict::child(), gui::QSArray::child(), gui::QSStream::count(), gui::QSDict::count(), gui::QSArray::count(), equals(), gui::QSStream::exist(), gui::QSDict::exist(), get(), gui::QSDict::get(), gui::QSArray::get(), gui::QSStream::getBuffer(), gui::QSStream::getBufferString(), getText(), gui::QSDict::getText(), gui::QSArray::getText(), getType(), getTypeName(), gui::QSStream::property(), gui::QSDict::property(), gui::QSArray::property(), gui::QSStream::propertyNames(), gui::QSDict::propertyNames(), QSIProperty(), ref(), gui::QSStream::saveBuffer(), set(), and value().