ParaView
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
pqQueryClauseWidget Class Reference

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

#include <pqQueryClauseWidget.h>

Inherits QWidget.

Collaboration diagram for pqQueryClauseWidget:
Collaboration graph
[legend]

Public Types

enum  CriteriaType {
  INVALID =0x0, INDEX = 0x1, GLOBALID =0x2, THRESHOLD = 0x4,
  BLOCK =0x10, AMR_LEVEL =0x20, AMR_BLOCK =0x40, PROCESSID =0x80,
  QUERY = 0x8, 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, SINGLE_VALUE_MIN,
  SINGLE_VALUE_MAX, SINGLE_VALUE_LE_MEAN, SINGLE_VALUE_GE_MEAN, SINGLE_VALUE_MEAN_WITH_TOLERANCE
}
 

Public Slots

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

Signals

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

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. More...
 
pqOutputPortproducer () const
 
void setAttributeType (int attrType)
 Set the attribute type. More...
 
int attributeType () const
 
vtkSMProxy * newSelectionSource ()
 Creates a new selection source proxy based on the query. More...
 

Protected Slots

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

Protected Member Functions

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

Protected Attributes

pqOutputPortProducer
 
int AttributeType
 
bool AsQualifier
 
QString LastQuery
 

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

§ CriteriaType

Enumerator
INVALID 
INDEX 
GLOBALID 
THRESHOLD 
BLOCK 
AMR_LEVEL 
AMR_BLOCK 
PROCESSID 
QUERY 
ANY 

Definition at line 50 of file pqQueryClauseWidget.h.

§ ConditionMode

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 
SINGLE_VALUE_MIN 
SINGLE_VALUE_MAX 
SINGLE_VALUE_LE_MEAN 
SINGLE_VALUE_GE_MEAN 
SINGLE_VALUE_MEAN_WITH_TOLERANCE 

Definition at line 66 of file pqQueryClauseWidget.h.

Constructor & Destructor Documentation

§ pqQueryClauseWidget()

pqQueryClauseWidget::pqQueryClauseWidget ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

§ ~pqQueryClauseWidget()

virtual pqQueryClauseWidget::~pqQueryClauseWidget ( )
virtual

Member Function Documentation

§ Q_DECLARE_FLAGS()

pqQueryClauseWidget::Q_DECLARE_FLAGS ( CriteriaTypes  ,
CriteriaType   
)

§ setProducer()

void pqQueryClauseWidget::setProducer ( pqOutputPort p)
inline

Set/Get the data producer.

Definition at line 91 of file pqQueryClauseWidget.h.

§ producer()

pqOutputPort* pqQueryClauseWidget::producer ( ) const
inline

Definition at line 93 of file pqQueryClauseWidget.h.

§ setAttributeType()

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 99 of file pqQueryClauseWidget.h.

§ attributeType()

int pqQueryClauseWidget::attributeType ( ) const
inline

Definition at line 101 of file pqQueryClauseWidget.h.

§ newSelectionSource()

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.

§ initialize [1/2]

void pqQueryClauseWidget::initialize ( )
inlineslot

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 115 of file pqQueryClauseWidget.h.

§ initialize [2/2]

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.

§ helpRequested

void pqQueryClauseWidget::helpRequested ( )
signal

Fired when the user clicks on the help button.

§ populateSelectionCondition

void pqQueryClauseWidget::populateSelectionCondition ( )
protectedslot

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

§ updateValueWidget

void pqQueryClauseWidget::updateValueWidget ( )
protectedslot

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

§ updateDependentClauseWidgets

void pqQueryClauseWidget::updateDependentClauseWidgets ( )
protectedslot

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.

§ showCompositeTree

void pqQueryClauseWidget::showCompositeTree ( )
protectedslot

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

§ getChosenAttributeInfo()

vtkPVDataSetAttributesInformation* pqQueryClauseWidget::getChosenAttributeInfo ( ) const
protected

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

§ populateSelectionCriteria()

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

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

§ currentCriteriaType()

CriteriaType pqQueryClauseWidget::currentCriteriaType ( ) const
protected

Returns the current criteria type.

§ currentConditionType()

ConditionMode pqQueryClauseWidget::currentConditionType ( ) const
protected

§ addSelectionQualifiers()

void pqQueryClauseWidget::addSelectionQualifiers ( vtkSMProxy *  )
protected

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

Member Data Documentation

§ Producer

pqOutputPort* pqQueryClauseWidget::Producer
protected

Definition at line 164 of file pqQueryClauseWidget.h.

§ AttributeType

int pqQueryClauseWidget::AttributeType
protected

Definition at line 165 of file pqQueryClauseWidget.h.

§ AsQualifier

bool pqQueryClauseWidget::AsQualifier
protected

Definition at line 166 of file pqQueryClauseWidget.h.

§ LastQuery

QString pqQueryClauseWidget::LastQuery
protected

Definition at line 167 of file pqQueryClauseWidget.h.


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