Move common elements into /common/ and change imports
Elements work like they've always done, this just moves the commonly used components away from the global namespace. The qmldir file still does something, although at this point it is unknown exactly how it's used and whether or not it could be changed to simplify imports across the block.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import matzman666.advsettings 1.0
|
||||
// Necessary for the project specific Components.
|
||||
import ".."
|
||||
|
||||
// Insert inside a ColumnLayout containing this and a RowLayout
|
||||
// to neatly separate header and buttons.
|
||||
Rectangle {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
|
||||
ComboBox {
|
||||
id: myComboBox
|
||||
hoverEnabled: true
|
||||
|
||||
background: Rectangle {
|
||||
color: parent.pressed ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d")
|
||||
}
|
||||
|
||||
contentItem: MyText {
|
||||
leftPadding: 0
|
||||
rightPadding: parent.indicator.width + parent.spacing
|
||||
text: parent.displayText
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
delegate: ItemDelegate {
|
||||
width: myComboBox.width
|
||||
text: modelData
|
||||
hoverEnabled: true
|
||||
contentItem: MyText {
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: parent.text
|
||||
color: parent.enabled ? "#ffffff" : "#909090"
|
||||
}
|
||||
background: Rectangle {
|
||||
color: parent.pressed ? "#406288" : (parent.hovered ? "#365473" : "#2c435d")
|
||||
}
|
||||
}
|
||||
|
||||
indicator: Canvas {
|
||||
x: parent.width - width - parent.rightPadding
|
||||
y: parent.topPadding + (parent.availableHeight - height) / 2
|
||||
width: 13
|
||||
height: 7
|
||||
contextType: "2d"
|
||||
|
||||
onPaint: {
|
||||
if (!context) {
|
||||
getContext("2d")
|
||||
}
|
||||
context.reset();
|
||||
context.lineWidth = 2
|
||||
context.moveTo(1, 1);
|
||||
context.lineTo(Math.ceil(width / 2), height - 1);
|
||||
context.lineTo(width - 1, 1);
|
||||
context.strokeStyle = "#ffffff"
|
||||
context.stroke()
|
||||
}
|
||||
}
|
||||
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
onActivated: {
|
||||
if (activeFocus) {
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
popup.background.color = "#2c435d"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Popup {
|
||||
id: myDialogPopup
|
||||
|
||||
implicitHeight: parent.height
|
||||
implicitWidth: parent.width
|
||||
|
||||
property string dialogTitle: ""
|
||||
property string dialogText: ""
|
||||
property int dialogWidth: 600
|
||||
property int dialogHeight: 300
|
||||
|
||||
property Item dialogContentItem: MyText {
|
||||
text: dialogText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
property bool okClicked: false
|
||||
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||
|
||||
background: Rectangle {
|
||||
color: "black"
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
Rectangle {
|
||||
implicitWidth: dialogWidth
|
||||
implicitHeight: dialogHeight
|
||||
anchors.centerIn: parent
|
||||
radius: 24
|
||||
color: "#1b2939"
|
||||
border.color: "#cccccc"
|
||||
border.width: 2
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 12
|
||||
MyText {
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
text: dialogTitle
|
||||
}
|
||||
Rectangle {
|
||||
color: "#cccccc"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
ColumnLayout {
|
||||
id: dialogContent
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 24
|
||||
Layout.rightMargin: 24
|
||||
Layout.bottomMargin: 12
|
||||
MyPushButton {
|
||||
implicitWidth: 200
|
||||
text: "Ok"
|
||||
onClicked: {
|
||||
okClicked = true
|
||||
myDialogPopup.close()
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyPushButton {
|
||||
implicitWidth: 200
|
||||
text: "Cancel"
|
||||
onClicked: {
|
||||
okClicked = false
|
||||
myDialogPopup.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
dialogContentItem.parent = dialogContent
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Popup {
|
||||
id: myDialogPopup
|
||||
|
||||
implicitHeight: parent.height
|
||||
implicitWidth: parent.width
|
||||
|
||||
property string dialogTitle: ""
|
||||
property string dialogText: ""
|
||||
property int dialogWidth: 600
|
||||
property int dialogHeight: 300
|
||||
|
||||
property Item dialogContentItem: MyText {
|
||||
text: dialogText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
property bool okClicked: false
|
||||
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||
|
||||
background: Rectangle {
|
||||
color: "black"
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
Rectangle {
|
||||
implicitWidth: dialogWidth
|
||||
implicitHeight: dialogHeight
|
||||
anchors.centerIn: parent
|
||||
radius: 24
|
||||
color: "#1b2939"
|
||||
border.color: "#cccccc"
|
||||
border.width: 2
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 12
|
||||
MyText {
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
text: dialogTitle
|
||||
}
|
||||
Rectangle {
|
||||
color: "#cccccc"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
ColumnLayout {
|
||||
id: dialogContent
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 24
|
||||
Layout.rightMargin: 24
|
||||
Layout.bottomMargin: 12
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyPushButton {
|
||||
implicitWidth: 200
|
||||
text: "Ok"
|
||||
onClicked: {
|
||||
okClicked = true
|
||||
myDialogPopup.close()
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
dialogContentItem.parent = dialogContent
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
Button {
|
||||
property bool activationSoundEnabled: true
|
||||
hoverEnabled: true
|
||||
contentItem: MyText {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: parent.text
|
||||
color: parent.enabled ? "#ffffff" : "#909090"
|
||||
}
|
||||
background: Rectangle {
|
||||
color: parent.down ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d")
|
||||
}
|
||||
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
forceActiveFocus()
|
||||
} else {
|
||||
focus = false
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (activationSoundEnabled) {
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
Button {
|
||||
hoverEnabled: true
|
||||
contentItem: MyText {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: parent.text
|
||||
color: parent.enabled ? "#ffffff" : "#909090"
|
||||
}
|
||||
background: Rectangle {
|
||||
color: parent.down ? "#406288" : (parent.activeFocus ? "#365473" : "transparent")
|
||||
border.color: parent.enabled ? "#ffffff" : "#909090"
|
||||
radius: 8
|
||||
}
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
forceActiveFocus()
|
||||
} else {
|
||||
focus = false
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
import QtMultimedia 5.6
|
||||
import matzman666.advsettings 1.0
|
||||
|
||||
QtObject {
|
||||
function playActivationSound() {
|
||||
OverlayController.playActivationSound()
|
||||
}
|
||||
function playFocusChangedSound() {
|
||||
OverlayController.playFocusChangedSound()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
|
||||
|
||||
Slider {
|
||||
snapMode: Slider.SnapAlways
|
||||
wheelEnabled: true
|
||||
hoverEnabled: true
|
||||
|
||||
background: Rectangle {
|
||||
x: parent.leftPadding
|
||||
y: parent.topPadding + parent.availableHeight / 2 - height / 2
|
||||
width: parent.availableWidth
|
||||
height: parent.availableHeight
|
||||
radius: 2
|
||||
color: parent.activeFocus ? "#2c435d" : "#1b2939"
|
||||
Rectangle {
|
||||
y: parent.height / 2 - height / 2
|
||||
implicitHeight: 4
|
||||
width: parent.width
|
||||
height: implicitHeight
|
||||
radius: 2
|
||||
color: "#bdbebf"
|
||||
}
|
||||
}
|
||||
|
||||
handle: Rectangle {
|
||||
x: parent.leftPadding + parent.visualPosition * (parent.availableWidth - width)
|
||||
y: parent.topPadding + parent.availableHeight / 2 - height / 2
|
||||
implicitWidth: 20
|
||||
implicitHeight: 40
|
||||
radius: 4
|
||||
color: parent.pressed ? "#ffffff" : "#eeeeee"
|
||||
border.color: "#bdbebf"
|
||||
}
|
||||
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
forceActiveFocus()
|
||||
} else {
|
||||
focus = false
|
||||
}
|
||||
}
|
||||
|
||||
onValueChanged: {
|
||||
if (activeFocus) {
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.2
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
// Needed for MyResources in the default folder.
|
||||
import ".."
|
||||
|
||||
Rectangle {
|
||||
color: "#1b2939"
|
||||
width: 1200
|
||||
height: 800
|
||||
|
||||
property StackView stackView
|
||||
|
||||
property string headerText: "Header Title"
|
||||
|
||||
property bool headerShowBackButton: true
|
||||
|
||||
property Item header: ColumnLayout {
|
||||
RowLayout {
|
||||
Button {
|
||||
id: headerBackButton
|
||||
Layout.preferredHeight: 50
|
||||
Layout.preferredWidth: 50
|
||||
hoverEnabled: true
|
||||
enabled: headerShowBackButton
|
||||
opacity: headerShowBackButton ? 1.0 : 0.0
|
||||
contentItem: Image {
|
||||
source: "backarrow.svg"
|
||||
sourceSize.width: 50
|
||||
sourceSize.height: 50
|
||||
anchors.fill: parent
|
||||
}
|
||||
background: Rectangle {
|
||||
opacity: parent.down ? 1.0 : (parent.activeFocus ? 0.5 : 0.0)
|
||||
color: "#406288"
|
||||
radius: 4
|
||||
anchors.fill: parent
|
||||
}
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
forceActiveFocus()
|
||||
} else {
|
||||
focus = false
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
stackView.pop()
|
||||
}
|
||||
}
|
||||
MyText {
|
||||
id: headerTitle
|
||||
text: headerText
|
||||
font.pointSize: 30
|
||||
Layout.leftMargin: 32
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "#cccccc"
|
||||
height: 1
|
||||
Layout.topMargin: 10
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
property Item content: Frame {
|
||||
MyText {
|
||||
text: "Content"
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
spacing: 12
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
header.parent = mainLayout
|
||||
header.Layout.leftMargin = 40
|
||||
header.Layout.topMargin = 30
|
||||
header.Layout.rightMargin = 40
|
||||
content.parent = mainLayout
|
||||
content.Layout.fillHeight = true
|
||||
content.Layout.fillWidth = true
|
||||
content.Layout.topMargin = 10
|
||||
content.Layout.leftMargin = 40
|
||||
content.Layout.rightMargin = 40
|
||||
content.Layout.bottomMargin = 40
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
|
||||
Text {
|
||||
color: "#ffffff"
|
||||
font.pointSize: 20
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import matzman666.advsettings 1.0
|
||||
|
||||
TextField {
|
||||
property int keyBoardUID: 0
|
||||
property string savedText: ""
|
||||
id: myTextField
|
||||
color: "#cccccc"
|
||||
text: ""
|
||||
font.pointSize: 20
|
||||
background: Button {
|
||||
hoverEnabled: true
|
||||
background: Rectangle {
|
||||
color: parent.hovered ? "#2c435d" : "#1b2939"
|
||||
border.color: "#cccccc"
|
||||
border.width: 2
|
||||
}
|
||||
onClicked: {
|
||||
myTextField.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
onActiveFocusChanged: {
|
||||
if (activeFocus) {
|
||||
if (!OverlayController.desktopMode) {
|
||||
OverlayController.showKeyboard(text, keyBoardUID)
|
||||
} else {
|
||||
savedText = text
|
||||
}
|
||||
}
|
||||
}
|
||||
onEditingFinished: {
|
||||
if (OverlayController.desktopMode && savedText !== text) {
|
||||
myTextField.onInputEvent(text)
|
||||
}
|
||||
}
|
||||
function onInputEvent(input) {
|
||||
text = input
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
onKeyBoardInputSignal: {
|
||||
if (userValue == keyBoardUID) {
|
||||
if (myTextField.text !== input) {
|
||||
myTextField.onInputEvent(input)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
// Needed for MyResources in the default folder.
|
||||
import ".."
|
||||
|
||||
CheckBox {
|
||||
checkState: Qt.Checked
|
||||
tristate: false
|
||||
hoverEnabled: true
|
||||
spacing: 12
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
x: parent.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
color: parent.enabled ? (parent.down ? "#e0e0e0" : "#ffffff") : "#a0a0a0"
|
||||
border.width: 0
|
||||
Path {
|
||||
startX: 0
|
||||
startY: 0
|
||||
PathLine {
|
||||
x: 40
|
||||
y: 40
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
width: 28
|
||||
height: 28
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
source: "check.svg"
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
visible: parent.parent.checked
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: MyText {
|
||||
text: parent.text
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
leftPadding: parent.indicator.width + parent.spacing
|
||||
color: parent.enabled ? "#ffffff" : "#909090"
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: "#2c435d"
|
||||
opacity: parent.activeFocus ? 1.0 : 0
|
||||
}
|
||||
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
forceActiveFocus()
|
||||
} else {
|
||||
focus = false
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import matzman666.advsettings 1.0
|
||||
|
||||
MyDialogOkCancelPopup {
|
||||
id: pttControllerConfigDialog
|
||||
property var pttControllerConfigClass
|
||||
property int controllerIndex: -1
|
||||
dialogTitle: "Controller Configuration"
|
||||
dialogWidth: 600
|
||||
dialogHeight: 620
|
||||
dialogContentItem: ColumnLayout {
|
||||
MyText {
|
||||
text: "Buttons"
|
||||
}
|
||||
Rectangle {
|
||||
color: "#cccccc"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigGripButtonToggle
|
||||
text: "Grip"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigMenuButtonToggle
|
||||
text: "Menu"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigTriggerButtonToggle
|
||||
text: "Trigger"
|
||||
}
|
||||
|
||||
MyText {
|
||||
Layout.topMargin: 32
|
||||
text: "Touchpad"
|
||||
}
|
||||
Rectangle {
|
||||
color: "#cccccc"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 64
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadLeftToggle
|
||||
text: "Left"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadRightToggle
|
||||
text: "Right"
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 64
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadTopToggle
|
||||
text: "Top"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: pttControllerConfigPadBottomToggle
|
||||
text: "Bottom"
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
MyText {
|
||||
text: "Mode:"
|
||||
}
|
||||
MyComboBox {
|
||||
id: pttControllerConfigPadModeCombo
|
||||
Layout.preferredWidth: 250
|
||||
model: ["Disabled", "Touched", "Pressed"]
|
||||
}
|
||||
}
|
||||
}
|
||||
onClosed: {
|
||||
if (okClicked) {
|
||||
var buttons = []
|
||||
if (pttControllerConfigGripButtonToggle.checked) {
|
||||
buttons.push(2)
|
||||
}
|
||||
if (pttControllerConfigMenuButtonToggle.checked) {
|
||||
buttons.push(1)
|
||||
}
|
||||
var triggerMode = 0
|
||||
if (pttControllerConfigTriggerButtonToggle.checked) {
|
||||
triggerMode = 1
|
||||
}
|
||||
var padAreas = 0
|
||||
if (pttControllerConfigPadLeftToggle.checked) {
|
||||
padAreas |= (1 << 0)
|
||||
}
|
||||
if (pttControllerConfigPadTopToggle.checked) {
|
||||
padAreas |= (1 << 1)
|
||||
}
|
||||
if (pttControllerConfigPadRightToggle.checked) {
|
||||
padAreas |= (1 << 2)
|
||||
}
|
||||
if (pttControllerConfigPadBottomToggle.checked) {
|
||||
padAreas |= (1 << 3)
|
||||
}
|
||||
pttControllerConfigClass.setPttControllerConfig(controllerIndex, buttons, triggerMode, pttControllerConfigPadModeCombo.currentIndex, padAreas);
|
||||
}
|
||||
}
|
||||
function openPopup(controller) {
|
||||
if (controller === 0) {
|
||||
dialogTitle = "Left Controller Configuration"
|
||||
controllerIndex = 0
|
||||
} else {
|
||||
dialogTitle = "Right Controller Configuration"
|
||||
controllerIndex = 1
|
||||
}
|
||||
pttControllerConfigGripButtonToggle.checked = false
|
||||
pttControllerConfigMenuButtonToggle.checked = false
|
||||
pttControllerConfigTriggerButtonToggle.checked = false
|
||||
pttControllerConfigPadLeftToggle.checked = false
|
||||
pttControllerConfigPadTopToggle.checked = false
|
||||
pttControllerConfigPadRightToggle.checked = false
|
||||
pttControllerConfigPadBottomToggle.checked = false
|
||||
pttControllerConfigPadModeCombo.currentIndex = pttControllerConfigClass.pttTouchpadMode(controllerIndex)
|
||||
var buttons = pttControllerConfigClass.pttDigitalButtons(controllerIndex)
|
||||
for (var i = 0; i < buttons.length; i++) {
|
||||
if (buttons[i] == 1) {
|
||||
pttControllerConfigMenuButtonToggle.checked = true
|
||||
} else if (buttons[i] == 2) {
|
||||
pttControllerConfigGripButtonToggle.checked = true
|
||||
}
|
||||
}
|
||||
if (pttControllerConfigClass.pttTriggerMode(controllerIndex) > 0) {
|
||||
pttControllerConfigTriggerButtonToggle.checked = true
|
||||
}
|
||||
var padAreas = pttControllerConfigClass.pttTouchpadArea(controllerIndex)
|
||||
if (padAreas & (1 << 0)) {
|
||||
pttControllerConfigPadLeftToggle.checked = true
|
||||
}
|
||||
if (padAreas & (1 << 1)) {
|
||||
pttControllerConfigPadTopToggle.checked = true
|
||||
}
|
||||
if (padAreas & (1 << 2)) {
|
||||
pttControllerConfigPadRightToggle.checked = true
|
||||
}
|
||||
if (padAreas & (1 << 3)) {
|
||||
pttControllerConfigPadBottomToggle.checked = true
|
||||
}
|
||||
open()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="20"
|
||||
height="20"
|
||||
id="svg3026"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="backarrow.svg">
|
||||
<metadata
|
||||
id="metadata3038">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3036">
|
||||
<linearGradient
|
||||
id="linearGradient4006">
|
||||
<stop
|
||||
style="stop-color:#252525;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4008" />
|
||||
<stop
|
||||
style="stop-color:#4a4a4a;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4010" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1137"
|
||||
id="namedview3034"
|
||||
showgrid="true"
|
||||
inkscape:zoom="26.304372"
|
||||
inkscape:cx="11.841239"
|
||||
inkscape:cy="6.8249439"
|
||||
inkscape:window-x="1912"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g3028">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3040" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
id="g3028"
|
||||
stroke-width="2.23"
|
||||
stroke="#d40000">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4003"
|
||||
style="font-size:11.38508987px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#f9f9f9;fill-opacity:1;stroke:none;font-family:Segoe UI Symbol;-inkscape-font-specification:Segoe UI Symbol"
|
||||
d="m 1.731867,9.9956035 c 2e-5,0.7560365 0.09966,1.4842425 0.298902,2.1846165 0.199287,0.700357 0.477675,1.358232 0.835165,1.973627 0.357528,0.615372 0.786831,1.175079 1.287912,1.67912 0.501116,0.504017 1.057891,0.936251 1.67033,1.296703 0.612469,0.360426 1.270344,0.640279 1.973627,0.839561 0.703309,0.199253 1.432978,0.298886 2.18901,0.298901 0.756055,-1.5e-5 1.484259,-0.09965 2.184616,-0.298901 0.700375,-0.199282 1.355319,-0.479135 1.964834,-0.839561 0.609531,-0.360452 1.167773,-0.792686 1.674726,-1.296703 0.506965,-0.504041 0.940664,-1.063748 1.301099,-1.67912 0.360444,-0.615395 0.641762,-1.27327 0.843956,-1.973627 0.202201,-0.700374 0.3033,-1.42858 0.303296,-2.1846165 4e-6,-0.756049 -0.09963,-1.484254 -0.298901,-2.184615 -0.199263,-0.70037 -0.479116,-1.356779 -0.83956,-1.969231 -0.360435,-0.612454 -0.792669,-1.169231 -1.296704,-1.67033 -0.504022,-0.501098 -1.063729,-0.931867 -1.67912,-1.292307 -0.615377,-0.360439 -1.273251,-0.640292 -1.973626,-0.839561 -0.700357,-0.199264 -1.428561,-0.298899 -2.184616,-0.2989 -0.756032,10e-7 -1.485701,0.09964 -2.18901,0.2989 -0.703283,0.199269 -1.361158,0.477658 -1.973627,0.835165 -0.612439,0.357511 -1.169214,0.786814 -1.67033,1.287912 -0.501081,0.501099 -0.930384,1.05934 -1.287912,1.674726 -0.35749,0.615382 -0.635878,1.273256 -0.835165,1.973626 -0.199247,0.700361 -0.298882,1.428566 -0.298902,2.184615 z m 2.769231,0.035172 0,-0.035172 4.026374,-4.210988 2.918682,0 -3.068132,3.138462 6.672527,0 0,2.1802195 -6.672527,0 3.068132,3.138461 -2.918682,0 z M 0,9.9868115 c 2.0999981e-5,-0.90843 0.120171,-1.784619 0.360439,-2.628572 0.240315,-0.843958 0.58024,-1.636632 1.01978,-2.378021 0.43958,-0.741393 0.964123,-1.416851 1.573627,-2.026375 C 3.563387,2.3443225 4.238845,1.8197795 4.980218,1.3802185 5.721627,0.94065953 6.515765,0.60073453 7.362637,0.36043753 8.209538,0.12014953 9.087192,2.5255985e-6 9.995604,-4.7440151e-7 10.90404,2.5255985e-6 11.781694,0.12015453 12.628571,0.36043853 c 0.846895,0.240297 1.641033,0.577292 2.382418,1.01098997 0.741398,0.433701 1.41832,0.955312 2.030769,1.564835 0.612458,0.609524 1.138465,1.284982 1.578022,2.026374 0.439563,0.74139 0.77949,1.535528 1.01978,2.382416 0.240295,0.846883 0.360442,1.727468 0.36044,2.641759 2e-6,0.9084175 -0.120145,1.7860735 -0.36044,2.6329675 -0.24029,0.846877 -0.580217,1.641015 -1.01978,2.382417 -0.439557,0.74138 -0.965564,1.418303 -1.578022,2.03077 -0.612449,0.61244 -1.289371,1.138447 -2.030769,1.578022 -0.741385,0.439545 -1.535523,0.780937 -2.382418,1.024176 C 11.781694,19.878372 10.90404,19.999984 9.995604,20 9.087192,19.999984 8.209538,19.879837 7.362637,19.63956 6.515765,19.399252 5.721627,19.06079 4.980218,18.624176 4.238845,18.187531 3.563387,17.66299 2.953846,17.050549 2.344342,16.438082 1.819799,15.761159 1.380219,15.019779 0.940679,14.278377 0.600754,13.482774 0.360439,12.632967 0.120168,11.783143 2.0999981e-5,10.901091 0,9.9868125 z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="270" height="270"><path d="M30 180l60 60L240 30" stroke="#000" stroke-width="30" fill="none"/></svg>
|
||||
|
After Width: | Height: | Size: 147 B |
@@ -0,0 +1,112 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.0
|
||||
import ".."
|
||||
import "../utilities_page"
|
||||
import "../audio_page"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: "#1b2939"
|
||||
width: 1200
|
||||
height: 800
|
||||
|
||||
property RootPage rootPage: RootPage {
|
||||
stackView: mainView
|
||||
}
|
||||
|
||||
property SteamVRPage steamVRPage: SteamVRPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property ChaperonePage chaperonePage: ChaperonePage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property ChaperoneWarningsPage chaperoneWarningsPage: ChaperoneWarningsPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property PlayspacePage playspacePage: PlayspacePage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property FixFloorPage fixFloorPage: FixFloorPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property StatisticsPage statisticsPage: StatisticsPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property SettingsPage settingsPage: SettingsPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property AudioPage audioPage: AudioPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property RevivePage revivePage: RevivePage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property UtilitiesPage utilitiesPage: UtilitiesPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
property AccessibilityPage accessibilityPage: AccessibilityPage {
|
||||
stackView: mainView
|
||||
visible: false
|
||||
}
|
||||
|
||||
StackView {
|
||||
id: mainView
|
||||
anchors.fill: parent
|
||||
|
||||
pushEnter: Transition {
|
||||
PropertyAnimation {
|
||||
property: "x"
|
||||
from: mainView.width
|
||||
to: 0
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
pushExit: Transition {
|
||||
PropertyAnimation {
|
||||
property: "x"
|
||||
from: 0
|
||||
to: -mainView.width
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
popEnter: Transition {
|
||||
PropertyAnimation {
|
||||
property: "x"
|
||||
from: -mainView.width
|
||||
to: 0
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
popExit: Transition {
|
||||
PropertyAnimation {
|
||||
property: "x"
|
||||
from: 0
|
||||
to: mainView.width
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
|
||||
initialItem: rootPage
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user