Ejemplo n.º 1
0
class _Verify_Token(QtGui.QWidget):
    def __init__(self, api, userdata, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.api = api
        self.userdata = userdata
        self.response = ""
        self.alive = True
        # Set up user interface from designer
        self.code_form = Ui_Verification_code()
        self.code_form.setupUi(self)
        self.setStyleSheet(self.style)
        self.code_form.btn_ok.setStyleSheet(self.style)
        self.code_form.btn_ok.clicked.connect(self.btn_code_ok)

    def btn_code_ok(self):
        self.userdata["code"] = self.code_form.ln_code.text()
        self.response = self.api._getBasicURI("user/confirm", values=self.userdata)
        self.alive = False
        self.close()
Ejemplo n.º 2
0
 def __init__(self, api, userdata, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.api = api
     self.userdata = userdata
     self.response = ""
     self.alive = True
     # Set up user interface from designer
     self.code_form = Ui_Verification_code()
     self.code_form.setupUi(self)
     self.setStyleSheet(self.style)
     self.code_form.btn_ok.setStyleSheet(self.style)
     self.code_form.btn_ok.clicked.connect(self.btn_code_ok)