Kirigami2

actionhelper.cpp
1// SPDX-FileCopyrightText: 2024 Carl Schwan <carl@carlschwan.eu>
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#include "actionhelper.h"
5
6ActionHelper::ActionHelper(QObject *parent)
7 : QObject(parent)
8{
9}
10
11QString ActionHelper::iconName(const QIcon &icon) const
12{
13 return icon.name();
14}
15
16QList<QKeySequence> ActionHelper::alternateShortcuts(QAction *action) const
17{
18 if (!action || action->shortcuts().length() <= 1) {
19 return {};
20 } else {
21 return action->shortcuts().mid(1);
22 }
23}
QList< QKeySequence > shortcuts() const const
QString name() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:58:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.