From 540d77aa4ba9e4c4a598cc943a0a0e99ba42cb3b Mon Sep 17 00:00:00 2001 From: jessicazha0 Date: Wed, 6 Nov 2024 15:09:50 -0500 Subject: [PATCH] #125 tank icon --- NERODesign/content/TankIcon.qml | 132 ++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 NERODesign/content/TankIcon.qml diff --git a/NERODesign/content/TankIcon.qml b/NERODesign/content/TankIcon.qml new file mode 100644 index 0000000..3f1175e --- /dev/null +++ b/NERODesign/content/TankIcon.qml @@ -0,0 +1,132 @@ +import QtQuick 2.15 + +Item { + width: 400 + height: 300 + + property real barrelAngle: 0 + + Rectangle { + width: 170 + height: 40 + radius: height / 2 + color: "black" + anchors.verticalCenterOffset: 14 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + + Rectangle { + width: 55 + height: 20 + radius: height / 2 + color: "black" + anchors.verticalCenterOffset: 13 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + rotation: -22 + anchors.horizontalCenterOffset: -89 + } + + Rectangle { + width: 55 + height: 20 + radius: height / 2 + color: "black" + anchors.verticalCenterOffset: 13 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + rotation: 22 + anchors.horizontalCenterOffset: 89 + } + + Item { + + width: 250 + height: 35 + clip: true + anchors.verticalCenterOffset: 30 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + Rectangle { + width: 250 + height: 100 + radius: height / 2 + color: "black" + anchors.verticalCenterOffset: 15 + anchors.verticalCenter: parent.verticalCenter + + } + } + + Rectangle { + width: 250 + height: 45 + radius: height / 2 + color: "black" + anchors.verticalCenterOffset: 75 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + + Rectangle { + id: turretTop + width: 100 + height: 50 + radius: height / 2 + color: "black" + anchors.verticalCenterOffset: -50 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + Rectangle { + id: tankHatch + width: 35 + height: 20 + radius: height / 5 + color: "black" + anchors.verticalCenterOffset: -19 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + + } + + Rectangle { + id: turretBottom + width: 100 + height: 40 + color: "black" + anchors.verticalCenterOffset: -30 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + + Rectangle { + id: barrel + width: 140 + height: 16 + color: "black" + anchors.verticalCenterOffset: -5 + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 50 + transformOrigin: Item.Left + rotation: barrelAngle + + Rectangle { + id: barrelTip + width: 35 + height: 25 + radius: height / 4 + color: "black" + anchors.horizontalCenterOffset: 75 + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + } + } + + + + } +}