All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Types | Public Slots | Public Member Functions
Qtilities::CoreGui::AddDynamicPropertyWizard Class Reference

The AddDynamicPropertyWizard class handles addition of dynamic properties on an object. More...

#include <AddDynamicPropertyWizard.h>

List of all members.

Public Types

enum  PropertyCreationHint { ConstructAndAdd = 1 << 1, ConstructDoNotAdd = 1 << 2 }
 Enumeration which describes the property creation modes of this wizard. More...

Public Slots

void handleObjectDestroyed ()
 Handles the event where the current object is destroyed.
QVariant propertyDefaultValue (const QString &displayed_name) const
 Gets the default value for the given displayed property name.
bool propertyIsExportable (const QString &displayed_name) const
 Gets if the property is exportable for the given displayed property name.
bool propertyReadOnly (const QString &displayed_name) const
 Gets the read only state for the given displayed property name.
bool propertyRemovable (const QString &displayed_name) const
 Gets the removability for the given displayed property name.
void setObject (QObject *obj)
 Sets the object on which the property must be added.
void setObject (QPointer< QObject > obj)
 Sets the object on which the property must be added.
void setObject (QList< QObject * > objects)
 Sets the object on which the property must be added.
void setObject (QList< QPointer< QObject > > objects)
 Sets the object by providing a list of smart pointers.

Public Member Functions

QVariant constructedProperty () const
 Function to access the constructed property after the user accepted the dialog.
QString newPropertyName () const
 Gets the name of the property to be used when adding it.
ObjectManager::PropertyTypes newPropertyType () const
 Gets what property type must be used when the user adds new properties.
PropertyCreationHint propertyCreationHint () const
 Returns the current PropertyCreationHint used by the wizard.
QVariant::Type propertyType (QString displayed_name=QString()) const
 Gets the type for the given displayed property name. If displayed_name is empty, the current selected displayed name is used.
void setNewPropertyType (ObjectManager::PropertyTypes new_property_type)
 Sets what property type must be used when the user adds new properties.
void setWarnAboutDuplicateWarnings (bool enable)
 Sets if this wizard should warn you if conflicting new property name warnings should be shown.
bool warnAboutDuplicateWarnings () const
 Gets if this wizard should warn you if conflicting new property name warnings should be shown.

Detailed Description

The AddDynamicPropertyWizard class handles addition of dynamic properties on an object.

This class was added in Qtilities v1.2.


Member Enumeration Documentation

Enumeration which describes the property creation modes of this wizard.

See also:
propertyCreationHint()
Enumerator:
ConstructAndAdd 

Constructs the property and adds it to the object set using setObject().

ConstructDoNotAdd 

Constructs the property, but don't add it to the property to the object set using setObject(). Instead, the constructed property can be obtained through constructedProperty().


Member Function Documentation

QVariant AddDynamicPropertyWizard::constructedProperty ( ) const

Function to access the constructed property after the user accepted the dialog.

The constructed property variant can be obtained using this function. When newPropertyType() is ObjectManager::SharedProperties, this function will return the QVariant set as the value of the SharedProperty, not the SharedProperty itself.

ObjectManager::PropertyTypes Qtilities::CoreGui::AddDynamicPropertyWizard::newPropertyType ( ) const

Gets what property type must be used when the user adds new properties.

Returns:
The property type used when the user adds new properties. Default is normal QVariants, thus ObjectManager::NonQtilitiesProperties.
void Qtilities::CoreGui::AddDynamicPropertyWizard::setNewPropertyType ( ObjectManager::PropertyTypes  new_property_type)

Sets what property type must be used when the user adds new properties.

Note:
Only ObjectManager::SharedProperties and ObjectManager::NonQtilitiesProperties types are allowed, when trying to set it to something else this function does nothing.
void Qtilities::CoreGui::AddDynamicPropertyWizard::setObject ( QObject *  obj)
slot

Sets the object on which the property must be added.

Parameters:
objThe object which must be used.
void Qtilities::CoreGui::AddDynamicPropertyWizard::setObject ( QPointer< QObject >  obj)
slot

Sets the object on which the property must be added.

Parameters:
objThe object which must be used.
void Qtilities::CoreGui::AddDynamicPropertyWizard::setObject ( QList< QObject * >  objects)
slot

Sets the object on which the property must be added.

Parameters:
objectsA list of objects. When the list contains 1 item, it will be used in this widget.
bool AddDynamicPropertyWizard::warnAboutDuplicateWarnings ( ) const

Gets if this wizard should warn you if conflicting new property name warnings should be shown.

Enabled by default.



Qtilities : Reference Documentation Back to top Copyright © 2009-2013, Jaco Naudé