• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Property Editing Library
 

KDevelop Property Editing Library

  • PropertyLib
  • Property
Public Types | Public Member Functions | Public Attributes | List of all members
PropertyLib::Property Class Reference

#include <property.h>

Inheritance diagram for PropertyLib::Property:
PropertyLib::ChildProperty

Public Types

enum  PropertyType {
  Invalid = TQVariant::Invalid , Map = TQVariant::Map , List = TQVariant::List , String = TQVariant::String ,
  StringList = TQVariant::StringList , Font = TQVariant::Font , Pixmap = TQVariant::Pixmap , Rect = TQVariant::Rect ,
  Size = TQVariant::Size , Color = TQVariant::Color , Point = TQVariant::Point , Integer = TQVariant::Int ,
  Boolean = TQVariant::Bool , Double = TQVariant::Double , Cursor = TQVariant::Cursor , SizePolicy = TQVariant::SizePolicy ,
  Date = TQVariant::Date , DateTime = TQVariant::DateTime , ValueFromList = 2000 , Symbol = 2001 ,
  FontName = 2002 , FileURL = 2003 , DirectoryURL = 2004 , LineStyle = 2005 ,
  UserDefined = 3000
}

Public Member Functions

 Property ()
 Property (int type, const TQString &name, const TQString &description, const TQVariant &value=TQVariant(), bool save=true, bool readOnly=false)
 Property (const TQString &name, const TQStringVariantMap &v_valueList, const TQString &description, const TQVariant &value=TQVariant(), bool save=true, bool readOnly=false)
virtual bool operator< (const Property &prop) const
virtual TQString name () const
virtual void setName (const TQString &name)
virtual int type () const
virtual void setType (int type)
virtual TQVariant value () const
virtual void setValue (const TQVariant &value, bool rememberOldValue=true)
virtual TQString description () const
virtual void setDescription (const TQString &description)
virtual void setValueList (const TQStringVariantMap &list)
virtual bool allowSaving () const
virtual bool readOnly () const
virtual bool visible () const
virtual void setVisible (const bool visible)
virtual TQVariant oldValue () const

Public Attributes

TQStringVariantMap valueList

Detailed Description

Property.

It includes support for TQStringList properties, an i18n'ed label and stores an old value to allow undo.

Contains name, type and value.

Type can be one of predefined types (including standard TQVariant types) by PropertyLib::Property::PropertyType enum or custom user type. User defined types should have values more than 3000.

Value is a TQVariant.

Property can optionally have a list of possible values. In that case use ValueFromList type and valueList member. Use description for i18n'ed label.

Examples: creating property:

Property *property = new Property(String, name, description, value)
PropertyLib::Property::name
virtual TQString name() const
Definition property.cpp:57
PropertyLib::Property::description
virtual TQString description() const
Definition property.cpp:91
PropertyLib::Property::Property
Property()
Constructs empty property.
Definition property.h:118
PropertyLib::Property::value
virtual TQVariant value() const
Definition property.cpp:77
PropertyLib::Property::String
@ String
string
Definition property.h:71

using convenience constructor to create property of ValueFromList type:

Property *property = new Property(name, possibleValuesList, description, value);

Definition at line 62 of file property.h.

Member Enumeration Documentation

◆ PropertyType

enum PropertyLib::Property::PropertyType

PropertyType.

Integers that represent the type of the property.

Enumerator
Invalid 

invalid property type

Map 

TQStringVariantMap.

List 

TQValueList<TQVariant>.

String 

string

StringList 

string list

Font 

font

Pixmap 

pixmap

Rect 

rectangle (x,y, width, height)

Size 

size (width, height)

Color 

color

Point 

point (x,y)

Integer 

integer

Boolean 

boolean

Double 

double

Cursor 

cursor

SizePolicy 

size policy (horizontal, vertical)

Date 

date

DateTime 

date and time

ValueFromList 

string value from a list

Symbol 

unicode symbol code

FontName 

font name, e.g.

"times new roman"

FileURL 

url of a file

