pqKeySequences.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 pqKeySequences_h
5 #define pqKeySequences_h
6 
7 #include "pqProxy.h"
8 #include <QWidget>
9 
10 class QAction;
11 class pqModalShortcut;
12 
25 class PQCORE_EXPORT pqKeySequences : public QObject
26 {
27  Q_OBJECT
28 public:
29  static pqKeySequences& instance();
30 
34  pqModalShortcut* active(const QKeySequence& keySequence) const;
35 
40  pqModalShortcut* addModalShortcut(
41  const QKeySequence& keySequence, QAction* action, QWidget* parent);
42 
55  void reorder(pqModalShortcut* target);
56 
60  void dumpShortcuts(const QKeySequence& keySequence) const;
61 
62 protected Q_SLOTS:
66  virtual void disableSiblings();
70  virtual void enableNextSibling();
74  virtual void removeModalShortcut();
75 
76 protected: // NOLINT(readability-redundant-access-specifiers)
77  pqKeySequences(QObject* parent);
78  ~pqKeySequences() override = default;
79 
80  bool m_silence; // Set true in slot implementations to avoid signal/slot recursion.
81 };
82 
83 #endif
boost::graph_traits< vtkGraph *>::vertex_descriptor target(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
Manage an action and/or widget&#39;s responsivity to a shortcut.
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
Manage key sequences used for shortcuts.