Exemplo n.º 1
0
    def __init__(self, node, fileName, lineNumber, outside):
        QGraphicsRectItem.__init__(self)
        self.__node = node
        self.__fileName = fileName
        self.__lineNumber = lineNumber
        self.__outside = outside

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__(self, posX, posY, node.width, node.height)

        self.setRectanglePen()

        # node.color is like "#fe0400"
        if node.color.startswith("#"):
            color = QColor(int(node.color[1:3], 16), int(node.color[3:5], 16),
                           int(node.color[5:], 16))
        else:
            color = QColor(220, 255, 220)
        self.setBrush(color)

        # To make item selectable
        self.setFlag( QGraphicsItem.ItemIsSelectable,
                      os.path.isabs( self.__fileName ) and \
                      self.__lineNumber > 0 )

        # Set tooltip as a function docstring
        if fileName != "" and lineNumber != 0:
            self.setToolTip( \
                    GlobalData().getFileLineDocstring( fileName, lineNumber ) )
        return
Exemplo n.º 2
0
 def __init__(self, future_build_info, x=0, y=0, selectable=True):
     QGraphicsRectItem.__init__(self, x, y, self.WIDTH, self.WIDTH)
     self.future_build_info = future_build_info
     if selectable:
         self.setFlags(self.ItemIsSelectable | self.ItemIsFocusable)
     else:
         self.setFlags(self.ItemIsFocusable)
Exemplo n.º 3
0
 def __init__(self, future_build_info, x=0, y=0, selectable=True):
     QGraphicsRectItem.__init__(self, x, y, self.WIDTH, self.WIDTH)
     self.future_build_info = future_build_info
     if selectable:
         self.setFlags(self.ItemIsSelectable | self.ItemIsFocusable)
     else:
         self.setFlags(self.ItemIsFocusable)
Exemplo n.º 4
0
 def __init__(self, bgc_info, *args, **kargs):
     QGraphicsRectItem.__init__(self, *args, **kargs)
     self.node = None
     self.label = None
     self.bgc_info = bgc_info
     self.setCursor(QtCore.Qt.PointingHandCursor)
     self.setAcceptsHoverEvents(True)
Exemplo n.º 5
0
    def __init__(self, table, vector, mass=1.0):
        """Documentation here"""

        self.name = table.name
        self._mediator = Mediator()

        # layout widget
        x, y = vector.x, vector.y
        text = QGraphicsSimpleTextItem('{0} as {1}'.format(self.name, self.alias))
        width = text.boundingRect().width()
        QGraphicsRectItem.__init__(self, x, y, width + 10, 22)

        self.table = table.alias(self.alias)

        self.setBrush(Qt.cyan)
        self.setPen(Qt.darkCyan)

        self.width = width + 10
        self.height = 22
        self.setFlag(self.ItemIsSelectable, True)

        text.setParentItem(self)
        text.setX(x + 5)
        text.setY(y + 5)

        self.point = vector
        self.mass = mass
        self.velocity = Vector(0, 0)
        self.force = Vector(0, 0)
        self.instances.append(self)
Exemplo n.º 6
0
    def __init__(self,
                 parent,
                 name='Untitled',
                 width=180,
                 height=40,
                 blockColor="#A5A2A5",
                 data=None,
                 bold=False,
                 italic=False,
                 status=True):
        """
        Constructor
        """
        QGraphicsRectItem.__init__(self)

        self.parentWidget = parent
        self.internalData = data
        self.status = status

        color = QColor(0, 0, 0)
        color.setNamedColor(blockColor)
        self.setPen(QPen(color, 2))

        if sys.version_info > (3, ) and isinstance(name, bytes):
            name = str(name, "utf8", errors="ignore")

        self.label = QGraphicsTextItem(name, self)

        self.setFlags(self.ItemIsSelectable)
        self.setCursor(QCursor(Qt.PointingHandCursor))

        self.changeSize(width, height)
Exemplo n.º 7
0
 def __init__(self, rect):
     QGraphicsRectItem.__init__(self, rect)
     self._color = None
     self._darkColor = None
     self._pos = None
     self._value = 0
     self._label = ""
