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


Python QThread.__init__方法代码示例

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


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

示例1: create_new_invoice

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def create_new_invoice(self, memo="Pay to RaspiBlitz", amt=0):
        if IS_DEV_ENV:
            # Fake an invoice for dev
            class FakeAddInvoiceResponse(object):
                def __init__(self):
                    self.add_index = 145
                    self.payment_request = "lnbc47110n1pwmfqcdpp5k55n5erv60mg6u4c8s3qggnw3dsn267e80ypjxxp6gj593" \
                                           "p3c25sdq9vehk7cqzpgprn0ytv6ukxc2vclgag38nmsmlyggmd4zand9qay2l3gc5at" \
                                           "ecxjynydyzhvxsysam9d46y5lgezh2nkufvn23403t3tz3lyhd070dgq625xp0"
                    self.r_hash = b'\xf9\xe3(\xf5\x84\xdad\x88\xe4%\xa7\x1c\x95\xbe\x8baJ\x1c\xc1\xad*\xed\xc8' \
                                  b'\x158\x13\xdf\xffF\x9c\x95\x84'

            new_invoice = FakeAddInvoiceResponse()

        else:
            with InvoiceStub(network=self.rb_cfg.network, chain=self.rb_cfg.chain) as stub_invoice:
                new_invoice = create_invoice(stub_invoice, memo, amt)

        log.info("#{}: {}".format(new_invoice.add_index, new_invoice.payment_request))

        invoice_r_hash_hex_str = convert_r_hash_hex_bytes(new_invoice.r_hash)
        self.invoice_to_check = invoice_r_hash_hex_str
        log.info("noting down for checking: {}".format(invoice_r_hash_hex_str))

        return new_invoice 
开发者ID:rootzoll,项目名称:raspiblitz,代码行数:27,代码来源:main.py

示例2: __init__

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

        self.mid = None
        self.uid = None
        self.fid = None
        self.cmbid = None
        self.ambid = None
        self.iid = None

        self.parent = self.parent()
        self.fetching_completed.connect(self.parent.work_received)
        self.combobox_results.connect(self.parent.change_combobox_backgrounds)
        self.progress_number.connect(self.parent.set_progress_number)
        self.query_completed.connect(self.parent.query_finished) 
开发者ID:MTG,项目名称:dunya-desktop,代码行数:18,代码来源:query.py

示例3: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self):
        AttrsProtected.__init__(self)
        self.ident = None
        self.status = None
        self.payee = None
        self.lastseen = None
        self.activeseconds = None
        self.lastpaidtime = None
        self.lastpaidblock = None
        self.ip = None
        self.protx_hash: Optional[str] = None
        self.registered_height: Optional[int] = None
        self.db_id = None
        self.marker = None
        self.modified = False
        self.monitor_changes = False
        self.queue_position = None
        self.set_attr_protection() 
开发者ID:Bertrand256,项目名称:dash-masternode-tool,代码行数:20,代码来源:dashd_intf.py

示例4: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, url):
        parsed = urlparse(url)
        if url is not None:
            parsed = urlparse(url)
            self.scheme = parsed.scheme
            self.netloc = parsed.netloc
            self.path = parsed.path
            self.params = parsed.params
            self.query = parsed.query
            self.fragment = parsed.fragment
        else:
            self.scheme = ""
            self.netloc = ""
            self.path = "/"
            self.params = ""
            self.query = ""
            self.fragment = "" 
开发者ID:roglew,项目名称:guppy-proxy,代码行数:19,代码来源:proxy.py

示例5: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, vlc_player, drone_gui):
        """
        Create a UI window for the VLC player
        :param vlc_player: the VLC player (created outside the function)
        """
        QMainWindow.__init__(self)
        self.setWindowTitle("VLC Drone Video Player")

        # save the media player
        self.mediaplayer = vlc_player

        # need a reference to the main drone vision class
        self.drone_vision = drone_gui

        # create the GUI
        self.createUI() 
开发者ID:amymcgovern,项目名称:pyparrot,代码行数:18,代码来源:DroneVisionGUI.py

示例6: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, dir_names, file_names, *args, **kwargs):
        QThread.__init__(self, *args, **kwargs)
        self.dir_names = dir_names
        self.file_names = file_names 
开发者ID:rootzoll,项目名称:raspiblitz,代码行数:6,代码来源:file_watcher.py

示例7: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, event, interval=0.5, *args, **kwargs):
        QThread.__init__(self, *args, **kwargs)

        self.stopped = event
        self.interval = interval
        # atomic (?!) counter
        self.ctr = itertools.count() 
开发者ID:rootzoll,项目名称:raspiblitz,代码行数:9,代码来源:main.py

示例8: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, docid, step, n_progress):
        QObject.__init__(self)

        self.docid = docid
        self.step = step
        self.n_progress = n_progress 
开发者ID:MTG,项目名称:dunya-desktop,代码行数:8,代码来源:utilities.py

示例9: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, dict):
        QThread.__init__(self)
        self.dict = dict 
开发者ID:persepolisdm,项目名称:persepolis,代码行数:5,代码来源:browser_plugin_queue.py

示例10: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, parent, gid, password=None):
        QThread.__init__(self)
        self.gid = gid
        self.password = password
        self.parent = parent 
开发者ID:persepolisdm,项目名称:persepolis,代码行数:7,代码来源:progress.py

示例11: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, time):
        QThread.__init__(self)
        self.time = float(int(time)/1000) 
开发者ID:persepolisdm,项目名称:persepolis,代码行数:5,代码来源:windows_notification.py

示例12: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, parent, category, password=None):
        QThread.__init__(self)
        self.category = category
        self.password = password
        self.parent = parent 
开发者ID:persepolisdm,项目名称:persepolis,代码行数:7,代码来源:video_finder_progress.py

示例13: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self):
        self.display_msg_fun: Callable[[str], None] = None
        self.set_progress_value_fun: Callable[[int], None] = None
        self.dlg_config_fun: Callable[[bool, bool, str, int],None] = None
        self.show_dialog_fun: Callable[[bool], None] = None
        self.finish: bool = False
        self.__msg_label = None 
开发者ID:Bertrand256,项目名称:dash-masternode-tool,代码行数:9,代码来源:thread_fun_dlg.py

示例14: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, parent):
        QThread.__init__(self)
        self.parent = parent 
开发者ID:DotBow,项目名称:Blender-Version-Manager,代码行数:5,代码来源:version_layout.py

示例15: __init__

# 需要导入模块: from PyQt5.QtCore import QThread [as 别名]
# 或者: from PyQt5.QtCore.QThread import __init__ [as 别名]
def __init__(self, parent, url, strptime):
        QThread.__init__(self)
        self.parent = parent
        self.url = url
        self.strptime = strptime
        self.root_folder = self.parent.settings.value('root_folder')
        self.is_running = False
        self.platform = get_platform() 
开发者ID:DotBow,项目名称:Blender-Version-Manager,代码行数:10,代码来源:build_loader.py


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