AsyncProgressDialog
Classes | Public Slots | Public Member Functions | List of all members
APD::ProgressVelocityPlot Class Reference

A widget capable of showing current velocity as well as the velocity history. More...

Inheritance diagram for APD::ProgressVelocityPlot:
APD::ProgressWidget

Classes

class  Impl
 

Public Slots

void setValue (int value, const QVariant &userData, const TimeStamp &timeStamp) override
 
void setRange (int minimum, int maximum) override
 
- Public Slots inherited from APD::ProgressWidget
virtual void setValue (int, const QVariant &, const TimeStamp &)
 
virtual void setRange (int, int)
 
virtual void setText (const QString &)
 

Public Member Functions

 ProgressVelocityPlot (QWidget *parent=nullptr)
 
 ProgressVelocityPlot (const QString &quantityUnits, QWidget *parent=nullptr)
 
QString quantityUnits () const
 
void setQuantityUnits (const QString &quantityUnits)
 
bool isProgressHidden () const
 
void setProgressHidden (bool hide)
 
bool isVelocityHistoryHidden () const
 
void setVelocityHistoryHidden (bool hide)
 
bool isCurrentVelocityHidden () const
 
void setCurrentVelocityHidden (bool hide)
 
QPen progressPen () const
 
void setProgressPen (const QPen &pen)
 
QBrush progressBrush () const
 
void setProgressBrush (const QBrush &brush)
 
QPen currentVelocityPen () const
 
void setCurrentVelocityPen (const QPen &pen)
 
QPen velocityHistoryPen () const
 
void setVelocityHistoryPen (const QPen &pen)
 
QBrush velocityHistoryBrush () const
 
void setVelocityHistoryBrush (const QBrush &brush)
 
- Public Member Functions inherited from APD::ProgressWidget
 ProgressWidget (QWidget *parent=nullptr)
 

Detailed Description

A widget capable of showing current velocity as well as the velocity history.

The widget displays a plot, which shows current velocity, velocity history and current progress. Note that the velocity can be shown after the second update to progress value as the time is measured from the first call to setValue().

The velocity is computed from the quantity passed as the second parameter in the setValue() method and from the elapsed time between this and the previous call to setValue() method. The velocity unit is displayed in the form numerator/denominator, where denominator is always seconds (s) and numerator is set by the quantityUnits() method. If quantity units are empty, no velocity unit is shown.

Constructor & Destructor Documentation

◆ ProgressVelocityPlot() [1/2]

APD::ProgressVelocityPlot::ProgressVelocityPlot ( QWidget *  parent = nullptr)
explicit

Constructs a progress velocity plot with the given parent.

◆ ProgressVelocityPlot() [2/2]

APD::ProgressVelocityPlot::ProgressVelocityPlot ( const QString &  quantityUnits,
QWidget *  parent = nullptr 
)
explicit

Constructs a progress velocity plot with the given quantityUnits and parent.

Member Function Documentation

◆ currentVelocityPen()

QPen APD::ProgressVelocityPlot::currentVelocityPen ( ) const

Return the pen of current velocity visualization.

The default is Qt::black.

See also
setCurrentVelocityPen()

◆ isCurrentVelocityHidden()

bool APD::ProgressVelocityPlot::isCurrentVelocityHidden ( ) const

Return the flag whether the current velocity visualization should be displayed.

The default is false.

See also
setCurrentVelocityHidden()

◆ isProgressHidden()

bool APD::ProgressVelocityPlot::isProgressHidden ( ) const

Return the flag whether the progress visualization should be displayed.

The default is false.

See also
setProgressHidden()

◆ isVelocityHistoryHidden()

bool APD::ProgressVelocityPlot::isVelocityHistoryHidden ( ) const

Return the flag whether the velocity history visualization should be displayed.

The default is false.

See also
setVelocityHistoryHidden

◆ progressBrush()

QBrush APD::ProgressVelocityPlot::progressBrush ( ) const

Return the brush of progress visualization.

The default is Qt::green.

See also
setProgressBrush()

◆ progressPen()

QPen APD::ProgressVelocityPlot::progressPen ( ) const

Return the pen of progress visualization.

The default is Qt::green.

See also
setProgressPen()

◆ quantityUnits()

QString APD::ProgressVelocityPlot::quantityUnits ( ) const

Return quantity units. The velocity units are the composed from the quantity units and per second suffix. For instance, if the quantity units are Mb, the velocity units are Mb/s.

The default is an empty string and thus no velocity units are displayed by default.

See also
setQuantityUnits()

◆ setCurrentVelocityHidden()

void APD::ProgressVelocityPlot::setCurrentVelocityHidden ( bool  hide)

Set the current velocity hidden flag.

The default is false.

See also
isCurrentVelocityHidden()

◆ setCurrentVelocityPen()

void APD::ProgressVelocityPlot::setCurrentVelocityPen ( const QPen &  pen)

Set the current velocity pen.

See also
currentVelocityPen()

◆ setProgressBrush()

void APD::ProgressVelocityPlot::setProgressBrush ( const QBrush &  brush)

Set the progress brush.

See also
progressBrush()

◆ setProgressHidden()

void APD::ProgressVelocityPlot::setProgressHidden ( bool  hide)

Set the progress hidden flag.

See also
isProgressHidden()

◆ setProgressPen()

void APD::ProgressVelocityPlot::setProgressPen ( const QPen &  pen)

Set progress pen.

See also
progressPen()

◆ setQuantityUnits()

void APD::ProgressVelocityPlot::setQuantityUnits ( const QString &  quantityUnits)

Set quantity units

See also
quantityUnits()

◆ setRange

void APD::ProgressVelocityPlot::setRange ( int  minimum,
int  maximum 
)
overrideslot

Reimplementation of ProgressWidget::setRange()

◆ setValue

void APD::ProgressVelocityPlot::setValue ( int  value,
const QVariant &  userData,
const TimeStamp &  timeStamp 
)
overrideslot

Reimplementation of ProgressWidget::setValue()

◆ setVelocityHistoryBrush()

void APD::ProgressVelocityPlot::setVelocityHistoryBrush ( const QBrush &  brush)

Set the velocity history brush.

See also
velocityHistoryBrush()

◆ setVelocityHistoryHidden()

void APD::ProgressVelocityPlot::setVelocityHistoryHidden ( bool  hide)

Set the velocity history hidden flag.

The default is false.

See also
isVelocityHistoryHidden

◆ setVelocityHistoryPen()

void APD::ProgressVelocityPlot::setVelocityHistoryPen ( const QPen &  pen)

Set the velocity history pen.

See also
velocityHistoryPen()

◆ velocityHistoryBrush()

QBrush APD::ProgressVelocityPlot::velocityHistoryBrush ( ) const

Return the brush of velocity history visualization.

The default is Qt::darkGreen.

See also
setVelocityHistoryBrush()

◆ velocityHistoryPen()

QPen APD::ProgressVelocityPlot::velocityHistoryPen ( ) const

Return the pen of velocity history visualization.

The default is Qt::darkGreen.

See also
setVelocityHistoryPen()

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