Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsessionmanager.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QSESSIONMANAGER_H
6#define QSESSIONMANAGER_H
7
8#include <QtGui/qtguiglobal.h>
9#include <QtCore/qobject.h>
10#include <QtGui/qwindowdefs.h>
11#include <QtCore/qstring.h>
12#include <QtCore/qstringlist.h>
13
14#ifndef QT_NO_SESSIONMANAGER
15
17
18
19class QGuiApplication;
20
21class QSessionManagerPrivate;
22
23class Q_GUI_EXPORT QSessionManager : public QObject
24{
25 Q_OBJECT
26 Q_DECLARE_PRIVATE(QSessionManager)
27 QSessionManager(QGuiApplication *app, QString &id, QString &key);
28 ~QSessionManager();
29public:
30 QString sessionId() const;
31 QString sessionKey() const;
32
33 bool allowsInteraction();
34 bool allowsErrorInteraction();
35 void release();
36
37 void cancel();
38
39 enum RestartHint {
40 RestartIfRunning,
41 RestartAnyway,
42 RestartImmediately,
43 RestartNever
44 };
45 void setRestartHint(RestartHint);
46 RestartHint restartHint() const;
47
48 void setRestartCommand(const QStringList&);
49 QStringList restartCommand() const;
50 void setDiscardCommand(const QStringList&);
51 QStringList discardCommand() const;
52
53 void setManagerProperty(const QString& name, const QString& value);
54 void setManagerProperty(const QString& name, const QStringList& value);
55
56 bool isPhase2() const;
57 void requestPhase2();
58
59private:
60 friend class QGuiApplication;
61 friend class QGuiApplicationPrivate;
62};
63
64QT_END_NAMESPACE
65
66#endif // QT_NO_SESSIONMANAGER
67
68#endif // QSESSIONMANAGER_H
The QClipboard class provides access to the window system clipboard.
Definition qclipboard.h:21
\inmodule QtCore\reentrant
Definition qdatastream.h:50
\reentrant
Definition qfont.h:22
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
QInputDeviceManager acts as a communication hub between QtGui and the input handlers.
The QPalette class contains color groups for each widget state.
Definition qpalette.h:20
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
The QPlatformTheme class allows customizing the UI based on themes.
QPointingDeviceUniqueId identifies a unique object, such as a tagged token or stylus,...
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
The QSessionManager class provides access to the session manager.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:177
The QStyleHints class contains platform specific hints and settings. \inmodule QtGui.
Definition qstylehints.h:18
\inmodule QtGui
Definition qwindow.h:64
Combined button and popup list for selecting options.
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
#define qApp
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2582
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
static bool needsWindowBlockedEvent(const QWindow *w)
Q_CORE_EXPORT void qt_call_post_routines()
static void init_plugins(const QList< QByteArray > &pluginList)
static void initFontUnlocked()
static void clearFontUnlocked()
void qRegisterGuiVariant()
static Q_CONSTINIT unsigned applicationResourceFlags
static Q_CONSTINIT int touchDoubleTapDistance
static QWindowGeometrySpecification windowGeometrySpecification
static bool qt_detectRTLLanguage()
Q_CONSTINIT Q_GUI_EXPORT bool qt_is_tty_app
static Q_CONSTINIT bool force_reverse
static Q_CONSTINIT int mouseDoubleClickDistance
#define Q_WINDOW_GEOMETRY_SPECIFICATION_INITIALIZER
static void init_platform(const QString &pluginNamesWithArguments, const QString &platformPluginPath, const QString &platformThemeName, int &argc, char **argv)
static void initThemeHints()
static int nextGeometryToken(const QByteArray &a, int &pos, char *op)
#define CHECK_QAPP_INSTANCE(...)
ApplicationResourceFlags
@ ApplicationFontExplicitlySet
static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
#define qGuiApp
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
QDebug Q_GUI_EXPORT & operator<<(QDebug &s, const QVectorPath &path)
void applyTo(QWindow *window) const
static QWindowGeometrySpecification fromArgument(const QByteArray &a)