pqSelectionInputWidget.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 pqSelectionInputWidget_h
5 #define pqSelectionInputWidget_h
6 
7 #include "pqComponentsModule.h"
8 #include <QWidget>
9 
10 #include "pqSMProxy.h" // For property.
11 
16 class PQCOMPONENTS_EXPORT pqSelectionInputWidget : public QWidget
17 {
18  Q_OBJECT
19  Q_PROPERTY(pqSMProxy selection READ selection WRITE setSelection USER true)
20  typedef QWidget Superclass;
21 
22 public:
23  pqSelectionInputWidget(QWidget* parent = nullptr);
24  ~pqSelectionInputWidget() override;
25 
26  virtual pqSMProxy selection() { return this->AppendSelections; }
27 
28 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
29  virtual void setSelection(pqSMProxy newAppendSelections);
30 
32 
38  virtual void preAccept();
39  virtual void postAccept();
41 
42 Q_SIGNALS:
46  void selectionChanged(pqSMProxy);
47 
48 protected Q_SLOTS:
49  // Copy active selection.
50  void copyActiveSelection();
51 
52  void onActiveSelectionChanged();
53 
54  void updateLabels();
55 
56 protected: // NOLINT(readability-redundant-access-specifiers)
58 
59 private:
60  Q_DISABLE_COPY(pqSelectionInputWidget)
61 
62  class pqUi;
63  pqUi* Ui;
64 };
65 
66 #endif
virtual pqSMProxy selection()
pqSelectionInputWidget is a custom widget used for specifying the selection to use on filters that ha...