PARP Research Group Universidad de Murcia


QVPropertyContainer Class Reference
[Block programming]

Base class for dynamic property container objects. More...

#include <qvpropertycontainer.h>

Inherited by QVImageCanvas, and QVProcessingBlock.

List of all members.

Public Types

enum  LinkType
 

Semantics for a link between QVPropertyContainers.

More...
enum  PropertyFlag
 

Flags for each property.

More...

Public Member Functions

 QVPropertyContainer (const QString name=QString())
 Constructs a QVPropertyContainer with a given string identifier.
 QVPropertyContainer (const QVPropertyContainer &cont)
 Copy constructor.
QVPropertyContaineroperator= (const QVPropertyContainer &cont)
 Copy operator.
virtual ~QVPropertyContainer ()
 Virtual destructor.
void setName (const QString name)
 Sets a new string identifier for a QVPropertyContainer.
const QString getName () const
 Retrieves identifier QString of the object.
uint getId () const
 Retrieves identifier uint of the object.
bool operator== (const QVPropertyContainer &cont) const
 Compare operator.
QList< QString > getPropertyList () const
 Gets list of properties of the QVPropertyContainer.
template<class Type >
QList< QString > getPropertyListByType () const
 Gets the names of the properties of a given type.
template<class Type >
bool isType (QString name, bool *ok=NULL) const
 Checks if a property is of a given type.
bool containsProperty (const QString name) const
 Check whether the property holder has a given property.
int getPropertyType (const QString name, bool *ok=NULL) const
 Given a property identifying QString (see getPropertyList() function above), returns the type of the property.
template<class Type >
bool addProperty (const QString name, const PropertyFlags flags=inputFlag, const Type &value=Type(), const QString info=QString("(Info not available)"))
 Registers a new property in the property holder.
template<class Type >
bool addProperty (const QString name, const PropertyFlags flags, const Type &value, const QString info, const Type &minValue, const Type &maxValue)
 Registers a new property in the property holder.
bool addPropertyFromQVariant (const QString &name, const PropertyFlags flags, QVariant variant, const QString info)
 Registers a new property in the property holder.
bool removeProperty (const QString name)
 De-registers a property in the property holder.
bool hasRange (const QString name) const
 Tells if a range has been set for the property.
PropertyFlags getPropertyFlags (const QString name) const
 Returns flags for a property.
bool isInput (const QString name) const
 Tells if a property is of the input type.
bool isOutput (const QString name) const
 Tells if a property is of the output type.
bool isGUIInvisible (const QString name) const
 Tells if a property can be modified through the GUI.
bool isLinkedInput (const QString name) const
 Tells if a property is of the input type and is linked.
bool isLinkedOutput (const QString name) const
 Tells if a property is of the output type and is linked.
template<class Type >
bool setPropertyValue (const QString name, const Type &value)
 Sets value for property.
template<class Type >
Type getPropertyValue (const QString name, bool *ok=NULL) const
 Method to get the actual value of a property.
QVariant getPropertyQVariantValue (const QString name, bool *ok=NULL) const
 Method to get the value of a property as a QVariant.
template<class Type >
Type getPropertyMaximum (const QString name, bool *ok=NULL) const
 Method to get the maximum value for a property.
template<class Type >
Type getPropertyMinimum (const QString name, bool *ok=NULL) const
 Method to get the minimum value for a property.
QString getPropertyInfo (const QString name, bool *ok=NULL) const
 Method to get the info QString for int typed property.
QString getLastError () const
 Gets the (possible) last error string.
const QString infoInputProperties () const
 Formatted description of properties (useful to show help).
virtual bool linkProperty (QString sourcePropName, QVPropertyContainer *destinyContainer, QString destinyPropName, LinkType linkType=AsynchronousLink)
 Links properties among QVPropertyContainer's.
virtual void linkProperty (QVPropertyContainer *container, LinkType linkType=AsynchronousLink)
 Links properties among QVPropertyContainer's.
virtual bool unlinkProperty (QString origName, QVPropertyContainer *destCont, QString destName)
 Unlinks properties among QVPropertyContainer's.
virtual void unlink ()
 Completely unlinks a property holder.
QVPropertyContainerInformer * getInformer ()
 Gets the QVPropertyContainerInformer.
QVPropertyContainergetSourceContainer (const QString name) const
 Gets the source QVPropertyContainer of a given property.
QList< QVPropertyContainer * > getDestinyContainers (const QString name) const
 Gets the destiny QVPropertyContainers of a given property.
