mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
final changes
This commit is contained in:
parent
c686acc071
commit
0e82b33d6d
2 changed files with 1 additions and 20 deletions
|
@ -259,34 +259,16 @@ namespace controller {
|
|||
_poseStateList.push_back(_currentFramePoses);
|
||||
_currentFramePoses.clear();
|
||||
}
|
||||
|
||||
convertFile(filePath);
|
||||
}
|
||||
|
||||
_loading = false;
|
||||
}
|
||||
|
||||
void InputRecorder::convertFile(const QString& path) {
|
||||
if (!QDir(SAVE_DIRECTORY).exists()) {
|
||||
QDir().mkdir(SAVE_DIRECTORY);
|
||||
}
|
||||
|
||||
QJsonObject data = recordDataToJson();
|
||||
QFile saveFile (path);
|
||||
if (!saveFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
|
||||
qWarning() << "could not open file: " << path;
|
||||
return;
|
||||
}
|
||||
QJsonDocument saveData(data);
|
||||
QByteArray compressedData = qCompress(saveData.toJson(QJsonDocument::Compact));
|
||||
saveFile.write(compressedData);
|
||||
}
|
||||
|
||||
void InputRecorder::stopRecording() {
|
||||
_recording = false;
|
||||
_framesRecorded = (int)_actionStateList.size();
|
||||
}
|
||||
|
||||
|
||||
void InputRecorder::startPlayback() {
|
||||
_playback = true;
|
||||
_recording = false;
|
||||
|
|
|
@ -33,7 +33,6 @@ namespace controller {
|
|||
|
||||
void saveRecording();
|
||||
void loadRecording(const QString& path);
|
||||
void convertFile(const QString& path);
|
||||
void startRecording();
|
||||
void startPlayback();
|
||||
void stopPlayback();
|
||||
|
|
Loading…
Reference in a new issue