Lomiri
platform.h
1 /*
2  * Copyright (C) 2015 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 
17 #ifndef PLATFORM_H
18 #define PLATFORM_H
19 
20 #include <QDBusInterface>
21 
27 class Platform: public QObject
28 {
29  Q_OBJECT
36  Q_PROPERTY(QString chassis READ chassis CONSTANT)
40  Q_PROPERTY(bool isPC READ isPC CONSTANT)
44  Q_PROPERTY(bool isMultiSession READ isMultiSession CONSTANT)
45 
46 public:
47  Platform(QObject *parent = nullptr);
48  ~Platform() = default;
49 
50  QString chassis() const;
51  bool isPC() const;
52 
53  bool isMultiSession() const;
54 
55 private Q_SLOTS:
56  void init();
57 
58 private:
59  QString m_chassis;
60  bool m_isPC;
61  bool m_isMultiSession;
62 };
63 
64 #endif // PLATFORM_H
Platform::isPC
bool isPC
Definition: platform.h:40
Platform::chassis
QString chassis
Definition: platform.h:36
Platform
The Platform class.
Definition: platform.h:27
Platform::isMultiSession
bool isMultiSession
Definition: platform.h:44