mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-07 07:20:14 +02:00
saving work
This commit is contained in:
parent
11409aae9b
commit
c97ea84cbf
3 changed files with 51 additions and 0 deletions
|
@ -393,6 +393,51 @@ Rectangle {
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var settings = InputConfiguration.configurationSettings(pluginName);
|
var settings = InputConfiguration.configurationSettings(pluginName);
|
||||||
|
|
||||||
|
var configurationType = settings["trackerConfiguration"];
|
||||||
|
displayTrackerConfiguration(configurationType);
|
||||||
|
|
||||||
|
|
||||||
|
var HmdHead = settings["HMDHead"];
|
||||||
|
var viveController = settings["handController"];
|
||||||
|
|
||||||
|
console.log(HmdHead);
|
||||||
|
console.log(viveController);
|
||||||
|
if (HmdHead) {
|
||||||
|
headBox.checked = true;
|
||||||
|
} else {
|
||||||
|
headPuckBox.checked = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (viveController) {
|
||||||
|
handBox.checked = true;
|
||||||
|
} else {
|
||||||
|
handPuckBox.checked = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function displayTrackerConfiguration(type) {
|
||||||
|
|
||||||
|
if (type === "Feet") {
|
||||||
|
feetBox.checked = true;
|
||||||
|
} else if (type === "FeetAndHips") {
|
||||||
|
feetBox.checked = true;
|
||||||
|
hipBox.checked = true;
|
||||||
|
} else if (type === "FeetHipsChest") {
|
||||||
|
feetBox.checked = true;
|
||||||
|
hipBox.checked = true;
|
||||||
|
chestBox.checked = true;
|
||||||
|
} else if (type === "FeetHipsAndShoulders") {
|
||||||
|
feetBox.checked = true;
|
||||||
|
hipBox.checked = true;
|
||||||
|
shoulderBox.checked = true;
|
||||||
|
} else if (type === "FeetHipsChestAndShoulders") {
|
||||||
|
feetBox.checked = true;
|
||||||
|
hipBox.checked = true;
|
||||||
|
chestBox.checked = true;
|
||||||
|
shoulderBox.checked = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,11 @@ void InputConfiguration::setConfigurationSettings(QJsonObject configurationSetti
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject InputConfiguration::configurationSettings(QString pluginName) {
|
QJsonObject InputConfiguration::configurationSettings(QString pluginName) {
|
||||||
|
for (auto plugin : PluginManager::getInstance()->getInputPlugins()) {
|
||||||
|
if (plugin->getName() == pluginName) {
|
||||||
|
return plugin->configurationSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
return QJsonObject();
|
return QJsonObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ bool ViveControllerManager::isSupported() const {
|
||||||
void ViveControllerManager::setConfigurationSettings(const QJsonObject configurationSettings) {
|
void ViveControllerManager::setConfigurationSettings(const QJsonObject configurationSettings) {
|
||||||
if (isSupported()) {
|
if (isSupported()) {
|
||||||
_inputDevice->configureCalibrationSettings(configurationSettings);
|
_inputDevice->configureCalibrationSettings(configurationSettings);
|
||||||
|
qDebug() << "sending back information";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue