roulette-payout/Roulette.qml

70 lines
1.4 KiB
QML
Raw Permalink Normal View History

2024-06-01 01:14:46 +01:00
import QtQuick
import Qt5Compat.GraphicalEffects
import roulette
Item {
property int numberOfBets: 0
id: rouletteTable
2024-06-01 01:14:46 +01:00
Image {
source: "qrc:///roulette.png"
2024-06-01 01:14:46 +01:00
height: parent.height
width: parent.width
anchors {
top: parent.top
right: parent.right
}
StreetBetsView {
}
Columns {
}
2024-06-05 07:02:33 +01:00
Dozens {
}
2024-06-05 07:52:49 +01:00
Singles {
}
RedBlack {
2024-06-05 07:52:49 +01:00
}
2024-06-06 08:11:37 +01:00
EvenOdd {
}
2024-06-06 08:17:49 +01:00
LowHigh {
}
2024-06-01 01:14:46 +01:00
}
function destroyOnClose(obj) {
if (obj.closing != undefined)
obj.closing.connect(() => obj.destroy(1000));
else if (obj.aboutToHide != undefined)
obj.aboutToHide.connect(() => obj.destroy(1000));
}
/* Call this function to dynamically create a dialog box */
function showBetInputDialog(betType, n, squareX, squareY)
{
var component = Qt.createComponent("BetInputDialog.qml")
if (component.status == Component.Ready) {
var dialog = component.createObject(rouletteTable, {
"betType": betType,
"n": n,
"squareX": squareX,
"squareY": squareY
})
dialog.open()
destroyOnClose(dialog)
} else {
console.error("Something crapped out: " + component.errorString());
}
}
2024-06-01 01:14:46 +01:00
}