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
4#ifndef QSESSIONMANAGER_H
5#define QSESSIONMANAGER_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qobject.h>
9#include <QtGui/qwindowdefs.h>
10#include <QtCore/qstring.h>
11#include <QtCore/qstringlist.h>
12
13#ifndef QT_NO_SESSIONMANAGER
14
16
17
18class QGuiApplication;
19
20class QSessionManagerPrivate;
21
22class Q_GUI_EXPORT QSessionManager : public QObject
23{
24 Q_OBJECT
25 Q_DECLARE_PRIVATE(QSessionManager)
26 QSessionManager(QGuiApplication *app, QString &id, QString &key);
27 ~QSessionManager();
28public:
29 QString sessionId() const;
30 QString sessionKey() const;
31
32 bool allowsInteraction();
33 bool allowsErrorInteraction();
34 void release();
35
36 void cancel();
37
38 enum RestartHint {
39 RestartIfRunning,
40 RestartAnyway,
41 RestartImmediately,
42 RestartNever
43 };
44 void setRestartHint(RestartHint);
45 RestartHint restartHint() const;
46
47 void setRestartCommand(const QStringList&);
48 QStringList restartCommand() const;
49 void setDiscardCommand(const QStringList&);
50 QStringList discardCommand() const;
51
52 void setManagerProperty(const QString& name, const QString& value);
53 void setManagerProperty(const QString& name, const QStringList& value);
54
55 bool isPhase2() const;
56 void requestPhase2();
57
58private:
59 friend class QGuiApplication;
60 friend class QGuiApplicationPrivate;
61};
62
63QT_END_NAMESPACE
64
65#endif // QT_NO_SESSIONMANAGER
66
67#endif // QSESSIONMANAGER_H
The QClipboard class provides access to the window system clipboard.
Definition qclipboard.h:20
\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:19
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:17
\inmodule QtGui
Definition qwindow.h:63
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)