saving work

This commit is contained in:
Dante Ruiz 2017-06-08 17:44:55 +01:00
parent 11409aae9b
commit c97ea84cbf
3 changed files with 51 additions and 0 deletions

View file

@ -393,6 +393,51 @@ Rectangle {
Component.onCompleted: {
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;
}
}

View file

@ -54,6 +54,11 @@ void InputConfiguration::setConfigurationSettings(QJsonObject configurationSetti
}
QJsonObject InputConfiguration::configurationSettings(QString pluginName) {
for (auto plugin : PluginManager::getInstance()->getInputPlugins()) {
if (plugin->getName() == pluginName) {
return plugin->configurationSettings();
}
}
return QJsonObject();
}

View file

@ -123,6 +123,7 @@ bool ViveControllerManager::isSupported() const {
void ViveControllerManager::setConfigurationSettings(const QJsonObject configurationSettings) {
if (isSupported()) {
_inputDevice->configureCalibrationSettings(configurationSettings);
qDebug() << "sending back information";
}
}