CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
Vispa.Gui.PortWidget.PortWidget Class Reference
Inheritance diagram for Vispa.Gui.PortWidget.PortWidget:
Vispa.Gui.VispaWidget.VispaWidget Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.Zoomable.Zoomable Vispa.Gui.PortWidget.SinkPort Vispa.Gui.PortWidget.SourcePort

Public Member Functions

def __init__ (self, parent=None, name='default')
 
def attachConnection (self, connection)
 
def attachedConnections (self)
 
def connectionDirection (self)
 
def connectionPoint (self, frame="workspace")
 
def deleteAttachedConnections (self)
 
def description (self)
 
def detachConnection (self, connection)
 
def drawTextField (self, painter)
 
def drawTitle (self, painter)
 
def isDragable (self)
 
def moduleParent (self)
 
def mouseMoveEvent (self, event)
 
def mousePressEvent (self, event)
 
def mouseReleaseEvent (self, event)
 
def name (self)
 
def portType (self)
 
def resetAimConnection (self)
 
def setDescription (self, description)
 
def setDragable (self, dragable, recursive=False)
 
def setName (self, name)
 
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 Attributes

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

Private Attributes

 _aimConnection
 
 _attachedConnections
 
 _connectionDirection
 
 _dragablePort
 
 _startDragPosition
 

Detailed Description

This widget is used to dispay sink and source port of ConnectableWidget.

Definition at line 9 of file PortWidget.py.

Constructor & Destructor Documentation

def Vispa.Gui.PortWidget.PortWidget.__init__ (   self,
  parent = None,
  name = 'default' 
)
Constructor.

Definition at line 26 of file PortWidget.py.

References DCCTBDataField.setName(), jsoncollector::JsonMonitorable.setName(), reco::CompositeCandidate.setName(), L1TUtmCut.setName(), reco::NamedCompositeCandidate.setName(), L1TUtmObject.setName(), L1TUtmCondition.setName(), CSGAction.setName(), Vispa.Gui.PortWidget.PortWidget.setName(), FWPhysicsObjectDesc.setName(), pat::TriggerCondition.setName(), MillePedeVariables.setName(), Entry.setName(), pat::TriggerAlgorithm.setName(), pat::TriggerPath.setName(), L1TUtmTriggerMenu.setName(), L1MuBMTrack.setName(), FWEventItem.setName(), and Measurement.setName().

26  def __init__(self, parent=None, name='default'):
27  """ Constructor.
28  """
29  VispaWidget.__init__(self, parent)
30  self.setName(name)
32  self._startDragPosition = None
33  self.setDragable(True)
34  self._aimConnection = None
36 
def __init__(self, parent=None, name='default')
Definition: PortWidget.py:26
def setDragable(self, dragable, recursive=False)
Definition: PortWidget.py:57

Member Function Documentation

def Vispa.Gui.PortWidget.PortWidget.attachConnection (   self,
  connection 
)

Definition at line 37 of file PortWidget.py.

37  def attachConnection(self, connection):
38  self._attachedConnections.append(connection)
39 
def attachConnection(self, connection)
Definition: PortWidget.py:37
def Vispa.Gui.PortWidget.PortWidget.attachedConnections (   self)
def Vispa.Gui.PortWidget.PortWidget.connectionDirection (   self)
Returns the direction in which an attached connection should start.

Definition at line 121 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._connectionDirection.

122  """ Returns the direction in which an attached connection should start.
123  """
124  return self._connectionDirection
125 
def Vispa.Gui.PortWidget.PortWidget.connectionPoint (   self,
  frame = "workspace" 
)
Returns point within this port from which attached connections should start.

Possible values for the optional frame argument are 'workspace' (default or invalid value), 'widget' and 'port'.
This value of this argument decides in which frame the coordinates of the returned point are measured.

Definition at line 106 of file PortWidget.py.

References 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(), FWPSetTableManager::PSetData.parent, emtf::Node.parent, edm::DocFormatHelper.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(), gem::VFATfirst.pos, AlignableData< T >.pos(), reco::DeDxHitInfo::DeDxHitInfoContainer.pos(), CaloNavigator< T, TOPO >.pos(), CaloNavigator< DetId >.pos(), PhysicsTools::SourceVariableSet::PosVar.pos, reco::DeDxHitInfo.pos(), geometryXMLparser.Alignable.pos(), DTSegmentExtendedCand::DTSLRecClusterForFit.pos, STLInputStream.pos, CaloG4Hit.pos, MatacqProducer::PosEstimator.pos(), PhysicsTools::BitSet::Iterator.pos, lhef::CBInputStream.pos, lhef::STLInputStream.pos, lhef::StorageInputStream.pos, CLookToRead.pos, CaloMeanResponse.scale, scaleGains.scale, CSCDBGains.scale(), CSCDBChipSpeedCorrection.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.PortWidget.PortWidget.mouseMoveEvent().

106  def connectionPoint(self, frame="workspace"):
107  """ Returns point within this port from which attached connections should start.
108 
109  Possible values for the optional frame argument are 'workspace' (default or invalid value), 'widget' and 'port'.
110  This value of this argument decides in which frame the coordinates of the returned point are measured.
111  """
112  point = QPoint(self.CONNECTIONPOINT_X, self.CONNECTIONPOINT_Y) * self.scale()
113 
114  if frame == "port":
115  return point
116  if frame == "widget":
117  return self.pos() + point
118 
119  return self.parent().mapToParent(self.pos() + point)
120 
def connectionPoint(self, frame="workspace")
Definition: PortWidget.py:106
def Vispa.Gui.PortWidget.PortWidget.deleteAttachedConnections (   self)

Definition at line 50 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._attachedConnections.

51  for connection in self._attachedConnections:
52  connection.delete()
53 
def Vispa.Gui.PortWidget.PortWidget.description (   self)
Returns description text.

Definition at line 92 of file PortWidget.py.

References Vispa.Gui.VispaWidget.VispaWidget.textFieldIsSet().

92  def description(self):
93  """ Returns description text.
94  """
95  if self.textFieldIsSet():
96  return self.textField.getText()
97  return ''
98 
def Vispa.Gui.PortWidget.PortWidget.detachConnection (   self,
  connection 
)

Definition at line 40 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._attachedConnections.

40  def detachConnection(self, connection):
41  if connection in self._attachedConnections:
42  self._attachedConnections.remove(connection)
43  else:
44  logging.error("%s: detachConnection(): Tried to detach a connection that was not attached ot this port. Aborting..." % self.__class__.__name__)
45 
def detachConnection(self, connection)
Definition: PortWidget.py:40
def Vispa.Gui.PortWidget.PortWidget.drawTextField (   self,
  painter 
)
Overwrite VispaWidget.drawTextField()

Do not show text field, just using the text for tooltip.

Definition at line 145 of file PortWidget.py.

Referenced by Vispa.Gui.ConnectableWidget.ConnectableWidget.drawBody(), and Vispa.Gui.VispaWidget.VispaWidget.drawBody().

145  def drawTextField(self, painter):
146  """ Overwrite VispaWidget.drawTextField()
147 
148  Do not show text field, just using the text for tooltip.
149  """
150  pass
151 
def drawTextField(self, painter)
Definition: PortWidget.py:145
def Vispa.Gui.PortWidget.PortWidget.drawTitle (   self,
  painter 
)
Overwrite VispaWidget.drawTitle()

Do not show title, instead ConnectableWidget will show title/name.

Definition at line 138 of file PortWidget.py.

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

138  def drawTitle(self, painter):
139  """ Overwrite VispaWidget.drawTitle()
140 
141  Do not show title, instead ConnectableWidget will show title/name.
142  """
143  pass
144 
def drawTitle(self, painter)
Definition: PortWidget.py:138
def Vispa.Gui.PortWidget.PortWidget.isDragable (   self)

Definition at line 64 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._dragablePort.

64  def isDragable(self):
65  return self._dragablePort
66 
def Vispa.Gui.PortWidget.PortWidget.moduleParent (   self)
Returns parent of this port's parent.

As the port should belong to a ConnectableWidget the function returns the QWidget in which the ConnectableWidget lives.

Definition at line 126 of file PortWidget.py.

References 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(), FWPSetTableManager::PSetData.parent, edm::DocFormatHelper.parent(), emtf::Node.parent, EmDQMReco::FourVectorMonitorElements.parent, DDFilteredView.parent(), cms::DDFilteredView.parent(), class-composition.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.PortWidget.PortWidget.mouseMoveEvent(), and Vispa.Gui.PortWidget.PortWidget.mouseReleaseEvent().

126  def moduleParent(self):
127  """ Returns parent of this port's parent.
128 
129  As the port should belong to a ConnectableWidget the function returns the QWidget in which the ConnectableWidget lives.
130  """
131  # Port belongs to module
132  # Think of better solution. Port shall not create PortConnection.
133  if self.parent():
134  return self.parent().parent()
135  else:
136  return None
137 
def Vispa.Gui.PortWidget.PortWidget.mouseMoveEvent (   self,
  event 
)
If minimum distance from mousePressEvent is reached initiates dragging.

Definition at line 160 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._aimConnection, Vispa.Gui.PortWidget.PortWidget._dragablePort, Vispa.Gui.PortWidget.PortWidget._startDragPosition, electrons_cff.bool, ConnectionManager.connect(), conditionUploadTest.DB.connect(), RPCDBCom.connect(), l1t::DataManager.connect(), TestBase.connect(), HCALConfigDB.connect(), ReadBase.connect(), ShallowTree::BranchConnector.connect(), dqmservices::DQMMonitoringService.connect(), SimActivityRegistry.connect(), sim_act::Signaler< T >.connect(), sim_act::Signaler< G4Step >.connect(), sim_act::Signaler< EndOfEvent >.connect(), sim_act::Signaler< BeginOfRun >.connect(), sim_act::Signaler< BeginOfEvent >.connect(), sim_act::Signaler< BeginOfTrack >.connect(), sim_act::Signaler< BeginOfJob >.connect(), sim_act::Signaler< EndOfRun >.connect(), sim_act::Signaler< EndOfTrack >.connect(), sim_act::Signaler< DDDWorld >.connect(), ShallowTree::TypedBranchConnector< T >.connect(), edm::ServiceToken.connect(), edm::signalslot::Signal< void(TerminationOrigin)>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &, HLTPathStatus const &)>.connect(), edm::signalslot::Signal< void(const std::string &, const std::string &)>.connect(), edm::signalslot::Signal< T >.connect(), edm::signalslot::Signal< void(std::string const &, bool)>.connect(), edm::signalslot::Signal< void(ModuleDescription const &)>.connect(), Signal< void(BranchDescription const &)>.connect(), edm::signalslot::Signal< void(const edmplugin::PluginFactoryBase *)>.connect(), edm::signalslot::Signal< void(LuminosityBlockIndex)>.connect(), edm::signalslot::Signal< void(const boost::filesystem::path &)>.connect(), edm::signalslot::Signal< void(StreamContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, TerminationOrigin)>.connect(), edm::signalslot::Signal< void(StreamContext const &, PathContext const &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &)>.connect(), edm::signalslot::Signal< void(edm::BranchDescription const &)>.connect(), edm::signalslot::Signal< void(const edmplugin::SharedLibrary &)>.connect(), edm::signalslot::Signal< void(PathsAndConsumesOfModulesBase const &, ProcessContext const &)>.connect(), edm::signalslot::Signal< void(eventsetup::ComponentDescription const *, eventsetup::EventSetupRecordKey const &, eventsetup::DataKey const &)>.connect(), edm::signalslot::Signal< void(GlobalContext const &, ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(RunIndex)>.connect(), edm::signalslot::Signal< void()>.connect(), edm::signalslot::Signal< void(edm::StreamContext const &, edm::ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)>.connect(), edm::signalslot::Signal< void(const std::string &, const edmplugin::PluginInfo &)>.connect(), edm::signalslot::Signal< void(StreamContext const &)>.connect(), edm::signalslot::Signal< void(service::SystemBounds const &)>.connect(), edm::signalslot::Signal< void(StreamID)>.connect(), o2o_db_manager.DbManager.connect(), PFCandConnector.connect(), L1TOMDSHelper.connect(), confdbOfflineConverter.OfflineConverter.connect, DDTOBRodAlgo.connect, GlobalTag.GlobalTag.connect(), edm::signalslot::ObsoleteSignal< void(std::string const &, HLTPathStatus const &)>.connect(), edm::signalslot::ObsoleteSignal< void(ModuleDescription const &)>.connect(), edm::signalslot::ObsoleteSignal< void(RunID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(LuminosityBlockID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(std::string const &)>.connect(), edm::signalslot::ObsoleteSignal< void(LuminosityBlock const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< void(Run const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< void(EventID const &, Timestamp const &)>.connect(), edm::signalslot::ObsoleteSignal< void(Event const &, EventSetup const &)>.connect(), edm::signalslot::ObsoleteSignal< T >.connect(), SiStripGainFromCalibTree.connect(), edm::serviceregistry::ServicesManager.connect(), conddb_version_mgr.conddb_tool.connect(), o2olib.O2OJobMgr.connect(), cond::service::PoolDBOutputService.connect(), l1t::OMDSReader.connect(), edm::ActivityRegistry.connect(), Vispa.Gui.PortWidget.PortWidget.CONNECTION_DIRECTION, Vispa.Gui.PortWidget.PortWidget.connectionPoint(), Vispa.Gui.PortWidget.PortWidget.moduleParent(), and Vispa.Gui.PortWidget.PortWidget.resetAimConnection().

160  def mouseMoveEvent(self, event):
161  """ If minimum distance from mousePressEvent is reached initiates dragging.
162  """
163  #logging.debug(self.__class__.__name__ +": mouseMoveEvent()")
164  if self._dragablePort and self._startDragPosition and bool(event.buttons() & Qt.LeftButton):
165  if not self._aimConnection and (event.pos() - self._startDragPosition).manhattanLength() >= QApplication.startDragDistance():
166  self._aimConnection = PointToPointConnection(self.moduleParent(), self.connectionPoint(), self.mapTo(self.moduleParent(), event.pos()))
167  self._aimConnection.setSourceDirection(self.CONNECTION_DIRECTION)
168  self.connect(self._aimConnection, SIGNAL("connectionDeleted"), self.resetAimConnection)
169 
170  if self.CONNECTION_DIRECTION == PointToPointConnection.ConnectionDirection.RIGHT:
171  self._aimConnection.setTargetDirection(PointToPointConnection.ConnectionDirection.LEFT)
172  elif self.CONNECTION_DIRECTION == PointToPointConnection.ConnectionDirection.LEFT:
173  self._aimConnection.setTargetDirection(PointToPointConnection.ConnectionDirection.RIGHT)
174 
175  self._aimConnection.show()
176  elif self._aimConnection:
177  self._aimConnection.updateTargetPoint(self.mapTo(self.moduleParent(), event.pos()))
178  VispaWidget.mouseMoveEvent(self, event)
179 
def mouseMoveEvent(self, event)
Definition: PortWidget.py:160
def connectionPoint(self, frame="workspace")
Definition: PortWidget.py:106
def Vispa.Gui.PortWidget.PortWidget.mousePressEvent (   self,
  event 
)
Registers position for starting drag.

Definition at line 152 of file PortWidget.py.

152  def mousePressEvent(self, event):
153  """ Registers position for starting drag.
154  """
155  logging.debug("%s: mousePressEvent()" % self.__class__.__name__)
156  if self._dragablePort and event.button() == Qt.LeftButton:
157  self._startDragPosition = QPoint(event.pos())
158  VispaWidget.mousePressEvent(self, event)
159 
def mousePressEvent(self, event)
Definition: PortWidget.py:152
def Vispa.Gui.PortWidget.PortWidget.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 180 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._aimConnection, Vispa.Gui.PortWidget.PortWidget._dragablePort, class-composition.children, edm.contains(), and Vispa.Gui.PortWidget.PortWidget.moduleParent().

180  def mouseReleaseEvent(self, event):
181  """ Calls realeseMouse() to make sure the widget does not grab the mouse.
182 
183  Necessary because ConnectableWidgetOwner.propagateEventUnderConnectionWidget() may call grabMouse() on this widget.
184  """
185  logging.debug(self.__class__.__name__ +": mouseReleaseEvent()")
186  self.releaseMouse()
187  if self._dragablePort:
188  if self._aimConnection:
189  self._aimConnection.hide() # don't appear as childWidget()
190  self._aimConnection.delete()
191  self._aimConnection = None
192 
193  moduleParentPosition = self.mapTo(self.moduleParent(), event.pos())
194  #widget = self.moduleParent().childAt(moduleParentPosition)
195  widget = None
196  for child in reversed(self.moduleParent().children()):
197  if isinstance(child,QWidget) and child.isVisible() and child.geometry().contains(moduleParentPosition) and not isinstance(child, PortConnection):
198  widget = child
199  break
200 
201  if hasattr(widget, "dropAreaPort"):
202  localPosition = widget.mapFrom(self.moduleParent(), moduleParentPosition)
203  self.moduleParent().addPortConnection(self, widget.dropAreaPort(localPosition))
204  elif isinstance(widget, PortWidget):
205  self.moduleParent().addPortConnection(self, widget)
206 
207  VispaWidget.mouseReleaseEvent(self, event)
208 
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
def mouseReleaseEvent(self, event)
Definition: PortWidget.py:180
def Vispa.Gui.PortWidget.PortWidget.name (   self)
Returns name of this port.

Definition at line 78 of file PortWidget.py.

References Formatter.SimpleAsciiFormatter.title, listHistos.plotInfo.title, classes.PlotData.title, EventStringOutputBranches::NamedBranchPtr.title, preexistingValidation.PreexistingValidation.title, TriggerOutputBranches::NamedBranchPtr.title, TableOutputBranches::NamedBranchPtr.title, DB_ME.title, reco::DiscretizedEnergyFlow.title(), cscdqm::HistoBookRequest.title, Book.title(), FWTriggerTableView::Column.title, DQMGenericClient::EfficOption.title, alignment.Alignment.title, SiStripHistoTitle.title(), DQMGenericClient::ProfileOption.title, egHLT::MonElemContainer< T >.title(), dqmoffline::l1t::HistDefinition.title, Formatter.SimpleHTMLFormatter.title, SiPixelGenErrorHeader.title, python.rootplot.utilities.Hist2D.title, ecaldqm::binning::AxisSpecs.title, TestHits.title, TestSmoothHits.title, big::bigHeader.title, HistogramManager.title, FWPSetTableManager.title(), SiPixelTemplateHeader2D.title, presentation.SubsectionBase.title, TestTrackHits.title, python.rootplot.utilities.Hist.title, FWGeometryTableManagerBase.title(), Geometry.title, DataAdderTableManager.title(), cuy.plotElement.title, cond::payloadInspector::PlotBase.title(), cuy.additionElement.title, cuy.superimposeElement.title, TkAlMap.TkAlMap.title, cuy.graphElement.title, TrackerMap.title, SiPixelTemplateHeader.title, TkAlStyle.title(), python.rootplot.utilities.HistStack.title, Vispa.Gui.VispaWidget.VispaWidget.title(), and Vispa.Gui.VispaWidget.VispaWidget.titleIsSet().

Referenced by config.CFG.__str__(), validation.Sample.digest(), VIDSelectorBase.VIDSelectorBase.initialize(), and Vispa.Views.PropertyView.Property.valueChanged().

78  def name(self):
79  """ Returns name of this port.
80  """
81  if self.titleIsSet():
82  return self.title()
83  return ''
84 
def Vispa.Gui.PortWidget.PortWidget.portType (   self)
Return type of this port.

The value has to be set by inheriting classes.

Definition at line 99 of file PortWidget.py.

99  def portType(self):
100  """ Return type of this port.
101 
102  The value has to be set by inheriting classes.
103  """
104  return self.PORT_TYPE
105 
def Vispa.Gui.PortWidget.PortWidget.resetAimConnection (   self)

Definition at line 209 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._aimConnection.

Referenced by Vispa.Gui.PortWidget.PortWidget.mouseMoveEvent().

210  logging.debug("%s: resetAimConnection()" % self.__class__.__name__)
211  self._aimConnection = None
212 
def Vispa.Gui.PortWidget.PortWidget.setDescription (   self,
  description 
)
Sets description text of this port.

Description will be shown as tooltip.

Definition at line 85 of file PortWidget.py.

References Vispa.Gui.Header.Header.setText(), Vispa.Gui.VispaWidget.TextField.setText(), ScaleAnnotation.setText(), TrackerMap.setText(), and Vispa.Gui.VispaWidget.VispaWidget.setText().

85  def setDescription(self, description):
86  """ Sets description text of this port.
87 
88  Description will be shown as tooltip.
89  """
90  self.setText(description)
91 
def setDescription(self, description)
Definition: PortWidget.py:85
def Vispa.Gui.PortWidget.PortWidget.setDragable (   self,
  dragable,
  recursive = False 
)
Set whether user can grab the port and connect it to others.

Definition at line 57 of file PortWidget.py.

57  def setDragable(self,dragable, recursive=False):
58  """ Set whether user can grab the port and connect it to others.
59  """
60  VispaWidget.setDragable(self,False, recursive)
61  self._dragablePort=dragable
62  self.setAcceptDrops(dragable)
63 
def setDragable(self, dragable, recursive=False)
Definition: PortWidget.py:57
def Vispa.Gui.PortWidget.PortWidget.setName (   self,
  name 
)
Sets name of port.

Name will be shown as tooltip unless a descriptions is set.
See setDescription().

Definition at line 67 of file PortWidget.py.

References DiDispStaMuonMonitor.setTitle(), PhotonMonitor.setTitle(), MuonMonitor.setTitle(), SiStripHistoTitle.setTitle(), ConcurrentMonitorElement.setTitle(), TrackerMap.setTitle(), MonitorElement.setTitle(), Vispa.Gui.VispaWidget.VispaWidget.setTitle(), CSGAction.setToolTip(), and Vispa.Views.PropertyView.TextEditWithButtonProperty.setToolTip().

Referenced by Vispa.Gui.PortWidget.PortWidget.__init__(), and Vispa.Views.PropertyView.Property.__init__().

67  def setName(self, name):
68  """ Sets name of port.
69 
70  Name will be shown as tooltip unless a descriptions is set.
71  See setDescription().
72  """
73  #self._initTitleField()
74  #self.titleField().setAutoscale(True, False)
75  self.setTitle(name)
76  self.setToolTip(name)
77 
def Vispa.Gui.PortWidget.PortWidget.updateAttachedConnections (   self)

Definition at line 46 of file PortWidget.py.

References Vispa.Gui.PortWidget.PortWidget._attachedConnections.

47  for connection in self._attachedConnections:
48  connection.updateConnection()
49 

Member Data Documentation

Vispa.Gui.PortWidget.PortWidget._aimConnection
private
Vispa.Gui.PortWidget.PortWidget._attachedConnections
private
Vispa.Gui.PortWidget.PortWidget._connectionDirection
private

Definition at line 31 of file PortWidget.py.

Referenced by Vispa.Gui.PortWidget.PortWidget.connectionDirection().

Vispa.Gui.PortWidget.PortWidget._dragablePort
private
Vispa.Gui.PortWidget.PortWidget._startDragPosition
private
Vispa.Gui.PortWidget.PortWidget.CONNECTION_DIRECTION

Definition at line 170 of file PortWidget.py.

Referenced by Vispa.Gui.PortWidget.PortWidget.mouseMoveEvent().