def change_css_default(self): css_skin = """ QFrame#mainFrame { background-color: #31363b; border-radius: 15px; } """ self.mainFrame.setStyleSheet(css_skin) file_ = HZResources.get_css_resources("software_manager") awesome_css.set_style_sheet(self, file_)
def __init__(self, app, parent): name = "software_manager_item" super(SoftwareManagerItemGUI, self).__init__() ui_file = HZResources.get_ui_resources(name) RenderAwesomeUI(ui_file, parent_widget=self) self.app = app self.parent = parent self.comboBox.activated.connect(self.save_current_name) self.pushButton.clicked.connect(self.parent.launch) open_hand_cursor = QtGui.QCursor(QtCore.Qt.PointingHandCursor) self.setCursor(open_hand_cursor) awesome_css.set_style_sheet(self, HZResources.get_css_resources(name))
"ship_console", msg, None, QtWidgets.QApplication.UnicodeUTF8) self.tray_icon.showMessage(NAME, update_info, icon, 200000) @staticmethod def check_update_info(): g = SoftwareManagerNoteGUI() g.check_update() if __name__ == "__main__": APP = QtWidgets.QApplication([]) APP_NAME = "software_manager" CSS_FILE = HZResources.get_css_resources(APP_NAME) GUI = SoftwareManagerGUI(HZResources.get_ui_resources(APP_NAME)) IMAGE_PATH = HZResources.get_icon_resources("HZ.png") SPLASH = AwesomeSplashScreen(IMAGE_PATH) APP.processEvents() SPLASH.showMessage("version: 1.1") SPLASH.effect() APP.setOrganizationName(APP_NAME) APP.setApplicationName(APP_NAME) APP.processEvents() GUI.show() SPLASH.finish(GUI) # GUI.check_update_info() APP.exec_()
def show_message(self, msg): icon = QtWidgets.QSystemTrayIcon.MessageIcon() update_info = QtWidgets.QApplication.translate( "ship_console", msg, None, QtWidgets.QApplication.UnicodeUTF8) self.tray_icon.showMessage(NAME, update_info, icon, 200000) @staticmethod def check_update_info(): g = SoftwareManagerNoteGUI() g.check_update() if __name__ == "__main__": APP = QtWidgets.QApplication([]) APP_NAME = "software_manager" CSS_FILE = HZResources.get_css_resources(APP_NAME) GUI = SoftwareManagerGUI(HZResources.get_ui_resources(APP_NAME)) IMAGE_PATH = HZResources.get_icon_resources("HZ.png") SPLASH = AwesomeSplashScreen(IMAGE_PATH) APP.processEvents() SPLASH.showMessage("version: 1.1") SPLASH.effect() APP.setOrganizationName(APP_NAME) APP.setApplicationName(APP_NAME) APP.processEvents() GUI.show() SPLASH.finish(GUI) # GUI.check_update_info() APP.exec_()