KDevelop API Documentation

PropertyLib::ChildProperty Class Reference

Child property. More...

#include <childproperty.h>

Inheritance diagram for PropertyLib::ChildProperty:

Inheritance graph
[legend]
Collaboration diagram for PropertyLib::ChildProperty:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ChildPropertyType {
  Size_Height, Size_Width, Point_X, Point_Y,
  Rect_X, Rect_Y, Rect_Width, Rect_Height,
  SizePolicy_HorData, SizePolicy_VerData, SizePolicy_HorStretch, SizePolicy_VerStretch
}

Public Member Functions

 ChildProperty ()
 Constructs empty property.
 ChildProperty (MultiProperty *parent, int type, ChildPropertyType childType, const QString &name, const QString &description, const QVariant &value=QVariant(), bool save=true, bool readOnly=false)
 Constructs property.
 ChildProperty (MultiProperty *parent, const QString &name, ChildPropertyType childType, const QMap< QString, QVariant > &v_valueList, const QString &description, const QVariant &value=QVariant(), bool save=true, bool readOnly=false)
 Constructs property with ValueFromList type.
virtual QVariant value () const
virtual void setValue (const QVariant &value, bool rememberOldValue=true)
 Sets the value of the property.

Private Attributes

MultiPropertym_parent
ChildPropertyType m_childType

Detailed Description

Child property.

Child property is a detailed property for complex parent properties. For example, to edit a property of Point type one can request two child properties for "x" and "y" components of a point.

Child properties instances usually belong to MultiProperty class which is used to fetch and display them in the property editor. Child properties are created by a PropertyMachineFactory. Factory in such case does not only creates a machine for a property, but also fills corrresponding multiproperty with a list of child properties.

Definition at line 43 of file childproperty.h.


Member Enumeration Documentation

enum PropertyLib::ChildProperty::ChildPropertyType
 

Enumeration values:
Size_Height 
Size_Width 
Point_X 
Point_Y 
Rect_X 
Rect_Y 
Rect_Width 
Rect_Height 
SizePolicy_HorData 
SizePolicy_VerData 
SizePolicy_HorStretch 
SizePolicy_VerStretch 

Definition at line 45 of file childproperty.h.


Constructor & Destructor Documentation

PropertyLib::ChildProperty::ChildProperty  )  [inline]
 

Constructs empty property.

Definition at line 61 of file childproperty.h.

PropertyLib::ChildProperty::ChildProperty MultiProperty parent,
int  type,
ChildPropertyType  childType,
const QString name,
const QString description,
const QVariant value = QVariant(),
bool  save = true,
bool  readOnly = false
 

Constructs property.

Definition at line 31 of file childproperty.cpp.

PropertyLib::ChildProperty::ChildProperty MultiProperty parent,
const QString name,
ChildPropertyType  childType,
const QMap< QString, QVariant > &  v_valueList,
const QString description,
const QVariant value = QVariant(),
bool  save = true,
bool  readOnly = false
 

Constructs property with ValueFromList type.

Definition at line 37 of file childproperty.cpp.


Member Function Documentation

void PropertyLib::ChildProperty::setValue const QVariant value,
bool  rememberOldValue = true
[virtual]
 

Sets the value of the property.

Reimplemented from PropertyLib::Property.

Definition at line 44 of file childproperty.cpp.

References m_childType, m_parent, PropertyLib::MultiProperty::setValue(), PropertyLib::MultiProperty::type(), PropertyLib::MultiProperty::valid(), and PropertyLib::MultiProperty::value().

QVariant PropertyLib::ChildProperty::value  )  const [virtual]
 

Returns:
the value of the property.

Reimplemented from PropertyLib::Property.

Definition at line 106 of file childproperty.cpp.

References m_childType, m_parent, PropertyLib::MultiProperty::type(), PropertyLib::MultiProperty::valid(), and PropertyLib::MultiProperty::value().


Member Data Documentation

ChildPropertyType PropertyLib::ChildProperty::m_childType [private]
 

Definition at line 78 of file childproperty.h.

Referenced by setValue(), and value().

MultiProperty* PropertyLib::ChildProperty::m_parent [private]
 

Definition at line 77 of file childproperty.h.

Referenced by setValue(), and value().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:33:08 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003