Documents > BPS V2 C++ API

The class extends QtVariantPropertyManager by support for objects of the following types:
. More...

#include <bpspropertymanager.h>

List of all members.

Public Slots

virtual void setAttribute (QtProperty *aProperty, const QString &aName, const QVariant &aValue)
 Sets the value of the specified attribute for the property.
virtual void setValue (QtProperty *aProperty, const QVariant &aValue)
 Sets the value of the given property to value.

Public Member Functions

 BpsPropertyManager (QObject *aParent)
 Creates a manager with the given parent.
virtual bool isPropertyTypeSupported (int aPropertyType) const
 Check if a given property type is supported by the manager.
virtual QVariant value (const QtProperty *aProperty) const
 Get the properties value.
virtual int valueType (int aPropertyType) const
 Get the value type belonging to a given property type.

Static Public Member Functions

static int marginsTypeId ()

Protected Member Functions

virtual void initializeProperty (QtProperty *aProperty)
 This function is called whenever a new valid property pointer has been created, passing the pointer as parameter.
virtual void uninitializeProperty (QtProperty *aProperty)
 This function is called just before the specified property is destroyed.
virtual QIcon valueIcon (const QtProperty *aProperty) const
 Get a icon representing the current state of the given property.
virtual QString valueText (const QtProperty *aProperty) const
 Get a string representing the current state of the given property.

Detailed Description

The class extends QtVariantPropertyManager by support for objects of the following types:
.

Class Type/Usertype Description
BpsMargins marginsTypeId() Margins as used within reports. The attributes minimum, maximum and decimals apply to the margin values.
QPen QVariant::Pen The pen attributes style (excluding Qt::CustomDashLine), widthF and color are supported. The attributes minimum, maximum and decimals apply to the widthF value.
QBrush QVariant::Brush The brush attributes style (patterns only), scale percent (as transform m11/m22) and color are supported. The attributes minimum, maximum and decimals apply to the scale value.

Constructor & Destructor Documentation

BpsPropertyManager::BpsPropertyManager ( QObject *  aParent)

Creates a manager with the given parent.

Parameters:
[in]aParentThe parent to use.

Member Function Documentation

virtual void BpsPropertyManager::initializeProperty ( QtProperty *  aProperty) [protected, virtual]

This function is called whenever a new valid property pointer has been created, passing the pointer as parameter.

The purpose is to let the manager know that the property has been created so that it can provide additional attributes for the new property.

Parameters:
[in]aPropertyThe property being initialized.
virtual bool BpsPropertyManager::isPropertyTypeSupported ( int  aPropertyType) const [virtual]

Check if a given property type is supported by the manager.

Parameters:
[in]aPropertyTypeThe property type to check.
Returns:
True if supported.
static int BpsPropertyManager::marginsTypeId ( ) [static]
Returns:
The property id for BpsMargins
virtual void BpsPropertyManager::setAttribute ( QtProperty *  aProperty,
const QString &  aName,
const QVariant &  aValue 
) [virtual, slot]

Sets the value of the specified attribute for the property.

Parameters:
[in]aPropertyThe property to assign the attribute to.
[in]aNameName of the attribute.
[in]aValueThe value to assign.
virtual void BpsPropertyManager::setValue ( QtProperty *  aProperty,
const QVariant &  aValue 
) [virtual, slot]

Sets the value of the given property to value.

The specified value must be of a type returned by valueType(), or of type that can be converted to valueType() using the QVariant::canConvert() function, otherwise this function does nothing.

Parameters:
[in]aPropertyThe property to set.
[in]aValueThe value to set.
virtual void BpsPropertyManager::uninitializeProperty ( QtProperty *  aProperty) [protected, virtual]

This function is called just before the specified property is destroyed.

The purpose is to let the property manager know that the property is being destroyed so that it can remove the property's additional attributes.

Parameters:
[in]aPropertyThe property being uninitialized.
virtual QVariant BpsPropertyManager::value ( const QtProperty *  aProperty) const [virtual]

Get the properties value.

Parameters:
[in]aPropertyThe property to get the value from.
Returns:
The value of the property.
virtual QIcon BpsPropertyManager::valueIcon ( const QtProperty *  aProperty) const [protected, virtual]

Get a icon representing the current state of the given property.

Parameters:
[in]aPropertyThe property to query.
Returns:
The icon representation.
virtual QString BpsPropertyManager::valueText ( const QtProperty *  aProperty) const [protected, virtual]

Get a string representing the current state of the given property.

Parameters:
[in]aPropertyThe property to query.
Returns:
The string representation.
virtual int BpsPropertyManager::valueType ( int  aPropertyType) const [virtual]

Get the value type belonging to a given property type.

Parameters:
[in]aPropertyTypeThe property type.
Returns:
The value type.

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