|
15 | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16 | 16 | */
|
17 | 17 |
|
18 |
| -#include "deviceinfo.h" |
| 18 | +#include "devicespecs.h" |
19 | 19 | #include <QFile>
|
20 | 20 |
|
21 | 21 | const char* CONFIG_FILE = "/etc/asteroid/machine.conf";
|
22 | 22 | const char* HOST_FILE = "/etc/hostname";
|
23 | 23 | const char* OS_RELEASE_FILE = "/etc/os-release";
|
24 | 24 |
|
25 |
| -DeviceInfo::DeviceInfo() |
| 25 | +DeviceSpecs::DeviceInfo() |
26 | 26 | : m_settings(CONFIG_FILE, QSettings::IniFormat)
|
27 | 27 | {
|
28 | 28 | QSettings::Status status(m_settings.status());
|
@@ -57,47 +57,47 @@ DeviceInfo::DeviceInfo()
|
57 | 57 | }
|
58 | 58 | }
|
59 | 59 |
|
60 |
| -bool DeviceInfo::hasRoundScreen() |
| 60 | +bool DeviceSpecs::hasRoundScreen() |
61 | 61 | {
|
62 | 62 | return m_settings.value("Display/ROUND", false).toBool();
|
63 | 63 | }
|
64 | 64 |
|
65 |
| -double DeviceInfo::borderGestureWidth() |
| 65 | +double DeviceSpecs::borderGestureWidth() |
66 | 66 | {
|
67 | 67 | return m_settings.value("Display/BORDER_GESTURE_WIDTH", 0.1).toFloat();
|
68 | 68 | }
|
69 | 69 |
|
70 |
| -int DeviceInfo::flatTireHeight() |
| 70 | +int DeviceSpecs::flatTireHeight() |
71 | 71 | {
|
72 | 72 | return m_settings.value("Display/FLAT_TIRE", 0).toInt();
|
73 | 73 | }
|
74 | 74 |
|
75 |
| -bool DeviceInfo::needsBurnInProtection() |
| 75 | +bool DeviceSpecs::needsBurnInProtection() |
76 | 76 | {
|
77 | 77 | return m_settings.value("Display/NEEDS_BURN_IN_PROTECTION", true).toBool();
|
78 | 78 | }
|
79 | 79 |
|
80 |
| -bool DeviceInfo::hasWlan() |
| 80 | +bool DeviceSpecs::hasWlan() |
81 | 81 | {
|
82 | 82 | return m_settings.value("Capabilities/HAS_WLAN", false).toBool();
|
83 | 83 | }
|
84 | 84 |
|
85 |
| -bool DeviceInfo::hasSpeaker() |
| 85 | +bool DeviceSpecs::hasSpeaker() |
86 | 86 | {
|
87 | 87 | return m_settings.value("Capabilities/HAS_SPEAKER", false).toBool();
|
88 | 88 | }
|
89 | 89 |
|
90 |
| -QString DeviceInfo::hostname() const |
| 90 | +QString DeviceSpecs::hostname() const |
91 | 91 | {
|
92 | 92 | return m_hostname;
|
93 | 93 | }
|
94 | 94 |
|
95 |
| -QString DeviceInfo::machineName() const |
| 95 | +QString DeviceSpecs::machineName() const |
96 | 96 | {
|
97 | 97 | return m_settings.value("Identity/MACHINE", "unknown").toString();
|
98 | 98 | }
|
99 | 99 |
|
100 |
| -QString DeviceInfo::buildID() const |
| 100 | +QString DeviceSpecs::buildID() const |
101 | 101 | {
|
102 | 102 | return m_buildid;
|
103 | 103 | }
|
0 commit comments