Exemplo n.º 1
0
	def __init__(self, scene, lineCalc, lineDecorator, parent, x, y, w, h, name = None):
		QGraphicsItem.__init__(self, parent)
		
		self.lineCalc      = lineCalc
		self.lineDecorator = lineDecorator
		self.nameTag = TextNode(self.scene, text = name, x = x-105, y= y-3)
		self.name    = name
		self.parent  = parent
		self.host    = None
		self.scene   = scene
		self.child   = []


		#in screen coords
		self.contentPos = QPoint(x,y) #self.scenePos()
		self.setFlag(QGraphicsItem.ItemIsMovable)
		self.setAcceptHoverEvents(True)
			   
		#width and height of content (img, text) without the arrows
		self.w = w
		self.h = h

		#variables for proper dragging and scaling
		self.resizeMode = False
		self.moveMode   = False   
		self.ignore     = False   
		self.lineRect   = None
		self.setAcceptDrops(True)
Exemplo n.º 2
0
 def getTextNode():
     returnValue = libpanda._inPWvimKv2y()
     import TextNode
     returnObject = TextNode.TextNode(None)
     returnObject.this = returnValue
     if returnObject.this == 0:
         return None
     returnObject.userManagesMemory = 1
     return returnObject.setPointer()
     return
    def getTextDef(self, state):
        returnValue = libpanda._inPWvimHmBt(self.this, state)
        import TextNode
        returnObject = TextNode.TextNode(None)
        returnObject.this = returnValue
        if returnObject.this == 0:
            return None

        returnObject.userManagesMemory = 1
        return returnObject.setPointer()
Exemplo n.º 4
0
def downcastToTextNodeFromTextEncoder(this):
    returnValue = libpanda._inPmUk_sPjp(this.this)
    import TextNode
    returnObject = TextNode.TextNode(None)
    returnObject.this = returnValue
    if returnObject.this == 0:
        return None
    returnObject.userManagesMemory = 1
    return returnObject
    return
Exemplo n.º 5
0
	def __init__(self, scene, lineCalc, lineDecorator, parent,  x , y, w , h, name = None):
		QGraphicsItem.__init__(self, parent)
		
		self.Pcount         = 0
		self.Scount         = 0
		self.Swidgetcount   = 0
		self.scene          = scene
		self.lineCalc       = lineCalc
		self.lineDecorator  = lineDecorator
		self.nameTag        = TextNode(self.scene, text = name, x= x+10, y= y+5)
		self.nameTag.changeText(name)
		

		self.name       = name
		self.parent     = parent
		self.status     = 0
		self.temp_stat  = 0
		self.host       = []
		self.client     = []
		self.child      = []
		self.jack       = []
		self.drain      = []
		self.parts      = [self.nameTag]  #self.Ring,
		self.level      = None

		self.script     = None
		# self.parameters = None
		self.output     = TypeError

		self.contentPos = QPoint(x,y) #self.scenePos()
		self.setFlag(QGraphicsItem.ItemIsMovable)
		self.setAcceptHoverEvents(True)
		self.setLevel(-1)

		#width and height of content (img, text) without the arrows
		self.x = x
		self.y = y
		self.w = w
		self.h = h

		#variables for proper dragging and scaling
		self.resizeMode = False
		self.moveMode   = False   
		self.ignore     = False   
		self.lineRect   = None