CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Vispa.Gui.ConnectableWidget.ConnectableWidget Class Reference
Inheritance diagram for Vispa.Gui.ConnectableWidget.ConnectableWidget:
Vispa.Gui.VispaWidget.VispaWidget Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.Zoomable.Zoomable Vispa.Gui.WidgetContainer.WidgetContainer Vispa.Views.BoxDecayView.BoxDecayContainer Vispa.Views.LineDecayView.LineDecayContainer

Public Member Functions

def __init__ (self, parent=None, name=None)
 
def addMenuEntry (self, name, slot=None)
 
def addSinkPort (self, name, description=None)
 
def addSourcePort (self, name, description=None)
 
def arrangePorts (self, filter=None)
 
def attachedConnections (self)
 
def centerSinglePortVertically (self, ports, portX)
 
def defineDistances (self, keepDefaultRatio=False)
 
def deleteLater (self)
 
def dragWidget (self, pPos)
 
def drawBody (self, painter)
 
def drawPortLines (self, painter)
 
def drawPortNames (self, painter)
 
def dropArea (self, port)
 
def dropAreaPort (self, position)
 
def getEffectivePortHeight (self, port)
 
def getPortsHeight (self, portType)
 
def leaveEvent (self, event)
 
def menu (self)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def move (self, target)
 
def port (self, name, type)
 
def portExists (self, name, description=None)
 
def ports (self)
 
def positionizeMenuWidget (self)
 
def rearangeContent (self)
 
def removeMenu (self)
 
def removeMenuEntry (self, entry)
 
def removePort (self, port)
 
def removePorts (self, filter=None)
 
def select (self, sel=True, multiSelect=False)
 
def setPortNamesPosition (self, position)
 
def setShowPortLines (self, show)
 
def setShowPortNames (self, show)
 
def setZoom (self, zoom)
 
def showMenu (self)
 
def sinkPort (self, name)
 
def sinkPorts (self)
 
def sizeHint (self)
 
def sourcePort (self, name)
 
def sourcePorts (self)
 
def updateAttachedConnections (self)
 
- Public Member Functions inherited from Vispa.Gui.VispaWidget.VispaWidget
def __init__ (self, parent=None)
 
def autosize (self, skipSizeHint=False)
 
def autosizeEnabled (self)
 
def bodyWidget (self)
 
def boundingRect (self)
 
def colorHeaderBackgroundEnabled (self)
 
def contentRect (self)
 
def defineArrowBackgroundShape (self)
 
def defineCircleBackgroundShape (self, painter)
 
def defineDistances (self, keepDefaultRatio=False)
 
def defineRectBackgroundShape (self, painter)
 
def defineRoundRectBackgroundShape (self, painter)
 
def delete (self)
 
def distances (self)
 
def dragReferencePoint (self)
 
def dragWidget (self, pPos)
 
def drawBody (self, painter)
 
def drawHeaderBackground (self, painter)
 
def drawImage (self, painter)
 
def drawTextField (self, painter)
 
def drawTitle (self, painter)
 
def enableAutopositionizeWhenZooming (self, auto)
 
def enableAutosizing (self, auto, keepAspectRatio=True)
 
def enableBackgroundGradient (self, enable=True)
 
def enableColorHeaderBackground (self, enable=True)
 
def getDistance (self, name, scale=None, keepDefaultRatio=False)
 
def height (self)
 
def imageRectF (self, width=None, height=None)
 
def imageSizeF (self)
 
def isDeletable (self)
 
def isDragable (self)
 
def isSelectable (self)
 
def isSelected (self)
 
def isTitlePoint (self, point)
 
def isUseBackgroundGradientEnabled (self)
 
def keyPressEvent (self, event)
 
def mouseDoubleClickEvent (self, event)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def move (self, target)
 
def noRearangeContent (self, no=True)
 
def paint (self, painter, event=None)
 
def paintEvent (self, event)
 
def penColor (self)
 
def previousDragPosition (self)
 
def rearangeContent (self)
 
def resetMouseDragOffset (self)
 
def resize (self, width, height)
 
def scale (self)
 
def scheduleCalculateDistances (self)
 
def scheduleRearangeContent (self)
 
def select (self, sel=True, multiSelect=False)
 
def setArrowShape (self, direction)
 
def setBodyWidget (self, widget)
 
def setColors (self, penColor, fillColor1, fillColor2)
 
def setDeletable (self, deleteable)
 
def setDragable (self, dragable, recursive=False)
 
def setDragReferencePoint (self, pos)
 
def setImage (self, image)
 
def setMaximumSize (self, attr)
 
def setMinimumSize (self, attr)
 
def setPreviousDragPosition (self, position)
 
def setSelectable (self, selectable)
 
def setShape (self, shape)
 
def setText (self, text)
 
def setTextFieldAutosizeFont (self, auto)
 
def setTextFieldAutotruncateText (self, auto)
 
def setTitle (self, title)
 
def setZoom (self, zoom)
 
def showEvent (self, event)
 
def sizeHint (self)
 
def text (self)
 
def textField (self)
 
def textFieldIsSet (self)
 
def title (self)
 
def titleField (self)
 
def titleIsSet (self)
 
def unzoomedX (self)
 
def unzoomedY (self)
 
def width (self)
 
- Public Member Functions inherited from Vispa.Gui.ZoomableWidget.ZoomableWidget
def __init__ (self, parent=None)
 
def exportImage (self, filename=None)
 
def setZoom (self, zoom)
 
- Public Member Functions inherited from Vispa.Gui.Zoomable.Zoomable
def __init__ (self)
 
def decrementZoom (self)
 
def incrementZoom (self)
 
def setZoom (self, zoom)
 
def zoom (self)
 
def zoomFactor (self)
 
- Public Member Functions inherited from Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner
def deselectAllWidgets (self, exception=None)
 
def enableMultiSelect (self, multiSelect=True)
 
def initWidgetMovement (self, widget)
 
def keyPressEvent (self, event)
 
def lastMovedWidgets (self)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def multiSelectEnabled (self)
 
def selectedWidgets (self)
 
def widgetAboutToDelete (self, widget)
 
def widgetDoubleClicked (self, widget)
 
def widgetDragged (self, widget)
 
def widgetSelected (self, widget, multiSelect=False)
 

Public Attributes

 PORT_LINES_TARGET_X
 
 PORT_LINES_TARGET_Y
 
- Public Attributes inherited from Vispa.Gui.VispaWidget.VispaWidget
 fillColor1
 
 fillColor2
 
 framePenColor
 
 HEIGHT
 
 WIDTH
 

Private Member Functions

def _addPort (self, port, description=None)
 
def _getMaxPortTitleWidth (self, type)
 
def _getMaxSinkTitleWidth (self)
 
def _getMaxSourceTitleWidth (self)
 

Private Attributes

 _menuWidget
 
 _portNamesPosition
 
 _ports
 
 _showPortLines
 
 _showPortNames
 

Detailed Description

Widget which can be connection by PortConnections to other selectable widgets.

Supports showing source and sink ports.
The widget is owner of PortWidgets.

Definition at line 11 of file ConnectableWidget.py.

Constructor & Destructor Documentation

def Vispa.Gui.ConnectableWidget.ConnectableWidget.__init__ (   self,
  parent = None,
  name = None 
)
Constructor.

Definition at line 34 of file ConnectableWidget.py.

34  def __init__(self, parent=None, name=None):
35  """ Constructor.
36  """
37  self._ports = []
38  self._showPortNames = False
39  self._portNamesPosition = None
40  self._showPortLines = False
41  self._menuWidget = None
42  VispaWidget.__init__(self, parent)
43  self.setShowPortNames(self.SHOW_PORT_NAMES)
44  self.setPortNamesPosition(self.PORT_NAMES_POSITION)
45  self.setShowPortLines(self.SHOW_PORT_LINES)
46 
47  if name:
48  self.setTitle(name)
49 
def __init__(self, parent=None, name=None)

Member Function Documentation

def Vispa.Gui.ConnectableWidget.ConnectableWidget._addPort (   self,
  port,
  description = None 
)
private

