pqDeleteReaction.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 pqDeleteReaction_h
5 #define pqDeleteReaction_h
6 
7 #include "pqReaction.h"
8 
9 class pqPipelineSource;
10 class pqProxy;
11 
17 {
18  Q_OBJECT
19  typedef pqReaction Superclass;
20 
21 public:
23  {
25  ALL,
26  TREE
27  };
32  pqDeleteReaction(QAction* parent, DeleteModes mode = SELECTED);
33 
34  static void deleteAll();
35  static void deleteSelected();
36  static bool canDeleteSelected();
37  static void deleteTree();
38  static bool canDeleteTree();
39 
48  static void deleteSources(const QSet<pqProxy*>& sources);
49 
50 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
54  void updateEnableState() override;
55 
59  void deleteSource(pqProxy* source);
60 
61 protected:
65  void onTriggered() override;
66 
67 private:
68  Q_DISABLE_COPY(pqDeleteReaction)
69  DeleteModes DeleteMode;
70 
75  static void aboutToDelete(pqProxy* source);
76 };
77 
78 #endif
virtual void updateEnableState()
Definition: pqReaction.h:48
#define PQAPPLICATIONCOMPONENTS_EXPORT
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
Reaction for delete sources (all or selected only).
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:28
PQ representation for a vtkSMProxy that can be involved in a pipeline.
virtual void onTriggered()
Called when the action is triggered.
Definition: pqReaction.h:46