KDevelop API Documentation

Property Class Reference

Property. More...

#include <property.h>

List of all members.

Public Member Functions

 Property ()
 Property (int type, QString name, QString description="", QVariant value=QVariant(), bool save=true)
 Property (QString name, QMap< QString, QString > v_correspList, QString description="", QVariant value=QVariant(), bool save=true)
virtual ~Property ()
bool operator< (const Property &prop) const
QString name () const
void setName (QString name)
int type () const
void setType (int type)
QVariant value () const
void setValue (QVariant value)
QString description () const
void setDescription (QString description)
void setCorrespList (QMap< QString, QString > list)
virtual QWidgeteditorOfType (PropertyEditor *editor)
 Creates and returns the editor for this property.

bool allowSaving ()
 Tells if the property can be saved to a stream, xml, etc.


Public Attributes

QMap< QString, QStringcorrespList

Protected Attributes

int m_type
QString m_name
QString m_description
QVariant m_value
bool m_save


Detailed Description

Property.

Contains name, type (PropertyType) and value. Value is a QVariant. Property has operator < to be able to be included in QMap<> (all objects with properties must have map<QString, Property* > propertyList or similar). Those property lists can be intersected as sets of Property by set_intersection() - STL algo function. The purpose of Property intersection is to find a common properties for various elements and then display them in a property editor.

Definition at line 67 of file property.h.


Constructor & Destructor Documentation

Property::Property  )  [inline]
 

Definition at line 69 of file property.h.

Property::Property int  type,
QString  name,
QString  description = "",
QVariant  value = QVariant(),
bool  save = true
 

Definition at line 37 of file property.cpp.

Property::Property QString  name,
QMap< QString, QString v_correspList,
QString  description = "",
QVariant  value = QVariant(),
bool  save = true
 

Definition at line 42 of file property.cpp.

References ValueFromList.

Property::~Property  )  [virtual]
 

Definition at line 51 of file property.cpp.


Member Function Documentation

bool Property::allowSaving  ) 
 

Tells if the property can be saved to a stream, xml, etc.

There is a possibility to use "GUI" properties that aren't stored but used only in a GUI

Definition at line 55 of file property.cpp.

References m_save.

QString Property::description  )  const
 

Definition at line 98 of file property.cpp.

References m_description.

QWidget * Property::editorOfType PropertyEditor editor  )  [virtual]
 

Creates and returns the editor for this property.

Definition at line 108 of file property.cpp.

References Boolean, Color, correspList, Double, editorOfType(), FieldName, FontName, Integer, LineStyle, List, Map, name(), String, StringList, type(), value(), and ValueFromList.

Referenced by editorOfType().

QString Property::name  )  const
 

Definition at line 68 of file property.cpp.

References m_name.

Referenced by editorOfType(), and operator<().

bool Property::operator< const Property prop  )  const
 

Definition at line 60 of file property.cpp.

References name(), and type().

void Property::setCorrespList QMap< QString, QString list  ) 
 

Definition at line 156 of file property.cpp.

References correspList, and setCorrespList().

Referenced by setCorrespList().

void Property::setDescription QString  description  ) 
 

Definition at line 103 of file property.cpp.

References m_description, and setDescription().

Referenced by setDescription().

void Property::setName QString  name  ) 
 

Definition at line 73 of file property.cpp.

References m_name, and setName().

Referenced by setName().

void Property::setType int  type  ) 
 

Definition at line 83 of file property.cpp.

References m_type, and setType().

Referenced by setType().

void Property::setValue QVariant  value  ) 
 

Definition at line 93 of file property.cpp.

References m_value, and setValue().

Referenced by setValue().

int Property::type  )  const
 

Definition at line 78 of file property.cpp.

References m_type.

Referenced by editorOfType(), and operator<().

QVariant Property::value  )  const
 

Definition at line 88 of file property.cpp.

References m_value.

Referenced by editorOfType().


Member Data Documentation

QMap<QString, QString> Property::correspList
 

Definition at line 87 of file property.h.

Referenced by editorOfType(), and setCorrespList().

QString Property::m_description [protected]
 

Definition at line 99 of file property.h.

Referenced by description(), and setDescription().

QString Property::m_name [protected]
 

Definition at line 98 of file property.h.

Referenced by name(), and setName().

bool Property::m_save [protected]
 

Definition at line 101 of file property.h.

Referenced by allowSaving().

int Property::m_type [protected]
 

Definition at line 97 of file property.h.

Referenced by setType(), and type().

QVariant Property::m_value [protected]
 

Definition at line 100 of file property.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.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:02:05 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003