pqLinksEditor.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 
5 #ifndef pqLinksEditor_h
6 #define pqLinksEditor_h
7 
8 #include <QDialog>
9 #include <QListWidgetItem>
10 #include <QModelIndex>
11 #include <QScopedPointer>
12 
13 #include "pqComponentsModule.h"
14 #include "pqLinksModel.h"
15 
16 namespace Ui
17 {
18 class pqLinksEditor;
19 }
20 
26 class PQCOMPONENTS_EXPORT pqLinksEditor : public QDialog
27 {
28  Q_OBJECT
29  typedef QDialog base;
30 
31 public:
36  pqLinksEditor(vtkSMLink* link, QWidget* p = nullptr);
37 
41  ~pqLinksEditor() override;
42 
46  QString linkName();
47 
51  pqLinksModel::ItemType linkType();
52 
56  vtkSMProxy* selectedProxy1();
57 
61  vtkSMProxy* selectedProxy2();
62 
66  QString selectedProperty1();
67 
71  QString selectedProperty2();
72 
76  bool interactiveViewLinkChecked();
77 
81  bool cameraWidgetViewLinkChecked();
82 
86  bool convertToIndicesChecked();
87 
88 private Q_SLOTS:
89  void currentProxy1Changed(const QModelIndex& cur, const QModelIndex&);
90  void currentProxy2Changed(const QModelIndex& cur, const QModelIndex&);
91 
92  void currentProperty1Changed(QListWidgetItem* item);
93  void currentProperty2Changed(QListWidgetItem* item);
94 
95  void updateSelectedProxies();
96  void updateEnabledState();
97 
98 private: // NOLINT(readability-redundant-access-specifiers)
99  class pqLinksEditorProxyModel;
100  void updatePropertyList(QListWidget* tw, vtkSMProxy* proxy);
101 
102  QScopedPointer<Ui::pqLinksEditor> Ui;
103 
104  pqLinksEditorProxyModel* Proxy1Model = nullptr;
105  pqLinksEditorProxyModel* Proxy2Model = nullptr;
106 
107  vtkSMProxy* SelectedProxy1 = nullptr;
108  vtkSMProxy* SelectedProxy2 = nullptr;
109  QString SelectedProperty1;
110  QString SelectedProperty2;
111 };
112 
113 #endif
#define PQCOMPONENTS_EXPORT
ItemType
type of link (camera, proxy or property)
Definition: pqLinksModel.h:37
A Qt dialog for editing a property/proxy/camera link.
Definition: pqLinksEditor.h:26
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140