pqAddToFavoritesReaction.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 pqAddToFavoritesReaction_h
5 #define pqAddToFavoritesReaction_h
6 
7 #include "pqReaction.h"
8 
9 #include "vtkParaViewDeprecation.h" // for deprecation macro
10 
11 #include <memory>
12 
13 class pqProxyCategory;
15 
21 {
22  Q_OBJECT
23  typedef pqReaction Superclass;
24 
25 public:
26  PARAVIEW_DEPRECATED_IN_5_13_0("Favorites are integrated into the categories. Please initialize "
27  "from a pqProxyCategory instead.")
28  pqAddToFavoritesReaction(QAction* parent, QVector<QString>& filters);
29 
30  pqAddToFavoritesReaction(QAction* parent, pqProxyGroupMenuManager* manager);
31 
32  ~pqAddToFavoritesReaction() override;
33 
37  static void addToFavorites(QAction* parent);
38 
39 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
44  void updateEnableState() override;
45 
46 protected:
50  void onTriggered() override { this->addActiveSourceToFavorites(); }
51 
52 private:
53  Q_DISABLE_COPY(pqAddToFavoritesReaction)
54 
55  void addActiveSourceToFavorites();
56 
57  struct pqInternal;
58  std::unique_ptr<pqInternal> Internal;
59 };
60 
61 #endif
pqProxyGroupMenuManager is a menu-populator that fills up a menu with proxies defined in an XML confi...
virtual void updateEnableState()
Definition: pqReaction.h:48
Reaction to add selected filter in favorites.
#define PQAPPLICATIONCOMPONENTS_EXPORT
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
#define PARAVIEW_DEPRECATED_IN_5_13_0(reason)
void onTriggered() override
Called when the action is triggered.
The pqProxyCategory class reads and writes XML that describes the proxies organisation into categorie...