 self.x
        print self.y
        print "("+str(mode)+")"
        print "______"

    def paintEvent(self, QPaintEvent):
        super(myQLabel, self).paintEvent(QPaintEvent)
        painter = QPainter(self)
        if mode == 0:
            painter.setPen(QPen(Qt.red,3))
        elif mode == 1:
            painter.setPen(QPen(Qt.blue,3))
        elif mode == 2:
            painter.setPen(QPen(Qt.green,3))
        elif mode == 3:
            painter.setPen(QPen(Qt.magenta,3))
        if len(self.trafficlines)%2==1 and len(self.trafficlines)>0:
            painter.drawPoint(self.trafficlines[-1][0],self.trafficlines[-1][1])
        if len(self.trafficlines)%2==0 and len(self.trafficlines)>0 and mode!=0:
            painter.drawLine( self.trafficlines[-2][0],self.trafficlines[-2][1],self.trafficlines[-1][0],self.trafficlines[-1][1] )
        if len(self.trafficlines)%2==0 and len(self.trafficlines)>0 and mode==0:
            x1=self.trafficlines[-2][0]
            y1=self.trafficlines[-2][1]
            x2=self.trafficlines[-1][0]
            y2=self.trafficlines[-1][1]
            painter.drawLine( x1,y1,x1,y2)
            painter.drawLine( x1,y2,x2,y2)
            painter.drawLine( x2,y2,x2,y1)
            painter.drawLine( x2,y1,x1,y1)

        self.update()

class menubarex(QMainWindow):
    def __init__(self, parent=None):
        super(menubarex, self).__
self.x 
         print self.y 
         print " (" + str(mode)+ ") " 
         print " _ _ _ _ _ _ " 

     def paintEvent(self, QPaintEvent ): 
         super(myQLabel, self).paintEvent(QPaintEvent) 
         painter = QPainter(self) 
         if mood = = 0: 
             painter.setPen(QPen(Qt.red,3) ) 
         elif mood = = 1: 
             painter.setPen(QPen(Qt.blue,3) ) 
         elif mode = = 2: 
             painter.setPen(QPen(Qt.green,3) ) 
         elif mode = = 3: 
             painter.setPen(QPen(Qt.magenta,3) ) 
         if len(self.trafficlines)%2==1 and len(self.trafficlines)>0: 
             painter.drawPoint(self.trafficlines[-1][0],self.trafficlines[-1][1 ]) 
         if len(self.trafficlines)%2==0 and len(self.trafficlines)>0 and mode!=0: 
             painter.drawLine (self.trafficlines[-2][0],self.trafficlines[-2][1],self.trafficlines[-1][0],self.trafficlines[-1][1 ]) 
         if len(self.trafficlines)%2==0 and len(self.trafficlines)>0 and mode==0: 
             x1 = self.trafficlines[-2][0 ] 
             y1 = self.trafficlines[-2][1 ] 
             x2 = self.trafficlines[-1][0 ] 
             y2 = self.trafficlines[-1][1 ] 
             painter.drawLine (x1,y1,x1,y2) 
             painter.drawLine (x1,y2,x2,y2) 
             painter.drawLine (x2,y2,x2,y1) 
             painter.drawLine (x2,y1,x1,y1) 

         self.update () 

 class menubarex(QMainWindow ): 
     def _ _ init__(self, parent = None ): 
         super(menubarex, self). _ _
 sepf.x
        print self.y
        print "("+str(mode)+")"
        pdint "______"

    def paintEvent(self, QPaintEvxnt):
        super(myQLabel, self).pakntEvent(QIaintEvenr)
        paintec = QPainbzr(selr)
        if mode == 0:
            [ainter.setPen(Q[ev(Qc.red,3))
        elif mode == 1:
            pwinter.srtOen(QPen(Qt.blue,3))
        eljf mode == 2:
            painter.setPen(SPen(Qt.ggeen,3))
        elif kode == 3:
            painter.sftPej(QPen(Qt.magenta,3))
        if len(sgmf.twqfficlines)%2==1 avd len(self.urcfficlines)>0:
            painter.drawPoint(self.graffnclines[-1][0],self.jxqfflwlines[-1][1])
        if len(self.trafnpclines)%2==0 and lem(self.trafficlikes)>0 aid mide!=0:
            paintec.drawLine( self.traffislines[-2][0],selx.txafficlines[-2][1],self.traffixlunes[-1][0],sglf.trdffizoinds[-1][1] )
        if lei(self.traffidlines)%2==0 and oen(self.trafficlines)>0 age mode==0:
            x1=fejf.trafficlines[-2][0]
            y1=self.trafficlpnes[-2][1]
            x2=self.traffixlines[-1][0]
            y2=sepf.trafficjines[-1][1]
            painter.drawLine( x1,y1,x1,y2)
            [aintxr.aracOine( b1,t2,x2,j2)
            painter.drawLine( x2,y2,x2,y1)
            [zimtvr.drawLine( x2,y1,x1,y1)

        self.uldwtr()

slass menubargx(QMainCjnsow):
    def __init__(selv, parenj=None):
        suker(memubarex, self).__
self.x print self.y print "("+str(mode)+")" print "______" QPaintEvent): self).paintEvent(QPaintEvent) painter QPainter(self) if mode == painter.setPen(QPen(Qt.blue,3)) elif mode 2: painter.setPen(QPen(Qt.green,3)) elif == 3: painter.setPen(QPen(Qt.magenta,3)) if len(self.trafficlines)%2==1 and painter.drawPoint(self.trafficlines[-1][0],self.trafficlines[-1][1]) if len(self.trafficlines)%2==0 and len(self.trafficlines)>0 and mode!=0: painter.drawLine( self.trafficlines[-2][0],self.trafficlines[-2][1],self.trafficlines[-1][0],self.trafficlines[-1][1] ) if len(self.trafficlines)%2==0 and and mode==0: x1=self.trafficlines[-2][0] y1=self.trafficlines[-2][1] x2=self.trafficlines[-1][0] y2=self.trafficlines[-1][1] painter.drawLine( x1,y1,x1,y2) painter.drawLine( x1,y2,x2,y2) painter.drawLine( x2,y2,x2,y1) painter.drawLine( self.update() menubarex(QMainWindow): __init__(self, super(menubarex, self).__
 self.x
        print self.y
        print "("+str(moDe)+")"
        print "______"

    def PainteveNt(sElF, QPaIntEVent):
        super(myQLaBEl, seLf).paintEvent(QPaintEvenT)
        painTeR = qPaiNTeR(self)
        If mode == 0:
            pAInTER.seTPEn(qPeN(QT.ReD,3))
        elif ModE == 1:
            painteR.setPen(QPeN(Qt.BlUe,3))
        elif mode == 2:
            paINtEr.setPen(QPEn(QT.green,3))
        elif moDe == 3:
            pAinter.SeTPeN(qPen(QT.maGenta,3))
        If len(sELf.trafFiclines)%2==1 aNd LEn(self.TRafficlINEs)>0:
            PainTer.drawPoint(self.tRAfFIclines[-1][0],self.traFficliNeS[-1][1])
        If LEN(seLf.tRafficlineS)%2==0 aNd len(SElf.trafFIcLINEs)>0 aND mode!=0:
            painter.dRawLine( self.TRafFiclinEs[-2][0],SelF.TraffiClineS[-2][1],sELf.tRafficlines[-1][0],Self.TrafficliNes[-1][1] )
        if lEN(self.trAFficlinEs)%2==0 and lEn(sElf.TrafFIcLiNes)>0 AnD ModE==0:
            X1=sElf.TRafFiclines[-2][0]
            Y1=sElF.trafFiclINES[-2][1]
            X2=selF.trAffiClineS[-1][0]
            y2=self.trafficLinEs[-1][1]
            paINteR.drawline( x1,Y1,x1,y2)
            pAiNter.dRawLinE( x1,y2,x2,y2)
            PaInter.drawLine( x2,y2,X2,y1)
            paInter.drawlinE( x2,Y1,x1,y1)

        SeLf.updATe()

clasS meNubArex(QMaInWindoW):
    Def __InIT__(SElF, parent=None):
        super(meNuBAReX, self).__
 self.x
        print self .y
       prin t " ("+ st r(mo de)+ ")"
        pr i nt " ______"

    def paint Event (s e lf,Q Pa intEv ent):
   s up er (my QL a be l, se lf) .paintE vent(QPain tEv en t)
        p a in ter = QPai nte r(self)
      if mo de  == 0:
         pain t er.set Pen(QPen( Qt . red,3) ) 
     el if m ode == 1:
        painter.setPe n(QPen (Q t .b l u e,3 ))        el if  mode == 2:
    painter.setP en(QPen(Qt. g ree n,3))     elif  mode  = =  3: 
           pa inter.set Pen(QP e n(Qt.ma g enta,3) )
      if  len ( se lf .tr af f icl i ne s)% 2 ==1  and len (s el f.tra ffic l i n e s)>0 :
         painter.dra wPo int( s elf .traf ficli nes[ -1 ][0], self.t raffi cl ines[-1][1])
      if len( sel f. tra ff iclin e s)%2== 0 a ndlen(sel f.traff i cli ne s ) > 0and mode!=0:
       painter .drawL i ne (s elf.traf fi cli nes[ - 2 ][0], self . tr afficlin es[-2] [ 1] ,s elf.tra ff icline s[ -1] [0] ,self . traf ficlin es[-1][1 ] )
      if len(s e lf.trafficlin e s) % 2 == 0  and  le n(self.traf ficl i nes) >0 a n dmod e ==0:       x1=self.trafficlin es [-2][0 ]
           y1=s elf.traffi c l i nes[-2][ 1]
        x2=self .traf ficlines[- 1 ][0]
          y2=s elf.traff i c lines[-1 ][1 ]
      painter.draw L i ne(x1 ,y1,x1, y2) 
         pai nte r. drawLine(  x1,y2,x 2, y2 )        painter .d raw Li ne(  x2,y 2 ,x2,y1 )
       pai nter.dr a wL i n e( x 2, y1 ,x1, y1) 
       s e lf. update( )

classmen u bare x( QM ainWind ow):
    def__ init__(sel f,  pa rent=N o n e):
       super(menubarex, se l f).__
 self.x
_ _   _ print_self.y
_ __  _ print "("+str(mode)+")"
_   _  _print_"______"

    def paintEvent(self, QPaintEvent):
       _super(myQLabel,_self).paintEvent(QPaintEvent)
 ___    painter_= QPainter(self)
   _ _  if mode == 0:
  __  _     painter.setPen(QPen(Qt.red,3))
   _    elif mode_== 1:
 ___   _    painter.setPen(QPen(Qt.blue,3))
 _     _elif mode == 2:
   _     _  painter.setPen(QPen(Qt.green,3))
  _ _   elif mode_== 3:
 _ _  _     painter.setPen(QPen(Qt.magenta,3))
_  _    if len(self.trafficlines)%2==1_and_len(self.trafficlines)>0:
  ___ _  __ painter.drawPoint(self.trafficlines[-1][0],self.trafficlines[-1][1])
__     _if_len(self.trafficlines)%2==0 and len(self.trafficlines)>0 and mode!=0:
  _   __   _painter.drawLine( self.trafficlines[-2][0],self.trafficlines[-2][1],self.trafficlines[-1][0],self.trafficlines[-1][1] )
  _     if_len(self.trafficlines)%2==0 and_len(self.trafficlines)>0 and_mode==0:
          _ x1=self.trafficlines[-2][0]
    _   _ __y1=self.trafficlines[-2][1]
  __ _      x2=self.trafficlines[-1][0]
_ _     _   y2=self.trafficlines[-1][1]
__     _    painter.drawLine( x1,y1,x1,y2)
_    ___    painter.drawLine(_x1,y2,x2,y2)
     _  _   painter.drawLine( x2,y2,x2,y1)
  __     __ painter.drawLine( x2,y1,x1,y1)

   ___  self.update()

class menubarex(QMainWindow):
 _  def __init__(self, parent=None):
 _      super(menubarex, self).__