Video and Steam VR Tab Re-work + keyboard binds (#289)
* changed color overlay to use gain values instead of overlay * moved SS/Motion smoothing, and filter to video tab * began refactor of steamVR qml page * added misc toggles to steamvr tab * added imu fallback and DND, and some qml formatting * added Camera Settings to SteamVR page * changed formatting to minimize height * added video profiles cleaned up steamvr controller * delta comparison change * added profiles for video * fixed display bug in colorgroupbox and removed frivoulous saves * removed commented code * added custom keybind buttons
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB |
+20
-18
@@ -164,34 +164,36 @@ MyStackViewPage {
|
||||
spacing: 18
|
||||
|
||||
MyText {
|
||||
text: "Supersampling Profile:"
|
||||
text: "Video Profile:"
|
||||
}
|
||||
Item{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MyComboBox {
|
||||
id: summarySteamVRProfileComboBox
|
||||
id: summaryVideoProfileComboBox
|
||||
Layout.maximumWidth: 378
|
||||
Layout.minimumWidth: 378
|
||||
Layout.preferredWidth: 378
|
||||
Layout.fillWidth: true
|
||||
model: [""]
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex > 0) {
|
||||
summarySteamVRProfileApplyButton.enabled = true
|
||||
summaryVideoProfileApplyButton.enabled = true
|
||||
} else {
|
||||
summarySteamVRProfileApplyButton.enabled = false
|
||||
summaryVideoProfileApplyButton.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: summarySteamVRProfileApplyButton
|
||||
id: summaryVideoProfileApplyButton
|
||||
enabled: false
|
||||
Layout.preferredWidth: 150
|
||||
text: "Apply"
|
||||
onClicked: {
|
||||
if (summarySteamVRProfileComboBox.currentIndex > 0) {
|
||||
SteamVRTabController.applySteamVRProfile(summarySteamVRProfileComboBox.currentIndex - 1)
|
||||
summarySteamVRProfileComboBox.currentIndex = 0
|
||||
if (summaryVideoProfileComboBox.currentIndex > 0) {
|
||||
VideoTabController.applyVideoProfile(summaryVideoProfileComboBox.currentIndex - 1)
|
||||
summaryVideoProfileComboBox.currentIndex = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,7 +396,7 @@ MyStackViewPage {
|
||||
|
||||
Component.onCompleted: {
|
||||
reloadChaperoneProfiles()
|
||||
reloadSteamVRProfiles()
|
||||
reloadVideoProfiles()
|
||||
|
||||
summaryVersionText.text = applicationVersion
|
||||
|
||||
@@ -423,9 +425,9 @@ MyStackViewPage {
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SteamVRTabController
|
||||
onSteamVRProfilesUpdated: {
|
||||
reloadSteamVRProfiles()
|
||||
target: VideoTabController
|
||||
onVideoProfilesUpdated: {
|
||||
reloadVideoProfiles()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,13 +501,13 @@ MyStackViewPage {
|
||||
}
|
||||
|
||||
|
||||
function reloadSteamVRProfiles() {
|
||||
function reloadVideoProfiles() {
|
||||
var profiles = [""]
|
||||
var profileCount = SteamVRTabController.getSteamVRProfileCount()
|
||||
var profileCount = VideoTabController.getVideoProfileCount()
|
||||
for (var i = 0; i < profileCount; i++) {
|
||||
profiles.push(SteamVRTabController.getSteamVRProfileName(i))
|
||||
profiles.push(VideoTabController.getVideoProfileName(i))
|
||||
}
|
||||
summarySteamVRProfileComboBox.currentIndex = 0
|
||||
summarySteamVRProfileComboBox.model = profiles
|
||||
summaryVideoProfileComboBox.currentIndex = 0
|
||||
summaryVideoProfileComboBox.model = profiles
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,374 +0,0 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "common"
|
||||
|
||||
MyStackViewPage {
|
||||
id: myStackViewPage1
|
||||
headerText: "SteamVR Settings"
|
||||
|
||||
|
||||
MyDialogOkPopup {
|
||||
id: steamvrMessageDialog
|
||||
function showMessage(title, text) {
|
||||
dialogTitle = title
|
||||
dialogText = text
|
||||
open()
|
||||
}
|
||||
}
|
||||
|
||||
MyDialogOkCancelPopup {
|
||||
id: steamvrDeleteProfileDialog
|
||||
property int profileIndex: -1
|
||||
dialogTitle: "Delete Profile"
|
||||
dialogText: "Do you really want to delete this profile?"
|
||||
onClosed: {
|
||||
if (okClicked) {
|
||||
SteamVRTabController.deleteSteamVRProfile(profileIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyDialogOkCancelPopup {
|
||||
id: steamvrNewProfileDialog
|
||||
dialogTitle: "Create New Profile"
|
||||
dialogWidth: 600
|
||||
dialogHeight: 400
|
||||
dialogContentItem: ColumnLayout {
|
||||
RowLayout {
|
||||
Layout.topMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
MyText {
|
||||
text: "Name: "
|
||||
}
|
||||
MyTextField {
|
||||
id: steamvrNewProfileName
|
||||
keyBoardUID: 490
|
||||
color: "#cccccc"
|
||||
text: ""
|
||||
Layout.fillWidth: true
|
||||
font.pointSize: 20
|
||||
function onInputEvent(input) {
|
||||
steamvrNewProfileName.text = input
|
||||
}
|
||||
}
|
||||
}
|
||||
MyText {
|
||||
Layout.topMargin: 24
|
||||
text: "What to include:"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: steamvrNewProfileIncludeSupersampling
|
||||
Layout.leftMargin: 32
|
||||
text: "Application Supersampling"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: steamvrNewProfileIncludeSupersampleFiltering
|
||||
Layout.leftMargin: 32
|
||||
text: "Supersample Filtering"
|
||||
}
|
||||
MyToggleButton {
|
||||
id: steamvrNewProfileIncludeMotionSmoothing
|
||||
Layout.leftMargin: 32
|
||||
text: "Motion Smoothing Setting"
|
||||
}
|
||||
}
|
||||
onClosed: {
|
||||
if (okClicked) {
|
||||
if (steamvrNewProfileName.text == "") {
|
||||
steamvrMessageDialog.showMessage("Create New Profile", "ERROR: Empty profile name.")
|
||||
} else if (!steamvrNewProfileIncludeSupersampling.checked
|
||||
&& !steamvrNewProfileIncludeSupersampleFiltering.checked
|
||||
&& !steamvrNewProfileIncludeMotionSmoothing.checked) {
|
||||
steamvrMessageDialog.showMessage("Create New Profile", "ERROR: Nothing included.")
|
||||
} else {
|
||||
SteamVRTabController.addSteamVRProfile(steamvrNewProfileName.text,
|
||||
steamvrNewProfileIncludeSupersampling.checked,
|
||||
steamvrNewProfileIncludeSupersampleFiltering.checked,
|
||||
steamvrNewProfileIncludeMotionSmoothing.checked
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
function openPopup() {
|
||||
steamvrNewProfileName.text = ""
|
||||
steamvrNewProfileIncludeSupersampling.checked = false
|
||||
steamvrNewProfileIncludeSupersampleFiltering.checked = false
|
||||
steamvrNewProfileIncludeMotionSmoothing.checked = false
|
||||
open()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
content: ColumnLayout {
|
||||
spacing: 18
|
||||
|
||||
ColumnLayout {
|
||||
Layout.bottomMargin: 32
|
||||
spacing: 18
|
||||
RowLayout {
|
||||
spacing: 18
|
||||
|
||||
MyText {
|
||||
text: "Profile:"
|
||||
}
|
||||
|
||||
MyComboBox {
|
||||
id: steamvrProfileComboBox
|
||||
Layout.maximumWidth: 799
|
||||
Layout.minimumWidth: 799
|
||||
Layout.preferredWidth: 799
|
||||
Layout.fillWidth: true
|
||||
model: [""]
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex > 0) {
|
||||
steamvrApplyProfileButton.enabled = true
|
||||
steamvrDeleteProfileButton.enabled = true
|
||||
} else {
|
||||
steamvrApplyProfileButton.enabled = false
|
||||
steamvrDeleteProfileButton.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: steamvrApplyProfileButton
|
||||
enabled: false
|
||||
Layout.preferredWidth: 200
|
||||
text: "Apply"
|
||||
onClicked: {
|
||||
if (steamvrProfileComboBox.currentIndex > 0) {
|
||||
SteamVRTabController.applySteamVRProfile(steamvrProfileComboBox.currentIndex - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 18
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
MyPushButton {
|
||||
id: steamvrDeleteProfileButton
|
||||
enabled: false
|
||||
Layout.preferredWidth: 200
|
||||
text: "Delete Profile"
|
||||
onClicked: {
|
||||
if (steamvrProfileComboBox.currentIndex > 0) {
|
||||
steamvrDeleteProfileDialog.profileIndex = steamvrProfileComboBox.currentIndex - 1
|
||||
steamvrDeleteProfileDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
Layout.preferredWidth: 200
|
||||
text: "New Profile"
|
||||
onClicked: {
|
||||
steamvrNewProfileDialog.openPopup()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyText {
|
||||
text: "Application Supersampling:"
|
||||
Layout.preferredWidth: 350
|
||||
Layout.rightMargin: 12
|
||||
}
|
||||
|
||||
MyPushButton2 {
|
||||
id: steamvrSupersampleDecrement
|
||||
text: "-"
|
||||
Layout.preferredWidth: 40
|
||||
onClicked: {
|
||||
steamvrSupersamplingSlider.decrease()
|
||||
}
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: steamvrSupersamplingSlider
|
||||
from: 0.2
|
||||
to: 5.0
|
||||
stepSize: 0.1
|
||||
value: 1.0
|
||||
snapMode: Slider.SnapAlways
|
||||
Layout.fillWidth: true
|
||||
onValueChanged: {
|
||||
var val = this.value
|
||||
steamvrSupersamplingText.text = val.toFixed(1)
|
||||
SteamVRTabController.setSuperSampling(this.value.toFixed(1), true)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton2 {
|
||||
id: steamvrSupersampleIncrement
|
||||
text: "+"
|
||||
Layout.preferredWidth: 40
|
||||
onClicked: {
|
||||
steamvrSupersamplingSlider.increase()
|
||||
}
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: steamvrSupersamplingText
|
||||
text: "0.0"
|
||||
keyBoardUID: 401
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseFloat(input)
|
||||
if (!isNaN(val)) {
|
||||
if (val < 0.1) {
|
||||
val = 0.1
|
||||
}
|
||||
var v = val.toFixed(1)
|
||||
if (v <= steamvrSupersamplingSlider.to) {
|
||||
steamvrSupersamplingSlider.value = v
|
||||
} else {
|
||||
SteamVRTabController.setSuperSampling(v, false)
|
||||
}
|
||||
}
|
||||
text = SteamVRTabController.superSampling.toFixed(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
MyToggleButton {
|
||||
id: steamvrAllowSupersampleOverrideToggle
|
||||
text: "Enable Manual Supersampling Override: (refresh dashboard to take effect)"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setAllowSupersampleOverride(this.checked, false)
|
||||
SteamVRTabController.setSuperSampling(steamvrSupersamplingSlider.value, true)
|
||||
steamvrSupersamplingText.text = SteamVRTabController.superSampling.toFixed(1)
|
||||
if(!this.checked){
|
||||
steamvrSupersamplingText.enabled = false
|
||||
steamvrSupersamplingSlider.enabled = false
|
||||
steamvrSupersampleIncrement.enabled = false
|
||||
steamvrSupersampleDecrement.enabled = false
|
||||
}else{
|
||||
steamvrSupersamplingText.enabled = true
|
||||
steamvrSupersamplingSlider.enabled = true
|
||||
steamvrSupersampleIncrement.enabled = true
|
||||
steamvrSupersampleDecrement.enabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
MyToggleButton {
|
||||
id: steamvrAllowSupersampleFilteringToggle
|
||||
text: "Enable Advanced Supersample Filtering"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setAllowSupersampleFiltering(this.checked, false)
|
||||
}
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrMotionSmoothingToggle
|
||||
text: "Enable Motion Smoothing"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setMotionSmoothing(this.checked, false)
|
||||
}
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrPerformanceGraphToggle
|
||||
text: "Enable Timing Overlay"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setPerformanceGraph(this.checked, false)
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true; Layout.fillWidth: true}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
MyPushButton {
|
||||
id: steamVRResetButton
|
||||
text: "Reset"
|
||||
Layout.preferredWidth: 250
|
||||
onClicked: {
|
||||
SteamVRTabController.reset()
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true}
|
||||
|
||||
MyPushButton {
|
||||
id: steamVRRestartButton
|
||||
text: "Restart SteamVR"
|
||||
Layout.preferredWidth: 250
|
||||
onClicked: {
|
||||
SteamVRTabController.restartSteamVR()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var s1 = SteamVRTabController.superSampling.toFixed(1)
|
||||
if (s1 <= steamvrSupersamplingSlider.to) {
|
||||
steamvrSupersamplingSlider.value = s1
|
||||
}
|
||||
steamvrAllowSupersampleOverrideToggle.checked = SteamVRTabController.allowSupersampleOverride
|
||||
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
|
||||
steamvrMotionSmoothingToggle.checked = SteamVRTabController.motionSmoothing
|
||||
steamvrPerformanceGraphToggle.checked = SteamVRTabController.performanceGraph
|
||||
if(!steamvrAllowSupersampleOverrideToggle.checked){
|
||||
steamvrSupersamplingText.enabled = false
|
||||
steamvrSupersamplingSlider.enabled = false
|
||||
steamvrSupersampleIncrement.enabled = false
|
||||
steamvrSupersampleDecrement.enabled = false
|
||||
}
|
||||
|
||||
reloadSteamVRProfiles()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SteamVRTabController
|
||||
onSuperSamplingChanged: {
|
||||
var s1 = SteamVRTabController.superSampling.toFixed(1)
|
||||
steamvrSupersamplingSlider.value = s1
|
||||
steamvrSupersamplingText.text = s1
|
||||
}
|
||||
onAllowSupersampleOverrideChanged: {
|
||||
steamvrAllowSupersampleOverrideToggle.checked = SteamVRTabController.allowSupersampleOverride
|
||||
var s1 = SteamVRTabController.superSampling.toFixed(1)
|
||||
steamvrSupersamplingSlider.value = s1
|
||||
steamvrSupersamplingText.text = s1
|
||||
}
|
||||
onAllowSupersampleFilteringChanged: {
|
||||
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
|
||||
}
|
||||
|
||||
onMotionSmoothingChanged: {
|
||||
steamvrMotionSmoothingToggle.checked = SteamVRTabController.motionSmoothing
|
||||
}
|
||||
onPerformanceGraphChanged:{
|
||||
steamvrPerformanceGraphToggle.checked = SteamVRTabController.performanceGraph
|
||||
}
|
||||
|
||||
onSteamVRProfilesUpdated: {
|
||||
reloadSteamVRProfiles()
|
||||
}
|
||||
onSteamVRProfileAdded:{
|
||||
steamvrProfileComboBox.currentIndex = SteamVRTabController.getSteamVRProfileCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reloadSteamVRProfiles() {
|
||||
var profiles = [""]
|
||||
var profileCount = SteamVRTabController.getSteamVRProfileCount()
|
||||
for (var i = 0; i < profileCount; i++) {
|
||||
profiles.push(SteamVRTabController.getSteamVRProfileName(i))
|
||||
}
|
||||
steamvrProfileComboBox.currentIndex = 0
|
||||
steamvrProfileComboBox.model = profiles
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import "../motion_page"
|
||||
import "../video_page"
|
||||
import "../desktop_overlay_page"
|
||||
import "../chaperone_page"
|
||||
import "../steamvr_page"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../common"
|
||||
import "camera"
|
||||
import "steamvrmisc"
|
||||
|
||||
MyStackViewPage {
|
||||
width: 1200
|
||||
headerText: "SteamVR"
|
||||
|
||||
content: ColumnLayout {
|
||||
spacing: 16
|
||||
|
||||
SteamVRMiscGroupBox {
|
||||
id: steamVRMiscGroupBox}
|
||||
CameraGroupBox {
|
||||
id: cameraGroupBox}
|
||||
|
||||
Item { Layout.fillHeight: true; Layout.fillWidth: true}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Item { Layout.fillWidth: true}
|
||||
|
||||
MyPushButton {
|
||||
id: steamVRRestartButton
|
||||
text: "Restart SteamVR"
|
||||
Layout.preferredWidth: 250
|
||||
onClicked: {
|
||||
SteamVRTabController.restartSteamVR()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
GroupBox {
|
||||
id: cameraGroupBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Camera: (requires SteamVR restart)"
|
||||
bottomPadding: -10
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
border.color: "#ffffff"
|
||||
radius: 8
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrCameraActiveToggle
|
||||
text: "Enable Camera"
|
||||
Layout.preferredWidth: 400
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setCameraActive(this.checked, false)
|
||||
if(this.checked){
|
||||
steamvrCameraBoundsToggle.enabled = true
|
||||
steamvrCameraDashboardToggle.enabled = true
|
||||
steamvrCameraRoomToggle.enabled = true
|
||||
}else{
|
||||
steamvrCameraBoundsToggle.enabled = false
|
||||
steamvrCameraDashboardToggle.enabled = false
|
||||
steamvrCameraRoomToggle.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrCameraBoundsToggle
|
||||
text: "Camera for Bounds"
|
||||
Layout.preferredWidth: 300
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setCameraBounds(this.checked, false)
|
||||
}
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrCameraDashboardToggle
|
||||
text: "Camera for Dashboard"
|
||||
Layout.preferredWidth: 300
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setCameraDashboard(this.checked, false)
|
||||
}
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrCameraRoomToggle
|
||||
text: "Camera for Room View"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setCameraRoom(this.checked, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var c1 = SteamVRTabController.cameraActive
|
||||
steamvrCameraActiveToggle.checked = c1
|
||||
steamvrCameraBoundsToggle.checked = SteamVRTabController.cameraBounds
|
||||
steamvrCameraDashboardToggle.checked = SteamVRTabController.cameraDashboard
|
||||
steamvrCameraRoomToggle.checked = SteamVRTabController.cameraRoom
|
||||
|
||||
if(!c1){
|
||||
steamvrCameraDashboardToggle.enabled = false;
|
||||
steamvrCameraBoundsToggle.enabled = false;
|
||||
steamvrCameraRoomToggle.enabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SteamVRTabController
|
||||
onCameraActiveChanged: {
|
||||
steamvrCameraActiveToggle.checked = SteamVRTabController.cameraActive
|
||||
}
|
||||
onCameraRoomChanged: {
|
||||
steamvrCameraRoomToggle.checked = SteamVRTabController.cameraRoom
|
||||
}
|
||||
onCameraDashboardChanged: {
|
||||
steamvrCameraDashboardToggle.checked = SteamVRTabController.cameraDashboard
|
||||
}
|
||||
onCameraBoundsChanged: {
|
||||
steamvrCameraBoundsToggle.checked = SteamVRTabController.cameraBounds
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
GroupBox {
|
||||
id: steamVRMiscGroupBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Misc:"
|
||||
bottomPadding: -10
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
border.color: "#ffffff"
|
||||
radius: 8
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrPerformanceGraphToggle
|
||||
text: "Enable Timing Overlay"
|
||||
Layout.preferredWidth: 400
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setPerformanceGraph(this.checked, false)
|
||||
}
|
||||
}
|
||||
MyText {
|
||||
Layout.preferredWidth: 20
|
||||
text: " "
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrSystemButtonToggle
|
||||
Layout.fillWidth: true
|
||||
text: "Enable System Button Binding"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setSystemButton(this.checked, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrMultipleDriverToggle
|
||||
Layout.preferredWidth: 400
|
||||
text: "Allow Multiple Drivers"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setMultipleDriver(this.checked, false)
|
||||
}
|
||||
}
|
||||
MyText {
|
||||
Layout.preferredWidth: 20
|
||||
text: " "
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrNoFadeToGridToggle
|
||||
Layout.fillWidth: true
|
||||
text: "No Fade to Grid"
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setNoFadeToGrid(this.checked, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyToggleButton {
|
||||
id: steamvrNotificationToggle
|
||||
text: "Disable Notifications"
|
||||
Layout.preferredWidth: 400
|
||||
onCheckedChanged: {
|
||||
SteamVRTabController.setDND(this.checked, false)
|
||||
}
|
||||
}
|
||||
MyText {
|
||||
Layout.preferredWidth: 20
|
||||
text: " "
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
steamvrPerformanceGraphToggle.checked = SteamVRTabController.performanceGraph
|
||||
steamvrSystemButtonToggle.checked = SteamVRTabController.systemButton
|
||||
steamvrMultipleDriverToggle.checked = SteamVRTabController.multipleDriver
|
||||
steamvrNoFadeToGridToggle.checked = SteamVRTabController.noFadeToGrid
|
||||
steamvrNotificationToggle.checked = SteamVRTabController.dnd
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: SteamVRTabController
|
||||
onPerformanceGraphChanged:{
|
||||
steamvrPerformanceGraphToggle.checked = SteamVRTabController.performanceGraph
|
||||
}
|
||||
onSystemButtonChanged:{
|
||||
steamvrSystemButtonToggle.checked = SteamVRTabController.systemButton
|
||||
}
|
||||
onMultipleDriverChanged:{
|
||||
steamvrMultipleDriverToggle.checked = SteamVRTabController.multipleDriver
|
||||
}
|
||||
onNoFadeToGridChanged:{
|
||||
steamvrNoFadeToGridToggle.checked = SteamVRTabController.noFadeToGrid
|
||||
}
|
||||
onDNDChanged:{
|
||||
steamvrNotificationToggle.checked = SteamVRTabController.dnd
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,28 @@ GroupBox {
|
||||
onClicked: {
|
||||
UtilitiesTabController.sendKeyboardCtrlV()
|
||||
}
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
text: "Custom Key 1"
|
||||
Layout.preferredWidth: 200
|
||||
onClicked: {
|
||||
UtilitiesTabController.sendKeyboardOne();
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
text: "Custom Key 2"
|
||||
Layout.preferredWidth: 200
|
||||
onClicked: {
|
||||
UtilitiesTabController.sendKeyboardTwo();
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
text: "Custom Key 3"
|
||||
Layout.preferredWidth: 200
|
||||
onClicked: {
|
||||
UtilitiesTabController.sendKeyboardThree();
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -5,18 +5,31 @@ import ovras.advsettings 1.0
|
||||
import "../common"
|
||||
import "brightness"
|
||||
import "color"
|
||||
import "supersampling"
|
||||
import "miscvid"
|
||||
import "profiles"
|
||||
|
||||
MyStackViewPage {
|
||||
width: 1200
|
||||
headerText: "Video Settings"
|
||||
|
||||
content: ColumnLayout {
|
||||
spacing: 18
|
||||
spacing: 10
|
||||
|
||||
BrightnessGroupBox {
|
||||
id: brightnessGroupBox}
|
||||
ColorGroupBox {
|
||||
id: colorGroupBox}
|
||||
SuperSamplingGroupBox{
|
||||
id: ssGroupBox
|
||||
}
|
||||
VideoProfileGroupBox{
|
||||
id: videoProfileGroupBox
|
||||
}
|
||||
|
||||
VideoMiscGroupBox{
|
||||
id:miscVideoGroupBox
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
|
||||
@@ -29,84 +29,24 @@ GroupBox {
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
MyToggleButton {
|
||||
id: colorToggle
|
||||
text: "Toggle On/Off"
|
||||
onCheckedChanged: {
|
||||
VideoTabController.setColorEnabled(this.checked, false) }
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: 150
|
||||
}
|
||||
|
||||
MyText {
|
||||
text: "Opacity:"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
Layout.rightMargin: 10
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: colorOpacitySlider
|
||||
from: 0.5
|
||||
to: 1.0
|
||||
stepSize: 0.01
|
||||
value: 1.0
|
||||
Layout.fillWidth: true
|
||||
onPositionChanged: {
|
||||
var val = ((this.position * 100)/2 + 50)
|
||||
colorOpacityText.text = Math.round(val) + "%"
|
||||
}
|
||||
onValueChanged: {
|
||||
|
||||
VideoTabController.setColorOpacityPerc(value.toFixed(2), false)
|
||||
}
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: colorOpacityText
|
||||
text: "100%"
|
||||
keyBoardUID: 911
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseFloat(input)
|
||||
if (!isNaN(val)) {
|
||||
if (val < 50) {
|
||||
val = 50
|
||||
} else if (val > 100.0) {
|
||||
val = 100.0
|
||||
}
|
||||
var v = (val/100).toFixed(2)
|
||||
colorOpacitySlider.value = v
|
||||
}
|
||||
text = Math.round(VideoTabController.colorOpacityPerc * 100) + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
MyText {
|
||||
text: "Red:"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
Layout.preferredWidth: 200
|
||||
Layout.preferredWidth: 75
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: colorRedSlider
|
||||
from: 0.01
|
||||
to: 1.0
|
||||
to: 2.0
|
||||
stepSize: 0.01
|
||||
value: 1.0
|
||||
Layout.fillWidth: true
|
||||
onPositionChanged: {
|
||||
var val = (this.position * 100)
|
||||
var val = (this.value * 100)
|
||||
colorRedText.text = Math.round(val) + "%"
|
||||
}
|
||||
onValueChanged: {
|
||||
@@ -136,26 +76,21 @@ GroupBox {
|
||||
text = Math.round(VideoTabController.colorRed * 100) + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
MyText {
|
||||
text: "Green:"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
Layout.preferredWidth: 200
|
||||
Layout.preferredWidth: 85
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: colorGreenSlider
|
||||
from: 0.01
|
||||
to: 1.0
|
||||
to: 2.0
|
||||
stepSize: 0.01
|
||||
value: 1.0
|
||||
Layout.fillWidth: true
|
||||
onPositionChanged: {
|
||||
var val = (this.position * 100)
|
||||
var val = (this.value * 100)
|
||||
colorGreenText.text = Math.round(val) + "%"
|
||||
}
|
||||
onValueChanged: {
|
||||
@@ -185,61 +120,57 @@ GroupBox {
|
||||
text = Math.round(VideoTabController.colorGreen * 100) + "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
MyText {
|
||||
text: "Blue:"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
Layout.preferredWidth: 200
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: colorBlueSlider
|
||||
from: 0.01
|
||||
to: 1.0
|
||||
stepSize: 0.01
|
||||
value: 1.0
|
||||
Layout.fillWidth: true
|
||||
onPositionChanged: {
|
||||
var val = (this.position * 100)
|
||||
colorBlueText.text = Math.round(val) + "%"
|
||||
MyText {
|
||||
text: "Blue:"
|
||||
horizontalAlignment: Text.AlignRight
|
||||
Layout.preferredWidth: 75
|
||||
}
|
||||
onValueChanged: {
|
||||
|
||||
VideoTabController.setColorBlue(value.toFixed(2), false)
|
||||
}
|
||||
}
|
||||
MySlider {
|
||||
id: colorBlueSlider
|
||||
from: 0.01
|
||||
to: 2.0
|
||||
stepSize: 0.01
|
||||
value: 1.0
|
||||
Layout.fillWidth: true
|
||||
onPositionChanged: {
|
||||
var val = (this.value * 100)
|
||||
colorBlueText.text = Math.round(val) + "%"
|
||||
}
|
||||
onValueChanged: {
|
||||
|
||||
MyTextField {
|
||||
id: colorBlueText
|
||||
text: "100%"
|
||||
keyBoardUID: 914
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseFloat(input)
|
||||
if (!isNaN(val)) {
|
||||
if (val < 5) {
|
||||
val = 5
|
||||
} else if (val > 100.0) {
|
||||
val = 100.0
|
||||
}
|
||||
var v = (val/100).toFixed(2)
|
||||
colorBlueSlider.value = v
|
||||
VideoTabController.setColorBlue(value.toFixed(2), false)
|
||||
}
|
||||
text = Math.round(VideoTabController.colorBlue * 100) + "%"
|
||||
}
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: colorBlueText
|
||||
text: "100%"
|
||||
keyBoardUID: 914
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseFloat(input)
|
||||
if (!isNaN(val)) {
|
||||
if (val < 5) {
|
||||
val = 5
|
||||
} else if (val > 100.0) {
|
||||
val = 100.0
|
||||
}
|
||||
var v = (val/100).toFixed(2)
|
||||
colorBlueSlider.value = v
|
||||
}
|
||||
text = Math.round(VideoTabController.colorBlue * 100) + "%"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
colorOpacitySlider.value = VideoTabController.colorOpacityPerc
|
||||
colorToggle.checked = VideoTabController.colorEnabled
|
||||
colorRedSlider.value = VideoTabController.colorRed
|
||||
colorGreenSlider.value = VideoTabController.colorGreen
|
||||
colorBlueSlider.value = VideoTabController.colorBlue
|
||||
@@ -247,13 +178,6 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
|
||||
onColorOpacityPercChanged: {
|
||||
colorOpacitySlider.value = VideoTabController.colorOpacityPerc
|
||||
}
|
||||
onColorEnabledChanged: {
|
||||
colorToggle.checked = VideoTabController.colorEnabled
|
||||
}
|
||||
onColorRedChanged:{
|
||||
colorRedSlider.value = VideoTabController.colorRed
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
MyDialogOkCancelPopup {
|
||||
id: videoDeleteProfileDialog
|
||||
dialogWidth: 600
|
||||
dialogHeight: 300
|
||||
y: -200
|
||||
x: 0
|
||||
property int profileIndex: -1
|
||||
dialogTitle: "Delete Profile"
|
||||
dialogText: "Do you really want to delete this video profile?"
|
||||
onClosed: {
|
||||
if (okClicked) {
|
||||
VideoTabController.deleteVideoProfile(profileIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
MyDialogOkPopup {
|
||||
id: videoMessageDialog
|
||||
y: -200
|
||||
x: 0
|
||||
function showMessage(title, text) {
|
||||
dialogTitle = title
|
||||
dialogText = text
|
||||
open()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
MyDialogOkCancelPopup {
|
||||
id: videoNewProfileDialog
|
||||
dialogTitle: "Create New Video Profile"
|
||||
dialogWidth: 600
|
||||
dialogHeight: 300
|
||||
y: -200
|
||||
x: 0
|
||||
dialogContentItem: ColumnLayout {
|
||||
RowLayout {
|
||||
Layout.topMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
MyText {
|
||||
text: "Name: "
|
||||
}
|
||||
MyTextField {
|
||||
id: videoNewProfileName
|
||||
keyBoardUID: 990
|
||||
color: "#cccccc"
|
||||
text: ""
|
||||
Layout.fillWidth: true
|
||||
font.pointSize: 20
|
||||
function onInputEvent(input) {
|
||||
videoNewProfileName.text = input
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
onClosed: {
|
||||
if (okClicked) {
|
||||
if (videoNewProfileName.text != "") {
|
||||
VideoTabController.addVideoProfile(videoNewProfileName.text)
|
||||
} else {
|
||||
videoMessageDialog.showMessage("Create New Profile", "ERROR: No name given.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function openPopup() {
|
||||
videoNewProfileName.text = ""
|
||||
open()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
GroupBox {
|
||||
id: brightnessGroupBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Misc:"
|
||||
bottomPadding: -10
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
border.color: "#ffffff"
|
||||
radius: 8
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyToggleButton {
|
||||
id: videoMotionSmoothingToggle
|
||||
text: "Motion Smoothing"
|
||||
onCheckedChanged: {
|
||||
VideoTabController.setMotionSmoothing(this.checked, false)
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.preferredWidth: 20
|
||||
}
|
||||
|
||||
MyToggleButton {
|
||||
id: videoAllowSupersampleFilteringToggle
|
||||
text: "Advanced SS Filtering"
|
||||
onCheckedChanged: {
|
||||
VideoTabController.setAllowSupersampleFiltering(this.checked, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
videoAllowSupersampleFilteringToggle.checked = VideoTabController.allowSupersampleFiltering
|
||||
videoMotionSmoothingToggle.checked = VideoTabController.motionSmoothing
|
||||
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
onAllowSupersampleFilteringChanged: {
|
||||
videoAllowSupersampleFilteringToggle.checked = VideoTabController.allowSupersampleFiltering
|
||||
}
|
||||
|
||||
onMotionSmoothingChanged: {
|
||||
videoMotionSmoothingToggle.checked = VideoTabController.motionSmoothing
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
import "../dialogboxes"
|
||||
|
||||
GroupBox {
|
||||
id: videoProfileGroupBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
VideoDeleteProfileDialog {
|
||||
id: videoDeleteProfileDialog
|
||||
}
|
||||
|
||||
VideoNewProfileDialog {
|
||||
id: videoNewProfileDialog
|
||||
}
|
||||
VideoMessageDialog{
|
||||
id:videoMessageDialog
|
||||
}
|
||||
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "Video Profiles:"
|
||||
bottomPadding: -10
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
border.color: "#ffffff"
|
||||
radius: 8
|
||||
}
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
|
||||
MyText {
|
||||
Layout.preferredWidth: 150
|
||||
text: "Profile: "
|
||||
}
|
||||
|
||||
MyComboBox {
|
||||
id: videoProfileComboBox
|
||||
Layout.fillWidth: true
|
||||
model: [""]
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex > 0) {
|
||||
videoApplyProfileButton.enabled = true
|
||||
videoDeleteProfileButton.enabled = true
|
||||
} else {
|
||||
videoApplyProfileButton.enabled = false
|
||||
videoDeleteProfileButton.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: videoApplyProfileButton
|
||||
enabled: true
|
||||
Layout.preferredWidth: 150
|
||||
text: "Apply"
|
||||
onClicked: {
|
||||
if (videoProfileComboBox.currentIndex > 0) {
|
||||
VideoTabController.applyVideoProfile(
|
||||
videoProfileComboBox.currentIndex - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
Item{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: videoDeleteProfileButton
|
||||
enabled: true
|
||||
Layout.preferredWidth: 200
|
||||
|
||||
text: "Delete Profile"
|
||||
onClicked: {
|
||||
if (videoProfileComboBox.currentIndex > 0) {
|
||||
videoDeleteProfileDialog.profileIndex = videoProfileComboBox.currentIndex - 1
|
||||
videoDeleteProfileDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
Layout.preferredWidth: 200
|
||||
text: "New Profile"
|
||||
onClicked: {
|
||||
videoNewProfileDialog.openPopup()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
reloadVideoProfiles()
|
||||
}
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
onVideoProfilesUpdated: {
|
||||
reloadVideoProfiles()
|
||||
}
|
||||
onVideoProfileAdded: {
|
||||
videoProfileComboBox.currentIndex = VideoTabController.getVideoProfileCount()
|
||||
}
|
||||
|
||||
}
|
||||
function reloadVideoProfiles() {
|
||||
var profiles = [""]
|
||||
var profileCount = VideoTabController.getVideoProfileCount()
|
||||
for (var i = 0; i < profileCount; i++) {
|
||||
profiles.push(VideoTabController.getVideoProfileName(i))
|
||||
}
|
||||
videoProfileComboBox.currentIndex = 0
|
||||
videoProfileComboBox.model = profiles
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import "../../common"
|
||||
|
||||
GroupBox {
|
||||
id: brightnessGroupBox
|
||||
Layout.fillWidth: true
|
||||
|
||||
label: MyText {
|
||||
leftPadding: 10
|
||||
text: "SuperSampling: (may require refresh of dashboard or restart of SteamVR)"
|
||||
bottomPadding: -10
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
border.color: "#ffffff"
|
||||
radius: 8
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
color: "#ffffff"
|
||||
height: 1
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: 5
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: 16
|
||||
|
||||
MyToggleButton {
|
||||
id: videoAllowSupersampleOverrideToggle
|
||||
text: "Toggle Override"
|
||||
onCheckedChanged: {
|
||||
VideoTabController.setAllowSupersampleOverride(this.checked, false)
|
||||
VideoTabController.setSuperSampling(videoSupersamplingSlider.value, true)
|
||||
videoSupersamplingText.text = VideoTabController.superSampling.toFixed(1)
|
||||
if(!this.checked){
|
||||
videoSupersamplingText.enabled = false
|
||||
videoSupersamplingSlider.enabled = false
|
||||
videoSupersampleIncrement.enabled = false
|
||||
videoSupersampleDecrement.enabled = false
|
||||
}else{
|
||||
videoSupersamplingText.enabled = true
|
||||
videoSupersamplingSlider.enabled = true
|
||||
videoSupersampleIncrement.enabled = true
|
||||
videoSupersampleDecrement.enabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MyPushButton2 {
|
||||
id: videoSupersampleDecrement
|
||||
text: "-"
|
||||
Layout.preferredWidth: 40
|
||||
onClicked: {
|
||||
videoSupersamplingSlider.decrease()
|
||||
}
|
||||
}
|
||||
|
||||
MySlider {
|
||||
id: videoSupersamplingSlider
|
||||
from: 0.2
|
||||
to: 5.0
|
||||
stepSize: 0.1
|
||||
value: 1.0
|
||||
snapMode: Slider.SnapAlways
|
||||
Layout.fillWidth: true
|
||||
onValueChanged: {
|
||||
var val = this.value
|
||||
videoSupersamplingText.text = val.toFixed(1)
|
||||
VideoTabController.setSuperSampling(this.value.toFixed(1), true)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton2 {
|
||||
id: videoSupersampleIncrement
|
||||
text: "+"
|
||||
Layout.preferredWidth: 40
|
||||
onClicked: {
|
||||
videoSupersamplingSlider.increase()
|
||||
}
|
||||
}
|
||||
|
||||
MyTextField {
|
||||
id: videoSupersamplingText
|
||||
text: "0.0"
|
||||
keyBoardUID: 921
|
||||
Layout.preferredWidth: 100
|
||||
Layout.leftMargin: 10
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
function onInputEvent(input) {
|
||||
var val = parseFloat(input)
|
||||
if (!isNaN(val)) {
|
||||
if (val < 0.1) {
|
||||
val = 0.1
|
||||
}
|
||||
var v = val.toFixed(1)
|
||||
if (v <= videoSupersamplingSlider.to) {
|
||||
videoSupersamplingSlider.value = v
|
||||
} else {
|
||||
VideoTabController.setSuperSampling(v, false)
|
||||
}
|
||||
}
|
||||
text = VideoTabController.superSampling.toFixed(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var s1 = VideoTabController.superSampling.toFixed(1)
|
||||
if (s1 <= videoSupersamplingSlider.to) {
|
||||
videoSupersamplingSlider.value = s1
|
||||
}
|
||||
videoAllowSupersampleOverrideToggle.checked = VideoTabController.allowSupersampleOverride
|
||||
if(!videoAllowSupersampleOverrideToggle.checked){
|
||||
videoSupersamplingText.enabled = false
|
||||
videoSupersamplingSlider.enabled = false
|
||||
videoSupersampleIncrement.enabled = false
|
||||
videoSupersampleDecrement.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
|
||||
onSuperSamplingChanged: {
|
||||
var s1 = VideoTabController.superSampling.toFixed(1)
|
||||
videoSupersamplingSlider.value = s1
|
||||
videoSupersamplingText.text = s1
|
||||
}
|
||||
onAllowSupersampleOverrideChanged: {
|
||||
videoAllowSupersampleOverrideToggle.checked = VideoTabController.allowSupersampleOverride
|
||||
var s1 = VideoTabController.superSampling.toFixed(1)
|
||||
videoSupersamplingSlider.value = s1
|
||||
videoSupersamplingText.text = s1
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user