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 
36 #include "pqPropertyWidget.h"
37 #include "pqSMProxy.h"
38 #include "vtkBoundingBox.h"
39 #include <QScopedPointer>
40 
41 class vtkObject;
43 class vtkSMPropertyGroup;
44 
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  ~pqInteractivePropertyWidget() override;
66 
70  void reset() override;
71 
75  vtkSMNewWidgetRepresentationProxy* widgetProxy() const;
76 
80  void setView(pqView* view) override;
81 
89  bool isWidgetVisible() const;
90 
94  vtkSMProxy* dataSource() const;
95 
100  void select() override;
101  void deselect() override;
102 
107  vtkBoundingBox dataBounds() const;
108 
112  vtkSMPropertyGroup* propertyGroup() const;
113 
117  void hideEvent(QHideEvent*) override;
118 
122  void showEvent(QShowEvent*) override;
123 
124 public Q_SLOTS:
130  void setWidgetVisible(bool val);
131 
137  void setDataSource(vtkSMProxy* dataSource);
138 
139 protected Q_SLOTS:
143  virtual void placeWidget() = 0;
144 
148  void render();
149 
150 Q_SIGNALS:
154  void widgetVisibilityToggled(bool);
155 
160  void widgetVisibilityUpdated(bool);
161 
166  void startInteraction();
167  void interaction();
168  void endInteraction();
169 
170  void dummySignal();
171 
172 private Q_SLOTS:
178  void updateWidgetVisibility();
179 
180 protected:
181  bool VisibleState = true;
182 
183 private:
184  void handleUserEvent(vtkObject*, unsigned long, void*);
185 
186 private:
187  Q_DISABLE_COPY(pqInteractivePropertyWidget)
188 
189  class pqInternals;
190  QScopedPointer<pqInternals> Internals;
191 };
192 
193 #endif
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
virtual void deselect()
#define PQAPPLICATIONCOMPONENTS_EXPORT
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:54
proxy for 3D widgets and their representations in ParaView.
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...