Exemple #1
0
 def __init__(self, ctx, parent):
     QtCore.QThread.__init__(self, parent)
     self.ctx = ctx
     self._abort = False
     self._stop = False
     self._mutex = QtCore.QMutex()
     self._condition = QtCore.QWaitCondition()
Exemple #2
0
    def __init__(self,shared=None, rendering_parameters=None, *args, **kwargs):
        f = QtOpenGL.QGLFormat()
        f.setVersion(3,2)
        f.setSamples(8)
        # f.setProfile(QtOpenGL.QGLFormat.CompatibilityProfile)
        f.setProfile(QtOpenGL.QGLFormat.CoreProfile)
        if _debug:
            f.setOption(QtGui.QSurfaceFormat.DebugContext)
        QtOpenGL.QGLFormat.setDefaultFormat(f)
        super().__init__(shareWidget=shared, *args, **kwargs)
        if shared is None:
            self.context().setFormat(f)
            self.context().create()
        self.scenes = []
        self._rotation_enabled = True
        self.do_rotate = False
        self.do_translate = False
        self.do_zoom = False
        self.do_move_clippingplane = False
        self.do_rotate_clippingplane = False
        self.old_time = time.time()

        self.redraw_update_done = QtCore.QWaitCondition()
        self.redraw_mutex = QtCore.QMutex()

        self._settings = scenes.RenderingSettings(name="Global settings") 
        self._settings.interpolationChanged.connect(self.updateScenes)

        self.lastPos = QtCore.QPoint()
        self.lastFastmode = self._settings.fastmode
Exemple #3
0
 def __init__(self, *args, **kargs):
     if kargs.get('recursive', False):
         args = (QtCore.QMutex.Recursive, )
     QtCore.QMutex.__init__(self, *args)
     self.mutex = QtCore.QMutex()  # for serializing access to self.tb
     self.tb = []
     self.debug = kargs.pop('debug',
                            False)  # True to enable debugging functions
Exemple #4
0
 def __init__(self,laser,hostname,config='relocker',gui=False):
     self.laser = laser
     self.p = Pyrpl(hostname=hostname,config=config,gui=gui)#,modules=[])
     # self.p.hide_gui()
     self.rp = self.p.rp
     self.scope = self.rp.scope
     
     self.scope_queue = queue.Queue()
     self.scope_queue_wait = QtCore.QWaitCondition()
     self.scope_queue_mutex = QtCore.QMutex()
     self.scope_queuer = ScopeQueuer(self.scope_queue,self.scope_queue_wait,self.scope_queue_mutex)
     self.scope_queuer.start()
     #self.scope_queuer.signal.connect(partial(self.set_scope_duration))
     self.scope_queuer.signal.connect(self.get_scope_trace) 
Exemple #5
0
 def __init__(self, worker, delay=500, show_tooltip=True):
     """
     :param worker: The process function or class to call remotely.
     :param delay: The delay used before running the analysis process when
                   trigger is set to
                   :class:pyqode.core.modes.CheckerTriggers`
     :param show_tooltip: Specify if a tooltip must be displayed when the
                          mouse is over a checker message decoration.
     """
     Mode.__init__(self)
     QtCore.QObject.__init__(self)
     # max number of messages to keep good performances
     self.limit = 200
     self._job_runner = DelayJobRunner(delay=delay)
     self._messages = []
     self._worker = worker
     self._mutex = QtCore.QMutex()
     self._show_tooltip = show_tooltip
     self._pending_msg = []
     self._finished = True