ParaView
Public Types | Public Slots | Signals | Public Member Functions | Properties | Friends | List of all members
pqSignalAdaptorCompositeTreeWidget Class Reference

pqSignalAdaptorCompositeTreeWidget is used to connect a property with vtkSMCompositeTreeDomain as its domain to a Tree widget. More...

#include <pqSignalAdaptorCompositeTreeWidget.h>

Inherits QObject.

Public Types

enum  IndexModes { INDEX_MODE_FLAT, INDEX_MODE_LEVEL_INDEX, INDEX_MODE_LEVEL }
 

Public Slots

void setValues (const QList< QVariant > &values)
 Set the values. More...
 
void domainChanged ()
 Called when domain changes. More...
 
void portInformationChanged ()
 Called when the output port says that the data information has been updated. More...
 

Signals

void valuesChanged ()
 Fired when the widget value changes. More...
 

Public Member Functions

 pqSignalAdaptorCompositeTreeWidget (QTreeWidget *, vtkSMIntVectorProperty *smproperty, bool autoUpdateWidgetVisibility=false, bool showSelectedElementCounts=false)
 Constructor. More...
 
 pqSignalAdaptorCompositeTreeWidget (QTreeWidget *, vtkSMOutputPort *outputport, int domainMode, IndexModes indexMode=INDEX_MODE_FLAT, bool selectMultiple=false, bool autoUpdateWidgetVisibility=false, bool showSelectedElementCounts=false)
 Alternate constructor. More...
 
virtual ~pqSignalAdaptorCompositeTreeWidget ()
 Destructor. More...
 
QList< QVariant > values () const
 Returns the current value. More...
 
void setAutoUpdateWidgetVisibility (bool val)
 When set, the adaptor will update the visibility of the widget depending on whether the data is composite or not. More...
 
bool autoUpdateWidgetVisibility () const
 
void select (unsigned int flatIndex)
 Select the item with the given flat index. More...
 
unsigned int getCurrentFlatIndex (bool *valid=NULL)
 API to get information about the currently selected item. More...
 
QString blockName (const QTreeWidgetItem *item) const
 API to get information about an item. More...
 
unsigned int hierarchicalLevel (const QTreeWidgetItem *item) const
 API to get information about an item. More...
 
unsigned int hierarchicalBlockIndex (const QTreeWidgetItem *item) const
 API to get information about an item. More...
 
unsigned int flatIndex (const QTreeWidgetItem *item) const
 API to get information about an item. More...
 

Properties

QList< QVariant > values
 

Friends

class pqCallbackAdaptor
 

Detailed Description

pqSignalAdaptorCompositeTreeWidget is used to connect a property with vtkSMCompositeTreeDomain as its domain to a Tree widget.

It updates the tree to show composite data tree. Caveats: This widget does not handle SINGLE_ITEM selection where non-leaves are acceptable.

Definition at line 54 of file pqSignalAdaptorCompositeTreeWidget.h.

Member Enumeration Documentation

§ IndexModes

Enumerator
INDEX_MODE_FLAT 
INDEX_MODE_LEVEL_INDEX 
INDEX_MODE_LEVEL 

Definition at line 61 of file pqSignalAdaptorCompositeTreeWidget.h.

Constructor & Destructor Documentation

§ pqSignalAdaptorCompositeTreeWidget() [1/2]

pqSignalAdaptorCompositeTreeWidget::pqSignalAdaptorCompositeTreeWidget ( QTreeWidget *  ,
vtkSMIntVectorProperty smproperty,
bool  autoUpdateWidgetVisibility = false,
bool  showSelectedElementCounts = false 
)

Constructor.

domain is used to build the tree layout to show in the widget. autoUpdateWidgetVisibility - is true, the tree widget is hidden if the data information says that the data is not composite. showSelectedElementCounts - when true, next to each leaf node, an entry will be added showing the number of selected elements (cells|points).

§ pqSignalAdaptorCompositeTreeWidget() [2/2]

