本文整理汇总了Python中auth.Auth.get_password方法的典型用法代码示例。如果您正苦于以下问题:Python Auth.get_password方法的具体用法?Python Auth.get_password怎么用?Python Auth.get_password使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类auth.Auth
的用法示例。
在下文中一共展示了Auth.get_password方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MyElement
# 需要导入模块: from auth import Auth [as 别名]
# 或者: from auth.Auth import get_password [as 别名]
#.........这里部分代码省略.........
return self._hasLogin
@pyqtProperty(str, notify=themeChanged)
def myColor1(self):
return self._myColor[0]
@pyqtProperty(str, notify=themeChanged)
def myColor2(self):
return self._myColor[1]
@pyqtSlot(str)
def setTheme(self, theme):
self._myTheme.setTheme(theme)
self.themeChanged.emit()
@pyqtProperty(str, notify=varChanged)
def isiPesan(self):
return self._isiPesan
@pyqtSlot(str, str)
def setInfo(self, judul,isi):
if self._isiPesan != isi:
self._isiPesan = isi
if self._judulPesan != judul:
self._judulPesan = judul
self.varChanged.emit()
@pyqtProperty(str, notify=varChanged)
def judulPesan(self):
return self._judulPesan
@pyqtProperty(str, notify=varChanged)
def getPassword(self):
return self.auth.get_password()
@pyqtProperty(bool, notify=hasRegisterChanged)
def hasRegister(self):
return self.auth.check()
def setRegister(self, register):
if self._hasRegister != register:
self._hasRegister = register
self.hasRegisterChanged.emit()
@pyqtSlot(str, str)
def doRegister(self, hint, userPass):
if self.auth.set_password(userPass, hint):
self.setError(True, "Proses Gagal", "Terjadi kesalahan pada proses pembuatan kata kunci baru.")
else:
self.setError(True, "Perubahan Berhasil", "Kata kunci anda berhasil dirubah dan disimpan.")
self.setRegister(True)
def setLogin(self, login):
if self._hasLogin != login:
self._hasLogin = login
self.hasLoginChanged.emit()
@pyqtProperty(bool, notify=hasErrorChanged)
def hasError(self):
return self._hasError
@pyqtProperty(str, notify=overlayChanged)
def overlay(self):
return self._overlay
@pyqtSlot(str)