ParaView
Public Slots | Signals | Public Member Functions | Properties
pqSignalAdaptorTreeWidget Class Reference

pqSignalAdaptorTreeWidget can be used to connect any property with repeat_command to a tree widget that displays the property value. More...

#include <pqSignalAdaptorTreeWidget.h>

List of all members.

Public Slots

void setValues (const QList< QVariant > &)
 Set the values in the widget.
QTreeWidgetItem * growTable ()
 Called when user navigates beyond the end in the indices table widget.

Signals

void valuesChanged ()
 Fired when the tree widget is modified.
void tableGrown (QTreeWidgetItem *item)
 Fired when the table is automatically grown due to the user navigating past the end.

Public Member Functions

 pqSignalAdaptorTreeWidget (QTreeWidget *treeWidget, bool editable)
 Constructor.
virtual ~pqSignalAdaptorTreeWidget ()
QList< QVariant > values () const
 Returns a list of the values currently in the tree widget.
QTreeWidgetItem * appendValue (const QList< QVariant > &values)
 Append an item to the tree.
QTreeWidgetItem * appendValue (const QStringList &values)
void setItemCreatorFunction (QTreeWidgetItem *(fptr)(QTreeWidget *, const QStringList &))
 This adaptor create QTreeWidgetItem instances by default when new entries are to be shown in the widget.

Properties

QList< QVariant > values

Detailed Description

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 50 of file pqSignalAdaptorTreeWidget.h.


Constructor & Destructor Documentation

pqSignalAdaptorTreeWidget::pqSignalAdaptorTreeWidget ( QTreeWidget *  treeWidget,
bool  editable 
)

Constructor.

Parameters:
treeWidgetis the tree widget we are connecting.
editableindicates if items in the widget can be edited by the user.
virtual pqSignalAdaptorTreeWidget::~pqSignalAdaptorTreeWidget ( ) [virtual]

Member Function Documentation

QList<QVariant> pqSignalAdaptorTreeWidget::values ( ) const

Returns a list of the values currently in the tree widget.

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.

QTreeWidgetItem* pqSignalAdaptorTreeWidget::appendValue ( const QStringList &  values)
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 78 of file pqSignalAdaptorTreeWidget.h.

void pqSignalAdaptorTreeWidget::valuesChanged ( ) [signal]

Fired when the tree widget is modified.

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.

void pqSignalAdaptorTreeWidget::setValues ( const QList< QVariant > &  ) [slot]

Set the values in the widget.

QTreeWidgetItem* pqSignalAdaptorTreeWidget::growTable ( ) [slot]

Called when user navigates beyond the end in the indices table widget.

We add a new row to simplify editing.


Property Documentation

QList<QVariant> pqSignalAdaptorTreeWidget::values [read, write]

Definition at line 53 of file pqSignalAdaptorTreeWidget.h.


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