Exemplo n.º 8
0
    def __init__( self, node, fileName, lineNumber, outside ):
        QGraphicsRectItem.__init__( self )
        self.__node = node
        self.__fileName = fileName
        self.__lineNumber = lineNumber
        self.__outside = outside

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__( self, posX, posY,
                                    node.width, node.height )

        self.setRectanglePen()

        # node.color is like "#fe0400"
        if node.color.startswith( "#" ):
            color = QColor( int( node.color[ 1:3 ], 16 ),
                            int( node.color[ 3:5 ], 16 ),
                            int( node.color[ 5: ], 16 ) )
        else:
            color = QColor( 220, 255, 220 )
        self.setBrush( color )

        # To make item selectable
        self.setFlag( QGraphicsItem.ItemIsSelectable,
                      os.path.isabs( self.__fileName ) and \
                      self.__lineNumber > 0 )

        # Set tooltip as a function docstring
        if fileName != "" and lineNumber != 0:
            self.setToolTip( \
                    GlobalData().getFileLineDocstring( fileName, lineNumber ) )
        return
Exemplo n.º 9
0
 def __init__(self, parent, start, stop, refobj, slot):
     QGraphicsRectItem.__init__(self, start, 0, stop-start, parent.height, parent)
     self.refobj = refobj
     self.slot = slot
     self.brush = self.__class__.inactive_brush
     self.setPen(QPen(Qt.NoPen))
     self.setCursor(Qt.PointingHandCursor)
     self.setAcceptsHoverEvents(True)
Exemplo n.º 10
0
    def __init__(self, rect, parent=None, scene=None):
        QGraphicsRectItem.__init__(self, rect, parent, scene)

        self.setAcceptHoverEvents(True)
        self.setAcceptTouchEvents(True)
        #self.setAcceptedMouseButtons(Qt.LeftButton)
        self.setCursorHover()
        self.setCursorGrab()
Exemplo n.º 11
0
 def __init__(self, side):
     QGraphicsRectItem.__init__(self, side)
     self.side = side
     self.font = QFont()
     self.font.setPointSize(48)
     self.height = 62
     self.width = 200
     self.msg = None
     self.setText('')
Exemplo n.º 12
0
    def __init__(self, ref, canvas, x, y, kind):
        ScopeCellElement.__init__(self, ref, canvas, x, y)
        QGraphicsRectItem.__init__(self)
        self.kind = CellElement.DECOR_SCOPE
        self.subKind = kind

        # To make double click delivered
        self.setFlag(QGraphicsItem.ItemIsSelectable, True)
        return
Exemplo n.º 13
0
 def __init__(self, parent, start, stop, refobj, slot):
     QGraphicsRectItem.__init__(self, start, 0, stop - start, parent.height,
                                parent)
     self.refobj = refobj
     self.slot = slot
     self.brush = self.__class__.inactive_brush
     self.setPen(QPen(Qt.NoPen))
     self.setCursor(Qt.PointingHandCursor)
     self.setAcceptsHoverEvents(True)
Exemplo n.º 14
0
 def __init__(self, side):
     QGraphicsRectItem.__init__(self, side)
     self.side = side
     self.font = QFont()
     self.font.setPointSize(48)
     self.height = 62
     self.width = 200
     self.msg = None
     self.setText('')
Exemplo n.º 15
0
    def __init__( self, ref, canvas, x, y, kind ):
        ScopeCellElement.__init__( self, ref, canvas, x, y )
        QGraphicsRectItem.__init__( self )
        self.kind = CellElement.DECOR_SCOPE
        self.subKind = kind

        # To make double click delivered
        self.setFlag( QGraphicsItem.ItemIsSelectable, True )
        return
Exemplo n.º 16
0
 def __init__(self,settings,i,j,cellI,cellJ,state=0):
     QGraphicsRectItem.__init__(self,
                                j*(settings.atomWidth+settings.atomMargin) + cellJ*settings.cellMargin + settings.edgeLeftMargin,
                                i*(settings.atomHeight+settings.atomMargin) + cellI*settings.cellMargin + settings.edgeTopMargin,
                                settings.atomWidth,
                                settings.atomHeight)
     self.settings = settings
     self.i = i
     self.j = j
     self.state = state
Exemplo n.º 17
0
 def __init__(self, font_loader, logger, opts, width=0, height=0, parent=None, x=0, y=0):
     QGraphicsRectItem.__init__(self, x, y, width, height, parent)
     self.font_loader, self.logger, self.opts = font_loader, logger, opts
     self.current_y, self.max_y, self.max_x = 0, height, width
     self.is_full = False
     pen = QPen()
     pen.setStyle(Qt.NoPen)
     self.setPen(pen)
     if not hasattr(self, "children"):
         self.children = self.childItems
