on e23aa29 help sign in
unity8/tests/mocks/SessionManager/SessionManager.h
49 lines 1.2 kB history raw
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Michael Terry <michael.terry@canonical.com>
17 */
19#ifndef UNITY_MOCK_SESSIONMANAGER_H
20#define UNITY_MOCK_SESSIONMANAGER_H
22#include <QObject>
24class SessionManager: public QObject
26 Q_OBJECT
27 Q_PROPERTY(bool active
28 READ active
29 WRITE setActive // Only in mock
30 NOTIFY activeChanged
31 FINAL)
33public:
34 explicit SessionManager(QObject *parent = 0);
36 bool active() const;
37 void setActive(bool active);
39public Q_SLOTS:
40 void lock();
42Q_SIGNALS:
43 void activeChanged();
45private:
46 bool m_active;
47};
49#endif