KDevelop API Documentation

PropertyLib::PropertyEditor Class Reference

Property editor. More...

#include <propertyeditor.h>

Inheritance diagram for PropertyLib::PropertyEditor:

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

Collaboration graph
[legend]
List of all members.

Public Slots

void populateProperties (PropertyList *list)
 Shows properties from a list.
void clearProperties ()
 Clears property list, disconnects accessor from the editor and deletes it.
void clearMachineCache ()
 Deletes cached machines.

Public Member Functions

 PropertyEditor (QWidget *parent=0, const char *name=0)
 Constructs the property editor.
 ~PropertyEditor ()
Machinemachine (MultiProperty *property)

Protected Slots

void propertyValueChanged (Property *property)
 Updates property widget in the editor.
void propertyChanged (MultiProperty *property, const QVariant &value)
 Updates property in the list when new value is selected in the editor.
void slotClicked (QListViewItem *item)
 Shows property editor.
void updateEditorSize ()
void undo ()
 Undoes the last change in property editor.

Protected Member Functions

void editItem (QListViewItem *, int)
void hideEditor ()
void showEditor (PropertyItem *item)
void placeEditor (PropertyItem *item)
PropertyWidgetprepareEditor (PropertyItem *item)
void addGroup (const QString &name)
void addProperty (PropertyGroupItem *group, const QString &name)
void addProperty (const QString &name)
void addChildProperties (PropertyItem *parent)

Private Attributes

PropertyListm_list
PropertyList m_detailedList
QMap< int, Machine * > m_registeredForType
PropertyItemm_currentEditItem
PropertyWidgetm_currentEditWidget
QWidgetm_currentEditArea
QGridLayoutm_currentEditLayout
bool m_doubleClickForEdit
QListViewItemm_lastClickedItem
QPushButtonm_undoButton

Friends

class PropertyItem

Detailed Description

Property editor.

Displays a list of properties in a table form. Also performs grouping and creation of property widgets from the machine factory.

See also:
PropertyWidget

Machine

PropertyMachineFactory

Definition at line 52 of file propertyeditor.h.


Constructor & Destructor Documentation

PropertyLib::PropertyEditor::PropertyEditor QWidget parent = 0,
const char *  name = 0
 

Constructs the property editor.

Definition at line 164 of file propertyeditor.cpp.

References KListView::addColumn(), m_currentEditArea, m_currentEditItem, m_currentEditLayout, m_currentEditWidget, m_doubleClickForEdit, m_lastClickedItem, m_list, m_undoButton, KListView::setSorting(), slotClicked(), undo(), and updateEditorSize().

PropertyLib::PropertyEditor::~PropertyEditor  ) 
 

Definition at line 200 of file propertyeditor.cpp.

References clearMachineCache().


Member Function Documentation

void PropertyLib::PropertyEditor::addChildProperties PropertyItem parent  )  [protected]
 

Definition at line 255 of file propertyeditor.cpp.

References PropertyLib::MultiProperty::details, m_detailedList, m_registeredForType, machine(), PropertyLib::PropertyItem::property(), PropertyItem, and PropertyLib::MultiProperty::type().

Referenced by addProperty().

void PropertyLib::PropertyEditor::addGroup const QString name  )  [protected]
 

void PropertyLib::PropertyEditor::addProperty const QString name  )  [protected]
 

Definition at line 246 of file propertyeditor.cpp.

References addChildProperties(), m_list, and PropertyItem.

void PropertyLib::PropertyEditor::addProperty PropertyGroupItem group,
const QString name
[protected]
 

Definition at line 237 of file propertyeditor.cpp.

References addChildProperties(), m_list, and PropertyItem.

Referenced by populateProperties().

void PropertyLib::PropertyEditor::clearMachineCache  )  [slot]
 

Deletes cached machines.

Definition at line 446 of file propertyeditor.cpp.

References m_registeredForType.

Referenced by ~PropertyEditor().

void PropertyLib::PropertyEditor::clearProperties  )  [slot]
 

Clears property list, disconnects accessor from the editor and deletes it.

Definition at line 276 of file propertyeditor.cpp.

References PropertyLib::PropertyList::clear(), hideEditor(), m_detailedList, m_list, and propertyValueChanged().

void PropertyLib::PropertyEditor::editItem QListViewItem ,
int 
[protected]
 

void PropertyLib::PropertyEditor::hideEditor  )  [protected]
 

Definition at line 327 of file propertyeditor.cpp.

References m_currentEditArea, m_currentEditItem, m_currentEditLayout, m_currentEditWidget, m_lastClickedItem, and m_undoButton.

Referenced by clearProperties(), and slotClicked().

Machine * PropertyLib::PropertyEditor::machine MultiProperty property  ) 
 

Returns:
Machine for given property. Uses cache to store created machines. Cache will be cleared only with clearMachineCache.

Definition at line 430 of file propertyeditor.cpp.

References m_currentEditArea, m_registeredForType, PropertyLib::MultiProperty::name(), propertyChanged(), PropertyLib::MultiProperty::type(), and PropertyLib::MultiProperty::valueList().

Referenced by addChildProperties(), and prepareEditor().

void PropertyLib::PropertyEditor::placeEditor PropertyItem item  )  [protected]
 

Definition at line 351 of file propertyeditor.cpp.

References m_currentEditArea, m_currentEditLayout, m_currentEditWidget, m_undoButton, and prepareEditor().

Referenced by showEditor(), and updateEditorSize().

