ParaView
pqQueryClauseWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqQueryClauseWidget.h
5 
6  Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 ========================================================================*/
32 #ifndef pqQueryClauseWidget_h
33 #define pqQueryClauseWidget_h
34 
35 #include "pqComponentsModule.h"
36 #include "vtkSelectionNode.h"
37 #include <QWidget>
38 
39 class pqOutputPort;
40 class vtkPVDataSetAttributesInformation;
41 class vtkSMProxy;
42 
45 class PQCOMPONENTS_EXPORT pqQueryClauseWidget : public QWidget
46 {
47  Q_OBJECT
48  typedef QWidget Superclass;
49 public:
51  {
52  INVALID=0x0,
53  INDEX = 0x1,
54  GLOBALID =0x2,
55  THRESHOLD = 0x4,
56  BLOCK =0x10,
57  AMR_LEVEL=0x20,
58  AMR_BLOCK=0x40,
59  PROCESSID=0x80,
60  QUERY = 0x8,
61  ANY=0xffff
62  };
63 
64  Q_DECLARE_FLAGS(CriteriaTypes, CriteriaType);
65 
67  {
83  SINGLE_VALUE_MEAN_WITH_TOLERANCE
84  };
85 public:
87  QWidget* parent=0, Qt::WindowFlags flags=0);
88  virtual ~pqQueryClauseWidget();
89 
92  { this->Producer = p; }
94  { return this->Producer; }
95 
99  void setAttributeType(int attrType)
100  { this->AttributeType = attrType; }
101  int attributeType() const
102  { return this->AttributeType; }
103 
107  vtkSMProxy* newSelectionSource();
108 
109 public slots:
115  void initialize()
116  { this->initialize(CriteriaTypes(ANY) ^ PROCESSID ^ AMR_LEVEL ^ AMR_BLOCK ^ BLOCK); }
117 
123  void initialize(CriteriaTypes type_flags, bool qualifier_mode=false);
124 
125 signals:
127  void helpRequested();
128 
129 protected slots:
132  void populateSelectionCondition();
133 
136  void updateValueWidget();
137 
142  void updateDependentClauseWidgets();
143 
145  void showCompositeTree();
146 
147 protected:
150  vtkPVDataSetAttributesInformation* getChosenAttributeInfo() const;
151 
154  void populateSelectionCriteria(CriteriaTypes type=ANY);
155 
157  CriteriaType currentCriteriaType() const;
158 
159  ConditionMode currentConditionType() const;
160 
162  void addSelectionQualifiers(vtkSMProxy*);
163 
167  QString LastQuery;
168 private:
169  Q_DISABLE_COPY(pqQueryClauseWidget)
170  class pqInternals;
171  pqInternals* Internals;
172 
173 
174 };
175 
176 #endif
177 
178 
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:55
pqQueryClauseWidget is used by pqQueryDialog as the widget allowing the user choose the clauses for t...
pqOutputPort * producer() const
void setProducer(pqOutputPort *p)
Set/Get the data producer.
void initialize()
use this slot to initialize the clause GUI after all properties have been set.
void setAttributeType(int attrType)
Set the attribute type.