SessionManagement
#include <sessionmanagement.h>

Public Types | |
| enum class | ConfirmationMode { Default = -1 , Skip = 0 , ForcePrompt = 1 } |
| enum class | State { Loading , Ready , Error } |
Properties | |
| bool | canHibernate |
| bool | canLock |
| bool | canLogout |
| bool | canReboot |
| bool | canSaveSession |
| bool | canShutdown |
| bool | canSuspend |
| bool | canSuspendThenHibernate |
| bool | canSwitchUser |
| State | state |
Properties inherited from QObject | |
| objectName | |
Public Slots | |
| void | hibernate () |
| void | hybridSuspend () |
| void | lock () |
| void | requestLogout (ConfirmationMode=ConfirmationMode::Default) |
| void | requestLogoutPrompt () |
| void | requestReboot (ConfirmationMode=ConfirmationMode::Default) |
| void | requestShutdown (ConfirmationMode=ConfirmationMode::Default) |
| void | saveSession () |
| void | suspend () |
| void | suspendThenHibernate () |
| void | switchUser () |
Public Member Functions | |
| SessionManagement (QObject *parent=nullptr) | |
| bool | canHibernate () const |
| bool | canHybridSuspend () const |
| bool | canLock () const |
| bool | canLogout () const |
| bool | canReboot () const |
| bool | canSaveSession () const |
| bool | canShutdown () const |
| bool | canSuspend () const |
| bool | canSuspendThenHibernate () const |
| bool | canSwitchUser () const |
| State | state () const |
Public Member Functions inherited from QObject | |
| QObject (QObject *parent) | |
| QBindable< QString > | bindableObjectName () |
| bool | blockSignals (bool block) |
| const QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const const |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| T | 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 QMetaObject * | metaObject () const const |
| void | moveToThread (QThread *targetThread) |
| QString | objectName () const const |
| void | objectNameChanged (const QString &objectName) |
| QObject * | parent () 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 | |
| T | qobject_cast (const QObject *object) |
| T | 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) |
| QThread * | thread () const const |
Additional Inherited Members | |
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 QObject | |
| typedef | QObjectList |
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 |
| QObject * | sender () const const |
| int | senderSignalIndex () const const |
| virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
Public facing API for SessionManagement.
Definition at line 15 of file sessionmanagement.h.
Member Enumeration Documentation
◆ ConfirmationMode
|
strong |
| Enumerator | |
|---|---|
| Default | Obey the user's confirmation setting. |
| Skip | Don't confirm, shutdown without asking. |
| ForcePrompt | Always confirm, ask even if the user turned it off. |
Definition at line 47 of file sessionmanagement.h.
◆ State
|
strong |
| Enumerator | |
|---|---|
| Loading | The backend is loading canXyz functions may not represent the true state. |
| Ready | All loaded. |
| Error | Error creating a suitable backend, no actions will be available. |
Definition at line 31 of file sessionmanagement.h.
Property Documentation
◆ canHibernate
|
read |
Definition at line 24 of file sessionmanagement.h.
◆ canLock
|
read |
Definition at line 27 of file sessionmanagement.h.
◆ canLogout
|
read |
Definition at line 22 of file sessionmanagement.h.
◆ canReboot
|
read |
Definition at line 21 of file sessionmanagement.h.
◆ canSaveSession
|
read |
Definition at line 28 of file sessionmanagement.h.
◆ canShutdown
|
read |
Definition at line 20 of file sessionmanagement.h.
◆ canSuspend
|
read |
Definition at line 23 of file sessionmanagement.h.
◆ canSuspendThenHibernate
|
read |
Definition at line 25 of file sessionmanagement.h.
◆ canSwitchUser
|
read |
Definition at line 26 of file sessionmanagement.h.
◆ state
|
read |
Definition at line 18 of file sessionmanagement.h.
Constructor & Destructor Documentation
◆ SessionManagement()
|
explicit |
Definition at line 64 of file sessionmanagement.cpp.
Member Function Documentation
◆ canHibernate()
| bool SessionManagement::canHibernate | ( | ) | const |
Definition at line 113 of file sessionmanagement.cpp.
◆ canHybridSuspend()
| bool SessionManagement::canHybridSuspend | ( | ) | const |
Definition at line 108 of file sessionmanagement.cpp.
◆ canLock()
| bool SessionManagement::canLock | ( | ) | const |
Definition at line 128 of file sessionmanagement.cpp.
◆ canLogout()
| bool SessionManagement::canLogout | ( | ) | const |
Definition at line 96 of file sessionmanagement.cpp.
◆ canReboot()
| bool SessionManagement::canReboot | ( | ) | const |
Definition at line 91 of file sessionmanagement.cpp.
◆ canSaveSession()
| bool SessionManagement::canSaveSession | ( | ) | const |
Definition at line 133 of file sessionmanagement.cpp.
◆ canShutdown()
| bool SessionManagement::canShutdown | ( | ) | const |
Definition at line 86 of file sessionmanagement.cpp.
◆ canSuspend()
| bool SessionManagement::canSuspend | ( | ) | const |
Definition at line 103 of file sessionmanagement.cpp.
◆ canSuspendThenHibernate()
| bool SessionManagement::canSuspendThenHibernate | ( | ) | const |
Definition at line 118 of file sessionmanagement.cpp.
◆ canSwitchUser()
| bool SessionManagement::canSwitchUser | ( | ) | const |
Definition at line 123 of file sessionmanagement.cpp.
◆ hibernate
|
slot |
Definition at line 241 of file sessionmanagement.cpp.
◆ hybridSuspend
|
slot |
Definition at line 233 of file sessionmanagement.cpp.
◆ lock
|
slot |
Definition at line 257 of file sessionmanagement.cpp.
◆ requestLogout
|
slot |
Definition at line 207 of file sessionmanagement.cpp.
◆ requestLogoutPrompt
|
slot |
...And this one will always show the prompt with all options, irrespective of whether it's ordinarily configured to appear or not
Definition at line 144 of file sessionmanagement.cpp.
◆ requestReboot
|
slot |
Definition at line 183 of file sessionmanagement.cpp.
◆ requestShutdown
|
slot |
These requestX methods will either launch a prompt to shutdown or The user may cancel it at any point in the process.
Definition at line 158 of file sessionmanagement.cpp.
◆ saveSession
|
slot |
Definition at line 300 of file sessionmanagement.cpp.
◆ state()
| SessionManagement::State SessionManagement::state | ( | ) | const |
Definition at line 139 of file sessionmanagement.cpp.
◆ suspend
|
slot |
Definition at line 225 of file sessionmanagement.cpp.
◆ suspendThenHibernate
|
slot |
Definition at line 249 of file sessionmanagement.cpp.
◆ switchUser
|
slot |
Definition at line 266 of file sessionmanagement.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:59:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
Properties inherited from