QString getSourceProperty (const QString name) const
 Gets the source property name of a given property.
bool isSynchronous (const QString name) const
 Check if a property is linked syncronously.
bool isSequential (const QString name) const
 Check if a property is linked Sequentialy.

Static Public Member Functions

static bool areSynchronized (const QList< QVPropertyContainer * > containers)
 Check if a group of QVPropertyContainers are synchronously or Sequentialy linked.

Protected Member Functions

void readInputProperties ()
 Read linked input properties from other QVPropertyContainer's.
void writeOutputProperties ()
 Write linked output properties to other QVPropertyContainer's.
template<class Type >
bool parseArgument (const QString parameter, const QString value)
 Parses a property value from a string.
void setLastError (QString str) const
 Sets an error string message.
uint inputPropertyBlock (QString prop) const
 Obtains the origin block's id of a input property.

Detailed Description

Base class for dynamic property container objects.

This is the parent class for any object in the QVision framework capable of containing or sharing values through the use of dynamic properties. This class offers methods to register new properties, update and obtain the contained value, and retrieve listings of dynamic property identifiers and types contained in the object, amongst other things.

This class emits "changed" signals when it is changed (change the container name or a property value, add/remove a property, add/remove a link, or copy from other QVPropertyContainer). In each signal emited it passes a QVPropertyContainerChange indicating the type and position of the change, in order to let include observer objects for the property containers structure.

It has a static global informer, that can be get with getGlobalInformer(), that emits "changed" signals when a QVPropertyContainer is created or destroyed.

For further information about them, see section Creating custom processing blocks.

Definition at line 83 of file qvpropertycontainer.h.


Member Enumeration Documentation

Semantics for a link between QVPropertyContainers.

If a link between a source property of a QVPropertyContainer object A and a corresponding destination property of another one B is declared as synchronous, it means that every time that the readInputProperties() method is executed on B, the system assures that one (and just one) corresponding call to the writeOutputProperties() has been previously executed on A. In the (common) case of a link between two QVThread's, that would mean, for example, that each running of the source QVThread corresponds exactly to another (posterior) running of the destination QVThread.

That is equivalent to say that every data produced by the source is always consumed by the destination, so no data is ever "lost" in that sense. The obvious cost is that both threads will have to run at the speed of the slowest, of course.

An alternative is an asynchronous link, in which the only thing that the system assures on the properties read by the destination is that, in the case of a multiple link (several input properties of B connected to several corresponding output properties of B), all of them correspond to the same iteration of the source (more precisely, to the last execution of the writeOutputProperties() method in A, independently of the specific sequence number of that iteration). We say that the output is 'coherent' in all the properties linked this way. But, as has been already said, the iterations are not linked in the temporal sense, so, for example, for the case of QVThreads, both could run asynchronously, and at different speeds.

Other alternative is an sequential link, in witch the system assures nothing because the two QVPropertyContainer will be in the same thread and will be executed in a secuencial mode. When a group of QVPropertyContainers are linked whith sequential link, they choose a master QVPropertyContainer and the others have a reference to it. In this case the QVApplication will not create threads for the no-master QVPropertyContainer, and if they are QVProcessingBlocks they will be moved and executed by his master's thread.

See also the QVPropertyContainer::linkProperty() method.

Definition at line 128 of file qvpropertycontainer.h.

Flags for each property.

Currently, if a property is of the "input type" and/or "output type" are the only supported flags.

Definition at line 134 of file qvpropertycontainer.h.


Constructor & Destructor Documentation

QVPropertyContainer::QVPropertyContainer ( const QString  name = QString()  ) 

Constructs a QVPropertyContainer with a given string identifier.

Parameters:
name Identifier for the object to be created.

Definition at line 31 of file qvpropertycontainer.cpp.

QVPropertyContainer::QVPropertyContainer ( const QVPropertyContainer cont  ) 

Copy constructor.

Parameters:
cont property container to be copied.

Definition at line 56 of file qvpropertycontainer.cpp.

QVPropertyContainer::~QVPropertyContainer (  )  [virtual]

Virtual destructor.

Frees the QVPropertyContainer, and all its associated links. Besides, this destructor can (and in many cases should!) also be reimplemented in subclasses.

Definition at line 105 of file qvpropertycontainer.cpp.


Member Function Documentation

QVPropertyContainer & QVPropertyContainer::operator= ( const QVPropertyContainer cont  ) 

Copy operator.

Parameters:
cont property container to be copied.

