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

Python qtdefines.tr函数代码示例

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

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



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

示例1: done

 def done(self, event):
     if self.newWallet and not self.walletBackupPage.pageFrame.isBackupCreated:
         reply = QMessageBox.question(
             self,
             tr("Wallet Backup Warning"),
             tr(
                 """<qt>
            You have not made a backup for your new wallet.  You only have 
            to make a backup of your wallet <u>one time</u> to protect 
            all the funds held by this wallet <i>any time in the future</i>
            (it is a backup of the signing keys, not the coins themselves).
            <br><br>
            If you do not make a backup, you will <u>permanently</u> lose
            the money in this wallet if you ever forget your password, or 
            suffer from hardware failure.
            <br><br>
            Are you sure that you want to leave this wizard without backing 
            up your wallet?</qt>"""
             ),
             QMessageBox.Yes | QMessageBox.No,
         )
         if reply == QMessageBox.No:
             # Stay in the wizard
             return None
     return super(WalletWizard, self).done(event)
开发者ID:IcantBelieveItsNotMoney,项目名称:BitcoinArmory,代码行数:25,代码来源:Wizards.py


示例2: __init__

   def __init__(self, parent, main, wlt, prefill=None, onlyOfflineWallets=False):
      super(TxWizard,self).__init__(parent, main)
      self.setWindowTitle(tr("Offline Transaction Wizard"))
      self.setOption(QWizard.IgnoreSubTitles, on=True)
      self.setOption(QWizard.HaveCustomButton1, on=True)
      self.setOption(QWizard.HaveFinishButtonOnEarlyPages, on=True)
      
      # Page 1: Create Offline TX
      self.createTxPage = CreateTxPage(self, wlt, prefill, onlyOfflineWallets=onlyOfflineWallets)
      self.addPage(self.createTxPage)
      
      # Page 2: Sign Offline TX
      self.reviewOfflineTxPage = ReviewOfflineTxPage(self)
      self.addPage(self.reviewOfflineTxPage)
      
      # Page 3: Broadcast Offline TX
      self.signBroadcastOfflineTxPage = SignBroadcastOfflineTxPage(self)
      self.addPage(self.signBroadcastOfflineTxPage)

      self.setButtonText(QWizard.NextButton, tr('Create Unsigned Transaction'))
      self.setButtonText(QWizard.CustomButton1, tr('Send!'))
      self.connect(self, SIGNAL('customButtonClicked(int)'), self.sendClicked)
      self.setButtonLayout([QWizard.CancelButton,
                            QWizard.BackButton,
                            QWizard.Stretch,
                            QWizard.NextButton,
                            QWizard.CustomButton1])
开发者ID:CarltonCode,项目名称:BitcoinArmory,代码行数:27,代码来源:Wizards.py


示例3: __init__

 def __init__(self, wizard):
    super(WalletCreationPage, self).__init__(wizard,
          NewWalletFrame(wizard, wizard.main, "Primary Wallet"))
    self.setTitle(tr("Step 1: Create Wallet"))
    self.setSubTitle(tr("""
          Create a new wallet for managing your funds.
          The name and description can be changed at any time."""))
开发者ID:AsherBond,项目名称:BitcoinArmory,代码行数:7,代码来源:Wizards.py


示例4: __init__

   def __init__(self, parent, main):
      super(VerifyOfflinePackageDialog, self).__init__(parent)
      self.main = main

      layout = QVBoxLayout(self)
      
      load = QGroupBox(tr("Load Signed Package"), self)
      layout.addWidget(load)
      
      layoutload = QVBoxLayout()
      load.setLayout(layoutload)
      self.loadFileButton = QPushButton(tr("Select file to verify..."), load);
      layoutload.addWidget(self.loadFileButton)
      self.connect(self.loadFileButton, SIGNAL('clicked()'), self.load)

      self.lblVerified = QRichLabel('', hAlign=Qt.AlignHCenter, doWrap=False)
      layout.addWidget(self.lblVerified)

      
      save = QGroupBox(tr("Save Verified Package"), self)
      layout.addItem(QSpacerItem(10,10))
      layout.addWidget(save)
      layoutsave = QVBoxLayout()
      save.setLayout(layoutsave)
      self.saveFileButton = QPushButton(tr("Select file to save to..."), load);
      self.saveFileButton.setEnabled(False)
      layoutsave.addWidget(self.saveFileButton)
      self.connect(self.saveFileButton, SIGNAL('clicked()'), self.save)
