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

KDevelop Property Editing Library

  • PropertyLib
  • PropertyWidget
Signals | Public Member Functions | Protected Attributes | List of all members
PropertyLib::PropertyWidget Class Referenceabstract

#include <propertywidget.h>

Inheritance diagram for PropertyLib::PropertyWidget:
PropertyLib::PCheckBox PropertyLib::PColorButton PropertyLib::PColorCombo PropertyLib::PComboBox PropertyLib::PDateEdit PropertyLib::PDateTimeEdit PropertyLib::PDoubleNumInput PropertyLib::PDummyWidget PropertyLib::PFontButton PropertyLib::PFontCombo PropertyLib::PLineEdit PropertyLib::PLineStyleEdit PropertyLib::PPixmapEdit PropertyLib::PPointEdit PropertyLib::PRectEdit PropertyLib::PSizeEdit PropertyLib::PSizePolicyEdit PropertyLib::PSpinBox PropertyLib::PStringListEdit PropertyLib::PSymbolCombo PropertyLib::PUrlEdit PropertyLib::PYesNoButton

Signals

void propertyChanged (MultiProperty *property, const TQVariant &value)
 

Public Member Functions

 PropertyWidget (MultiProperty *property, TQWidget *parent=0, const char *name=0)
 
virtual TQVariant value () const =0
 
virtual void setValue (const TQVariant &value, bool emitChange=true)=0
 
virtual TQString propertyName () const
 
virtual void setProperty (MultiProperty *property)
 
virtual void setValueList (const TQMap< TQString, TQVariant > &valueList)
 
virtual void drawViewer (TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
 
virtual void undo ()
 

Protected Attributes

MultiProperty * m_property
 

Detailed Description

An abstract base class of property viewer and editor vidget.

Subclass this class to create custom property viewer and editor widget.

Descendants should implement value() and setValue() methods.

Hint: in case you want to implement your property editor widget using existing widgets like TQLineEdit, TQComboBox, etc. you can't use multiple inheritance from two TQObject descendants due to TQt library restriction. Therefore use line edits and combo boxes as child widgets.

A set of predefined widgets for predefined property types are available in the library.

Definition at line 49 of file propertywidget.h.

Constructor & Destructor Documentation

◆ PropertyWidget()

PropertyLib::PropertyWidget::PropertyWidget ( MultiProperty *  property,
TQWidget *  parent = 0,
const char *  name = 0 
)

Constructs widget for property with name "propertyName".

Definition at line 26 of file propertywidget.cpp.

Member Function Documentation

◆ drawViewer()

void PropertyLib::PropertyWidget::drawViewer ( TQPainter *  p,
const TQColorGroup &  cg,
const TQRect &  r,
const TQVariant &  value 
)
virtual

Function to draw a property viewer when the editor isn't shown.

Reimplemented in PropertyLib::PDummyWidget, PropertyLib::PStringListEdit, PropertyLib::PSymbolCombo, PropertyLib::PCheckBox, PropertyLib::PColorButton, PropertyLib::PColorCombo, PropertyLib::PSizeEdit, PropertyLib::PSizePolicyEdit, PropertyLib::PPixmapEdit, PropertyLib::PDateEdit, PropertyLib::PDateTimeEdit, PropertyLib::PFontButton, PropertyLib::PPointEdit, PropertyLib::PRectEdit, PropertyLib::PYesNoButton, PropertyLib::PLineStyleEdit, and PropertyLib::PCursorEdit.

Definition at line 41 of file propertywidget.cpp.

◆ propertyChanged

void PropertyLib::PropertyWidget::propertyChanged ( MultiProperty *  property,
const TQVariant &  value 
)
signal

Emit this signal when property value is changed.

Probably you want to emit it only from setValue() method. PropertyLib::PropertyEditor widget will connect this to the appropriate slot which will make updates to the PropertyLib::PropertyList that hold propeties.

◆ propertyName()

TQString PropertyLib::PropertyWidget::propertyName ( ) const
virtual
Returns
the name of edited property.

Definition at line 31 of file propertywidget.cpp.

◆ setProperty()

void PropertyLib::PropertyWidget::setProperty ( MultiProperty *  property)
virtual

Sets the name of edited property.

Definition at line 36 of file propertywidget.cpp.

◆ setValue()

virtual void PropertyLib::PropertyWidget::setValue ( const TQVariant &  value,
bool  emitChange = true 
)
pure virtual

Sets the value shown in the editor widget.

Set emitChange to false if you don't want to emit propertyChanged signal.

Implemented in PropertyLib::PUrlEdit, PropertyLib::PDummyWidget, PropertyLib::PComboBox, PropertyLib::PDoubleNumInput, PropertyLib::PFontCombo, PropertyLib::PStringListEdit, PropertyLib::PColorButton, PropertyLib::PSymbolCombo, PropertyLib::PSizeEdit, PropertyLib::PSizePolicyEdit, PropertyLib::PSpinBox, PropertyLib::PCheckBox, PropertyLib::PColorCombo, PropertyLib::PLineEdit, PropertyLib::PPixmapEdit, PropertyLib::PDateEdit, PropertyLib::PDateTimeEdit, PropertyLib::PFontButton, PropertyLib::PPointEdit, PropertyLib::PRectEdit, PropertyLib::PYesNoButton, and PropertyLib::PLineStyleEdit.

◆ setValueList()

void PropertyLib::PropertyWidget::setValueList ( const TQMap< TQString, TQVariant > &  valueList)
virtual

Sets the list of possible values shown in the editor widget.

This method does not emit propertyChanged signal.

Reimplemented in PropertyLib::PComboBox.

Definition at line 49 of file propertywidget.cpp.

◆ undo()

void PropertyLib::PropertyWidget::undo ( )
virtual

Reverts the property value to previous setting.

Definition at line 55 of file propertywidget.cpp.

◆ value()

virtual TQVariant PropertyLib::PropertyWidget::value ( ) const
pure virtual
Returns
the value currently entered in the editor widget.

Implemented in PropertyLib::PUrlEdit, PropertyLib::PDummyWidget, PropertyLib::PComboBox, PropertyLib::PDoubleNumInput, PropertyLib::PColorButton, PropertyLib::PFontCombo, PropertyLib::PStringListEdit, PropertyLib::PSymbolCombo, PropertyLib::PSizeEdit, PropertyLib::PSizePolicyEdit, PropertyLib::PPixmapEdit, PropertyLib::PSpinBox, PropertyLib::PCheckBox, PropertyLib::PColorCombo, PropertyLib::PDateEdit, PropertyLib::PDateTimeEdit, PropertyLib::PFontButton, PropertyLib::PLineEdit, PropertyLib::PPointEdit, PropertyLib::PRectEdit, PropertyLib::PYesNoButton, and PropertyLib::PLineStyleEdit.


The documentation for this class was generated from the following files:
  • propertywidget.h
  • propertywidget.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.8.13
This website is maintained by Timothy Pearson.