pqStringVectorPropertyWidget.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 pqStringVectorPropertyWidget_h
6 #define pqStringVectorPropertyWidget_h
7 
8 #include "pqPropertyLinks.h"
9 #include "pqPropertyWidget.h"
10 
12 class PQCOMPONENTS_EXPORT pqStringVectorPropertyWidget : public pqPropertyWidget
13 {
14  Q_OBJECT
15  using Superclass = pqPropertyWidget;
16 
17 public:
19  vtkSMProperty* property, vtkSMProxy* proxy, QWidget* parent = nullptr);
20  ~pqStringVectorPropertyWidget() override;
21 
26  static pqPropertyWidget* createWidget(
27  vtkSMStringVectorProperty* smproperty, vtkSMProxy* smproxy, QWidget* parent = nullptr);
28 
32  static void processFileChooserHints(vtkPVXMLElement* hints, bool& directoryMode, bool& anyFile,
33  QString& filter, bool& browseLocalFileSystem);
34 
35  void setReadOnly(bool readOnly) override;
36 
37 private Q_SLOTS:
41  void showWarningOnChange();
42 
43 private: // NOLINT(readability-redundant-access-specifiers)
44  Q_DISABLE_COPY(pqStringVectorPropertyWidget);
45 
46  bool widgetHintHasAttributeEqualTo(const std::string& attribute, const std::string& value);
47 
48  vtkPVXMLElement* WidgetHint = nullptr;
49  vtkPVXMLElement* WarnOnChangeHint = nullptr;
50  bool WarningTriggered = false;
51 };
52 
53 #endif // pqStringVectorPropertyWidget_h
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
property representing a vector of strings
superclass for all SM properties
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
value
virtual void setReadOnly(bool readOnly)
Set widget in read-only mode.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
pqPropertyWidget(vtkSMProxy *proxy, QWidget *parent=nullptr)