summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@jollamobile.com>2014-09-25 08:27:29 +1000
committerLorn Potter <lorn.potter@gmail.com>2014-11-06 10:22:26 +0100
commitee755a713e3ec3484db4b87eb1306e3d0ec0eafb (patch)
tree160be10b1f95eecd6e210282c600620166b9d1ba
parent4a324f7daf1734181d60c417e4c0b647ced5ad1d (diff)
remove QStorageInfo
This has been made redundant by the inclusion of QStorageInfo into QtCore Change-Id: Icfea210a450302e49ae61997120325ba00313974 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
-rw-r--r--examples/systeminfo/qml-storageinfo/content/ProgressBar.qml85
-rw-r--r--examples/systeminfo/qml-storageinfo/content/background.pngbin426 -> 0 bytes
-rw-r--r--examples/systeminfo/qml-storageinfo/main.cpp43
-rw-r--r--examples/systeminfo/qml-storageinfo/qml-storage.qml111
-rw-r--r--examples/systeminfo/qml-storageinfo/qml-storageinfo.pro15
-rw-r--r--examples/systeminfo/qml-storageinfo/qml-storageinfo.qrc5
-rw-r--r--examples/systeminfo/systeminfo.pro1
-rw-r--r--src/imports/systeminfo/plugins.qmltypes44
8 files changed, 0 insertions, 304 deletions
diff --git a/examples/systeminfo/qml-storageinfo/content/ProgressBar.qml b/examples/systeminfo/qml-storageinfo/content/ProgressBar.qml
deleted file mode 100644
index 948beee4..00000000
--- a/examples/systeminfo/qml-storageinfo/content/ProgressBar.qml
+++ /dev/null
@@ -1,85 +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 examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: progressbar
-
- property int minimum: 0
- property int maximum: 100
- property int value: 0
- property int maxval: 0
- property alias color: gradient1.color
- property alias secondColor: gradient2.color
-
- width: 30; height: 250
- clip: true
-
- BorderImage {
- source: "background.png"
- width: parent.width; height: parent.height
- border { left: 4; top: 4; right: 4; bottom: 4 }
- }
-
- Rectangle {
- id: highlight
-
- property int widthDest: ((progressbar.height * (value - minimum)) / (maximum - minimum) )
-
- height: highlight.widthDest
- Behavior on height { SmoothedAnimation { velocity: 1200 } }
-
- anchors { left: parent.left; right: parent.right; bottom: parent.bottom; leftMargin: 2; rightMargin: 2; bottomMargin: 2 }
-// anchors { left: parent.left; top: parent.top; bottom: parent.bottom; leftMargin: 3; topMargin: 3; bottomMargin: 3 }
- radius: 1
- gradient: Gradient {
- GradientStop { id: gradient1; position: 0.0 }
- GradientStop { id: gradient2; position: 1.0 }
- }
-
- }
- Text {
- anchors { /*right: highlight.right; rightMargin: 6; */horizontalCenter: parent.horizontalCenter }
- color: "black"
- font.bold: true
- text: maxval + '%'//Math.floor((value - minimum) / (maximum - minimum) * 100) + '%'
- }
-}
diff --git a/examples/systeminfo/qml-storageinfo/content/background.png b/examples/systeminfo/qml-storageinfo/content/background.png
deleted file mode 100644
index 9044226f..00000000
--- a/examples/systeminfo/qml-storageinfo/content/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/systeminfo/qml-storageinfo/main.cpp b/examples/systeminfo/qml-storageinfo/main.cpp
deleted file mode 100644
index b6c620bd..00000000
--- a/examples/systeminfo/qml-storageinfo/main.cpp
+++ /dev/null
@@ -1,43 +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"../stub.h"
-SYSINFO_EXAMPLE_MAIN(qml-storage)
diff --git a/examples/systeminfo/qml-storageinfo/qml-storage.qml b/examples/systeminfo/qml-storageinfo/qml-storage.qml
deleted file mode 100644
index a99c3084..00000000
--- a/examples/systeminfo/qml-storageinfo/qml-storage.qml
+++ /dev/null
@@ -1,111 +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$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtSystemInfo 5.0
-import "content"
-
-Rectangle {
- width: 480; height: 854
- color: "#343434"
-
- StorageInfo {
- id: storageinfo
- onLogicalDriveChanged: updateList;
- }
-
- function getTotalSizeText(name) {
- var totalSpace = storageinfo.totalDiskSpace(name);
- if (totalSpace / 1024 < 1024)
- return Math.round((totalSpace / 1024) * 100) / 100 + " kb avail.";
- else if (totalSpace/1024/1024 < 1024)
- return Math.round((totalSpace / 1024 / 1024) * 100) / 100 + " Mb avail.";
- else if (totalSpace/1024/1024/1024 < 1024)
- return Math.round((totalSpace / 1024 / 1024 / 1024) * 100) / 100 + " Gb avail.";
- return "";
- }
-
- function getAvailableSizeText(name) {
- var dspace = storageinfo.availableDiskSpace(name);
- if (dspace /1024 < 1024)
- return Math.round((dspace / 1024) * 100) / 100 + " kb / ";
- else if (dspace/1024/1024 < 1024)
- return Math.round((dspace / 1024 / 1024) * 100) / 100 + " Mb / ";
- else if (dspace/1024/1024/1024 < 1024)
- return Math.round((dspace / 1024 / 1024 / 1024) * 100) / 100 + " Gb / ";
- return "";
- }
-
- function getPercent(name) {
- return Math.round(100 - ((storageinfo.availableDiskSpace(name) / storageinfo.totalDiskSpace(name)) * 100))
- }
-
- property alias storageList: storageinfo.allLogicalDrives;
-
- function updateList() {
- driveList:storageList: storageinfo.allLogicalDrives;
- }
-
- Component {
- id: listItem
-
- Row {
- id:row
- spacing: 10
- ProgressBar {
- width: 120; height: 25
- maxval: getPercent(name.text)
- value: getPercent(name.text)
- NumberAnimation on value { duration: 1500; from: 0; to: getPercent(name.text); loops: 1 }
- ColorAnimation on color { duration: 1500; from: "lightsteelblue"; to: "thistle"; loops:1}
- ColorAnimation on secondColor { duration: 1500; from: "steelblue"; to: "#CD96CD"; loops: 1 }
- }
- Text { id: name; text: modelData; color: "white";}
- Text { text: getAvailableSizeText(name.text) + getTotalSizeText(name.text); color: "white";}
- }
- }
-
- ListView {
- anchors.fill: parent
- model: storageList
- delegate: listItem
- }
-}
diff --git a/examples/systeminfo/qml-storageinfo/qml-storageinfo.pro b/examples/systeminfo/qml-storageinfo/qml-storageinfo.pro
deleted file mode 100644
index 3113b0bf..00000000
--- a/examples/systeminfo/qml-storageinfo/qml-storageinfo.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TEMPLATE = app
-TARGET = qml-storageinfo
-QT += quick
-SOURCES = main.cpp
-
-app.files = \
- $$files(*.qml) \
- content
-
-target.path = $$[QT_INSTALL_EXAMPLES]/sysinfo/qml-storageinfo
-app.path = $$[QT_INSTALL_EXAMPLES]/sysinfo/qml-storageinfo
-INSTALLS += target app
-
-RESOURCES += \
- qml-storageinfo.qrc
diff --git a/examples/systeminfo/qml-storageinfo/qml-storageinfo.qrc b/examples/systeminfo/qml-storageinfo/qml-storageinfo.qrc
deleted file mode 100644
index 2b676005..00000000
--- a/examples/systeminfo/qml-storageinfo/qml-storageinfo.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml-storage.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/systeminfo/systeminfo.pro b/examples/systeminfo/systeminfo.pro
index f5c2c8ec..cdc36e0a 100644
--- a/examples/systeminfo/systeminfo.pro
+++ b/examples/systeminfo/systeminfo.pro
@@ -2,7 +2,6 @@ TEMPLATE = subdirs
SUBDIRS += \
qml-deviceinfo \
- qml-storageinfo \
qml-battery
#qtHaveModule(widgets): SUBDIRS += \
diff --git a/src/imports/systeminfo/plugins.qmltypes b/src/imports/systeminfo/plugins.qmltypes
index 0f70464d..bd62dd85 100644
--- a/src/imports/systeminfo/plugins.qmltypes
+++ b/src/imports/systeminfo/plugins.qmltypes
@@ -472,50 +472,6 @@ Module {
}
}
Component {
- name: "QDeclarativeStorageInfo"
- prototype: "QObject"
- exports: ["QtSystemInfo/StorageInfo 5.0"]
- exportMetaObjectRevisions: [0]
- Enum {
- name: "DriveType"
- values: {
- "UnknownDrive": 0,
- "InternalDrive": 1,
- "RemovableDrive": 2,
- "RemoteDrive": 3,
- "CdromDrive": 4,
- "RamDrive": 5
- }
- }
- Property { name: "allLogicalDrives"; type: "QStringList"; isReadonly: true }
- Property { name: "monitorAllLogicalDrives"; type: "bool" }
- Signal {
- name: "logicalDriveChanged"
- Parameter { name: "drive"; type: "string" }
- Parameter { name: "added"; type: "bool" }
- }
- Method {
- name: "availableDiskSpace"
- type: "qlonglong"
- Parameter { name: "drive"; type: "string" }
- }
- Method {
- name: "totalDiskSpace"
- type: "qlonglong"
- Parameter { name: "drive"; type: "string" }
- }
- Method {
- name: "uriForDrive"
- type: "string"
- Parameter { name: "drive"; type: "string" }
- }
- Method {
- name: "driveType"
- type: "int"
- Parameter { name: "drive"; type: "string" }
- }
- }
- Component {
name: "QScreenSaver"
prototype: "QObject"
exports: ["QtSystemInfo/ScreenSaver 5.0"]