void PropertyLib::PropertyEditor::populateProperties PropertyList list  )  [slot]
 

Shows properties from a list.

Definition at line 205 of file propertyeditor.cpp.

References addProperty(), m_list, PropertyLib::PropertyList::propertiesOfGroup(), propertyValueChanged(), and slotClicked().

Referenced by BuildItemConfigWidget::BuildItemConfigWidget().

PropertyWidget * PropertyLib::PropertyEditor::prepareEditor PropertyItem item  )  [protected]
 

Definition at line 385 of file propertyeditor.cpp.

References machine(), PropertyLib::PropertyItem::property(), PropertyLib::Machine::propertyEditor, PropertyLib::PropertyWidget::setProperty(), PropertyLib::PropertyWidget::setValue(), PropertyLib::PropertyWidget::setValueList(), PropertyLib::MultiProperty::type(), PropertyLib::MultiProperty::value(), and PropertyLib::MultiProperty::valueList().

Referenced by placeEditor().

void PropertyLib::PropertyEditor::propertyChanged MultiProperty property,
const QVariant value
[protected, slot]
 

Updates property in the list when new value is selected in the editor.

Definition at line 306 of file propertyeditor.cpp.

References kdDebug(), m_currentEditItem, PropertyLib::MultiProperty::name(), PropertyLib::PropertyItem::property(), PropertyLib::PropertyItem::setChanged(), and PropertyLib::MultiProperty::setValue().

Referenced by machine().

void PropertyLib::PropertyEditor::propertyValueChanged Property property  )  [protected, slot]
 

Updates property widget in the editor.

Definition at line 290 of file propertyeditor.cpp.

References m_currentEditWidget, PropertyLib::Property::name(), PropertyLib::PropertyWidget::propertyName(), PropertyLib::PropertyWidget::setValue(), and PropertyLib::Property::value().

Referenced by clearProperties(), and populateProperties().

void PropertyLib::PropertyEditor::showEditor PropertyItem item  )  [protected]
 

Definition at line 342 of file propertyeditor.cpp.

References m_currentEditArea, m_currentEditItem, m_currentEditWidget, m_undoButton, and placeEditor().

Referenced by slotClicked().

void PropertyLib::PropertyEditor::slotClicked QListViewItem item  )  [protected, slot]
 

Shows property editor.

Definition at line 410 of file propertyeditor.cpp.

References hideEditor(), m_lastClickedItem, and showEditor().

Referenced by populateProperties(), and PropertyEditor().

void PropertyLib::PropertyEditor::undo  )  [protected, slot]
 

Undoes the last change in property editor.

Definition at line 455 of file propertyeditor.cpp.

References m_currentEditItem, m_currentEditWidget, PropertyLib::PropertyItem::setChanged(), and PropertyLib::PropertyWidget::undo().

Referenced by PropertyEditor().

void PropertyLib::PropertyEditor::updateEditorSize  )  [protected, slot]
 

Definition at line 404 of file propertyeditor.cpp.

References m_currentEditItem, and placeEditor().

Referenced by PropertyEditor().


Friends And Related Function Documentation

friend class PropertyItem [friend]
 

Definition at line 114 of file propertyeditor.h.

Referenced by addChildProperties(), and addProperty().


Member Data Documentation

QWidget* PropertyLib::PropertyEditor::m_currentEditArea [private]
 

Definition at line 106 of file propertyeditor.h.

Referenced by hideEditor(), machine(), placeEditor(), PropertyEditor(), and showEditor().

PropertyItem* PropertyLib::PropertyEditor::m_currentEditItem [private]
 

Definition at line 104 of file propertyeditor.h.

Referenced by hideEditor(), propertyChanged(), PropertyEditor(), showEditor(), undo(), and updateEditorSize().

QGridLayout* PropertyLib::PropertyEditor::m_currentEditLayout [private]
 

Definition at line 107 of file propertyeditor.h.

Referenced by hideEditor(), placeEditor(), and PropertyEditor().

PropertyWidget* PropertyLib::PropertyEditor::m_currentEditWidget [private]
 

Definition at line 105 of file propertyeditor.h.

Referenced by hideEditor(), placeEditor(), PropertyEditor(), propertyValueChanged(), showEditor(), and undo().

PropertyList PropertyLib::PropertyEditor::m_detailedList [private]
 

Definition at line 99 of file propertyeditor.h.

Referenced by addChildProperties(), and clearProperties().

bool PropertyLib::PropertyEditor::m_doubleClickForEdit [private]
 

Definition at line 109 of file propertyeditor.h.

Referenced by PropertyEditor().

QListViewItem* PropertyLib::PropertyEditor::m_lastClickedItem [private]
 

Definition at line 110 of file propertyeditor.h.

Referenced by hideEditor(), PropertyEditor(), and slotClicked().

PropertyList* PropertyLib::PropertyEditor::m_list [private]
 

Definition at line 98 of file propertyeditor.h.

Referenced by addProperty(), clearProperties(), populateProperties(), and PropertyEditor().

QMap<int, Machine* > PropertyLib::PropertyEditor::m_registeredForType [private]
 

Definition at line 102 of file propertyeditor.h.

Referenced by addChildProperties(), clearMachineCache(), and machine().

QPushButton* PropertyLib::PropertyEditor::m_undoButton [private]
 

Definition at line 112 of file propertyeditor.h.

Referenced by hideEditor(), placeEditor(), PropertyEditor(), and showEditor().


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:25 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003