pqSignalAdaptorTreeWidget can be used to connect any property with repeat_command to a tree widget that displays the property value.
More...
#include <pqSignalAdaptorTreeWidget.h>
Inherits QObject.
|
void | setValues (const QList< QVariant > &) |
| Set the values in the widget. More...
|
|
QTreeWidgetItem * | growTable () |
| Called when user navigates beyond the end in the indices table widget. More...
|
|
|
void | valuesChanged () |
| Fired when the tree widget is modified. More...
|
|
void | tableGrown (QTreeWidgetItem *item) |
| Fired when the table is automatically grown due to the user navigating past the end. More...
|
|
pqSignalAdaptorTreeWidget can be used to connect any property with repeat_command to a tree widget that displays the property value.
The TreeWidget must have exactly as many columns as the number of elements in each command for the property (i.e. number_of_element_per_command). Note that the adaptor does not force the repeat command or size requirements mentioned above.
Definition at line 24 of file pqSignalAdaptorTreeWidget.h.
◆ pqSignalAdaptorTreeWidget()
pqSignalAdaptorTreeWidget::pqSignalAdaptorTreeWidget |
( |
QTreeWidget * |
treeWidget, |
|
|
bool |
editable |
|
) |
| |
Constructor.
- Parameters
-
treeWidget | is the tree widget we are connecting. |
editable | indicates if items in the widget can be edited by the user. |
◆ ~pqSignalAdaptorTreeWidget()
pqSignalAdaptorTreeWidget::~pqSignalAdaptorTreeWidget |
( |
| ) |
|
|
override |
◆ values()
QList<QVariant> pqSignalAdaptorTreeWidget::values |
( |
| ) |
const |
Returns a list of the values currently in the tree widget.
◆ appendValue() [1/2]
QTreeWidgetItem* pqSignalAdaptorTreeWidget::appendValue |
( |
const QList< QVariant > & |
values | ) |
|
Append an item to the tree.
The size of values == this->TreeWidget->columnCount(). Returns the newly created item, or 0 on failure.
◆ appendValue() [2/2]
QTreeWidgetItem* pqSignalAdaptorTreeWidget::appendValue |
( |
const QStringList & |
values | ) |
|
◆ setItemCreatorFunction()
void pqSignalAdaptorTreeWidget::setItemCreatorFunction |
( |
QTreeWidgetItem * |
fptr)(QTreeWidget *, const QStringList & | ) |
|
|
inline |
This adaptor create QTreeWidgetItem instances by default when new entries are to be shown in the widget.
To change the type of QTreeWidgetItem subclass created, simply set a function pointer to a callback which will be called every time a new item is needed. The signature for the callback is: QTreeWidgetItem* callback(QTreeWidget* parent, const QStringList& val)
Definition at line 60 of file pqSignalAdaptorTreeWidget.h.
◆ valuesChanged
void pqSignalAdaptorTreeWidget::valuesChanged |
( |
| ) |
|
|
signal |
Fired when the tree widget is modified.
◆ tableGrown
void pqSignalAdaptorTreeWidget::tableGrown |
( |
QTreeWidgetItem * |
item | ) |
|
|
signal |
Fired when the table is automatically grown due to the user navigating past the end.
This only supported for editable pqTreeWidget instances.
◆ setValues
void pqSignalAdaptorTreeWidget::setValues |
( |
const QList< QVariant > & |
| ) |
|
|
slot |
Set the values in the widget.
◆ growTable
QTreeWidgetItem* pqSignalAdaptorTreeWidget::growTable |
( |
| ) |
|
|
slot |
Called when user navigates beyond the end in the indices table widget.
We add a new row to simplify editing.
◆ values
QList<QVariant> pqSignalAdaptorTreeWidget::values |
|
readwrite |
The documentation for this class was generated from the following file: