PolkitQt-1

polkitqt1-gui-actionbuttons.cpp
1 /*
2  This file is part of the Polkit-qt project
3  SPDX-FileCopyrightText: 2009 Dario Freddi <[email protected]>
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 
12 namespace PolkitQt1
13 {
14 
15 namespace Gui
16 {
17 
18 ActionButtons::ActionButtons(const QList<QAbstractButton *> &buttons, const QString &actionId, QObject *parent)
19  : ActionButton(*new ActionButtonsPrivate(buttons), actionId, parent)
20 {
22 }
23 
24 ActionButtons::~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 }
QAbstractButton * button() const
Returns the current button.
QList< QAbstractButton * > buttons() const
Returns the current buttons list.
Class used to hold and update a QAbstractButton.
Class used to hold and update a list of QAbstractButtons.
void setButtons(const QList< QAbstractButton * > &buttons)
Sets a list of buttons associated to the underlying action.
void removeButton(QAbstractButton *button)
Removes a button from the current list.
ActionButtons(const QList< QAbstractButton * > &buttons, const QString &actionId=QString(), QObject *parent=nullptr)
Constructs a new ActionButton.
Namespace wrapping Polkit-Qt classes.
void addButton(QAbstractButton *button)
Adds a button to the current button list.
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Jun 26 2022 04:06:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.