Logo Search packages:      
Sourcecode: qsapecng version File versions  Download package

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes

QtTreePropertyBrowser Class Reference

The QtTreePropertyBrowser class provides QTreeWidget based property browser. More...

Inheritance diagram for QtTreePropertyBrowser:
Inheritance graph
Collaboration diagram for QtTreePropertyBrowser:
Collaboration graph

List of all members.

Public Types

enum  ResizeMode { Interactive, Stretch, Fixed, ResizeToContents }

Public Slots

QtBrowserItemaddProperty (QtProperty *property)
QtBrowserIteminsertProperty (QtProperty *property, QtProperty *afterProperty)
void removeProperty (QtProperty *property)


void collapsed (QtBrowserItem *item)
void currentItemChanged (QtBrowserItem *)
void expanded (QtBrowserItem *item)

Public Member Functions

bool alternatingRowColors () const
QColor backgroundColor (QtBrowserItem *item) const
QColor calculatedBackgroundColor (QtBrowserItem *item) const
void clear ()
QtBrowserItemcurrentItem () const
void editItem (QtBrowserItem *item)
int indentation () const
bool isExpanded (QtBrowserItem *item) const
bool isHeaderVisible () const
bool isItemVisible (QtBrowserItem *item) const
QList< QtBrowserItem * > items (QtProperty *property) const
QList< QtProperty * > properties () const
bool propertiesWithoutValueMarked () const
 QtTreePropertyBrowser (QWidget *parent=0)
ResizeMode resizeMode () const
bool rootIsDecorated () const
void setAlternatingRowColors (bool enable)
void setBackgroundColor (QtBrowserItem *item, const QColor &color)
void setCurrentItem (QtBrowserItem *)
void setExpanded (QtBrowserItem *item, bool expanded)
template<class PropertyManager >
void setFactoryForManager (PropertyManager *manager, QtAbstractEditorFactory< PropertyManager > *factory)
void setHeaderVisible (bool visible)
void setIndentation (int i)
void setItemVisible (QtBrowserItem *item, bool visible)
void setPropertiesWithoutValueMarked (bool mark)
void setResizeMode (ResizeMode mode)
void setRootIsDecorated (bool show)
void setSplitterPosition (int position)
int splitterPosition () const
QtBrowserItemtopLevelItem (QtProperty *property) const
QList< QtBrowserItem * > topLevelItems () const
void unsetFactoryForManager (QtAbstractPropertyManager *manager)
 ~QtTreePropertyBrowser ()

Protected Member Functions

virtual QWidget * createEditor (QtProperty *property, QWidget *parent)
virtual void itemChanged (QtBrowserItem *item)
virtual void itemInserted (QtBrowserItem *item, QtBrowserItem *afterItem)
virtual void itemRemoved (QtBrowserItem *item)


bool alternatingRowColors
 whether to draw the background using alternating colors. By default this property is set to true.
bool headerVisible
 whether to show the header.
int indentation
 indentation of the items in the tree view.
bool propertiesWithoutValueMarked
 whether to enable or disable marking properties without value.
ResizeMode resizeMode
 the resize mode of setions in the header.
bool rootIsDecorated
 whether to show controls for expanding and collapsing root items.
int splitterPosition
 the position of the splitter between the colunms.

Private Member Functions

 Q_PRIVATE_SLOT (d_func(), void slotCollapsed(const QModelIndex &)) Q_PRIVATE_SLOT(d_func()
void void slotCurrentBrowserItemChanged (QtBrowserItem *)) Q_PRIVATE_SLOT(d_func()
void slotExpanded (const QModelIndex &)) Q_PRIVATE_SLOT(d_func()

Private Attributes


Detailed Description

The QtTreePropertyBrowser class provides QTreeWidget based property browser.

A property browser is a widget that enables the user to edit a given set of properties. Each property is represented by a label specifying the property's name, and an editing widget (e.g. a line edit or a combobox) holding its value. A property can have zero or more subproperties.

QtTreePropertyBrowser provides a tree based view for all nested properties, i.e. properties that have subproperties can be in an expanded (subproperties are visible) or collapsed (subproperties are hidden) state. For example:

Use the QtAbstractPropertyBrowser API to add, insert and remove properties from an instance of the QtTreePropertyBrowser class. The properties themselves are created and managed by implementations of the QtAbstractPropertyManager class.

See also:
QtGroupBoxPropertyBrowser, QtAbstractPropertyBrowser

Definition at line 100 of file qttreepropertybrowser.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index