• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python seed_dialog.show_seed_box函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中seed_dialog.show_seed_box函数的典型用法代码示例。如果您正苦于以下问题:Python show_seed_box函数的具体用法?Python show_seed_box怎么用?Python show_seed_box使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: multi_mpk_dialog

    def multi_mpk_dialog(self, xpub_hot, n):
        vbox = QVBoxLayout()
        scroll = QScrollArea()
        scroll.setEnabled(True)
        scroll.setWidgetResizable(True)
        vbox.addWidget(scroll)

        w = QWidget()
        scroll.setWidget(w)

        innerVbox = QVBoxLayout()
        w.setLayout(innerVbox)

        vbox0 = seed_dialog.show_seed_box(MSG_SHOW_MPK, xpub_hot, 'hot')
        innerVbox.addLayout(vbox0)
        entries = []
        for i in range(n):
            msg = _("Please enter the master public key of cosigner") + ' %d'%(i+1)
            vbox2, seed_e2 = seed_dialog.enter_seed_box(msg, self, 'cold')
            innerVbox.addLayout(vbox2)
            entries.append(seed_e2)
        vbox.addStretch(1)
        button = OkButton(self, _('Next'))
        vbox.addLayout(Buttons(CancelButton(self), button))
        button.setEnabled(False)
        f = lambda: button.setEnabled( map(lambda e: Wallet.is_xpub(self.get_seed_text(e)), entries) == [True]*len(entries))
        for e in entries:
            e.textChanged.connect(f)
        self.set_layout(vbox)
        if not self.exec_():
            return
        return map(lambda e: self.get_seed_text(e), entries)
开发者ID:paulmadore,项目名称:electrum-ltc,代码行数:32,代码来源:installwizard.py


示例2: request_many

    def request_many(self, n, xpub_hot=None):
        vbox = QVBoxLayout()
        scroll = QScrollArea()
        scroll.setEnabled(True)
        scroll.setWidgetResizable(True)
        vbox.addWidget(scroll)

        w = QWidget()
        scroll.setWidget(w)

        innerVbox = QVBoxLayout()
        w.setLayout(innerVbox)

        entries = []
        if xpub_hot:
            vbox0 = seed_dialog.show_seed_box(MSG_SHOW_MPK, xpub_hot, "hot")
        else:
            vbox0, seed_e1 = seed_dialog.enter_seed_box(MSG_ENTER_SEED_OR_MPK, self, "hot")
            entries.append(seed_e1)
        innerVbox.addLayout(vbox0)

        for i in range(n):
            if xpub_hot:
                msg = MSG_COSIGNER % (i + 1)
            else:
                msg = MSG_ENTER_SEED_OR_MPK
            vbox2, seed_e2 = seed_dialog.enter_seed_box(msg, self, "cold")
            innerVbox.addLayout(vbox2)
            entries.append(seed_e2)

        vbox.addStretch(1)
        button = OkButton(self, _("Next"))
        vbox.addLayout(Buttons(CancelButton(self), button))
        button.setEnabled(False)

        def get_texts():
            return [self.get_seed_text(entry) for entry in entries]

        def set_enabled():
            texts = get_texts()
            is_valid = Wallet.is_xpub if xpub_hot else Wallet.is_any
            all_valid = all(is_valid(text) for text in texts)
            if xpub_hot:
                texts.append(xpub_hot)
            has_dups = len(set(texts)) < len(texts)
            button.setEnabled(all_valid and not has_dups)

        for e in entries:
            e.textChanged.connect(set_enabled)
        self.set_layout(vbox)
        if not self.exec_():
            raise UserCancelled
        return get_texts()
开发者ID:Kefkius,项目名称:electrum,代码行数:53,代码来源:installwizard.py


示例3: multi_mpk_dialog

 def multi_mpk_dialog(self, xpub_hot, n):
     vbox = QVBoxLayout()
     vbox0 = seed_dialog.show_seed_box(MSG_SHOW_MPK, xpub_hot, 'hot')
     vbox.addLayout(vbox0)
     entries = []
     for i in range(n):
         vbox2, seed_e2 = seed_dialog.enter_seed_box(MSG_ENTER_COLD_MPK, self, 'cold')
         vbox.addLayout(vbox2)
         entries.append(seed_e2)
     vbox.addStretch(1)
     button = OkButton(self, _('Next'))
     vbox.addLayout(Buttons(CancelButton(self), button))
     button.setEnabled(False)
     f = lambda: button.setEnabled( map(lambda e: Wallet.is_xpub(self.get_seed_text(e)), entries) == [True]*len(entries))
     for e in entries:
         e.textChanged.connect(f)
     self.set_layout(vbox)
     if not self.exec_():
         return
     return map(lambda e: self.get_seed_text(e), entries)
开发者ID:Kausheel,项目名称:electrum,代码行数:20,代码来源:installwizard.py


示例4: show_seed

 def show_seed(self, seed, sid):
     vbox = seed_dialog.show_seed_box(seed, sid)
     vbox.addLayout(ok_cancel_buttons(self, _("Next")))
     self.set_layout(vbox)
     return self.exec_()
开发者ID:Geopay,项目名称:electrum-ppc,代码行数:5,代码来源:installwizard.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python config.realize函数代码示例发布时间:2022-05-27
下一篇:
Python seed_dialog.enter_seed_box函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap