예제 #1
0
파일: main.py 프로젝트: reality/tunnel
 def login(self):
     """Run login dialog and get the api_conn set up"""
     login = LoginWindow(self)
     login.exec_()
     self.connected = True
예제 #2
0
파일: main.py 프로젝트: frullis/timeyappPy
    print(data)

    try:
        if data == None:
            raise ApiException('Error could not connect to api')
        if data.get('error'):
            login = LoginWindow()
            trayIcon = SystemTrayIcon(QIcon(Config.icon))
            #Maybe move this inside the SystemTray class, keep the main clean yo
            trayIcon.StartWorking.setEnabled(False)
            trayIcon.dashboard.setEnabled(False)
            trayIcon.settings.setEnabled(False)
            trayIcon.timer.setEnabled(False)
            trayIcon.show()
            #lol.button.clicked.connect(run)#self.button.clicked
            if login.exec_() == QDialog.Accepted:
                ex = TimerWindow()
                trayIcon.ex = ex
                trayIcon.StartWorking.setEnabled(True)
                trayIcon.dashboard.setEnabled(True)
                trayIcon.settings.setEnabled(True)
                trayIcon.timer.setEnabled(True)
                #trayIcon = SystemTrayIcon(QIcon(Config.icon), ex)
                #trayIcon.show()
                sys.exit(app.exec_())
        else:
            #For autologin
            ex = TimerWindow()
            trayIcon = SystemTrayIcon(QIcon(Config.icon), ex)
            ex.systray = trayIcon
            trayIcon.show()
예제 #3
0
파일: main.py 프로젝트: reality/tunnel
 def login(self):
     """Run login dialog and get the api_conn set up"""
     login = LoginWindow(self)
     login.exec_()
     self.connected = True