Definition at line 81 of file qvpropertycontainer.cpp.

void QVPropertyContainer::setName ( const QString  name  ) 

Sets a new string identifier for a QVPropertyContainer.

Parameters:
name New string identifier for the object.

Definition at line 116 of file qvpropertycontainer.cpp.

const QString QVPropertyContainer::getName (  )  const
uint QVPropertyContainer::getId (  )  const

Retrieves identifier uint of the object.

Returns:
uint identifying the property holder object, begining to 1.

Definition at line 122 of file qvpropertycontainer.cpp.

Referenced by addPropertyFromQVariant(), linkProperty(), operator=(), readInputProperties(), removeProperty(), setName(), setPropertyValue(), unlink(), unlinkProperty(), and ~QVPropertyContainer().

bool QVPropertyContainer::operator== ( const QVPropertyContainer cont  )  const

Compare operator.

Compare the PropertyContainers id;

Parameters:
cont property container to be compared.

Definition at line 125 of file qvpropertycontainer.cpp.

QList< QString > QVPropertyContainer::getPropertyList (  )  const

Gets list of properties of the QVPropertyContainer.

Retrieves the names of the properties registered in the property holder, in a QStringList.

Returns:
QStringList of names of properties in the object.

Definition at line 128 of file qvpropertycontainer.cpp.

Referenced by linkProperty().

template<class Type >
QList<QString> QVPropertyContainer::getPropertyListByType (  )  const [inline]

Gets the names of the properties of a given type.

Retrieves the names of those properties, registered in the property holder, which hold values of the type given by the template parameter, in a QStringList.

Returns:
QList of identifying QStrings.

Definition at line 197 of file qvpropertycontainer.h.

template<class Type >
bool QVPropertyContainer::isType ( QString  name,
bool *  ok = NULL 
) const [inline]

Checks if a property is of a given type.

Returns true if type passed as template parameter equals type of value contained in a property.

Parameters:
name QString identifying the property.
ok Pointer to bool value which is set to true if property exists, and to false otherwise.
Returns:
True if property has same type as parameter template.

Definition at line 217 of file qvpropertycontainer.h.

Referenced by QVVideoReaderBlock::linkProperty(), QVHistogramPlot::linkUnspecifiedInputProperty(), and QVFunctionPlot::linkUnspecifiedInputProperty().

bool QVPropertyContainer::containsProperty ( const QString  name  )  const

Check whether the property holder has a given property.

Parameters:
name QString identifying the property.
Returns:
True if the QVPropertyContainer contains a property with the given name, otherwise returns false.

Definition at line 131 of file qvpropertycontainer.cpp.

int QVPropertyContainer::getPropertyType ( const QString  name,
bool *  ok = NULL 
) const

Given a property identifying QString (see getPropertyList() function above), returns the type of the property.

Parameters:
name QString identifying the property.
ok Pointer to bool value which is set to true if property exists, and to false otherwise.
Returns:
a QVariant::Type value. Note that user defined properties will return value.

Definition at line 134 of file qvpropertycontainer.cpp.

Referenced by infoInputProperties(), and linkProperty().

template<class Type >
bool QVPropertyContainer::addProperty ( const QString  name,
const PropertyFlags  flags = inputFlag,
const Type &  value = Type(),
const QString  info = QString("(Info not available)") 
) [inline]

Registers a new property in the property holder.

Parameters:
name Name of the new property.
value Initial value for the property.
info Info string for the property.
flags Whether the property is input, output, or both.
Returns:
True if property was correctly added, false otherwise.

Definition at line 255 of file qvpropertycontainer.h.

template<class Type >
bool QVPropertyContainer::addProperty ( const QString  name,
const PropertyFlags  flags,
const Type &  value,
const QString  info,
const Type &  minValue,
const Type &  maxValue 
) [inline]

Registers a new property in the property holder.

Parameters:
name Name of the new property.
value Initial value for the property.
info Info string for the property.
flags Whether the property is input, output, or both.
minValue Minimum value for the property.
maxValue Maximum value for the property.
Returns:
True if property was correctly added, false otherwise.

Definition at line 276 of file qvpropertycontainer.h.

bool QVPropertyContainer::addPropertyFromQVariant ( const QString &  name,
const PropertyFlags  flags,
QVariant  variant,
const QString  info 
) [inline]

Registers a new property in the property holder.

Parameters:
name Name of the new property.
flags Whether the property is input, output, or both.
variant Initial QVariant value for the property
info Info string for the property.
Returns:
True if property was correctly added, false otherwise.

