More coding style conformance

This commit is contained in:
Alexander Bock
2017-11-11 11:25:49 -05:00
parent f29b15a37f
commit 758e26789c
170 changed files with 2585 additions and 1229 deletions
+18 -5
View File
@@ -253,7 +253,8 @@ void ControlWidget::onDateChange() {
QString script =
"openspace.time.setTime('" + date + "');\
openspace.setPropertyValue('Interaction.origin', '" + focus + "');\
openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "')";
openspace.setPropertyValue('Interaction.coordinateSystem', '" +
coordinateSystem + "')";
emit scriptActivity(script);
}
_setTime->blockSignals(true);
@@ -265,18 +266,28 @@ void ControlWidget::onFocusChange() {
int index = _focusNode->currentIndex();
QString name = FocusNodes[index].name;
QString coordinateSystem = FocusNodes[index].coordinateSystem;
QString script = "openspace.setPropertyValue('Interaction.origin', '" + name + "');openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "');";
QString script = "openspace.setPropertyValue('Interaction.origin', '" + name +
"');openspace.setPropertyValue('Interaction.coordinateSystem', '" +
coordinateSystem + "');";
emit scriptActivity(script);
}
void ControlWidget::onFocusToTargetButton() {
std::string target = reinterpret_cast<MainWindow*>(parent())->nextTarget();
if (!target.empty()) {
auto it = std::find_if(std::begin(FocusNodes), std::end(FocusNodes), [target](const FocusNode& n) { return n.guiName.toLower() == QString::fromStdString(target).toLower(); });
auto it = std::find_if(
std::begin(FocusNodes),
std::end(FocusNodes),
[target](const FocusNode& n) {
return n.guiName.toLower() == QString::fromStdString(target).toLower();
});
if (it != std::end(FocusNodes)) {
QString name = it->name;
QString coordinateSystem = it->coordinateSystem;
QString script = "openspace.setPropertyValue('Interaction.origin', '" + name + "');openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "');";
QString script =
"openspace.setPropertyValue('Interaction.origin', '" + name +
"');openspace.setPropertyValue('Interaction.coordinateSystem', '" +
coordinateSystem + "');";
emit scriptActivity(script);
}
}
@@ -292,7 +303,9 @@ void ControlWidget::onFocusToNewHorizonsButton() {
else
coordinateSystem = "Pluto";
QString script = "openspace.setPropertyValue('Interaction.origin', 'NewHorizons');openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + "');";
QString script = "openspace.setPropertyValue('Interaction.origin', 'NewHorizons');\
openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem +
"');";
emit scriptActivity(script);
}