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 
40 class pqOutputPort;
42 class vtkSMProxy;
43 
49 {
50  Q_OBJECT
51  typedef QWidget Superclass;
52 
53 public:
55  {
56  INVALID = 0x0,
57  INDEX = 0x1,
58  GLOBALID = 0x2,
59  THRESHOLD = 0x4,
60  BLOCK = 0x10,
61  AMR_LEVEL = 0x20,
62  AMR_BLOCK = 0x40,
63  PROCESSID = 0x80,
64  QUERY = 0x8,
65  POINTS_NEAR = 0x100,
66  POINT_IN_CELL = 0x200,
67  ANY = 0xffff
68  };
69 
70  Q_DECLARE_FLAGS(CriteriaTypes, CriteriaType);
71 
73  {
92  LOCATION
93  };
94 
95  enum class DataSetType
96  {
97  STANDARD,
98  AMR,
99  MULTIBLOCK
100  };
101 
102 public:
103  pqQueryClauseWidget(pqMultiQueryClauseWidget* multiQueryWidget, QWidget* parent = nullptr,
104  Qt::WindowFlags flags = Qt::WindowFlags{});
105  ~pqQueryClauseWidget() override;
106 
107 public Q_SLOTS:
115  void initialize()
116  {
117  this->initialize(CriteriaTypes(ANY) ^ PROCESSID ^ AMR_LEVEL ^ AMR_BLOCK ^ BLOCK);
118  }
119 
127  void initialize(CriteriaTypes type_flags, bool qualifier_mode = false);
128 
132  void addSelectionQualifiers(vtkSMProxy*);
133 
137  void setAddButtonVisible(bool show);
138 
142  void setRemoveButtonVisible(bool show);
143 
147  void setAndLabelVisible(bool show);
148 
149 Q_SIGNALS:
150 
154  void addQueryRequested();
155 protected Q_SLOTS:
160  void populateSelectionCondition();
161 
166  void updateValueWidget();
167 
171  void showCompositeTree();
172 
176  void deleteQuery();
177 
178 protected:
183  void populateSelectionCriteria(CriteriaTypes type = ANY);
184 
188  CriteriaType currentCriteriaType() const;
189 
193  ConditionMode currentConditionType() const;
194 
197  QString LastQuery;
198 
200 
201 private:
202  Q_DISABLE_COPY(pqQueryClauseWidget)
203  class pqInternals;
204  pqInternals* Internals;
205 };
206 
207 #endif
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:58
pqQueryClauseWidget is used by pqQueryDialog as the widget allowing the user choose the clauses for t...
type
#define PQCOMPONENTS_EXPORT
pqMultiQueryClauseWidget * MultiQueryWidget
pqMultiQueryClauseWidget is used by pqQueryDialog as the widget allowing the user choose the clauses ...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
void initialize()
use this slot to initialize the clause GUI after all properties have been set.