ardour
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ARDOUR::Progress Class Referenceabstract

#include <progress.h>

Inheritance diagram for ARDOUR::Progress:
ProgressReporter NormalizeDialog StripSilenceDialog TimeFXDialog

Classes

struct  Level
 

Public Member Functions

 Progress ()
 
virtual ~Progress ()
 
void set_progress (float)
 
void ascend ()
 
void descend (float)
 
bool cancelled () const
 

Protected Member Functions

void cancel ()
 

Private Member Functions

virtual void set_overall_progress (float p)=0
 

Private Attributes

std::list< Level_stack
 
bool _cancelled
 

Detailed Description

A class to handle reporting of progress of something

Definition at line 30 of file progress.h.

Constructor & Destructor Documentation

ARDOUR::Progress::Progress ( )

Definition at line 26 of file progress.cc.

virtual ARDOUR::Progress::~Progress ( )
inlinevirtual

Definition at line 34 of file progress.h.

Member Function Documentation

void ARDOUR::Progress::ascend ( )

Definition at line 47 of file progress.cc.

void ARDOUR::Progress::cancel ( )
protected

Definition at line 76 of file progress.cc.

bool ARDOUR::Progress::cancelled ( ) const

Definition at line 82 of file progress.cc.

void ARDOUR::Progress::descend ( float  a)

Descend down one level in terms of progress reporting; e.g. if there is a task which is split up into N subtasks, each of which report their progress from 0 to 100%, call descend() before executing each subtask, and ascend() afterwards to ensure that overall progress is reported correctly.

Parameters
pPercentage (from 0 to 1) of the current task to allocate to the subtask.

Definition at line 41 of file progress.cc.

virtual void ARDOUR::Progress::set_overall_progress ( float  p)
privatepure virtual

Report overall progress.

Parameters
pCurrent progress (from 0 to 1)

Implemented in ProgressReporter.

void ARDOUR::Progress::set_progress ( float  p)

Set the progress of the current task.

Parameters
pProgress (from 0 to 1)

Definition at line 59 of file progress.cc.

Member Data Documentation

bool ARDOUR::Progress::_cancelled
private

Definition at line 59 of file progress.h.

std::list<Level> ARDOUR::Progress::_stack
private

Definition at line 58 of file progress.h.


The documentation for this class was generated from the following files: