def __init__(self, framework, queueDataModel, resultsDataModel, parent=None): QThread.__init__(self, parent) self.framework = framework self.queueDataModel = queueDataModel self.resultsDataModel = resultsDataModel self.qlock = QMutex() self.qlock_analysis = QMutex() QObject.connect(self, SIGNAL('quit()'), self.quitHandler) QObject.connect(self, SIGNAL('started()'), self.startedHandler) self.re_delim = re.compile(r'([;&])') self.re_unique_marker_base = re.compile( re.escape(self.UNIQUE_MARKER_BASE), re.I) self.pending_fuzz_response_ids = deque() self.analysis_queue = deque() self.processed_urls = {} self.Data = None self.read_cursor = None self.read_cursor2 = None self.write_cursor = None
def __init__(self, pdbConnector): QThread.__init__(self) self.resultRecordQueue = deque() self.resultRecordMutex = QMutex() self.resultRecordSem = QSemaphore(0) self.resultConsoleQueue = deque() self.resultConsoleMutex = QMutex() self.resultConsoleSem = QSemaphore(0) self.parser = PdbParser(pdbConnector, self) self.pdbConnector = pdbConnector
def __init__(self, framework, parent=None): QThread.__init__(self, parent) self.framework = framework self.qlock = QMutex() self.cursor = None QObject.connect(self, SIGNAL('quit()'), self.quitHandler) QObject.connect(self, SIGNAL('started()'), self.startedHandler)
def __init__(self, parent): QThread.__init__(self) self.result = None self.parent = parent self._stopped = False self.mutex = QMutex() self.filePrefix = None self.fileFormat = None self.wallColoring = None self.cellColoring = None self.pointColoring = None self.extraDrawing = [] self.pointSize = None self.pointLineColor = None self.pointLineThickness = None self.ellipsisDraw = None self.overSampling = None self.wallThickness = None self.bgColor = None self.loading = False self._crop = QRect(0, 0, 1, 1) self._pix = None self._end_image_plot = False self._loading_arguments = {} self.retryObject = None
def __init__(self, label, parent=None): QRunnable.__init__(self) self.label = label self.parent = parent self.data = None self.mutex = QMutex() self.setAutoDelete(True)
def __init__(self, name="", parent=None): super().__init__(parent) self.mutex = QMutex() self.name = name self.data = np.array([1, 2, 3]) self.string = "" self.isInterrupted = False
def __init__(self, parent): QThread.__init__(self, parent) self.mutex = QMutex() self.stopped = False self.results = None self.nb = None self.error_flag = None
def initInnerParameters(self, filepath): """ Initialize the inner parameters. """ self._mutex = QMutex() self._windows = [] self.initData() self._isUpdatingImage = False self._font_size_button = 16 # [pixel] self._font_size_groupbox_title = 12 # [pixel] self._font_size_label = 11 # [pixel] self._font_bold_label = True self._init_window_width = 1600 # [pixel] self._init_window_height = 700 # [pixel] self._init_button_color = "#EBF5FB" self.main_bgcolor = "#FDF2E9" self._get_data_interval = 1 # [sec] self._get_data_worker_sleep_interval = self._get_data_interval - 0.1 # [sec] self._update_image_interval = 2 # [sec] self._get_update_delay = 1 # [sec] self._check_window_interval = 1 # [sec] self._currentDir = os.path.dirname(__file__) self._online = False self._closing_dialog = True if os.path.exists( os.path.join(os.path.dirname(__file__), "config.json")): self.loadConfig() if not os.path.exists( os.path.join(os.path.dirname(__file__), "config_getdata.json")): raise FileNotFoundError("config_getdata.json") self.loadConfigGetData()
def __init__(self, name="", parent=None): super().__init__(parent) self.mutex = QMutex() self.name = name self.data = None self.stopWorking = False self.sleepInterval = 1
def __init__(self, lock, instr_hub, parent=None): print("DTT created") super(DataTaker, self).__init__(parent) self.instr_hub = instr_hub self.connect(self.instr_hub, SIGNAL("changed_list()"), self.reset_lists) self.lock = lock self.stopped = True self.paused = False self.mutex = QMutex() self.completed = False self.DEBUG = IOTool.get_debug_setting() #the script which is run everytime the user call the routine "run" self.script_file_name = '' #a dict that can be populated by variable the user would like to change #in real time while the script is ran self.user_variables = {} self.t_start = None # scriptize the intruments and their parameters self.reset_lists()
def __init__(self, weboob, parent=None): QObject.__init__(self, parent) self.weboob = weboob self.weboob.callbacks['login'] = self.callback(self.LoginRequest) self.mutex = QMutex() self.requests = [] self.connect(self, SIGNAL('new_request'), self.do_request)
def __init__(self, files, needPrj): QThread.__init__(self, QThread.currentThread()) self.inFiles = files self.needPrj = needPrj self.mutex = QMutex() self.stopMe = 0
def __init__(self, lock, parent=None): super(Walker, self).__init__(parent) self.lock = lock self.stopped = False self.mutex = QMutex() self.path = None self.completed = False
def __init__(self, label, parent=None): QRunnable.__init__(self) self.imap = None self.label = label self.parent = parent self.mutex = QMutex() self.login()
def __init__( self, arrayrequest, colorTable, normalize, direct=False ): self._mutex = QMutex() self._arrayreq = arrayrequest self._colorTable = colorTable self.direct = direct self._normalize = normalize assert normalize is None or len(normalize) == 2
def __init__(self, iface): QDockWidget.__init__(self, iface.mainWindow()) self.setupUi(self) self.iface = iface self.search_threads = None # [] if hasattr(self.txtSearch, 'setPlaceholderText'): self.txtSearch.setPlaceholderText(self.tr("Search string...")) self.delay_timer = QTimer(self) self.delay_timer.setSingleShot(True) self.delay_timer.setInterval(250) self.delay_timer.timeout.connect(self.start_search) self.txtSearch.textChanged.connect(self.delay_timer.start) self.one_process_work = QMutex() # self.wSearchResult = QWidget() # self.lSearchResult = QVBoxLayout(self.wSearchResult) # self.saSearchResult.setWidget(self.wSearchResult) # self.saSearchResult.setWidgetResizable(True) self.add_last_used_services()
def __init__(self, weboob, parent=None): QObject.__init__(self, parent) self.weboob = weboob self.weboob.requests.register('login', self.callback(self.LoginRequest)) self.mutex = QMutex() self.requests = [] self.new_request.connect(self.do_request)
def __init__(self, rect): self._mutex = QMutex() self.image = QImage(rect.width(), rect.height(), QImage.Format_ARGB32_Premultiplied) self.image.fill(0x00000000) self._topLeft = rect.topLeft() # Whenever the underlying data changes, the data version is incremented. # By comparing the data version to the image and request version, it can # be determined if the content of this tile is recent or needs to be # re-computed. # version of the data self.dataVer = 0 # version of self.image # # If self.imgVer < self.dataVer, the image needs to be re-computed # from the new data. self.imgVer = -1 # version of the request that has been generated to update the contents # of self.image # # If self.reqVer == self.dataVer, a request is currently running that will # eventually replace self.image with the new data. self.reqVer = -2
def __init__(self, backend): super(DataStore, self).__init__() self.backend = backend self.mutex = QMutex(QMutex.Recursive) self.people = {} self.timeLog = [] self.clockedIn = {} self.badgeToId = {}
def __init__( self, r, g, b, a, shape, normalizeR=None, normalizeG=None, normalizeB=None, normalizeA=None ): self._mutex = QMutex() self._requests = r, g, b, a self._normalize = [normalizeR, normalizeG, normalizeB, normalizeA] shape.append(4) self._data = np.empty(shape, dtype=np.uint8) self._requestsFinished = 4 * [False,]
def __init__(self, parent): """ Initializer. @param parent parent of this object; should be a Session instance @return None """ QThread.__init__(self, parent) self.queue = [] self.mutex = QMutex()
def __init__(self, framework, queueDataModel, pendingResponsesDataModel, pendingAnalysisDataModel, internalStateDataModel, parent=None): QThread.__init__(self, parent) self.framework = framework self.queueDataModel = queueDataModel self.pendingResponsesDataModel = pendingResponsesDataModel self.pendingAnalysisDataModel = pendingAnalysisDataModel self.internalStateDataModel = internalStateDataModel self.qlock = QMutex() self.qlock_analysis = QMutex() QObject.connect(self, SIGNAL('quit()'), self.quitHandler) QObject.connect(self, SIGNAL('started()'), self.startedHandler)
def __init__(self, layers, isFiles): QThread.__init__(self, QThread.currentThread()) self.layers = layers self.isFiles = isFiles self.mutex = QMutex() self.stopMe = 0 self.errors = []
def __init__(self, searcher, parent): QThread.__init__(self, parent) self._searcher = searcher self._quit = False self._mutex = QMutex() self._pending = QWaitCondition() self._collector = None self._query = None self._result = None
def __init__(self, parent): QThread.__init__(self) self.parent = parent self.data = None self.list_img = None self._method = None self._cells_selection = None self.mutex = QMutex() self.filename = None self._stop = False
def __init__(self, dir, shapes, inputEncoding, outputFileName, outputEncoding): QThread.__init__(self, QThread.currentThread()) self.baseDir = dir self.shapes = shapes self.inputEncoding = inputEncoding self.outputFileName = outputFileName self.outputEncoding = outputEncoding self.mutex = QMutex() self.stopMe = 0
def __init__(self, parent): QThread.__init__(self) SerialProtocol.__init__(self) self.parent = parent self.running = False self.serialPort = serial.Serial() self.serialTimeout = 0.1 self.mutex = QMutex(QMutex.Recursive) self.nextPacketIsAServoAnswerFromId = -1 self.lastReqeustPacket = {}
def __init__( self, plugin, parent = None ): QThread.__init__( self, parent ) self.__plugin = plugin self.__requestQueue = deque() self.__stopRequest = False self.__lock = QMutex() self.__condition = QWaitCondition() return
def __init__(self, parent = None): super(WorkerThread, self).__init__(parent) self.mutex = QMutex() self.condition = QWaitCondition() self.restart = False self.abort = False self.timeline = parent self.countThread = parent.countThread self.populateThread = parent.populateThread self.maxOccThread = parent.maxOccThread
def __init__(self): """! @brief Constructs a new instance. Starts the rexarm run thread but does not initialise the Joints. Call Rexarm.initialize to initialise the Joints. """ # Thread locks self._cmd_mutex = QMutex() self._serial_mutex = QMutex() # Serial bus self.dxlbus = None # Gripper self.gripper = None self.gripper_state = True # State self.estop = False self.initialized = False # Update rexarm every update_period seconds self.update_period = 0.01 # Cmds self.new_speed_cmds = False self.speed_cmds = None self.new_torque_limit_cmds = False self.torque_limit_cmds = None self.new_position_cmds = False self.position_cmds = None # Feedback self.position_fb = None self.speed_fb = None self.load_fb = None self.temp_fb = None # Joints self._joints = [] self.open_angle = 0 self.close_angle = -60 # Data collection flag self.collect_flag = False # Start run thread self.run_thread = RexarmThread(self) self.run_thread.start()