Exemplo n.º 18
0
    def __init__(self, node):
        QGraphicsRectItem.__init__(self)
        self.__node = node

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__(self, posX, posY, node.width, node.height)
        pen = QPen(QColor(0, 0, 0))
        pen.setWidth(2)
        self.setPen(pen)

        self.setBrush(QColor(216, 216, 207))
        return
Exemplo n.º 19
0
    def __init__(self, x, y, h, w, scene=None, parent=None, editor=None):
        """"
        This class implements the resizable rectangle item which is dispalied on the scene
         x y should be the original positions in scene coordinates
         h,w are the height and the width of the rectangle
        """

        self._editor = editor

        QGraphicsRectItem.__init__(self,
                                   0,
                                   0,
                                   w,
                                   h,
                                   scene=scene,
                                   parent=parent)
        self.Signaller = QGraphicsResizableRectSignaller(parent=parent)

        #Default Appearence Properties
        self._fontColor = QColor(255, 255, 255)
        self._fontSize = 10
        self._lineWidth = 1

        ##Note: need to do like this because the x,y of the graphics item fix the position
        # of the zero relative to the scene
        self.moveBy(x, y)

        #Flags
        self.setFlag(QGraphicsItem.ItemIsMovable, True)
        self.setFlag(QGraphicsItem.ItemIsSelectable, True)
        self.setFlag(QGraphicsItem.ItemSendsGeometryChanges, True)

        self.setAcceptHoverEvents(True)
        self.setAcceptedMouseButtons(Qt.LeftButton | Qt.RightButton)

        self._resizeHandles = []

        # A bit of flags
        self._hovering = False
        self._normalColor = QColor(0, 0, 255)
        self.updateColor()
        self._has_moved = False
        self._selected = False
        self._dbg = False
        self._setupTextItem()
        self._isFixed = False

        self.initHandles()
        self.hideHandles()

        self.setToolTip("Hold CTRL to drag the box")
Exemplo n.º 20
0
    def __init__( self, node ):
        QGraphicsRectItem.__init__( self )
        self.__node = node

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__( self, posX, posY,
                                    node.width, node.height )
        pen = QPen( QColor( 0, 0, 0) )
        pen.setWidth( 2 )
        self.setPen( pen )

        self.setBrush( QColor( 216, 216, 207 ) )
        return
 def __init__(self,x,y,h,w,scene=None,parent=None):
     """"
     This class implements the resizable rectangle item which is dispalied on the scene
      x y should be the original positions in scene coordinates
      h,w are the height and the width of the rectangle
     """    
 
     QGraphicsRectItem.__init__(self,0,0,w,h,scene=scene,parent=parent)
     self.Signaller=QGraphicsResizableRectSignaller(parent=parent)
 
 
     #Default Appearence Properties
     self._fontColor=QColor(255, 255, 255)
     self._fontSize=10
     self._lineWidth=1
     
     
     
     
     ##Note: need to do like this because the x,y of the graphics item fix the position 
     # of the zero relative to the scene
     self.moveBy(x,y)
     self.width=w
     self.height=h
     self.shape=(h,w)
     
     #Flags
     self.setFlag(QGraphicsItem.ItemIsMovable,True  )
     self.setFlag(QGraphicsItem.ItemIsSelectable,True)
     self.setFlag(QGraphicsItem.ItemSendsGeometryChanges ,True)
      
     #self.setFlag(QtGui.QGraphicsItem.ItemIsFocusable,True)
     self.setAcceptHoverEvents(True)
     self.setAcceptedMouseButtons(Qt.LeftButton | Qt.RightButton)
     
     
     self._resizeHandles=[]
     
     # A bit of flags
     self._hovering=False
     self._normalColor   = QColor(0, 0, 255)
     self.updateColor()
     self._has_moved=False
     self._selected=False
     self._dbg=False
     self._setupTextItem() 
     self._isFixed = False
     
     self.resetHandles()
Exemplo n.º 22
0
    def __init__(self, parent=None, channel=None, rect=None, **kwargs):
        QGraphicsRectItem.__init__(self, **kwargs)
        self.setAcceptHoverEvents(True)
        self.setAcceptedMouseButtons(Qt.NoButton)
        self.__channel = None

        if rect is None:
            rect = QRectF(0, 0, 20, 20)

        self.setRect(rect)

        if channel:
            self.setChannel(channel)

        self.__shadow = QGraphicsDropShadowEffect(blurRadius=5, offset=QPointF(0, 0))
        self.setGraphicsEffect(self.__shadow)
        self.__shadow.setEnabled(False)
