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 
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 
36  virtual void preAccept();
37  virtual void postAccept();
38 
39 Q_SIGNALS:
43  void selectionChanged(pqSMProxy);
44 
45 protected Q_SLOTS:
46  // Copy active selection.
47  void copyActiveSelection();
48 
49  void onActiveSelectionChanged();
50 
51  void updateLabels();
52 
53 protected: // NOLINT(readability-redundant-access-specifiers)
55 
56 private:
57  Q_DISABLE_COPY(pqSelectionInputWidget)
58 
59  class pqUi;
60  pqUi* Ui;
61 };
62 
63 #endif
#define PQCOMPONENTS_EXPORT
virtual pqSMProxy selection()
pqSelectionInputWidget is a custom widget used for specifying the selection to use on filters that ha...