92 lines
2.0 KiB
QML
92 lines
2.0 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QtQuick.Effects
|
|
import QtQuick.Shapes
|
|
import Qt.labs.qmlmodels
|
|
|
|
import InventoryWars
|
|
|
|
ApplicationWindow {
|
|
height: 480
|
|
title: "Inventory Wars"
|
|
visible: true
|
|
width: 640
|
|
|
|
ListModel {
|
|
id: rounds
|
|
|
|
ListElement {
|
|
name: "Round 1"
|
|
mode: GameService.GameScoring.FirstGuessThenHighestAmount
|
|
item_id: 1061153
|
|
item_name: "Dreamweave Silk Selection Gift Box"
|
|
item_image: ""
|
|
clue: "Dreamweave Silk Selection Gift Box"
|
|
}
|
|
ListElement {
|
|
name: "Round 2"
|
|
mode: GameService.GameScoring.FirstGuess
|
|
item_id: 100
|
|
item_name: "Item 2"
|
|
item_image: ""
|
|
clue: "Clue 2"
|
|
}
|
|
ListElement {
|
|
name: "Round 3"
|
|
mode: GameService.GameScoring.FirstGuess
|
|
item_id: 100
|
|
item_name: "Item 3"
|
|
item_image: ""
|
|
clue: "Clue 3"
|
|
}
|
|
ListElement {
|
|
name: "Round 4"
|
|
mode: GameService.GameScoring.FirstGuess
|
|
item_id: 100
|
|
item_name: "Item 4"
|
|
item_image: ""
|
|
clue: "Clue 4"
|
|
}
|
|
}
|
|
|
|
SqlLeaderboardModel {
|
|
id: leaderboard
|
|
}
|
|
|
|
IdleView {
|
|
id: idleView
|
|
|
|
anchors.fill: parent
|
|
|
|
leaderboard: leaderboard
|
|
rounds: rounds
|
|
selectedRound: rounds.get(0)
|
|
onRoundSelected: {
|
|
idleView.visible = false
|
|
ongoingView.start()
|
|
ongoingView.visible = true
|
|
}
|
|
}
|
|
|
|
OngoingView {
|
|
id: ongoingView
|
|
|
|
anchors.fill: parent
|
|
|
|
visible: false
|
|
round: idleView.selectedRound
|
|
gameService: gameService
|
|
onClose: {
|
|
idleView.visible = true
|
|
ongoingView.visible = false
|
|
leaderboard.select()
|
|
}
|
|
}
|
|
|
|
GameService {
|
|
id: gameService
|
|
}
|
|
}
|
|
|