pqMultiBlockPropertiesStateWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef pqMultiBlockPropertiesStateWidget_h
5 #define pqMultiBlockPropertiesStateWidget_h
6 
7 #include "pqComponentsModule.h"
8 
10 
11 #include <QList>
12 #include <QScopedPointer>
13 #include <QString>
14 #include <QWidget>
15 
16 #include <string>
17 #include <vector>
18 
20 class vtkSMProxy;
21 
32 {
33  Q_OBJECT
34 public:
35  typedef QWidget Superclass;
36 
37  pqMultiBlockPropertiesStateWidget(vtkSMProxy* repr, const QList<QString>& properties,
38  int iconSize, QString selector = QString(), QWidget* parent = nullptr,
39  Qt::WindowFlags f = Qt::WindowFlags());
41 
43 
47  BlockPropertyState getState() const;
48 
49  /*
50  * Get the Pixmap of the current state.
51  */
52  QPixmap getStatePixmap(BlockPropertyState state) const;
53 
57  QString getStateToolTip(BlockPropertyState state) const;
58 
62  pqHighlightableToolButton* getResetButton() const;
63 
67  std::vector<std::string> getProperties() const;
68 
72  std::vector<std::string> getSelectors() const;
73 
74 Q_SIGNALS:
75  void stateChanged(BlockPropertyState newState);
76  void selectedBlockSelectorsChanged();
77  void startStateReset();
78  void endStateReset();
79 
80 private Q_SLOTS:
81  void onSelectedBlockSelectorsChanged();
82  void onPropertiesChanged();
83  void onResetButtonClicked();
84 
85 private: // NOLINT(readability-redundant-access-specifiers)
86  Q_DISABLE_COPY(pqMultiBlockPropertiesStateWidget)
87 
88  void updateState();
89 
90  class pqInternals;
91  QScopedPointer<pqInternals> Internals;
92 };
93 
94 #endif // pqMultiBlockPropertiesStateWidget_h
A QWidget that tracks the state multi block property/ies, and allows to reset them.
#define PQCOMPONENTS_EXPORT
QToolButton with ability to highlight the button.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140