Definition at line 237 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports, and Vispa.Gui.VispaWidget.VispaWidget.scheduleRearangeContent().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.addSinkPort(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.addSourcePort().

237  def _addPort(self, port, description=None):
238  self._ports.append(port)
239  port.show()
240  if description:
241  self._ports[len(self._ports) - 1].setDescription(description)
243 
def _addPort(self, port, description=None)
def Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxPortTitleWidth (   self,
  type 
)
private

Definition at line 322 of file ConnectableWidget.py.

References SiStripPI.max, Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPorts(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.sourcePorts().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxSinkTitleWidth(), and Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxSourceTitleWidth().

322  def _getMaxPortTitleWidth(self, type):
323  if type == 'sink':
324  ports = self.sinkPorts()
325  elif type == 'source':
326  ports = self.sourcePorts()
327  else:
328  return 0
329 
330  if len(ports) < 1:
331  return 0
332  return max([port.titleField().getWidth() for port in ports])
333 
def Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxSinkTitleWidth (   self)
private
def Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxSourceTitleWidth (   self)
private
def Vispa.Gui.ConnectableWidget.ConnectableWidget.addMenuEntry (   self,
  name,
  slot = None 
)

Definition at line 511 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._menuWidget, edmIntegrityCheck.PublishToFileSystem.parent, edm::ThinnedAssociationBranches.parent(), confdb.HLTProcess.parent, reco::PattRecoNode< Cluster >.parent(), FSimVertex.parent(), DDI::Division.parent(), math::GraphWalker< DDLogicalPart, DDPosData * >.parent(), math::GraphWalker< N, E >.parent(), math::GraphWalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), GraphWalker< N, E >.parent(), edm::ModuleCallingContext.parent(), DDLSAX2FileHandler.parent(), OpticalObject.parent(), emtf::Node.parent, edm::DocFormatHelper.parent(), FWPSetTableManager::PSetData.parent, EmDQMReco::FourVectorMonitorElements.parent, DDFilteredView.parent(), cms::DDFilteredView.parent(), DDExpandedView.parent(), DDDivision.parent(), options.HLTProcessOptions.parent, dqmservices::TriggerSelector::TreeElement.parent(), DDXMLElement.parent(), BeautifulSoup.PageElement.parent, globcontrol.parent, and Vispa.Views.LineDecayView.DecayObject.parent().

Referenced by Vispa.Gui.WidgetContainer.WidgetContainer.setShowCollapseMenu().

511  def addMenuEntry(self, name, slot=None):
512  if not self._menuWidget:
513  self._menuWidget = MenuWidget(self.parent(), self)
514  self.setMouseTracking(True)
515  return self._menuWidget.addEntry(name, slot)
516 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.addSinkPort (   self,
  name,
  description = None 
)
Adds sink port with name and optional description text.

Definition at line 223 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._addPort().

223  def addSinkPort(self, name, description=None):
224  """ Adds sink port with name and optional description text.
225  """
226  port=SinkPort(self, name)
227  self._addPort(port, description)
228  return port
229 
def _addPort(self, port, description=None)
def addSinkPort(self, name, description=None)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.addSourcePort (   self,
  name,
  description = None 
)
Adds source port with name and optional description text.

Definition at line 230 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._addPort().

230  def addSourcePort(self, name, description=None):
231  """ Adds source port with name and optional description text.
232  """
233  port=SourcePort(self, name)
234  self._addPort(port, description)
235  return port
236 
def addSourcePort(self, name, description=None)
def _addPort(self, port, description=None)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.arrangePorts (   self,
  filter = None 
)
Sets positions of set ports depending on zoom factor.

If filter is set it may be 'sink' or 'source'.

Definition at line 374 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports, ValidateGeometry.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.getDistance(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.getEffectivePortHeight().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.rearangeContent(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.sizeHint().

374  def arrangePorts(self, filter=None):
375  """ Sets positions of set ports depending on zoom factor.
376 
377  If filter is set it may be 'sink' or 'source'.
378  """
379  if filter and (filter != "sink" and filter != "source"):
380  filter = None
381  sinkCounter = 0
382  sourceCounter = 0
383 
384  sinkX = self.getDistance('firstSinkX')
385  sinkY = self.getDistance('firstSinkY')
386  sourceX = self.getDistance('firstSourceX')
387  sourceY = self.getDistance('firstSourceY')
388 
389  for port in self._ports:
390  if port.portType() == 'sink' and (not filter or filter == "sink"):
391  sinkCounter += 1
392  port.move(sinkX, sinkY)
393  sinkY -= self.getDistance('topMargin') + self.getEffectivePortHeight(port) #+ PortWidget.HEIGHT * self.scale()
394 
395  elif port.portType() == 'source' and (not filter or filter == "source"):
396  sourceCounter += 1
397  port.move(sourceX, sourceY)
398  sourceY -= self.getDistance('topMargin') + self.getEffectivePortHeight(port) # + PortWidget.HEIGHT * self.scale()
399 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.attachedConnections (   self)

Definition at line 557 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports.

558  connections = []
559  for port in self._ports:
560  connections += port.attachedConnections()
561  return connections
def Vispa.Gui.ConnectableWidget.ConnectableWidget.centerSinglePortVertically (   self,
  ports,
  portX 
)
Centers port vertically within body part (widget without title) of ModuleWidget.

ports can either be the list of source or sink ports of ModuleWidget.
portX specifies the designated x coordinate to be adjustable for sinks and sources.

Definition at line 362 of file ConnectableWidget.py.

References ValidateGeometry.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.getDistance(), cscdqm::StripClusterFitData.height(), FedTimingAnalysis.height(), btag::SimpleMatrix< T >.height, presentation.PageLayout.height, FWFramedTextTableCellRenderer.height(), FWTextTableCellRenderer.height(), FWTableCellRendererBase.height(), ApvTimingAnalysis.height(), DaqScopeModeAnalysis.height(), FWGeometryTableManagerBase::ColorBoxRenderer.height(), TkAlMap.TkAlMap.height, svgfig.Plot.height, svgfig.Frame.height, Vispa.Gui.VispaWidget.VispaWidget.height(), svgfig.Dots.height, and Vispa.Gui.ConnectableWidget.ConnectableWidget.move().

362  def centerSinglePortVertically(self, ports, portX):
363  """ Centers port vertically within body part (widget without title) of ModuleWidget.
364 
365  ports can either be the list of source or sink ports of ModuleWidget.
366  portX specifies the designated x coordinate to be adjustable for sinks and sources.
367  """
368  if len(ports) != 1 or not isinstance(ports[0], PortWidget):
369  logging.warning(self.__class__.__name__ + ": centerSinglePortVertically() - This method was designed for plugins with one port. Falling back to default arrangement.")
370  return False
371  ports[0].move(portX, (self.height() + self.getDistance("titleFieldHeight")) * 0.5)
372  return True
373 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.defineDistances (   self,
  keepDefaultRatio = False 
)
Extends distances of VispaWidget by the additionally needed distances for displaying ports.

Definition at line 155 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxSinkTitleWidth(), Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortNames, tracking::TempMeasurements.distances, Vispa.Gui.VispaWidget.VispaWidget.distances(), Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPorts(), and Vispa.Gui.VispaWidget.VispaWidget.textFieldIsSet().

Referenced by Vispa.Gui.VispaWidget.VispaWidget.getDistance().

155  def defineDistances(self, keepDefaultRatio=False):
156  """ Extends distances of VispaWidget by the additionally needed distances for displaying ports.
157  """
158  #if scale == None:
159  # scale = self.scale()
160  scale = 1.0
161 
162  if not VispaWidget.defineDistances(self, keepDefaultRatio):
163  return False
164  if len(self.sinkPorts()) > 0:
165  self.distances()['textFieldX'] += PortWidget.WIDTH * scale + self.distances()['leftMargin']
166  self.distances()['textFieldRight'] = self.distances()['textFieldX'] + self.distances()['textFieldWidth']
167  if self._showPortNames:
168  self.distances()['textFieldX'] += self._getMaxSinkTitleWidth() + self.distances()['leftMargin']
169  self.distances()['textFieldRight'] += self._getMaxSinkTitleWidth() + self.distances()['leftMargin']
170 
171  firstPortY = self.distances()['height'] - self.distances()['bottomMargin'] - PortWidget.HEIGHT * scale
172  self.distances()['firstSinkX'] = self.distances()['leftMargin']
173  self.distances()['firstSinkY'] = firstPortY
174 
175  if self.textFieldIsSet():
176  self.distances()['firstSourceX'] = self.distances()['textFieldRight'] + self.distances()['leftMargin']
177  #else:
178  self.distances()['firstSourceX'] = self.distances()['width'] - self.distances()['leftMargin'] - PortWidget.WIDTH * scale
179  self.distances()['firstSourceY'] = firstPortY
180 
181  return True
182 
183 # def scaleChanged(self):
184 # """ Arranges ports when scale has changed.
185 # """
186 # VispaWidget.scaleChanged(self)
187 # self.arrangePorts()
188 
def defineDistances(self, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.dragWidget (   self,
  pPos 
)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.drawBody (   self,
  painter 
)
Takes care of painting widget content on given painter.

Definition at line 400 of file ConnectableWidget.py.

References Vispa.Gui.VispaWidget.VispaWidget.drawImage(), Vispa.Gui.ConnectableWidget.ConnectableWidget.drawPortLines(), Vispa.Gui.ConnectableWidget.ConnectableWidget.drawPortNames(), Vispa.Gui.PortWidget.PortWidget.drawTextField(), and Vispa.Gui.VispaWidget.VispaWidget.drawTextField().

Referenced by Vispa.Gui.VispaWidget.VispaWidget.paint().

400  def drawBody(self, painter):
401  """ Takes care of painting widget content on given painter.
402  """
403  self.drawPortLines(painter)
404  self.drawTextField(painter)
405  self.drawImage(painter)
406  self.drawPortNames(painter)
407 
def drawTextField(self, painter)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.drawPortLines (   self,
  painter 
)
Draws lines from every port to a common point.

See setShowPortLines().

Definition at line 441 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortLines.

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.drawBody().

441  def drawPortLines(self, painter):
442  """ Draws lines from every port to a common point.
443 
444  See setShowPortLines().
445  """
446  if not self._showPortLines:
447  return
448 
449  if self.PORT_LINES_TARGET_X == -1 and self.PORT_LINES_TARGET_Y == -1:
450  targetPoint = QPoint(self.width(), self.height() + self.getDistance("titleFieldBottom")) * 0.5
451  else:
452  targetPoint = QPoint(self.PORT_LINES_TARGET_X, self.PORT_LINES_TARGET_Y) * self.scale()
453 
454  painter.setPen(QPen(QColor('black')))
455  painter.pen().setWidth(1)
456 
457  for port in self.ports():
458  painter.drawLine(port.connectionPoint("widget"), targetPoint)
459 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.drawPortNames (   self,
  painter 
)
Paints port names next to PortWidget.

See setShowPortNames().

Definition at line 408 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._portNamesPosition, Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortNames, ValidateGeometry.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.paint(), CaloMeanResponse.scale, CSCDBChipSpeedCorrection.scale(), CSCDBGains.scale(), CSCDBNoiseMatrix.scale(), scaleGains.scale, LocalError.scale(), correctionValue_class.scale, DQMRivetClient::ScaleFactorOption.scale, DrawPlot.scale(), CaloSamples.scale(), python.rootplot.rootmath.Target.scale, heppy::Davismt2.scale, python.rootplot.tree2hists.RootTree.scale, reco::PattRecoPeak< Real >.scale(), MuonErrorMatrix.scale, Vispa.Gui.VispaWidget.VispaWidget.scale(), Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPorts(), Vispa.Gui.ConnectableWidget.ConnectableWidget.sourcePorts(), TmModule.width, Random_struct.width, OpenBounds.width(), SimpleDiskBounds.width(), RectangularPlaneBounds.width(), funct::GammaZInterference.width, GeneralNSurfaceDelimitedBounds.width(), PhysicsTools::Calibration::Range< Axis_t >.width(), SimpleCylinderBounds.width(), funct::BreitWigner.width, DDTIDAxialCableAlgo.width, Bounds.width(), DDTECAxialCableAlgo.width, TrapezoidalPlaneBounds.width(), reco::CastorJetID.width, AlignableSurface.width(), DDI::Division.width(), FWCheckedTextTableCellRenderer.width(), FWColumnLabelCellRenderer.width(), function::ZMuStandaloneFunction.width, function::ZMuMuFunction.width, btag::SimpleMatrix< T >.width, function::ZMuMuScaledFunction.width, function::ZMuTrackFunction.width, FWCollectionSummaryModelCellRenderer.width(), function::ZMuStandaloneScaledFunction.width, function::ZMuTrackScaledFunction.width, SimpleConeBounds.width(), function::ZMuTrackScaledNormalBack.width, presentation.PageLayout.width, FWTextTableCellRenderer.width(), FWFramedTextTableCellRenderer.width(), FWTableCellRendererBase.width(), ProcNormalize::Map.width, reco::CastorCluster.width(), DaqFakeReader.width, reco::CastorJet.width(), reco::CastorEgamma.width(), ProcLikelihood::SplinePDF.width, FWTextTreeCellRenderer.width(), SiStripMonitorCluster::ClusterProperties.width, FWGeometryTableManagerBase::ColorBoxRenderer.width(), DDDivision.width(), python.rootplot.utilities.Hist.width, TkAlMap.TkAlMap.width, dqmTnP::VoigtianPlusExponentialFitter.width, svgfig.Plot.width, svgfig.Frame.width, Vispa.Gui.VispaWidget.VispaWidget.width(), and svgfig.Dots.width.

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.drawBody().

408  def drawPortNames(self, painter):
409  """ Paints port names next to PortWidget.
410 
411  See setShowPortNames().
412  """
413  if not self._showPortNames:
414  return
415 
416  # factor should be 0.5, but text height is calculated to big
417  titleHeightFactor = 0.4
418 
419  if self._portNamesPosition == self.PORT_NAMES_NEXT_TO_PORTS:
420  for port in self.sinkPorts():
421  if port.titleField():
422  port.titleField().paint(painter, port.x() + self.getDistance('rightMargin') + port.width(), port.y() - titleHeightFactor * port.getDistance('titleFieldHeight'), self.scale())
423 
424  for port in self.sourcePorts():
425  if port.titleField():
426  #logging.debug(self.__class__.__name__ +": drawPortNames() - "+ port.name() +", "+ str(port.titleField()._autoscaleFlag))
427  port.titleField().paint(painter, port.x() - port.getDistance('titleFieldWidth') - self.getDistance('rightMargin'), port.y() - titleHeightFactor * port.getDistance('titleFieldHeight'), self.scale())
428  elif self._portNamesPosition == self.PORT_NAMES_ABOVE_PORTS:
429  painter.pen().setWidth(2)
430  for port in self.sinkPorts():
431  if port.titleField():
432  port.titleField().paint(painter, self.getDistance('firstSinkX'), port.y() - titleHeightFactor * port.getDistance('titleFieldHeight') - port.height(), self.scale())
433 
434  for port in self.sourcePorts():
435  if port.titleField():
436  #logging.debug(self.__class__.__name__ +": drawPortNames() - "+ port.name() +", "+ str(port.titleField()._autoscaleFlag))
437  port.titleField().paint(painter, self.width() - port.getDistance('titleFieldWidth')- port.width()*0.5, port.y() - titleHeightFactor * port.getDistance('titleFieldHeight') - port.height(), self.scale())
438  else:
439  logging.waring(self.__class__.__name__ +": drawPortNames() - "+ self.NO_VALID_PORT_NAMES_POSITION_MESSAGE)
440 
def paint(self, painter, event=None)
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.dropArea (   self,
  port 
)
A drop area is a QRect in which the ConnectableWidget accepts dropping of PortWidgets to create connections.

The area is greater than the port itself to make dropping easier.

Definition at line 460 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortNames, ValidateGeometry.getDistance(), and Vispa.Gui.VispaWidget.VispaWidget.getDistance().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.dropAreaPort().

460  def dropArea(self, port):
461  """ A drop area is a QRect in which the ConnectableWidget accepts dropping of PortWidgets to create connections.
462 
463  The area is greater than the port itself to make dropping easier.
464  """
465  if self._showPortNames:
466  return port.frameGeometry().united(port.titleField().getDrawRect())
467  topMargin = self.getDistance("topMargin")
468  topMarginHalf = 0.5 * topMargin
469  frameGeometry = port.frameGeometry()
470  return QRect(frameGeometry.x() - topMarginHalf,
471  frameGeometry.y() - topMarginHalf,
472  frameGeometry.width() + topMargin,
473  frameGeometry.height() + topMargin)
474 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.dropAreaPort (   self,
  position 
)
If a port's drop area is associated with position the port is returned.

If there is no drop area associated with the position None is returned.
See dropArea().

Definition at line 475 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports, edm.contains(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.dropArea().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.mousePressEvent().

475  def dropAreaPort(self, position):
476  """ If a port's drop area is associated with position the port is returned.
477 
478  If there is no drop area associated with the position None is returned.
479  See dropArea().
480  """
481  for port in self._ports:
482  if self.dropArea(port).contains(position):
483  return port
484  return None
485 
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
def Vispa.Gui.ConnectableWidget.ConnectableWidget.getEffectivePortHeight (   self,
  port 
)
Returns the bigger value of the source height and the height of the port name text field.

Definition at line 340 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._portNamesPosition, Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortNames, SiStripPI.max, CaloMeanResponse.scale, scaleGains.scale, CSCDBChipSpeedCorrection.scale(), CSCDBGains.scale(), CSCDBNoiseMatrix.scale(), LocalError.scale(), correctionValue_class.scale, DQMRivetClient::ScaleFactorOption.scale, DrawPlot.scale(), CaloSamples.scale(), python.rootplot.rootmath.Target.scale, heppy::Davismt2.scale, python.rootplot.tree2hists.RootTree.scale, reco::PattRecoPeak< Real >.scale(), MuonErrorMatrix.scale, and Vispa.Gui.VispaWidget.VispaWidget.scale().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.arrangePorts(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.getPortsHeight().

340  def getEffectivePortHeight(self, port):
341  """ Returns the bigger value of the source height and the height of the port name text field.
342  """
343  portHeight = port.height()
344  if not self._showPortNames:
345  return portHeight
346 
347  titleHeight = port.titleField().getHeight() * self.scale()
348 
349  if self._portNamesPosition == self.PORT_NAMES_NEXT_TO_PORTS:
350  return max(portHeight, titleHeight)
351  elif self._portNamesPosition == self.PORT_NAMES_ABOVE_PORTS:
352  return portHeight + titleHeight
353  logging.waring(self.__class__.__name__ +": getEffectivePortHeight() - "+ self.NO_VALID_PORT_NAMES_POSITION_MESSAGE)
354  return 0
355 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.getPortsHeight (   self,
  portType 
)
Returns height of all ports of given type.

portType can either be 'sink" or 'source'.

Definition at line 73 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget.getEffectivePortHeight(), Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPorts(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.sourcePorts().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.sizeHint().

73  def getPortsHeight(self, portType):
74  """ Returns height of all ports of given type.
75 
76  portType can either be 'sink" or 'source'.
77  """
78  if portType == "sink":
79  ports = self.sinkPorts()
80  elif portType == "source":
81  ports = self.sourcePorts()
82  else:
83  return 0
84 
85  if len(ports) > 1:
86  return ports[0].y() - ports[len(ports) -1].y() + 0.5 * self.getEffectivePortHeight(ports[len(ports) -1])
87  elif len(ports) == 1:
88  return self.getEffectivePortHeight(ports[0])
89  else:
90  return 0
91 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.leaveEvent (   self,
  event 
)

Definition at line 499 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._menuWidget, AlignableObjectId.geometry(), TrackingRecHitLessFromGlobalPosition.geometry, TkTransientTrackingRecHitBuilder.geometry(), CSCLayer.geometry(), SeedGeneratorForCRack.geometry, FastLineRecognition.geometry, SeedGeneratorForCosmics.geometry, cms::CosmicTrackFinder.geometry, EcalDeadCellTriggerPrimitiveFilter.geometry, CaloMiscalibMapEcal.geometry, ME0ReDigiProducer.geometry, HcalSimHitsValidation.geometry, EcalHitResponse.geometry(), HcalDigisValidation.geometry, EcalDeadCellDeltaRFilter.geometry, CosmicTrajectoryBuilder.geometry, HcalRecHitsValidation.geometry, HcalRecHitsAnalyzer.geometry, CRackTrajectoryBuilder.geometry, DetIdSelector.isSelected(), FWGUISubviewArea.isSelected(), FWEventItem::ModelInfo.isSelected(), SeedMultiplicityAnalyzer::FromTrackRefSeedFilter.isSelected(), Vispa.Gui.PortConnection.PointToPointConnection.isSelected(), Vispa.Gui.VispaWidget.VispaWidget.isSelected(), edm::ThinnedAssociationBranches.parent(), edmIntegrityCheck.PublishToFileSystem.parent, confdb.HLTProcess.parent, FSimVertex.parent(), reco::PattRecoNode< Cluster >.parent(), DDI::Division.parent(), math::GraphWalker< N, E >.parent(), GraphWalker< N, E >.parent(), math::GraphWalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), math::GraphWalker< DDLogicalPart, DDPosData * >.parent(), edm::ModuleCallingContext.parent(), DDLSAX2FileHandler.parent(), OpticalObject.parent(), edm::DocFormatHelper.parent(), FWPSetTableManager::PSetData.parent, emtf::Node.parent, EmDQMReco::FourVectorMonitorElements.parent, DDFilteredView.parent(), cms::DDFilteredView.parent(), DDExpandedView.parent(), DDDivision.parent(), options.HLTProcessOptions.parent, dqmservices::TriggerSelector::TreeElement.parent(), DDXMLElement.parent(), BeautifulSoup.PageElement.parent, globcontrol.parent, and Vispa.Views.LineDecayView.DecayObject.parent().

499  def leaveEvent(self, event):
500  #logging.debug("%s: leaveEvent()" % self.__class__.__name__)
501  parentCursorPos = self.parent().mapFromGlobal(self.cursor().pos())
502  bottomRight = self.geometry().bottomRight()
503  if ( (not self.isSelected() or (self._menuWidget and self._menuWidget.cursorHasEntered())) \
504  and (self._menuWidget and self.parent().childAt(parentCursorPos) != self._menuWidget) ) \
505  or (self._menuWidget and ( parentCursorPos.x() > bottomRight.x() or parentCursorPos.y() > bottomRight.y())):
506  self._menuWidget.hide()
507 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.mouseMoveEvent (   self,
  event 
)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.mousePressEvent (   self,
  event 
)
Makes sure event is forwarded to both base classes.

If position of event is within the dropArea of a port a QMouseEvent is sent to the port. See dropArea().

Definition at line 195 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget.dropAreaPort().

195  def mousePressEvent(self, event):
196  """ Makes sure event is forwarded to both base classes.
197 
198  If position of event is within the dropArea of a port a QMouseEvent is sent to the port. See dropArea().
199  """
200  dropAreaPort = self.dropAreaPort(event.pos())
201  if dropAreaPort and dropAreaPort.isDragable():
202  dropAreaPort.grabMouse()
203  newEvent = QMouseEvent(event.type(), dropAreaPort.mapFromParent(event.pos()), event.button(), event.buttons(), event.modifiers())
204  QCoreApplication.instance().sendEvent(dropAreaPort, newEvent)
205  else:
206  VispaWidgetOwner.mousePressEvent(self, event)
207  VispaWidget.mousePressEvent(self, event)
208 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.mouseReleaseEvent (   self,
  event 
)
Calls realeseMouse() to make sure the widget does not grab the mouse.

Necessary because ConnectableWidgetOwner.propagateEventUnderConnectionWidget() may call grabMouse() on this widget.

Definition at line 209 of file ConnectableWidget.py.

209  def mouseReleaseEvent(self, event):
210  """ Calls realeseMouse() to make sure the widget does not grab the mouse.
211 
212  Necessary because ConnectableWidgetOwner.propagateEventUnderConnectionWidget() may call grabMouse() on this widget.
213  """
214  #logging.debug(self.__class__.__name__ +": mouseReleaseEvent()")
215  self.releaseMouse()
216  VispaWidget.mouseReleaseEvent(self, event)
217 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.port (   self,
  name,
  type 
)
Returns port with given name and of given type.

Definition at line 312 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports.

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPort(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.sourcePort().

312  def port(self, name, type):
313  """ Returns port with given name and of given type.
314  """
315  if name == None:
316  return None
317  for port in self._ports:
318  if port.portType() == type and port.name() == name:
319  return port
320  return None
321 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.portExists (   self,
  name,
  description = None 
)

Definition at line 261 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports.

261  def portExists(self, name, description=None):
262  for port in self._ports:
263  if port.name() == name and port.description() == description:
264  return True
265  return False
266 
def portExists(self, name, description=None)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.ports (   self)
Returns list containing all source and sink port widgets.

Definition at line 218 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports.

218  def ports(self):
219  """ Returns list containing all source and sink port widgets.
220  """
221  return self._ports
222 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget (   self)

Definition at line 530 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._menuWidget, Vispa.Gui.VispaWidget.VispaWidget.getDistance(), SiStripPI.max, edmIntegrityCheck.PublishToFileSystem.parent, edm::ThinnedAssociationBranches.parent(), confdb.HLTProcess.parent, reco::PattRecoNode< Cluster >.parent(), FSimVertex.parent(), DDI::Division.parent(), math::GraphWalker< N, E >.parent(), math::GraphWalker< ReferenceCountingPointer, ReferenceCountingPointer >.parent(), math::GraphWalker< DDLogicalPart, DDPosData * >.parent(), GraphWalker< N, E >.parent(), edm::ModuleCallingContext.parent(), DDLSAX2FileHandler.parent(), OpticalObject.parent(), emtf::Node.parent, edm::DocFormatHelper.parent(), FWPSetTableManager::PSetData.parent, EmDQMReco::FourVectorMonitorElements.parent, DDFilteredView.parent(), cms::DDFilteredView.parent(), DDExpandedView.parent(), DDDivision.parent(), options.HLTProcessOptions.parent, dqmservices::TriggerSelector::TreeElement.parent(), BeautifulSoup.PageElement.parent, DDXMLElement.parent(), globcontrol.parent, Vispa.Views.LineDecayView.DecayObject.parent(), TmModule.width, Random_struct.width, OpenBounds.width(), SimpleDiskBounds.width(), RectangularPlaneBounds.width(), funct::GammaZInterference.width, GeneralNSurfaceDelimitedBounds.width(), PhysicsTools::Calibration::Range< Axis_t >.width(), SimpleCylinderBounds.width(), funct::BreitWigner.width, DDTIDAxialCableAlgo.width, Bounds.width(), DDTECAxialCableAlgo.width, TrapezoidalPlaneBounds.width(), reco::CastorJetID.width, AlignableSurface.width(), DDI::Division.width(), FWCheckedTextTableCellRenderer.width(), FWColumnLabelCellRenderer.width(), function::ZMuStandaloneFunction.width, function::ZMuMuFunction.width, btag::SimpleMatrix< T >.width, function::ZMuMuScaledFunction.width, function::ZMuTrackFunction.width, FWCollectionSummaryModelCellRenderer.width(), function::ZMuStandaloneScaledFunction.width, function::ZMuTrackScaledFunction.width, SimpleConeBounds.width(), function::ZMuTrackScaledNormalBack.width, presentation.PageLayout.width, FWFramedTextTableCellRenderer.width(), FWTextTableCellRenderer.width(), FWTableCellRendererBase.width(), ProcNormalize::Map.width, reco::CastorCluster.width(), DaqFakeReader.width, reco::CastorEgamma.width(), reco::CastorJet.width(), ProcLikelihood::SplinePDF.width, FWTextTreeCellRenderer.width(), SiStripMonitorCluster::ClusterProperties.width, FWGeometryTableManagerBase::ColorBoxRenderer.width(), DDDivision.width(), python.rootplot.utilities.Hist.width, TkAlMap.TkAlMap.width, dqmTnP::VoigtianPlusExponentialFitter.width, svgfig.Plot.width, svgfig.Frame.width, Vispa.Gui.VispaWidget.VispaWidget.width(), svgfig.Dots.width, Quad.x, reco::MuonRPCHitMatch.x, RPFlatParams::EP.x, stAPVGain.x, gen::PdfInfo.x, EnergyDepositUnit.x(), MadKinematicDescriptor.x, AmplitudeSegmentFP420.x(), TwoBodyDecayParameters.x, TkLayerMap::XYbin.x, ScoutingVertex.x(), SignalPoint.x(), SimplePixel.x, reco::MuonChamberMatch.x, EnergySegmentFP420.x(), lumiregperbunch.bsmeas.x, reco::MuonMETCorrectionData.x(), Geom::Polar2Cartesian< T >.x(), SiStripFineDelayTOF.x(), HFShowerPhoton.x(), PixelClusterizerBase::AccretionCluster.x, ME0DigiPreReco.x(), CTPPSTimingLocalTrack.x, online::BeamSpot_v1.x, BinomialProbHelper.x(), HGCal_helpers::Coordinates.x, EcalTBHodoscopeRecInfoAlgo::BeamTrack.x, LHCInterpolatedOpticalFunctionsSet::Kinematics.x, Phase2ITPixelCluster::Pixel.x, FTLCluster::FTLHit.x(), reco::MuonSegmentMatch.x, BeamSpotFakeConditions.x, SiPixelCluster::Pixel.x, PhiInterval.x, ClusterShape.x, BSvsPVHistogramMaker.x(), RHStopTracer::StopPoint.x, TotemTestHistoClass::Hit.x, PGlobalSimHit::Vtx.x, VertexType.x, MTDHit.x, MTDClusterizerBase::AccretionCluster.x, egPM::AbsEtaNrClus.x, PV2DBase< T, PVType, FrameType >.x(), PV2DBase< float, PointTag, LocalTag >.x(), PV2DBase< T, VectorTag, FrameTag >.x(), PV2DBase< float, VectorTag, GlobalTag >.x(), PV2DBase< T, PointTag, FrameTag >.x(), PV2DBase< double, PointTag, LocalTag >.x(), Point2DBase< Scalar, LocalTag >.x(), Point2DBase< U, FrameTag >.x(), Vector2DBase< U, FrameTag >.x(), Point2DBase< T, Frame >.x(), Vector2DBase< U, Frame >.x(), Vector2DBase< T, Frame >.x(), Point2DBase< U, Frame >.x(), Point2DBase< T, FrameTag >.x(), Vector2DBase< T, FrameTag >.x(), mathSSE::Rot3< T >.x(), mathSSE::Rot3< Scalar >.x(), mathSSE::Rot3< double >.x(), mathSSE::Rot3< float >.x(), mathSSE::Rot3< align::Scalar >.x(), HcalForwardAnalysis::Photon.x, Geom::Cylindrical2Cartesian< T >.x(), ParabolaFit::Point.x, BeamSpotOnline.x(), RooCMSShape.x, MuScleFitMuon.x(), HGCalRecHitValidation::HitsInfo.x, Pixinfo.x, egPM::AbsEtaNrClusPhi.x, funct::GaussLegendreIntegrator.x, QcdLowPtDQM::Pixel.x(), reco::CastorCell.x(), Hit.x, PV3DBase< T, PVType, FrameType >.x(), DigitizerUtility::EnergyDepositUnit.x(), PV3DBase< float, VectorTag, LocalTag >.x(), PV3DBase< Scalar, VectorTag, GlobalTag >.x(), PV3DBase< T, VectorTag, FrameTag >.x(), PV3DBase< T, PointTag, FrameTag >.x(), Point3DBase< Scalar, LocalTag >.x(), Point3DBase< U, LocalTag >.x(), Vector3DBase< U, LocalTag >.x(), Point3DBase< U, GlobalTag >.x(), Vector3DBase< U, GlobalTag >.x(), Point3DBase< U, FrameTag >.x(), Vector3DBase< U, FrameTag >.x(), Point3DBase< T, Frame >.x(), Vector3DBase< U, Frame >.x(), Vector3DBase< T, Frame >.x(), Point3DBase< U, Frame >.x(), Vector3DBase< T, FrameTag >.x(), MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.x, Basic2DVector< Scalar >.x(), Basic2DVector< double >.x(), Basic2DVector< float >.x(), Basic2DVector< U >.x(), HGCalDigiValidation::digiInfo.x, Basic2DVector< T >.x(), HGCalSimHitValidation::hitsinfo.x, PixelModule.x, Clust.x, l1t::emtf::AMC13Header.x, reco::BeamSpot.x(), python.rootplot.utilities.Hist2D.x, Geom::Spherical2Cartesian< T >.x(), egPM::AbsEtaNrClusEt.x, VertexClassifier::GeneratedPrimaryVertex.x, PixelUnpackingRegions::Module.x, Rechit.x, reco::CastorEgamma.x(), reco::CastorJet.x(), HcalForwardAnalysis.x, Basic3DVector< long double >.x(), PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.x, hit.x, DigitizerUtility::SignalPoint.x(), Geom::Cartesian2Cartesian3D< T >.x(), QcdLowPtDQM::Vertex.x(), Basic3DVector< Scalar >.x(), Basic3DVector< float >.x(), Basic3DVector< align::Scalar >.x(), Basic3DVector< U >.x(), Basic3DVector< float > constituentCentre Basic3DVector< float >.x(), Basic3DVector< double >.x(), Basic3DVector< T >.x(), reco::CastorCluster.x(), Phase2ITPixelCluster.x(), RecHitsSortedInPhi.x, SiPixelCluster.x(), GaussianSumUtilities1D::FinderState.x, XHistogram::position.x, FTLCluster.x(), SiStripRecHitsValid::RecHitProperties.x, reco::Vertex.x(), TrackClassifier::GeneratedPrimaryVertex.x, funct::GaussIntegrator.x, PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.x, mathSSE::Rot2< T >.x(), mathSSE::Rot2< Scalar >.x(), CTPPSLocalTrackLite.x, MuonGeometryArrange::MGACollection.x, python.rootplot.utilities.Hist.x, SOAFrame< T >.x(), HGCalCLUEAlgo::Hexel.x, reco::CaloCluster.x(), EPOS::EPOS_Wrapper.x(), BeamSpotOnlineRaw_v4.x, HGCalImagingAlgo::Hexel.x, HitDoublets.x(), lhef::HEPEUP::FiveVector.x, RawParticle.x(), MuScleFitUtils.x, SiPixelDigitizerAlgorithm::EnergyDepositUnit.x(), Rot3< T >.x(), Rot3< Scalar >.x(), Rot3< double >.x(), Rot3< float >.x(), Rot3< align::Scalar >.x(), SiStripTrackingRecHitsValid::RecHitProperties.x, SiPixelDigitizerAlgorithm::SignalPoint.x(), perftools::detail::Hist.x, TkRotation< Scalar >.x(), TkRotation< double >.x(), TkRotation< float >.x(), TkRotation< align::Scalar >.x(), TkRotation< U >.x(), TkRotation< T >.x(), hitfit::Fourvec_Event.x(), Rot2< T >.x(), Rot2< Scalar >.x(), TkRotation2D< Scalar >.x(), TkRotation2D< T >.x(), PDF.x, edmStreamStallGrapher.Point.x, svgfig.Plot.x, svgfig.Frame.x, Vispa.Views.LineDecayView.DecayNode.x(), PMuonSimHit::Vtx.x, PTrackerSimHit::Vtx.x, svgfig.Text.x, svgfig.TextGlobal.x, svgfig.VLine.x, Quad.y, RPFlatParams::EP.y, stAPVGain.y, EnergyDepositUnit.y(), TwoBodyDecayParameters.y, TkLayerMap::XYbin.y, AmplitudeSegmentFP420.y(), MadKinematicDescriptor.y, SignalPoint.y(), SimplePixel.y, ScoutingVertex.y(), reco::MuonChamberMatch.y, RPCCluster.y(), lumiregperbunch.bsmeas.y, EnergySegmentFP420.y(), reco::MuonMETCorrectionData.y(), Geom::Polar2Cartesian< T >.y(), SiStripFineDelayTOF.y(), HFShowerPhoton.y(), PixelClusterizerBase::AccretionCluster.y, ME0DigiPreReco.y(), CTPPSTimingLocalTrack.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, Phase2ITPixelCluster::Pixel.y, FTLCluster::FTLHit.y(), LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, BeamSpotFakeConditions.y, SiPixelCluster::Pixel.y, PhiInterval.y, ClusterShape.y, BSvsPVHistogramMaker.y(), RHStopTracer::StopPoint.y, TotemTestHistoClass::Hit.y, PGlobalSimHit::Vtx.y, VertexType.y, MTDHit.y, MTDClusterizerBase::AccretionCluster.y, egPM::AbsEtaNrClus.y, Vector2DBase< U, Frame >.y(), PV2DBase< T, VectorTag, FrameTag >.y(), PV2DBase< T, PVType, FrameType >.y(), Vector2DBase< T, Frame >.y(), Point2DBase< T, Frame >.y(), Point2DBase< Scalar, LocalTag >.y(), Vector2DBase< T, FrameTag >.y(), PV2DBase< float, VectorTag, GlobalTag >.y(), Vector2DBase< U, FrameTag >.y(), Point2DBase< U, FrameTag >.y(), Point2DBase< U, Frame >.y(), PV2DBase< double, PointTag, LocalTag >.y(), PV2DBase< float, PointTag, LocalTag >.y(), Point2DBase< T, FrameTag >.y(), PV2DBase< T, PointTag, FrameTag >.y(), mathSSE::Rot3< float >.y(), mathSSE::Rot3< T >.y(), mathSSE::Rot3< align::Scalar >.y(), mathSSE::Rot3< double >.y(), mathSSE::Rot3< Scalar >.y(), HcalForwardAnalysis::Photon.y, Geom::Cylindrical2Cartesian< T >.y(), ParabolaFit::Point.y, BeamSpotOnline.y(), MuScleFitMuon.y(), HGCalRecHitValidation::HitsInfo.y, Pixinfo.y, egPM::AbsEtaNrClusPhi.y, QcdLowPtDQM::Pixel.y(), Hit.y, reco::CastorCell.y(), Point3DBase< Scalar, LocalTag >.y(), PV3DBase< T, PointTag, FrameTag >.y(), MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, Vector3DBase< U, GlobalTag >.y(), Vector3DBase< U, Frame >.y(), Vector3DBase< U, LocalTag >.y(), PV3DBase< T, PVType, FrameType >.y(), Vector3DBase< U, FrameTag >.y(), Point3DBase< U, LocalTag >.y(), Point3DBase< U, Frame >.y(), Vector3DBase< T, Frame >.y(), Point3DBase< T, Frame >.y(), PV3DBase< Scalar, VectorTag, GlobalTag >.y(), Vector3DBase< T, FrameTag >.y(), PV3DBase< float, VectorTag, LocalTag >.y(), DigitizerUtility::EnergyDepositUnit.y(), Point3DBase< U, GlobalTag >.y(), Point3DBase< U, FrameTag >.y(), PV3DBase< T, VectorTag, FrameTag >.y(), HGCalDigiValidation::digiInfo.y, Basic2DVector< float >.y(), Basic2DVector< Scalar >.y(), Basic2DVector< double >.y(), Basic2DVector< U >.y(), Basic2DVector< T >.y(), HGCalSimHitValidation::hitsinfo.y, PixelModule.y, Clust.y, reco::BeamSpot.y(), Geom::Spherical2Cartesian< T >.y(), python.rootplot.utilities.Hist2D.y, egPM::AbsEtaNrClusEt.y, VertexClassifier::GeneratedPrimaryVertex.y, PixelUnpackingRegions::Module.y, Rechit.y, reco::CastorEgamma.y(), reco::CastorJet.y(), HcalForwardAnalysis.y, PrimaryVertexAnalyzer4PUSlimmed::simPrimaryVertex.y, hit.y, Basic3DVector< long double >.y(), DigitizerUtility::SignalPoint.y(), Geom::Cartesian2Cartesian3D< T >.y(), QcdLowPtDQM::Vertex.y(), Basic3DVector< align::Scalar >.y(), Basic3DVector< float > constituentCentre Basic3DVector< float >.y(), Basic3DVector< U >.y(), Basic3DVector< T >.y(), Basic3DVector< float >.y(), Basic3DVector< double >.y(), Basic3DVector< Scalar >.y(), reco::CastorCluster.y(), RecHitsSortedInPhi.y, GaussianSumUtilities1D::FinderState.y, reco::Candidate.y(), XHistogram::position.y, Phase2ITPixelCluster.y(), SiStripRecHitsValid::RecHitProperties.y, TrackClassifier::GeneratedPrimaryVertex.y, contrib::CMSBoostedTauSeedingAlgorithmStructure.y(), SiPixelCluster.y(), reco::Vertex.y(), FTLCluster.y(), reco::Particle.y(), PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.y, reco::ParticleState.y(), mathSSE::Rot2< T >.y(), mathSSE::Rot2< Scalar >.y(), MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, HGCalClusterT< C >.y(), reco::LeafCandidate.y(), CandidateWithRef< Ref >.y(), SOAFrame< T >.y(), python.rootplot.root2matplotlib.Hist.y, CaloParticle.y(), UrbanMscModel93.y, HGCalCLUEAlgo::Hexel.y, SimCluster.y(), EPOS::EPOS_Wrapper.y(), reco::CaloCluster.y(), BeamSpotOnlineRaw_v4.y, HGCalImagingAlgo::Hexel.y, HitDoublets.y(), RawParticle.y(), TrackingParticle.y(), pat::PackedGenParticle.y(), SiPixelDigitizerAlgorithm::EnergyDepositUnit.y(), Rot3< double >.y(), Rot3< T >.y(), Rot3< float >.y(), Rot3< align::Scalar >.y(), Rot3< Scalar >.y(), SiStripTrackingRecHitsValid::RecHitProperties.y, SiPixelDigitizerAlgorithm::SignalPoint.y(), TkRotation< T >.y(), TkRotation< U >.y(), TkRotation< align::Scalar >.y(), TkRotation< double >.y(), Exhume::CrossSection.y, TkRotation< float >.y(), TkRotation< Scalar >.y(), Rot2< Scalar >.y(), Rot2< T >.y(), TkRotation2D< T >.y(), TkRotation2D< Scalar >.y(), edmStreamStallGrapher.Point.y, pat::PackedCandidate.y(), svgfig.Plot.y, svgfig.Frame.y, Vispa.Views.LineDecayView.DecayNode.y(), PMuonSimHit::Vtx.y, svgfig.Curve.Sample.y, PTrackerSimHit::Vtx.y, svgfig.Text.y, svgfig.TextGlobal.y, and svgfig.HLine.y.

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.dragWidget(), Vispa.Gui.WidgetContainer.WidgetContainer.mouseMoveEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget.mouseMoveEvent(), and Vispa.Views.LineDecayView.LineDecayContainer.mouseMoveEvent().

531  if self._menuWidget:
532  headerOffset = 0
533  if isinstance(self.parent(), VispaWidget):
534  headerOffset = self.parent().getDistance("titleFieldBottom")
535  self._menuWidget.move(max(0, self.x() - 0.5* (self._menuWidget.width() - self.width())),
536  max(0, headerOffset, self.y() - self._menuWidget.height() +1))
537 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.rearangeContent (   self)
Arranges ports after content is rearranged by VispaWidget.

Definition at line 356 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget.arrangePorts().

Referenced by Vispa.Gui.VispaWidget.VispaWidget.defineDistances(), and Vispa.Gui.VispaWidget.VispaWidget.showEvent().

356  def rearangeContent(self):
357  """ Arranges ports after content is rearranged by VispaWidget.
358  """
359  VispaWidget.rearangeContent(self)
360  self.arrangePorts() # has to be after rearangeContent(), prevents infinite loop (..getDistance())
361 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.removeMenu (   self)

Definition at line 524 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._menuWidget.

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.deleteLater(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.removeMenuEntry().

524  def removeMenu(self):
525  self._menuWidget.hide()
526  self._menuWidget.setParent(None)
527  self._menuWidget.deleteLater()
528  self._menuWidget = None
529 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.removeMenuEntry (   self,
  entry 
)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.removePort (   self,
  port 
)
Removes given port if it is port of this widget.

Definition at line 251 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports, and Vispa.Gui.VispaWidget.VispaWidget.scheduleRearangeContent().

251  def removePort(self, port):
252  """ Removes given port if it is port of this widget.
253  """
254  if port in self._ports:
255  port.deleteAttachedConnections()
256  self._ports.remove(port)
257  port.setParent(None)
258  port.deleteLater()
260 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.removePorts (   self,
  filter = None 
)
Remove registered ports.

If filter is "sink" only sinks are removed, if it is "source" only sources are removed, otherwise all ports are removed.

Definition at line 267 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports, Vispa.Gui.VispaWidget.VispaWidget.scheduleRearangeContent(), DDDWorldObserver< Event >.update(), KillSecondariesRunAction.update(), KillSecondariesTrackAction.update(), ECALPFSeedCleaner.update(), SaveSimTrack.update(), PTStatistics.update(), PrintTrackNumberAction.update(), GenericMVAComputerCache.update(), Basic2DGenericPFlowClusterizer.update(), PFMultiDepthClusterizer.update(), reco::KalmanGhostTrackUpdater.update(), DDG4ProductionCuts.update(), VertexTrackUpdator< N >.update(), DummyVertexTrackUpdator< N >.update(), FastFedCablingTask.update(), TrajectoryStateUpdator.update(), PFlow2DClusterizerWithTime.update(), RecHitTopologicalCleanerBase.update(), LagrangeChildUpdator.update(), ApvTimingTask.update(), ErrorCorrelation.update(), FedTimingTask.update(), VpspScanTask.update(), MSLayersAtAngle.update(), AlignableDet.update(), NoiseHistosUsingDb.update(), OptoScanHistosUsingDb.update(), PedestalsHistosUsingDb.update(), PedsFullNoiseHistosUsingDb.update(), PedsOnlyHistosUsingDb.update(), VpspScanHistosUsingDb.update(), PrintSensitive.update(), GsfMultiStateUpdator.update(), ApvTimingHistosUsingDb.update(), PedestalsTask.update(), OptoScanTask.update(), DaqScopeModeHistosUsingDb.update(), MonopoleSteppingAction.update(), CalibrationScanTask.update(), FineDelayTask.update(), LatencyTask.update(), FastFedCablingHistosUsingDb.update(), CalibrationTask.update(), SCRegressionCalculator< VarCalc >.update(), edm::SubProcessParentageHelper.update(), PFClusterEnergyCorrectorBase.update(), PFCPositionCalculatorBase.update(), AlignableDetUnit.update(), RHStopTracer.update(), FedCablingTask.update(), KFStrip1DUpdator.update(), LatencyHistosUsingDb.update(), cond::persistency::ITagTable.update(), CheckOverlap.update(), TkPhase2OTMeasurementDet.update(), NoiseTask.update(), PedsOnlyTask.update(), TkPixelMeasurementDet.update(), CountProcessesAction.update(), PrintGeomInfoAction.update(), PrintGeomSummary.update(), CalibrationHistosUsingDb.update(), FineDelayHistosUsingDb.update(), ChildUpdator.update(), PrintMaterialBudgetInfo.update(), BaselinePFSCRegression.update(), progressbar.Widget.update(), PedsFullNoiseTask.update(), PhysicsTools::MVAComputerCache.update(), KFSwitching1DUpdator.update(), AlignableCSCChamber.update(), KinematicConstrainedVertexUpdator.update(), HGCScintSD.update(), StoreSecondary.update(), cond::persistency::GLOBAL_TAG::Table.update(), MaterialBudgetHcal.update(), HFNoseSD.update(), HGCalSD.update(), FastTimerSD.update(), edm::RunningAverage.update(), DaqScopeModeTask.update(), HGCalTBMB.update(), BinomialProbability.update(), Observer< const T * >.update(), Observer< T >.update(), Observer< const BeginOfRun * >.update(), Observer< const DDDWorld * >.update(), Observer< const G4Step * >.update(), Observer< const EndOfEvent * >.update(), Observer< const BeginOfTrack * >.update(), Observer< const EndOfJob * >.update(), Observer< const EndOfTrack * >.update(), Observer< const BeginOfJob * >.update(), Observer< const Event * >.update(), AlignableTracker.update(), Observer< const EndOfRun * >.update(), Observer< const BeginOfEvent * >.update(), GflashG4Watcher.update(), pathelpers::Record.update(), MuonServiceProxy.update(), PFClusterBuilderBase.update(), HGCSD.update(), cond::persistency::TAG::Table.update(), edm::storage::StatisticsSenderService::FileStatistics.update(), funct::Master< F >.update(), MaterialBudgetForward.update(), KFUpdator.update(), MaterialBudget.update(), RealisticSimClusterMapper.update(), CaloTrkProcessing.update(), CheckSecondary.update(), AlignableComposite.update(), SimG4FluxProducer.update(), ECAL2DPositionCalcWithDepthCorr.update(), KalmanVertexTrackUpdator< 5 >.update(), KalmanVertexTrackUpdator< N >.update(), EcalSimHitsValidProducer.update(), TrackingMaterialProducer.update(), HcalTestAnalysis.update(), FWJobMetadataManager.update(), TrackingVerboseAction.update(), L1TMuonBarrelKalmanAlgo.update(), PhysicsTools::TreeReader.update(), SiTrackerMultiRecHitUpdator.update(), BasicMultiTrajectoryState.update(), MaterialBudgetAction.update(), SingleParticleEvent.update(), KalmanVertexUpdator< 5 >.update(), pos::PixelConfig.update(), reco::GhostTrackFitter::PredictionUpdater.update(), KalmanVertexUpdator< N >.update(), edm::service::CondorStatusService.update(), AlignableMuon.update(), SiStripPartition.update(), fwlite::RecordWriter.update(), MuonTrajectoryUpdator.update(), SiStripConfObject.update(), fastsim::Geometry.update(), FWParameterSetterBase.update(), TimingSD.update(), HCalSD.update(), HGCPassive.update(), FiberSD.update(), progressbar.Timer.update(), TotemTestGem.update(), SimG4HcalValidation.update(), MuonSensitiveDetector.update(), simwatcher::BeginOfTrackCounter.update(), HcaluLUTTPGCoder.update(), TkAccumulatingSensitiveDetector.update(), MuonUpdatorAtVertex.update(), Alignable.update(), KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >.update(), DQMOldReceiver.update(), HcalTB02Analysis.update(), LaserAlignmentSimulation.update(), TotemSD.update(), sim_act::Signaler< EndOfEvent >.update(), CaloSteppingAction.update(), sim_act::Signaler< BeginOfTrack >.update(), sim_act::Signaler< BeginOfJob >.update(), sim_act::Signaler< DDDWorld >.update(), sim_act::Signaler< BeginOfRun >.update(), sim_act::Signaler< T >.update(), ApvAnalysisFactory.update(), sim_act::Signaler< G4Step >.update(), sim_act::Signaler< EndOfRun >.update(), sim_act::Signaler< EndOfTrack >.update(), sim_act::Signaler< BeginOfEvent >.update(), SimTracer.update(), progressbar.WidgetHFill.update(), HcalForwardAnalysis.update(), DTSegmentUpdator.update(), FP420SD.update(), DTVDriftCalibration::cellInfo.update(), DAClusterizerInZ.update(), sistrip::RawToDigiUnpacker.update(), HcalTB04Analysis.update(), SimG4HGCalValidation.update(), DoCastorAnalysis.update(), ZdcTestAnalysis.update(), CastorTestAnalysis.update(), PhysicsTools::TreeReader::Value.update(), EcalTBH4Trigger.update(), BetafuncEvtVtxGenerator.update(), CaloSD.update(), InitialClusteringStepBase.update(), cond::persistency::IPayloadMigrationTable.update(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.update(), HLTScalersClient::CountLSFifo_t.update(), progressbar.Bar.update(), DynamicTruncation.update(), jsoncollector::IntJ.update(), edm::service::SimpleMemoryCheck.update(), PFECALSuperClusterAlgo.update(), edm::BMixingModule.update(), evf::FastMonitoringService::Encoding.update(), progressbar.BouncingBar.update(), GaussianSumUtilities1D.update(), CastorShowerLibraryMaker.update(), cond::persistency::IGTTable.update(), DTRecSegment2D.update(), MonitorElement.update(), StandAloneMuonFilter.update(), jsoncollector::DoubleJ.update(), FWPSetTableManager.update(), DQMNet::Peer.update, G4StepStatistics.update(), TrajectoryStateOnSurface.update(), progressbar.FormatLabel.update(), DQMNet::AutoPeer.update, FWLiteESRecordWriterAnalyzer.update(), CommissioningTask.update(), FP420Test.update(), StMeasurementDetSet.update(), DAClusterizerInZ_vect.update(), Folder.update(), BscTest.update(), jsoncollector::StringJ.update(), dqm-mbProfile.Profile.update(), DAClusterizerInZT_vect.update(), jsoncollector::HistoJ< unsigned int >.update(), jsoncollector::HistoJ< T >.update(), BasicTrajectoryState.update(), progressbar.ProgressBar.update(), PxMeasurementDetSet.update(), Phase2OTMeasurementDetSet.update(), edmStreamStallGrapher.Stack.update(), crabFunctions.CrabTask.update(), edmNew::DetSetVector< T >.update(), DetSetVector< SiStripCluster >.update(), const_iterator.update(), DetSetVector< T >.update(), DetSetVector< ClusterType >.update(), and DetSetVector< SiPixelCluster >.update().

267  def removePorts(self, filter=None):
268  """ Remove registered ports.
269 
270  If filter is "sink" only sinks are removed, if it is "source" only sources are removed, otherwise all ports are removed.
271  """
272  if filter and (filter != "sink" and filter != "source"):
273  filter = None
274 
275  parentIsWidgetOwner = False
276  ports = self._ports[:]
277  for port in ports:
278  if not filter or port.portType() == filter:
279  port.deleteAttachedConnections()
280  self._ports.remove(port)
281  port.setParent(None)
282  port.deleteLater()
284  self.update()
285 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.setPortNamesPosition (   self,
  position 
)
Sets position where port names will be shown.

Possible values are self.PORT_NAMES_NEXT_TO_PORTS and self.PORT_NAMES_ABOVE_PORTS.

Definition at line 58 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._portNamesPosition.

58  def setPortNamesPosition(self, position):
59  """ Sets position where port names will be shown.
60 
61  Possible values are self.PORT_NAMES_NEXT_TO_PORTS and self.PORT_NAMES_ABOVE_PORTS.
62  """
63  self._portNamesPosition = position
64 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.setShowPortLines (   self,
  show 
)
If True lines from all ports to a specific target point are drawn.

The target point is defined by PORT_LINES_TARGET_X and PORT_LINES_TARGET_Y.
If both of these values are -1 the target point is set to the widget's centre.

Definition at line 65 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortLines.

65  def setShowPortLines(self, show):
66  """ If True lines from all ports to a specific target point are drawn.
67 
68  The target point is defined by PORT_LINES_TARGET_X and PORT_LINES_TARGET_Y.
69  If both of these values are -1 the target point is set to the widget's centre.
70  """
71  self._showPortLines = show
72 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.setShowPortNames (   self,
  show 
)
If True the port name's will be drawn.

The port names wont be on the port itself.
Instead they will appear next to the port icons on the ConnectableWidget.

Definition at line 50 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortNames.

50  def setShowPortNames(self, show):
51  """ If True the port name's will be drawn.
52 
53  The port names wont be on the port itself.
54  Instead they will appear next to the port icons on the ConnectableWidget.
55  """
56  self._showPortNames = show
57 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.setZoom (   self,
  zoom 
)
Arranges ports when zoom has changed.

Definition at line 189 of file ConnectableWidget.py.

Referenced by Vispa.Gui.Zoomable.Zoomable.decrementZoom(), Vispa.Gui.Zoomable.Zoomable.incrementZoom(), Vispa.Main.TabController.TabController.zoomAll(), Vispa.Main.TabController.TabController.zoomDialog(), Vispa.Main.TabController.TabController.zoomHundred(), and Vispa.Main.TabController.TabController.zoomUser().

189  def setZoom(self, zoom):
190  """ Arranges ports when zoom has changed.
191  """
192  VispaWidget.setZoom(self, zoom)
193  #self.arrangePorts()
194 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPort (   self,
  name 
)
Returns sink port with given name or None if no such port is found.

Definition at line 302 of file ConnectableWidget.py.

References DTCtcp.port, EcalTPGParamReaderFromDB.port, EcalDBConnection.port, DQMNet::AutoPeer.port, and Vispa.Gui.ConnectableWidget.ConnectableWidget.port().

302  def sinkPort(self, name):
303  """ Returns sink port with given name or None if no such port is found.
304  """
305  return self.port(name, 'sink')
306 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPorts (   self)
Returns list of all sink ports set.

Definition at line 286 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports, ALCARECOTkAlBeamHalo_cff.filter, and list().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxPortTitleWidth(), Vispa.Gui.ConnectableWidget.ConnectableWidget.defineDistances(), Vispa.Gui.ConnectableWidget.ConnectableWidget.drawPortNames(), Vispa.Gui.ConnectableWidget.ConnectableWidget.getPortsHeight(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.sizeHint().

286  def sinkPorts(self):
287  """ Returns list of all sink ports set.
288  """
289  return [port for port in self._ports if port.portType() == "sink"]
290  def isSink(port):
291  return port.portType() == 'sink'
292  return list(filter(isSink, self._ports))
293 
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def Vispa.Gui.ConnectableWidget.ConnectableWidget.sizeHint (   self)
Returns size needed to draw widget's content.

Definition at line 92 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxSinkTitleWidth(), Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxSourceTitleWidth(), Vispa.Gui.ConnectableWidget.ConnectableWidget._portNamesPosition, Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortNames, Vispa.Gui.ConnectableWidget.ConnectableWidget.arrangePorts(), ValidateGeometry.getDistance(), Vispa.Gui.VispaWidget.VispaWidget.getDistance(), Vispa.Gui.ConnectableWidget.ConnectableWidget.getPortsHeight(), Vispa.Gui.VispaWidget.VispaWidget.imageSizeF(), SiStripPI.max, CaloMeanResponse.scale, CSCDBNoiseMatrix.scale(), CSCDBChipSpeedCorrection.scale(), CSCDBGains.scale(), scaleGains.scale, LocalError.scale(), correctionValue_class.scale, DQMRivetClient::ScaleFactorOption.scale, DrawPlot.scale(), CaloSamples.scale(), python.rootplot.rootmath.Target.scale, heppy::Davismt2.scale, python.rootplot.tree2hists.RootTree.scale, reco::PattRecoPeak< Real >.scale(), MuonErrorMatrix.scale, Vispa.Gui.VispaWidget.VispaWidget.scale(), Vispa.Gui.ConnectableWidget.ConnectableWidget.sinkPorts(), Vispa.Gui.ConnectableWidget.ConnectableWidget.sourcePorts(), Vispa.Gui.VispaWidget.VispaWidget.textField(), Vispa.Gui.VispaWidget.VispaWidget.textFieldIsSet(), and Vispa.Gui.VispaWidget.VispaWidget.titleIsSet().

Referenced by Vispa.Gui.VispaWidget.VispaWidget.autosize().

92  def sizeHint(self):
93  """ Returns size needed to draw widget's content.
94  """
95  #logging.debug(self.__class__.__name__ + ": sizeHint()")
96  # arrangePorts() needed because it will be called in rearnangeContent() after sizeHint()
97  self.arrangePorts()
98 
99  neededWidth = self.getDistance('leftMargin', 1) + self.getDistance('rightMargin', 1)
100  neededHeight = self.getDistance('topMargin', 1) + self.getDistance('bottomMargin', 1)
101  imageSizeF = self.imageSizeF()
102 
103  # width
104  titleWidth = 0
105  if self.titleIsSet():
106  titleWidth = self.getDistance('titleFieldWidth', 1)
107 
108  bodyWidth = 0
109  sinkPortsWidth = 0
110  sourcePortsWidth = 0
111  if len(self.sinkPorts()) > 0:
112  sinkPortsWidth = self.getDistance('leftMargin', 1) + PortWidget.WIDTH
113  if len(self.sourcePorts()) > 0:
114  sourcePortsWidth = self.getDistance('rightMargin', 1) + PortWidget.WIDTH
115 
116  if self._showPortNames:
117  maxSinkTitleWidth = self._getMaxSinkTitleWidth()
118  maxSourceTitleWidth = self._getMaxSourceTitleWidth()
119  if self._portNamesPosition == self.PORT_NAMES_NEXT_TO_PORTS:
120  bodyWidth += maxSinkTitleWidth + self.getDistance('rightMargin', 1) + maxSourceTitleWidth
121  elif self._portNamesPosition == self.PORT_NAMES_ABOVE_PORTS:
122  if maxSinkTitleWidth > PortWidget.WIDTH:
123  sinkPortsWidth = 0#self.getDistance('leftMargin', 1)
124  if maxSourceTitleWidth > PortWidget.WIDTH:
125  sourcePortsWidth = 0#self.getDistance('rightMargin', 1)
126  #bodyWidth += maxSinkTitleWidth + self.getDistance('rightMargin', 1) + maxSourceTitleWidth
127  bodyWidth += maxSinkTitleWidth + maxSourceTitleWidth
128  else:
129  logging.waring(self.__class__.__name__ +": sizeHint() - "+ self.NO_VALID_PORT_NAMES_POSITION_MESSAGE)
130  bodyWidth += sinkPortsWidth + sourcePortsWidth
131 
132  if self.textFieldIsSet():
133  bodyWidth += self.getDistance('textFieldWidth', 1)
134  bodyWidth = max(imageSizeF.width() + self.getDistance("leftMargin", 1) + self.getDistance("rightMargin", 1), bodyWidth)
135 
136  neededWidth += max(titleWidth, bodyWidth)
137 
138  # height
139  if self.titleIsSet():
140  neededHeight += self.getDistance('titleFieldHeight', 1)
141 
142  sinkPortsHeight = self.getPortsHeight("sink") / self.scale()
143  sourcePortsHeight = self.getPortsHeight("source") / self.scale()
144  textFieldHeight = 0
145  if self.textFieldIsSet():
146  textFieldHeight += self.textField().getHeight()
147  neededHeight += max(sinkPortsHeight, sourcePortsHeight, textFieldHeight, imageSizeF.height())
148  if bodyWidth != 0:
149  neededHeight += self.getDistance('bottomMargin', 1) # gap between header and body
150  if self._showPortNames and (len(self.sinkPorts()) > 1 or len(self.sourcePorts()) > 1):
151  neededHeight += self.getDistance('bottomMargin', 1) # additional gap for port names
152 
153  return QSize(neededWidth, neededHeight)
154 
def getDistance(self, name, scale=None, keepDefaultRatio=False)
def Vispa.Gui.ConnectableWidget.ConnectableWidget.sourcePort (   self,
  name 
)
Returns source port with given name or None if no such port is found.

Definition at line 307 of file ConnectableWidget.py.

References DTCtcp.port, EcalTPGParamReaderFromDB.port, EcalDBConnection.port, DQMNet::AutoPeer.port, and Vispa.Gui.ConnectableWidget.ConnectableWidget.port().

307  def sourcePort(self, name):
308  """ Returns source port with given name or None if no such port is found.
309  """
310  return self.port(name, 'source')
311 
def Vispa.Gui.ConnectableWidget.ConnectableWidget.sourcePorts (   self)
Returns list of all source ports set.

Definition at line 294 of file ConnectableWidget.py.

References Vispa.Gui.ConnectableWidget.ConnectableWidget._ports, ALCARECOTkAlBeamHalo_cff.filter, and list().

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget._getMaxPortTitleWidth(), Vispa.Gui.ConnectableWidget.ConnectableWidget.drawPortNames(), Vispa.Gui.ConnectableWidget.ConnectableWidget.getPortsHeight(), and Vispa.Gui.ConnectableWidget.ConnectableWidget.sizeHint().

294  def sourcePorts(self):
295  """ Returns list of all source ports set.
296  """
297  return [port for port in self._ports if port.portType() == "source"]
298  def isSource(port):
299  return port.portType() == 'source'
300  return list(filter(isSource, self._ports))
301 
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def Vispa.Gui.ConnectableWidget.ConnectableWidget.updateAttachedConnections (   self)

Member Data Documentation

Vispa.Gui.ConnectableWidget.ConnectableWidget._showPortLines
private
Vispa.Gui.ConnectableWidget.ConnectableWidget.PORT_LINES_TARGET_X

Definition at line 449 of file ConnectableWidget.py.

Vispa.Gui.ConnectableWidget.ConnectableWidget.PORT_LINES_TARGET_Y

Definition at line 449 of file ConnectableWidget.py.