pqSignalAdaptorCompositeTreeWidget::pqSignalAdaptorCompositeTreeWidget ( QTreeWidget *  ,
vtkSMOutputPort outputport,
int  domainMode,
IndexModes  indexMode = INDEX_MODE_FLAT,
bool  selectMultiple = false,
bool  autoUpdateWidgetVisibility = false,
bool  showSelectedElementCounts = false 
)

Alternate constructor.

outputport - the output port producing the composite dataset to show. domainMode - vtkSMCompositeTreeDomain::ALL|LEAVES|NON_LEAVES|NONE. Indicates what types of nodes in the composite tree are selectable. indexMode - indicates how the values are set/get (using composite-flat-index, using level-dataset-index or using only the level number. selectMultiple - true if possible to select multiple nodes. autoUpdateWidgetVisibility - is true, the tree widget is hidden if the data information says that the data is not composite. showSelectedElementCounts - when true, next to each leaf node, an entry will be added showing the number of selected elements (cells|points).

§ ~pqSignalAdaptorCompositeTreeWidget()

virtual pqSignalAdaptorCompositeTreeWidget::~pqSignalAdaptorCompositeTreeWidget ( )
virtual

Destructor.

Member Function Documentation

§ values()

QList<QVariant> pqSignalAdaptorCompositeTreeWidget::values ( ) const

Returns the current value.

This is a QList of unsigned ints.

§ setAutoUpdateWidgetVisibility()

void pqSignalAdaptorCompositeTreeWidget::setAutoUpdateWidgetVisibility ( bool  val)
inline

When set, the adaptor will update the visibility of the widget depending on whether the data is composite or not.

Definition at line 117 of file pqSignalAdaptorCompositeTreeWidget.h.

§ autoUpdateWidgetVisibility()

bool pqSignalAdaptorCompositeTreeWidget::autoUpdateWidgetVisibility ( ) const
inline

Definition at line 118 of file pqSignalAdaptorCompositeTreeWidget.h.

§ select()

void pqSignalAdaptorCompositeTreeWidget::select ( unsigned int  flatIndex)

Select the item with the given flat index.

§ getCurrentFlatIndex()

unsigned int pqSignalAdaptorCompositeTreeWidget::getCurrentFlatIndex ( bool *  valid = NULL)

API to get information about the currently selected item.

Returns the flat index for the current item.

§ blockName()

QString pqSignalAdaptorCompositeTreeWidget::blockName ( const QTreeWidgetItem *  item) const

API to get information about an item.

Returns the block name for the item.

§ hierarchicalLevel()

unsigned int pqSignalAdaptorCompositeTreeWidget::hierarchicalLevel ( const QTreeWidgetItem *  item) const

API to get information about an item.

Returns the AMR level for the item if valid.

§ hierarchicalBlockIndex()

unsigned int pqSignalAdaptorCompositeTreeWidget::hierarchicalBlockIndex ( const QTreeWidgetItem *  item) const

API to get information about an item.

Returns the AMR block number for the item if valid.

§ flatIndex()

unsigned int pqSignalAdaptorCompositeTreeWidget::flatIndex ( const QTreeWidgetItem *  item) const

API to get information about an item.

Returns the flat index for the item.

§ setValues

void pqSignalAdaptorCompositeTreeWidget::setValues ( const QList< QVariant > &  values)
slot

Set the values.

§ domainChanged

void pqSignalAdaptorCompositeTreeWidget::domainChanged ( )
slot

Called when domain changes.

§ portInformationChanged

void pqSignalAdaptorCompositeTreeWidget::portInformationChanged ( )
slot

Called when the output port says that the data information has been updated.

§ valuesChanged

void pqSignalAdaptorCompositeTreeWidget::valuesChanged ( )
signal

Fired when the widget value changes.

Friends And Related Function Documentation

§ pqCallbackAdaptor

friend class pqCallbackAdaptor
friend

Definition at line 257 of file pqSignalAdaptorCompositeTreeWidget.h.

Property Documentation

§ values

QList<QVariant> pqSignalAdaptorCompositeTreeWidget::values
readwrite

Definition at line 59 of file pqSignalAdaptorCompositeTreeWidget.h.


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