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


Python Universals.isUpdatable方法代码示例

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


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

示例1: __init__

# 需要导入模块: from Core import Universals [as 别名]
# 或者: from Core.Universals import isUpdatable [as 别名]
 def __init__(self, _parent, _isNotInstall=False, _isCloseParent=False):
     MDialog.__init__(self, _parent)
     QtWebKit = getMyObject("QtWebKit")
     if isActivePyKDE4:
         self.setButtons(MDialog.NoDefault)
     if _isNotInstall is False:
         if uni.isUpdatable() is False:
             _isNotInstall = True
     self.isNotInstall = _isNotInstall
     self.pnlMain = MWidget()
     self.vblMain = MVBoxLayout(self.pnlMain)
     self.isDownloading = False
     self.lblInfo = MLabel("")
     self.lblInfo.setVisible(False)
     self.lblInfo.setWordWrap(True)
     self.lblInfo.setOpenExternalLinks(True)
     self.lblInfo.setMinimumHeight(220)
     self.pbtnCancel = MPushButton(translate("UpdateControl", "Cancel"))
     if self.isNotInstall is False:
         self.pbtnDownloadAndInstall = MPushButton(translate("UpdateControl", "Download and Install"))
     else:
         self.pbtnDownloadAndInstall = MPushButton(translate("UpdateControl", "Download"))
     self.pbtnDownloadAndInstall.setVisible(False)
     self.wvWeb = QtWebKit.QWebView()
     self.prgbState = MProgressBar()
     self.prgbState.setRange(0, 100)
     self.pbtnCheckForDeveloperVersion = MPushButton(translate("UpdateControl", "Check For Developer Version"))
     self.pbtnCheckForDeveloperVersion.setVisible(False)
     self.connect(self.pbtnCheckForDeveloperVersion, SIGNAL("clicked()"), self.checkForDeveloperVersion)
     self.connect(self.pbtnCancel, SIGNAL("clicked()"), self.close)
     if _isCloseParent:
         self.connect(self.pbtnCancel, SIGNAL("clicked()"), self.parent().close)
     self.connect(self.pbtnDownloadAndInstall, SIGNAL("clicked()"), self.downloadAndInstall)
     self.connect(self.wvWeb, SIGNAL("loadProgress(int)"), self.loading)
     self.connect(self.wvWeb, SIGNAL("loadFinished(bool)"), self.loadFinished)
     self.vblMain.addWidget(self.prgbState, 1)
     self.vblMain.addWidget(self.lblInfo, 2)
     self.pbtnRemindMeLater = MPushButton(translate("UpdateControl", "Remind Me Later And Close"))
     self.cbRemindMeLater = MSpinBox()
     self.pbtnRemindMeLater.setVisible(False)
     self.cbRemindMeLater.setVisible(False)
     self.cbRemindMeLater.setRange(1, int(uni.MySettings["updateInterval"]))
     self.cbRemindMeLater.setValue(1)
     self.connect(self.pbtnRemindMeLater, SIGNAL("clicked()"), self.remindMeLaterAndClose)
     HBoxRemindMeLater = MHBoxLayout()
     HBoxRemindMeLater.addWidget(self.cbRemindMeLater)
     HBoxRemindMeLater.addWidget(self.pbtnRemindMeLater)
     self.vblMain.addLayout(HBoxRemindMeLater, 1)
     hbox0 = MHBoxLayout()
     hbox0.addWidget(self.pbtnDownloadAndInstall, 1)
     hbox0.addStretch(2)
     hbox0.addWidget(self.pbtnCancel, 1)
     self.vblMain.addWidget(self.pbtnCheckForDeveloperVersion, 1)
     self.vblMain.addLayout(hbox0, 1)
     self.setWindowTitle(translate("UpdateControl", "Checking for the updates"))
     self.pbtnDownloadAndInstall.setFixedWidth(180)
     self.setFixedWidth(400)
     self.setFixedHeight(130)
     if isActivePyKDE4:
         self.setMainWidget(self.pnlMain)
     else:
         self.setLayout(self.vblMain)
     self.show()
     self.wvWeb.setUrl(MUrl("http://hamsiapps.com/ForMyProjects/UpdateControl.php?p=HamsiManager&v=" + str(
         uni.intversion) + "&l=" + str(uni.MySettings[
         "language"]) + "&machineType=" + uni.machineType + "&os=" + uni.osName + "&buildType=" + uni.getBuildType()))
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:68,代码来源:UpdateControl.py


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