Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_action_registry.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Michael Abrahams <miabraha@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7#ifndef KIS_ACTION_REGISTRY_H
8#define KIS_ACTION_REGISTRY_H
9
10#include <QString>
11#include <QKeySequence>
12#include <QDomElement>
13#include <QAction>
14#include <QList>
15
16#include "kritawidgetutils_export.h"
17
18
20class QDomElement;
21class KConfigBase;
23
45class KRITAWIDGETUTILS_EXPORT KisActionRegistry : public QObject
46{
47 Q_OBJECT
48
49public:
51
55 bool hasAction(const QString &name) const;
56
57
63 QString getActionProperty(const QString &name, const QString &property);
64
70 QAction *makeQAction(const QString &name, QObject *parent = 0);
71
77 bool propertizeAction(const QString &name, QAction *a);
78
82 void settingsPageSaved();
83
87 void loadCustomShortcuts();
88
92 void notifySettingsUpdated();
93
94 // If config == 0, reload defaults
95 void applyShortcutScheme(const KConfigBase *config = 0);
96
99 ActionCategory(const QString &_componentName, const QString &_categoryName);
102
103 bool isValid() const;
104
105 private:
106 bool m_isValid = false;
107 };
108
109 ActionCategory fetchActionCategory(const QString &name) const;
110
116
121 void loadShortcutScheme(const QString &schemeName);
122
123 // Undocumented
124 void updateShortcut(const QString &name, QAction *ac);
125
126 bool sanityCheckPropertized(const QString &name);
127
128 QList<QString> registeredShortcutIds() const;
129
130Q_SIGNALS:
132
133private:
134
135 class Private;
136 const QScopedPointer<Private> d;
137};
138
139#endif /* KIS_ACTION_REGISTRY_H */
PythonPluginManager * instance
const QScopedPointer< Private > d
A container for a set of QAction objects.