aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickGamepad/qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickGamepad/qml')
-rw-r--r--examples/quickGamepad/qml/ButtonImage.qml72
-rw-r--r--examples/quickGamepad/qml/DPad.qml101
-rw-r--r--examples/quickGamepad/qml/JoystickViewer.qml74
-rw-r--r--examples/quickGamepad/qml/LeftThumbstick.qml62
-rw-r--r--examples/quickGamepad/qml/RightThumbstick.qml63
-rw-r--r--examples/quickGamepad/qml/main.qml235
-rw-r--r--examples/quickGamepad/qml/xboxControllerBack.pngbin0 -> 11012 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerButtonA.pngbin0 -> 13764 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerButtonB.pngbin0 -> 13480 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerButtonGuide.pngbin0 -> 37297 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerButtonX.pngbin0 -> 14017 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerButtonY.pngbin0 -> 13911 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerDPad.pngbin0 -> 33024 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerLeftShoulder.pngbin0 -> 22224 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerLeftThumbstick.pngbin0 -> 28966 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerLeftTrigger.pngbin0 -> 13918 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerRightShoulder.pngbin0 -> 21209 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerRightThumbstick.pngbin0 -> 29386 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerRightTrigger.pngbin0 -> 14152 bytes
-rw-r--r--examples/quickGamepad/qml/xboxControllerStart.pngbin0 -> 11271 bytes
20 files changed, 607 insertions, 0 deletions
diff --git a/examples/quickGamepad/qml/ButtonImage.qml b/examples/quickGamepad/qml/ButtonImage.qml
new file mode 100644
index 0000000..8057542
--- /dev/null
+++ b/examples/quickGamepad/qml/ButtonImage.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Gamepad module
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtGraphicalEffects 1.0
+
+Item {
+ width: buttonImage.sourceSize.width
+ height: buttonImage.sourceSize.height
+
+ property alias source: buttonImage.source
+ property bool active: false
+
+ Image {
+ id: buttonImage
+ smooth: true
+// visible: !active
+ }
+
+ Rectangle {
+ anchors.fill: buttonImage
+ color: "#14abff"
+ opacity: 0.6
+ radius: 8
+ visible: active
+ }
+
+ // BrightnessContrast {
+ // anchors.fill: buttonImage
+ // source: buttonImage
+ // brightness: 0.5
+ // contrast: 0.5
+ // visible: active
+ // }
+}
diff --git a/examples/quickGamepad/qml/DPad.qml b/examples/quickGamepad/qml/DPad.qml
new file mode 100644
index 0000000..d34c953
--- /dev/null
+++ b/examples/quickGamepad/qml/DPad.qml
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Gamepad module
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtGamepad 1.0
+import QtGraphicalEffects 1.0
+
+Item {
+ property Gamepad gamepad
+
+ width: dpadImage.sourceSize.width
+ height: dpadImage.sourceSize.height
+ Image {
+ id: dpadImage
+ anchors.fill: parent
+ source: "xboxControllerDPad.png"
+ }
+
+ Rectangle {
+ id: upArea
+ visible: gamepad.buttonUp
+ color: "#3814abff"
+ radius: 5
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: parent.width * 0.3
+ height: parent.height * 0.3
+ anchors.topMargin: parent.height * 0.05
+ }
+ Rectangle {
+ id: downArea
+ visible: gamepad.buttonDown
+ color: "#3814abff"
+ radius: 5
+ width: parent.width * 0.3
+ height: parent.height * 0.3
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: parent.height * 0.05
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Rectangle {
+ id: leftArea
+ visible: gamepad.buttonLeft
+ color: "#3814abff"
+ radius: 5
+ width: parent.width * 0.3
+ height: parent.height * 0.3
+ anchors.left: parent.left
+ anchors.leftMargin: parent.width * 0.05
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Rectangle {
+ id: rightArea
+ visible: gamepad.buttonRight
+ color: "#3814abff"
+ radius: 5
+ width: parent.width * 0.3
+ height: parent.height * 0.3
+ anchors.right: parent.right
+ anchors.rightMargin: parent.width * 0.05
+ anchors.verticalCenter: parent.verticalCenter
+ }
+}
diff --git a/examples/quickGamepad/qml/JoystickViewer.qml b/examples/quickGamepad/qml/JoystickViewer.qml
new file mode 100644
index 0000000..da0168e
--- /dev/null
+++ b/examples/quickGamepad/qml/JoystickViewer.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Gamepad module
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ width: 100
+ height: 100
+
+ property real xAxisValue: 0
+ property real yAxisValue: 0
+
+ onXAxisValueChanged: {
+ joystickCanvas.requestPaint();
+ }
+ onYAxisValueChanged: {
+ joystickCanvas.requestPaint()
+ }
+
+ Canvas {
+ id: joystickCanvas
+ anchors.fill: parent
+
+ onPaint: {
+ var context = joystickCanvas.getContext("2d")
+ context.clearRect(0, 0, width, height);
+ var targetX = (xAxisValue + 1) / 2 * width;
+ var targetY = (yAxisValue + 1) / 2 * height;
+ context.fillStyle = "red";
+ context.beginPath();
+ context.arc(targetX, targetY, 5, 0, 2 * Math.PI, false);
+ context.closePath();
+ context.fill();
+ }
+ }
+
+}
diff --git a/examples/quickGamepad/qml/LeftThumbstick.qml b/examples/quickGamepad/qml/LeftThumbstick.qml
new file mode 100644
index 0000000..8ee0db0
--- /dev/null
+++ b/examples/quickGamepad/qml/LeftThumbstick.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Gamepad module
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtGamepad 1.0
+
+ButtonImage {
+
+ property Gamepad gamepad
+
+ id: leftStickButton
+ source: "xboxControllerLeftThumbstick.png"
+ active: gamepad.buttonL3
+
+ JoystickViewer {
+ id: leftJoystick
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.margins: parent.width * (3 / 153)
+ width: parent.width * (140 / 153)
+ xAxisValue: gamepad.axisLeftX
+ yAxisValue: gamepad.axisLeftY
+ height: width
+ }
+}
diff --git a/examples/quickGamepad/qml/RightThumbstick.qml b/examples/quickGamepad/qml/RightThumbstick.qml
new file mode 100644
index 0000000..9dfa3de
--- /dev/null
+++ b/examples/quickGamepad/qml/RightThumbstick.qml
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Gamepad module
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtGamepad 1.0
+
+ButtonImage {
+
+ property Gamepad gamepad
+
+ id: rightStickButton
+ source: "xboxControllerRightThumbstick.png"
+ active: gamepad.buttonR3
+
+ JoystickViewer {
+ id: rightJoystick
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.margins: parent.width * (3 / 153)
+ width: parent.width * (140 / 153)
+ xAxisValue: gamepad.axisRightX
+ yAxisValue: gamepad.axisRightY
+ height: width
+ }
+}
+
diff --git a/examples/quickGamepad/qml/main.qml b/examples/quickGamepad/qml/main.qml
new file mode 100644
index 0000000..10b6674
--- /dev/null
+++ b/examples/quickGamepad/qml/main.qml
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Gamepad module
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtGamepad 1.0
+
+ApplicationWindow {
+ id: applicationWindow1
+ visible: true
+ width: 800
+ height: 600
+ title: qsTr("QtGamepad Example")
+
+ Rectangle {
+ id: background
+ color: "#363330"
+ anchors.fill: parent
+
+ Item {
+ id: buttonL2Item
+ height: leftTrigger.height
+ width: leftTrigger.width + buttonL2Value.width
+ anchors.left: parent.left
+ anchors.leftMargin: 8
+ anchors.top: parent.top
+ anchors.topMargin: 8
+
+ ButtonImage {
+ id: leftTrigger
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ source: "xboxControllerLeftTrigger.png"
+ active: gamepad.buttonL2 != 0
+ }
+
+ ProgressBar {
+ id: buttonL2Value
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.left: leftTrigger.right
+ orientation: 0
+ value: gamepad.buttonL2
+ }
+ }
+ ButtonImage {
+ id: buttonL1
+ anchors.left: buttonL2Item.left
+ anchors.top: buttonL2Item.bottom
+ anchors.topMargin: 8
+ source: "xboxControllerLeftShoulder.png"
+ active: gamepad.buttonL1
+ }
+
+
+ Item {
+ id: buttonR2Item
+ height: rightTrigger.height
+ width: rightTrigger.width + buttonR2Value.width
+ anchors.right: parent.right
+ anchors.rightMargin: 8
+ anchors.top: parent.top
+ anchors.topMargin: 8
+
+ ButtonImage {
+ id: rightTrigger
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ source: "xboxControllerRightTrigger.png"
+ active: gamepad.buttonR2 != 0
+ }
+
+ ProgressBar {
+ id: buttonR2Value
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: rightTrigger.left
+ orientation: 0
+ value: gamepad.buttonR2
+ }
+ }
+ ButtonImage {
+ id: buttonR1
+ anchors.right: buttonR2Item.right
+ anchors.top: buttonR2Item.bottom
+ anchors.topMargin: 8
+ source: "xboxControllerRightShoulder.png"
+ active: gamepad.buttonR1
+ }
+
+ Item {
+ id: centerButtons
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 8
+ height: guideButton.height
+ width: guideButton.width + 16 + backButton.width + startButton.width
+ ButtonImage {
+ id: backButton
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: guideButton.left
+ anchors.rightMargin: 8
+ source: "xboxControllerBack.png"
+ active: gamepad.buttonSelect
+ }
+ ButtonImage {
+ id: guideButton
+ anchors.centerIn: parent
+ source: "xboxControllerButtonGuide.png"
+ active: gamepad.buttonGuide
+ }
+ ButtonImage {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: guideButton.right
+ anchors.leftMargin: 8
+ id: startButton
+ source: "xboxControllerStart.png"
+ active: gamepad.buttonStart
+ }
+ }
+
+
+
+
+ DPad {
+ id: dPad
+ gamepad: gamepad
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ anchors.margins: 8
+ }
+
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.margins: 8
+ spacing: 16
+
+ LeftThumbstick {
+ id: leftThumbstick
+ gamepad: gamepad
+ }
+
+ RightThumbstick {
+ id: rightThumbstick
+ gamepad: gamepad
+ }
+ }
+
+
+ Item {
+ width: 200
+ height: 200
+ anchors.right: parent.right
+ anchors.rightMargin: 8
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 8
+ ButtonImage {
+ id: buttonA
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "xboxControllerButtonA.png";
+ active: gamepad.buttonA
+ }
+ ButtonImage {
+ id: buttonB
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ source: "xboxControllerButtonB.png";
+ active: gamepad.buttonB
+ }
+ ButtonImage {
+ id: buttonX
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ source: "xboxControllerButtonX.png";
+ active: gamepad.buttonX
+ }
+ ButtonImage {
+ id: buttonY
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "xboxControllerButtonY.png";
+ active: gamepad.buttonY
+ }
+ }
+
+ }
+
+
+
+ Gamepad {
+ id: gamepad
+ }
+
+}
diff --git a/examples/quickGamepad/qml/xboxControllerBack.png b/examples/quickGamepad/qml/xboxControllerBack.png
new file mode 100644
index 0000000..d97972c
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerBack.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerButtonA.png b/examples/quickGamepad/qml/xboxControllerButtonA.png
new file mode 100644
index 0000000..271e8c8
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerButtonA.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerButtonB.png b/examples/quickGamepad/qml/xboxControllerButtonB.png
new file mode 100644
index 0000000..f1e06b6
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerButtonB.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerButtonGuide.png b/examples/quickGamepad/qml/xboxControllerButtonGuide.png
new file mode 100644
index 0000000..287d32b
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerButtonGuide.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerButtonX.png b/examples/quickGamepad/qml/xboxControllerButtonX.png
new file mode 100644
index 0000000..8d29281
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerButtonX.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerButtonY.png b/examples/quickGamepad/qml/xboxControllerButtonY.png
new file mode 100644
index 0000000..465ac48
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerButtonY.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerDPad.png b/examples/quickGamepad/qml/xboxControllerDPad.png
new file mode 100644
index 0000000..efaeb16
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerDPad.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerLeftShoulder.png b/examples/quickGamepad/qml/xboxControllerLeftShoulder.png
new file mode 100644
index 0000000..9b084df
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerLeftShoulder.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerLeftThumbstick.png b/examples/quickGamepad/qml/xboxControllerLeftThumbstick.png
new file mode 100644
index 0000000..08fbaa2
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerLeftThumbstick.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerLeftTrigger.png b/examples/quickGamepad/qml/xboxControllerLeftTrigger.png
new file mode 100644
index 0000000..1fd7324
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerLeftTrigger.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerRightShoulder.png b/examples/quickGamepad/qml/xboxControllerRightShoulder.png
new file mode 100644
index 0000000..a22c8ca
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerRightShoulder.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerRightThumbstick.png b/examples/quickGamepad/qml/xboxControllerRightThumbstick.png
new file mode 100644
index 0000000..ab95ef5
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerRightThumbstick.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerRightTrigger.png b/examples/quickGamepad/qml/xboxControllerRightTrigger.png
new file mode 100644
index 0000000..717f7ab
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerRightTrigger.png
Binary files differ
diff --git a/examples/quickGamepad/qml/xboxControllerStart.png b/examples/quickGamepad/qml/xboxControllerStart.png
new file mode 100644
index 0000000..709459e
--- /dev/null
+++ b/examples/quickGamepad/qml/xboxControllerStart.png
Binary files differ