Python PyQt5.QtCore.QMutex() Examples
The following are 21
code examples of PyQt5.QtCore.QMutex().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PyQt5.QtCore
, or try the search function
.
Example #1
Source File: down.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, disk, task, parent=None): super(Downloader, self).__init__(parent) self._disk = disk self._task = task self._stopped = True self._mutex = QMutex()
Example #2
Source File: codescene.py From CodeAtlasSublime with Eclipse Public License 1.0 | 5 votes |
def __init__(self): super(RecursiveLock, self).__init__(QtCore.QMutex.Recursive)
Example #3
Source File: WakeupThread.py From PyQt with GNU General Public License v3.0 | 5 votes |
def __init__(self, *args, **kwargs): super(Thread, self).__init__(*args, **kwargs) self._isPause = False self._value = 0 self.cond = QWaitCondition() self.mutex = QMutex()
Example #4
Source File: upload.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(UploadWorker, self).__init__(parent) self._disk = None self._tasks = {} self._mutex = QMutex() self._is_work = False self._url = "" self._task = None self._allow_big_file = False
Example #5
Source File: login.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(LogoutWorker, self).__init__(parent) self._disk = None self.update_ui = True self._mutex = QMutex() self._is_work = False
Example #6
Source File: folders.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(GetAllFoldersWorker, self).__init__(parent) self._disk = None self.org_infos = None self._mutex = QMutex() self._is_work = False self.move_infos = None
Example #7
Source File: rm.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(RemoveFilesWorker, self).__init__(parent) self._disk = None self.infos = None self._mutex = QMutex() self._is_work = False
Example #8
Source File: rename.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(RenameMkdirWorker, self).__init__(parent) self._disk = None self._work_id = -1 self._folder_list = None self.infos = None self._mutex = QMutex() self._is_work = False
Example #9
Source File: desc.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(DescPwdFetcher, self).__init__(parent) self._disk = None self.infos = None self.download = False self.dl_path = "" self._mutex = QMutex() self._is_work = False
Example #10
Source File: pwd.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(SetPwdWorker, self).__init__(parent) self._disk = None self.infos = [] self._work_id = -1 self._mutex = QMutex() self._is_work = False
Example #11
Source File: refresh.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(ListRefresher, self).__init__(parent) self._disk = None self._fid = -1 self.r_files = True self.r_folders = True self.r_path = True self._mutex = QMutex() self._is_work = False
Example #12
Source File: detection.py From detection with GNU General Public License v2.0 | 5 votes |
def __init__(self, mw): super(MediaThread, self).__init__(mw) self.mw = mw self.stopped = False self.capture = None self.nextFrame = False self.mutex = QtCore.QMutex() self.mode = None
Example #13
Source File: recovery.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(RecManipulator, self).__init__(parent) self._disk = None self._mutex = QMutex() self._is_work = False self._action = None self._folders = [] self._files= []
Example #14
Source File: recovery.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(GetRecListsWorker, self).__init__(parent) self._disk = None self._mutex = QMutex() self._is_work = False self._folder_id = None
Example #15
Source File: update.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(CheckUpdateWorker, self).__init__(parent) self._ver = '' self._manual = False self._mutex = QMutex() self._is_work = False self._folder_id = None self._api = 'https://api.github.com/repos/rachpt/lanzou-gui/releases/latest' self._api_mirror = 'https://gitee.com/api/v5/repos/rachpt/lanzou-gui/releases/latest'
Example #16
Source File: share.py From lanzou-gui with MIT License | 5 votes |
def __init__(self, parent=None): super(GetSharedInfo, self).__init__(parent) self._disk = None self.share_url = "" self.pwd = "" self.is_file = "" self.is_folder = "" self._mutex = QMutex() self._is_work = False self._pat = r"(https?://(\w[-\w]*\.)?lanzou[six].com/[bi]?[A-Za-z0-9]+)[^0-9a-z]*([a-z0-9]+)?"
Example #17
Source File: ida_fuzzy.py From IDAFuzzy with MIT License | 5 votes |
def __init__(self, parent=None): super(FuzzySearchThread, self).__init__(parent) self.stopped = False self.mutex = QtCore.QMutex() self.terminate_event = threading.Event()
Example #18
Source File: thread.py From pychemqt with GNU General Public License v3.0 | 5 votes |
def __init__(self, parent=None): super(Evaluate, self).__init__(parent) self.mutex = QMutex()
Example #19
Source File: wnd_utils.py From dash-masternode-tool with MIT License | 5 votes |
def fun_call_signalled(self, fun_to_call, args, kwargs, mutex): """ Function-event executed in the main thread as a result of emiting signal fun_call_signal from BG threads. :param fun_to_call: ref to a function which is to be called :param args: args passed to the function fun_to_call :param mutex: mutex object (QMutex) which is used in the calling thread to wait until function 'fun_to_call' terminates; calling mutex.unlock() will signal that :return: return value from fun_to_call """ try: self.fun_call_ret_value = fun_to_call(*args, **kwargs) except Exception as e: self.fun_call_exception = e finally: mutex.unlock()
Example #20
Source File: UI_unitConverter.py From pychemqt with GNU General Public License v3.0 | 4 votes |
def __init__(self, unidad, valor=None, parent=None): """ unidad: unidades class valor: optional value to show """ super(UI_conversorUnidades, self).__init__(parent) self.setWindowTitle(unidad.__title__) self.mutex = QtCore.QMutex() self.unidad = unidad if unidad.__tooltip__: self.tooltip = unidad.__tooltip__ else: self.tooltip = unidad.__text__ self.value = self.unidad(valor) lyt = QtWidgets.QGridLayout(self) self.tabla = QtWidgets.QTableWidget() self.tabla.setRowCount(len(unidad.__text__)) self.tabla.setColumnCount(1) self.tabla.setItemDelegateForColumn(0, CellEditor(self)) self.tabla.horizontalHeader().setVisible(False) self.tabla.horizontalHeader().setStretchLastSection(True) self.tabla.setMaximumHeight(len(unidad.__text__)*24+4) for i, txt in enumerate(unidad.__text__): item = QtWidgets.QTableWidgetItem(txt) self.tabla.setVerticalHeaderItem(i, item) self.tabla.setRowHeight(i, 24) self.tabla.setItem(i, 0, QtWidgets.QTableWidgetItem("")) self.tabla.item(i, 0).setTextAlignment( QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) for i, tip in enumerate(self.tooltip): self.tabla.item(i, 0).setToolTip(tip) self.tabla.cellChanged.connect(self.update) lyt.addWidget(self.tabla, 2, 1) self.buttonBox = QtWidgets.QDialogButtonBox( QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setCenterButtons(True) self.buttonBox.accepted.connect(self.accept) self.buttonBox.rejected.connect(self.reject) lyt.addWidget(self.buttonBox, 3, 0, 1, 3) if valor: self.fill(self.value)
Example #21
Source File: pyqt5.py From harvesters_gui with Apache License 2.0 | 4 votes |
def __init__(self, *, vsync=True, logger=None): # self._logger = logger or get_logger(name='harvesters') # super().__init__() # self._mutex = QMutex() profile = True if 'HARVESTER_PROFILE' in os.environ else False self._harvester_core = HarvesterCore( profile=profile, logger=self._logger ) self._ia = None # Image Acquirer # self._widget_canvas = Canvas2D(vsync=vsync) self._widget_canvas.create_native() self._widget_canvas.native.setParent(self) # self._action_stop_image_acquisition = None # self._observer_widgets = [] # self._widget_device_list = None self._widget_status_bar = None self._widget_main = None self._widget_about = None self._widget_attribute_controller = None # self._signal_update_statistics.connect(self.update_statistics) self._signal_stop_image_acquisition.connect(self._stop_image_acquisition) self._thread_statistics_measurement = _PyQtThread( parent=self, mutex=self._mutex, worker=self._worker_update_statistics, update_cycle_us=250000 ) # self._initialize_widgets() # for o in self._observer_widgets: o.update()