开发者ID:007pig,项目名称:BitcoinArmory,代码行数:28,代码来源:VerifyOfflinePackage.py


示例5: __init__

    def __init__(self, parent, main):
        super(WalletWizard, self).__init__(parent, main)
        self.newWallet = None
        self.isBackupCreated = False
        self.setWindowTitle(tr("Wallet Creation Wizard"))
        self.setOption(QWizard.HaveFinishButtonOnEarlyPages, on=True)
        self.setOption(QWizard.IgnoreSubTitles, on=True)

        # Page 1: Create Wallet
        self.walletCreationPage = WalletCreationPage(self)
        self.addPage(self.walletCreationPage)

        # Page 2: Set Passphrase
        self.setPassphrasePage = SetPassphrasePage(self)
        self.addPage(self.setPassphrasePage)

        # Page 3: Verify Passphrase
        self.verifyPassphrasePage = VerifyPassphrasePage(self)
        self.addPage(self.verifyPassphrasePage)

        # Page 4: Create Paper Backup
        self.walletBackupPage = WalletBackupPage(self)
        self.addPage(self.walletBackupPage)

        # Page 5: Create Watching Only Wallet -- but only if expert, or offline
        self.hasCWOWPage = False
        if self.main.usermode == USERMODE.Expert or TheBDM.getState() == BDM_OFFLINE:
            self.hasCWOWPage = True
            self.createWOWPage = CreateWatchingOnlyWalletPage(self)
            self.addPage(self.createWOWPage)

        self.setButtonLayout([QWizard.BackButton, QWizard.Stretch, QWizard.NextButton, QWizard.FinishButton])
开发者ID:IcantBelieveItsNotMoney,项目名称:BitcoinArmory,代码行数:32,代码来源:Wizards.py


示例6: initializePage

 def initializePage(self, *args, **kwargs):
     if self.currentPage() == self.createTxPage:
         self.createTxPage.pageFrame.fireWalletChange()
     elif self.currentPage() == self.reviewOfflineTxPage:
         self.setButtonText(QWizard.NextButton, tr("Next"))
         self.setButtonLayout([QWizard.BackButton, QWizard.Stretch, QWizard.NextButton, QWizard.FinishButton])
         self.reviewOfflineTxPage.pageFrame.setTxDp(self.createTxPage.txdp)
         self.reviewOfflineTxPage.pageFrame.setWallet(self.createTxPage.pageFrame.wlt)
开发者ID:IcantBelieveItsNotMoney,项目名称:BitcoinArmory,代码行数:8,代码来源:Wizards.py


示例7: save

 def save(self):
    tofile = QFileDialog.getSaveFileName(self, tr("Save confirmed package"), \
                      QDir.homePath() + "/" + self.fileName)
    if len(tofile)==0:
       return
    df = open(tofile, "wb")
    df.write(self.fileData)
    df.close()
开发者ID:007pig,项目名称:BitcoinArmory,代码行数:8,代码来源:VerifyOfflinePackage.py


示例8: cleanupPage

 def cleanupPage(self, *args, **kwargs):
    if self.currentPage() == self.reviewOfflineTxPage:
       self.updateOnSelectWallet(self.createTxPage.pageFrame.wlt)
       self.setButtonText(QWizard.NextButton, tr('Create Unsigned Transaction'))
开发者ID:CarltonCode,项目名称:BitcoinArmory,代码行数:4,代码来源:Wizards.py


示例9: load

   def load(self):
      self.fileData = None
      #self.fromfile = QFileDialog.getOpenFileName(self, tr("Load file to verify"), "", tr("Armory Signed Packages (*.signed)"))
      self.fromfile = self.main.getFileLoad(tr('Load file to Verify'),\
                                       ['Armory Signed Packages (*.signed)'])
      if len(self.fromfile)==0:
         return
         
      df = open(self.fromfile, "rb")
      allfile = df.read()
      df.close()
      magicstart="START_OF_SIGNATURE_SECTION"
      magicend="END_OF_SIGNATURE_SECTION"
      if 0 != allfile.find(magicstart, 0, 1024*1024*4): # don't search past 4MiB
         QMessageBox.warning(self, tr("Invalid File"), tr("This file is not a signed package"))
         return
      
      end = allfile.find(magicend, 0, 1024*1024*4) # don't search past 4MiB
      if -1 == end: # don't search past 4MiB
         QMessageBox.warning(self, tr("Invalid File"), tr("The end of the signature in the file could not be found"))
      
      signatureData = allfile[len(magicstart):end]
      fileData = allfile[end+len(magicend):]
      
      print "All:",end, end+len(magicend), len(fileData), len(allfile)
      
      allsigs = downloadLinkParser(filetext=signatureData).downloadMap
      
      res = binary_to_hex(sha256(fileData))
      
      good=False
      url=None
      print "Hash of package file: ", res
      
      # simply check if any of the hashes match
      for pack in allsigs.itervalues():
         for packver in pack.itervalues():
            for packos in packver.itervalues():
               for packosver in packos.itervalues():
                  for packosarch in packosver.itervalues():
                     okhash = packosarch[1]
                     if okhash == res:
                        url = packosarch[0]
                        good=True

      if good:
         self.saveFileButton.setEnabled(True)
         self.fileData = fileData
         self.fileName = os.path.basename(url)
         self.lblVerified.setText(tr("""<font color="%s"><b>Signature is 
            Valid!</b></font>""") % htmlColor('TextGreen'))
         reply = QMessageBox.warning(self, tr("Signature Valid"),  tr("""
            The downloaded file has a <b>valid</b> signature from 
            <font color="%s"><b>Armory Technologies, Inc.</b></font>, and is 
            safe to install.  
            <br><br>
            Would you like to overwrite the original file with the extracted
            installer?  If you would like to save it to a new location, click 
            "No" and then use the "Save Verified Package" button to select
            a new save location.""") % htmlColor('TextGreen'), \
            QMessageBox.Yes | QMessageBox.No)

         if reply==QMessageBox.Yes:
            newFile = self.fromfile
            if newFile.endswith('.signed'):
               newFile = self.fromfile[:-7]

            LOGINFO('Saving installer to: ' + newFile)

            with open(newFile, 'wb') as df:
               df.write(self.fileData)

            if os.path.exists(newFile):
               LOGINFO('Removing original file: ' + self.fromfile)
               os.remove(self.fromfile)

            QMessageBox.warning(self, tr('Saved!'), tr("""
               The installer was successfully extracted and saved to the
               following location:
               <br><br>
               %s""") % newFile, QMessageBox.Ok)
         
            
      else:
         self.saveFileButton.setEnabled(False)
         self.lblVerified.setText(tr("""<font color="%s">Invalid signature
            on loaded file!</font>""") % htmlColor('TextRed'))
         QMessageBox.warning(self, tr("Signature failure"),  \
                        tr("This file has an invalid signature"))
开发者ID:007pig,项目名称:BitcoinArmory,代码行数:89,代码来源:VerifyOfflinePackage.py


示例10: createPrintScene

