mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01: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);
|
_poseStateList.push_back(_currentFramePoses);
|
||||||
_currentFramePoses.clear();
|
_currentFramePoses.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
convertFile(filePath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_loading = false;
|
_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() {
|
void InputRecorder::stopRecording() {
|
||||||
_recording = false;
|
_recording = false;
|
||||||
_framesRecorded = (int)_actionStateList.size();
|
_framesRecorded = (int)_actionStateList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputRecorder::startPlayback() {
|
void InputRecorder::startPlayback() {
|
||||||
_playback = true;
|
_playback = true;
|
||||||
_recording = false;
|
_recording = false;
|
||||||
|
|
|
@ -33,7 +33,6 @@ namespace controller {
|
||||||
|
|
||||||
void saveRecording();
|
void saveRecording();
|
||||||
void loadRecording(const QString& path);
|
void loadRecording(const QString& path);
|
||||||
void convertFile(const QString& path);
|
|
||||||
void startRecording();
|
void startRecording();
|
||||||
void startPlayback();
|
void startPlayback();
|
||||||
void stopPlayback();
|
void stopPlayback();
|
||||||
|
|
Loading…
Reference in a new issue