Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtGui/qsessionmanager.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QSESSIONMANAGER_H
0005 #define QSESSIONMANAGER_H
0006 
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtCore/qobject.h>
0009 #include <QtGui/qwindowdefs.h>
0010 #include <QtCore/qstring.h>
0011 #include <QtCore/qstringlist.h>
0012 
0013 #ifndef QT_NO_SESSIONMANAGER
0014 
0015 QT_BEGIN_NAMESPACE
0016 
0017 
0018 class QGuiApplication;
0019 
0020 class QSessionManagerPrivate;
0021 
0022 class Q_GUI_EXPORT  QSessionManager : public QObject
0023 {
0024     Q_OBJECT
0025     Q_DECLARE_PRIVATE(QSessionManager)
0026     QSessionManager(QGuiApplication *app, QString &id, QString &key);
0027     ~QSessionManager();
0028 public:
0029     QString sessionId() const;
0030     QString sessionKey() const;
0031 
0032     bool allowsInteraction();
0033     bool allowsErrorInteraction();
0034     void release();
0035 
0036     void cancel();
0037 
0038     enum RestartHint {
0039         RestartIfRunning,
0040         RestartAnyway,
0041         RestartImmediately,
0042         RestartNever
0043     };
0044     void setRestartHint(RestartHint);
0045     RestartHint restartHint() const;
0046 
0047     void setRestartCommand(const QStringList&);
0048     QStringList restartCommand() const;
0049     void setDiscardCommand(const QStringList&);
0050     QStringList discardCommand() const;
0051 
0052     void setManagerProperty(const QString& name, const QString& value);
0053     void setManagerProperty(const QString& name, const QStringList& value);
0054 
0055     bool isPhase2() const;
0056     void requestPhase2();
0057 
0058 private:
0059     friend class QGuiApplication;
0060     friend class QGuiApplicationPrivate;
0061 };
0062 
0063 QT_END_NAMESPACE
0064 
0065 #endif // QT_NO_SESSIONMANAGER
0066 
0067 #endif // QSESSIONMANAGER_H