diff options
author | Lorn Potter <lorn.potter@jollamobile.com> | 2013-06-23 17:14:53 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-25 05:19:28 +0200 |
commit | af4232a64a3885b8cb75264349cfe74bc4534acd (patch) | |
tree | 1aca55e852b4884c344c4af5da4b61589ffe233b /src/imports | |
parent | bfa844cd2c5e00d824c86167de1829442527d646 (diff) |
Remove device profile, as it is depreciated.
Change-Id: If1f2511f9f16f1a849b25e7d9ed99f0c9b2062f5
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/systeminfo/qdeclarativedeviceprofile.cpp | 133 | ||||
-rw-r--r-- | src/imports/systeminfo/qdeclarativedeviceprofile_p.h | 99 | ||||
-rw-r--r-- | src/imports/systeminfo/qsysteminfo.cpp | 2 | ||||
-rw-r--r-- | src/imports/systeminfo/systeminfo.pro | 4 |
4 files changed, 1 insertions, 237 deletions
diff --git a/src/imports/systeminfo/qdeclarativedeviceprofile.cpp b/src/imports/systeminfo/qdeclarativedeviceprofile.cpp deleted file mode 100644 index 92f7dfa2..00000000 --- a/src/imports/systeminfo/qdeclarativedeviceprofile.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSystems module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativedeviceprofile_p.h" - -QT_BEGIN_NAMESPACE - -/*! - \qmltype DeviceProfile - \instantiates QDeclarativeDeviceProfile - \inqmlmodule QtSystemInfo - \ingroup qml-systeminfo - \brief The DeviceProfile element provides information about the profile of the device. -*/ - -/*! - \internal -*/ -QDeclarativeDeviceProfile::QDeclarativeDeviceProfile(QObject *parent) - : QObject(parent) - , deviceProfile(new QDeviceProfile(this)) -{ -} - -/*! - \internal - */ -QDeclarativeDeviceProfile::~QDeclarativeDeviceProfile() -{ -} - -/*! - \qmlproperty bool DeviceProfile::isVibrationActivated - - This property holds whether the vibration is currently activated or deactivated. - */ - -bool QDeclarativeDeviceProfile::isVibrationActivated() const -{ - connect(deviceProfile, SIGNAL(vibrationActivatedChanged(bool)), - this, SIGNAL(vibrationActivatedChanged()), Qt::UniqueConnection); - return deviceProfile->isVibrationActivated(); -} - -/*! - \qmlproperty int DeviceProfile::messageRingtoneVolume - - This property holds the current message ringtone volume, from 0 to 100. - If this information is unknown, voice message volume requested but no result - received yet or error occurs, -1 is returned. - */ - -int QDeclarativeDeviceProfile::messageRingtoneVolume() const -{ - connect(deviceProfile, SIGNAL(messageRingtoneVolumeChanged(int)), - this, SIGNAL(messageRingtoneVolumeChanged()), Qt::UniqueConnection); - return deviceProfile->messageRingtoneVolume(); -} - -/*! - \qmlproperty int DeviceProfile::voiceRingtoneVolume - - This property holds the current voice ringtone volume, from 0 to 100. - If this information is unknown, voice ringtone volume requested but no result - received yet or error occurs, -1 is returned. - */ - -int QDeclarativeDeviceProfile::voiceRingtoneVolume() const -{ - connect(deviceProfile, SIGNAL(voiceRingtoneVolumeChanged(int)), - this, SIGNAL(voiceRingtoneVolumeChanged()), Qt::UniqueConnection); - return deviceProfile->voiceRingtoneVolume(); -} - -/*! - \qmlproperty enumeration DeviceProfile::currentProfileType - - Returns the type of the current profile, possible types are: - \list - \li DeviceProfile.UnknownProfile - Profile unknown, profile type requested but no result received yet or an error occured. - \li DeviceProfile.SilentProfile - Neither sound nor vibration is on. - \li DeviceProfile.NormalProfile - Normal sound is on. - \li DeviceProfile.VibrationProfile - Only vibration is on, and sound is off. - \li DeviceProfile.BeepProfile - Only beep is on. - \endlist - */ - -QDeclarativeDeviceProfile::ProfileType QDeclarativeDeviceProfile::currentProfileType() const -{ - connect(deviceProfile, SIGNAL(currentProfileTypeChanged(QDeviceProfile::ProfileType)), - this, SIGNAL(currentProfileTypeChanged()), Qt::UniqueConnection); - return static_cast<QDeclarativeDeviceProfile::ProfileType>(deviceProfile->currentProfileType()); -} - -QT_END_NAMESPACE diff --git a/src/imports/systeminfo/qdeclarativedeviceprofile_p.h b/src/imports/systeminfo/qdeclarativedeviceprofile_p.h deleted file mode 100644 index 34ac3e18..00000000 --- a/src/imports/systeminfo/qdeclarativedeviceprofile_p.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the QtSystems module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#ifndef QDECLARATIVEDEVICEPROFILE_P_H -#define QDECLARATIVEDEVICEPROFILE_P_H - -#include <qdeviceprofile.h> - -QT_BEGIN_NAMESPACE - -class QDeclarativeDeviceProfile : public QObject -{ - Q_OBJECT - - Q_ENUMS(ProfileType) - Q_PROPERTY(bool isVibrationActivated READ isVibrationActivated NOTIFY vibrationActivatedChanged) - Q_PROPERTY(int messageRingtoneVolume READ messageRingtoneVolume NOTIFY messageRingtoneVolumeChanged) - Q_PROPERTY(int voiceRingtoneVolume READ voiceRingtoneVolume NOTIFY voiceRingtoneVolumeChanged) - Q_PROPERTY(ProfileType currentProfileType READ currentProfileType NOTIFY currentProfileTypeChanged) - -public: - enum ProfileType { - UnknownProfile = QDeviceProfile::UnknownProfile, - SilentProfile = QDeviceProfile::SilentProfile, - NormalProfile = QDeviceProfile::NormalProfile, - VibrationProfile = QDeviceProfile::VibrationProfile, - BeepProfile = QDeviceProfile::BeepProfile - }; - - QDeclarativeDeviceProfile(QObject *parent = 0); - virtual ~QDeclarativeDeviceProfile(); - - bool isVibrationActivated() const; - int messageRingtoneVolume() const; - int voiceRingtoneVolume() const; - ProfileType currentProfileType() const; - -Q_SIGNALS: - void vibrationActivatedChanged(); - void messageRingtoneVolumeChanged(); - void voiceRingtoneVolumeChanged(); - void currentProfileTypeChanged(); - -private: - QDeviceProfile *deviceProfile; -}; - -QT_END_NAMESPACE - -#endif // QDECLARATIVEDEVICEPROFILE_P_H diff --git a/src/imports/systeminfo/qsysteminfo.cpp b/src/imports/systeminfo/qsysteminfo.cpp index 072902d1..1e70ece3 100644 --- a/src/imports/systeminfo/qsysteminfo.cpp +++ b/src/imports/systeminfo/qsysteminfo.cpp @@ -44,7 +44,6 @@ #include "qdeclarativebatteryinfo_p.h" #include "qdeclarativedeviceinfo_p.h" -#include "qdeclarativedeviceprofile_p.h" #include "qdeclarativenetworkinfo_p.h" #include <qscreensaver.h> #include "qdeclarativestorageinfo_p.h" @@ -65,7 +64,6 @@ public: int minor = 0; qmlRegisterType<QDeclarativeBatteryInfo>(uri, major, minor, "BatteryInfo"); qmlRegisterType<QDeclarativeDeviceInfo>(uri, major, minor, "DeviceInfo"); - qmlRegisterType<QDeclarativeDeviceProfile>(uri, major, minor, "DeviceProfile"); qmlRegisterType<QDeclarativeNetworkInfo>(uri, major, minor, "NetworkInfo"); qmlRegisterType<QScreenSaver>(uri, major, minor, "ScreenSaver"); qmlRegisterType<QDeclarativeStorageInfo>(uri, major, minor, "StorageInfo"); diff --git a/src/imports/systeminfo/systeminfo.pro b/src/imports/systeminfo/systeminfo.pro index e2d9a535..4de880d5 100644 --- a/src/imports/systeminfo/systeminfo.pro +++ b/src/imports/systeminfo/systeminfo.pro @@ -5,15 +5,13 @@ HEADERS += \ qdeclarativebatteryinfo_p.h \ qdeclarativedeviceinfo_p.h \ qdeclarativenetworkinfo_p.h \ - qdeclarativestorageinfo_p.h \ - qdeclarativedeviceprofile_p.h + qdeclarativestorageinfo_p.h SOURCES += \ qdeclarativebatteryinfo.cpp \ qdeclarativedeviceinfo.cpp \ qdeclarativenetworkinfo.cpp \ qdeclarativestorageinfo.cpp \ - qdeclarativedeviceprofile.cpp \ qsysteminfo.cpp load(qml_plugin) |