Exemplo n.º 23
0
    def __init__(self, parent, name='Untitled', width=180, height=40):
        """
        Constructor
        """
        QGraphicsRectItem.__init__(self)

        self.parentWidget = parent

        if sys.version_info > (3, ):
            if isinstance(name, bytes):
                name = str(name, "utf8", errors="ignore")

        self.label = QGraphicsTextItem(name, self)

        self.setColor(blockColor="#FFFFFF")

        self.changeSize(width, height)
Exemplo n.º 24
0
    def __init__(self, parent=None, channel=None, rect=None, **kwargs):
        QGraphicsRectItem.__init__(self, **kwargs)
        self.setAcceptHoverEvents(True)
        self.setAcceptedMouseButtons(Qt.NoButton)
        self.__channel = None

        if rect is None:
            rect = QRectF(0, 0, 20, 20)

        self.setRect(rect)

        if channel:
            self.setChannel(channel)

        self.__shadow = QGraphicsDropShadowEffect(blurRadius=5,
                                                  offset=QPointF(0, 0))
        self.setGraphicsEffect(self.__shadow)
        self.__shadow.setEnabled(False)
Exemplo n.º 25
0
 def __init__(self,
              font_loader,
              logger,
              opts,
              width=0,
              height=0,
              parent=None,
              x=0,
              y=0):
     QGraphicsRectItem.__init__(self, x, y, width, height, parent)
     self.font_loader, self.logger, self.opts = font_loader, logger, opts
     self.current_y, self.max_y, self.max_x = 0, height, width
     self.is_full = False
     pen = QPen()
     pen.setStyle(Qt.NoPen)
     self.setPen(pen)
     if not hasattr(self, 'children'):
         self.children = self.childItems
Exemplo n.º 26
0
    def __init__(self, node, refFile, srcobj):
        QGraphicsRectItem.__init__(self)
        self.__node = node
        self.__srcobj = srcobj
        self.__refFile = refFile

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__(self, posX, posY, node.width, node.height)
        pen = QPen(QColor(0, 0, 0))
        pen.setWidth(2)
        self.setPen(pen)

        # To make double click delivered
        self.setFlag(QGraphicsItem.ItemIsSelectable, True)

        self.setBrush(QColor(253, 245, 145))
        return
Exemplo n.º 27
0
 def __init__(self, width, height, tileset, boardRotation=0):
     QGraphicsRectItem.__init__(self)
     self.tiles = []
     self.isHandBoard = False
     self._focusTile = None
     self._noPen()
     self.tileDragEnabled = False
     self.setRotation(boardRotation)
     self._lightSource = 'NW'
     self.xWidth = 0
     self.xHeight = 0
     self.yWidth = 0
     self.yHeight = 0
     self.__fixedWidth = width
     self.__fixedHeight = height
     self._tileset = None
     self._showShadows = None
     self.tileset = tileset
     self.level = 0
Exemplo n.º 28
0
    def __init__( self, node, refFile, srcobj ):
        QGraphicsRectItem.__init__( self )
        self.__node = node
        self.__srcobj = srcobj
        self.__refFile = refFile

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__( self, posX, posY,
                                    node.width, node.height )
        pen = QPen( QColor( 0, 0, 0) )
        pen.setWidth( 2 )
        self.setPen( pen )

        # To make double click delivered
        self.setFlag( QGraphicsItem.ItemIsSelectable, True )

        self.setBrush( QColor( 253, 245, 145 ) )
        return
Exemplo n.º 29
0
 def __init__(self, width, height, tileset, boardRotation=0):
     QGraphicsRectItem.__init__(self)
     self.tiles = []
     self.isHandBoard = False
     self._focusTile = None
     self._noPen()
     self.tileDragEnabled = False
     self.setRotation(boardRotation)
     self._lightSource = 'NW'
     self.xWidth = 0
     self.xHeight = 0
     self.yWidth = 0
     self.yHeight = 0
     self.__fixedWidth = width
     self.__fixedHeight = height
     self._tileset = None
     self._showShadows = None
     self.tileset = tileset
     self.level = 0
Exemplo n.º 30
0
    def __init__(self, node, refFile, docstring):
        QGraphicsRectItem.__init__(self)
        self.__node = node
        self.__refFile = refFile
        self.__docstring = docstring

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__(self, posX, posY, node.width, node.height)
        pen = QPen(QColor(0, 0, 0))
        pen.setWidth(2)
        self.setPen(pen)

        self.__setTooltip()
        self.setBrush(QColor(220, 255, 220))

        # System modules are clickable
        self.setFlag(QGraphicsItem.ItemIsSelectable, True)
        return
