pqDataAssemblyPropertyWidget.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 pqDataAssemblyPropertyWidget_h
5 #define pqDataAssemblyPropertyWidget_h
6 
8 #include "pqPropertyWidget.h"
9 
10 #include <QScopedPointer> // for QScopedPointer
11 
157 class vtkObject;
159 {
160  Q_OBJECT
162 
166  Q_PROPERTY(QList<QVariant> selectors READ selectorsAsVariantList WRITE setSelectors NOTIFY
167  selectorsChanged);
168 
172  Q_PROPERTY(QList<QVariant> selectorColors READ selectorColorsAsVariantList WRITE setSelectorColors
173  NOTIFY colorsChanged);
174 
178  Q_PROPERTY(QList<QVariant> selectorOpacities READ selectorOpacitiesAsVariantList WRITE
179  setSelectorOpacities NOTIFY opacitiesChanged);
180 
182 
187  Q_PROPERTY(QList<QVariant> compositeIndices READ compositeIndicesAsVariantList WRITE
188  setCompositeIndices NOTIFY selectorsChanged);
189  Q_PROPERTY(QList<QVariant> compositeIndexOpacities READ compositeIndexOpacitiesAsVariantList WRITE
190  setCompositeIndexOpacities NOTIFY opacitiesChanged);
191  Q_PROPERTY(QList<QVariant> compositeIndexColors READ compositeIndexColorsAsVariantList WRITE
192  setCompositeIndexColors NOTIFY colorsChanged);
194 public:
196  vtkSMProxy* smproxy, vtkSMPropertyGroup* smgroup, QWidget* parent = nullptr);
198  vtkSMProxy* smproxy, vtkSMProperty* smproperty, QWidget* parent = nullptr);
199  ~pqDataAssemblyPropertyWidget() override;
200 
202 
205  void setSelectors(const QStringList& paths);
206  const QStringList& selectors() const;
207  void setSelectors(const QList<QVariant>& paths);
208  QList<QVariant> selectorsAsVariantList() const;
210 
212 
215  void setCompositeIndices(const QList<QVariant>& values);
216  QList<QVariant> compositeIndicesAsVariantList() const;
218 
220 
225  void setCompositeIndexColors(const QList<QVariant>& values);
226  QList<QVariant> compositeIndexColorsAsVariantList() const;
227 
228  void setSelectorColors(const QList<QVariant>& values);
229  QList<QVariant> selectorColorsAsVariantList() const;
231 
233 
238  void setCompositeIndexOpacities(const QList<QVariant>& values);
239  QList<QVariant> compositeIndexOpacitiesAsVariantList() const;
240 
241  void setSelectorOpacities(const QList<QVariant>& values);
242  QList<QVariant> selectorOpacitiesAsVariantList() const;
244 
245  void updateWidget(bool showing_advanced_properties) override;
246 
247 Q_SIGNALS:
248  void selectorsChanged();
249  void colorsChanged();
250  void opacitiesChanged();
251 
252 private Q_SLOTS:
253  void updateDataAssembly(vtkObject* sender);
254  void assemblyTreeModified(int role);
255  void selectorsTableModified();
256  void colorsTableModified();
257  void opacitiesTableModified();
258 
259 private: // NOLINT(readability-redundant-access-specifiers)
260  Q_DISABLE_COPY(pqDataAssemblyPropertyWidget);
261  class pqInternals;
262  QScopedPointer<pqInternals> Internals;
263 };
264 
265 #endif
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
virtual void updateWidget(bool showing_advanced_properties)
#define PQAPPLICATIONCOMPONENTS_EXPORT
superclass for all SM properties
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
pqPropertyWidget for properties with vtkDataAssembly