def createPrintScene(wallet, amountString, expiresString):
   
   scene = SimplePrintableGraphicsScene(None, None)

   INCH = scene.INCH
   MARGIN = scene.MARGIN_PIXELS 
   scene.resetCursor()
   scene.drawPixmapFile(':/armory_logo_h36.png') 
   scene.newLine()
   scene.drawText('Paper Backup for Armory Wallet', GETFONT('Var', 11))
   scene.newLine()
   scene.drawText('http://www.bitcoinarmory.com')

   scene.newLine(extra_dy=20)
   scene.drawHLine()
   scene.newLine(extra_dy=20)


   ssType = ' (Unencrypted)'
   bType = tr('Single-Sheet ' + ssType)
   colRect, rowHgt = scene.drawColumn(['Wallet Version:', 'Wallet ID:', \
                                                'Wallet Name:', 'Backup Type:'])
   scene.moveCursor(15, 0)
   suf = 'c'
   colRect, rowHgt = scene.drawColumn(['1.35'+suf, wallet.uniqueIDB58, \
                                                wallet.labelName, bType])
   scene.moveCursor(15, colRect.y() + colRect.height(), absolute=True)

   # Display warning about unprotected key data
   wrap = 0.9*scene.pageRect().width()

   container = 'this wallet'
   warnMsg = tr(""" 
         <font color="#aa0000"><b>WARNING:</b></font> Anyone who has access to this 
         page has access to all the bitcoins in %s!  Please keep this 
         page in a safe place.""" % container)

   scene.newLine()
   scene.drawText(warnMsg, GETFONT('Var', 9), wrapWidth=wrap)

   scene.newLine(extra_dy=20)
   scene.drawHLine()
   scene.newLine(extra_dy=20)
   numLine = 'two'

   descrMsg = tr(""" 
      The following %s lines backup all addresses 
      <i>ever generated</i> by this wallet (previous and future).
      This can be used to recover your wallet if you forget your passphrase or 
      suffer hardware failure and lose your wallet files. """ % numLine)
   scene.drawText(descrMsg, GETFONT('var', 8), wrapWidth=wrap)
   scene.newLine(extra_dy=10)
  
   ###########################################################################
   # Finally, draw the backup information.
   bottomOfSceneHeader = scene.cursorPos.y()

   code12 = wallet.addrMap['ROOT'].binPrivKey32_Plain.toBinStr()
   Lines = []
   Prefix = [] 
   Prefix.append('Root Key:')
   Lines.append(makeSixteenBytesEasy(code12[:16]))
   Prefix.append('')
   Lines.append(makeSixteenBytesEasy(code12[16:]))
   # Draw the prefix
   origX,origY = scene.getCursorXY()
   scene.moveCursor(20,0) 
   colRect, rowHgt = scene.drawColumn(['<b>'+l+'</b>' for l in Prefix])
   
   nudgeDown = 2  # because the differing font size makes it look unaligned
   scene.moveCursor(20, nudgeDown)
   scene.drawColumn(Lines, 
                    
                           font=GETFONT('Fixed', 8, bold=True), \
                           rowHeight=rowHgt, 
                           useHtml=False)

   scene.moveCursor(MARGIN, colRect.y()-2, absolute=True)
   width = scene.pageRect().width() - 2*MARGIN
   scene.drawRect( width, colRect.height()+7, edgeColor=QColor(0,0,0), fillColor=None)

   scene.newLine(extra_dy=30)
   scene.drawText( tr("""
      The following QR code is for convenience only.  It contains the 
      exact same data as the %s lines above.  If you copy this backup 
      by hand, you can safely ignore this QR code. """ % numLine), wrapWidth=4*INCH)

   scene.moveCursor(20,0)
   x,y = scene.getCursorXY()
   edgeRgt = scene.pageRect().width() - MARGIN
   edgeBot = scene.pageRect().height() - MARGIN

   qrSize = max(1.5*INCH, min(edgeRgt - x, edgeBot - y, 2.0*INCH))
   scene.drawQR('\n'.join(Lines), qrSize)
   scene.newLine(extra_dy=25)
   scene.drawHLine(7*INCH, 5)
   scene.newLine(extra_dy=25)
   scene.drawText(tr(""" 
         <font color="#aa0000"><b>CONGRATULATIONS:</b></font> Thank you for participating
         in the MIT BitComp. You have received a Bitcoin Armory
#.........这里部分代码省略.........
开发者ID:CarltonCode,项目名称:BitcoinArmory,代码行数:101,代码来源:PromoKit.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python instrument.Instrument类代码示例发布时间:2022-05-26
下一篇:
Python inprocess.QtInProcessKernelManager类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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