KDevelop API Documentation

PropertyLib::PComboBox Class Reference

Property editor with combobox. More...

#include <pcombobox.h>

Inheritance diagram for PropertyLib::PComboBox:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PComboBox (MultiProperty *property, const QMap< QString, QVariant > &list, QWidget *parent=0, const char *name=0)
 This constructor is used for read-only selection combo.
 PComboBox (MultiProperty *property, const QMap< QString, QVariant > &list, bool rw, QWidget *parent=0, const char *name=0)
 This constructor is used for read-write selection combo.
virtual QVariant value () const
virtual void setValue (const QVariant &value, bool emitChange=true)
 Sets the value shown in the editor widget.
virtual void setValueList (const QMap< QString, QVariant > &valueList)
 Sets the list of possible values shown in the editor widget.

Protected Slots

void updateProperty (int val)

Protected Member Functions

QString findDescription (const QVariant &value)

Private Member Functions

virtual void fillBox ()
void init (bool rw=false)

Private Attributes

QMap< QString, QVariantm_valueList
 map<description, value>
QComboBoxm_edit

Detailed Description

Property editor with combobox.

Definition at line 36 of file pcombobox.h.


Constructor & Destructor Documentation

PropertyLib::PComboBox::PComboBox MultiProperty property,
const QMap< QString, QVariant > &  list,
QWidget parent = 0,
const char *  name = 0
 

This constructor is used for read-only selection combo.

It provides a value from valueList

Definition at line 27 of file pcombobox.cpp.

References init().

PropertyLib::PComboBox::PComboBox MultiProperty property,
const QMap< QString, QVariant > &  list,
bool  rw,
QWidget parent = 0,
const char *  name = 0
 

This constructor is used for read-write selection combo.

It provides a value from valueList

Definition at line 33 of file pcombobox.cpp.

References init().


Member Function Documentation

void PropertyLib::PComboBox::fillBox  )  [private, virtual]
 

Definition at line 51 of file pcombobox.cpp.

References m_edit, and m_valueList.

Referenced by init(), and setValueList().

QString PropertyLib::PComboBox::findDescription const QVariant value  )  [protected]
 

Definition at line 88 of file pcombobox.cpp.

References m_valueList.

Referenced by PropertyLib::PCursorEdit::drawViewer(), and setValue().

void PropertyLib::PComboBox::init bool  rw = false  )  [private]
 

Definition at line 39 of file pcombobox.cpp.

References fillBox(), m_edit, and updateProperty().

Referenced by PComboBox().

void PropertyLib::PComboBox::setValue const QVariant value,
bool  emitChange = true
[virtual]
 

Sets the value shown in the editor widget.

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

Implements PropertyLib::PropertyWidget.

Definition at line 67 of file pcombobox.cpp.

References findDescription(), m_edit, PropertyLib::PropertyWidget::propertyChanged(), and updateProperty().

void PropertyLib::PComboBox::setValueList const QMap< QString, QVariant > &  valueList  )  [virtual]
 

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

This method does not emit propertyChanged signal. Reimplemented because combobox is used to display possible values from valueList.

Reimplemented from PropertyLib::PropertyWidget.

Definition at line 98 of file pcombobox.cpp.

References fillBox(), m_edit, and m_valueList.

void PropertyLib::PComboBox::updateProperty int  val  )  [protected, slot]
 

Definition at line 83 of file pcombobox.cpp.

References PropertyLib::PropertyWidget::propertyChanged(), and value().

Referenced by init(), and setValue().

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

Returns:
the value currently entered in the editor widget.

Implements PropertyLib::PropertyWidget.

Definition at line 59 of file pcombobox.cpp.

References m_edit, and m_valueList.

Referenced by updateProperty().


Member Data Documentation

QComboBox* PropertyLib::PComboBox::m_edit [private]
 

Definition at line 67 of file pcombobox.h.

Referenced by fillBox(), init(), setValue(), setValueList(), and value().

QMap<QString, QVariant> PropertyLib::PComboBox::m_valueList [private]
 

map<description, value>

Definition at line 65 of file pcombobox.h.

Referenced by fillBox(), findDescription(), setValueList(), 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 Tue Feb 22 09:51:40 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003