pqMultiViewWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqMultiViewWidget_h
5 #define pqMultiViewWidget_h
6 
7 #include "pqComponentsModule.h"
8 #include <QWidget>
9 
10 class pqProxy;
11 class pqView;
12 class pqViewFrame;
13 class vtkImageData;
14 class vtkObject;
15 class vtkSMProxy;
17 class vtkSMViewProxy;
18 
28 class PQCOMPONENTS_EXPORT pqMultiViewWidget : public QWidget
29 {
30  Q_OBJECT;
31  typedef QWidget Superclass;
32  Q_PROPERTY(bool decorationsVisibility READ decorationsVisibility WRITE setDecorationsVisibility
33  NOTIFY decorationsVisibilityChanged);
34 
35 public:
36  pqMultiViewWidget(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags{});
37  ~pqMultiViewWidget() override;
38 
43  void setLayoutManager(vtkSMViewLayoutProxy*);
44  vtkSMViewLayoutProxy* layoutManager() const;
45 
49  bool decorationsVisibility() const;
50 
54  QList<vtkSMViewProxy*> viewProxies() const;
55 
59  bool isViewAssigned(pqView*) const;
60 
67  bool togglePopout();
68 
87  QSize preview(const QSize& previewSize = QSize());
88 
92  pqViewFrame* activeFrame();
93 
97  int activeFrameLocation() const;
98 
99 Q_SIGNALS:
103  void frameActivated();
104 
109  void decorationsVisibilityChanged(bool visible);
110 
111 public Q_SLOTS:
117  void reload();
118 
124  void makeFrameActive();
125 
127 
130  void setDecorationsVisibility(bool);
131  void showDecorations() { this->setDecorationsVisibility(true); }
132  void hideDecorations() { this->setDecorationsVisibility(false); }
134 
139  void lockViewSize(const QSize&);
140 
144  void reset();
145 
151  void destroyAllViews();
152 
153 protected Q_SLOTS:
159  void standardButtonPressed(int);
160 
165  void makeActive(pqViewFrame* frame);
166 
171  void markActive(pqView* view);
172  void markActive(pqViewFrame* frame);
173 
177  void swapPositions(const QString&);
178 
183  void proxyRemoved(pqProxy*);
184 
189  void viewAdded(pqView*);
190 
192 
197  void resizeEvent(QResizeEvent* evt) override;
199 
200 protected: // NOLINT(readability-redundant-access-specifiers)
207  virtual pqViewFrame* newFrame(vtkSMProxy* view);
208 
213  bool eventFilter(QObject* caller, QEvent* evt) override;
214 
215 private:
216  void layoutPropertyModified(vtkObject*, unsigned long, void*);
217 
218  Q_DISABLE_COPY(pqMultiViewWidget)
219 
220  class pqInternals;
221  pqInternals* Internals;
222  friend class pqInternals;
223 };
224 
225 #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:31
Superclass for all view proxies.
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
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:28
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140