ParaView
pqInteractivePropertyWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqInteractivePropertyWidget.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 pqInteractivePropertyWidget_h
33 #define pqInteractivePropertyWidget_h
34 
35 #include "pqApplicationComponentsModule.h"
36 #include "pqPropertyWidget.h"
37 #include "pqSMProxy.h"
38 #include "vtkBoundingBox.h"
39 #include <QScopedPointer>
40 
41 class vtkObject;
42 class vtkSMNewWidgetRepresentationProxy;
43 class vtkSMPropertyGroup;
44 
54 class PQAPPLICATIONCOMPONENTS_EXPORT pqInteractivePropertyWidget : public pqPropertyWidget
55 {
56  Q_OBJECT
58  Q_PROPERTY(pqSMProxy dataSource READ dataSource WRITE setDataSource);
59 public:
61  const char* widget_smgroup, const char* widget_smname,
62  vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, QWidget* parent=0);
63  virtual ~pqInteractivePropertyWidget();
64 
66  virtual void reset();
67 
69  vtkSMNewWidgetRepresentationProxy* widgetProxy() const;
70 
72  virtual void setView(pqView* view);
73 
79  bool isWidgetVisible() const;
80 
82  vtkSMProxy* dataSource() const;
83 
86  virtual void select();
87  virtual void deselect();
88 
91  vtkBoundingBox dataBounds() const;
92 
93 public slots:
97  void setWidgetVisible(bool val);
98 
102  void setDataSource(vtkSMProxy* dataSource);
103 
104 protected slots:
106  virtual void placeWidget() = 0;
107 
109  void render();
110 
111 signals:
113  void widgetVisibilityToggled(bool);
114 
117  void widgetVisibilityUpdated(bool);
118 
121  void startInteraction();
122  void interaction();
123  void endInteraction();
124 
125  void dummySignal();
126 
127 private slots:
131  void updateWidgetVisibility();
132 
133 private:
134  void handleUserEvent(vtkObject*, unsigned long, void*);
135 
136 private:
137  Q_DISABLE_COPY(pqInteractivePropertyWidget)
138 
139  class pqInternals;
140  QScopedPointer<pqInternals> Internals;
141 };
142 
143 #endif
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
virtual void deselect()
virtual void select()
These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive.
This is a PQ abstraction of a generic view module.
Definition: pqView.h:55
vtkSmartPointer< vtkSMProxy > pqSMProxy
make pqSMProxy synonymous to a smart pointer of a vtkSMProxy
Definition: pqSMProxy.h:42
virtual void reset()
virtual void setView(pqView *)
called to set the active view. This will fire the viewChanged() signal.
pqInteractivePropertyWidget is an abstract pqPropertyWidget subclass designed to serve as the supercl...