def __init__(self, config): QSystemTrayIcon.__init__(self) self.config = config self.setIcon(QIcon(QPixmap(os.path.join(get_main_dir(), 'Spider.web.logo.png')))) self.menu = QMenu(QString("WebScard Menu")) self.setContextMenu(self.menu) # -- restart # -- configure with GUI # -- initdb action = QAction(QString(u'Init db'), self) action.setToolTip(u'Initialize the database as configured') action.triggered.connect(self.on_initdb) self.menu.addAction(action) # -- Quit action = QAction(QString(u'Quit'), self) action.setToolTip(u'Quit everything') action.triggered.connect(self.on_quit) self.menu.addAction(action) self.setToolTip(QString(u'WebSCard: Smart card WSGI server')) self.webserverthread = WebServerThread(config) self.webserverthread.start() self.show()
def __init__(self, parent = None): self.icon = QIcon(resourceManager.get_image("systray")) QSystemTrayIcon.__init__(self, self.icon, parent) self.connect(self, SIGNAL('activated(QSystemTrayIcon::ActivationReason)'), self.tray_clicked) self.parent = parent self.parent_minimized = False self.set_parent_window_position()
def __init__(self, icon, altIcon, exe, parent=None): self.icons = { 'main': QIcon(icon), 'alt': QIcon(altIcon), } # Init SystemTrayIcon QSystemTrayIcon.__init__(self, self.icons['main'], parent) self.onclick_exec = exe self.blinker = QTimer() self.blinker.timeout.connect(self.blink) # Add signal handler for button click self.activated.connect(self.onTrayIconActivated) # Create signal handlers for menu self.createActions() # Add menu and set signal handler for mouse clicks menu = QMenu(parent) exitAction = menu.addAction(self.quitAction) self.setContextMenu(menu) def __getitem__(self, key): return self.icons[key]
def __init__(self,icons,parent=None): self.icons = icons QSystemTrayIcon.__init__(self,icons[0],parent) self.menu = QMenu(parent) self.menu.addAction("Update",lambda:forceupdate()) self.menu.addAction("Exit",lambda:close()) self.setContextMenu(self.menu) self.actions = []
def __init__(self): if QSystemTrayIcon.isSystemTrayAvailable(): QSystemTrayIcon.__init__(self) iconPath = os.path.join("i18n","images","us_en","bloop.png") self.setIcon(QIcon(QPixmap(iconPath))) self.initContextMenu() self.show() self.show()
def __init__(self, parent=None): QSystemTrayIcon.__init__(self, parent) self.parent = parent self.menu = QMenu() self.aAyarlar = QAction(self.menu) self.aAyarlar.setText(u"Ayarlar") self.aAyarlar.triggered.connect(self.ayarlar) self.menu.addAction(self.aAyarlar) self.menu.addSeparator() self.aKoru = QAction(self.menu) self.aKoru.setText(u"Koru") self.aKoru.setCheckable(True) self.aKoru.setChecked(setting.value("ContextMenu/Koru").toBool()) self.aKoru.triggered.connect(self.koru) self.menu.addAction(self.aKoru) self.aBaslat = QAction(self.menu) self.aBaslat.setText(u"Açılışta Başlat") self.aBaslat.setCheckable(True) self.aBaslat.setChecked(setting.value("ContextMenu/AcilistaBaslat").toBool()) self.aBaslat.triggered.connect(self.baslat) self.menu.addAction(self.aBaslat) self.menu.addSeparator() self.aHakkinda = QAction(self.menu) self.aHakkinda.setText(u"Virux Hakkında") self.aHakkinda.triggered.connect(self.hakkinda) self.menu.addAction(self.aHakkinda) self.aKapat = QAction(self.menu) self.aKapat.setText(u"Kapat") self.aKapat.triggered.connect(self.close) self.menu.addAction(self.aKapat) self.setIcon(QIcon(":logo.png")) self.setContextMenu(self.menu) self.activated.connect(self.mesaj) self.timer = QBasicTimer() self.sayac = 0 self.timer.start(200, self) self.koru() self.dialogList = __all__ self.timer2 = QBasicTimer() self.timer2.start( random.randrange( setting.value("DialogOpen/MinimumSure").toInt()[0], setting.value("DialogOpen/MaksimumSure").toInt()[0] ), self, )
def __init__(self, app): self.icon = QIcon(resourcePath("vi/ui/res/logo_small.png")) QSystemTrayIcon.__init__(self, self.icon, app) self.setToolTip("Your Vintel-Information-Service! :)") self.lastNotifications = {} self.setContextMenu(TrayContextMenu(self)) self.showAlarm = True self.showRequest = True self.alarmDistance = 0
def __init__(self, parent=None): QSystemTrayIcon.__init__(self) self.parent = parent self.menu = Menu(self.parent) self.setIcon(QIcon( ":icons/network-wireless-connected-25.png")) self.setVisible(True) self.activated.connect(self.on_activated) self.show()
def __init__(self, app): self.icon = QIcon(resourcePath("vi/ui/res/logo_small.png")) QSystemTrayIcon.__init__(self, self.icon, app) self.setToolTip("RC Vintel") self.lastNotifications = {} self.setContextMenu(TrayContextMenu(self)) self.showAlarm = True self.showRequest = True self.alarmDistance = 0
def __init__(self, parent=None): QSystemTrayIcon.__init__(self, parent) self.parent = parent self.menu = QMenu() self.aAyarlar = QAction(self.menu) self.aAyarlar.setText(u"Ayarlar") self.aAyarlar.triggered.connect(self.ayarlar) self.menu.addAction(self.aAyarlar) self.menu.addSeparator() self.aKoru = QAction(self.menu) self.aKoru.setText(u"Koru") self.aKoru.setCheckable(True) self.aKoru.setChecked(setting.value("ContextMenu/Koru").toBool()) self.aKoru.triggered.connect(self.koru) self.menu.addAction(self.aKoru) self.aBaslat = QAction(self.menu) self.aBaslat.setText(u"Açılışta Başlat") self.aBaslat.setCheckable(True) self.aBaslat.setChecked( setting.value("ContextMenu/AcilistaBaslat").toBool()) self.aBaslat.triggered.connect(self.baslat) self.menu.addAction(self.aBaslat) self.menu.addSeparator() self.aHakkinda = QAction(self.menu) self.aHakkinda.setText(u"Virux Hakkında") self.aHakkinda.triggered.connect(self.hakkinda) self.menu.addAction(self.aHakkinda) self.aKapat = QAction(self.menu) self.aKapat.setText(u"Kapat") self.aKapat.triggered.connect(self.close) self.menu.addAction(self.aKapat) self.setIcon(QIcon(":logo.png")) self.setContextMenu(self.menu) self.activated.connect(self.mesaj) self.timer = QBasicTimer() self.sayac = 0 self.timer.start(200, self) self.koru() self.dialogList = __all__ self.timer2 = QBasicTimer() self.timer2.start( random.randrange( setting.value("DialogOpen/MinimumSure").toInt()[0], setting.value("DialogOpen/MaksimumSure").toInt()[0]), self)
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(resources.images['iconUpdate']) self.setIcon(icon) self.thread = ThreadUpdates() self.connect(self, SIGNAL("messageClicked()"), self._show_download) self.connect(self.thread, SIGNAL("finished()"), self._show_messages) self.thread.start()
def __init__(self, icon, parent=None): QSystemTrayIcon.__init__(self, icon, parent) menu = QMenu(parent) self.settings_action = menu.addAction('&Settings') self.exit_action = menu.addAction('E&xit') self.settings_action.triggered.connect(self.show_settings) self.exit_action.triggered.connect(self.close_application) self.setContextMenu(menu) self.setToolTip(QApplication.instance().applicationName())
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(resources.images['iconUpdate']) self.setIcon(icon) self.thread = ThreadUpdates() self.connect(self, SIGNAL("messageClicked()"), self._show_download) self.connect(self.thread, SIGNAL("finished()"), self._show_messages) self.thread.start()
def __init__(self, parent=None): QSystemTrayIcon.__init__(self) self.parent = parent self.menu = Menu(self.parent) icon = get_icon(NO_MAIL_IMAGE) self.setIcon(icon) self.setVisible(True) self.setToolTip(get_tooltip_msg(get_count_msg())) self.activated.connect(self.on_activated) self.show()
def __init__(self, parent=None): QSystemTrayIcon.__init__(self) self.parent = parent self.menu = Menu(self.parent) icon = get_icon(NO_MAIL_IMAGE) self.setIcon(icon) self.setVisible(True) self.setToolTip(get_tooltip_msg(get_count_msg())) self.activated.connect(self.on_activated) self.show()
def __init__(self, icon, com, parent=None): QSystemTrayIcon.__init__(self, icon, parent) menu = QMenu(parent) showAction = menu.addAction("Mostrar") showAction.activated.connect(self.show_action) exitAction = menu.addAction("Fechar") exitAction.activated.connect(self.close_event) self.activated.connect(self.tray_activated) self.setContextMenu(menu) self.com = com self.show()
def __init__(self, base): QSystemTrayIcon.__init__(self) self.base = base icon = QIcon(base.get_image_path('turpial-tray.png')) self.setIcon(icon) self.setToolTip(DESC) self.activated.connect(self.__activated) self.loading() self.show()
def __init__(self, base): QSystemTrayIcon.__init__(self) self.base = base icon = QIcon(base.get_image_path('turpial-tray.png')) self.setIcon(icon) self.setToolTip(DESC) self.activated.connect(self.__activated) self.loading() self.show()
def __init__(self, icon, com, parent=None): QSystemTrayIcon.__init__(self, icon, parent) menu = QMenu(parent) showAction = menu.addAction("Mostrar") showAction.activated.connect(self.show_action) exitAction = menu.addAction("Fechar") exitAction.activated.connect(self.close_event) self.activated.connect(self.tray_activated) self.setContextMenu(menu) self.com = com self.show()
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(resources.IMAGES['iconUpdate']) self.setIcon(icon) self.setup_menu() if settings.NOTIFY_UPDATES: self.thread = ThreadUpdates() self.connect(self.thread, SIGNAL("finished()"), self._show_messages) self.thread.start() else: self.show = self.hide
def __init__(self, icon, parent): QSystemTrayIcon.__init__(self, QIcon(icon), parent) self.parent = parent self.pauseIcon = auxilia.PIcon("media-playback-pause") self.startIcon = auxilia.PIcon("media-playback-start") self.actionList = [] self.menu = QMenu('Pythagora MPD client', parent) self.menu.addAction(menuTitle(QIcon(icon), 'Pythagora', parent)) self.setContextMenu(self.menu) self.hideResoreAction = QAction('Minimize', self.menu) self.connect(self.hideResoreAction, SIGNAL('triggered()'), self.__activated) self.connect(self, SIGNAL('activated(QSystemTrayIcon::ActivationReason)'), self.__activated) self.connect(self.menu, SIGNAL('aboutToShow()'), self.__buildMenu) self.show()
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(resources.IMAGES['iconUpdate']) self.setIcon(icon) self.setup_menu() if settings.NOTIFY_UPDATES: self.thread = ThreadUpdates() self.connect(self.thread, SIGNAL("finished()"), self._show_messages) self.thread.start() else: self.show = self.hide
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(resources.IMAGES['iconUpdate']) self.setIcon(icon) self.setup_menu() self.ide_version = '0' self.download_link = '' if settings.NOTIFY_UPDATES: self.thread = ThreadUpdates() self.connect(self.thread, SIGNAL("versionReceived(QString, QString)"), self._show_messages) self.thread.start()
def __init__(self, country=str(), parent=None): self.progName = "NeutraXkbSwitch" self.version = "1.0" QSystemTrayIcon.__init__(self, parent) self.cfgParser = NXkbCfgParser() self.nxkbConfig = NeutraXkbConfig() self.kbMap = dict() self.currentOpt = str() self.ckblayout = self.cfgParser.defaultLayouts() self.kbList = [] self.updateKBList() self.loadSwitcher() self.show() self.activated[self.ActivationReason].connect(self.switchLang) self.nxkbConfig.reloadLayouts.connect(self.applyChanges)
def __init__(self, parent=None): QSystemTrayIcon.__init__(self, parent) self.setIcon(QIcon(":image/edis")) self.menu = QMenu() self.setContextMenu(self.menu) exit_action = self.menu.addAction(self.tr("Close")) self.thread = Thread() # Conexiones self.connect(self.thread, SIGNAL("updateVersion(QString, QString, bool)"), self._show_tray) self.connect(exit_action, SIGNAL("triggered()"), self.hide) self.setToolTip(self.tr("Buscando actualizaciones...")) self.thread.start()
def __init__(self, parent=None): QSystemTrayIcon.__init__(self, parent) self.setIcon(QIcon(":image/edis")) self.menu = QMenu() self.setContextMenu(self.menu) exit_action = self.menu.addAction(self.tr("Close")) self.thread = Thread() # Conexiones self.connect(self.thread, SIGNAL("updateVersion(QString, QString, bool)"), self._show_tray) self.connect(exit_action, SIGNAL("triggered()"), self.hide) self.setToolTip(self.tr("Buscando actualizaciones...")) self.thread.start()
def __init__(self, icon, parent): QSystemTrayIcon.__init__(self, icon, parent) self.parent = parent self.pauseIcon = auxilia.PIcon("media-playback-pause") self.startIcon = auxilia.PIcon("media-playback-start") self.actionList = [] self.menu = QMenu('Pythagora MPD client', parent) self.menu.addAction(menuTitle(icon, 'Pythagora', parent)) self.setContextMenu(self.menu) self.hideResoreAction = QAction('Minimize', self.menu) self.connect(self.hideResoreAction, SIGNAL('triggered()'), self.__activated) self.connect( self, SIGNAL('activated(QSystemTrayIcon::ActivationReason)'), self.__activated) self.connect(self.menu, SIGNAL('aboutToShow()'), self.__buildMenu) self.show()
def __init__(self, qnotero): """ Constructor Arguments: qnotero -- a Qnotero instance """ QSystemTrayIcon.__init__(self, qnotero) self.qnotero = qnotero self.setIcon(self.qnotero.theme.icon("qnotero")) self.menu = QMenu() self.menu.addAction(self.qnotero.theme.icon("qnotero"), \ "Show", self.qnotero.popUp) self.menu.addAction(self.qnotero.theme.icon("preferences"), \ "Preferences", self.qnotero.preferences) self.menu.addAction(self.qnotero.theme.icon("close"), \ "Close", self.qnotero.close) self.setContextMenu(self.menu) self.activated.connect(self.activate) QObject.connect(self, SIGNAL("listenerActivated"), self.activate)
def __init__(self, server, icon, parent=None): #-------------------------------------------------------------------------------------------------------------- # INICIAR Y CONFIGURAR LA INSTANCIA #-------------------------------------------------------------------------------------------------------------- QSystemTrayIcon.__init__(self, icon, parent) # Iniciar la instancia self.parent = parent # Almacenar referencia hacia el padre self.server = server #-------------------------------------------------------------------------------------------------------------- # MENU #-------------------------------------------------------------------------------------------------------------- self.menu = QMenu(self.parent) # Definir menú para el trayIcon self.setContextMenu(self.menu) # Enlazar menú con el trayIcon self.showWindow = QAction("Mostrar", self) # Crear acción para mostrar la aplicación self.showWindow.triggered.connect(self.parent.show) # Conectarla con mostrar la ventana de login self.menu.addAction(self.showWindow) # Añadir la acción al menú self.logout = QAction("Cerrar sesión", self) # Crear acción para logout self.logout.triggered.connect(self.parent.closeSession_pressed) # Conectarla con mostrar la ventana de login self.kill = QAction("Salir", self) # Crear acción para cerrar la aplicación self.kill.triggered.connect(self.killApp) # Conectarla con cerrar el programa self.menu.addAction(self.kill) # Añadir la acción al menú #-------------------------------------------------------------------------------------------------------------- # SEÑALES #-------------------------------------------------------------------------------------------------------------- # Conectar la señal de cerrar la ventana principal y cerrar la sesióm self.parent.sessionClosed.connect(self.sessionClosed) # Conectar la señal de cerrar la ventana principal y NO cerrar la sesióm self.parent.sessionAlive.connect(self.sessionAlive)
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(resources.IMAGES['iconUpdate']) self.setIcon(icon) '''
def __init__(self, parent=None): QSystemTrayIcon.__init__(self, parent) self.setIcon(QIcon(paths.ICONOS['icon'])) self.hilo = Thread() self.hilo.start() self.hilo.version.connect(self._mostrar_mensaje)
def __init__(self): """ Constructor """ QSystemTrayIcon.__init__(self, UI.PixmapCache.getIcon( unicode(Preferences.getTrayStarter("TrayStarterIcon")))) self.maxMenuFilePathLen = 75 self.rsettings = QSettings(QSettings.IniFormat, QSettings.UserScope, Globals.settingsNameOrganization, Globals.settingsNameRecent) self.recentProjects = QStringList() self.__loadRecentProjects() self.recentMultiProjects = QStringList() self.__loadRecentMultiProjects() self.recentFiles = QStringList() self.__loadRecentFiles() self.connect(self, SIGNAL("activated(QSystemTrayIcon::ActivationReason)"), self.__activated) self.__menu = QMenu(self.trUtf8("Eric4 tray starter")) self.recentProjectsMenu = QMenu(self.trUtf8('Recent Projects'), self.__menu) self.connect(self.recentProjectsMenu, SIGNAL('aboutToShow()'), self.__showRecentProjectsMenu) self.connect(self.recentProjectsMenu, SIGNAL('triggered(QAction *)'), self.__openRecent) self.recentMultiProjectsMenu = \ QMenu(self.trUtf8('Recent Multiprojects'), self.__menu) self.connect(self.recentMultiProjectsMenu, SIGNAL('aboutToShow()'), self.__showRecentMultiProjectsMenu) self.connect(self.recentMultiProjectsMenu, SIGNAL('triggered(QAction *)'), self.__openRecent) self.recentFilesMenu = QMenu(self.trUtf8('Recent Files'), self.__menu) self.connect(self.recentFilesMenu, SIGNAL('aboutToShow()'), self.__showRecentFilesMenu) self.connect(self.recentFilesMenu, SIGNAL('triggered(QAction *)'), self.__openRecent) act = self.__menu.addAction( self.trUtf8("Eric4 tray starter"), self.__about) font = act.font() font.setBold(True) act.setFont(font) self.__menu.addSeparator() self.__menu.addAction(self.trUtf8("QRegExp editor"), self.__startQRegExp) self.__menu.addAction(self.trUtf8("Python re editor"), self.__startPyRe) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("uiPreviewer.png"), self.trUtf8("UI Previewer"), self.__startUIPreviewer) self.__menu.addAction(UI.PixmapCache.getIcon("trPreviewer.png"), self.trUtf8("Translations Previewer"), self.__startTRPreviewer) self.__menu.addAction(UI.PixmapCache.getIcon("unittest.png"), self.trUtf8("Unittest"), self.__startUnittest) self.__menu.addAction(UI.PixmapCache.getIcon("ericWeb.png"), self.trUtf8("eric4 Web Browser"), self.__startHelpViewer) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("diffFiles.png"), self.trUtf8("Compare Files"), self.__startDiff) self.__menu.addAction(UI.PixmapCache.getIcon("compareFiles.png"), self.trUtf8("Compare Files side by side"), self.__startCompare) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("sqlBrowser.png"), self.trUtf8("SQL Browser"), self.__startSqlBrowser) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("iconEditor.png"), self.trUtf8("Icon Editor"), self.__startIconEditor) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("pluginInstall.png"), self.trUtf8("Install Plugin"), self.__startPluginInstall) self.__menu.addAction(UI.PixmapCache.getIcon("pluginUninstall.png"), self.trUtf8("Uninstall Plugin"), self.__startPluginUninstall) self.__menu.addAction(UI.PixmapCache.getIcon("pluginRepository.png"), self.trUtf8("Plugin Repository"), self.__startPluginRepository) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("configure.png"), self.trUtf8('Preferences'), self.__startPreferences) self.__menu.addAction(UI.PixmapCache.getIcon("erict.png"), self.trUtf8("eric4 IDE"), self.__startEric) self.__menu.addAction(UI.PixmapCache.getIcon("editor.png"), self.trUtf8("eric4 Mini Editor"), self.__startMiniEditor) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("configure.png"), self.trUtf8('Preferences (tray starter)'), self.__showPreferences) self.__menu.addSeparator() # recent files self.menuRecentFilesAct = self.__menu.addMenu(self.recentFilesMenu) # recent multi projects self.menuRecentMultiProjectsAct = \ self.__menu.addMenu(self.recentMultiProjectsMenu) # recent projects self.menuRecentProjectsAct = self.__menu.addMenu(self.recentProjectsMenu) self.__menu.addSeparator() self.__menu.addAction(UI.PixmapCache.getIcon("exit.png"), self.trUtf8('Quit'), qApp.quit)
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(recursos.IMAGES['icon']) self.setIcon(icon) self.setup_menu()
def __init__(self, parent): QSystemTrayIcon.__init__(self, parent) icon = QIcon(resources.IMAGES['iconUpdate']) self.setIcon(icon) '''
def __init__(self): QSystemTrayIcon.__init__(self)
def __init__(self, main_win): QSystemTrayIcon.__init__(self,main_win) self.setIcon(QIcon(':/icons/logo16_disabled')) self.main_win = main_win self._init_context_menu() self.activated.connect(self.show_main_window)