def __init__(self,parent,name,uifile = 'LookupScan.ui',cmd_name = 'ltscan',**kwargs) :
        BaseGraphicScan.__init__(self, parent, name, uifile=uifile, cmd_name=cmd_name, **kwargs)
        self._graphicSelection = None
        self.__polyNb = 0
        self.__gridPoints = None
        self._matchPoints = None
        self.__offsetMeasure = 1e3
        self._ltinit = None
        
        self.addProperty('offsetmeasure','float',1e3)
        
        table = self._widgetTree.child('__gridTable')
        qt.QObject.connect(table,qt.SIGNAL('valueChanged(int,int)'),self._valueChangedScanParam)

        timeWidget = self._widgetTree.child('__time')
        timeWidget.setValidator(qt.QDoubleValidator(timeWidget))
        # PopUp Menu
        self.__polygonListWidget = self._widgetTree.child('__polygonList')
        self.__polygonListWidget.setSelectionMode(qt.QListView.Extended)

        self.__polygonPopUpMenu = qt.QPopupMenu(self.__polygonListWidget)
        for itemName,cbk in [('Create new',self.__createPolygon),
                             ('Remove',self.__removeSelectedPolygon),
                             ('Revert selection',self.__revertSelectedPolygon)] :
            self.__polygonPopUpMenu.insertItem(itemName,cbk)

        self.connect(self.__polygonListWidget,qt.SIGNAL('rightButtonPressed(QListViewItem*,const QPoint &,int)'),
                     self.__polygonPopUpDisplay)

        timeWidget = self._widgetTree.child('__time')
        self.connect(timeWidget,qt.SIGNAL('returnPressed()'),self.__refreshInfoText)
        self.connect(timeWidget,qt.SIGNAL('lostFocus()'),self.__refreshInfoText)
    def __init__(self,parent,name,uifile = 'LookupScan.ui',cmd_name = 'ltscan',**kwargs) :
        BaseGraphicScan.__init__(self, parent, name, uifile=uifile, cmd_name=cmd_name, **kwargs)
        self._graphicSelection = None
        self.__polyNb = 0
        self.__gridPoints = None
        self._matchPoints = None
        self.__offsetMeasure = 1e3
        self._ltinit = None
        
        self.addProperty('offsetmeasure','float',1e3)
        
        table = self._widgetTree.child('__gridTable')
        qt.QObject.connect(table,qt.SIGNAL('valueChanged(int,int)'),self._valueChangedScanParam)

        timeWidget = self._widgetTree.child('__time')
        timeWidget.setValidator(qt.QDoubleValidator(timeWidget))
        # PopUp Menu
        self.__polygonListWidget = self._widgetTree.child('__polygonList')
        self.__polygonListWidget.setSelectionMode(qt.QListView.Extended)

        self.__polygonPopUpMenu = qt.QPopupMenu(self.__polygonListWidget)
        for itemName,cbk in [('Create new',self.__createPolygon),
                             ('Remove',self.__removeSelectedPolygon),
                             ('Revert selection',self.__revertSelectedPolygon)] :
            self.__polygonPopUpMenu.insertItem(itemName,cbk)

        self.connect(self.__polygonListWidget,qt.SIGNAL('rightButtonPressed(QListViewItem*,const QPoint &,int)'),
                     self.__polygonPopUpDisplay)

        timeWidget = self._widgetTree.child('__time')
        self.connect(timeWidget,qt.SIGNAL('returnPressed()'),self.__refreshInfoText)
        self.connect(timeWidget,qt.SIGNAL('lostFocus()'),self.__refreshInfoText)
Exemplo n.º 3
0
    def __init__(self, parent, name, **kwargs):
        BaseGraphicScan.__init__(self,
                                 parent,
                                 name,
                                 uifile='Mesh.ui',
                                 cmd_name='mesh',
                                 **kwargs)

        self.__rect = None

        meshTable = self._widgetTree.child('__table')
        qt.QObject.connect(meshTable, qt.SIGNAL('valueChanged(int,int)'),
                           self._valueChangedScanParam)
        gButton = self._widgetTree.child('__grabButton')
        meshTable.setColumnReadOnly(5, True)

        filloutButton = self._widgetTree.child('__fillout')
        qt.QObject.connect(filloutButton, qt.SIGNAL('clicked()'),
                           self.__fillout)

        # TABLE SIZE HACKED
        height = meshTable.rowHeight(0) * (meshTable.numRows() + 1) + 5
        vheaders = meshTable.verticalHeader()
        hheaders = meshTable.horizontalHeader()
        width = vheaders.headerWidth() + hheaders.headerWidth() + 5
        meshTable.setMaximumSize(width, height)
        meshTable.setMinimumSize(width, height)