Definition at line 296 of file qvpropertycontainer.h.

Referenced by addProperty().

bool QVPropertyContainer::removeProperty ( const QString  name  ) 

De-registers a property in the property holder.

Parameters:
name Name of the property to delete.
Returns:
True if property was correctly removed, false otherwise.

Definition at line 146 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::hasRange ( const QString  name  )  const

Tells if a range has been set for the property.

Parameters:
name Name of the property.
Returns:
True if there exist a range for the property.

Definition at line 190 of file qvpropertycontainer.cpp.

PropertyFlags QVPropertyContainer::getPropertyFlags ( const QString  name  )  const [inline]

Returns flags for a property.

Parameters:
name Name of the property.
Returns:
Flags for the property.

Definition at line 335 of file qvpropertycontainer.h.

bool QVPropertyContainer::isInput ( const QString  name  )  const

Tells if a property is of the input type.

Parameters:
name Name of the property.
Returns:
True if the property is of the input type.

Definition at line 193 of file qvpropertycontainer.cpp.

Referenced by infoInputProperties().

bool QVPropertyContainer::isOutput ( const QString  name  )  const

Tells if a property is of the output type.

Parameters:
name Name of the property.
Returns:
True if the property is of the output type.

Definition at line 196 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::isGUIInvisible ( const QString  name  )  const

Tells if a property can be modified through the GUI.

Parameters:
name Name of the property.
Returns:
True if the property will not be visible and editable through the GUI.

Definition at line 199 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::isLinkedInput ( const QString  name  )  const

Tells if a property is of the input type and is linked.

Parameters:
name Name of the property.
Returns:
True if the property is of the input type and is linked.

Definition at line 202 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::isLinkedOutput ( const QString  name  )  const

Tells if a property is of the output type and is linked.

Parameters:
name Name of the property.
Returns:
True if the property is of the output type and is linked.

Definition at line 205 of file qvpropertycontainer.cpp.

template<class Type >
bool QVPropertyContainer::setPropertyValue ( const QString  name,
const Type &  value 
) [inline]

Sets value for property.

If the property is not writable, this function will return false, and won't change property value. Besides, if there is a [minimum,maximum] range and the value is not in it, also fails to set the value. In both cases the function issues a warning through stderr, and returns false.

Parameters:
name Identifying QString for the property.
value Value to set the property with.
Returns:
True if the value was set successfully.

Definition at line 377 of file qvpropertycontainer.h.

template<class Type >
Type QVPropertyContainer::getPropertyValue ( const QString  name,
bool *  ok = NULL 
) const [inline]

Method to get the actual value of a property.

Parameters:
name Identifying QString for the property.
ok Pointer to bool value which is set to true if property exists, and to false otherwise.
Returns:
Actual value for the property.

Definition at line 398 of file qvpropertycontainer.h.

QVariant QVPropertyContainer::getPropertyQVariantValue ( const QString  name,
bool *  ok = NULL 
) const

Method to get the value of a property as a QVariant.

Parameters:
name Identifying QString for the property.
ok Pointer to bool value which is set to true if property exists, and to false otherwise.
Returns:
Actual value for the property.

Definition at line 208 of file qvpropertycontainer.cpp.

template<class Type >
Type QVPropertyContainer::getPropertyMaximum ( const QString  name,
bool *  ok = NULL 
) const [inline]

Method to get the maximum value for a property.

Parameters:
name Identifying QString for the property.
ok Pointer to bool value which is set to true if property exists, and to false otherwise.
Returns:
Maximum value for the property.

Definition at line 422 of file qvpropertycontainer.h.

template<class Type >
Type QVPropertyContainer::getPropertyMinimum ( const QString  name,
bool *  ok = NULL 
) const [inline]

Method to get the minimum value for a property.

Parameters:
name Identifying QString for the property.
ok Pointer to bool value which is set to true if property exists, and to false otherwise.
Returns:
Minimum value for the property.

Definition at line 449 of file qvpropertycontainer.h.

QString QVPropertyContainer::getPropertyInfo ( const QString  name,
bool *  ok = NULL 
) const

Method to get the info QString for int typed property.

Parameters:
name Identifying QString for the property.
ok Pointer to bool value which is set to true if property exists, and to false otherwise.
Returns:
The info QString about the property, if defined. Empty QString otherwise.

Definition at line 218 of file qvpropertycontainer.cpp.

Referenced by infoInputProperties().

