Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_input_profile_manager.h
Go to the documentation of this file.
1/*
2 * This file is part of the KDE project
3 * SPDX-FileCopyrightText: 2013 Arjen Hiemstra <ahiemstra@heimr.nl>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef KISINPUTPROFILEMANAGER_H
9#define KISINPUTPROFILEMANAGER_H
10
11#include <QObject>
12
13#include "kritaui_export.h"
14
15#define PROFILE_VERSION 7
16
18class KisInputProfile;
20struct ProfileEntry;
21
27class KRITAUI_EXPORT KisInputProfileManager : public QObject
28{
29 Q_OBJECT
30public:
31 KisInputProfileManager(QObject *parent = 0);
32 ~KisInputProfileManager() override;
33 Q_DISABLE_COPY(KisInputProfileManager)
34
35
42 KisInputProfile *profile(const QString &name) const;
50 QStringList profileNames() const;
51
61 void setCurrentProfile(KisInputProfile *profile);
62
70 KisInputProfile *addProfile(const QString &name);
78 void removeProfile(const QString &name);
87 bool renameProfile(const QString &oldName, const QString &newName);
97 void duplicateProfile(const QString &name, const QString &newName);
98
103
107 void loadProfiles();
111 void saveProfiles();
112
116 void saveProfile(KisInputProfile *profile, QString storagePath);
117
121 QList<KisShortcutConfiguration *> getConflictingShortcuts(KisInputProfile *profile);
122
128 void resetAll();
129
134
135Q_SIGNALS:
144
145private:
146 friend class KisInputProfileManagerTest;
147
151 KisInputProfile* loadProfileInternal(const QString &fullPath);
152
159 KisInputProfile* loadProfileWithMigration(const ProfileEntry &profileEntry);
160
161private:
162 class Private;
163 Private *const d;
164};
165
166#endif // KISINPUTPROFILEMANAGER_H
PythonPluginManager * instance
Abstract base class for input actions.
A class to manage a list of profiles and actions.
QList< KisAbstractInputAction * > actions()
QList< KisInputProfile * > profiles() const
KisInputProfile * currentProfile() const
A container class for sets of shortcuts associated with an action.
A class encapsulating all settings for a single shortcut.