Exemplo n.º 4
0
 def __init__(self,parent,name,**kwargs) :
     BaseGraphicScan.__init__(self,parent,name,uifile = 'A2Scan.ui',cmd_name='a2scan',**kwargs)
     self.__points = []
                    ####### INIT GUI #######
     aTable = self._widgetTree.child('__table')
     qt.QObject.connect(aTable,qt.SIGNAL('valueChanged(int,int)'),self._valueChangedScanParam)
     aTable.setColumnReadOnly(4,True)
             
     intervals = self._widgetTree.child('__intervals')
     intervals.setValidator(qt.QIntValidator(intervals))
     qt.QObject.connect(intervals,qt.SIGNAL('returnPressed ()'),self.__intervalsChanged)
     qt.QObject.connect(intervals,qt.SIGNAL('lostFocus()'),self.__intervalsChanged)
     
     timeWidget = self._widgetTree.child('__time')
     timeWidget.setValidator(qt.QDoubleValidator(timeWidget))
Exemplo n.º 5
0
    def __init__(self,parent,name,**kwargs) :
        BaseGraphicScan.__init__(self,parent,name,uifile = 'Mesh.ui',cmd_name = 'mesh',**kwargs)

        self.__rect = None

        meshTable = self._widgetTree.child('__table')
        qt.QObject.connect(meshTable,qt.SIGNAL('valueChanged(int,int)'),self._valueChangedScanParam)
        gButton = self._widgetTree.child('__grabButton')
        meshTable.setColumnReadOnly(5,True)
        
        filloutButton = self._widgetTree.child('__fillout')
        qt.QObject.connect(filloutButton,qt.SIGNAL('clicked()'),self.__fillout)
        
        # TABLE SIZE HACKED
        height = meshTable.rowHeight(0) * (meshTable.numRows() + 1) + 5
        vheaders = meshTable.verticalHeader()
        hheaders = meshTable.horizontalHeader()
        width = vheaders.headerWidth() + hheaders.headerWidth() + 5
        meshTable.setMaximumSize(width,height)
        meshTable.setMinimumSize(width,height)
Exemplo n.º 6
0
    def __init__(self,parent,name,uifile = 'MxLookupScan.ui',**kwargs) :
        BaseGraphicScan.__init__(self, parent, name, uifile=uifile, **kwargs)
        self._graphicSelection = None
        self.__gridPoints = None
        self._matchPoints = None
        self.__offsetMeasure = 1e3
        self.old_mot1_pos = None
        self.old_mot2_pos = None
        self._shape_history = None
        
        self.addProperty('offsetmeasure','float',1e3)
        self.defineSignal("addToQueue", ())
        self.defineSignal('clearQueue', ())
        self.defineSignal("dataCollectParametersRequest", ())
        self.defineSignal("goToCollect", ())

        table = self._widgetTree.child('__gridTable')
        qt.QObject.connect(table,qt.SIGNAL('valueChanged(int,int)'),self._valueChangedScanParam)

        timeWidget = self._widgetTree.child('__time')
        timeWidget.setValidator(qt.QDoubleValidator(timeWidget))
        timeWidget = self._widgetTree.child('__time')
Exemplo n.º 7
0
    def __init__(self, parent, name, **kwargs):
        BaseGraphicScan.__init__(self,
                                 parent,
                                 name,
                                 uifile='A2Scan.ui',
                                 cmd_name='a2scan',
                                 **kwargs)
        self.__points = []
        ####### INIT GUI #######
        aTable = self._widgetTree.child('__table')
        qt.QObject.connect(aTable, qt.SIGNAL('valueChanged(int,int)'),
                           self._valueChangedScanParam)
        aTable.setColumnReadOnly(4, True)

        intervals = self._widgetTree.child('__intervals')
        intervals.setValidator(qt.QIntValidator(intervals))
        qt.QObject.connect(intervals, qt.SIGNAL('returnPressed ()'),
                           self.__intervalsChanged)
        qt.QObject.connect(intervals, qt.SIGNAL('lostFocus()'),
                           self.__intervalsChanged)

        timeWidget = self._widgetTree.child('__time')
        timeWidget.setValidator(qt.QDoubleValidator(timeWidget))
Exemplo n.º 8
0
    def __init__(self, parent, name, uifile='MxLookupScan.ui', **kwargs):
        BaseGraphicScan.__init__(self, parent, name, uifile=uifile, **kwargs)
        self._graphicSelection = None
        self.__gridPoints = None
        self._matchPoints = None
        self.__offsetMeasure = 1e3
        self.old_mot1_pos = None
        self.old_mot2_pos = None
        self._shape_history = None

        self.addProperty('offsetmeasure', 'float', 1e3)
        self.defineSignal("addToQueue", ())
        self.defineSignal('clearQueue', ())
        self.defineSignal("dataCollectParametersRequest", ())
        self.defineSignal("goToCollect", ())

        table = self._widgetTree.child('__gridTable')
        qt.QObject.connect(table, qt.SIGNAL('valueChanged(int,int)'),
                           self._valueChangedScanParam)

        timeWidget = self._widgetTree.child('__time')
        timeWidget.setValidator(qt.QDoubleValidator(timeWidget))
        timeWidget = self._widgetTree.child('__time')
        timeWidget.hide()