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 
20 class PQAPPLICATIONCOMPONENTS_EXPORT pqAddToFavoritesReaction : public pqReaction
21 {
22  Q_OBJECT
23  typedef pqReaction Superclass;
24 
25 public:
26  pqAddToFavoritesReaction(QAction* parent, pqProxyGroupMenuManager* manager);
27 
28  ~pqAddToFavoritesReaction() override;
29 
33  static void addToFavorites(QAction* parent);
34 
35 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
40  void updateEnableState() override;
41 
42 protected:
46  void onTriggered() override { this->addActiveSourceToFavorites(); }
47 
48 private:
49  Q_DISABLE_COPY(pqAddToFavoritesReaction)
50 
51  void addActiveSourceToFavorites();
52 
53  struct pqInternal;
54  std::unique_ptr<pqInternal> Internal;
55 };
56 
57 #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.
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
void onTriggered() override
Called when the action is triggered.
The pqProxyCategory class reads and writes XML that describes the proxies organisation into categorie...