|
The QtTreePropertyBrowser class provides QTreeWidget based property browser. More...
#include <ArmarXGui/libraries/qtpropertybrowser/src/qttreepropertybrowser.h>
Public Types | |
enum | ResizeMode { Interactive, Stretch, Fixed, ResizeToContents } |
Signals | |
void | collapsed (QtBrowserItem *item) |
void | expanded (QtBrowserItem *item) |
Signals inherited from QtAbstractPropertyBrowser | |
void | currentItemChanged (QtBrowserItem *) |
Protected Member Functions | |
void | itemChanged (QtBrowserItem *item) override |
void | itemInserted (QtBrowserItem *item, QtBrowserItem *afterItem) override |
void | itemRemoved (QtBrowserItem *item) override |
Protected Member Functions inherited from QtAbstractPropertyBrowser | |
virtual QWidget * | createEditor (QtProperty *property, QWidget *parent) |
Properties | |
bool | alternatingRowColors |
whether to draw the background using alternating colors. By default this property is set to true. More... | |
bool | headerVisible |
whether to show the header. More... | |
int | indentation |
indentation of the items in the tree view. More... | |
bool | propertiesWithoutValueMarked |
whether to enable or disable marking properties without value. More... | |
ResizeMode | resizeMode |
the resize mode of setions in the header. More... | |
bool | rootIsDecorated |
whether to show controls for expanding and collapsing root items. More... | |
int | splitterPosition |
the position of the splitter between the colunms. More... | |
Additional Inherited Members | |
Public Slots inherited from QtAbstractPropertyBrowser | |
QtBrowserItem * | addProperty (QtProperty *property) |
QtBrowserItem * | insertProperty (QtProperty *property, QtProperty *afterProperty) |
void | removeProperty (QtProperty *property) |
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.
Definition at line 51 of file qttreepropertybrowser.h.
enum ResizeMode |
The resize mode specifies the behavior of the header sections.
\value Interactive The user can resize the sections. The sections can also be resized programmatically using setSplitterPosition().
\value Fixed The user cannot resize the section. The section can only be resized programmatically using setSplitterPosition().
\value Stretch QHeaderView will automatically resize the section to fill the available space. The size cannot be changed by the user or programmatically.
\value ResizeToContents QHeaderView will automatically resize the section to its optimal size based on the contents of the entire column. The size cannot be changed by the user or programmatically.
Enumerator | |
---|---|
Interactive | |
Stretch | |
Fixed | |
ResizeToContents |
Definition at line 64 of file qttreepropertybrowser.h.
QtTreePropertyBrowser | ( | QWidget * | parent = 0 | ) |
Creates a property browser with the given parent.
Definition at line 941 of file qttreepropertybrowser.cpp.
|
override |
Destroys this property browser.
Note that the properties that were inserted into this browser are not destroyed since they may still be used in other browsers. The properties are owned by the manager that created them.
Definition at line 961 of file qttreepropertybrowser.cpp.
bool alternatingRowColors | ( | ) | const |
QColor backgroundColor | ( | QtBrowserItem * | item | ) | const |
Returns the item's color. If there is no color set for item it returns invalid color.
Definition at line 1218 of file qttreepropertybrowser.cpp.
QColor calculatedBackgroundColor | ( | QtBrowserItem * | item | ) | const |
Returns the item's color. If there is no color set for item it returns parent item's color (if there is no color set for parent it returns grandparent's color and so on). In case the color is not set for item and it's top level item it returns invalid color.
Definition at line 1231 of file qttreepropertybrowser.cpp.
|
signal |
This signal is emitted when the item is collapsed.
void editItem | ( | QtBrowserItem * | item | ) |
Sets the current item to item and opens the relevant editor for it.
Definition at line 1300 of file qttreepropertybrowser.cpp.
|
signal |
This signal is emitted when the item is expanded.
int indentation | ( | ) | const |
bool isExpanded | ( | QtBrowserItem * | item | ) | const |
Returns true if the item is expanded; otherwise returns false.
Definition at line 1142 of file qttreepropertybrowser.cpp.
bool isHeaderVisible | ( | ) | const |
Definition at line 1025 of file qttreepropertybrowser.cpp.
bool isItemVisible | ( | QtBrowserItem * | item | ) | const |
Returns true if the item is visible; otherwise returns false.
Definition at line 1161 of file qttreepropertybrowser.cpp.
|
overrideprotectedvirtual |
\reimp
Implements QtAbstractPropertyBrowser.
Definition at line 1292 of file qttreepropertybrowser.cpp.
|
overrideprotectedvirtual |
\reimp
Implements QtAbstractPropertyBrowser.
Definition at line 1276 of file qttreepropertybrowser.cpp.
|
overrideprotectedvirtual |
\reimp
Implements QtAbstractPropertyBrowser.
Definition at line 1284 of file qttreepropertybrowser.cpp.
bool propertiesWithoutValueMarked | ( | ) | const |
ResizeMode resizeMode | ( | ) | const |
bool rootIsDecorated | ( | ) | const |
void setAlternatingRowColors | ( | bool | enable | ) |
Definition at line 1015 of file qttreepropertybrowser.cpp.
void setBackgroundColor | ( | QtBrowserItem * | item, |
const QColor & | color | ||
) |
Sets the item's background color to color. Note that while item's background is rendered every second row is being drawn with alternate color (which is a bit lighter than items color)
Definition at line 1193 of file qttreepropertybrowser.cpp.
void setExpanded | ( | QtBrowserItem * | item, |
bool | expanded | ||
) |
Sets the item to either collapse or expanded, depending on the value of expanded.
Definition at line 1126 of file qttreepropertybrowser.cpp.
void setHeaderVisible | ( | bool | visible | ) |
Definition at line 1030 of file qttreepropertybrowser.cpp.
void setIndentation | ( | int | i | ) |
Definition at line 975 of file qttreepropertybrowser.cpp.
void setItemVisible | ( | QtBrowserItem * | item, |
bool | visible | ||
) |
Sets the item to be visible, depending on the value of visible.
Definition at line 1178 of file qttreepropertybrowser.cpp.
void setPropertiesWithoutValueMarked | ( | bool | mark | ) |
Definition at line 1245 of file qttreepropertybrowser.cpp.
void setResizeMode | ( | QtTreePropertyBrowser::ResizeMode | mode | ) |
Definition at line 1072 of file qttreepropertybrowser.cpp.
void setRootIsDecorated | ( | bool | show | ) |
Definition at line 989 of file qttreepropertybrowser.cpp.
void setSplitterPosition | ( | int | position | ) |
Definition at line 1115 of file qttreepropertybrowser.cpp.
int splitterPosition | ( | ) | const |
|
readwrite |
whether to draw the background using alternating colors. By default this property is set to true.
Definition at line 57 of file qttreepropertybrowser.h.
|
readwrite |
whether to show the header.
Definition at line 58 of file qttreepropertybrowser.h.
|
readwrite |
indentation of the items in the tree view.
Definition at line 55 of file qttreepropertybrowser.h.
|
readwrite |
whether to enable or disable marking properties without value.
When marking is enabled the item's background is rendered in dark color and item's foreground is rendered with light color.
Definition at line 61 of file qttreepropertybrowser.h.
|
readwrite |
the resize mode of setions in the header.
Definition at line 59 of file qttreepropertybrowser.h.
|
readwrite |
whether to show controls for expanding and collapsing root items.
Definition at line 56 of file qttreepropertybrowser.h.
|
readwrite |
the position of the splitter between the colunms.
Definition at line 60 of file qttreepropertybrowser.h.