Ejemplo n.º 1
0
    def __init__(self):
        super(LoginDialog, self).__init__()
        self.load(cbpos.res.auth("images/login-background2.svg"))
        self.setWindowTitle(cbpos.tr.auth_('Login'))

        #Login Panel
        #self.showFullScreen() #To center the login widget on screen, and getting space to show it right.
        self.loginPanel = LoginPanel(self, cbpos.res.auth("images/login.svg"))
        self.loginPanel.setSize(350, 350)
        self.loginPanel.setLoginCallback(self.onOkButton)
        self.loginPanel.setClockingCallback(self.onClocking)
        self.loginPanel.setLoginAndClockinCallback(self.onLoginAndClockin)
        self.loginPanel.editUsername.currentIndexChanged.connect(
            self.loginPanel.editPassword.setFocus)
        self.loginPanel.editPassword.returnPressed.connect(self.onOkButton)
        self.loginPanel.btnExit.clicked.connect(self.onExitButton)