当前位置: 首页>>代码示例>>Python>>正文


Python QSystemTrayIcon.__init__方法代码示例

本文整理汇总了Python中PyQt4.QtGui.QSystemTrayIcon.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QSystemTrayIcon.__init__方法的具体用法?Python QSystemTrayIcon.__init__怎么用?Python QSystemTrayIcon.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.QtGui.QSystemTrayIcon的用法示例。


在下文中一共展示了QSystemTrayIcon.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
    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()
开发者ID:benallard,项目名称:webscard,代码行数:31,代码来源:qt.py

示例2: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
 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()
开发者ID:blicharski,项目名称:jobplanner,代码行数:9,代码来源:SystemTryIcon.py

示例3: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
	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 = []
开发者ID:georules,项目名称:pygmail,代码行数:10,代码来源:osxqt4.py

示例4: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
 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()
开发者ID:gubatron,项目名称:blooploader,代码行数:11,代码来源:TrayIconView.py

示例5: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
 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()
开发者ID:gen2brain,项目名称:bgradio,代码行数:11,代码来源:tray.py

示例6: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
 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
开发者ID:WisdomPanda,项目名称:vintel,代码行数:11,代码来源:systemtray.py

示例7: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
    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,
        )
开发者ID:superactive,项目名称:Virux,代码行数:59,代码来源:virux.py

示例8: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
    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()
开发者ID:aztli,项目名称:Traducciones,代码行数:12,代码来源:updates.py

示例9: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
    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())
开发者ID:se0siris,项目名称:bing-wallpaper-changer,代码行数:12,代码来源:custom_widgets.py

示例10: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
 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()
开发者ID:gen2brain,项目名称:gmailcheck,代码行数:12,代码来源:gmailcheck.py

示例11: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
 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()
开发者ID:ROAND,项目名称:Series-Manager,代码行数:13,代码来源:semard.py

示例12: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
    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()
开发者ID:Bouska,项目名称:Turpial,代码行数:13,代码来源:tray.py

示例13: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
    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()
开发者ID:jsargiot,项目名称:ninja-ide,代码行数:16,代码来源:updates.py

示例14: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
    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
开发者ID:alekibango,项目名称:ninja-ide,代码行数:16,代码来源:updates.py

示例15: __init__

# 需要导入模块: from PyQt4.QtGui import QSystemTrayIcon [as 别名]
# 或者: from PyQt4.QtGui.QSystemTrayIcon import __init__ [as 别名]
 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()
开发者ID:Mvedrines,项目名称:Pythagora,代码行数:16,代码来源:MainWindow.py


注:本文中的PyQt4.QtGui.QSystemTrayIcon.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。