本文整理汇总了Python中leap.bitmask.config.providerconfig.ProviderConfig.get_services方法的典型用法代码示例。如果您正苦于以下问题:Python ProviderConfig.get_services方法的具体用法?Python ProviderConfig.get_services怎么用?Python ProviderConfig.get_services使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类leap.bitmask.config.providerconfig.ProviderConfig
的用法示例。
在下文中一共展示了ProviderConfig.get_services方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Wizard
# 需要导入模块: from leap.bitmask.config.providerconfig import ProviderConfig [as 别名]
# 或者: from leap.bitmask.config.providerconfig.ProviderConfig import get_services [as 别名]
#.........这里部分代码省略.........
self._register)
usernameRe = QtCore.QRegExp(self.BARE_USERNAME_REGEX)
self.ui.lblUser.setValidator(
QtGui.QRegExpValidator(usernameRe, self))
self.page(self.REGISTER_USER_PAGE).setCommitPage(True)
self._username = None
self._password = None
self.page(self.REGISTER_USER_PAGE).setButtonText(
QtGui.QWizard.CommitButton, self.tr("&Next >"))
self.page(self.SERVICES_PAGE).setButtonText(
QtGui.QWizard.FinishButton, self.tr("Connect"))
# XXX: Temporary removal for enrollment policy
# https://leap.se/code/issues/2922
self.ui.label_12.setVisible(False)
self.ui.lblProviderPolicy.setVisible(False)
def get_domain(self):
return self._domain
def get_username(self):
return self._username
def get_password(self):
return self._password
def get_remember(self):
return has_keyring() and self.ui.chkRemember.isChecked()
def get_services(self):
return self._selected_services
def _enable_check(self, text):
self.ui.btnCheck.setEnabled(len(self.ui.lnProvider.text()) != 0)
self._reset_provider_check()
def _focus_password(self):
"""
Focuses at the password lineedit for the registration page
"""
self.ui.lblPassword.setFocus()
def _focus_second_password(self):
"""
Focuses at the second password lineedit for the registration page
"""
self.ui.lblPassword2.setFocus()
def _register(self):
"""
Performs the registration based on the values provided in the form
"""
self.ui.btnRegister.setEnabled(False)
username = self.ui.lblUser.text()
password = self.ui.lblPassword.text()
password2 = self.ui.lblPassword2.text()
ok, msg = basic_password_checks(username, password, password2)
if ok:
register = SRPRegister(provider_config=self._provider_config)
register.registration_finished.connect(