test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
progressbar.BouncingBar Class Reference
Inheritance diagram for progressbar.BouncingBar:
progressbar.Bar progressbar.WidgetHFill progressbar.Widget

Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from progressbar.Bar
 fill
 
 fill_left
 
 left
 
 marker
 
 right
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE = False
 

Detailed Description

Definition at line 111 of file progressbar.py.

Member Function Documentation

def progressbar.BouncingBar.update (   self,
  pbar,
  width 
)

Definition at line 112 of file progressbar.py.

References progressbar.Bar.fill, progressbar.Bar.fill_left, progressbar.format_updatable(), ShallowClustersProducer::NearDigis.left, JME::bimap< T, U >.left, KDTreeNode.left, progressbar.Bar.left, progressbar.Bar.marker, HCAL_HLX::LUMI_RAW_HEADER.marker, ShallowClustersProducer::NearDigis.right, JME::bimap< T, U >.right, KDTreeNodes< DATA >.right, KDTreeNode.right, progressbar.Bar.right, svgfig.Curve.Sample.right, and svgfig.Curve.Samples.right.

Referenced by progressbar.ProgressBar.__next__(), MatrixUtil.Matrix.__setitem__(), MatrixUtil.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(), MatrixUtil.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().

113  def update(self, pbar, width):
114  'Updates the progress bar and its subcomponents'
115 
116  left, marker, right = (format_updatable(i, pbar) for i in
117  (self.left, self.marker, self.right))
118 
119  width -= len(left) + len(right)
120 
121  if pbar.finished: return '%s%s%s' % (left, width * marker, right)
122 
123  position = int(pbar.currval % (width * 2 - 1))
124  if position > width: position = width * 2 - position
125  lpad = self.fill * (position - 1)
126  rpad = self.fill * (width - len(marker) - len(lpad))
127 
128  # Swap if we want to bounce the other way
129  if not self.fill_left: rpad, lpad = lpad, rpad
130 
131  return '%s%s%s%s%s' % (left, lpad, marker, rpad, right)
def format_updatable
Definition: progressbar.py:411