
    eJ                     Z   d Z ddlZddlmZmZ  ej                  d      Z ej                         Z	e	j                  dd       e	j                  d        ej                         Ze	j                  e        ej                         Zej#                  e       e	j%                           ej&                  dd	
      a ej&                  dd	
      a ej,                         at.        j1                  d       t.        j3                  d       ej5                  t(        dd       ej5                  t*        dd       ej5                  t.        dd       dadad Z ej<                         Zej@                  jC                  e       ejE                  d       e#dk(  r ejH                          yy)z
JoystickButton is a button with x/y values. When the button is depressed and the
mouse dragged, the x/y values change to follow the mouse.
When the mouse button is released, the x/y values change to 0,0 (rather like 
letting go of the joystick).
    N)QtCore	QtWidgetszJoystick Button Examplei,  2   z!pyqtgraph example: JoystickButtonTm)siPrefixsuffix         c                      t         j                         \  } }t        | dz  z  at        |dz  z  at        j                  t               t        j                  t               y )NgMbP?)jbgetStatexyl1setValuel2)dxdys     C/usr/lib/python3/dist-packages/pyqtgraph/examples/JoystickButton.pyupdater   "   sA    [[]FBdNAdNAKKNKKN    __main__)%__doc__	pyqtgraphpgpyqtgraph.Qtr   r   mkQAppappQMainWindowmwresizesetWindowTitleQWidgetcwsetCentralWidgetQGridLayoutlayout	setLayoutshow
ValueLabelr   r   JoystickButtonr   setFixedWidthsetFixedHeight	addWidgetr   r   r   QTimertimertimeoutconnectstart__name__exec r   r   <module>r8      sn    *bii)*Y 		#b    5 6Y   B 				  V  	R]]D-R]]D-R       "    Q    Q    Q  	   f  BzBGGI r   