def paintMilestone( self, painter ):
        """
        Paints this item as the milestone look.
        
        :param      painter | <QPainter>
        """
        # generate the rect
        rect    = self.rect()
        
        padding = self.padding()
        gantt   = self.scene().ganttWidget()
        cell_w  = gantt.cellWidth()
        cell_h  = gantt.cellHeight()
        
        x       = rect.width() - cell_w
        y       = self.padding()
        w       = cell_w
        h       = rect.height() - padding - 2
        
        # grab the color options
        color       = self.color()
        alt_color   = self.alternateColor()
        
        if ( self.isSelected() ):
            color       = self.highlightColor()
            alt_color   = self.alternateHighlightColor()
        
        # create the background brush
        gradient = QLinearGradient()
        gradient.setStart(0, 0)
        gradient.setFinalStop(0, h)
        
        gradient.setColorAt(0,   color)
        gradient.setColorAt(0.8, alt_color)
        gradient.setColorAt(1,   color)
        
        painter.setPen(self.borderColor())
        painter.setBrush(QBrush(gradient))
        
        pen = painter.pen()
        pen.setWidthF(0.5)
        painter.setPen(pen)
        painter.setRenderHint( painter.Antialiasing )
        
        path = QPainterPath()
        path.moveTo(x - cell_w / 3.0, y + h / 2.0)
        path.lineTo(x, y)
        path.lineTo(x + cell_w / 3.0, y + h / 2.0)
        path.lineTo(x, y + h)
        path.lineTo(x - cell_w / 3.0, y + h / 2.0)
        
        painter.drawPath(path)
def paintMilestone ( self , painter ) : rect = self . rect ( ) padding = self . padding ( ) gantt = self . scene ( ) . ganttWidget ( ) cell_w = gantt . cellWidth ( ) cell_h = gantt . cellHeight ( ) x = rect . width ( ) - cell_w y = self . padding ( ) w = cell_w h = rect . height ( ) - padding - 2 color = self . color ( ) alt_color = self . alternateColor ( ) if ( self . isSelected ( ) ) : color = self . highlightColor ( ) alt_color = self . alternateHighlightColor ( ) gradient = QLinearGradient ( ) gradient . setStart ( 0 , 0 ) gradient . setFinalStop ( 0 , h ) gradient . setColorAt ( 0 , color ) gradient . setColorAt ( 0.8 , alt_color ) gradient . setColorAt ( 1 , color ) painter . setPen ( self . borderColor ( ) ) painter . setBrush ( QBrush ( gradient ) ) pen = painter . pen ( ) pen . setWidthF ( 0.5 ) painter . setPen ( pen ) painter . setRenderHint ( painter . Antialiasing ) path = QPainterPath ( ) path . moveTo ( x - cell_w / 3.0 , y + h / 2.0 ) path . lineTo ( x , y ) path . lineTo ( x + cell_w / 3.0 , y + h / 2.0 ) path . lineTo ( x , y + h ) path . lineTo ( x - cell_w / 3.0 , y + h / 2.0 ) painter . drawPath ( path )
Paints this item as the milestone look.
        
        :param      painter | <QPainter>