當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。