QString QVPropertyContainer::getLastError (  )  const

Gets the (possible) last error string.

Returns:
A QString indicating the last error that occurred in an operation on the the property, if defined. Empty QString otherwise.

Definition at line 228 of file qvpropertycontainer.cpp.

Referenced by QVApplication::processArguments().

const QString QVPropertyContainer::infoInputProperties (  )  const

Formatted description of properties (useful to show help).

Obtains a human readable description QString of all the object's properties that have some associated info (otherwise they are ignored).

Returns:
QString containing human readable list of properties, and info about them.

Definition at line 233 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::linkProperty ( QString  sourcePropName,
QVPropertyContainer destinyContainer,
QString  destinyPropName,
LinkType  linkType = AsynchronousLink 
) [virtual]

Links properties among QVPropertyContainer's.

This method safely links properties among property holders in a thread safe manner. It is mainly used when programming multithreaded applications -with multiple QVProcessingBlocks-, but also, for example, when linking blocks (running in an independent thread) with GUI widgets (running in the main thread).

The pointer this corresponds to the source QVPropertyContainer.

See also QVPropertyContainer::LinkType.

Parameters:
sourcePropName Identifying QString for the source property.
destinyContainer Pointer to the destination QVPropertyContainer.
destinyPropName Identifying QString for the destination property.
linkType Synchronous or asynchronous.
Returns:
TRUE if the connection went OK, FALSE otherwise (for example, due to type mismatch, some of the properties does not exists, or whatever).

Definition at line 364 of file qvpropertycontainer.cpp.

Referenced by linkProperty(), QVVideoReaderBlock::linkProperty(), QVImageCanvas::linkSelectedPolyline(), and QVImageCanvas::linkSelectedRectangle().

void QVPropertyContainer::linkProperty ( QVPropertyContainer container,
LinkType  linkType = AsynchronousLink 
) [virtual]

Links properties among QVPropertyContainer's.

This method safely links all input properties from a container with the same name and type output current container's properties, holders in a thread safe manner. It is mainly used when programming multithreaded applications -with multiple QVProcessingBlocks-, but also, for example, when linking blocks (running in an independent thread) with GUI widgets (running in the main thread).

Parameters:
container Pointer to the destination QVPropertyContainer.
linkType Synchronous or asynchronous.

Definition at line 473 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::unlinkProperty ( QString  origName,
QVPropertyContainer destCont,
QString  destName 
) [virtual]

Unlinks properties among QVPropertyContainer's.

This method safely ulinks properties among property holders in a thread safe manner.

The pointer this corresponds to the source QVPropertyContainer.

See also QVPropertyContainer::LinkType.

Parameters:
origName Identifying QString for the source property.
destCont Pointer to the destination QVPropertyContainer.
destName Identifying QString for the destination property.
Returns:
TRUE if the disconnection went OK, FALSE otherwise (for example, due to type mismatch, some of the properties does not exists, or whatever).

Definition at line 549 of file qvpropertycontainer.cpp.

void QVPropertyContainer::unlink (  )  [virtual]

Completely unlinks a property holder.

Deletes all the input and output links associated to the holder. Of course, all the corresponding necessary unlinks in other property holders are also performed.

Reimplemented in QVImageCanvas.

Definition at line 584 of file qvpropertycontainer.cpp.

Referenced by ~QVPropertyContainer().

bool QVPropertyContainer::areSynchronized ( const QList< QVPropertyContainer * >  containers  )  [static]

Check if a group of QVPropertyContainers are synchronously or Sequentialy linked.

Check if a group of QVPropertyContainers are synchronously or Sequentialy linked.

Parameters:
containers List of QVPropertyContainer to be Checked.

Definition at line 782 of file qvpropertycontainer.cpp.

QVPropertyContainerInformer* QVPropertyContainer::getInformer (  )  [inline]

Gets the QVPropertyContainerInformer.

The QVPropertyContainerInformer is the object in charge of emit the changes of the QVPropertyContainer.

Returns:
the QVPropertyContainerInformer.

Definition at line 569 of file qvpropertycontainer.h.

QVPropertyContainer * QVPropertyContainer::getSourceContainer ( const QString  name  )  const

Gets the source QVPropertyContainer of a given property.

Parameters:
name Name of the property.
Returns:
The source QVPropertyContainer, NULL if is not linked.

Definition at line 735 of file qvpropertycontainer.cpp.

QList< QVPropertyContainer * > QVPropertyContainer::getDestinyContainers ( const QString  name  )  const

