2
* This file is part of Checkbox
4
* Copyright 2014 Canonical Ltd.
7
* - Maciej Kisielewski <maciej.kisielewski@canonical.com>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; version 3.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
import Ubuntu.Components 1.1
24
import QtQuick.Layouts 1.1
26
/*! \brief Progress Box.
29
This widget is a ProgressBar-like item with some changes compared to
30
ProgressBar found in Ubuntu Components. This one uses layouts, so it can
31
fills the width of the components it is placed in. ProgressBox can display
32
an information about the progress prefixes by text set in `interlude` var.
33
If the box is to be narrower then the space required by full text,
34
interlude is ommited. The formatting of the text is as follows:
35
"$interlude $vlaue / $maximumValue"
42
Value to be used when filling progress bar.
44
property alias value: progressBar.value
47
Progress bar is entirely when value reaches maximumValue
49
property real maximumValue: 100
51
implicitWidth: units.gu(38)
52
implicitHeight: units.gu(0.3)
59
property real value: 50
60
property real maximumValue: progressBox.maximumValue
61
property real minimumValue: 0
62
property bool showProgressPercentage: false // for compability with underlaying styling
63
property bool indeterminate: false // for compability with underlaying styling
64
style: Theme.createStyleComponent("ProgressBarStyle.qml", progressBar)