Commit b9bd3e27 authored by Adrien Dorsaz's avatar Adrien Dorsaz

Modularize reset action.

parent 67d671fe
......@@ -85,26 +85,22 @@ void Emotions::arousalValence(double arousal, double valence){
void Emotions::toggleSaveCalm(bool save){
_saveCalm = save;
_arousalSet->clear();
_valenceSet->clear();
resetCurrData();
}
void Emotions::toggleSaveJoy(bool save){
_saveJoy = save;
_arousalSet->clear();
_valenceSet->clear();
resetCurrData();
}
void Emotions::toggleSaveSad(bool save){
_saveSad=save;
_arousalSet->clear();
_valenceSet->clear();
resetCurrData();
}
void Emotions::toggleSaveFear(bool save){
_saveFear=save;
_arousalSet->clear();
_valenceSet->clear();
resetCurrData();
}
void Emotions::recordData(bool record){
......@@ -198,3 +194,8 @@ void Emotions::getClassifiers(){
in>>*_arousalClassifier;
in>>*_valenceClassifier;
}
void Emotions::resetCurrData(){
_arousalSet->clear();
_valenceSet->clear();
}
......@@ -38,6 +38,7 @@ private:
void insertValue(QMap<double, double> *valueSet, double val);
void updateTrainedClass(QString arousal, QString valence);
void getClassifiers();
void resetCurrData();
public:
Emotions();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment