CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Vispa.Gui.PortConnection.PortConnection Class Reference
Inheritance diagram for Vispa.Gui.PortConnection.PortConnection:
Vispa.Gui.PortConnection.PointToPointConnection Vispa.Gui.ZoomableWidget.ZoomableWidget Vispa.Gui.Zoomable.Zoomable Vispa.Gui.PortConnection.LinearPortConnection

Public Member Functions

def __init__
 
def attachedToPort
 
def delete
 
def sinkPort
 
def sourceDirection
 
def sourcePoint
 
def sourcePort
 
def targetDirection
 
def targetPoint
 
- Public Member Functions inherited from Vispa.Gui.PortConnection.PointToPointConnection
def __init__
 
def belongsToRoute
 
def betweenTwoPoints
 
def bottomRight
 
def calculateRoute
 
def connectionDirectionString
 
def cornerIsDefined
 
def cornerTypeString
 
def delete
 
def dragReferencePoint
 
def draw
 
def drawCorner
 
def drawLineSection
 
def drawSection
 
def drawStraightLine
 
def forceRouteRecalculation
 
def getCornerType
 
def getPointByDistance
 
def getPointToPointDirection
 
def getRectBetweenTwoPoints
 
def isDeletable
 
def isSelectable
 
def isSelected
 
def keyPressEvent
 
def mousePressEvent
 
def nextPointByDistance
 
def nextPointByTarget
 
def paintEvent
 
def routeChanged
 
def routeIsValid
 
def select
 
def setDeletable
 
def setDragReferencePoint
 
def setSelectable
 
def setSourceDirection
 
def setTargetDirection
 
def setType
 
def setZoom
 
def sourceDirection
 
def sourcePoint
 
def targetDirection
 
def targetPoint
 
def topLeft
 
def updateConnection
 
def updateTargetPoint
 
- Public Member Functions inherited from Vispa.Gui.ZoomableWidget.ZoomableWidget
def __init__
 
def exportImage
 
def setZoom
 
- Public Member Functions inherited from Vispa.Gui.Zoomable.Zoomable
def __init__
 
def decrementZoom
 
def incrementZoom
 
def setZoom
 
def zoom
 
def zoomFactor
 

Private Attributes

 _sinkPort
 
 _sourcePort
 

Additional Inherited Members

- Static Public Attributes inherited from Vispa.Gui.PortConnection.PointToPointConnection
int CONNECTION_THICKNESS = 5
 
string CONNECTION_TYPE = "ORTHOGONAL"
 
int CONNECTOR_LENGTH = 15
 
tuple FILL_COLOR1 = QColor(155, 0, 0)
 
tuple FILL_COLOR2 = QColor(255, 0, 0)
 
 FOCUSPOLICY = Qt.ClickFocus
 
tuple SELECT_COLOR = QColor('darkblue')
 
int SELECTED_FRAME_WIDTH = 4
 

Detailed Description

Connection line between to PortWidgets.

Definition at line 821 of file PortConnection.py.

Constructor & Destructor Documentation

def Vispa.Gui.PortConnection.PortConnection.__init__ (   self,
  workspace,
  sourcePort,
  sinkPort 
)
Constructor.

Creates connection from source port widget to sink port widget.

Definition at line 824 of file PortConnection.py.

825  def __init__(self, workspace, sourcePort, sinkPort):
826  """ Constructor.
827 
828  Creates connection from source port widget to sink port widget.
829  """
830  self._sourcePort = sourcePort
831  self._sinkPort = sinkPort
832  PointToPointConnection.__init__(self, workspace, None, None)
833  self._sourcePort.attachConnection(self)
834  self._sinkPort.attachConnection(self)

Member Function Documentation

def Vispa.Gui.PortConnection.PortConnection.attachedToPort (   self,
  port 
)
Returns True if port is either source or sink port attached to this connection.

Definition at line 865 of file PortConnection.py.

References Vispa.Gui.PortConnection.PortConnection._sinkPort, and Vispa.Gui.PortConnection.PortConnection._sourcePort.

866  def attachedToPort(self, port):
867  """ Returns True if port is either source or sink port attached to this connection.
868  """
869  if port == self._sourcePort:
870  return True
871  if port == self._sinkPort:
872  return True
873  return False
def Vispa.Gui.PortConnection.PortConnection.delete (   self)

Definition at line 874 of file PortConnection.py.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer.keyPressEvent(), and Vispa.Gui.VispaWidget.VispaWidget.keyPressEvent().

875  def delete(self):
876  if PointToPointConnection.delete(self):
877  self._sinkPort.detachConnection(self)
878  self._sourcePort.detachConnection(self)
def Vispa.Gui.PortConnection.PortConnection.sinkPort (   self)
Returns attached sink port.

Definition at line 840 of file PortConnection.py.

References Vispa.Gui.PortConnection.PortConnection._sinkPort.

841  def sinkPort(self):
842  """ Returns attached sink port.
843  """
844  return self._sinkPort
def Vispa.Gui.PortConnection.PortConnection.sourceDirection (   self)
Returns initial direction of source port.

Definition at line 855 of file PortConnection.py.

856  def sourceDirection(self):
857  """ Returns initial direction of source port.
858  """
859  return self._sourcePort.connectionDirection()
def Vispa.Gui.PortConnection.PortConnection.sourcePoint (   self)
Returns connection point of attached source port.

Definition at line 845 of file PortConnection.py.

846  def sourcePoint(self):
847  """ Returns connection point of attached source port.
848  """
849  return self._sourcePort.connectionPoint()
def Vispa.Gui.PortConnection.PortConnection.sourcePort (   self)
Returns attached source port.

Definition at line 835 of file PortConnection.py.

References Vispa.Gui.PortConnection.PortConnection._sourcePort.

836  def sourcePort(self):
837  """ Returns attached source port.
838  """
839  return self._sourcePort
def Vispa.Gui.PortConnection.PortConnection.targetDirection (   self)
Returns initial direction of sink port.

Definition at line 860 of file PortConnection.py.

861  def targetDirection(self):
862  """ Returns initial direction of sink port.
863  """
864  return self._sinkPort.connectionDirection()
def Vispa.Gui.PortConnection.PortConnection.targetPoint (   self)
Returns connection point of attached sink port.

Definition at line 850 of file PortConnection.py.

851  def targetPoint(self):
852  """ Returns connection point of attached sink port.
853  """
854  return self._sinkPort.connectionPoint()

Member Data Documentation

Vispa.Gui.PortConnection.PortConnection._sinkPort
private

Definition at line 830 of file PortConnection.py.

Referenced by Vispa.Gui.PortConnection.PortConnection.attachedToPort(), and Vispa.Gui.PortConnection.PortConnection.sinkPort().

Vispa.Gui.PortConnection.PortConnection._sourcePort
private

Definition at line 829 of file PortConnection.py.

Referenced by Vispa.Gui.PortConnection.PortConnection.attachedToPort(), and Vispa.Gui.PortConnection.PortConnection.sourcePort().