Exemplo n.º 31
0
    def __init__(self, node, refFile, srcobj, deviceDPI):
        self.__node = node
        self.__srcobj = srcobj
        self.__refFile = refFile

        self.__pixelsPerLine = self.calcPixelsPerLine()

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__(self, posX, posY, node.width, node.height)
        pen = QPen(QColor(0, 0, 0))
        pen.setWidth(2)
        self.setPen(pen)

        self.__setTooltip()

        # To make double click delivered
        self.setFlag(QGraphicsItem.ItemIsSelectable, True)
        return
Exemplo n.º 32
0
    def __init__(self, obj, parent=None, scene=None,\
                 brush=QtGui.QBrush(), pen=QtGui.QPen(Qt.blue, 0, Qt.SolidLine)) :
        """Adds QGraphics(Rect)Item to the scene. 

        Parameters

        obj : QPointF or shape type e.g. QRectF
              obj is QPointF - shape parameters are defined at first mouse click
              obj is QRectF - it will be drawn as is
        """
        GUDragBase.__init__(self, parent, brush, pen)

        rect = None
        if isinstance(obj, QtCore.QPointF):
            rect = QtCore.QRectF(obj, obj + QtCore.QPointF(5, 5))
            self._mode = ADD

        elif isinstance(obj, QtCore.QRectF):
            rect = obj

        else:
            print 'GUDragRect - wrong init object type:', str(obj)
        parent_for_base = None
        QGraphicsRectItem.__init__(self, rect, parent_for_base, scene)
        if self._mode == ADD:
            self.grabMouse()  # makes available mouseMoveEvent

        self.setAcceptHoverEvents(True)
        #self.setAcceptTouchEvents(True)
        self.setAcceptedMouseButtons(Qt.LeftButton)

        self.setPen(self._pen_pos)
        self.setBrush(self._brush)

        # Flags: ItemIsPanel, ItemClipsChildrenToShape, ItemIsSelectable,
        # ItemIsMovable, itemClipsToShape, ItemSendsScenePositionChanges
        self.setFlags(self.ItemIsSelectable)
        #self.setEnabled(False) # is visible, but do not receive events
        #self.setVisible(False) # is not visible, do not receive events
        #self.setSelected(True)

        self.setHandlesChildEvents(True)  # will responsive to child events
Exemplo n.º 33
0
    def __init__( self, node, refFile, docstring ):
        QGraphicsRectItem.__init__( self )
        self.__node = node
        self.__refFile = refFile
        self.__docstring = docstring

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__( self, posX, posY,
                                    node.width, node.height )
        pen = QPen( QColor( 0, 0, 0) )
        pen.setWidth( 2 )
        self.setPen( pen )

        self.__setTooltip()
        self.setBrush( QColor( 220, 255, 220 ) )

        # System modules are clickable
        self.setFlag( QGraphicsItem.ItemIsSelectable, True )
        return
Exemplo n.º 34
0
    def __init__( self, ref, text ):
        QGraphicsRectItem.__init__( self )
        self.ref = ref
        self.__text = text

        self.__textRect = ref.canvas.settings.badgeFontMetrics.boundingRect(
                                                0, 0,  maxint, maxint, 0, text )
        self.__hSpacing = 2
        self.__vSpacing = 1
        self.__radius = 2

        self.__width = self.__textRect.width() + 2 * self.__hSpacing
        self.__height = self.__textRect.height() + 2 * self.__vSpacing

        self.__bgColor = ref.canvas.settings.badgeBGColor
        self.__fgColor = ref.canvas.settings.badgeFGColor
        self.__frameColor = ref.canvas.settings.badgeLineColor
        self.__font = ref.canvas.settings.badgeFont
        self.__needRect = True
        return
Exemplo n.º 35
0
    def __init__( self, node, refFile, srcobj, deviceDPI ):
        self.__node = node
        self.__srcobj = srcobj
        self.__refFile = refFile

        self.__pixelsPerLine = self.calcPixelsPerLine()

        posX = node.posX - node.width / 2.0
        posY = node.posY - node.height / 2.0
        QGraphicsRectItem.__init__( self, posX, posY,
                                    node.width, node.height )
        pen = QPen( QColor( 0, 0, 0 ) )
        pen.setWidth( 2 )
        self.setPen( pen )

        self.__setTooltip()

        # To make double click delivered
        self.setFlag( QGraphicsItem.ItemIsSelectable, True )
        return
Exemplo n.º 36
0
 def __init__(self,
              seq,
              seqtype="aa",
              poswidth=1,
              posheight=10,
              draw_text=False):
     QGraphicsRectItem.__init__(self)
     self.seq = seq
     self.seqtype = seqtype
     self.poswidth = poswidth
     self.posheight = posheight
     if draw_text:
         self.poswidth = poswidth
     self.draw_text = draw_text
     if seqtype == "aa":
         self.fg = _aafgcolors
         self.bg = _aabgcolors
     elif seqtype == "nt":
         self.fg = _ntfgcolors
         self.bg = _ntbgcolors
     self.setRect(0, 0, len(seq) * poswidth, posheight)
Exemplo n.º 37
0
    def __init__(self, faces, node, as_grid=False):

        # This caused seg. faults. in some computers. No idea why.
        # QtGui.QGraphicsItem.__init__(self, *args, **kargs) 
        QGraphicsRectItem.__init__(self)  
        self.as_grid = as_grid
        self.c2max_w = {}
        self.r2max_h = {}
        self.node = node
        self.column2faces = faces
        self.column2size = {}
        self.columns = sorted(set(self.column2faces.keys()))
        
        # Two dictionaries containing min column size. Can be used to
        # reserve some space to specific columns and draw FaceBlocks
        # like tables.
        self.column_widths = {}
        self.row_heights = {}

        self.w = 0
        self.h = 0
        # updates the size of this grid
        self.update_columns_size()
Exemplo n.º 38
0
    def __init__(self, faces, node, as_grid=False):

        # This caused seg. faults. in some computers. No idea why.
        # QtGui.QGraphicsItem.__init__(self, *args, **kargs)
        QGraphicsRectItem.__init__(self)
        self.as_grid = as_grid
        self.c2max_w = {}
        self.r2max_h = {}
        self.node = node
        self.column2faces = faces
        self.column2size = {}
        self.columns = sorted(set(self.column2faces.keys()))

        # Two dictionaries containing min column size. Can be used to
        # reserve some space to specific columns and draw FaceBlocks
        # like tables.
        self.column_widths = {}
        self.row_heights = {}

        self.w = 0
        self.h = 0
        # updates the size of this grid
        self.update_columns_size()
Exemplo n.º 39
0
 def __init__(self, whex):
     QGraphicsRectItem.__init__(self)
     self.init(whex)
Exemplo n.º 40
0
 def __init__(self, percents, width, height, colors, line_color=None):
     QGraphicsRectItem.__init__(self, 0, 0, width, height)
     self.percents = percents
     self.colors = colors
     self.line_color = line_color
Exemplo n.º 41
0
 def __init__(self, x, y, id, view):
     QGraphicsRectItem.__init__(self)
     self.initValues(x, y, id, view)
     self.initShape()
Exemplo n.º 42
0
 def __init__(self, face, node):
     QGraphicsRectItem.__init__(self)
     self.node = node
Exemplo n.º 43
0
 def __init__(self, face, node):
     QGraphicsRectItem.__init__(self)
     self.node = node
Exemplo n.º 44
0
 def __init__(self):
     QGraphicsRectItem.__init__(self)
     QObject.__init__(self)
Exemplo n.º 45
0
 def __init__(self, whex):
     QGraphicsRectItem.__init__(self)
     self.init(whex)
Exemplo n.º 46
0
 def __init__(self):
     QGraphicsRectItem.__init__(self)
     QObject.__init__(self)
Exemplo n.º 47
0
 def __init__(self, *arg, **karg):
     QGraphicsRectItem.__init__(self, *arg, **karg)
     self.node = None
     self.color_rect = None
     self.setCursor(QtCore.Qt.PointingHandCursor)
Exemplo n.º 48
0
 def __init__(self, *arg, **karg):
     QGraphicsRectItem.__init__(self, *arg, **karg)
     self.codon = None
     self.label = None
     self.setAcceptsHoverEvents(True)
Exemplo n.º 49
0
 def __init__(self, *arg, **karg):
     QGraphicsRectItem.__init__(self, *arg, **karg)
     self.node = None
     self.label = None
     self.setCursor(QtCore.Qt.PointingHandCursor)
     self.setAcceptsHoverEvents(True)
Exemplo n.º 50
0
 def __init__(self, *arg, **karg):
     QGraphicsRectItem.__init__(self, *arg, **karg)
     self.codon = None
     self.label = None
     self.setAcceptsHoverEvents(True)