ParaView
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
pqQueryClauseWidget Class Reference

pqQueryClauseWidget is used by pqQueryDialog as the widget allowing the user choose the clauses for the queries. More...

#include <pqQueryClauseWidget.h>

Collaboration diagram for pqQueryClauseWidget:
Collaboration graph
[legend]

List of all members.

Public Types

enum  CriteriaType {
  INVALID = 0x0, QUERY = 0x01, BLOCK = 0x10, AMR_LEVEL = 0x20,
  AMR_BLOCK = 0x40, PROCESSID = 0x80, ANY = 0xffff
}
enum  ConditionMode {
  SINGLE_VALUE, SINGLE_VALUE_GE, SINGLE_VALUE_LE, PAIR_OF_VALUES,
  TRIPLET_OF_VALUES, LIST_OF_VALUES, BLOCK_ID_VALUE, LIST_OF_BLOCK_ID_VALUES,
  BLOCK_NAME_VALUE, AMR_LEVEL_VALUE, AMR_BLOCK_VALUE
}

Public Slots

void initialize ()
 use this slot to initialize the clause GUI after all properties have been set.
void initialize (CriteriaTypes type_flags, bool qualifier_mode=false)
 initialize the widget only with the subset of criteria mentioned.

Signals

void helpRequested ()
 Fired when the user clicks on the help button.

Public Member Functions

 Q_DECLARE_FLAGS (CriteriaTypes, CriteriaType)
 pqQueryClauseWidget (QWidget *parent=0, Qt::WindowFlags flags=0)
virtual ~pqQueryClauseWidget ()
void setProducer (pqOutputPort *p)
 Set/Get the data producer.
pqOutputPortproducer () const
void setAttributeType (int attrType)
 Set the attribute type.
int attributeType () const
vtkSMProxynewSelectionSource ()
 Creates a new selection source proxy based on the query.

Protected Slots

void populateSelectionCondition ()
 Based on the selection criteria, populate the options in the selection "condition" combo box.
void updateValueWidget ()
 Update the value widget so show the correct widget based on the chosen criteria and condition.
void updateDependentClauseWidgets ()
 Some query clauses under certain conditions require additional options from the user.
void showCompositeTree ()
 Pops up a dialog showing the composite data structure for the data.

Protected Member Functions

vtkPVDataSetAttributesInformationgetChosenAttributeInfo () const
 Returns the attribute info for the attribute chosen in the "Selection Type" combo box.
void populateSelectionCriteria (CriteriaTypes type=ANY)
 Based on the selection type and data information from the producer, populate the "criteria" combo box.
CriteriaType currentCriteriaType () const
 Returns the current criteria type.
ConditionMode currentConditionType () const
void addSelectionQualifiers (vtkSMProxy *)
 Updates the selection source proxy with the criteria in the clause.

Protected Attributes

pqOutputPortProducer
int AttributeType
bool AsQualifier

Detailed Description

pqQueryClauseWidget is used by pqQueryDialog as the widget allowing the user choose the clauses for the queries.

Definition at line 45 of file pqQueryClauseWidget.h.


Member Enumeration Documentation

Enumerator:
INVALID 
QUERY 
BLOCK 
AMR_LEVEL 
AMR_BLOCK 
PROCESSID 
ANY 

Definition at line 50 of file pqQueryClauseWidget.h.

Enumerator:
SINGLE_VALUE 
SINGLE_VALUE_GE 
SINGLE_VALUE_LE 
PAIR_OF_VALUES 
TRIPLET_OF_VALUES 
LIST_OF_VALUES 
BLOCK_ID_VALUE 
LIST_OF_BLOCK_ID_VALUES 
BLOCK_NAME_VALUE 
AMR_LEVEL_VALUE 
AMR_BLOCK_VALUE 

Definition at line 63 of file pqQueryClauseWidget.h.


Constructor & Destructor Documentation

pqQueryClauseWidget::pqQueryClauseWidget ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)
virtual pqQueryClauseWidget::~pqQueryClauseWidget ( ) [virtual]

Member Function Documentation

pqQueryClauseWidget::Q_DECLARE_FLAGS ( CriteriaTypes  ,
CriteriaType   
)
void pqQueryClauseWidget::setProducer ( pqOutputPort p) [inline]

Set/Get the data producer.

Definition at line 83 of file pqQueryClauseWidget.h.

pqOutputPort* pqQueryClauseWidget::producer ( ) const [inline]

Definition at line 85 of file pqQueryClauseWidget.h.

void pqQueryClauseWidget::setAttributeType ( int  attrType) [inline]

Set the attribute type.

This determine what arrays are listed in the selection criteria. Valid values are from the enum vtkDataObject::AttributeTypes.

Definition at line 91 of file pqQueryClauseWidget.h.

int pqQueryClauseWidget::attributeType ( ) const [inline]

Definition at line 93 of file pqQueryClauseWidget.h.

vtkSMProxy* pqQueryClauseWidget::newSelectionSource ( )

Creates a new selection source proxy based on the query.

Note that this does not register the proxy, it merely creates the selection source and returns it.

void pqQueryClauseWidget::initialize ( ) [inline, slot]

use this slot to initialize the clause GUI after all properties have been set.

FIXME: Unsupported Terms: process id, amr-level, amr-block. We will need to extend VTK selection support for those, so we will implement them later (possibly 3.10/4.0)

Definition at line 107 of file pqQueryClauseWidget.h.

void pqQueryClauseWidget::initialize ( CriteriaTypes  type_flags,
bool  qualifier_mode = false 
) [slot]

initialize the widget only with the subset of criteria mentioned.

A query clause has two components, the query term and the qualifiers. Some criteria can be both eg. BLOCK can be both the term or a qualifier. The available operators may change in such case. Hence, we specify if it's being used as a qualifier or not.

void pqQueryClauseWidget::helpRequested ( ) [signal]

Fired when the user clicks on the help button.

void pqQueryClauseWidget::populateSelectionCondition ( ) [protected, slot]

Based on the selection criteria, populate the options in the selection "condition" combo box.

void pqQueryClauseWidget::updateValueWidget ( ) [protected, slot]

Update the value widget so show the correct widget based on the chosen criteria and condition.

void pqQueryClauseWidget::updateDependentClauseWidgets ( ) [protected, slot]

Some query clauses under certain conditions require additional options from the user.

These are managed using more instances of pqQueryClauseWidget internally. This method creates these new instances if needed.

void pqQueryClauseWidget::showCompositeTree ( ) [protected, slot]

Pops up a dialog showing the composite data structure for the data.

vtkPVDataSetAttributesInformation* pqQueryClauseWidget::getChosenAttributeInfo ( ) const [protected]

Returns the attribute info for the attribute chosen in the "Selection Type" combo box.

void pqQueryClauseWidget::populateSelectionCriteria ( CriteriaTypes  type = ANY) [protected]

Based on the selection type and data information from the producer, populate the "criteria" combo box.

CriteriaType pqQueryClauseWidget::currentCriteriaType ( ) const [protected]

Returns the current criteria type.

ConditionMode pqQueryClauseWidget::currentConditionType ( ) const [protected]
void pqQueryClauseWidget::addSelectionQualifiers ( vtkSMProxy ) [protected]

Updates the selection source proxy with the criteria in the clause.


Member Data Documentation

Definition at line 156 of file pqQueryClauseWidget.h.

Definition at line 157 of file pqQueryClauseWidget.h.

Definition at line 158 of file pqQueryClauseWidget.h.


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