Пример #1
0
 def __init__(self, new_version=0, update_link=None):
     super(MainWindow, self).__init__()
     self.lastFilePath = ''
     self.formSeting = None
     self.loginThread = None
     self.cherry_thread = []
     self.ex = True
     self.logined = False
     self.clip = QtGui.QApplication.clipboard()
     self.setWindowIcon(QIcon(resource_path('download.png')))
     if sys.platform == 'win32':
         self.trayIcon = SystemTrayIcon(QtGui.QIcon(resource_path("junshare.xpm")), self)
     else:
         self.trayIcon = SystemTrayIcon(QtGui.QIcon(resource_path("download_mac.png")), self)
     self.trayIcon.show()
     # add context menu
     self.new_version = new_version
     self.update_link = update_link
     self.tabbedViewWidget = QtGui.QTabWidget(self)
     self.tabSetting = tabSetting(self)
     self.tabDownloaded = tabDownloaded(self)
     self.tabUpload = tabUpload(self, self.upload_complete_signal)
     self.tabDownload = download.tabDownload(self, self.download_complete_signal)
     self.storagonSDK = StoragonSDK(serverURL)
     self.Msgbox = QtGui.QMessageBox(self)
     self.username = ''
     self.password = ''
     self.initUI()
     self.download_complete_signal.connect(self.addNew)
     self.link = ""
     # check for update
     self.new_version = ''
     self.update_mess = ''
     self.update_link = ''
     self.con = sqlite3.connect('data.db')
     self.check_update()
     self.finish_check_update.connect(self.write_update_message)
     self.trayIcon.messageClicked.connect(self.download)
     self.upload_complete_signal.connect(self.upload_complete_status)
Пример #2
0
    def __init__(self, new_version=0, update_link=None):
        super(MainWindow, self).__init__()
        global serverURL
        self.storagonSDK = StoragonSDK(serverURL)

        self.lastFilePath = ''
        self.formSeting = None
        self.loginThread = None

        # if sys.platform == 'darwin':
        #     self.trayIcon = SystemTrayIcon(QtGui.QIcon(resource_path("download_mac.png")), self)
        # elif sys.platform == 'win32':
        #     self.trayIcon = SystemTrayIcon(QtGui.QIcon(resource_path("download.xpm")), self)
        # elif sys.platform == 'linux2':
        self.trayIcon = SystemTrayIcon(QtGui.QIcon(resource_path("download.png")), self)
        self.trayIcon.show()
        # add context menu

        self.new_version = new_version
        self.update_link = update_link
        self.tabSetting = tabSetting(self)
        self.tabDownloaded = tabDownloaded(self)
        self.tabbedViewWidget = QtWidgets.QTabWidget(self)
        self.tabDownload = download.tabDownload(self, self.download_complete_signal)
        self.Msgbox = QtWidgets.QMessageBox(self)
        self.username = ''
        self.password = ''

        self.initUI()
        self.download_complete_signal.connect(self.addNew)
        # check for update
        self.new_version = ''
        self.update_mess = ''
        self.update_link = ''
        self.con = sqlite3.connect('data.db')
        self.check_update()
        self.finish_check_update.connect(self.write_update_message)