Ejemplo n.º 1
0
    def __init__(self, display):
        Tool.__init__(self, display)

        self.timer = QtCore.QTimer()
        self.timer.timeout.connect(self._grabImage)
        self.firstTime = True

        pa = self.setParameterMenu()

        self.pGrayscale = pa.addChild({
            'name': 'Grayscale',
            'type': 'bool',
            'value': True}) 

        self.pFloat = pa.addChild({
            'name': 'To float',
            'type': 'bool',
            'value': True}) 
        
        pFrequency = pa.addChild({
            'name': 'Read frequency [Hz]',
            'type': 'float',
            'value': 20.0,
            'limits':[0,1000]}) 
        pFrequency.sigValueChanged.connect(self._setInterval)
        
        self._setInterval(pFrequency, pFrequency.value())

        self.pBuffer = pa.addChild({
            'name': 'Buffer last n images',
            'type': 'int',
            'value': 0}) 
Ejemplo n.º 2
0
    def __init__(self, display):
        QtCore.QThread.__init__(self)

        self.display = display
        self.progressBar = display.workspace.gui.progressBar
        self._status_timer = QtCore.QTimer()
        self._curFile_n = 0
        self._firstTime = True
Ejemplo n.º 3
0
 def start(self):
     '''
     configure the server and check the 
     message-inbox every self.opts['refeshrate']
     '''
     self.configure()
     self.timer = QtCore.QTimer()
     self.timer.timeout.connect(self.checkInbox)
     self.timer.start(self.opts['refreshrate'])
Ejemplo n.º 4
0
 def start(self):
     '''
     configure the server and check the 
     message-inbox every self.opts['refeshrate']
     '''
     self._files = PathStr(self.opts['folder']).listdir()
     
     self.timer = QtCore.QTimer()
     self.timer.timeout.connect(self.checkFolder)
     self.timer.start(self.opts['refreshrate'])
Ejemplo n.º 5
0
    def __init__(self, scriptTab, automation, refreshrate):
        QtCore.QThread.__init__(self)

        self.scriptTab = scriptTab
        self.automation = automation
        #CREATE AND EXTEND THE GLOBALS USED FOR EXECUTING THE SCRIPT:
        self._globals = _ExecGlobalsDict(automation.display)
        self._globals.update({  #'wait':self.wait,
            'timed': self._getAndRegisterTimer,
            'new': self._addActiveWidget
        })
        k = self._globals.keys()
        for b in BUILTINS_DICT.keys():
            k.remove(b)

        self._widgetUpdateTimer = QtCore.QTimer()
        self._widgetUpdateTimer.timeout.connect(self.automation._updateWidget)
        self.setRefreshrate(refreshrate)