source: trunk/src/gui/kernel/qsessionmanager_qws.cpp@ 561

Last change on this file since 561 was 561, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.1 sources.

  • Property svn:eol-style set to native
File size: 4.5 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtGui module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#include <qsessionmanager.h>
43
44#ifndef QT_NO_SESSIONMANAGER
45
46QT_BEGIN_NAMESPACE
47
48class QSessionManagerPrivate : public QObjectPrivate
49{
50public:
51 QSessionManagerPrivate(QSessionManager *m, const QString &id,
52 const QString &key);
53
54 QStringList restartCommand;
55 QStringList discardCommand;
56 const QString sessionId;
57 const QString sessionKey;
58 QSessionManager::RestartHint restartHint;
59};
60
61QSessionManagerPrivate::QSessionManagerPrivate(QSessionManager*,
62 const QString &id,
63 const QString &key)
64 : QObjectPrivate(), sessionId(id), sessionKey(key)
65{
66}
67
68QSessionManager::QSessionManager(QApplication *app, QString &id, QString &key)
69 : QObject(*new QSessionManagerPrivate(this, id, key), app)
70{
71 Q_D(QSessionManager);
72 d->restartHint = RestartIfRunning;
73}
74
75QSessionManager::~QSessionManager()
76{
77}
78
79QString QSessionManager::sessionId() const
80{
81 Q_D(const QSessionManager);
82 return d->sessionId;
83}
84
85QString QSessionManager::sessionKey() const
86{
87 Q_D(const QSessionManager);
88 return d->sessionKey;
89}
90
91
92bool QSessionManager::allowsInteraction()
93{
94 return false;
95}
96
97bool QSessionManager::allowsErrorInteraction()
98{
99 return false;
100}
101
102void QSessionManager::release()
103{
104}
105
106void QSessionManager::cancel()
107{
108}
109
110void QSessionManager::setRestartHint(QSessionManager::RestartHint hint)
111{
112 Q_D(QSessionManager);
113 d->restartHint = hint;
114}
115
116QSessionManager::RestartHint QSessionManager::restartHint() const
117{
118 Q_D(const QSessionManager);
119 return d->restartHint;
120}
121
122void QSessionManager::setRestartCommand(const QStringList &command)
123{
124 Q_D(QSessionManager);
125 d->restartCommand = command;
126}
127
128QStringList QSessionManager::restartCommand() const
129{
130 Q_D(const QSessionManager);
131 return d->restartCommand;
132}
133
134void QSessionManager::setDiscardCommand(const QStringList &command)
135{
136 Q_D(QSessionManager);
137 d->discardCommand = command;
138}
139
140QStringList QSessionManager::discardCommand() const
141{
142 Q_D(const QSessionManager);
143 return d->discardCommand;
144}
145
146void QSessionManager::setManagerProperty(const QString &name,
147 const QString &value)
148{
149 Q_UNUSED(name);
150 Q_UNUSED(value);
151}
152
153void QSessionManager::setManagerProperty(const QString &name,
154 const QStringList &value)
155{
156 Q_UNUSED(name);
157 Q_UNUSED(value);
158}
159
160bool QSessionManager::isPhase2() const
161{
162 return false;
163}
164
165void QSessionManager::requestPhase2()
166{
167}
168
169QT_END_NAMESPACE
170
171#endif // QT_NO_SESSIONMANAGER
Note: See TracBrowser for help on using the repository browser.