| 1 | // SPDX-FileCopyrightText: 2024 Carl Schwan <carl@carlschwan.eu> |
| 2 | // SPDX-License-Identifier: LGPL-2.1-or-later |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include <QAction> |
| 7 | #include <QtQml/qqmlregistration.h> |
| 8 | |
| 9 | /// \internal This is private API, do not use. |
| 10 | class ActionHelper : public QObject |
| 11 | { |
| 12 | Q_OBJECT |
| 13 | QML_ELEMENT |
| 14 | QML_SINGLETON |
| 15 | |
| 16 | public: |
| 17 | explicit ActionHelper(QObject *parent = nullptr); |
| 18 | |
| 19 | Q_INVOKABLE QList<QKeySequence> alternateShortcuts(QAction *action) const; |
| 20 | Q_INVOKABLE QString iconName(const QIcon &icon) const; |
| 21 | }; |
| 22 | |