summaryrefslogtreecommitdiffstats
path: root/tests/manual/qardboard/dummydeviceorientation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qardboard/dummydeviceorientation.cpp')
-rw-r--r--tests/manual/qardboard/dummydeviceorientation.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/manual/qardboard/dummydeviceorientation.cpp b/tests/manual/qardboard/dummydeviceorientation.cpp
new file mode 100644
index 000000000..313522f46
--- /dev/null
+++ b/tests/manual/qardboard/dummydeviceorientation.cpp
@@ -0,0 +1,26 @@
+// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "dummydeviceorientation.h"
+
+DummyDeviceOrientation::DummyDeviceOrientation(QObject *parent)
+ : AbstractDeviceOrientation(parent)
+{
+}
+
+bool DummyDeviceOrientation::start()
+{
+ if (!m_enabled) {
+ m_enabled = true;
+ emit enabledChanged(m_enabled);
+ }
+ return true;
+}
+
+void DummyDeviceOrientation::stop()
+{
+ if (m_enabled) {
+ m_enabled = false;
+ emit enabledChanged(m_enabled);
+ }
+}