fixed indentation

This commit is contained in:
Dante Ruiz 2017-05-12 19:34:13 +01:00
parent 026daef842
commit 9a0fd78e41

View file

@ -185,37 +185,38 @@ namespace controller {
filePath.remove(0,8); filePath.remove(0,8);
QFileInfo info(filePath); QFileInfo info(filePath);
QString extension = info.suffix(); QString extension = info.suffix();
if (extension != "gz") { if (extension != "gz") {
qWarning() << "can not load file with exentsion of " << extension; qWarning() << "can not load file with exentsion of " << extension;
return; return;
} }
bool success = false; bool success = false;
QJsonObject data = openFile(info.absoluteFilePath(), success); QJsonObject data = openFile(info.absoluteFilePath(), success);
if (success) { if (success) {
_framesRecorded = data["frameCount"].toInt(); _framesRecorded = data["frameCount"].toInt();
QJsonArray actionArrayList = data["actionList"].toArray(); qDebug() << "frame count" << _framesRecorded;
QJsonArray poseArrayList = data["poseList"].toArray(); QJsonArray actionArrayList = data["actionList"].toArray();
QJsonArray poseArrayList = data["poseList"].toArray();
for (int actionIndex = 0; actionIndex < actionArrayList.size(); actionIndex++) { for (int actionIndex = 0; actionIndex < actionArrayList.size(); actionIndex++) {
QJsonArray actionState = actionArrayList[actionIndex].toArray(); QJsonArray actionState = actionArrayList[actionIndex].toArray();
for (int index = 0; index < actionState.size(); index++) { for (int index = 0; index < actionState.size(); index++) {
_currentFrameActions[index] = actionState[index].toDouble(); _currentFrameActions[index] = actionState[index].toDouble();
} }
_actionStateList.push_back(_currentFrameActions); _actionStateList.push_back(_currentFrameActions);
_currentFrameActions = ActionStates(toInt(Action::NUM_ACTIONS)); _currentFrameActions = ActionStates(toInt(Action::NUM_ACTIONS));
} }
for (int poseIndex = 0; poseIndex < poseArrayList.size(); poseIndex++) { for (int poseIndex = 0; poseIndex < poseArrayList.size(); poseIndex++) {
QJsonArray poseState = poseArrayList[poseIndex].toArray(); QJsonArray poseState = poseArrayList[poseIndex].toArray();
for (int index = 0; index < poseState.size(); index++) { for (int index = 0; index < poseState.size(); index++) {
_currentFramePoses[index] = jsonObjectToPose(poseState[index].toObject()); _currentFramePoses[index] = jsonObjectToPose(poseState[index].toObject());
} }
_poseStateList.push_back(_currentFramePoses); _poseStateList.push_back(_currentFramePoses);
_currentFramePoses = PoseStates(toInt(Action::NUM_ACTIONS)); _currentFramePoses = PoseStates(toInt(Action::NUM_ACTIONS));
} }
} }
_loading = false; _loading = false;
} }
void InputRecorder::stopRecording() { void InputRecorder::stopRecording() {