当前位置: 首页>>代码示例>>Python>>正文


Python QThread.__init__方法代码示例

本文整理汇总了Python中PyQt5.Qt.QThread.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QThread.__init__方法的具体用法?Python QThread.__init__怎么用?Python QThread.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.Qt.QThread的用法示例。


在下文中一共展示了QThread.__init__方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self, parent, lrf_stream, logger, opts):
     QThread.__init__(self, parent)
     self.stream, self.logger, self.opts = lrf_stream, logger, opts
     self.aborted = False
     self.lrf = None
     self.document = None
     self.exception = None
开发者ID:JimmXinu,项目名称:calibre,代码行数:9,代码来源:main.py

示例2: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self, parent, db, root, single, tdir=None):
     QThread.__init__(self, parent)
     self.db = db
     self.path = root
     self.tdir = tdir
     self.single_book_per_directory = single
     self.canceled = False
开发者ID:aliloac,项目名称:calibre,代码行数:9,代码来源:add.py

示例3: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self,
              party_1,
              party_2,
              number_of_pairs,
              random_source,
              cancellation_event,
              key_manager,
              console_signal,
              key_directory,
              parent,
              key_length=1000000):
     QThread.__init__(self, parent)
     self._party_1 = party_1
     self._party_2 = party_2
     self._number_of_pairs = int(number_of_pairs)
     self._random_source = random_source
     # Select appropriate random function.
     if self._random_source == '/dev/random (slow!)':
         self._random_function = self._dev_random
     else:
         self._random_function = self._os_urandom
     # Attach cancel button signal to cancel function.
     self._cancellation_event = cancellation_event
     self._km = key_manager
     self._cs = console_signal
     self._key_directory = key_directory
     self._parent = parent
     self._key_length = key_length
     self._VERSION = self._km.VERSION
开发者ID:theonaun,项目名称:brickton,代码行数:31,代码来源:generator_thread.py

示例4: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self, plugin_id, address, socket):
     QThread.__init__(self)
     self.plugin_id = plugin_id
     self.address = address
     self.udp_socket = socket
     self.finished.connect(self.quit)
     self.wait = QWaitCondition()
     self.mutex = QMutex()
开发者ID:n3rd-bugs,项目名称:weird-rtos,代码行数:10,代码来源:plugin_switch.py

示例5: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self,
              import_path,
              key_manager,
              console_signal,
              key_directory,
              parent):
     QThread.__init__(self, parent)
     self._import_path = import_path
     self._km = key_manager
     self._console_signal = console_signal
     self._key_directory = key_directory
     self._parent = parent
     self._total_key_count = 0
     self._successful_key_count = 0
     self._unsuccessful_key_count = 0
开发者ID:theonaun,项目名称:brickton,代码行数:17,代码来源:import_thread.py

示例6: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
    def __init__(self, parent, db, device, annotation_map, done_callback):
        QThread.__init__(self, parent)
        self.errors = {}
        self.db = db
        self.keep_going = True
        self.pd = ProgressDialog(_('Merging user annotations into database'), '',
                0, len(annotation_map), parent=parent)

        self.device = device
        self.annotation_map = annotation_map
        self.done_callback = done_callback
        self.pd.canceled_signal.connect(self.canceled)
        self.pd.setModal(True)
        self.pd.show()
        self.update_progress.connect(self.pd.set_value,
                type=Qt.QueuedConnection)
        self.update_done.connect(self.pd.hide, type=Qt.QueuedConnection)
开发者ID:AEliu,项目名称:calibre,代码行数:19,代码来源:annotate.py

示例7: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self,
              party_1,
              party_2,
              all_keys,
              console_signal,
              key_directory,
              main_export_directory,
              parent):
     QThread.__init__(self, parent)
     self._party_1 = party_1
     self._party_2 = party_2
     self._parent = parent
     self._keys = all_keys
     self._console_signal = console_signal
     self._main_export_directory = main_export_directory
     self._key_directory = key_directory
     self._timestamp = '{0:.7f}'.format(time.time())
     self._export_package_dir = os.path.join(self._main_export_directory,
                                             self._timestamp)
     os.makedirs(self._export_package_dir)
     self._keys_to_copy = []
     self._keys_copied_count = 0
     self._keys_missed_count = 0
开发者ID:theonaun,项目名称:brickton,代码行数:25,代码来源:export_thread.py

示例8: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
    def __init__(self, parent):
        QThread.__init__(self, parent)
        self.keep_going = True
        self.current_command = None

        self.out_queue = Queue()
        self.address = arbitrary_address('AF_PIPE' if iswindows else 'AF_UNIX')
        self.auth_key = os.urandom(32)
        if iswindows and self.address[1] == ':':
            self.address = self.address[2:]
        self.listener = Listener(address=self.address,
                authkey=self.auth_key, backlog=4)

        self.env = {
            'CALIBRE_SIMPLE_WORKER':
                'calibre.utils.pyconsole.interpreter:main',
            'CALIBRE_WORKER_ADDRESS':
                hexlify(cPickle.dumps(self.listener.address, -1)),
            'CALIBRE_WORKER_KEY': hexlify(self.auth_key)
        }
        self.process = Process(self.env)
        self.output_file_buf = self.process(redirect_output=False)
        self.conn = self.listener.accept()
        self.start()
开发者ID:Mymei2,项目名称:calibre,代码行数:26,代码来源:controller.py

示例9: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self, parent):
     QThread.__init__(self, parent)
开发者ID:AtulKumar2,项目名称:calibre,代码行数:4,代码来源:update.py

示例10: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self, parent):
     QThread.__init__(self, parent)
     self.cdb = parent.opts.gui.current_db
     self.title_map = None
     self.uuid_map = None
开发者ID:mkarpiarz,项目名称:calibre-annotations,代码行数:7,代码来源:common_utils.py

示例11: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self, host="0.0.0.0", port=9919):
     QThread.__init__(self)
     self.host = host
     self.port = port
开发者ID:marcellmars,项目名称:orangecase,代码行数:6,代码来源:orange_browser.py

示例12: __init__

# 需要导入模块: from PyQt5.Qt import QThread [as 别名]
# 或者: from PyQt5.Qt.QThread import __init__ [as 别名]
 def __init__(self, parent=None):
     QThread.__init__(self, parent)
     self.canceled = False
     self.cancel_callback = lambda : self.canceled
     self.folders = set([])
     self.books = []
开发者ID:AtulKumar2,项目名称:calibre,代码行数:8,代码来源:__init__.py


注:本文中的PyQt5.Qt.QThread.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。