File indexing completed on 2024-04-14 04:38:32

0001 /*
0002     This file is part of the Polkit-qt project
0003     SPDX-FileCopyrightText: 2009 Dario Freddi <drf@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #include "polkitqt1-gui-actionbuttons.h"
0009 
0010 #include "polkitqt1-gui-actionbuttons_p.h"
0011 
0012 namespace PolkitQt1
0013 {
0014 
0015 namespace Gui
0016 {
0017 
0018 ActionButtons::ActionButtons(const QList<QAbstractButton *> &buttons, const QString &actionId, QObject *parent)
0019         : ActionButton(*new ActionButtonsPrivate(buttons), actionId, parent)
0020 {
0021     setButtons(buttons);
0022 }
0023 
0024 ActionButtons::~ActionButtons()
0025 {
0026 }
0027 
0028 void ActionButtons::setButtons(const QList<QAbstractButton *> &buttons)
0029 {
0030     Q_FOREACH(QAbstractButton *ent, buttons) {
0031         addButton(ent);
0032     }
0033 }
0034 
0035 QList<QAbstractButton *> ActionButtons::buttons() const
0036 {
0037     Q_D(const ActionButtons);
0038 
0039     return d->buttons;
0040 }
0041 
0042 void ActionButtons::addButton(QAbstractButton *button)
0043 {
0044     Q_D(ActionButtons);
0045 
0046     d->addButton(button);
0047 }
0048 
0049 void ActionButtons::removeButton(QAbstractButton *button)
0050 {
0051     Q_D(ActionButtons);
0052 
0053     d->removeButton(button);
0054 }
0055 
0056 }
0057 
0058 }