summaryrefslogtreecommitdiffstats
path: root/src/utils/qdroidutils.h
diff options
context:
space:
mode:
authoraavit <eirik.aavitsland@digia.com>2014-09-10 14:50:28 +0200
committerEirik Aavitsland <eirik.aavitsland@digia.com>2014-10-08 11:37:49 +0300
commit3d6bb94a9e7c80edc4b2a2321b464533a4a7f60b (patch)
treec164a2bd67eb0b172398c38c471b9be5d9bea4ce /src/utils/qdroidutils.h
parent20b464d745b7ae319a89d9c2b14c5dcf7364c250 (diff)
Rename DroidUtils -> B2QtUtils and refactor the API
Preparing this module for being documented and presented for external users. - Renamed since this is for eLinux as well as eAndroid - Provide all settings as proper Q_PROPERTYs for easy QML access - Hide all the detailed audio stuff that's not useful for users - Implement a getter function for current backlight, so that we don't have to reset it to full every time this module is loaded - qmake now groks this as internal module, so get rid build kludges - hostname setting on eLinux fixed - getIPAddress() now returns ALL active addresses, and implentation is simplified Task-number: QTEE-704 Change-Id: I9f22d5531b5963ae7e78c840bcfe1edd6197f82a Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Diffstat (limited to 'src/utils/qdroidutils.h')
-rw-r--r--src/utils/qdroidutils.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/utils/qdroidutils.h b/src/utils/qdroidutils.h
deleted file mode 100644
index 8e70f19..0000000
--- a/src/utils/qdroidutils.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use the contact form at
-** http://qt.digia.com/
-**
-** This file is part of Qt Enterprise Embedded.
-**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** the contact form at http://qt.digia.com/
-**
-****************************************************************************/
-#ifndef QDROIDUTILS_H
-#define QDROIDUTILS_H
-
-#include <qobject.h>
-
-class Q_DECL_EXPORT QDroidUtils : public QObject
-{
- Q_OBJECT
- Q_ENUMS(AudioStreamType)
-public:
- enum AudioOrientation {
- LandscapeAudioOrientation,
- PortraitAudioOrientation,
- SquareAudioOrientation,
- UndefinedAudioOrientation,
- };
-
- enum AudioStreamType {
- DefaultAudioStream = -1,
- VoiceCallAudioStream = 0,
- SystemAudioStream = 1,
- RingAudioStream = 2,
- MusicAudioStream = 3,
- AlarmAudioStream = 4,
- NotificationAudioStream = 5,
- BluetoothAudioStream = 6,
- EnforcedAudibleAudioStream = 7,
- DTMFAudioStream = 8,
- TTSAudioStream = 9
- };
-
- QDroidUtils(QObject* parent = 0) : QObject(parent)
- {
- }
- ~QDroidUtils()
- {
- }
-
- //### TBD: make an instance() method, for singleton use from C++ ?
- //e.g. connect(myobj, mysig, QDroidUtils::instance(), slot(rebootSystem());
-
-public Q_SLOTS:
- void rebootSystem();
- void powerOffSystem();
-
- void setOrientationForAudioSystem(AudioOrientation orientation);
-
- void setMasterVolume(int volume);
- void setMasterMute(bool mute);
- void setStreamVolume(AudioStreamType stream, int volume);
- void setStreamMute(AudioStreamType stream, bool mute);
-
- float masterVolume() const;
- bool masterMute() const;
- float streamVolume(AudioStreamType stream) const;
- bool streamMute(AudioStreamType stream) const;
-
- bool setDisplayBrightness(quint8 value);
-
- QString getIPAddress();
- QString getHostname();
- bool setHostname(QString hostname);
-};
-
-#endif // QDROIDUTILS_H