PolkitQt1::Gui::ActionButtons

Search for usage in LXR

PolkitQt1::Gui::ActionButtons Class Reference

#include <ActionButtons>

Inheritance diagram for PolkitQt1::Gui::ActionButtons:

Public Member Functions

 ActionButtons (const QList< QAbstractButton * > &buttons, const QString &actionId=QString(), QObject *parent=nullptr)
 
void addButton (QAbstractButton *button)
 
QList< QAbstractButton * > buttons () const
 
void removeButton (QAbstractButton *button)
 
void setButtons (const QList< QAbstractButton * > &buttons)
 
- Public Member Functions inherited from PolkitQt1::Gui::ActionButton
 ActionButton (QAbstractButton *button, const QString &actionId=QString(), QObject *parent=nullptr)
 
QAbstractButtonbutton () const
 
void setButton (QAbstractButton *button)
 
- Public Member Functions inherited from PolkitQt1::Gui::Action
 Action (const QString &actionId=QString(), QObject *parent=nullptr)
 
QString actionId () const
 
QIcon icon (State state=None) const
 
bool is (const QString &actionId) const
 
bool isAllowed () const
 
bool isEnabled (State state=None) const
 
bool isVisible (State state=None) const
 
void setEnabled (bool enabled, States states=All)
 
void setIcon (const QIcon &icon, States states=All)
 
void setPolkitAction (const QString &actionId)
 
void setTargetPID (qint64 pid)
 
void setText (const QString &text, States states=All)
 
void setToolTip (const QString &toolTip, States states=All)
 
void setVisible (bool visible, States states=All)
 
void setWhatsThis (const QString &whatsThis, States states=All)
 
qint64 targetPID () const
 
QString text (State state=None) const
 
QString toolTip (State state=None) const
 
QString whatsThis (State state=None) const
 
- Public Member Functions inherited from QAction
 QAction (const QIcon &icon, const QString &text, QObject *parent)
 
 QAction (const QString &text, QObject *parent)
 
 QAction (QObject *parent)
 
QActionGroupactionGroup () const const
 
void activate (ActionEvent event)
 
QList< QGraphicsWidget * > associatedGraphicsWidgets () const const
 
QList< QObject * > associatedObjects () const const
 
QList< QWidget * > associatedWidgets () const const
 
bool autoRepeat () const const
 
void changed ()
 
void checkableChanged (bool checkable)
 
QVariant data () const const
 
void enabledChanged (bool enabled)
 
QFont font () const const
 
void hover ()
 
void hovered ()
 
QIcon icon () const const
 
QString iconText () const const
 
bool isCheckable () const const
 
bool isChecked () const const
 
bool isEnabled () const const
 
bool isIconVisibleInMenu () const const
 
bool isSeparator () const const
 
bool isShortcutVisibleInContextMenu () const const
 
bool isVisible () const const
 
QMenumenu () const const
 
MenuRole menuRole () const const
 
QWidgetparentWidget () const const
 
Priority priority () const const
 
void resetEnabled ()
 
void setActionGroup (QActionGroup *group)
 
void setAutoRepeat (bool)
 
void setCheckable (bool)
 
void setChecked (bool)
 
void setData (const QVariant &data)
 
void setDisabled (bool b)
 
void setEnabled (bool)
 
void setFont (const QFont &font)
 
void setIcon (const QIcon &icon)
 
void setIconText (const QString &text)
 
void setIconVisibleInMenu (bool visible)
 
void setMenu (QMenu *menu)
 
void setMenuRole (MenuRole menuRole)
 
void setPriority (Priority priority)
 
void setSeparator (bool b)
 
void setShortcut (const QKeySequence &shortcut)
 
void setShortcutContext (Qt::ShortcutContext context)
 
void setShortcuts (const QList< QKeySequence > &shortcuts)
 
void setShortcuts (QKeySequence::StandardKey key)
 
void setShortcutVisibleInContextMenu (bool show)
 
void setStatusTip (const QString &statusTip)
 
void setText (const QString &text)
 
void setToolTip (const QString &tip)
 
void setVisible (bool)
 
void setWhatsThis (const QString &what)
 
QKeySequence shortcut () const const
 
Qt::ShortcutContext shortcutContext () const const
 
QList< QKeySequenceshortcuts () const const
 
bool showStatusText (QObject *object)
 
