Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_abstract_shortcut.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2012 Arjen Hiemstra <ahiemstra@heimr.nl>
3 * SPDX-FileCopyrightText: 2012 Dmitry Kazakov <dimula73@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef __KIS_ABSTRACT_SHORTCUT_H
9#define __KIS_ABSTRACT_SHORTCUT_H
10
11#include <Qt>
12#include <QSet>
13#include <kritaui_export.h>
14#include "KisInputActionGroup.h"
15
17
18
19class KRITAUI_EXPORT KisAbstractShortcut
20{
21public:
23 virtual ~KisAbstractShortcut();
24
29 virtual int priority() const = 0;
30
35
39 void setAction(KisAbstractInputAction *action);
40
46 int shortcutIndex() const;
47
51 bool isAvailable(KisInputActionGroupsMask mask) const;
52
53protected:
54 bool compareKeys(const QSet<Qt::Key> &keys1,
55 const QSet<Qt::Key> &keys2);
56
57private:
58 class Private;
59 Private * const m_d;
60};
61
62#endif /* __KIS_ABSTRACT_SHORTCUT_H */
Abstract base class for input actions.
virtual int priority() const =0
KisAbstractInputAction * action() const
int shortcutIndex() const