Computer Assited Medical Intervention Tool Kit  version 5.0
QtBrowserItem Class Reference

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

#include <qtpropertybrowser.h>

+ Collaboration diagram for QtBrowserItem:

Public Member Functions

QtAbstractPropertyBrowserbrowser () const
 
QList< QtBrowserItem * > children () const
 
QtBrowserItemparent () const
 
QtPropertyproperty () const
 

Private Member Functions

 QtBrowserItem (QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent)
 
 ~QtBrowserItem ()
 

Private Attributes

QtBrowserItemPrivated_ptr
 

Friends

class QtAbstractPropertyBrowserPrivate
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ QtBrowserItem()

QtBrowserItem::QtBrowserItem ( QtAbstractPropertyBrowser browser,
QtProperty property,
QtBrowserItem parent 
)
explicitprivate

References browser(), d_ptr, parent(), property(), and QtBrowserItemPrivate::q_ptr.

+ Here is the call graph for this function:

◆ ~QtBrowserItem()

QtBrowserItem::~QtBrowserItem ( )
private

References d_ptr.

Member Function Documentation

◆ browser()

QtAbstractPropertyBrowser * QtBrowserItem::browser ( ) const

Returns the property browser which owns this item.

References d_ptr, and QtBrowserItemPrivate::m_browser.

Referenced by QtBrowserItem().

+ Here is the caller graph for this function:

◆ 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:

QList<QtBrowserItem *> childrenItems = item->children();
QList<QtProperty *> childrenProperties = item->property()->subProperties();

The childrenItems list represents the same list as childrenProperties.

References d_ptr, and QtBrowserItemPrivate::m_children.

Referenced by QtAbstractPropertyBrowserPrivate::clearIndex(), and QtAbstractPropertyBrowserPrivate::removeBrowserIndex().

+ Here is the caller graph for this function:

◆ 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()

References d_ptr, and QtBrowserItemPrivate::m_parent.

Referenced by QtTreePropertyBrowserPrivate::calculatedBackgroundColor(), QtAbstractPropertyBrowserPrivate::createBrowserIndexes(), QtTreePropertyBrowserPrivate::propertyInserted(), QtGroupBoxPropertyBrowserPrivate::propertyInserted(), QtButtonPropertyBrowserPrivate::propertyInserted(), QtBrowserItem(), QtAbstractPropertyBrowserPrivate::removeBrowserIndex(), and QtAbstractPropertyBrowserPrivate::removeBrowserIndexes().

+ 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()

References d_ptr, and QtBrowserItemPrivate::m_property.

Referenced by QtAbstractPropertyBrowserPrivate::createBrowserIndexes(), QtTreePropertyBrowserPrivate::hasValue(), QtTreePropertyBrowserPrivate::indexToProperty(), QtGroupBoxPropertyBrowserPrivate::propertyInserted(), QtButtonPropertyBrowserPrivate::propertyInserted(), QtBrowserItem(), QtAbstractPropertyBrowserPrivate::removeBrowserIndex(), QtAbstractPropertyBrowserPrivate::removeBrowserIndexes(), and MainWindow::updateExpandState().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ QtAbstractPropertyBrowserPrivate

friend class QtAbstractPropertyBrowserPrivate
friend

Member Data Documentation

◆ d_ptr


The documentation for this class was generated from the following files:
QtProperty::subProperties
QList< QtProperty * > subProperties() const
Definition: qtpropertybrowser.cpp:189
QtBrowserItem
The QtBrowserItem class represents a property in a property browser instance.
Definition: qtpropertybrowser.h:286
QtBrowserItem::property
QtProperty * property() const
Definition: qtpropertybrowser.cpp:1132
QtBrowserItem::children
QList< QtBrowserItem * > children() const
Definition: qtpropertybrowser.cpp:1162