QString statusTip () const const
 
QString text () const const
 
void toggle ()
 
void toggled (bool checked)
 
QString toolTip () const const
 
void trigger ()
 
void triggered (bool checked)
 
void visibleChanged ()
 
QString whatsThis () const const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Public Types inherited from PolkitQt1::Gui::Action
enum  State {
  None = 0 , SelfBlocked = 1 , Yes = 2 , No = 4 ,
  Auth = 8 , All = 512
}
 
typedef QFlags< StateStates
 
- Public Types inherited from QAction
enum  ActionEvent
 
enum  MenuRole
 
enum  Priority
 
- Public Types inherited from QObject
typedef  QObjectList
 
- Properties inherited from QAction
 autoRepeat
 
 checkable
 
 checked
 
 enabled
 
 font
 
 icon
 
 iconText
 
 iconVisibleInMenu
 
 menuRole
 
 priority
 
 shortcut
 
 shortcutContext
 
 shortcutVisibleInContextMenu
 
 statusTip
 
 text
 
 toolTip
 
 visible
 
 whatsThis
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from PolkitQt1::Gui::ActionButton
void clicked (QAbstractButton *button, bool checked=false)
 
- Signals inherited from PolkitQt1::Gui::Action
void authorized ()
 
void dataChanged ()
 
- Public Slots inherited from PolkitQt1::Gui::ActionButton
bool activate ()
 
- Public Slots inherited from PolkitQt1::Gui::Action
bool activate ()
 
void revoke ()
 
void setChecked (bool checked)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QAction
 AboutQtRole
 
 AboutRole
 
 ApplicationSpecificRole
 
 HighPriority
 
 Hover
 
 LowPriority
 
 NormalPriority
 
 NoRole
 
 PreferencesRole
 
 QuitRole
 
 TextHeuristicRole
 
 Trigger
 
- Protected Member Functions inherited from PolkitQt1::Gui::ActionButton
 ActionButton (ActionButtonPrivate &dd, const QString &actionId, QObject *parent=nullptr)
 
- Protected Member Functions inherited from QAction
virtual bool event (QEvent *e) override
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Attributes inherited from PolkitQt1::Gui::ActionButton
ActionButtonPrivate *const d_ptr
 

Detailed Description

Class used to hold and update a list of QAbstractButtons.

Author
Dario Freddi drf@k.nosp@m.de.o.nosp@m.rg

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.

See also
ActionButton

Definition at line 33 of file polkitqt1-gui-actionbuttons.h.

Constructor & Destructor Documentation

◆ ActionButtons()

PolkitQt1::Gui::ActionButtons::ActionButtons ( const QList< QAbstractButton * > & buttons,
const QString & actionId = QString(),
QObject * parent = nullptr )
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.

See also
Action
Parameters
buttonsthe QAbstractButton to associate to this ActionButton
actionIdthe action Id to create the underlying Action
parentthe parent object

Definition at line 18 of file polkitqt1-gui-actionbuttons.cpp.

◆ ~ActionButtons()

PolkitQt1::Gui::ActionButtons::~ActionButtons ( )
override

Definition at line 24 of file polkitqt1-gui-actionbuttons.cpp.

Member Function Documentation

◆ addButton()

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.

Parameters
buttonthe button to add

Definition at line 42 of file polkitqt1-gui-actionbuttons.cpp.

◆ buttons()

QList< QAbstractButton * > PolkitQt1::Gui::ActionButtons::buttons ( ) const

Returns the current buttons list.

Returns
the buttons currently associated with the underlying action

Definition at line 35 of file polkitqt1-gui-actionbuttons.cpp.

◆ removeButton()

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).

Parameters
buttonthe button to remove

Definition at line 49 of file polkitqt1-gui-actionbuttons.cpp.

◆ setButtons()

void PolkitQt1::Gui::ActionButtons::setButtons ( const QList< QAbstractButton * > & buttons)

Sets a list of buttons associated to the underlying action.

Note
If you are calling this function, you're probably changing the buttons list the action is referring to. If this is the case, please note that Polkit-Qt does not handle the previous buttons' memory, so you should take care of deleting them yourself (if needed). You can retrieve it by using buttons()
See also
buttons
Parameters
buttonsthe new buttons associated with the underlying action

Definition at line 28 of file polkitqt1-gui-actionbuttons.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 15 2024 11:56:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.