ParaView
pqCustomFilterDefinitionWizard.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqCustomFilterDefinitionWizard.h
5 
6  Copyright (c) 2005-2008 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 
35 
36 #ifndef _pqCustomFilterDefinitionWizard_h
37 #define _pqCustomFilterDefinitionWizard_h
38 
39 
40 #include "pqComponentsModule.h"
41 #include <QDialog>
42 
44 class pqCustomFilterDefinitionWizardForm;
46 class pqOutputPort;
47 class QModelIndex;
48 class vtkSMCompoundSourceProxy;
49 
81 class PQCOMPONENTS_EXPORT pqCustomFilterDefinitionWizard : public QDialog
82 {
83  Q_OBJECT
84 
85 public:
92  QWidget *parent=0);
94 
99  pqCustomFilterDefinitionModel *getModel() const {return this->Model;}
100 
107  QString getCustomFilterName() const;
108 
109 public slots:
118  void createCustomFilter();
119 
120 private:
131  void addAutoIncludedProxies();
132 
141  bool validateCustomFilterName();
142 
148  void setupDefaultInputOutput();
149 
150 private slots:
152 
153  void navigateBack();
155 
157  void navigateNext();
158 
160  void finishWizard();
161 
165  void clearNameOverwrite(const QString &text);
167 
169 
170  void updateInputForm(const QModelIndex &current,
179  const QModelIndex &previous);
180 
185  void updateOutputForm(const QModelIndex &current,
186  const QModelIndex &previous);
187 
197  void updatePropertyForm(const QModelIndex &current,
198  const QModelIndex &previous);
200 
202 
203  void addInput();
205 
207  void removeInput();
208 
210  void moveInputUp();
211 
213  void moveInputDown();
215 
217 
218  void addOutput();
220 
222  void removeOutput();
223 
225  void moveOutputUp();
226 
228  void moveOutputDown();
230 
232 
233  void addProperty();
235 
237  void removeProperty();
238 
240  void movePropertyUp();
241 
243  void movePropertyDown();
245 
247 
248  void updateInputButtons(const QModelIndex &current,
253  const QModelIndex &previous);
254 
259  void updateOutputButtons(const QModelIndex &current,
260  const QModelIndex &previous);
261 
266  void updatePropertyButtons(const QModelIndex &current,
267  const QModelIndex &previous);
269 
270 private:
271  int CurrentPage;
272  bool OverwriteOK;
273  vtkSMCompoundSourceProxy *Filter;
275  pqCustomFilterDefinitionWizardForm *Form;
276 
278  void addOutputInternal(pqOutputPort* port, const QString& string);
279 };
280 
281 #endif
The pqCustomFilterDefinitionModel class stores the sources that define a compound proxy in a hierarch...
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:55
The pqCustomFilterDefinitionWizard class is used to create a compound proxy definition one step at a ...
The pqCustomFilterManagerModel class stores the list of registered pipeline custom filter definitions...
pqCustomFilterDefinitionModel * getModel() const
Gets the custom filter definition model used by the wizard.