1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2008 Alexander Dymo <adymo@kdevelop.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KSHORTCUTSCHEMESHELPER_P_H
9#define KSHORTCUTSCHEMESHELPER_P_H
10
11#include <QString>
12
13class KActionCollection;
14class KXMLGUIClient;
15
16class KShortcutSchemesHelper
17{
18public:
19 /**
20 * Saves actions from these collections to the shortcut scheme file.
21 *
22 * This doesn't save anything for action collections without a parent xmlgui client.
23 *
24 * @return true if the shortcut scheme was successfully saved.
25 */
26 static bool saveShortcutScheme(const QList<KActionCollection *> &collections, const QString &schemeName);
27
28 /**
29 * @return the current shortcut scheme name for the application.
30 */
31 static QString currentShortcutSchemeName();
32
33 /**
34 * @return the name of the (writable) file to save the shortcut scheme to.
35 */
36 static QString writableShortcutSchemeFileName(const QString &componentName, const QString &schemeName);
37
38 /**
39 * @return the name of the scheme file for application itself.
40 */
41 static QString writableApplicationShortcutSchemeFileName(const QString &schemeName);
42
43 /**
44 * @return the name of the file to read the shortcut scheme from.
45 */
46 static QString shortcutSchemeFileName(const QString &componentName, const QString &schemeName);
47
48 /**
49 * @return the name of the scheme file for application itself, for reading.
50 */
51 static QString applicationShortcutSchemeFileName(const QString &schemeName);
52};
53
54#endif
55

source code of kxmlgui/src/kshortcutschemeshelper_p.h