pqProxyWidgetDialog.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 pqProxyWidgetDialog_h
5 #define pqProxyWidgetDialog_h
6 
7 #include "pqComponentsModule.h"
8 #include <QDialog>
9 
10 class vtkSMProxy;
11 
20 {
21  Q_OBJECT
22  typedef QDialog Superclass;
23 
24 public:
26  vtkSMProxy* proxy, QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags{});
27  pqProxyWidgetDialog(vtkSMProxy* proxy, const QStringList& properties, QWidget* parent = nullptr,
28  Qt::WindowFlags f = Qt::WindowFlags{});
29  ~pqProxyWidgetDialog() override;
30 
34  bool hasVisibleWidgets() const;
35 
41  bool hasAdvancedProperties() const;
42 
46  vtkSMProxy* proxy() const;
47 
54  void setEnableSearchBar(bool val);
55  bool enableSearchBar() const;
56 
67  void setHideAdvancedProperties(bool val);
68  bool hideAdvancedProperties() const;
69 
77  void setApplyChangesImmediately(bool val);
78  bool applyChangesImmediately() const;
79 
88  QString setSettingsKey(const QString& key);
89 
90 protected:
94  void showEvent(QShowEvent* event) override;
95  void hideEvent(QHideEvent* event) override;
96  void done(int r) override;
97 
98 private Q_SLOTS:
99  void filterWidgets();
100  void onChangeAvailable();
101 
105  void onApply();
106  void onReset();
107  void onRestoreDefaults();
108  void onSaveAsDefaults();
109 
110 private: // NOLINT(readability-redundant-access-specifiers)
111  Q_DISABLE_COPY(pqProxyWidgetDialog)
112 
113  friend class pqInternals;
114  class pqInternals;
115  pqInternals* Internals;
116 };
117 
118 #endif
#define PQCOMPONENTS_EXPORT
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
key
pqProxyWidgetDialog is used to show properties of any proxy in a dialog.