def checkForDeveloperVersion(self): self.wvWeb.setUrl( MUrl( "http://hamsiapps.com/ForMyProjects/UpdateControl.php?p=HamsiManager&v=" + str(uni.intversion) + "&m=develop&l=" + str(uni.MySettings["language"]) + "&machineType=" + uni.machineType + "&os=" + uni.osName + "&buildType=" + uni.getBuildType()))
def checkForDeveloperVersion(self): self.wvWeb.setUrl(MUrl("http://hamsiapps.com/ForMyProjects/UpdateControl.php?p=HamsiManager&v=" + str( uni.intversion) + "&m=develop&l=" + str(uni.MySettings[ "language"]) + "&machineType=" + uni.machineType + "&os=" + uni.osName + "&buildType=" + uni.getBuildType()))
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()))
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()))