Package portage :: Module output :: Class ProgressBar
[hide private]

Class ProgressBar

source code

object --+
         |
        ProgressBar
Known Subclasses:

The interface is copied from the ProgressBar class from the EasyDialogs module (which is Mac only).

Instance Methods [hide private]
 
__init__(self, title=None, maxval=0, label=None, max_desc_length=25)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
title(self, newstr)
Sets the text in the title bar of the progress dialog to newstr.
source code
 
label(self, newstr)
Sets the text in the progress box of the progress dialog to newstr.
source code
 
_set_desc(self) source code
 
set(self, value, maxval=None)
Sets the progress bar's curval to value, and also maxval to max if the latter is provided.
source code
 
inc(self, n=1)
Increments the progress bar's curval by n, or by 1 if n is not provided.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  curval
The current value (of type integer or long integer) of the progress bar.
  maxval
The maximum value (of type integer or long integer) of the progress bar; the progress bar (thermometer style) is full when curval equals maxval.

Inherited from object: __class__

Method Details [hide private]

__init__(self, title=None, maxval=0, label=None, max_desc_length=25)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

set(self, value, maxval=None)

source code 

Sets the progress bar's curval to value, and also maxval to max if the latter is provided. value is first coerced between 0 and maxval. The thermometer bar is updated to reflect the changes, including a change from indeterminate to determinate or vice versa.

inc(self, n=1)

source code 

Increments the progress bar's curval by n, or by 1 if n is not provided. (Note that n may be negative, in which case the effect is a decrement.) The progress bar is updated to reflect the change. If the bar is indeterminate, this causes one ``spin'' of the barber pole. The resulting curval is coerced between 0 and maxval if incrementing causes it to fall outside this range.


Property Details [hide private]

curval

The current value (of type integer or long integer) of the progress bar. The normal access methods coerce curval between 0 and maxval. This attribute should not be altered directly.

Get Method:
unreachable.curval(self) - The current value (of type integer or long integer) of the progress bar.

maxval

The maximum value (of type integer or long integer) of the progress bar; the progress bar (thermometer style) is full when curval equals maxval. If maxval is 0, the bar will be indeterminate (barber-pole). This attribute should not be altered directly.

Get Method:
unreachable.maxval(self) - The maximum value (of type integer or long integer) of the progress bar; the progress bar (thermometer style) is full when curval equals maxval.