CMS 3D CMS Logo

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

Public Member Functions

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

Public Attributes

 format
 
- Public Attributes inherited from progressbar.Timer
 format
 

Static Public Attributes

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

Static Private Attributes

tuple __slots__ = ('format',)
 

Additional Inherited Members

- Static Public Member Functions inherited from progressbar.Timer
def format_time
 

Detailed Description

Definition at line 132 of file progressbar.py.

Constructor & Destructor Documentation

def progressbar.FormatLabel.__init__ (   self,
  format 
)

Definition at line 146 of file progressbar.py.

147  def __init__(self, format):
148  self.format = format

Member Function Documentation

def progressbar.FormatLabel.update (   self,
  pbar 
)

Definition at line 149 of file progressbar.py.

References Formatter.SimpleAsciiFormatter.format, progressbar.Timer.format, evf::evtn::TCDSHeader::tcdsheader.format, evf::evtn::TCDSHeader::tcdsheader::@318.format, Formatter.SimpleHTMLFormatter.format, and create_public_lumi_plots.transform.

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().

150  def update(self, pbar):
151  context = {}
152  for name, (key, transform) in self.mapping.items():
153  try:
154  value = getattr(pbar, key)
155 
156  if transform is None:
157  context[name] = value
158  else:
159  context[name] = transform(value)
160  except: pass
161 
162  return self.format % context

Member Data Documentation

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

Definition at line 145 of file progressbar.py.

progressbar.FormatLabel.format

Definition at line 147 of file progressbar.py.

dictionary progressbar.FormatLabel.mapping
static
Initial value:
1 = {
2  'elapsed': ('seconds_elapsed', Timer.format_time),
3  'finished': ('finished', None),
4  'last_update': ('last_update_time', None),
5  'max': ('maxval', None),
6  'seconds': ('seconds_elapsed', None),
7  'start': ('start_time', None),
8  'value': ('currval', None)
9  }

Definition at line 135 of file progressbar.py.