Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtdesign-studio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
public-demos
qtdesign-studio
Commits
1116cff4
Commit
1116cff4
authored
Feb 13, 2020
by
Thomas Hartmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding simple coffee demo
parent
6fbdb8d3
Changes
71
Hide whitespace changes
Inline
Side-by-side
Showing
71 changed files
with
1781 additions
and
0 deletions
+1781
-0
playground/simplecoffee/AdjustPage.qml
playground/simplecoffee/AdjustPage.qml
+252
-0
playground/simplecoffee/NavigationButton.qml
playground/simplecoffee/NavigationButton.qml
+69
-0
playground/simplecoffee/PreparePage.qml
playground/simplecoffee/PreparePage.qml
+206
-0
playground/simplecoffee/Screen01.ui.qml
playground/simplecoffee/Screen01.ui.qml
+15
-0
playground/simplecoffee/SelectPage.qml
playground/simplecoffee/SelectPage.qml
+129
-0
playground/simplecoffee/coffee.qml
playground/simplecoffee/coffee.qml
+156
-0
playground/simplecoffee/fonts/fonts.txt
playground/simplecoffee/fonts/fonts.txt
+1
-0
playground/simplecoffee/images/cup structure/coffee_cup_large.png
...nd/simplecoffee/images/cup structure/coffee_cup_large.png
+3
-0
playground/simplecoffee/images/cup structure/coffee_cup_outline.png
.../simplecoffee/images/cup structure/coffee_cup_outline.png
+3
-0
playground/simplecoffee/images/cup structure/cup elements/coffee_cup_back.png
...fee/images/cup structure/cup elements/coffee_cup_back.png
+3
-0
playground/simplecoffee/images/cup structure/cup elements/coffee_cup_coverplate.png
...ages/cup structure/cup elements/coffee_cup_coverplate.png
+3
-0
playground/simplecoffee/images/cup structure/cup elements/coffee_cup_front.png
...ee/images/cup structure/cup elements/coffee_cup_front.png
+3
-0
playground/simplecoffee/images/cup structure/liquids/liquid_coffee.png
...mplecoffee/images/cup structure/liquids/liquid_coffee.png
+3
-0
playground/simplecoffee/images/cup structure/liquids/liquid_foam.png
...simplecoffee/images/cup structure/liquids/liquid_foam.png
+3
-0
playground/simplecoffee/images/cup structure/liquids/liquid_milk.png
...simplecoffee/images/cup structure/liquids/liquid_milk.png
+3
-0
playground/simplecoffee/images/icons/coffees/Americano.png
playground/simplecoffee/images/icons/coffees/Americano.png
+3
-0
playground/simplecoffee/images/icons/coffees/Espresso.png
playground/simplecoffee/images/icons/coffees/Espresso.png
+3
-0
playground/simplecoffee/images/icons/coffees/Latte.png
playground/simplecoffee/images/icons/coffees/Latte.png
+3
-0
playground/simplecoffee/images/icons/coffees/Macchiato.png
playground/simplecoffee/images/icons/coffees/Macchiato.png
+3
-0
playground/simplecoffee/images/icons/coffees/cappucino.png
playground/simplecoffee/images/icons/coffees/cappucino.png
+3
-0
playground/simplecoffee/images/icons/contents/coffee.png
playground/simplecoffee/images/icons/contents/coffee.png
+3
-0
playground/simplecoffee/images/icons/contents/milk.png
playground/simplecoffee/images/icons/contents/milk.png
+3
-0
playground/simplecoffee/images/icons/contents/sugar.png
playground/simplecoffee/images/icons/contents/sugar.png
+3
-0
playground/simplecoffee/images/ui controls/buttons/back/white.png
...nd/simplecoffee/images/ui controls/buttons/back/white.png
+3
-0
playground/simplecoffee/images/ui controls/buttons/go/white.png
...ound/simplecoffee/images/ui controls/buttons/go/white.png
+3
-0
playground/simplecoffee/images/ui controls/line.png
playground/simplecoffee/images/ui controls/line.png
+3
-0
playground/simplecoffee/qtquickcontrols2.conf
playground/simplecoffee/qtquickcontrols2.conf
+6
-0
playground/simplecoffee/simplecoffee.qmlproject
playground/simplecoffee/simplecoffee.qmlproject
+46
-0
playground/simplecoffee/styles/Default.zip
playground/simplecoffee/styles/Default.zip
+0
-0
playground/simplecoffee/styles/Default/Button.qml
playground/simplecoffee/styles/Default/Button.qml
+68
-0
playground/simplecoffee/styles/Default/CMakeLists.txt
playground/simplecoffee/styles/Default/CMakeLists.txt
+64
-0
playground/simplecoffee/styles/Default/CheckBox.qml
playground/simplecoffee/styles/Default/CheckBox.qml
+81
-0
playground/simplecoffee/styles/Default/DefaultStyle.qml
playground/simplecoffee/styles/Default/DefaultStyle.qml
+32
-0
playground/simplecoffee/styles/Default/Dial.qml
playground/simplecoffee/styles/Default/Dial.qml
+120
-0
playground/simplecoffee/styles/Default/ProgressBar.qml
playground/simplecoffee/styles/Default/ProgressBar.qml
+67
-0
playground/simplecoffee/styles/Default/RadioButton.qml
playground/simplecoffee/styles/Default/RadioButton.qml
+85
-0
playground/simplecoffee/styles/Default/Slider.qml
playground/simplecoffee/styles/Default/Slider.qml
+97
-0
playground/simplecoffee/styles/Default/SwipeView.qml
playground/simplecoffee/styles/Default/SwipeView.qml
+35
-0
playground/simplecoffee/styles/Default/Switch.qml
playground/simplecoffee/styles/Default/Switch.qml
+98
-0
playground/simplecoffee/styles/Default/images/button-disabled.png
...nd/simplecoffee/styles/Default/images/button-disabled.png
+3
-0
playground/simplecoffee/styles/Default/images/button-pressed.png
...und/simplecoffee/styles/Default/images/button-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/button.png
playground/simplecoffee/styles/Default/images/button.png
+3
-0
playground/simplecoffee/styles/Default/images/checkbox-checked-pressed.png
...coffee/styles/Default/images/checkbox-checked-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/checkbox-checked.png
...d/simplecoffee/styles/Default/images/checkbox-checked.png
+3
-0
playground/simplecoffee/styles/Default/images/checkbox-disabled.png
.../simplecoffee/styles/Default/images/checkbox-disabled.png
+3
-0
playground/simplecoffee/styles/Default/images/checkbox-partially-checked-pressed.png
...les/Default/images/checkbox-partially-checked-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/checkbox-partially-checked.png
...ffee/styles/Default/images/checkbox-partially-checked.png
+3
-0
playground/simplecoffee/styles/Default/images/checkbox-pressed.png
...d/simplecoffee/styles/Default/images/checkbox-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/checkbox.png
playground/simplecoffee/styles/Default/images/checkbox.png
+3
-0
playground/simplecoffee/styles/Default/images/dial-background-disabled.png
...coffee/styles/Default/images/dial-background-disabled.png
+3
-0
playground/simplecoffee/styles/Default/images/dial-background.png
...nd/simplecoffee/styles/Default/images/dial-background.png
+3
-0
playground/simplecoffee/styles/Default/images/dial-progress.png
...ound/simplecoffee/styles/Default/images/dial-progress.png
+3
-0
playground/simplecoffee/styles/Default/images/progressbar-background.png
...lecoffee/styles/Default/images/progressbar-background.png
+3
-0
playground/simplecoffee/styles/Default/images/progressbar-progress.png
...mplecoffee/styles/Default/images/progressbar-progress.png
+3
-0
playground/simplecoffee/styles/Default/images/radiobutton-checked-pressed.png
...fee/styles/Default/images/radiobutton-checked-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/radiobutton-checked.png
...implecoffee/styles/Default/images/radiobutton-checked.png
+3
-0
playground/simplecoffee/styles/Default/images/radiobutton-disabled.png
...mplecoffee/styles/Default/images/radiobutton-disabled.png
+3
-0
playground/simplecoffee/styles/Default/images/radiobutton-pressed.png
...implecoffee/styles/Default/images/radiobutton-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/radiobutton.png
...ground/simplecoffee/styles/Default/images/radiobutton.png
+3
-0
playground/simplecoffee/styles/Default/images/slider-background-disabled.png
...ffee/styles/Default/images/slider-background-disabled.png
+3
-0
playground/simplecoffee/styles/Default/images/slider-background.png
.../simplecoffee/styles/Default/images/slider-background.png
+3
-0
playground/simplecoffee/styles/Default/images/slider-handle-disabled-pressed.png
.../styles/Default/images/slider-handle-disabled-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/slider-handle-disabled.png
...lecoffee/styles/Default/images/slider-handle-disabled.png
+3
-0
playground/simplecoffee/styles/Default/images/slider-handle-pressed.png
...plecoffee/styles/Default/images/slider-handle-pressed.png
+3
-0
playground/simplecoffee/styles/Default/images/slider-handle.png
...ound/simplecoffee/styles/Default/images/slider-handle.png
+3
-0
playground/simplecoffee/styles/Default/images/slider-progress.png
...nd/simplecoffee/styles/Default/images/slider-progress.png
+3
-0
playground/simplecoffee/styles/Default/images/switch-bg.png
playground/simplecoffee/styles/Default/images/switch-bg.png
+3
-0
playground/simplecoffee/styles/Default/images/switch-handle.png
...ound/simplecoffee/styles/Default/images/switch-handle.png
+3
-0
playground/simplecoffee/styles/Default/images/switch-i.png
playground/simplecoffee/styles/Default/images/switch-i.png
+3
-0
playground/simplecoffee/styles/Default/images/switch-o.png
playground/simplecoffee/styles/Default/images/switch-o.png
+3
-0
playground/simplecoffee/styles/Default/qmldir
playground/simplecoffee/styles/Default/qmldir
+4
-0
No files found.
playground/simplecoffee/AdjustPage.qml
0 → 100644
View file @
1116cff4
/******************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Ultralite module.
**
** $QT_BEGIN_LICENSE:COMM$
**
** 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 The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
******************************************************************************/
import
QtQuick
2.0
Item
{
id
:
root
property
real
milkAmount
:
6
property
real
coffeeAmount
:
4
property
real
foamAmount
:
40
property
real
sugarAmount
:
2
property
string
coffeeName
:
""
signal
brew
(
string
coffeeName
,
real
coffeeAmount
,
real
milkAmount
,
real
foamAmount
)
signal
back
Rectangle
{
id
:
rectangle
color
:
"
#443224
"
anchors.fill
:
parent
Image
{
id
:
background
x
:
12
y
:
30
source
:
"
images/cup structure/cup elements/coffee_cup_back.png
"
}
Item
{
id
:
foam
x
:
12
width
:
457
y
:
milk
.
y
-
foamAmount
height
:
background
.
height
-
(
y
-
background
.
y
)
clip
:
true
Image
{
anchors.bottom
:
parent
.
bottom
source
:
"
images/cup structure/liquids/liquid_foam.png
"
}
visible
:
coffeeName
!==
"
Espresso
"
}
Item
{
id
:
milk
x
:
12
width
:
457
y
:
background
.
y
+
(
400
-
coffee
.
height
-
root
.
milkAmount
*
15
+
20
)
height
:
background
.
height
-
(
y
-
background
.
y
)
clip
:
true
Image
{
source
:
"
images/cup structure/liquids/liquid_milk.png
"
anchors.bottom
:
parent
.
bottom
}
visible
:
coffeeName
!==
"
Espresso
"
}
Item
{
id
:
coffee
x
:
12
width
:
457
height
:
root
.
coffeeAmount
*
40
anchors.bottom
:
background
.
bottom
clip
:
true
Image
{
anchors.bottom
:
parent
.
bottom
source
:
"
images/cup structure/liquids/liquid_coffee.png
"
}
}
Image
{
id
:
cupFront
x
:
11
y
:
30
source
:
"
images/cup structure/cup elements/coffee_cup_front.png
"
}
Text
{
x
:
499
y
:
230
color
:
"
#ffffff
"
text
:
qsTr
(
"
HOT MILK
"
)
font.pixelSize
:
18
visible
:
coffeeName
!==
"
Espresso
"
}
Text
{
x
:
486
y
:
328
color
:
"
#ffffff
"
text
:
qsTr
(
"
ESPRESSO COFFEE
"
)
font.pixelSize
:
18
}
Image
{
x
:
414
y
:
134
visible
:
coffeeName
!==
"
Espresso
"
source
:
"
images/ui controls/line.png
"
}
Text
{
x
:
512
y
:
119
color
:
"
#ffffff
"
text
:
qsTr
(
"
MILK FOAM
"
)
font.pixelSize
:
18
visible
:
coffeeName
!==
"
Espresso
"
}
Image
{
x
:
404
y
:
242
source
:
"
images/ui controls/line.png
"
visible
:
coffeeName
!==
"
Espresso
"
}
Image
{
x
:
388
y
:
342
source
:
"
images/ui controls/line.png
"
}
Item
{
id
:
sugarItem
x
:
181
y
:
279
width
:
119
height
:
111
Rectangle
{
x
:
21
y
:
28
width
:
48
height
:
48
color
:
"
#ffffff
"
opacity
:
root
.
sugarAmount
/
10
}
Rectangle
{
x
:
74
y
:
60
width
:
32
height
:
32
color
:
"
#ffffff
"
visible
:
root
.
sugarAmount
>
5
opacity
:
root
.
sugarAmount
/
30
}
Rectangle
{
x
:
45
y
:
82
width
:
24
height
:
24
color
:
"
#ffffff
"
opacity
:
root
.
sugarAmount
/
25
}
}
}
Rectangle
{
id
:
slider
color
:
"
grey
"
width
:
20
radius
:
width
/
2
height
:
parent
.
height
*
0.65
x
:
parent
.
width
*
0.9
y
:
parent
.
height
*
0.10
property
real
minY
:
0
property
real
maxY
:
height
Rectangle
{
id
:
handle
x
:
-
width
/
2
+
parent
.
width
/
2
y
:
(
10
-
(
coffeeName
!==
"
Espresso
"
?
milkAmount
:
coffeeAmount
))
/
10
*
slider
.
maxY
-
width
/
2
width
:
root
.
width
*
0.07
height
:
width
radius
:
width
/
2
color
:
"
white
"
}
MouseArea
{
id
:
ta
anchors.fill
:
parent
anchors.margins
:
-
10
onMouseYChanged
:
{
var
newY
=
ta
.
mouseY
var
value
=
Math
.
max
(
slider
.
minY
,
Math
.
min
(
slider
.
maxY
,
newY
))
handle
.
y
=
value
-
handle
.
width
/
2
if
(
coffeeName
!==
"
Espresso
"
)
milkAmount
=
10
-
10
*
value
/
slider
.
maxY
else
coffeeAmount
=
10
-
10
*
value
/
slider
.
maxY
}
}
}
Image
{
source
:
"
images/icons/contents/milk.png
"
anchors.horizontalCenter
:
slider
.
horizontalCenter
anchors.bottom
:
slider
.
top
}
NavigationButton
{
text
:
"
Brew
"
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
onClicked
:
brew
(
coffeeName
,
coffeeAmount
,
milkAmount
,
foamAmount
)
}
NavigationButton
{
forward
:
false
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
onClicked
:
back
()
}
function
startAdjusting
(
name
,
coffeePreset
,
milkPreset
,
foamPreset
)
{
coffeeName
=
name
coffeeAmount
=
coffeePreset
milkAmount
=
milkPreset
foamAmount
=
foamPreset
}
}
playground/simplecoffee/NavigationButton.qml
0 → 100644
View file @
1116cff4
/******************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Ultralite module.
**
** $QT_BEGIN_LICENSE:COMM$
**
** 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 The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
******************************************************************************/
import
QtQuick
2.12
Item
{
id
:
root
signal
clicked
property
alias
text
:
brewLabel
.
text
property
bool
forward
:
true
width
:
row
.
width
height
:
row
.
height
Row
{
id
:
row
spacing
:
17
Image
{
id
:
image
anchors.verticalCenter
:
parent
.
verticalCenter
source
:
"
images/ui controls/buttons/back/white.png
"
visible
:
!
forward
}
Text
{
id
:
brewLabel
color
:
"
#ffffff
"
font.pixelSize
:
64
}
Image
{
id
:
image2
anchors.verticalCenter
:
parent
.
verticalCenter
source
:
"
images/ui controls/buttons/go/white.png
"
visible
:
forward
}
}
MouseArea
{
id
:
mouseArea
anchors.fill
:
row
anchors.margins
:
-
10
onClicked
:
root
.
clicked
()
}
}
playground/simplecoffee/PreparePage.qml
0 → 100644
View file @
1116cff4
/******************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Ultralite module.
**
** $QT_BEGIN_LICENSE:COMM$
**
** 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 The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
******************************************************************************/
import
QtQuick
2.10
Item
{
id
:
root
property
real
milkAmount
:
0
property
real
coffeeAmount
:
0
property
real
foamAmount
:
0
property
real
milkTarget
:
0
property
real
coffeeTarget
:
0
property
real
foamTarget
:
0
signal
done
SequentialAnimation
{
id
:
brewAnimation
PauseAnimation
{
duration
:
200
}
NumberAnimation
{
target
:
root
property
:
"
coffeeAmount
"
duration
:
3000
from
:
0
to
:
coffeeTarget
}
PauseAnimation
{
duration
:
milkTarget
===
0
?
0
:
200
}
NumberAnimation
{
target
:
root
property
:
"
milkAmount
"
duration
:
milkTarget
===
0
?
0
:
1000
from
:
0
to
:
milkTarget
}
PauseAnimation
{
duration
:
foamTarget
===
0
?
0
:
200
}
NumberAnimation
{
target
:
root
property
:
"
foamAmount
"
duration
:
foamTarget
===
0
?
0
:
500
from
:
0
to
:
foamTarget
}
}
Rectangle
{
id
:
rectangle
color
:
"
#443224
"
anchors.fill
:
parent
Image
{
id
:
background
x
:
12
y
:
30
source
:
"
images/cup structure/cup elements/coffee_cup_back.png
"
}
Item
{
id
:
foam
x
:
12
width
:
457
y
:
milk
.
y
-
foamAmount
height
:
background
.
height
-
(
y
-
background
.
y
)
clip
:
true
Image
{
anchors.bottom
:
parent
.
bottom
source
:
"
images/cup structure/liquids/liquid_foam.png
"
}
}
Item
{
id
:
milk
x
:
12
width
:
457
y
:
background
.
y
+
(
400
-
coffee
.
height
-
root
.
milkAmount
*
15
+
20
)
height
:
background
.
height
-
(
y
-
background
.
y
)
clip
:
true
Image
{
source
:
"
images/cup structure/liquids/liquid_milk.png
"
anchors.bottom
:
parent
.
bottom
}
}
Item
{
id
:
coffee
x
:
12
width
:
457
height
:
root
.
coffeeAmount
*
40
anchors.bottom
:
background
.
bottom
clip
:
true
Image
{
anchors.bottom
:
parent
.
bottom
source
:
"
images/cup structure/liquids/liquid_coffee.png
"
}
}
Image
{
id
:
cupFront
x
:
11
y
:
30
source
:
"
images/cup structure/cup elements/coffee_cup_front.png
"
}
Column
{
id
:
textColumn
anchors.left
:
background
.
right
anchors.top
:
background
.
top
Text
{
font.pixelSize
:
58
color
:
"
#ffffff
"
text
:
"
Brewing
"
}
Text
{
id
:
coffeeText
font.pixelSize
:
58
color
:
"
#ffffff
"
}
Text
{
font.pixelSize
:
64
color
:
"
#ffffff
"
text
:
!
brewingTimer
.
running
?
"
...
"
:
brewingTimer
.
counter
%
4
==
3
?
"
...
"
:
brewingTimer
.
counter
%
4
==
2
?
"
..
"
:
brewingTimer
.
counter
%
4
==
1
?
"
.
"
:
""
}
}
NavigationButton
{
id
:
doneText
anchors.bottom
:
background
.
bottom
anchors.left
:
textColumn
.
left
visible
:
!
brewAnimation
.
running
text
:
"
DONE
"
forward
:
false
onClicked
:
done
()
}
}
Timer
{
id
:
brewingTimer
property
bool
ledEnabled
:
false
property
int
counter
:
0
repeat
:
true
interval
:
500
running
:
brewAnimation
.
running
onRunningChanged
:
counter
=
0
onTriggered
:
{
counter
++
ledEnabled
=
!
ledEnabled
// LED.setEnabled(ledEnabled)
}
}
function
startBrewing
(
name
,
coffeeTarget
,
milkTarget
,
foamTarget
)
{
coffeeText
.
text
=
name
coffeeAmount
=
0
milkAmount
=
0
foamAmount
=
0
root
.
coffeeTarget
=
coffeeTarget
root
.
milkTarget
=
milkTarget
root
.
foamTarget
=
foamTarget
brewAnimation
.
start
()
}
}
playground/simplecoffee/Screen01.ui.qml
0 → 100644
View file @
1116cff4
import
QtQuick
2.12
import
mcucoffee
1.0
Rectangle
{
width
:
Constants
.
width
height
:
Constants
.
height
color
:
Constants
.
backgroundColor
Text
{
text
:
qsTr
(
"
Hello mcucoffee
"
)
anchors.centerIn
:
parent
font.family
:
Constants
.
font
.
family
}
}
playground/simplecoffee/SelectPage.qml
0 → 100644
View file @
1116cff4
/******************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Quick Ultralite module.
**
** $QT_BEGIN_LICENSE:COMM$
**
** 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 The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
******************************************************************************/
import
QtQuick
2.0
Item
{
signal
select
(
string
coffeeName
,
real
coffeeAmount
,
real
milkAmount
,
real
foamAmount
)
Text
{
font.pixelSize
:
64
color
:
"
#ffffff
"
text
:
"
Select coffee
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
16
}
Row
{
id
:
row
anchors.fill
:
parent
spacing
:
(
parent
.
width
-
espresso
.
width
*
3
)
/
2
Item
{
width
:
espresso
.
width
height
:
parent
.
height
Image
{
id
:
espresso
y
:
120
height
:
parent
.
height
fillMode
:
Image
.
PreserveAspectFit
source
:
"
images/icons/coffees/Espresso.png
"
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
select
(
"
Espresso
"
,
6
,
0
,
0
);
}
}
}
Text
{
font.pixelSize
:
32
color
:
"
#ffffff
"
text
:
"
Espresso
"
y
:
parent
.
height
*
0.83
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}