From 90123fa75ead24d65c3632395bcd408b81e87767 Mon Sep 17 00:00:00 2001 From: Daker Fernandes Pinheiro Date: Mon, 25 Jul 2011 00:20:16 -0300 Subject: [PATCH] Add gallery example for ProgressBar plasma component Also refactored the busy indicator gallery code and agregated it with the progress bar gallery. Signed-off-by: Daker Fernandes Pinheiro --- declarativeimports/test/gallery/Busy.qml | 78 +++++++++++++++++++++ declarativeimports/test/gallery/Gallery.qml | 13 +--- 2 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 declarativeimports/test/gallery/Busy.qml diff --git a/declarativeimports/test/gallery/Busy.qml b/declarativeimports/test/gallery/Busy.qml new file mode 100644 index 000000000..8e77db1ec --- /dev/null +++ b/declarativeimports/test/gallery/Busy.qml @@ -0,0 +1,78 @@ +/* +* Copyright (C) 2011 by Daker Fernandes Pinheiro +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU Library General Public License as +* published by the Free Software Foundation; either version 2, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details +* +* You should have received a copy of the GNU Library General Public +* License along with this program; if not, write to the +* Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +import QtQuick 1.0 +import org.kde.plasma.components 0.1 as PlasmaComponents + +Column { + spacing: 20 + + Text { + font.pixelSize: 20 + text: "Busy Indicator" + } + + PlasmaComponents.BusyIndicator { } + + PlasmaComponents.BusyIndicator { running: true } + + Text { + font.pixelSize: 20 + text: "Progress Bar" + } + + Text { text: "Horizontal" } + + PlasmaComponents.ProgressBar { + value: 0.3 + } + + PlasmaComponents.ProgressBar { + indeterminate: true + } + + PlasmaComponents.ProgressBar { + minimumValue: 0 + maximumValue: 100 + value: 30 + } + + Text { text: "Vertical" } + Row { + spacing: 20 + PlasmaComponents.ProgressBar { + value: 0.3 + orientation: Qt.Vertical + width: 20 + height: 100 + } + PlasmaComponents.ProgressBar { + value: 0.4 + orientation: Qt.Vertical + width: 20 + height: 120 + } + PlasmaComponents.ProgressBar { + orientation: Qt.Vertical + width: 20 + height: 100 + indeterminate: true + } + } +} diff --git a/declarativeimports/test/gallery/Gallery.qml b/declarativeimports/test/gallery/Gallery.qml index 6d4f8407f..9ef246e3e 100644 --- a/declarativeimports/test/gallery/Gallery.qml +++ b/declarativeimports/test/gallery/Gallery.qml @@ -45,18 +45,7 @@ Rectangle { CheckableButtons { } - Column { - spacing: 20 - - Text { - font.pixelSize: 20 - text: "BusyIndicator" - } - - PlasmaComponents.BusyIndicator { } - - PlasmaComponents.BusyIndicator { running: true } - } + Busy { } Sliders { }