CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
progressbar.Timer Class Reference
Inheritance diagram for progressbar.Timer:
progressbar.Widget progressbar.FormatLabel

Public Member Functions

def __init__
 
def update
 
- Public Member Functions inherited from progressbar.Widget
def update
 

Static Public Member Functions

def format_time
 

Public Attributes

 format
 

Static Public Attributes

 TIME_SENSITIVE = True
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE = False
 

Static Private Attributes

tuple __slots__ = ('format',)
 

Detailed Description

Definition at line 37 of file progressbar.py.

Constructor & Destructor Documentation

def progressbar.Timer.__init__ (   self,
  format = 'Elapsed Time: %s' 
)

Definition at line 43 of file progressbar.py.

43 
44  def __init__(self, format='Elapsed Time: %s'):
45  self.format = format

Member Function Documentation

def progressbar.Timer.format_time (   seconds)
static

Definition at line 47 of file progressbar.py.

Referenced by progressbar.Timer.update().

47 
48  def format_time(seconds):
49  'Formats time as the string "HH:MM:SS".'
50 
51  return str(datetime.timedelta(seconds=int(seconds)))
52 
def progressbar.Timer.update (   self,
  pbar 
)

Definition at line 53 of file progressbar.py.

References Formatter.SimpleAsciiFormatter.format, progressbar.Timer.format, evf::evtn::TCDSHeader::tcdsheader::@318.format, evf::evtn::TCDSHeader::tcdsheader.format, Formatter.SimpleHTMLFormatter.format, and progressbar.Timer.format_time().

Referenced by progressbar.ProgressBar.__next__(), relval_steps.Matrix.__setitem__(), relval_steps.Steps.__setitem__(), Vispa.Gui.VispaWidget.VispaWidget.autosize(), Vispa.Views.LineDecayView.LineDecayContainer.createObject(), Vispa.Views.LineDecayView.LineDecayContainer.deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget.enableAutosizing(), progressbar.ProgressBar.finish(), Vispa.Gui.MenuWidget.MenuWidget.leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget.mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer.mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer.objectMoved(), relval_steps.Steps.overwrite(), Vispa.Views.LineDecayView.LineDecayContainer.removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget.removePorts(), Vispa.Gui.FindDialog.FindDialog.reset(), Vispa.Gui.PortConnection.PointToPointConnection.select(), Vispa.Gui.VispaWidget.VispaWidget.select(), Vispa.Views.LineDecayView.LineDecayContainer.select(), Vispa.Gui.VispaWidget.VispaWidget.setText(), Vispa.Gui.VispaWidget.VispaWidget.setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget.setZoom(), Vispa.Views.LineDecayView.LineDecayContainer.setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection.updateConnection().

53 
54  def update(self, pbar):
55  'Updates the widget to show the elapsed time.'
56 
return self.format % self.format_time(pbar.seconds_elapsed)

Member Data Documentation

tuple progressbar.Timer.__slots__ = ('format',)
staticprivate

Definition at line 40 of file progressbar.py.

progressbar.Timer.format

Definition at line 44 of file progressbar.py.

Referenced by progressbar.Timer.update(), and progressbar.FormatLabel.update().

progressbar.Timer.TIME_SENSITIVE = True
static

Definition at line 41 of file progressbar.py.