DirectoryURL 

url of a directory

LineStyle 

line style

UserDefined 

plugin defined properties should start here

Definition at line 66 of file property.h.

Constructor & Destructor Documentation

◆ Property() [1/3]

PropertyLib::Property::Property ( )
inline

Constructs empty property.

Definition at line 118 of file property.h.

◆ Property() [2/3]

PropertyLib::Property::Property ( int type,
const TQString & name,
const TQString & description,
const TQVariant & value = TQVariant(),
bool save = true,
bool readOnly = false )

Constructs property.

Definition at line 25 of file property.cpp.

◆ Property() [3/3]

PropertyLib::Property::Property ( const TQString & name,
const TQStringVariantMap & v_valueList,
const TQString & description,
const TQVariant & value = TQVariant(),
bool save = true,
bool readOnly = false )

Constructs property with ValueFromList type.

Definition at line 32 of file property.cpp.

◆ ~Property()

PropertyLib::Property::~Property ( )
virtual

Definition at line 40 of file property.cpp.

Member Function Documentation

◆ allowSaving()

bool PropertyLib::Property::allowSaving ( ) const
virtual

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 44 of file property.cpp.

◆ description()

TQString PropertyLib::Property::description ( ) const
virtual
Returns
the description of the property.

Definition at line 91 of file property.cpp.

◆ name()

TQString PropertyLib::Property::name ( ) const
virtual
Returns
the name of the property.

Definition at line 57 of file property.cpp.

◆ oldValue()

TQVariant PropertyLib::Property::oldValue ( ) const
virtual

Gets the previous property value.

Definition at line 121 of file property.cpp.

◆ operator<()

bool PropertyLib::Property::operator< ( const Property & prop) const
virtual

Definition at line 49 of file property.cpp.

◆ readOnly()

bool PropertyLib::Property::readOnly ( ) const
virtual

Tells if the property is read only.

Definition at line 106 of file property.cpp.

◆ setDescription()

void PropertyLib::Property::setDescription ( const TQString & description)
virtual

Sets the description of the property.

Definition at line 96 of file property.cpp.

◆ setName()

void PropertyLib::Property::setName ( const TQString & name)
virtual

Sets the name of the property.

Definition at line 62 of file property.cpp.

◆ setType()

void PropertyLib::Property::setType ( int type)
virtual

Sets the type of the property.

Definition at line 72 of file property.cpp.

◆ setValue()

void PropertyLib::Property::setValue ( const TQVariant & value,
bool rememberOldValue = true )
virtual

Sets the value of the property.

Reimplemented in PropertyLib::ChildProperty.

Definition at line 82 of file property.cpp.

◆ setValueList()

void PropertyLib::Property::setValueList ( const TQStringVariantMap & list)
virtual

Sets the string-to-value correspondence list of the property.

This is used to create comboboxes-like property editors.

Definition at line 101 of file property.cpp.

◆ setVisible()

void PropertyLib::Property::setVisible ( const bool visible)
virtual

Set the visibility.

Definition at line 116 of file property.cpp.

◆ type()

int PropertyLib::Property::type ( ) const
virtual
Returns
the type of the property.

Definition at line 67 of file property.cpp.

◆ value()

TQVariant PropertyLib::Property::value ( ) const
virtual
Returns
the value of the property.

Reimplemented in PropertyLib::ChildProperty.

Definition at line 77 of file property.cpp.

◆ visible()

bool PropertyLib::Property::visible ( ) const
virtual

Tells if the property is visible.

Definition at line 111 of file property.cpp.

Member Data Documentation

◆ valueList

TQStringVariantMap PropertyLib::Property::valueList

The string-to-value correspondence list of the property.

Definition at line 149 of file property.h.


The documentation for this class was generated from the following files:
  • property.h
  • property.cpp

KDevelop Property Editing Library

Skip menu "KDevelop Property Editing Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDevelop Property Editing Library

Skip menu "KDevelop Property Editing Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Property Editing Library by doxygen 1.15.0
This website is maintained by Timothy Pearson.