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;
43 class vtkSMPropertyGroup;
44 
56 class PQAPPLICATIONCOMPONENTS_EXPORT pqInteractivePropertyWidget : public pqPropertyWidget
57 {
58  Q_OBJECT
60  Q_PROPERTY(pqSMProxy dataSource READ dataSource WRITE setDataSource);
61 
62 public:
63  pqInteractivePropertyWidget(const char* widget_smgroup, const char* widget_smname,
64  vtkSMProxy* proxy, vtkSMPropertyGroup* smgroup, QWidget* parent = 0);
65  virtual ~pqInteractivePropertyWidget();
66 
70  virtual void reset();
71 
75  vtkSMNewWidgetRepresentationProxy* widgetProxy() const;
76 
80  virtual void setView(pqView* view);
81 
89  bool isWidgetVisible() const;
90 
94  vtkSMProxy* dataSource() const;
95 
100  virtual void select();
101  virtual void deselect();
102 
107  vtkBoundingBox dataBounds() const;
108 
109 public slots:
115  void setWidgetVisible(bool val);
116 
122  void setDataSource(vtkSMProxy* dataSource);
123 
124 protected slots:
128  virtual void placeWidget() = 0;
129 
133  void render();
134 
135 signals:
139  void widgetVisibilityToggled(bool);
140 
145  void widgetVisibilityUpdated(bool);
146 
151  void startInteraction();
152  void interaction();
153  void endInteraction();
154 
155  void dummySignal();
156 
157 private slots:
163  void updateWidgetVisibility();
164 
165 private:
166  void handleUserEvent(vtkObject*, unsigned long, void*);
167 
168 private:
169  Q_DISABLE_COPY(pqInteractivePropertyWidget)
170 
171  class pqInternals;
172  QScopedPointer<pqInternals> Internals;
173 };
174 
175 #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:56
proxy for 3D widgets and their representations in ParaView.
vtkSmartPointer< vtkSMProxy > pqSMProxy
make pqSMProxy synonymous to a smart pointer of a vtkSMProxy
Definition: pqSMProxy.h:44
virtual void reset()
virtual void setView(pqView *)
called to set the active view.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
pqInteractivePropertyWidget is an abstract pqPropertyWidget subclass designed to serve as the supercl...