Table of Contents

Class: ProgressMeter PmwContribD-r2_0_1/ProgressMeter.py

A Pmw style widget for showing progress being made on a task.

Progress is displayed by color-filling a horizontal bar. It is also possible to show the progress using a text representation, including the elapsed time.

Options

finishvalue

When the progress reaches this value the color fill should reach 100%.

indicatorcolor

Color to use to display the text progress indicator value.

indicatorformat

Format string showing the indicator information desired. Potential values are:

elapsedtime

The amount of clock time which has passed since starting processing (when progress was last reset to 0).

estimatedtime

The full amount of time which will have to elapse before progress will reach 100% at the current rate of progress.

finishvalue

The finishvalue associated with the widget which represents 100% progress.

percentdone

Percent of the whole which has been processed. This is calculated based on the current progress value vs. the finishvalue.

progress

The actual progress value given by the caller of the updateProgress method.

remainingtime

The amount of time left which will have to elapse before progress will reach 100% at the current rate of progress.

ratetime

The amount of time which must elapse to make 1% progress. This value is used to calculate remainingtime.

ipadx=0

Internal X padding for component separation.

ipady=0

Internal Y padding for component separation.

progresscolor

Color which fills meter as progress is advanced.

shadowthickness

Width of the beveled edge around the fill color.

Base Classes   
Pmw.LabeledWidget
Methods   
__init__
computePercentDone
createProgressMeterCanvas
drawProgressMeter
formatTime
getColors
indicatorTextGet
redraw
showPercentDone
updateMessage
updateProgress
updateTimeValues
  __init__ 
__init__ (
        self,
        parent=None,
        **kw,
        )

Create a ProgressMeter.

  computePercentDone 
computePercentDone ( self )

Compute our progress as a percent done and return the number.

  createProgressMeterCanvas 
createProgressMeterCanvas ( self,  parent )

Create the canvas on which the meter will be drawn.

Create the canvas widget and the components on the canvas to draw the progress meter. This is separated out to make subclassing easier.

  drawProgressMeter 
drawProgressMeter ( self,  percentDone )

Draw the progress meter the way it should look with the specified percentDone.

  formatTime 
formatTime ( self,  timeValue )

Format the timeValue with our standard formatting string for display.

  getColors 
getColors ( self )

Returns colors to use to draw the progress bar.

Once we know the progresscolor attribute, we should be able to compute appropriate shadow colors. Returns a tuple with (progresscolor, top shadow(light), bottom shadow(dark)).

  indicatorTextGet 
indicatorTextGet ( self,  percentDone )

Returns the text to be used in the indicator, already formatted.

  redraw 
redraw ( self )

Redraw method to update the display.

  showPercentDone 
showPercentDone ( self )

Show our progress.

  updateMessage 
updateMessage ( self,  messageString='' )

Display a new message in our label, if we have one.

  updateProgress 
updateProgress ( self,  newValue=0 )

Set a new progress value.

  updateTimeValues 
updateTimeValues ( self )

Update the time left value on the progress indicator.


Table of Contents

This document was automatically generated on Mon Sep 17 17:47:46 2001 by HappyDoc version r2_0