Re-design for Coffee Machine example

Implementing new design for Coffee Machine example, more information
on how the new design is going to look like in QTBUG-116402 and in
its subtasks.

Removed unused imports folder.

Changed the names of Home.ui.qml to Home.qml and FilledCup.qml to
Cup.qml in Coffee.qrc file.

Changed the names of the files stated above also in qmldir.

Fixes: QTBUG-116403
Fixes: QTBUG-116402
Task-number: QTBUG-116404
Change-Id: Ib4d33e28ce1e3f268172007e85f36eb1280d11a4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Konsta Alajärvi 2023-09-01 13:48:19 +03:00
parent 0bb20e154c
commit b40aaf48ca
81 changed files with 2384 additions and 1225 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -1,98 +1,208 @@
// Copyright (C) 2017 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
ApplicationFlowForm {
id: applicationFlow
state: "initial"
state: "Home"
color: Colors.currentTheme.background
property int animationDuration: 400
//! [0]
choosingCoffee.brewButtonSelection.onClicked: {
applicationFlow.state = "settings"
applicationFlow.choosingCoffee.milkSlider.value = applicationFlow.choosingCoffee.sideBar.currentMilk
applicationFlow.choosingCoffee.sugarSlider.value = 2
}
//! [0]
property string platform: Qt.platform.os
property string mode: ""
property int brewTime
property int coffeeAmount
property int milkAmount
property int foamAmount
property double sugarAmount
choosingCoffee.sideBar.onCoffeeSelected: {
applicationFlow.state = "selection"
}
choosingCoffee.backButton.onClicked: {
applicationFlow.state = "selection"
}
//! [2]
choosingCoffee.brewButton.onClicked: {
applicationFlow.state = "empty cup"
}
//! [2]
//! [1]
emptyCup.continueButton.onClicked: {
applicationFlow.state = "brewing"
brewing.coffeeName = choosingCoffee.sideBar.currentCoffee
brewing.start()
}
//! [1]
brewing.onFinished: {
finalAnimation.start()
}
SequentialAnimation {
id: finalAnimation
PropertyAction {
target: applicationFlow
property: "state"
value: "finished"
}
PauseAnimation {
duration: 1000
}
PropertyAction {
target: applicationFlow
property: "state"
value: "start"
}
PauseAnimation {
duration: applicationFlow.animationDuration
}
PauseAnimation {
duration: 400
function themeButton() {
if (Colors.currentTheme == Colors.dark) {
Colors.currentTheme = Colors.light
} else {
Colors.currentTheme = Colors.dark
}
}
Behavior on choosingCoffee.x {
PropertyAnimation {
duration: applicationFlow.animationDuration
easing.type: Easing.InOutQuad
}
function cappuccino() {
applicationFlow.state = "Settings"
applicationFlow.coffeeName = "Cappuccino"
coffeeAmount = 60
milkAmount = 60
foamAmount = 60
brewTime = 5000
stack.push(settings)
coffeeText.text = "Cappuccino"
}
function espresso() {
applicationFlow.state = "Settings"
applicationFlow.coffeeName = "Espresso"
coffeeAmount = 80
milkAmount = 0
foamAmount = 0
brewTime = 4000
stack.push(settings)
coffeeText.text = "Espresso"
}
function latte() {
applicationFlow.state = "Settings"
applicationFlow.coffeeName = "Latte"
coffeeAmount = 40
milkAmount = 20
foamAmount = 60
brewTime = 6000
stack.push(settings)
coffeeText.text = "Latte"
}
function macchiato() {
applicationFlow.state = "Settings"
applicationFlow.coffeeName = "Macchiato"
coffeeAmount = 100
milkAmount = 5
foamAmount = 10
brewTime = 8000
stack.push(settings)
coffeeText.text = "Macchiato"
}
Behavior on emptyCup.x {
PropertyAnimation {
duration: applicationFlow.animationDuration
easing.type: Easing.InOutQuad
home.getStartedbutton.onClicked: {
applicationFlow.state = "Coffee-selection"
stack.push(choosingCoffee)
}
function backButton() {
stack.pop()
applicationFlow.state = applicationFlow.previousState
}
function confirmButton() {
stack.push(insert)
applicationFlow.state = "Insert"
}
function continueButton() {
stack.push(progress)
applicationFlow.state = "Progress"
applicationFlow.progressBarValue = 1
applicationFlow.progressCupState = "1"
if (applicationFlow.coffeeName == "Cappuccino") {
applicationFlow.cappuccinos = applicationFlow.cappuccinos - 1
} else if (applicationFlow.coffeeName == "Espresso") {
applicationFlow.espressos = applicationFlow.espressos - 1
} else if (applicationFlow.coffeeName == "Latte") {
applicationFlow.lattes = applicationFlow.lattes - 1
} else {
applicationFlow.macchiatos = applicationFlow.macchiatos - 1
}
}
Behavior on brewing.x {
PropertyAnimation {
duration: applicationFlow.animationDuration
easing.type: Easing.InOutQuad
}
function cancelButton() {
applicationFlow.state = "Coffee-selection"
stack.pop(stack.get(1))
}
function onFinished() {
stack.push(ready)
applicationFlow.state = "Ready"
}
function onReturnToStart() {
stack.pop(stack.get(0))
applicationFlow.state = "Home"
applicationFlow.progressBarValue = 0
applicationFlow.progressCupState = "0"
}
states: [
State {
name: "Home"
PropertyChanges {
target: toolbar
backButton.opacity: 0
backButton.enabled: false
themeButton.opacity: 0
themeButton.enabled: false
logo.sourceSize.width: 70
logo.sourceSize.height: 50
}
PropertyChanges {
target: coffeeText
visible: false
}
PropertyChanges {
target: stack
anchors.top: coffeeText.bottom
}
},
State {
name: "Coffee-selection"
PropertyChanges {
target: applicationFlow
previousState: "Home"
}
PropertyChanges {
target: coffeeText
text: "Coffee Selection"
}
PropertyChanges {
target: toolbar
backButton.opacity: 0
backButton.enabled: false
}
PropertyChanges {
target: stack
anchors.top: coffeeText.bottom
}
},
State {
name: "Settings"
PropertyChanges {
target: applicationFlow
previousState: "Coffee-selection"
}
PropertyChanges {
target: stack
anchors.top: coffeeText.bottom
}
},
State {
name: "Insert"
PropertyChanges {
target: applicationFlow
previousState: "Settings"
}
PropertyChanges {
target: stack
anchors.top: coffeeText.bottom
}
},
State {
name: "Progress"
PropertyChanges {
target: applicationFlow
previousState: "Insert"
}
PropertyChanges {
target: toolbar
backButton.opacity: 0
backButton.enabled: false
}
PropertyChanges {
target: stack
anchors.top: coffeeText.bottom
}
},
State {
name: "Ready"
PropertyChanges {
target: applicationFlow
previousState: "Progress"
}
PropertyChanges {
target: toolbar
backButton.opacity: 0
backButton.enabled: false
}
PropertyChanges {
target: stack
anchors.top: coffeeText.bottom
}
}
]
}

View File

@ -1,151 +1,138 @@
// Copyright (C) 2017 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick 2.4
import Coffee 1.0
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
Rectangle {
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
id: root
width: Constants.width
height: Constants.height
property string previousState: ""
property string coffeeName: ""
property alias home: home
property alias choosingCoffee: choosingCoffee
property alias brewing: brewing
property alias emptyCup: emptyCup
property alias settings: settings
property alias insert: insert
property alias ready: ready
property alias toolbar: toolbar
property alias progress: progress
property alias coffeeText: coffeeText
property alias stack: stack
property int progressBarValue: 0
property string progressCupState: "0"
property int cappuccinos: 4
property int lattes: 5
property int espressos: 6
property int macchiatos: 4
color: Constants.backgroundColor
state: "initial"
EmptyCupForm {
id: emptyCup
x: Constants.width
y: 0
CustomToolBar {
id: toolbar
anchors.topMargin: parent.height / 80
width: parent.width
height: 35
anchors.top: parent.top
}
Brewing {
id: brewing
x: Constants.width * 2
y: 0
Text {
id: coffeeText
text: "Coffee Selection"
font.pixelSize: 24
font.family: "Titillium Web"
font.weight: 700
color: Colors.currentTheme.textColor
anchors.top: toolbar.bottom
anchors.topMargin: parent.height / 20
leftPadding: 20
}
ChoosingCoffee {
id: choosingCoffee
}
states: [
State {
name: "initial"
},
State {
name: "selection"
PropertyChanges {
target: choosingCoffee
selected: true
x: Constants.defaultX
}
},
State {
name: "settings"
PropertyChanges {
target: choosingCoffee
x: -Constants.leftSideBarWidth
selected: false
inSettings: true
}
PropertyChanges {
target: emptyCup
x: Constants.width
y: 0
}
PropertyChanges {
target: brewing
x: Constants.width * 2
y: 0
}
},
State {
name: "empty cup"
PropertyChanges {
target: emptyCup
x: 0
}
PropertyChanges {
target: choosingCoffee
x: -Constants.width - Constants.leftSideBarWidth
inSettings: true
selected: false
}
PropertyChanges {
target: brewing
x: Constants.width
}
},
State {
name: "brewing"
PropertyChanges {
target: emptyCup
x: -Constants.width
}
PropertyChanges {
target: brewing
x: 0
}
PropertyChanges {
target: choosingCoffee
x: -Constants.width * 2 - Constants.leftSideBarWidth
}
},
State {
name: "finished"
PropertyChanges {
target: emptyCup
x: -Constants.width
y: 0
visible: false
}
PropertyChanges {
target: brewing
x: 0
}
PropertyChanges {
target: choosingCoffee
x: -Constants.leftSideBarWidth - Constants.width
questionVisible: true
inSettings: true
}
},
State {
name: "start"
PropertyChanges {
target: emptyCup
x: 0
visible: false
}
PropertyChanges {
target: brewing
x: Constants.width
y: 0
}
PropertyChanges {
target: choosingCoffee
x: 0
inSettings: true
StackView {
id: stack
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: parent.height / 20
initialItem: Home {
id: home
visible: true
state: applicationFlow.mode
}
pushEnter: Transition {
PropertyAnimation {
property: "x"
from: stack.width
to: 0
duration: 400
}
}
]
pushExit: Transition {
PropertyAnimation {
property: "x"
from: 0
to: -stack.width
duration: 400
}
}
popEnter: Transition {
PropertyAnimation {
property: "x"
from: -stack.width
to: 0
duration: 400
}
}
popExit: Transition {
PropertyAnimation {
property: "x"
from: 0
to: stack.width
duration: 400
}
}
}
Component {
id: choosingCoffee
ChoosingCoffee {
visible: true
state: applicationFlow.mode
}
}
Component {
id: settings
Settings {
foamAmount: applicationFlow.foamAmount
milkAmount: applicationFlow.milkAmount
coffeeAmount: applicationFlow.coffeeAmount
state: applicationFlow.mode
}
}
Component {
id: insert
Insert {
state: applicationFlow.mode
}
}
Component {
id: progress
Progress {
brewTime: applicationFlow.brewTime
coffeeAmount: applicationFlow.coffeeAmount
milkAmount: applicationFlow.milkAmount
foamAmount: applicationFlow.foamAmount
sugarAmount: applicationFlow.sugarAmount
state: applicationFlow.mode
progressBarValue: root.progressBarValue
cup.state: root.progressCupState
}
}
Component {
id: ready
Ready {
foamAmount: applicationFlow.foamAmount
milkAmount: applicationFlow.milkAmount
coffeeAmount: applicationFlow.coffeeAmount
sugarAmount: applicationFlow.sugarAmount
state: applicationFlow.mode
}
}
}

View File

@ -1,52 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
//! [0]
BrewingForm {
id: root
function start() {
animation.start()
}
signal finished()
SequentialAnimation {
id: animation
PauseAnimation {
duration: 1500
}
PropertyAction {
target: root
property: "state"
value: "coffee"
}
PauseAnimation {
duration: 1500
}
PropertyAction {
target: root
property: "state"
value: "milk"
}
PauseAnimation {
duration: 1500
}
ScriptAction {
script: root.finished()
}
}
Behavior on cup.coffeeAmount {
PropertyAnimation {
}
}
Behavior on cup.milkAmount {
PropertyAnimation {
}
}
}
//! [0]

View File

@ -1,72 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import Coffee
Item {
id: root
width: Constants.width
height: Constants.height
clip: true
property string coffeeName: qsTr("Cappucino")
property alias cup: cup
state: "initial state"
Rectangle {
id: rectangle
color: Constants.backgroundColor
anchors.fill: parent
CupForm {
id: cup
x: 256
y: 96
anchors.horizontalCenterOffset: 150
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
questionVisible: false
coffeeLabel: ""
showLabels: false
milkAmount: 0
coffeeAmount: 0
sugarAmount: 0
}
}
Text {
id: brewLabel
color: "#ffffff"
text: qsTr("Making ") + root.coffeeName
anchors.topMargin: Constants.defaultMargin
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
font.family: Constants.fontFamily
wrapMode: Text.WrapAnywhere
font.pixelSize: 64
font.capitalization: Font.AllUppercase
}
states: [
State {
name: "coffee"
PropertyChanges {
target: cup
coffeeAmount: 4
}
},
State {
name: "milk"
PropertyChanges {
target: cup
milkAmount: 6
coffeeAmount: 4
}
PropertyChanges {
target: brewLabel
text: root.coffeeName + qsTr(" Ready")
}
}
]
}

View File

@ -1,11 +1,9 @@
# Copyright (C) 2022 The Qt Company Ltd.
# Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(coffee LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
@ -13,11 +11,60 @@ endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
qt_standard_project_setup(REQUIRES 6.6)
qt_add_executable(coffee
main.cpp
)
set_source_files_properties(Colors.qml PROPERTIES
QT_QML_SINGLETON_TYPE TRUE
)
qt_add_qml_module(coffee
URI Coffee
QML_FILES
ApplicationFlow.qml
ApplicationFlowForm.ui.qml
ChoosingCoffee.qml
CoffeeCard.qml
Colors.qml
CustomButton.qml
CustomSlider.qml
CustomToolBar.qml
Cup.qml
Home.qml
Insert.qml
main.qml
Progress.qml
Ready.qml
Settings.qml
RESOURCES
qtquickcontrols2.conf
images/Cups/card_cup_dark.svg
images/Cups/card_cup_light.svg
images/Cups/dark_cup.svgz
images/Cups/home_dark.svg
images/Cups/home_light.svg
images/Cups/light_cup.svgz
images/icons/check.svg
images/icons/dark_mode_black_24dp.svg
images/icons/ellipse_dark.svg
images/icons/ellipse_light.svg
images/icons/keyboard_backspace_black.svg
images/icons/keyboard_backspace_black_left.svg
images/icons/keyboard_backspace_black_right.svg
images/icons/keyboard_backspace_white_left.svg
images/icons/keyboard_backspace_white_right.svg
images/icons/light_mode_black_24dp.svg
images/icons/Polygon.svg
images/icons/Qt-logo-white-transparent.svg
images/Ingredients/espresso_coffee.svg
images/Ingredients/Milk_foam.svg
images/Ingredients/milk.svg
images/Ingredients/sugar.svg
)
set_target_properties(coffee PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
@ -30,52 +77,6 @@ target_link_libraries(coffee PRIVATE
Qt6::Quick
)
# Resources:
set(qml_resource_files
"ApplicationFlow.qml"
"ApplicationFlowForm.ui.qml"
"Brewing.qml"
"BrewingForm.ui.qml"
"ChoosingCoffee.ui.qml"
"CoffeeButton.qml"
"CupForm.ui.qml"
"EmptyCupForm.ui.qml"
"NavigationButton.ui.qml"
"SideBar.qml"
"SideBarForm.ui.qml"
"images/cup structure/coffee_cup_large.png"
"images/cup structure/coffee_cup_outline.png"
"images/cup structure/cup elements/coffee_cup_back.png"
"images/cup structure/cup elements/coffee_cup_coverplate.png"
"images/cup structure/cup elements/coffee_cup_front.png"
"images/cup structure/liquids/liquid_coffee.png"
"images/cup structure/liquids/liquid_foam.png"
"images/cup structure/liquids/liquid_milk.png"
"images/icons/coffees/Americano.png"
"images/icons/coffees/Espresso.png"
"images/icons/coffees/Latte.png"
"images/icons/coffees/Macchiato.png"
"images/icons/coffees/cappucino.png"
"images/icons/contents/coffee.png"
"images/icons/contents/milk.png"
"images/icons/contents/sugar.png"
"images/ui controls/buttons/back/white.png"
"images/ui controls/buttons/go/white.png"
"images/ui controls/line.png"
"imports/Coffee/Constants.qml"
"imports/Coffee/TitilliumWeb-Regular.ttf"
"imports/Coffee/qmldir"
"main.qml"
"qtquickcontrols2.conf"
)
qt_add_resources(coffee "qml"
PREFIX
"/"
FILES
${qml_resource_files}
)
install(TARGETS coffee
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"

View File

@ -0,0 +1,81 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Effects
Item {
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
id: root
property alias cappuccinoButton: cappuccino.button
property alias latteButton: latte.button
property alias espressoButton: espresso.button
property alias macchiatoButton: macchiato.button
property alias cards: cards
property alias cappuccino: cappuccino
property alias macchiato: macchiato
property alias espresso: espresso
property alias latte: latte
states: [
State {
name: "portrait"
PropertyChanges {
target: cards
flow: GridLayout.TopToBottom
rows: 2
}
},
State {
name: "landscape"
PropertyChanges {
target: cards
flow: GridLayout.LeftToRight
columns: 4
columnSpacing: 25
}
}
]
GridLayout {
id: cards
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
rowSpacing: 20
columnSpacing: 20
CoffeeCard {
id: cappuccino
coffeeName: "Cappuccino"
ingredients: "Milk, Espresso, Foam"
time: 2
cupsLeft: applicationFlow.cappuccinos
button.onClicked: applicationFlow.cappuccino()
}
CoffeeCard {
id: latte
coffeeName: "Latte"
ingredients: "Coffee, Foam"
time: 3
cupsLeft: applicationFlow.lattes
button.onClicked: applicationFlow.latte()
}
CoffeeCard {
id: espresso
coffeeName: "Espresso"
ingredients: "Milk, Espresso"
time: 2
cupsLeft: applicationFlow.espressos
button.onClicked: applicationFlow.espresso()
}
CoffeeCard {
id: macchiato
coffeeName: "Macchiato"
ingredients: "Milk foam, Espresso"
time: 4
cupsLeft: applicationFlow.macchiatos
button.onClicked: applicationFlow.macchiato()
}
}
}

View File

@ -1,186 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
import Coffee
Item {
id: root
width: Constants.width + Constants.leftSideBarWidth
height: Constants.height
property alias milkSlider: milkSlider
property alias sugarSlider: sugarSlider
property alias brewButtonSelection: brewButtonSelection
property bool selected: false
property alias brewButton: brewButton
property alias sideBar: sideBar
property alias backButton: backButton
property alias questionVisible: cup.questionVisible
property real coffeeAmount: 5
property bool inSettings: false
state: "initial state"
Rectangle {
id: rectangle
color: Constants.backgroundColor
anchors.fill: parent
}
Rectangle {
id: rightSideBar
x: 658
y: 0
width: Constants.leftSideBarWidth
height: 768
color: "#eec1a2"
visible: false
anchors.right: parent.right
Column {
spacing: 32
anchors.bottom: brewButton.top
anchors.bottomMargin: 100
anchors.horizontalCenter: parent.horizontalCenter
Slider {
id: milkSlider
width: 256
height: 48
to: 10
value: 6
Image {
x: 48
y: -12
source: "images/icons/contents/milk.png"
}
}
Slider {
id: sugarSlider
width: 256
height: 48
to: 10
stepSize: 1
value: 0
Image {
x: 48
y: -12
source: "images/icons/contents/sugar.png"
}
}
}
NavigationButton {
id: brewButton
text: "Brew"
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: Constants.defaultMargin
anchors.bottomMargin: Constants.defaultMargin
}
}
SideBar {
id: sideBar
width: Constants.leftSideBarWidth
}
states: [
State {
name: "initial state"
when: !root.selected && !root.inSettings
},
State {
name: "selected state"
when: root.selected
PropertyChanges {
target: cup
questionVisible: false
visible: true
}
PropertyChanges {
target: brewButton
visible: true
}
PropertyChanges {
target: brewButtonSelection
visible: true
}
},
State {
name: "settings"
when: root.inSettings
PropertyChanges {
target: cup
x: 354
y: 0
questionVisible: false
visible: true
milkAmount: milkSlider.value
sugarAmount: sugarSlider.value
}
PropertyChanges {
target: brewButton
visible: true
}
PropertyChanges {
target: backButton
opacity: 1
}
PropertyChanges {
target: rightSideBar
visible: true
}
}
]
CupForm {
id: cup
anchors.right: rightSideBar.left
anchors.left: sideBar.right
visible: true
milkAmount: sideBar.currentMilk
coffeeAmount: sideBar.currentCoffeeAmount
coffeeLabel: sideBar.currentCoffee
questionVisible: true
}
NavigationButton {
id: backButton
text: "Back"
opacity: 0
anchors.leftMargin: Constants.defaultMargin
anchors.bottom: parent.bottom
anchors.left: sideBar.right
anchors.bottomMargin: Constants.defaultMargin
forward: false
}
NavigationButton {
id: brewButtonSelection
anchors.left: sideBar.right
anchors.leftMargin: Constants.defaultMargin
anchors.bottom: parent.bottom
anchors.bottomMargin: Constants.defaultMargin
visible: false
}
}

View File

@ -0,0 +1,44 @@
<RCC>
<qresource prefix="/qt/qml/Coffee">
<file>Colors.qml</file>
<file>CoffeeCard.qml</file>
<file>Ready.qml</file>
<file>Progress.qml</file>
<file>CustomToolBar.qml</file>
<file>Cup.qml</file>
<file>Insert.qml</file>
<file>Home.qml</file>
<file>Settings.qml</file>
<file>CustomButton.qml</file>
<file>ChoosingCoffee.qml</file>
<file>ApplicationFlowForm.ui.qml</file>
<file>CustomSlider.qml</file>
<file>ApplicationFlow.qml</file>
<file>main.qml</file>
<file>qtquickcontrols2.conf</file>
<file>images/icons/light_mode_black_24dp.svg</file>
<file>images/icons/dark_mode_black_24dp.svg</file>
<file>images/icons/Qt-logo-white-transparent.svg</file>
<file>images/icons/Polygon.svg</file>
<file>images/icons/keyboard_backspace_white_right.svg</file>
<file>images/icons/keyboard_backspace_white_left.svg</file>
<file>images/icons/keyboard_backspace_black_right.svg</file>
<file>images/icons/keyboard_backspace_black_left.svg</file>
<file>images/icons/keyboard_backspace_black.svg</file>
<file>images/icons/ellipse_light.svg</file>
<file>images/icons/ellipse_dark.svg</file>
<file>images/icons/check.svg</file>
<file>images/Ingredients/Milk_foam.svg</file>
<file>images/Ingredients/sugar.svg</file>
<file>images/Ingredients/milk.svg</file>
<file>images/Ingredients/espresso_coffee.svg</file>
<file>images/Cups/light_cup.svgz</file>
<file>images/Cups/home_light.svg</file>
<file>images/Cups/home_dark.svg</file>
<file>images/Cups/dark_cup.svgz</file>
<file>images/Cups/card_cup_light.svg</file>
<file>images/Cups/card_cup_dark.svg</file>
<file>qmldir</file>
</qresource>
<qresource prefix="/"/>
</RCC>

View File

@ -1,111 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
import Coffee
Image {
id: root
source: "images/icons/coffees/cappucino.png"
signal clicked
property int duration: 250
property alias text: label.text
//! [0]
MouseArea {
anchors.fill: parent
onClicked: root.clicked()
onPressed: {
glow.visible = true
animation1.start()
animation2.start()
}
}
//! [0]
Rectangle {
id: glow
visible: false
width: 250
height: 250
color: "#00000000"
radius: 125
scale: 1.05
border.color: "#ffffff"
}
Label {
id: label
x: 292
y: 252
text: qsTr("Label")
anchors.horizontalCenter: parent.horizontalCenter
color: "#443224"
font.family: Constants.fontFamily
font.pixelSize: 28
}
PropertyAnimation {
target: glow
id: animation1
duration: root.duration
loops: 1
from: 1.05
to: 1.2
property: "scale"
}
ParallelAnimation {
id: animation2
SequentialAnimation {
PropertyAnimation {
target: glow
duration: root.duration
loops: 1
from: 0.2
to: 1.0
property: "opacity"
}
PropertyAnimation {
target: glow
duration: root.duration
loops: 1
from: 1.0
to: 0.0
property: "opacity"
}
PropertyAction {
target: glow
property: "visible"
value: false
}
}
SequentialAnimation {
PropertyAction {
target: glow
property: "border.width"
value: 20
}
PauseAnimation {
duration: 200
}
PropertyAnimation {
target: glow
duration: root.duration
loops: 1
from: 20
to: 10
property: "border.width"
}
}
}
}

View File

@ -0,0 +1,186 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Effects
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
Column {
id: root
spacing: -circle.height / 2
rotation: 180
property alias button: button
property alias rectangle: rectangle
property alias circle: circle
property string coffeeName: ""
property string ingredients: ""
property int time: 4
property int cupsLeft: 0
states: [
State {
name: "portrait"
when: applicationFlow.mode == "portrait"
PropertyChanges {
target: rectangle
implicitHeight: applicationFlow.height / 3.6
implicitWidth: applicationFlow.width / 2.4
}
},
State {
name: "landscape"
when: applicationFlow.mode == "landscape"
PropertyChanges {
target: rectangle
implicitHeight: applicationFlow.height / 2
implicitWidth: applicationFlow.width / 6
}
}
]
Rectangle {
id: rectangle
radius: 8
gradient: Colors.invertedGreyBorder
AbstractButton {
width: parent.width - 2
height: parent.height - 2
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
id: button
hoverEnabled: true
checkable: true
enabled: (cupsLeft != 0) ? true : false
states: State {
name: "pressed"; when: button.pressed
PropertyChanges { target: rectangle; scale: 0.9 }
PropertyChanges { target: circle; scale: 0.9 }
PropertyChanges { target: rectangle; gradient: Colors.invertedGreenBorder }
PropertyChanges { target: circle; gradient: Colors.invertedGreenBorder }
}
transitions: Transition {
NumberAnimation { properties: "scale"; duration: 50; easing.type: Easing.InOutQuad }
}
contentItem: Rectangle {
id: rectangle2
anchors.fill: parent
color: Colors.currentTheme.cardColor
radius: 8
ColumnLayout {
rotation: 180
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width / 1.19
height: parent.height - circle.height / 2
Text {
text: coffeeName
color: Colors.currentTheme.textColor
font.weight: 700
font.pixelSize: 18
Layout.alignment: Qt.AlignHCenter
wrapMode: Text.Wrap
}
Text {
text: ingredients
color: Colors.currentTheme.caption
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: parent.width
wrapMode: Text.Wrap
}
Text {
text: "Time"
font.pointSize: 12
color: Colors.currentTheme.caption
wrapMode: Text.Wrap
}
RowLayout {
Layout.bottomMargin: 12
Text {
Layout.fillWidth: true
text: time + " Mins"
font.pixelSize: 14
font.family: "Titillium Web"
color: Colors.currentTheme.textColor
}
Rectangle {
width: 24
height: 24
color: Colors.currentTheme.cardColor
border.color: "#898989"
border.width: 1
radius: 8
Text {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: cupsLeft
font.pixelSize: 12
font.weight: 600
color: "#1FC974"
}
}
}
}
Rectangle {
id: outOfDialog
width: rectangle.width / 1.5
height: rectangle.height / 5
visible: (cupsLeft != 0) ? false : true
radius: 8
color: (Colors.currentTheme == Colors.dark) ? Colors.light.cardColor : Colors.dark.cardColor
rotation: 180
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Text {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "Out of " + coffeeName
color: (Colors.currentTheme == Colors.dark) ? Colors.light.textColor : Colors.dark.textColor
}
}
}
MultiEffect {
source: rectangle2
anchors.fill: rectangle2
shadowEnabled: true
shadowColor: "white"
shadowOpacity: (cupsLeft != 0) ? 0.5 : 0.0
}
}
}
Rectangle {
id: circle
anchors.horizontalCenter: parent.horizontalCenter
implicitHeight: implicitWidth
implicitWidth: rectangle.implicitWidth / 1.36
radius: width * 0.5
gradient: Colors.invertedGreyBorder
Rectangle {
id: circle2
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
height: width
width: parent.width - 2
radius: width * 0.5
color: Colors.currentTheme.cardColor
Image {
source: (Colors.currentTheme == Colors.dark) ? "./images/Cups/card_cup_dark.svg" : "./images/Cups/card_cup_light.svg"
sourceSize.width: circle.width / 2.2
sourceSize.height: circle.height / 1.9
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
rotation: 180
}
}
MultiEffect {
source: circle2
anchors.fill: circle2
shadowEnabled: true
shadowColor: "white"
shadowOpacity: (cupsLeft != 0) ? 0.5 : 0.0
}
}
}

View File

@ -0,0 +1,129 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
pragma Singleton
import QtQuick
Item {
QtObject {
id: light
readonly property color background: "#ffffff"
readonly property color textColor: "#121111"
readonly property color borderColor: "#D8D8D8"
readonly property color cardColor: "#FFFFFF"
readonly property color caption: "#898989"
}
QtObject {
id: dark
readonly property color background: "#121212"
readonly property color textColor: "#FEFEFE"
readonly property color borderColor: "#3E3E3E"
readonly property color cardColor: "#212121"
readonly property color caption: "#898989"
}
Gradient {
id: invertedGreyBorder
GradientStop { position: 0.0; color: currentTheme.cardColor }
GradientStop { position: 1.0; color: currentTheme.borderColor }
}
Gradient {
id: greyBorder
GradientStop { position: 0.0; color: currentTheme.borderColor }
GradientStop { position: 1.0; color: currentTheme.cardColor }
}
Gradient {
id: invertedGreenBorder
// GradientStop positions are arbitrary
GradientStop {
position: 1.0
color: "#18B969"
}
GradientStop {
position: 0.66
color: "#c718b969"
}
GradientStop {
position: 0.33
color: "#ab18b969"
}
GradientStop {
position: 0.0
color: currentTheme.cardColor
}
}
Gradient {
id: greenBorder
GradientStop {
position: 1.0
color: currentTheme.cardColor
}
GradientStop {
position: 0.66
color: "#ab18b969"
}
GradientStop {
position: 0.33
color: "#c718b969"
}
GradientStop {
position: 0.0
color: "#18B969"
}
}
Gradient {
id: greenButtonGradient
GradientStop {
position: 0.3
color: "#2CDE85"
}
GradientStop {
position: 0.5
color: "#24b46d"
}
GradientStop {
position: 0.9
color: "#9c219d60"
}
}
Gradient {
id: darkButtonGradient
GradientStop {
position: 0.2
color: Colors.currentTheme.background
}
GradientStop {
position: 0.5
color: "#2a2a2a"
}
GradientStop {
position: 0.9
color: "#f72a2a2a"
}
}
Gradient {
id: lightButtonGradient
GradientStop {
position: 0.2
color: Colors.currentTheme.background
}
GradientStop {
position: 0.5
color: "#eeeeee"
}
GradientStop {
position: 0.9
color: "#e6e6e6"
}
}
property var currentTheme: dark
property alias dark: dark
property alias light: light
property alias invertedGreenBorder: invertedGreenBorder
property alias invertedGreyBorder: invertedGreyBorder
property alias greyBorder: greyBorder
property alias greenBorder: greenBorder
property alias darkButtonGradient: darkButtonGradient
property alias lightButtonGradient: lightButtonGradient
property alias greenButtonGradient: greenButtonGradient
}

View File

@ -1,7 +1,51 @@
// Copyright (C) 2017 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
CupForm {
Item {
property int coffeeAmount
property int milkAmount
property int foamAmount
property double sugarAmount
property alias coffee: coffee
Image {
id: foam
source: "./images/Ingredients/Milk_foam.svg"
anchors.bottom: cup.bottom
sourceSize.width: cup.width
anchors.horizontalCenter: parent.horizontalCenter
sourceSize.height: milk.height + (foamAmount * (cup.height / 700))
}
Image {
id: milk
source: "./images/Ingredients/milk.svg"
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: cup.bottom
sourceSize.width: cup.width
sourceSize.height: coffee.height + (milkAmount * (cup.height / 700))
}
Image {
id: coffee
source: "./images/Ingredients/espresso_coffee.svg"
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: cup.bottom
sourceSize.width: cup.width
sourceSize.height: (cup.height / 6.4) + (coffeeAmount * (cup.height / 550))
}
Image {
id: sugar
source: "./images/Ingredients/sugar.svg"
anchors.horizontalCenter: cup.horizontalCenter
anchors.top: coffee.top
sourceSize.width: cup.width / 6
opacity: sugarAmount
}
Image {
id: cup
source: (Colors.currentTheme == Colors.dark) ? "./images/Cups/dark_cup.svgz" : "./images/Cups/light_cup.svgz"
sourceSize.width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}

View File

@ -1,198 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import Coffee
Item {
id: root
width: 768
height: 768
property alias questionVisible: question.visible
property bool showLabels: true
property alias coffeeLabel: cappuccinoLabel.text
property real sugarAmount: 2
property real milkAmount: 4
property real coffeeAmount: 4
Rectangle {
id: rectangle
color: "#443224"
anchors.fill: parent
Image {
id: background
x: 12
y: 170
source: "images/cup structure/cup elements/coffee_cup_back.png"
}
Item {
id: foam
x: 12
width: 457
anchors.topMargin: milk.anchors.topMargin - 40
anchors.bottom: background.bottom
anchors.top: background.top
clip: true
Image {
anchors.bottom: parent.bottom
source: "images/cup structure/liquids/liquid_foam.png"
}
}
Item {
id: milk
x: 12
width: 457
anchors.topMargin: 400 - coffee.height - root.milkAmount * 15 + 20
anchors.bottom: background.bottom
anchors.top: background.top
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.bottomMargin: 0
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: 170
source: "images/cup structure/cup elements/coffee_cup_front.png"
}
Text {
x: 499
y: 370
color: "#ffffff"
text: qsTr("Hot Milk")
font.capitalization: Font.AllUppercase
font.family: Constants.fontFamily
wrapMode: Text.WrapAnywhere
font.pixelSize: 18
visible: root.showLabels
}
Text {
x: 486
y: 468
color: "#ffffff"
text: qsTr("Espresso Coffee")
font.capitalization: Font.AllUppercase
font.family: Constants.fontFamily
wrapMode: Text.WrapAnywhere
font.pixelSize: 18
visible: root.showLabels
}
Image {
x: 414
y: 274
visible: root.showLabels
source: "images/ui controls/line.png"
}
Text {
x: 512
y: 259
color: "#ffffff"
text: qsTr("Milk Foam")
font.family: Constants.fontFamily
wrapMode: Text.WrapAnywhere
font.pixelSize: 18
font.capitalization: Font.AllUppercase
visible: root.showLabels
}
Image {
x: 404
y: 382
source: "images/ui controls/line.png"
visible: root.showLabels
}
Image {
x: 388
y: 482
source: "images/ui controls/line.png"
visible: root.showLabels
}
Text {
id: cappuccinoLabel
color: "#ffffff"
text: qsTr("CAPPUCCINO")
visible: !question.visible
anchors.top: parent.top
anchors.topMargin: 32
anchors.left: parent.left
anchors.leftMargin: Constants.defaultMargin
font.family: Constants.fontFamily
wrapMode: Text.WrapAnywhere
font.pixelSize: 64
font.capitalization: Font.AllUppercase
}
Item {
id: sugarItem
x: 181
y: 419
width: 119
height: 111
rotation: -45
Rectangle {
x: 21
y: 8
width: 48
height: 48
color: "#ffffff"
opacity: root.sugarAmount / 10
}
Rectangle {
x: 74
y: 40
width: 32
height: 32
color: "#ffffff"
visible: root.sugarAmount > 5
opacity: root.sugarAmount / 30
}
Rectangle {
x: 45
y: 62
width: 24
height: 24
color: "#ffffff"
opacity: root.sugarAmount / 25
}
}
}
Image {
id: question
y: 170
anchors.left: parent.left
anchors.leftMargin: 11
source: "images/cup structure/coffee_cup_large.png"
}
}

View File

@ -0,0 +1,54 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
AbstractButton {
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
id: button
property string buttonText: ""
property bool showIcon: true
property string buttonColor: "grey"
states: State {
name: "pressed"; when: button.pressed
PropertyChanges { target: rectangle; scale: 0.9 }
}
transitions: Transition {
NumberAnimation { properties: "scale"; duration: 10; easing.type: Easing.InOutQuad }
}
contentItem: Rectangle {
id: rectangle
border.width: 1
border.color: "#898989"
radius: 10
anchors.fill: parent
gradient: if (buttonColor == "grey" && Colors.currentTheme == Colors.dark) {
Colors.darkButtonGradient
} else if (buttonColor == "grey" && Colors.currentTheme == Colors.light) {
Colors.lightButtonGradient
} else {
Colors.greenButtonGradient
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Text {
text: buttonText
color: (buttonColor == "green") ? Colors.dark.textColor : Colors.currentTheme.textColor
font.pixelSize: 18
font.weight: 700
rightPadding: 8
}
Image {
id: icon
visible: showIcon
source: (Colors.currentTheme == Colors.dark) ? "./images/icons/keyboard_backspace_white_right.svg" : "./images/icons/keyboard_backspace_black_right.svg"
}
}
}
}

View File

@ -0,0 +1,72 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
Slider {
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
id: slider
property int liquidAmount: 0
states: State {
name: "pressed"; when: slider.pressed
PropertyChanges { target: handle; scale: 1.1 }
}
transitions: Transition {
NumberAnimation { properties: "scale"; duration: 10; easing.type: Easing.InOutQuad }
}
background: Rectangle {
id: rectangle
x: slider.leftPadding
anchors.verticalCenter: parent.verticalCenter
width: slider.availableWidth
height: 4
radius: 2
color: "#585858"
Rectangle {
width: slider.visualPosition * parent.width
height: parent.height
color: "#2CDE85"
radius: 2
}
}
handle: Rectangle {
id: handle
x: slider.visualPosition * slider.availableWidth
anchors.verticalCenter: parent.verticalCenter
width: 14
height: width
radius: 100
color: "#1FC974"
Image {
id: handleMark
source: "./images/icons/Polygon.svg"
anchors.bottom: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 3
}
Rectangle {
anchors.bottom: handleMark.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 3
implicitWidth: liquidAmountText.width + 8
implicitHeight: liquidAmountText.height + 4
radius: 4
color: Colors.currentTheme.background
border.color: "#4F4A4A"
Text {
id: liquidAmountText
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
text: liquidAmount + "ml"
font.pixelSize: 12
clip: false
color: Colors.currentTheme.textColor
}
}
}
}

View File

@ -0,0 +1,59 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
Item {
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
id: root
property alias backButton: backButton
property alias themeButton: themeButton
property alias logo: logo
RowLayout {
width: parent.width
Button {
id: backButton
icon.color: (Colors.currentTheme == Colors.dark) ? "#FFFFFF" : "#121111"
icon.source: "./images/icons/keyboard_backspace_black_left.svg"
flat: true
onClicked: applicationFlow.backButton()
background: null
states: State {
name: "pressed"; when: backButton.pressed
PropertyChanges { target: backButton; scale: 1.1 }
}
transitions: Transition {
NumberAnimation { properties: "scale"; duration: 100; easing.type: Easing.InOutQuad }
}
}
Image {
id: logo
source: "./images/icons/Qt-logo-white-transparent.svg"
Layout.alignment: Qt.AlignCenter
sourceSize.width: height * 1.4
sourceSize.height: 25
}
Button {
id: themeButton
Layout.alignment: Qt.AlignRight
icon.color: (Colors.currentTheme == Colors.dark) ? "#DDE2E8" : "#667085"
icon.source: (Colors.currentTheme == Colors.dark) ? "./images/icons/light_mode_black_24dp.svg" : "./images/icons/dark_mode_black_24dp.svg"
flat: true
onClicked: applicationFlow.themeButton()
background: null
states: State {
name: "pressed"; when: themeButton.pressed
PropertyChanges { target: themeButton; scale: 1.1 }
}
transitions: Transition {
NumberAnimation { properties: "scale"; duration: 100; easing.type: Easing.InOutQuad }
}
}
}
}

View File

@ -1,7 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
EmptyCupForm {
}

View File

@ -1,52 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import Coffee
Item {
id: root
width: Constants.width
height: Constants.height
property alias continueButton: continueButton
state: "initial state"
Rectangle {
id: rectangle
color: Constants.backgroundColor
anchors.fill: parent
Image {
id: image
x: 284
y: 174
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "images/cup structure/coffee_cup_outline.png"
}
}
Text {
id: brewLabel
x: 84
y: 26
color: "#ffffff"
text: qsTr("Please insert cup into tray")
anchors.horizontalCenter: parent.horizontalCenter
font.family: Constants.fontFamily
wrapMode: Text.WrapAnywhere
font.pixelSize: 64
font.capitalization: Font.AllUppercase
}
NavigationButton {
id: continueButton
x: 324
y: 650
text: "Continue"
anchors.bottomMargin: Constants.defaultMargin
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
}
}

View File

@ -0,0 +1,79 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Layouts
Item {
id: home
property alias getStartedbutton: getStartedButton
property alias grid: grid
states: [
State {
name: "portrait"
PropertyChanges {
target: getStartedButton
Layout.preferredWidth: applicationFlow.width / 2.2
Layout.preferredHeight: applicationFlow.height / 16
Layout.topMargin: 20
}
},
State {
name: "landscape"
PropertyChanges {
target: grid
anchors.topMargin: 0
}
PropertyChanges {
target: header
Layout.topMargin: 0
}
PropertyChanges {
target: getStartedButton
Layout.preferredWidth: applicationFlow.width / 4
Layout.preferredHeight: applicationFlow.height / 8
Layout.topMargin: 0
}
}
]
GridLayout {
id: grid
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: home.top
flow: GridLayout.TopToBottom
Image {
id: image
Layout.preferredHeight: home.height / 3
Layout.preferredWidth: height / 1.16
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.margins: 5
source: (Colors.currentTheme
== Colors.dark) ? "./images/Cups/home_dark.svg" : "./images/Cups/home_light.svg"
}
Text {
id: header
text: qsTr("Coffee Machine")
font.pixelSize: 32
font.weight: 700
color: Colors.currentTheme.textColor
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.topMargin: 20
}
Text {
id: caption
text: qsTr(" pick your blend, tailor your flavors, and savor the \n perfection!")
font.pixelSize: 16
horizontalAlignment: Text.AlignHCenter
font.weight: 400
color: Colors.currentTheme.caption
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
}
CustomButton {
id: getStartedButton
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.minimumWidth: 150
buttonText: "Get Started"
}
}
}

View File

@ -0,0 +1,152 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Effects
Item {
id: root
property alias grid: grid
property alias continueButton: continueButton
property alias cancelButton: cancelButton
property alias dialog: dialog
property string coffeeName: ""
states: [
State {
name: "portrait"
PropertyChanges {
target: grid
flow: GridLayout.TopToBottom
rowSpacing: 20
columns: 1
rows: 4
}
PropertyChanges {
target: cup
Layout.alignment: Qt.AlignCenter | Qt.AlignTop
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 3
Layout.row: 0
}
PropertyChanges {
target: dialog
Layout.row: 1
Layout.alignment: Qt.AlignCenter | Qt.AlignTop
Layout.preferredWidth: root.width / 1.12
Layout.preferredHeight: root.height / 7
}
PropertyChanges {
target: continueButton
Layout.row: 2
Layout.preferredWidth: applicationFlow.width / 2.2
Layout.preferredHeight: applicationFlow.height / 16
}
PropertyChanges {
target: cancelButton
Layout.row: 3
Layout.preferredWidth: applicationFlow.width / 2.2
Layout.preferredHeight: applicationFlow.height / 16
}
},
State {
name: "landscape"
PropertyChanges {
target: grid
flow: GridLayout.LeftToRight
columns: 3
rows: 3
rowSpacing: 20
}
PropertyChanges {
target: cup
Layout.alignment: Qt.AlignCenter | Qt.AlignTop
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 1.5
Layout.column: 2
Layout.row: 0
}
PropertyChanges {
target: dialog
Layout.preferredWidth: root.width / 4
Layout.preferredHeight: parent.height / 4
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.column: 0
Layout.row: 0
Layout.columnSpan: 2
}
PropertyChanges {
target: continueButton
Layout.column: 2
Layout.row: 2
Layout.preferredWidth: applicationFlow.width / 4
Layout.preferredHeight: applicationFlow.height / 8
}
PropertyChanges {
target: cancelButton
Layout.column: 0
Layout.row: 2
Layout.preferredWidth: applicationFlow.width / 4
Layout.preferredHeight: applicationFlow.height / 8
}
}
]
GridLayout {
id: grid
flow: GridLayout.TopToBottom
anchors.horizontalCenter: parent.horizontalCenter
Cup {
id: cup
Layout.alignment: Qt.AlignCenter | Qt.AlignTop
}
Rectangle {
id: dialog
radius: 8
Layout.minimumHeight: 70
Layout.minimumWidth: 180
gradient: Colors.greenBorder
Rectangle {
id: rectangle
width: parent.width - 2
height: parent.height - 2
radius: 8
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
color: Colors.currentTheme.cardColor
Text {
text: "Please Insert your Cup!"
color: Colors.currentTheme.textColor
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
MultiEffect {
source: rectangle
anchors.fill: rectangle
shadowEnabled: true
shadowColor: "white"
shadowOpacity: 0.5
}
}
CustomButton {
id: continueButton
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.minimumWidth: 150
Layout.minimumHeight: 40
showIcon: false
buttonText: "Continue"
buttonColor: "green"
onClicked: applicationFlow.continueButton()
}
CustomButton {
id: cancelButton
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.minimumWidth: 150
Layout.minimumHeight: 40
showIcon: false
buttonText: "Cancel"
onClicked: applicationFlow.cancelButton()
}
}
}

View File

@ -1,46 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import Coffee
Row {
id: row
signal clicked
property alias text: brewLabel.text
property bool forward: true
layoutDirection: row.forward ? Qt.LeftToRight : Qt.RightToLeft
spacing: 17
Text {
id: brewLabel
color: "#ffffff"
text: qsTr("Brew Me a CUP")
font.family: Constants.fontFamily
wrapMode: Text.WrapAnywhere
font.pixelSize: 64
font.capitalization: Font.AllUppercase
}
Image {
id: image
anchors.verticalCenter: parent.verticalCenter
source: row.forward ? "images/ui controls/buttons/go/white.png" : "images/ui controls/buttons/back/white.png"
scale: mouseArea.containsMouse ? 1.1 : 1
MouseArea {
id: mouseArea
hoverEnabled: true
anchors.fill: parent
Connections {
function onClicked(mouse) {
row.clicked()
}
}
}
}
}

View File

@ -0,0 +1,259 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Effects
Item {
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
id: root
property alias grid: grid
property alias timer: timer
property alias greenBar: greenBar
property alias cup: cup
property int brewTime
property int maxCoffee
property int maxmilk
property int maxFoam
property int coffeeAmount
property int milkAmount
property int foamAmount
property double sugarAmount
property double progressBarValue: 0
states: [
State {
name: "portrait"
PropertyChanges {
target: cup
Layout.alignment: Qt.AlignCenter | Qt.AlignTop
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 3
}
PropertyChanges {
target: dialog
Layout.preferredWidth: root.width / 1.12
Layout.preferredHeight: root.height / 7
}
},
State {
name: "landscape"
PropertyChanges {
target: grid
rowSpacing: 10
}
PropertyChanges {
target: cup
Layout.alignment: Qt.AlignCenter | Qt.AlignTop
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 2.5
}
PropertyChanges {
target: dialog
Layout.preferredWidth: root.width / 2.5
Layout.preferredHeight: root.height / 5
Layout.minimumHeight: 70
Layout.minimumWidth: 400
}
PropertyChanges {
target: control
Layout.bottomMargin: 10
}
}
]
Timer {
id: timer
interval: brewTime
running: true
onTriggered: {
applicationFlow.onFinished()
}
}
Behavior on greenBar.width {
SmoothedAnimation {
easing.type: Easing.Linear
velocity: (contentItem.width / brewTime) * 1000
}
}
GridLayout {
id: grid
rowSpacing: 20
anchors.horizontalCenter: parent.horizontalCenter
flow: GridLayout.TopToBottom
Cup {
id: cup
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
state: "0"
states: [
State {
name: "0"
PropertyChanges {
target: cup
coffeeAmount: 0
}
PropertyChanges {
target: cup
milkAmount: 0
}
PropertyChanges {
target: cup
foamAmount: 0
}
PropertyChanges {
target: cup
sugarAmount: 0
}
},
State {
name: "1"
PropertyChanges {
target: cup
coffeeAmount: root.coffeeAmount
}
PropertyChanges {
target: cup
milkAmount: root.milkAmount
}
PropertyChanges {
target: cup
foamAmount: root.foamAmount
}
PropertyChanges {
target: cup
sugarAmount: root.sugarAmount
}
}
]
transitions: Transition {
from: "0"
to: "1"
SmoothedAnimation {
target: cup
property: "coffeeAmount"
velocity: (coffeeAmount / brewTime) * 1200
}
SmoothedAnimation {
target: cup
property: "milkAmount"
velocity: (milkAmount / brewTime) * 1200
}
SmoothedAnimation {
target: cup
property: "foamAmount"
velocity: (foamAmount / brewTime) * 1200
}
SmoothedAnimation {
target: cup
property: "sugarAmount"
velocity: (sugarAmount / brewTime) * 1200
}
}
}
Rectangle {
id: dialog
radius: 8
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
gradient: Colors.greyBorder
Rectangle {
id: rectangle
width: parent.width - 2
height: parent.height - 2
radius: 8
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
color: Colors.currentTheme.cardColor
Text {
text: "Your Coffee is preparing, Please Wait!"
color: Colors.currentTheme.textColor
font.pixelSize: 18
font.weight: 600
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
MultiEffect {
source: rectangle
anchors.fill: rectangle
shadowEnabled: true
shadowColor: "white"
shadowOpacity: 0.5
}
}
ProgressBar {
id: control
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
value: progressBarValue
Layout.topMargin: 20
background: Rectangle {
implicitHeight: 2
color: "#e6e6e6"
}
contentItem: Item {
id: contentItem
implicitWidth: dialog.width / 1.5
implicitHeight: 2
Rectangle {
id: greenBar
width: control.visualPosition * parent.width
height: parent.height
color: "#1FC974"
}
Image {
id: circle
source: (Colors.currentTheme == Colors.dark) ? "./images/icons/ellipse_dark.svg" : "./images/icons/ellipse_light.svg"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.left
}
Image {
id: circle2
source: (Colors.currentTheme == Colors.dark) ? "./images/icons/ellipse_dark.svg" : "./images/icons/ellipse_light.svg"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
Image {
id: circle3
source: (Colors.currentTheme == Colors.dark) ? "./images/icons/ellipse_dark.svg" : "./images/icons/ellipse_light.svg"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.right
}
Text {
text: "0%"
font.pixelSize: 12
anchors.horizontalCenter: circle.horizontalCenter
anchors.verticalCenter: circle.verticalCenter
color: Colors.currentTheme.textColor
}
Text {
text: "50%"
font.pixelSize: 12
anchors.horizontalCenter: circle2.horizontalCenter
anchors.verticalCenter: circle2.verticalCenter
color: Colors.currentTheme.textColor
}
Text {
text: "100%"
font.pixelSize: 12
anchors.horizontalCenter: circle3.horizontalCenter
anchors.verticalCenter: circle3.verticalCenter
color: Colors.currentTheme.textColor
}
}
}
Text {
color: "#2CDE85"
text: qsTr("Brewing...")
Layout.alignment: Qt.AlignHCenter
font.pixelSize: 12
font.weight: 600
}
}
}

View File

@ -0,0 +1,114 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Effects
import QtQuick.Layouts
import QtQuick.Controls
Item {
// Height, width and any other size related properties containing odd looking float or other dividers
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
id: root
property alias timer: timer
property int coffeeAmount
property int milkAmount
property int foamAmount
property double sugarAmount
states: [
State {
name: "portrait"
PropertyChanges {
target: cup
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 3
}
PropertyChanges {
target: dialog
Layout.preferredWidth: root.width / 1.12
Layout.preferredHeight: root.height / 7
}
},
State {
name: "landscape"
PropertyChanges {
target: cup
Layout.alignment: Qt.AlignCenter | Qt.AlignTop
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 2.5
}
PropertyChanges {
target: dialog
Layout.preferredWidth: root.width / 2.5
Layout.preferredHeight: root.height / 5
}
}
]
Timer {
id: timer
interval: 3000
running: true
onTriggered: {
applicationFlow.onReturnToStart()
}
}
GridLayout {
id: grid
flow: GridLayout.TopToBottom
anchors.horizontalCenter: root.horizontalCenter
rowSpacing: 20
Cup {
id: cup
coffeeAmount: root.coffeeAmount
milkAmount: root.milkAmount
foamAmount: root.foamAmount
sugarAmount: root.sugarAmount
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
}
Rectangle {
id: dialog
gradient: Colors.greyBorder
radius: 8
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.minimumHeight: 70
Layout.minimumWidth: 200
Rectangle {
id: rectangle
width: parent.width - 2
height: parent.height - 2
radius: 8
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
color: Colors.currentTheme.cardColor
Text {
text: "Your Coffee is Ready!"
color: Colors.currentTheme.textColor
font.pixelSize: 18
font.weight: 600
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
MultiEffect {
source: rectangle
anchors.fill: rectangle
shadowEnabled: true
shadowColor: "white"
shadowOpacity: 0.5
}
}
Image {
id: circle
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
source: (Colors.currentTheme == Colors.dark) ? "./images/icons/ellipse_dark.svg" : "./images/icons/ellipse_light.svg"
Image {
id: check
source: "./images/icons/check.svg"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
}
}

View File

@ -0,0 +1,326 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Effects
Item {
// Height, width and any other size related properties containing odd looking float or other dividers, multipliers, etc.
// that do not seem to have any logical origin are just arbitrary and based on original design
// and/or personal preference on what looks nice.
property string coffeeName: ""
id: root
property alias confirmButton: confirmButton
property int coffeeAmount
property int milkAmount
property int foamAmount
property double sugarAmount
states: [
State {
name: "portrait"
PropertyChanges {
target: grid
flow: GridLayout.TopToBottom
rows: 3
columns: 1
rowSpacing: 20
}
PropertyChanges {
target: cup
Layout.row: 0
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 3
}
PropertyChanges {
target: rectangle
Layout.row: 1
Layout.preferredWidth: root.width / 1.12
Layout.preferredHeight: root.height / 3
}
PropertyChanges {
target: confirmButton
Layout.alignment: Qt.AlignHCenter
Layout.row: 2
Layout.preferredWidth: applicationFlow.width / 2.2
Layout.preferredHeight: applicationFlow.height / 16
}
},
State {
name: "landscape"
PropertyChanges {
target: grid
flow: GridLayout.LeftToRight
rows: 2
columns: 3
}
PropertyChanges {
target: cup
Layout.column: 0
Layout.preferredWidth: height / 1.16
Layout.preferredHeight: root.height / 1.5
Layout.rightMargin: root.width / 20
}
PropertyChanges {
target: rectangle
Layout.preferredWidth: root.width / 2.75
Layout.preferredHeight: root.height / 1.5
Layout.leftMargin: root.width / 20
Layout.alignment: Qt.AlignBottom
Layout.column: 2
}
PropertyChanges {
target: confirmButton
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.row: 1
Layout.columnSpan: 3
Layout.preferredWidth: applicationFlow.width / 4
Layout.preferredHeight: applicationFlow.height / 8
}
}
]
GridLayout {
id: grid
flow: GridLayout.TopToBottom
anchors.horizontalCenter: parent.horizontalCenter
Cup {
id:cup
milkAmount: milkSlider.value
coffeeAmount: coffeeSlider.value
foamAmount: foamSlider.value
sugarAmount: sugarSlider.position
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
}
Rectangle {
id: rectangle
radius: 8
gradient: Colors.greyBorder
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.minimumHeight: 200
Layout.minimumWidth: 250
Rectangle {
id: rectangle2
radius: 8
color: Colors.currentTheme.cardColor
width: parent.width - 2
height: parent.height - 2
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
ColumnLayout {
id: column
anchors.fill: parent
anchors.margins: 20
RowLayout {
Text {
text: "Coffee"
color: Colors.currentTheme.textColor
font.pixelSize: 16
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
Layout.preferredWidth: 30
}
CustomSlider {
id: coffeeSlider
from: 0
to: 100
value: coffeeAmount
liquidAmount: value
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
Layout.preferredWidth: 70
Layout.preferredHeight: column.height / 4
onValueChanged: {
applicationFlow.coffeeAmount = value
}
}
}
RowLayout {
Text {
text: "Milk"
color: Colors.currentTheme.textColor
font.pixelSize: 16
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
Layout.preferredWidth: 30
}
CustomSlider {
id: milkSlider
from: 0
to: 60
value: milkAmount
liquidAmount: value
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
Layout.preferredWidth: 70
Layout.preferredHeight: column.height / 4
onValueChanged: {
applicationFlow.milkAmount = value
}
}
}
RowLayout {
Text {
text: "Foam"
color: Colors.currentTheme.textColor
font.pixelSize: 16
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
Layout.preferredWidth: 30
}
CustomSlider {
id: foamSlider
from: 0
to: 60
value: foamAmount
liquidAmount: value
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
Layout.preferredWidth: 70
Layout.preferredHeight: column.height / 4
onValueChanged: {
applicationFlow.foamAmount = value
}
}
}
RowLayout {
Text {
text: "Sugar"
color: Colors.currentTheme.textColor
font.pixelSize: 16
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
Layout.preferredWidth: 30
}
Slider {
id: sugarSlider
snapMode: Slider.SnapAlways
stepSize: 0.25
value: sugarAmount
Layout.preferredWidth: foamSlider.width
Layout.preferredHeight: column.height / 4
Layout.alignment: Qt.AlignVCenter
states: State {
name: "pressed"; when: sugarSlider.pressed
PropertyChanges { target: handle; scale: 1.1 }
}
transitions: Transition {
NumberAnimation { properties: "scale"; duration: 10; easing.type: Easing.InOutQuad }
}
onValueChanged: {
applicationFlow.sugarAmount = value
}
background: Rectangle {
x: sugarSlider.leftPadding
anchors.verticalCenter: parent.verticalCenter
width: sugarSlider.availableWidth
height: 4
radius: 2
color: Colors.currentTheme.background
Rectangle {
id: firstBar
width: parent.width / 4
height: parent.height
color: (sugarSlider.value > 0) ? "#1FC974" : "#585858"
radius: 2
}
Rectangle {
id:secondBar
anchors.left: firstBar.right
width: parent.width / 4
height: parent.height
color: (sugarSlider.value > 0.25) ? "#1FC974" : "#585858"
radius: 2
}
Rectangle {
id: thirdBar
anchors.left: secondBar.right
width: parent.width / 4
height: parent.height
color: (sugarSlider.value > 0.50) ? "#1FC974" : "#585858"
radius: 2
}
Rectangle {
id: fourthBar
anchors.right: parent.right
width: parent.width / 4
height: parent.height
color: (sugarSlider.value > 0.75) ? "#1FC974" : "#585858"
radius: 2
}
}
handle: Rectangle {
id: handle
x: sugarSlider.visualPosition * sugarSlider.availableWidth
anchors.verticalCenter: parent.verticalCenter
implicitWidth: 14
implicitHeight: 14
radius: 100
color: "#1FC974"
Image {
id: sugarMark
source: "./images/icons/Polygon.svg"
anchors.bottom: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 3
}
Rectangle {
anchors.bottom: sugarMark.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 3
implicitWidth: sugarText.width + 8
implicitHeight: sugarText.height + 4
radius: 4
color: Colors.currentTheme.background
border.color: "#4F4A4A"
Text {
id: sugarText
property int sugarAmount: 0
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
text: sugarAmount + "p"
font.pixelSize: 12
clip: false
color: Colors.currentTheme.textColor
}
}
}
onMoved: {
sugarText.sugarAmount = sugarSlider.position * 4
}
}
}
}
}
MultiEffect {
source: rectangle2
anchors.fill: rectangle2
shadowEnabled: true
shadowColor: "white"
shadowOpacity: 0.5
}
}
CustomButton {
id: confirmButton
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
Layout.minimumWidth: 150
Layout.minimumHeight: 40
buttonText: "Start"
showIcon: false
onClicked: applicationFlow.confirmButton()
}
}
}

View File

@ -1,50 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
SideBarForm {
id: sideBar
property string currentCoffee: qsTr("Cappucino")
signal coffeeSelected
property real currentMilk: 0
property real currentCoffeeAmount: 4
Behavior on currentMilk {
NumberAnimation { duration: 250 }
}
Behavior on currentCoffeeAmount {
NumberAnimation { duration: 250 }
}
macchiatoButton.onClicked: {
sideBar.currentCoffee = qsTr("Macchiato")
sideBar.currentMilk = 1
sideBar.currentCoffeeAmount = 4
sideBar.coffeeSelected()
}
latteButton.onClicked: {
sideBar.currentCoffee = qsTr("Latte")
sideBar.currentMilk = 10
sideBar.currentCoffeeAmount = 3
sideBar.coffeeSelected()
}
espressoButton.onClicked: {
sideBar.currentCoffee = qsTr("Espresso")
sideBar.currentMilk = 0
sideBar.currentCoffeeAmount = 4
sideBar.coffeeSelected()
}
//! [0]
cappuccinoButton.onClicked: {
sideBar.currentCoffee = qsTr("Cappucino")
sideBar.currentMilk = 7
sideBar.currentCoffeeAmount = 3.5
sideBar.coffeeSelected()
}
//! [0]
}

View File

@ -1,59 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick 2.4
import QtQuick.Layouts 1.3
Flickable {
id: flickable
x: 0
y: 0
width: 354
height: 768
property alias macchiatoButton: macchiatoButton
property alias latteButton: latteButton
property alias espressoButton: espressoButton
property alias cappuccinoButton: cappuccinoButton
contentWidth: 250
boundsBehavior: Flickable.StopAtBounds
contentHeight: 1506
clip: true
Rectangle {
id: background
x: 0
width: 354
height: 1506
color: "#eec1a2"
}
ColumnLayout {
x: 52
y: 0
spacing: 64
CoffeeButton {
id: cappuccinoButton
text: "Cappuccino"
}
CoffeeButton {
id: espressoButton
text: "Espresso"
source: "images/icons/coffees/Espresso.png"
}
CoffeeButton {
id: latteButton
text: "Latte"
source: "images/icons/coffees/Latte.png"
}
CoffeeButton {
id: macchiatoButton
text: "Macchiato"
source: "images/icons/coffees/Macchiato.png"
}
}
}

View File

@ -1,29 +1,18 @@
#Copyright (C) 2023 The Qt Company Ltd.
#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
QT += qml quick
CONFIG += c++11
SOURCES += main.cpp
RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH = $$PWD/imports
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =
RESOURCES += Coffee.qrc
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x060000 # disables all APIs deprecated in Qt 6.0.0 and earlier
DEFINES += QT_DISABLE_DEPRECATED_UP_TO=0x060000 # disables all APIs deprecated in Qt 6.0.0 and earlier
qnx: target.path = /tmp/$${TARGET}/bin
else: win32|unix: target.path = $$[QT_INSTALL_EXAMPLES]/demos/$${TARGET}
!isEmpty(target.path): INSTALLS += target
DISTFILES += \
images/ui components/loader/loading bar 1.png \
images/ui components/loader/loading bar 2.png \
images/ui components/loader/loading bar 3.png \
images/ui components/loader/loading bg.png

View File

@ -20,52 +20,40 @@
the app shows an animated display of the brewing process, then returns
to the start screen.
First the start screen \c Animationflowform is displayed, showing a
First the start screen Animationflowform is displayed, showing a
sidebar with several types of coffee, and an empty cup on the right
screen.
Selecting a coffee type - for example, cappuccino - triggers \c animation1
and \c animation2 in CoffeeButton.qml. On the right side, you will see
Selecting a coffee type - for example, cappuccino - triggers animation1
and animation2 in CoffeeButton.qml. On the right side, you will see
the coffee blend you selected.
\snippet demos/coffee/CoffeeButton.qml 0
It also triggers cappuccinoButton.onClicked(), which sets the default
mix for the coffee type selected:
\snippet demos/coffee/SideBar.qml 0
\borderedimage coffee_machine_selection.png
\caption Coffee blend cappuccino
\c sideBar.coffeeSelected() \c sets applicationFlow.state to "selection"
sideBar.coffeeSelected() sets applicationFlow.state to "selection"
If you click "Brew me a cup", choosingCoffee.brewButtonSelection.onClicked
is triggered:
\snippet demos/coffee/ApplicationFlow.qml 0
On the right side of the screen, you will see two sliders, one for
the amount of milk, and one for sugar. They will have default values,
but can be modified by the user.
\borderedimage coffee_machine_modify.png
If you click on \c Brew, \c choosingCoffee.brewButton.onClicked() is triggered,
If you click on Brew, choosingCoffee.brewButton.onClicked() is triggered,
which displays a screen with the message "Please insert cup into tray".
\snippet demos/coffee/ApplicationFlow.qml 2
\borderedimage coffee_machine_emptycup.png
Clicking on \c Continue starts the brewing of the coffee type you
Clicking on Continue starts the brewing of the coffee type you
selected.
\snippet demos/coffee/ApplicationFlow.qml 1
The brewing process is defined as follows in \c Brewing.qml:
\snippet demos/coffee/Brewing.qml 0
The brewing process is defined as follows in Brewing.qml:
After completion, the application returns to the start screen.
*/

View File

@ -0,0 +1,16 @@
<svg width="52" height="60" viewBox="0 0 52 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group">
<g id="Group_2">
<g id="Group_3">
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M22.3755 50.0556C27.7559 50.2743 33.4668 45.7477 40.2424 31.77C20.4344 38.0807 5.03081 33.9875 6.58335 31.2862C7.65373 29.4245 16.026 26.6521 38.8723 30.3829C38.8723 30.3829 31.7607 29.8081 24.0227 29.3372C15.0759 28.7929 8.45274 29.5524 7.94788 31.6758C7.74516 34.3256 29.8781 34.9384 40.2567 31.7319C37.6177 40.7802 31.6396 52.3846 21.6116 51.7728C15.2562 51.2771 9.69157 42.8165 5.86157 35.2045C12.077 44.8231 16.8182 49.7588 22.3748 50.0559L22.3755 50.0556Z" fill="#D8D8D8" stroke="#E59112" stroke-width="0.388776"/>
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M39.2739 35.6191C39.2739 35.6191 41.8326 30.9476 45.8967 31.3843C51.9063 32.0296 41.5239 45.994 33.6111 45.8864C34.8977 45.5075 36.4258 44.9872 38.9132 43.1366C41.9503 40.8771 48.9485 34.1614 44.1485 33.0587C42.3596 32.6477 39.2736 35.6193 39.2736 35.6193L39.2739 35.6191Z" fill="#D8D8D8" stroke="#E59112" stroke-width="0.388776"/>
<path id="Vector_3" fill-rule="evenodd" clip-rule="evenodd" d="M13.1254 47.9206C13.1254 47.9206 -12.3206 51.1419 10.5119 56.5114C40.8068 63.6358 50.969 53.5844 50.9993 52.219C51.1297 46.5903 33.4201 47.4391 33.4201 47.4391C38.5852 48.1326 38.8619 47.5692 44.8272 48.9388C50.7926 50.3085 42.58 58.2817 30.0215 57.6879C7.80167 56.6379 -7.4167 52.2985 13.1241 47.9204L13.1254 47.9206Z" fill="#D8D8D8" stroke="#E59112" stroke-width="0.33411"/>
<g id="Group_4">
<path id="Vector_4" fill-rule="evenodd" clip-rule="evenodd" d="M20.7386 1C19.4442 3.74271 19.0316 10.9723 23.8489 14.4479C28.6663 17.9235 20.628 32.8237 20.2652 32.8106C19.9025 32.7976 25.4646 19.6573 23.2323 16.5263C20.9999 13.3953 20.7384 1 20.7384 1H20.7386Z" fill="#D8D8D8" stroke="#E59112" stroke-width="0.238044"/>
<path id="Vector_5" fill-rule="evenodd" clip-rule="evenodd" d="M17.7713 4.62716C16.4766 7.00757 16.0639 13.282 20.8825 16.2985C25.701 19.3149 16.261 32.8239 15.8983 32.8127C15.5355 32.8014 22.4989 20.8196 20.2659 18.1023C18.0329 15.3849 17.7713 4.62695 17.7713 4.62695V4.62716Z" fill="#D8D8D8" stroke="#E59112" stroke-width="0.22179"/>
<path id="Vector_6" fill-rule="evenodd" clip-rule="evenodd" d="M26.7773 5.63574C25.4824 7.917 23.6703 14.096 28.4891 16.9867C33.3081 19.8774 23.8672 32.8231 23.5045 32.8123C23.1417 32.8015 30.1055 21.3194 27.8723 18.7155C25.6393 16.1114 26.7771 5.63595 26.7772 5.63595L26.7773 5.63574Z" fill="#D8D8D8" stroke="#E59112" stroke-width="0.217125"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,16 @@
<svg width="52" height="60" viewBox="0 0 52 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group">
<g id="Group_2">
<g id="Group_3">
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M22.3755 50.0556C27.7559 50.2743 33.4668 45.7477 40.2424 31.77C20.4344 38.0807 5.03081 33.9875 6.58335 31.2862C7.65373 29.4245 16.026 26.6521 38.8723 30.3829C38.8723 30.3829 31.7607 29.8081 24.0227 29.3372C15.0759 28.7929 8.45274 29.5524 7.94788 31.6758C7.74516 34.3256 29.8781 34.9384 40.2567 31.7319C37.6177 40.7802 31.6396 52.3846 21.6116 51.7728C15.2562 51.2771 9.69157 42.8165 5.86157 35.2045C12.077 44.8231 16.8182 49.7588 22.3748 50.0559L22.3755 50.0556Z" fill="#121111" stroke="#E59112" stroke-width="0.388776"/>
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M39.2739 35.6191C39.2739 35.6191 41.8326 30.9476 45.8967 31.3843C51.9063 32.0296 41.5239 45.994 33.6111 45.8864C34.8977 45.5075 36.4258 44.9872 38.9132 43.1366C41.9503 40.8771 48.9485 34.1614 44.1485 33.0587C42.3596 32.6477 39.2736 35.6193 39.2736 35.6193L39.2739 35.6191Z" fill="#121111" stroke="#E59112" stroke-width="0.388776"/>
<path id="Vector_3" fill-rule="evenodd" clip-rule="evenodd" d="M13.1254 47.9206C13.1254 47.9206 -12.3206 51.1419 10.5119 56.5114C40.8068 63.6358 50.969 53.5844 50.9993 52.219C51.1297 46.5903 33.4201 47.4391 33.4201 47.4391C38.5852 48.1326 38.8619 47.5692 44.8272 48.9388C50.7926 50.3085 42.58 58.2817 30.0215 57.6879C7.80167 56.6379 -7.4167 52.2985 13.1241 47.9204L13.1254 47.9206Z" fill="#121111" stroke="#E59112" stroke-width="0.33411"/>
<g id="Group_4">
<path id="Vector_4" fill-rule="evenodd" clip-rule="evenodd" d="M20.7386 1C19.4442 3.74271 19.0316 10.9723 23.8489 14.4479C28.6663 17.9235 20.628 32.8237 20.2652 32.8106C19.9025 32.7976 25.4646 19.6573 23.2323 16.5263C20.9999 13.3953 20.7384 1 20.7384 1H20.7386Z" fill="#121111" stroke="#E59112" stroke-width="0.238044"/>
<path id="Vector_5" fill-rule="evenodd" clip-rule="evenodd" d="M17.7713 4.62716C16.4766 7.00757 16.0639 13.282 20.8825 16.2985C25.701 19.3149 16.261 32.8239 15.8983 32.8127C15.5355 32.8014 22.4989 20.8196 20.2659 18.1023C18.0329 15.3849 17.7713 4.62695 17.7713 4.62695V4.62716Z" fill="#121111" stroke="#E59112" stroke-width="0.22179"/>
<path id="Vector_6" fill-rule="evenodd" clip-rule="evenodd" d="M26.7773 5.63574C25.4824 7.917 23.6703 14.096 28.4891 16.9867C33.3081 19.8774 23.8672 32.8231 23.5045 32.8123C23.1417 32.8015 30.1055 21.3194 27.8723 18.7155C25.6393 16.1114 26.7771 5.63595 26.7772 5.63595L26.7773 5.63574Z" fill="#121111" stroke="#E59112" stroke-width="0.217125"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

View File

@ -0,0 +1,16 @@
<svg width="202" height="234" viewBox="0 0 202 234" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group">
<g id="Group_2">
<g id="Group_3">
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M86.5024 197.223C108.024 198.097 130.868 179.991 157.97 124.08C78.738 149.323 17.1237 132.95 23.3339 122.145C27.6154 114.698 61.1047 103.609 152.49 118.532C152.49 118.532 124.043 116.233 93.0914 114.349C57.3039 112.172 30.8115 115.21 28.792 123.704C27.9811 134.303 116.513 136.754 158.027 123.928C147.471 160.121 123.559 206.539 83.4468 204.092C58.0254 202.109 35.7668 168.266 20.4468 137.818C45.3083 176.293 64.2731 196.036 86.4996 197.224L86.5024 197.223Z" fill="white" fill-opacity="0.3" stroke="#E59112" stroke-opacity="0.4" stroke-width="0.388776"/>
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M154.096 139.476C154.096 139.476 164.33 120.791 180.587 122.537C204.625 125.118 163.095 180.976 131.444 180.546C136.591 179.03 142.703 176.949 152.653 169.546C164.801 160.508 192.794 133.646 173.594 129.235C166.438 127.591 154.094 139.477 154.094 139.477L154.096 139.476Z" fill="white" fill-opacity="0.3" stroke="#E59112" stroke-opacity="0.4" stroke-width="0.388776"/>
<path id="Vector_3" fill-rule="evenodd" clip-rule="evenodd" d="M49.5015 188.68C49.5015 188.68 -52.2825 201.566 39.0474 223.044C160.227 251.541 200.876 211.336 200.997 205.874C201.519 183.359 130.68 186.755 130.68 186.755C151.341 189.529 152.448 187.275 176.309 192.753C200.17 198.232 167.32 230.125 117.086 227.75C28.2067 223.55 -32.6668 206.192 49.4964 188.68L49.5015 188.68Z" fill="white" fill-opacity="0.3" stroke="#E59112" stroke-opacity="0.4" stroke-width="0.33411"/>
<g id="Group_4">
<path id="Vector_4" fill-rule="evenodd" clip-rule="evenodd" d="M79.9539 1C74.7762 11.9708 73.1257 40.8891 92.3951 54.7915C111.665 68.694 79.5114 128.295 78.0603 128.242C76.6095 128.19 98.858 75.629 89.9286 63.1051C80.9992 50.5811 79.9531 1 79.9531 1H79.9539Z" fill="white" fill-opacity="0.3" stroke="#E59112" stroke-opacity="0.4" stroke-width="0.238044"/>
<path id="Vector_5" fill-rule="evenodd" clip-rule="evenodd" d="M68.0849 15.5086C62.9059 25.0303 61.255 50.1281 80.5295 62.1939C99.8035 74.2597 62.0436 128.296 60.5925 128.251C59.1414 128.206 86.995 80.2785 78.063 69.4091C69.131 58.5397 68.0849 15.5078 68.0849 15.5078V15.5086Z" fill="white" fill-opacity="0.3" stroke="#E59112" stroke-opacity="0.4" stroke-width="0.22179"/>
<path id="Vector_6" fill-rule="evenodd" clip-rule="evenodd" d="M104.109 19.541C98.9293 28.666 91.6805 53.3822 110.956 64.945C130.232 76.5078 92.4684 128.291 91.0173 128.247C89.5661 128.204 117.422 82.2755 108.489 71.8601C99.5567 61.4438 104.108 19.5418 104.108 19.5418L104.109 19.541Z" fill="white" fill-opacity="0.3" stroke="#E59112" stroke-opacity="0.4" stroke-width="0.217125"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,16 @@
<svg width="202" height="234" viewBox="0 0 202 234" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group">
<g id="Group_2">
<g id="Group_3">
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M86.5024 197.223C108.024 198.097 130.868 179.991 157.97 124.08C78.738 149.323 17.1237 132.95 23.3339 122.145C27.6154 114.698 61.1047 103.609 152.49 118.532C152.49 118.532 124.043 116.233 93.0914 114.349C57.3039 112.172 30.8115 115.21 28.792 123.704C27.9811 134.303 116.513 136.754 158.027 123.928C147.471 160.121 123.559 206.539 83.4468 204.092C58.0254 202.109 35.7668 168.266 20.4468 137.818C45.3083 176.293 64.2731 196.036 86.4996 197.224L86.5024 197.223Z" fill="#121111" fill-opacity="0.1" stroke="#E59112" stroke-opacity="0.5" stroke-width="0.388776"/>
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M154.096 139.476C154.096 139.476 164.33 120.791 180.587 122.537C204.625 125.118 163.095 180.976 131.444 180.546C136.591 179.03 142.703 176.949 152.653 169.546C164.801 160.508 192.794 133.646 173.594 129.235C166.438 127.591 154.094 139.477 154.094 139.477L154.096 139.476Z" fill="#121111" fill-opacity="0.1" stroke="#E59112" stroke-opacity="0.5" stroke-width="0.388776"/>
<path id="Vector_3" fill-rule="evenodd" clip-rule="evenodd" d="M49.5015 188.68C49.5015 188.68 -52.2825 201.566 39.0474 223.044C160.227 251.541 200.876 211.336 200.997 205.874C201.519 183.359 130.68 186.755 130.68 186.755C151.341 189.529 152.448 187.275 176.309 192.753C200.17 198.232 167.32 230.125 117.086 227.75C28.2067 223.55 -32.6668 206.192 49.4964 188.68L49.5015 188.68Z" fill="#121111" fill-opacity="0.1" stroke="#E59112" stroke-opacity="0.5" stroke-width="0.33411"/>
<g id="Group_4">
<path id="Vector_4" fill-rule="evenodd" clip-rule="evenodd" d="M79.9539 1C74.7762 11.9708 73.1257 40.8891 92.3951 54.7915C111.665 68.694 79.5114 128.295 78.0603 128.242C76.6095 128.19 98.858 75.629 89.9286 63.1051C80.9992 50.5811 79.9531 1 79.9531 1H79.9539Z" fill="#121111" fill-opacity="0.1" stroke="#E59112" stroke-opacity="0.5" stroke-width="0.238044"/>
<path id="Vector_5" fill-rule="evenodd" clip-rule="evenodd" d="M68.0849 15.5086C62.9059 25.0303 61.255 50.1281 80.5295 62.1939C99.8035 74.2597 62.0436 128.296 60.5925 128.251C59.1414 128.206 86.995 80.2785 78.063 69.4091C69.131 58.5397 68.0849 15.5078 68.0849 15.5078V15.5086Z" fill="#121111" fill-opacity="0.1" stroke="#E59112" stroke-opacity="0.5" stroke-width="0.22179"/>
<path id="Vector_6" fill-rule="evenodd" clip-rule="evenodd" d="M104.109 19.541C98.9293 28.666 91.6805 53.3822 110.956 64.945C130.232 76.5078 92.4684 128.291 91.0173 128.247C89.5661 128.204 117.422 82.2755 108.489 71.8601C99.5567 61.4438 104.108 19.5418 104.108 19.5418L104.109 19.541Z" fill="#121111" fill-opacity="0.1" stroke="#E59112" stroke-opacity="0.5" stroke-width="0.217125"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="200"
height="100"
viewBox="0 0 200 100"
fill="none"
version="1.1"
id="svg1"
sodipodi:docname="Milk foam.svg"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="3.1343868"
inkscape:cx="115.49308"
inkscape:cy="86.460293"
inkscape:window-width="2560"
inkscape:window-height="1376"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<rect
style="fill:#fff3e6;fill-opacity:1;fill-rule:evenodd;stroke-width:1.5798"
id="rect1"
width="200"
height="100"
x="0"
y="0" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="200"
height="100"
viewBox="0 0 52.916667 26.458333"
version="1.1"
id="svg1"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
sodipodi:docname="espresso_coffee.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="1.0476431"
inkscape:cx="291.12968"
inkscape:cy="447.67154"
inkscape:window-width="2560"
inkscape:window-height="1376"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#75370a;fill-opacity:1;fill-rule:evenodd;stroke-width:0.0717103"
id="rect1"
width="52.916668"
height="26.458334"
x="-6.357829e-07"
y="-3.1789145e-07"
ry="0.062213216" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="200"
height="100"
viewBox="0 0 52.916667 26.458333"
version="1.1"
id="svg1"
sodipodi:docname="milk.svg"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffe7cb"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="false"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="4.1905724"
inkscape:cx="108.09979"
inkscape:cy="100.4636"
inkscape:window-width="2560"
inkscape:window-height="1376"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffe7cb;fill-opacity:1;fill-rule:evenodd;stroke-width:0.510538"
id="rect1"
width="52.916668"
height="26.458334"
x="-6.357829e-07"
y="-3.1789145e-07" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="60mm"
height="50mm"
viewBox="0 0 60 50"
version="1.1"
id="svg1"
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
sodipodi:docname="sugar.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="2.0952862"
inkscape:cx="120.74723"
inkscape:cy="137.92865"
inkscape:window-width="2560"
inkscape:window-height="1376"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.193729"
id="rect1"
width="20"
height="20"
x="20.87686"
y="-5.0142732"
ry="0.17020772"
transform="rotate(44.842301)" />
<rect
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.076175"
id="rect2"
width="10"
height="10"
x="-27.30084"
y="-54.357605"
ry="0.069809847"
transform="rotate(135.06861)" />
<rect
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.119416"
id="rect3"
width="15"
height="15"
x="45.581875"
y="-10.473429"
ry="0.10318999"
transform="rotate(44.880389)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1,3 @@
<svg width="6" height="5" viewBox="0 0 6 5" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="Polygon 1" d="M3.86603 4.5C3.48112 5.16667 2.51887 5.16667 2.13397 4.5L0.401924 1.5C0.0170235 0.833332 0.498149 -5.6841e-07 1.26795 -5.01112e-07L4.73205 -1.9827e-07C5.50185 -1.30972e-07 5.98298 0.833333 5.59808 1.5L3.86603 4.5Z" fill="#898989"/>
</svg>

After

Width:  |  Height:  |  Size: 355 B

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg1"
width="93.333336"
height="66.666664"
viewBox="0 0 93.333336 66.666664"
sodipodi:docname="Qt-logo-white-transparent.png"
inkscape:export-filename="Qt-logo-white-transparent.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1" />
<g
inkscape:groupmode="layer"
inkscape:label="Image"
id="g1">
<image
width="93.333336"
height="66.666664"
preserveAspectRatio="none"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAyCAYAAADhna1TAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA&#10;AXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAbtSURBVHgB7ZprbBRVFIDPuTO7WysIIlVe1ba0&#10;IHSLgIqJUQO+IiaGKI9IjNGIMSb+IKAE6ENWdltKQ/SHJkZjfASNRDT+MRE0kadRESzSB4/S7QJF&#10;RZpC1aaP3bnHM8vD3ZntY+8OmZrypdOZPffOnZkz55577rmD0Adzd8zV2/IeWg8Ea2C4gUB6X2Vn&#10;8x4M4nBUigkBiFRyf8uGKiQcnkq5iGYV+MOVIVZZKQxzkiymOFy5nndlcBW47GP84arKq5byH3GL&#10;8Ueudh8r+nTTp8gr1X3oPKA4yPt2IpCIbKGSRgFiERdOgiGMzibjmKXwKEccAuzhw/d8FNv12GZo&#10;DQQCMlVd//FQLkhjBnr0l1hp82GIgTwKmTeOkCGslIgw8Nm6otJdkCazmqqmR3X6hBuZOVBdiv/F&#10;t0TYGDN/hsTLCHACgh1attevohST2qLSxvq8ojsI6KOB6gqiV3Lyo77EjVWyDRxGh8xp4Rtbemjc&#10;qk7IBFxiZDVXL+8RRhEr+u6+qrF5y50YiCXK/C0hctZgHFCMBHymsaD0jFU+5fSmsb7u7ucJxZOA&#10;ZDraa/iBe4EoTEJ8Y0DvO0fyA5HEcw5MXtNRcqr6RRkzDvJ0xBlrViTDi+N2Vsoeq7Q4UjnP29Pz&#10;CyFu4H52GyvkBt6yuWg0e4PZSLRGl559/kjoceu5dblr6vjdfw4uk5liyHjXKpp1MjABJW7hw9x+&#10;z0XI4QF8y9Rw5QxrkQTxAbiMsmKI6K/z3mu/tsqjUU+QS2+EweHVJQStwsb8tdsI8A9wEWUfIwB/&#10;bs1d2ZUou/10ILunG56ANECB82e2BEYfzA+cT2pf0F6SsOhCJdzJL+I781AzxA/WNgi0j9nOfkzR&#10;/MPcLe8BBZQVw073V6usq1ufLZD9SFqQJ2bo8/jgyyQpmYEixhUjib5vLCgL9tVCQ/7aT1PJ/ceD&#10;o1jDSopR7koC6IBdBn5QQcBcm4yMw+AiyoqRHtFkE6Ka2SLgBKssRp4T4CLqXSlm/GmVIYibyBat&#10;DwxPsCZaZddkw7lo16V2YWpxc2iheRxDqj9aUHE0sW7xyfV3QlTcbGuXz1MN+5QV4+uIdVhlhDRC&#10;QS98Cl1nlZ3r7v17BHjM1sx50CL+H/c3OsEK3iUpBg0R4PJHwUGUu1JbV0ePTUiUDQogoo/PTXq5&#10;kTzoJTNSdglVxVBWTr4tncCPpoECPCzri2GJ5V7WceAMUXAJRcUgxPR2x2ZtnMOhrVBMKYtcQlEx&#10;hNmddv/ESy5Kb5ijXO6WgSTFLIatHBGAD1xC2cfoWWDzJ/xkSqkHHq47TbNJlB062pIN6EhaRAll&#10;xcTAZxtJOFVwBhRgX2Ib4Tx6NM0I2lmUFYPQa5s9C020gAJkyLNWmTRgPLiI+pRA886xygyS+0EB&#10;0rDW1r4+6Bn6FUF9SkDGNKtMi/XuBQVEDHdbZSi0B8BFMkhUoc1iDhW91sq7dBPirZxET5FKoLtS&#10;VRap7lmi44GgeldCnDL9RNV0W4GGmyANeBUuZJXF15wA5qSsL1KNVHQOHCaTDJ6GMXjaKq+/pfQr&#10;Lqth72wM1AaPYm805q21pUfJI5aa2aeUJ0kaY2sHUcnp90dGOV+BtGxmbcA2rDZMLl8tJc3l7rCd&#10;H/AsJS2QUbu5DiVALqibXLaSnyopfpkWKR2PRj/r6AJts2jDwC/MBb/LV4j3RI4ozE2RjAIovoGc&#10;6ChvDR++YC1rnFxuOuJHzLD21tNVY7BXjhjpFf/sm1jablVGIpqRXcnWNqqvciRxr+1avGC3mD4r&#10;rG85NgnR22OMoM7xY+d0tYX3crcWy0EBR5Zo+TlX1+WX10CG+CMbakDKVQPVMySUHC4sqx+oXkk4&#10;FOT3Ug7p48wSLWcMNhY3B18fe2TjSFDEHw4OSikmmoDAYOrx9LwNFHFstQ9RrBjnjTWVNAdXzwgH&#10;p0K6aOLbuDseHAvZujZPi1T2Hx0TtoMijn3tYG8Zmnm23cI2+Ts70994WbaLB6os9jnjebja31hQ&#10;/pb1FH84xMsg+NSgrxGfldNPEHe88hQvxRBJHMfXzuXrmN/gmClTlRk6XTnF9Av2GCCnHi4oT0p4&#10;FzZV5WRpZKYtrwd3Ice6UprX9XGA+LZVeryolId2XA1DANe+KGBvMr/kZPUCq7xhf+37vNsNriKr&#10;XP3UgmLyzcKmdcl5nSVbDY5kPwS3kFRVX1BR7lqG7AKU69N86/jgZfPXtGOh+zQPlPGU4n5wA5Qb&#10;6gsr4h9quuR8k+6GePrwnBCwDBQX4J2AQAYbCipevfTbZYsxIWSluPw9jKxMVIqJqz5mKMDdttr0&#10;KVb5ELAY9+Al5eqGgvK1qcr0izG4worz/xyijTknYhV9Ff8L2rR18KdkrNoAAAAASUVORK5CYII=&#10;"
id="image1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,9 @@
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="check">
<g id="Group">
<g id="Group_2">
<path id="Path" d="M15.8332 6.19824L8.49984 13.5316L5.1665 10.1982" stroke="#2CDE85" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="dark_mode_black_24dp 1" clip-path="url(#clip0_120_6583)">
<path id="Vector" d="M9.37 5.51C9.19 6.15 9.1 6.82 9.1 7.5C9.1 11.58 12.42 14.9 16.5 14.9C17.18 14.9 17.85 14.81 18.49 14.63C17.45 17.19 14.93 19 12 19C8.14 19 5 15.86 5 12C5 9.07 6.81 6.55 9.37 5.51ZM12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C16.97 21 21 16.97 21 12C21 11.54 20.96 11.08 20.9 10.64C19.92 12.01 18.32 12.9 16.5 12.9C13.52 12.9 11.1 10.48 11.1 7.5C11.1 5.69 11.99 4.08 13.36 3.1C12.92 3.04 12.46 3 12 3Z" fill="#667085"/>
</g>
<defs>
<clipPath id="clip0_120_6583">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 716 B

View File

@ -0,0 +1,3 @@
<svg width="40" height="41" viewBox="0 0 40 41" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle id="Ellipse 3" cx="20" cy="20.1582" r="19.1" fill="#212121" stroke="#1FC974" stroke-width="1.8"/>
</svg>

After

Width:  |  Height:  |  Size: 209 B

View File

@ -0,0 +1,3 @@
<svg width="40" height="41" viewBox="0 0 40 41" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle id="Ellipse 3" cx="20" cy="20.1582" r="19.1" fill="white" stroke="#2CDE85" stroke-width="1.8"/>
</svg>

After

Width:  |  Height:  |  Size: 207 B

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="keyboard_backspace_black_24dp 1">
<path id="Vector" d="M20 11.0005H6.82998L9.70998 8.12047C10.1 7.73047 10.1 7.10047 9.70998 6.71047C9.31998 6.32047 8.68998 6.32047 8.29998 6.71047L3.70998 11.3005C3.31998 11.6905 3.31998 12.3205 3.70998 12.7105L8.29998 17.3005C8.68998 17.6905 9.31998 17.6905 9.70998 17.3005C10.1 16.9105 10.1 16.2805 9.70998 15.8905L6.82998 13.0005H20C20.55 13.0005 21 12.5505 21 12.0005C21 11.4505 20.55 11.0005 20 11.0005Z" fill="#121111"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 576 B

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="keyboard_backspace_black_24dp 2">
<path id="Vector" d="M20 11.0005L6.82998 11.0005L9.70998 8.12047C10.1 7.73047 10.1 7.10047 9.70998 6.71047C9.31998 6.32047 8.68998 6.32047 8.29998 6.71047L3.70998 11.3005C3.31998 11.6905 3.31998 12.3205 3.70998 12.7105L8.29998 17.3005C8.68998 17.6905 9.31998 17.6905 9.70998 17.3005C10.1 16.9105 10.1 16.2805 9.70998 15.8905L6.82998 13.0005L20 13.0005C20.55 13.0005 21 12.5505 21 12.0005C21 11.4505 20.55 11.0005 20 11.0005Z" fill="black"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 590 B

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="keyboard_backspace_black_24dp 2">
<path id="Vector" d="M4.00002 12.9995L17.17 12.9995L14.29 15.8795C13.9 16.2695 13.9 16.8995 14.29 17.2895C14.68 17.6795 15.31 17.6795 15.7 17.2895L20.29 12.6995C20.68 12.3095 20.68 11.6795 20.29 11.2895L15.7 6.69953C15.31 6.30953 14.68 6.30953 14.29 6.69953C13.9 7.08953 13.9 7.71953 14.29 8.10953L17.17 10.9995L4.00002 10.9995C3.45002 10.9995 3.00002 11.4495 3.00002 11.9995C3.00002 12.5495 3.45002 12.9995 4.00002 12.9995Z" fill="black"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 590 B

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="keyboard_backspace_black_24dp 2">
<path id="Vector" d="M20 11.0005L6.82998 11.0005L9.70998 8.12047C10.1 7.73047 10.1 7.10047 9.70998 6.71047C9.31998 6.32047 8.68998 6.32047 8.29998 6.71047L3.70998 11.3005C3.31998 11.6905 3.31998 12.3205 3.70998 12.7105L8.29998 17.3005C8.68998 17.6905 9.31998 17.6905 9.70998 17.3005C10.1 16.9105 10.1 16.2805 9.70998 15.8905L6.82998 13.0005L20 13.0005C20.55 13.0005 21 12.5505 21 12.0005C21 11.4505 20.55 11.0005 20 11.0005Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 590 B

View File

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="keyboard_backspace_black_24dp 2">
<path id="Vector" d="M4.00002 12.9995L17.17 12.9995L14.29 15.8795C13.9 16.2695 13.9 16.8995 14.29 17.2895C14.68 17.6795 15.31 17.6795 15.7 17.2895L20.29 12.6995C20.68 12.3095 20.68 11.6795 20.29 11.2895L15.7 6.69953C15.31 6.30953 14.68 6.30953 14.29 6.69953C13.9 7.08953 13.9 7.71953 14.29 8.10953L17.17 10.9995L4.00002 10.9995C3.45002 10.9995 3.00002 11.4495 3.00002 11.9995C3.00002 12.5495 3.45002 12.9995 4.00002 12.9995Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 590 B

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="light_mode_black_24dp 1" clip-path="url(#clip0_22_4357)">
<path id="Vector" d="M12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9ZM12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7ZM2 13H4C4.55 13 5 12.55 5 12C5 11.45 4.55 11 4 11H2C1.45 11 1 11.45 1 12C1 12.55 1.45 13 2 13ZM20 13H22C22.55 13 23 12.55 23 12C23 11.45 22.55 11 22 11H20C19.45 11 19 11.45 19 12C19 12.55 19.45 13 20 13ZM11 2V4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4V2C13 1.45 12.55 1 12 1C11.45 1 11 1.45 11 2ZM11 20V22C11 22.55 11.45 23 12 23C12.55 23 13 22.55 13 22V20C13 19.45 12.55 19 12 19C11.45 19 11 19.45 11 20ZM5.99 4.58C5.6 4.19 4.96 4.19 4.58 4.58C4.19 4.97 4.19 5.61 4.58 5.99L5.64 7.05C6.03 7.44 6.67 7.44 7.05 7.05C7.43 6.66 7.44 6.02 7.05 5.64L5.99 4.58ZM18.36 16.95C17.97 16.56 17.33 16.56 16.95 16.95C16.56 17.34 16.56 17.98 16.95 18.36L18.01 19.42C18.4 19.81 19.04 19.81 19.42 19.42C19.81 19.03 19.81 18.39 19.42 18.01L18.36 16.95ZM19.42 5.99C19.81 5.6 19.81 4.96 19.42 4.58C19.03 4.19 18.39 4.19 18.01 4.58L16.95 5.64C16.56 6.03 16.56 6.67 16.95 7.05C17.34 7.43 17.98 7.44 18.36 7.05L19.42 5.99ZM7.05 18.36C7.44 17.97 7.44 17.33 7.05 16.95C6.66 16.56 6.02 16.56 5.64 16.95L4.58 18.01C4.19 18.4 4.19 19.04 4.58 19.42C4.97 19.8 5.61 19.81 5.99 19.42L7.05 18.36Z" fill="#DDE2E8"/>
</g>
<defs>
<clipPath id="clip0_22_4357">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

View File

@ -1,22 +0,0 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
pragma Singleton
import QtQuick
QtObject {
property FontLoader fontLoader: FontLoader {
id: fontLoader
source: "TitilliumWeb-Regular.ttf"
}
readonly property alias fontFamily: fontLoader.name
readonly property int width: 1024
readonly property int height: 768
readonly property int leftSideBarWidth: 366
readonly property int defaultX: 0
readonly property color backgroundColor: "#443224"
readonly property int defaultMargin: 8
}

View File

@ -1 +0,0 @@
singleton Constants 1.0 Constants.qml

View File

@ -1,4 +1,4 @@
// Copyright (C) 2020 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QGuiApplication>
@ -9,8 +9,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.addImportPath(":/imports");
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
engine.load(QUrl(QLatin1String("qrc:/qt/qml/Coffee/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;

View File

@ -1,16 +1,18 @@
// Copyright (C) 2017 The Qt Company Ltd.
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Controls
import Coffee
ApplicationWindow {
visible: true
width: Constants.width
height: Constants.height
width: Screen.desktopAvailableWidth
height: Screen.desktopAvailableHeight
title: qsTr("Coffee")
ApplicationFlow {
width: parent.width
height: parent.height
mode: (Screen.height > Screen.width) ? "portrait" : "landscape"
}
}

View File

@ -1,39 +0,0 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>qtquickcontrols2.conf</file>
<file>images/cup structure/cup elements/coffee_cup_back.png</file>
<file>images/cup structure/cup elements/coffee_cup_coverplate.png</file>
<file>images/cup structure/cup elements/coffee_cup_front.png</file>
<file>images/cup structure/liquids/liquid_coffee.png</file>
<file>images/cup structure/liquids/liquid_foam.png</file>
<file>images/cup structure/liquids/liquid_milk.png</file>
<file>images/cup structure/coffee_cup_large.png</file>
<file>images/cup structure/coffee_cup_outline.png</file>
<file>images/icons/contents/coffee.png</file>
<file>images/icons/contents/milk.png</file>
<file>images/icons/contents/sugar.png</file>
<file>images/icons/coffees/Americano.png</file>
<file>images/icons/coffees/cappucino.png</file>
<file>images/icons/coffees/Espresso.png</file>
<file>images/icons/coffees/Latte.png</file>
<file>images/icons/coffees/Macchiato.png</file>
<file>images/ui controls/buttons/back/white.png</file>
<file>images/ui controls/buttons/go/white.png</file>
<file>images/ui controls/line.png</file>
<file>CoffeeButton.qml</file>
<file>CupForm.ui.qml</file>
<file>SideBar.qml</file>
<file>SideBarForm.ui.qml</file>
<file>NavigationButton.ui.qml</file>
<file>ApplicationFlow.qml</file>
<file>ApplicationFlowForm.ui.qml</file>
<file>EmptyCupForm.ui.qml</file>
<file>Brewing.qml</file>
<file>BrewingForm.ui.qml</file>
<file>ChoosingCoffee.ui.qml</file>
<file>imports/Coffee/Constants.qml</file>
<file>imports/Coffee/qmldir</file>
<file>imports/Coffee/TitilliumWeb-Regular.ttf</file>
</qresource>
</RCC>

View File

@ -0,0 +1,17 @@
module Coffee
typeinfo coffee.qmltypes
prefer :/qt/qml/Coffee/
ApplicationFlow 254.0 ApplicationFlow.qml
ApplicationFlowForm 254.0 ApplicationFlowForm.ui.qml
ChoosingCoffee 254.0 ChoosingCoffee.qml
CoffeeCard 254.0 CoffeeCard.qml
singleton Colors 254.0 Colors.qml
CustomButton 254.0 CustomButton.qml
CustomSlider 254.0 CustomSlider.qml
CustomToolBar 254.0 CustomToolBar.qml
FilledCup 254.0 Cup.qml
Home 254.0 Home.qml
Insert 254.0 Insert.qml
Progress 254.0 Progress.qml
Ready 254.0 Ready.qml
Settings 254.0 Settings.qml

View File

@ -1,16 +0,0 @@
[
{
"Id": "coffeeexample-titillium",
"Name": "Titillium Web Font",
"Path": "imports/Coffee",
"QDocModule": "qtdoc",
"QtUsage": "Used in the Coffee Maker example.",
"QtParts": ["examples"],
"Files": "TitilliumWeb-Regular.ttf",
"License": "SIL Open Font License 1.1",
"LicenseId": "OFL-1.1",
"LicenseFile": "LICENSE.txt",
"Copyright": "Copyright (c) 2009-2011 by Accademia di Belle Arti di Urbino and students of MA course of Visual design. Some rights reserved."
}
]