blob: 10502c341b05519e97bc20b46a03871d50683712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*
* SPDX-FileCopyrightText: 2026 Albert Mkhitaryan <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef SERVICEMENUSHORTCUTMANAGER_H
#define SERVICEMENUSHORTCUTMANAGER_H
#include <QObject>
#include <QStringList>
class KActionCategory;
class KActionCollection;
class KFileItemActions;
class KXMLGUIClient;
/**
* @brief Registers service menu actions with KActionCollection for keyboard shortcuts.
*
* This lightweight manager bridges KIO's service menu actions with Dolphin's
* shortcut system. Actions are obtained from KFileItemActions and registered
* with the action collection. Execution is handled entirely by KFileItemActions.
*
*/
class ServiceMenuShortcutManager : public QObject
{
Q_OBJECT
public:
explicit ServiceMenuShortcutManager(KActionCollection *actionCollection, QObject *parent = nullptr);
void refresh(KFileItemActions *fileItemaActions);
void cleanupStaleShortcuts(KXMLGUIClient *client);
private:
KActionCollection *m_actionCollection;
KActionCategory *m_category;
QStringList m_actionNames;
};
#endif // SERVICEMENUSHORTCUTMANAGER_H
|