Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtBrowserItem Class Reference

The QtBrowserItem class represents a property in a property browser instance. More...

#include <qtpropertybrowser_p.h>

+ Collaboration diagram for QtBrowserItem:

Public Member Functions

QtPropertyproperty () const
 Returns the property which is accosiated with this item.
 
QtBrowserItemparent () const
 Returns the parent item of this item.
 
QList< QtBrowserItem * > children () const
 Returns the children items of this item.
 
QtAbstractPropertyBrowserbrowser () const
 Returns the property browser which owns this item.
 

Friends

class QtAbstractPropertyBrowserPrivate
 

Detailed Description

The QtBrowserItem class represents a property in a property browser instance.

\inmodule QtDesigner

Since
4.4

Browser items are created whenever a QtProperty is inserted to the property browser. A QtBrowserItem uniquely identifies a browser's item. Thus, if the same QtProperty is inserted multiple times, each occurrence gets its own unique QtBrowserItem. The items are owned by QtAbstractPropertyBrowser and automatically deleted when they are removed from the browser.

You can traverse a browser's properties by calling parent() and children(). The property and the browser associated with an item are available as property() and browser().

See also
QtAbstractPropertyBrowser, QtProperty

Definition at line 195 of file qtpropertybrowser_p.h.

Member Function Documentation

◆ browser()

QtAbstractPropertyBrowser * QtBrowserItem::browser ( ) const

Returns the property browser which owns this item.

Definition at line 1151 of file qtpropertybrowser.cpp.

◆ children()

QList< QtBrowserItem * > QtBrowserItem::children ( ) const

Returns the children items of this item.

The properties reproduced from children items are always the same as reproduced from associated property' children, for example:

The childrenItems list represents the same list as childrenProperties.

Definition at line 1142 of file qtpropertybrowser.cpp.

◆ parent()

QtBrowserItem * QtBrowserItem::parent ( ) const

Returns the parent item of this item.

Returns 0 if this item is associated with top-level property in item's property browser.

See also
children()

Definition at line 1127 of file qtpropertybrowser.cpp.

Referenced by QtTreePropertyBrowserPrivate::calculatedBackgroundColor().

+ Here is the caller graph for this function:

◆ property()

QtProperty * QtBrowserItem::property ( ) const

Returns the property which is accosiated with this item.

Note that several items can be associated with the same property instance in the same property browser.

See also
QtAbstractPropertyBrowser::items()

Definition at line 1115 of file qtpropertybrowser.cpp.

Referenced by qdesigner_internal::PropertyEditor::currentPropertyName(), QtTreePropertyBrowserPrivate::hasValue(), QtTreePropertyBrowserPrivate::indexToProperty(), and QtButtonPropertyBrowserPrivate::propertyInserted().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QtAbstractPropertyBrowserPrivate

friend class QtAbstractPropertyBrowserPrivate
friend

Definition at line 206 of file qtpropertybrowser_p.h.


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