SimpleTaskProgress::SimpleTaskProgress(const ofx::TaskQueueEventArgs& args):
    taskId(args.getTaskId()),
    name(args.getTaskName()),
    state(args.getState()),
    progress(0),
    errorMessage(""),
    data(""),
    fader(1)
{
}
Beispiel #2
0
void FileImporter::onTaskFinished(const ofx::TaskQueueEventArgs& args){
    ofScopedLock sl(mutex);
    taskProgress.erase(args.getTaskId());
    numDone++;
    if( numDone == totalNumFile){
        ofLogNotice("FileImporter") << "completed "  << numDone << " files";
        onCompletion();
    }
    
    updateProgress();
    
    
    
}
Beispiel #3
0
void FileImporter::onTaskCancelled(const ofx::TaskQueueEventArgs& args){taskProgress.erase(args.getTaskId());ofLogError("FileImporter","task cancelled");}
Beispiel #4
0
void FileImporter::onTaskQueued(const ofx::TaskQueueEventArgs& args){
    taskProgress[args.getTaskId()] = 0;
}
void SimpleTaskProgress::update(const ofx::TaskQueueEventArgs& args)
{
    taskId = args.getTaskId();
    name = args.getTaskName();
    state = args.getState();
}