Gets the destiny QVPropertyContainers of a given property.

Parameters:
name Name of the property.
Returns:
The destiny QVPropertyContainers, a empty list if is not linked.

Definition at line 744 of file qvpropertycontainer.cpp.

QString QVPropertyContainer::getSourceProperty ( const QString  name  )  const

Gets the source property name of a given property.

Parameters:
name Name of the property.
Returns:
The source property name, a void QString if is not linked.

Definition at line 755 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::isSynchronous ( const QString  name  )  const

Check if a property is linked syncronously.

Parameters:
name Name of the property.
Returns:
TRUE if a property is linked synchronously, FALSE if is not linked.

Definition at line 764 of file qvpropertycontainer.cpp.

bool QVPropertyContainer::isSequential ( const QString  name  )  const

Check if a property is linked Sequentialy.

Parameters:
name Name of the property.
Returns:
TRUE if a property is linked Sequentialy, FALSE if is not linked.

Definition at line 773 of file qvpropertycontainer.cpp.

Referenced by unlink(), and unlinkProperty().

void QVPropertyContainer::readInputProperties (  )  [protected]

Read linked input properties from other QVPropertyContainer's.

This is a protected function that should be called from the subclasses of QVPropertyContainer just before starting to use any input property linked to another property holder (for example, just before the iterate() function in a QVProcessingBlock, or just before the viewer() function in a QVCanvas).

Definition at line 620 of file qvpropertycontainer.cpp.

Referenced by ~QVPropertyContainer().

void QVPropertyContainer::writeOutputProperties (  )  [protected]

Write linked output properties to other QVPropertyContainer's.

This is a protected function that should be called from the subclasses of QVPropertyContainer just after having a new set of output properties ready to be read by another property holder (for example, just after the iterate() function in a QVProcessingBlock, or just after the viewer() function in a QVCanvas). The effect is that a coherent state of the linked output properties is saved, so other QVPropertyContainer's can safely read from it -while we can be writing new values corresponding to a new iteration-.

Definition at line 660 of file qvpropertycontainer.cpp.

Referenced by ~QVPropertyContainer().

bool QVPropertyContainer::parseArgument< QString > ( const QString  parameter,
const QString  value 
) [inline, protected]

Parses a property value from a string.

Parses a QString containing the value for a property (mainly useful when initializing it from the command line). QVPropertyContainer implements a series of default parsers (namely for bool, int, double and QString properties). But the method is templatized to allow customization of the parsed QString, if we wish to add new parameter types in the subclasses. In that case, users should specialize the corresponding template this way:

 template <> bool MyDerivedQVPropertyContainer::parseArgument<MyType>(const QString parameter, const QString value)
 {
     bool ok;
     MyType myVar1 = myParserForMyType1(value,&ok);
     if(ok) { // parsing OK
          setPropertyValue<MyType>(parameter,myVar1);
          return TRUE;
     } else { // parsing failed
          QString errorString = "MyDerivedQVPropertyContainer::parseArgument(): holder "
          + getName() + ": value " + value
          + " is not a valid MyType value for parameter " + parameter + ".\n";
          setLastError(errorString);
          return FALSE;
     }
 }

The format of the input params in the command line should be the following:
--[holder:]<name>=<value>
where

  • holder is the (optional) name of the property holder.
  • name is the name of the property.
  • value is the value to initialize the property.
    Parameters:
    parameter The name of the property to be set.
    value QString from which to obtain the value.
    If the optional holder name is not present, any holder which has a property with name 'name' is assigned the corresponding parsed value.

Definition at line 871 of file qvpropertycontainer.h.

void QVPropertyContainer::setLastError ( QString  str  )  const [protected]

Sets an error string message.

Sets an error string message corresponding to the last error that occurred in an operation on the QVPropertyContainer (if such an error occurred). If no error occurred since the creation of the object, the string will be empty. The method is const because it only modifies the error message (which is mutable), not the object itself.

Definition at line 732 of file qvpropertycontainer.cpp.

Referenced by getPropertyMaximum(), getPropertyMinimum(), and linkProperty().

uint QVPropertyContainer::inputPropertyBlock ( QString  prop  )  const [inline, protected]

Obtains the origin block's id of a input property.

Obtains the origin block's id of a input property.

Returns:
Block's id if exist the property, or 0 if not.

Definition at line 695 of file qvpropertycontainer.h.


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



QVision framework. PARP research group. Copyright © 2007, 2008, 2009, 2010, 2011.