PolkitQt-1

polkitqt1-gui-actionbuttons.cpp
1/*
2 This file is part of the Polkit-qt project
3 SPDX-FileCopyrightText: 2009 Dario Freddi <drf@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#include "polkitqt1-gui-actionbuttons.h"
9
10#include "polkitqt1-gui-actionbuttons_p.h"
11
12namespace PolkitQt1
13{
14
15namespace Gui
16{
17
19 : ActionButton(*new ActionButtonsPrivate(buttons), actionId, parent)
20{
22}
23
24ActionButtons::~ActionButtons()
25{
26}
27
29{
30 Q_FOREACH(QAbstractButton *ent, buttons) {
31 addButton(ent);
32 }
33}
34
36{
37 Q_D(const ActionButtons);
38
39 return d->buttons;
40}
41
43{
45
46 d->addButton(button);
47}
48
50{
52
53 d->removeButton(button);
54}
55
56}
57
58}
Class used to hold and update a QAbstractButton.
QAbstractButton * button() const
Returns the current button.
Class used to hold and update a list of QAbstractButtons.
QList< QAbstractButton * > buttons() const
Returns the current buttons list.
void addButton(QAbstractButton *button)
Adds a button to the current button list.
void removeButton(QAbstractButton *button)
Removes a button from the current list.
void setButtons(const QList< QAbstractButton * > &buttons)
Sets a list of buttons associated to the underlying action.
ActionButtons(const QList< QAbstractButton * > &buttons, const QString &actionId=QString(), QObject *parent=nullptr)
Constructs a new ActionButton.
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:16:56 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.