SimpleTaskProgress::SimpleTaskProgress(const ofx::TaskQueueEventArgs& args):
    taskId(args.getTaskId()),
    name(args.getTaskName()),
    state(args.getState()),
    progress(0),
    errorMessage(""),
    data(""),
    fader(1)
{
}
Esempio n. 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();
    
    
    
}
Esempio n. 3
0
void FileImporter::onTaskCancelled(const ofx::TaskQueueEventArgs& args){taskProgress.erase(args.getTaskId());ofLogError("FileImporter","task cancelled");}
Esempio n. 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();
}