Vaca::ProgressBar Class Reference

#include <ProgressBar.h>

Inheritance diagram for Vaca::ProgressBar:

Vaca::Widget Vaca::Component Vaca::Referenceable Vaca::NonCopyable

List of all members.


Detailed Description

Shows progress for a task that is running in background.

Public Member Functions

 ProgressBar (Widget *parent, Style style=ProgressBarStyle)
 ProgressBar (int minValue, int maxValue, Widget *parent, Style style=ProgressBarStyle)
virtual ~ProgressBar ()
virtual void setBgColor (const Color &color)
 PBM_SETBKCOLOR.
int getMinimum ()
int getMaximum ()
void getRange (int &minValue, int &maxValue)
 PBM_GETRANGE.
void setRange (int minValue, int maxValue)
 PBM_SETRANGE32.
int getValue ()
 PBM_GETPOS.
void setValue (int value)
 PBM_SETPOS.
void addValue (int delta)
 Increments the current progress bar value (position), in delta units (PBM_DELTAPOS).

Protected Member Functions

virtual void onPreferredSize (Size &sz)
 It should calculates the preferred size for this widget.

Constructor & Destructor Documentation

ProgressBar::ProgressBar ( Widget parent,
Style  style = ProgressBarStyle 
)

ProgressBar::ProgressBar ( int  minValue,
int  maxValue,
Widget parent,
Style  style = ProgressBarStyle 
)

ProgressBar::~ProgressBar (  )  [virtual]


Member Function Documentation

void ProgressBar::setBgColor ( const Color color  )  [virtual]

PBM_SETBKCOLOR.

Reimplemented from Vaca::Widget.

int ProgressBar::getMinimum (  ) 

int ProgressBar::getMaximum (  ) 

void ProgressBar::getRange ( int &  minValue,
int &  maxValue 
)

PBM_GETRANGE.

void ProgressBar::setRange ( int  minValue,
int  maxValue 
)

PBM_SETRANGE32.

int ProgressBar::getValue (  ) 

PBM_GETPOS.

void ProgressBar::setValue ( int  value  ) 

PBM_SETPOS.

void ProgressBar::addValue ( int  delta  ) 

Increments the current progress bar value (position), in delta units (PBM_DELTAPOS).

void ProgressBar::onPreferredSize ( Size sz  )  [protected, virtual]

It should calculates the preferred size for this widget.

Parameters:
sz It's for input and output. You should put the preferred size in this value, but also you should read the input value to know if you must to fit the widget in some size. The possible values for sz are:
  • sz = Size(0, 0) to calculate the preferred size without restrictions.
  • sz = Size(width, 0) to calculate the preferred size with restricted <= width.
  • sz = Size(0, height) to calculate the preferred size with restricted <= height.

Reimplemented from Vaca::Widget.