Polkit-Qt-1
0.95.0
|
Class used to hold and update a list of QAbstractButtons. More...
#include <ActionButtons>
Public Member Functions | |
ActionButtons (const QList< QAbstractButton *> &buttons, const QString &actionId=QString(), QObject *parent=0) | |
void | setButtons (const QList< QAbstractButton *> &buttons) |
QList< QAbstractButton * > | buttons () const |
void | addButton (QAbstractButton *button) |
void | removeButton (QAbstractButton *button) |
![]() | |
ActionButton (QAbstractButton *button, const QString &actionId=QString(), QObject *parent=0) | |
void | setButton (QAbstractButton *button) |
QAbstractButton * | button () const |
![]() | |
Action (const QString &actionId=QString(), QObject *parent=0) | |
void | setPolkitAction (const QString &actionId) |
QString | actionId () const |
void | setText (const QString &text, States states=All) |
void | setToolTip (const QString &toolTip, States states=All) |
void | setWhatsThis (const QString &whatsThis, States states=All) |
void | setIcon (const QIcon &icon, States states=All) |
void | setVisible (bool visible, States states=All) |
void | setEnabled (bool enabled, States states=All) |
void | setTargetPID (qint64 pid) |
QString | text (State state=None) const |
QString | toolTip (State state=None) const |
QString | whatsThis (State state=None) const |
QIcon | icon (State state=None) const |
bool | isVisible (State state=None) const |
bool | isEnabled (State state=None) const |
qint64 | targetPID () const |
bool | isAllowed () const |
bool | is (const QString &actionId) const |
Additional Inherited Members | |
![]() | |
enum | State { None = 0, SelfBlocked = 1, Yes = 2, No = 4, Auth = 8, All = 512 } |
![]() | |
bool | activate () |
![]() | |
bool | activate () |
void | setChecked (bool checked) |
void | revoke () |
![]() | |
void | clicked (QAbstractButton *button, bool checked=false) |
![]() | |
void | dataChanged () |
void | authorized () |
![]() | |
ActionButton (ActionButtonPrivate &dd, const QString &actionId, QObject *parent=0) | |
![]() | |
ActionButtonPrivate *const | d_ptr |
Class used to hold and update a list of QAbstractButtons.
This class is a convenience wrapper around ActionButton that lets you associate an undefined number of QAbstractButtons with a single action. Every button will be updated accordingly upon action's properties changes.
|
explicit |
Constructs a new ActionButton. You need to pass this constructor an existing list of QAbstractButtons, whose properties will be modified according to the underlying Action object. As ActionButtons inherits from Action, you can define your buttons' behavior right through this wrapper.
buttons | the QAbstractButton to associate to this ActionButton |
actionId | the action Id to create the underlying Action |
parent | the parent object |
void PolkitQt1::Gui::ActionButtons::addButton | ( | QAbstractButton * | button | ) |
Adds a button to the current button list. The button's properties will be updated according to the action upon adding.
button | the button to add |
QList< QAbstractButton * > PolkitQt1::Gui::ActionButtons::buttons | ( | ) | const |
Returns the current buttons list
void PolkitQt1::Gui::ActionButtons::removeButton | ( | QAbstractButton * | button | ) |
Removes a button from the current list. Please note that Polkit-Qt does not handle the removed button's memory, so you should take care of deleting it yourself (if needed).
button | the button to remove |
void PolkitQt1::Gui::ActionButtons::setButtons | ( | const QList< QAbstractButton *> & | buttons | ) |
Sets a list of buttons associated to the underlying action.
buttons | the new buttons associated with the underlying action |