| 151 | } |
| 152 | |
| 153 | bool |
| 154 | ExportSamplesTask::work(void) |
| 155 | { |
| 156 | bool ok = false; |
| 157 | |
| 158 | this->timer.start(); |
| 159 | |
| 160 | if (this->format == "mat") |
| 161 | ok = this->exportToMat5(); |
| 162 | else if (this->format == "m") |
| 163 | ok = this->exportToMatlab(); |
| 164 | else if (this->format == "wav" || this->format == "raw") |
| 165 | ok = this->exportToWav(); |
| 166 | else |
| 167 | emit error("Unsupported data format " + this->format); |
| 168 | |
| 169 | if (ok) { |
| 170 | if (this->cancelFlag) |
| 171 | emit cancelled(); |
| 172 | else |
| 173 | emit done(); |
| 174 | } |
| 175 | |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | void |
| 180 | ExportSamplesTask::cancel(void) |
nothing calls this directly
no test coverage detected