2024-06-01 01:14:46 +01:00
|
|
|
import QtQuick
|
|
|
|
import Qt5Compat.GraphicalEffects
|
|
|
|
|
|
|
|
import roulette
|
|
|
|
|
|
|
|
Item {
|
2024-06-02 21:13:43 +01:00
|
|
|
property int numberOfBets: 0
|
|
|
|
|
|
|
|
id: rouletteTable
|
2024-06-01 01:14:46 +01:00
|
|
|
|
|
|
|
Image {
|
2024-06-04 21:10:39 +01:00
|
|
|
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 {
|
|
|
|
}
|
2024-06-04 21:10:39 +01:00
|
|
|
|
|
|
|
Columns {
|
|
|
|
}
|
2024-06-05 07:02:33 +01:00
|
|
|
|
|
|
|
Dozens {
|
|
|
|
}
|
2024-06-05 07:52:49 +01:00
|
|
|
|
2024-06-05 23:25:19 +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
|
|
|
}
|
2024-06-02 21:13:43 +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));
|
|
|
|
}
|
|
|
|
|
2024-06-04 21:10:39 +01:00
|
|
|
/* Call this function to dynamically create a dialog box */
|
2024-06-02 21:13:43 +01:00
|
|
|
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
|
|
|
}
|