All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Public Attributes
Qtilities::Core::PropertySpecification Struct Reference

The PropertySpecification structure is used to define an available property through the . More...

#include <IAvailablePropertyProvider.h>

List of all members.

Public Member Functions

bool isValid () const
 Indicates if this property specification is valid, thus it has a displayed_name and a type.
QString propertyName () const
 Returns the property name to use. Use this instead of d_property_name directly.
 PropertySpecification (const QString &displayed_name, const QString &description, QVariant::Type data_type, const QString &class_name=QString(), const QString &property_name=QString())
 Quick constructor for PropertySpecification with important property details as parameters.

Public Attributes

bool d_add_during_construction
 Indicates if the property must be added to objects that matches the specified class name by default. False by default.
QString d_class_name
 Indicates the class names to which this property applies. Checked with QObject::inherits().
QVariant::Type d_data_type
 The property's data type.
QVariant d_default_value
 The default value of the property.
QString d_description
 A description of the property.
QString d_displayed_name
 A display name for the property.
bool d_internal
 Indicates if the property is internal, thus it will not be shown as an available property when users add properties to an object. False by default.
bool d_is_exportable
 Indicates if the property is exportable. True by default.
QString d_property_name
 The actual property name used by QObject::setProperty(). When empty, the displayed name will be used as the actual property name as well.
bool d_read_only
 Indicates if the property must be read only. False by default.
bool d_removable
 Indicates if the property must be removable. True by default.

Detailed Description

The PropertySpecification structure is used to define an available property through the .

The PropertySpecification structure defines a subject type in the context of an observer and is used by the Qtilities::CoreGui::Interfaces::IAvailablePropertyProvider interface.

This struct was added in Qtilities v1.2.


Constructor & Destructor Documentation

Qtilities::Core::PropertySpecification::PropertySpecification ( const QString &  displayed_name,
const QString &  description,
QVariant::Type  data_type,
const QString &  class_name = QString(),
const QString &  property_name = QString() 
)
inline

Quick constructor for PropertySpecification with important property details as parameters.

Parameters:
displayed_nameThe displayed name that will be used in AddDynamicPropertyWizard.
descriptionThe description for the property.
data_typeThe type of property.
class_nameThe base className() to which this property is applicable. When empty, will be available for all classes.
property_nameWhen empty, will use displayed_name as the property name.

Member Function Documentation

bool Qtilities::Core::PropertySpecification::isValid ( ) const
inline

Indicates if this property specification is valid, thus it has a displayed_name and a type.

Returns:
True if valid, false otherwise.
QString Qtilities::Core::PropertySpecification::propertyName ( ) const
inline

Returns the property name to use. Use this instead of d_property_name directly.

*Function which check if d_property_name is valid and if so returns it, otherwise returns d_displayed_name.



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