Libplasma
10IconGroup::IconGroup(ActionExtension *parent)
12 , m_action(parent->action())
16IconGroup::~IconGroup()
20void IconGroup::setName(
const QString &name)
36void IconGroup::setIcon(
const QIcon &icon)
38 m_action->setIcon(icon);
42QIcon IconGroup::icon()
const
44 return m_action->icon();
47ActionExtension::ActionExtension(
QObject *parent)
49 , m_action(qobject_cast<
QAction *>(parent))
50 , m_iconGroup(new IconGroup(this))
54ActionExtension::~ActionExtension()
58bool ActionExtension::isSeparator()
const
60 return m_action->isSeparator();
63void ActionExtension::setSeparator(
bool separator)
65 if (separator == m_action->isSeparator()) {
69 m_action->setSeparator(separator);
71 Q_EMIT isSeparatorChanged();
76 if (group == m_action->actionGroup()) {
80 m_action->setActionGroup(group);
81 Q_EMIT actionGroupChanged();
86 return m_action->actionGroup();
96QVariant ActionExtension::shortcut()
const
98 return m_action->shortcut();
101void ActionExtension::setShortcut(
const QVariant &var)
103 const QKeySequence seq = variantToKeySequence(var);
104 if (seq == m_action->shortcut()) {
107 m_action->setShortcut(seq);
111void ActionExtension::setMenu(
QMenu *menu)
113 if (menu == m_action->menu()) {
117 m_action->setMenu(menu);
121QMenu *ActionExtension::menu()
123 return m_action->menu();
126QAction *ActionExtension::action()
const
131#include "moc_action.cpp"
QIcon fromTheme(const QString &name)
QKeySequence fromString(const QString &str, SequenceFormat format)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:48:23 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.