pqMultiViewWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: $RCSfile$
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 pqMultiViewWidget_h
33 #define pqMultiViewWidget_h
34 
35 #include "pqComponentsModule.h"
36 #include <QWidget>
37 
38 class pqProxy;
39 class pqView;
40 class pqViewFrame;
41 class vtkImageData;
42 class vtkObject;
43 class vtkSMProxy;
45 class vtkSMViewProxy;
46 
56 class PQCOMPONENTS_EXPORT pqMultiViewWidget : public QWidget
57 {
58  Q_OBJECT;
59  typedef QWidget Superclass;
60  Q_PROPERTY(bool decorationsVisibility READ decorationsVisibility WRITE setDecorationsVisibility
61  NOTIFY decorationsVisibilityChanged);
62 
63 public:
64  pqMultiViewWidget(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags{});
65  ~pqMultiViewWidget() override;
66 
71  void setLayoutManager(vtkSMViewLayoutProxy*);
72  vtkSMViewLayoutProxy* layoutManager() const;
73 
77  bool decorationsVisibility() const;
78 
82  QList<vtkSMViewProxy*> viewProxies() const;
83 
87  bool isViewAssigned(pqView*) const;
88 
95  bool togglePopout();
96 
115  QSize preview(const QSize& previewSize = QSize());
116 
120  int activeFrameLocation() const;
121 
122 Q_SIGNALS:
126  void frameActivated();
127 
132  void decorationsVisibilityChanged(bool visible);
133 
134 public Q_SLOTS:
140  void reload();
141 
147  void makeFrameActive();
148 
150 
153  void setDecorationsVisibility(bool);
154  void showDecorations() { this->setDecorationsVisibility(true); }
155  void hideDecorations() { this->setDecorationsVisibility(false); }
157 
162  void lockViewSize(const QSize&);
163 
167  void reset();
168 
174  void destroyAllViews();
175 
176 protected Q_SLOTS:
182  void standardButtonPressed(int);
183 
188  void makeActive(pqViewFrame* frame);
189 
194  void markActive(pqView* view);
195  void markActive(pqViewFrame* frame);
196 
200  void swapPositions(const QString&);
201 
206  void proxyRemoved(pqProxy*);
207 
212  void viewAdded(pqView*);
213 
215 
220  void resizeEvent(QResizeEvent* evt) override;
222 
223 protected: // NOLINT(readability-redundant-access-specifiers)
230  virtual pqViewFrame* newFrame(vtkSMProxy* view);
231 
236  bool eventFilter(QObject* caller, QEvent* evt) override;
237 
238 private:
239  void layoutPropertyModified(vtkObject*, unsigned long, void*);
240 
241  Q_DISABLE_COPY(pqMultiViewWidget)
242 
243  class pqInternals;
244  pqInternals* Internals;
245  friend class pqInternals;
246 };
247 
248 #endif
pqMultiViewWidget is a widget that manages layout of multiple views.
#define PQCOMPONENTS_EXPORT
pqViewFrame is used to represent a frame for any ParaView view shown in the pqMultiViewWidget.
Definition: pqViewFrame.h:59
Superclass for all view proxies.
This is a PQ abstraction of a generic view module.
Definition: pqView.h:54
void showDecorations()
Set the visibility for frame decorations and splitter handles.
void hideDecorations()
Set the visibility for frame decorations and splitter handles.
vtkSMViewLayoutProxy is used by ParaView to layout multiple views in a 2D KD-Tree layout...
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:56
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152