mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 11:04:07 +02:00
some more clean up
This commit is contained in:
parent
ef1be931dc
commit
f6ef1443c8
4 changed files with 31 additions and 11 deletions
|
@ -89,12 +89,24 @@ Rectangle {
|
||||||
editable: true
|
editable: true
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
model: inputPlugins()
|
model: inputPlugins()
|
||||||
|
label: ""
|
||||||
|
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
loader.source = ""
|
changeSource();
|
||||||
loader.source = InputConfiguration.configurationLayout(box.currentText);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HifiControls.CheckBox {
|
||||||
|
id: checkBox
|
||||||
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
text: "show all input plugins"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
console.log("clicked");
|
||||||
|
inputPlugins();
|
||||||
|
changeSource();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,12 +168,26 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
function inputPlugins() {
|
function inputPlugins() {
|
||||||
return InputConfiguration.inputPlugins();
|
if (checkBox.checked) {
|
||||||
|
return InputConfiguration.inputPlugins();
|
||||||
|
} else {
|
||||||
|
return InputConfiguration.activeInputPlugins();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
loader.source = "";
|
chanageSource();
|
||||||
loader.source = InputConfiguration.configurationLayout(box.currentText);
|
}
|
||||||
|
|
||||||
|
function changeSource() {
|
||||||
|
loader.source = "";
|
||||||
|
var source = InputConfiguration.configurationLayout(box.currentText);
|
||||||
|
loader.source = "OpenVrConfiguration.qml";
|
||||||
|
if (source === "") {
|
||||||
|
box.label = "(not configurable)";
|
||||||
|
} else {
|
||||||
|
box.label = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
|
|
@ -385,7 +385,6 @@ Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("calibration button pressed...");
|
|
||||||
openVrConfiguration.countDown = timeToCalibrate.value;
|
openVrConfiguration.countDown = timeToCalibrate.value;
|
||||||
numberAnimation.start();
|
numberAnimation.start();
|
||||||
calibrationTimer.start();
|
calibrationTimer.start();
|
||||||
|
@ -403,7 +402,6 @@ Rectangle {
|
||||||
InputConfiguration.calibratePlugin(pluginName)
|
InputConfiguration.calibratePlugin(pluginName)
|
||||||
info.visible = false;
|
info.visible = false;
|
||||||
info.showCountDown = false;
|
info.showCountDown = false;
|
||||||
console.log("calibration started");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,5 @@ void InputConfiguration::calibratePlugin(QString pluginName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputConfiguration::calibrated(const QJsonObject& status) {
|
void InputConfiguration::calibrated(const QJsonObject& status) {
|
||||||
qDebug() << "-----------> emitting configuration status <------------";
|
|
||||||
emit calibrationStatus(status);
|
emit calibrationStatus(status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,7 +301,6 @@ void ViveControllerManager::InputDevice::calibrateFromUI(const controller::Input
|
||||||
if (_calibrate) {
|
if (_calibrate) {
|
||||||
calibrateOrUncalibrate(inputCalibrationData);
|
calibrateOrUncalibrate(inputCalibrationData);
|
||||||
_calibrate = false;
|
_calibrate = false;
|
||||||
qDebug() << "------------> calibrateFromUI <-------------";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +336,6 @@ void ViveControllerManager::InputDevice::configureCalibrationSettings(const QJso
|
||||||
void ViveControllerManager::InputDevice::calibrateNextFrame() {
|
void ViveControllerManager::InputDevice::calibrateNextFrame() {
|
||||||
Locker locker(_lock);
|
Locker locker(_lock);
|
||||||
_calibrate = true;
|
_calibrate = true;
|
||||||
qDebug() << "---------> calibrateNextFrame <----------";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject ViveControllerManager::InputDevice::configurationSettings() {
|
QJsonObject ViveControllerManager::InputDevice::configurationSettings() {
|
||||||
|
@ -903,7 +901,6 @@ QString ViveControllerManager::InputDevice::configToString(Config config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViveControllerManager::InputDevice::setConfigFromString(const QString& value) {
|
void ViveControllerManager::InputDevice::setConfigFromString(const QString& value) {
|
||||||
qDebug() << "------------> setConfigFromString" << value;
|
|
||||||
if (value == "Auto") {
|
if (value == "Auto") {
|
||||||
_preferedConfig = Config::Auto;
|
_preferedConfig = Config::Auto;
|
||||||
} else if (value == "Feet") {
|
} else if (value == "Feet") {
|
||||||
|
|
Loading…
Reference in a new issue