本文整理汇总了Python中systray.Systray.setToolTip方法的典型用法代码示例。如果您正苦于以下问题:Python Systray.setToolTip方法的具体用法?Python Systray.setToolTip怎么用?Python Systray.setToolTip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类systray.Systray
的用法示例。
在下文中一共展示了Systray.setToolTip方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Snakefire
# 需要导入模块: from systray import Systray [as 别名]
# 或者: from systray.Systray import setToolTip [as 别名]
#.........这里部分代码省略.........
def _notify(self, room, message, user):
raise NotImplementedError("_notify() must be implemented")
def _updateRoomLayout(self):
room = self.getCurrentRoom()
if room:
canUpload = not self._rooms[room.id]["upload"]
uploadButton = self._rooms[room.id]["uploadButton"]
if (
(canUpload and not uploadButton.isEnabled()) or
(not canUpload and uploadButton.isEnabled())
):
uploadButton.setEnabled(canUpload)
def _updateLayout(self):
self._menus["file"]["connect"].setEnabled(not self._connected and self._canConnect and not self._connecting)
self._menus["file"]["disconnect"].setEnabled(self._connected)
roomsEmpty = self._toolBar["rooms"].count() == 1 and self._toolBar["rooms"].itemData(0).isNull()
if not roomsEmpty and (not self._connected or not self._toolBar["rooms"].count()):
self._toolBar["rooms"].clear()
self._toolBar["rooms"].addItem(self._("No rooms available"))
self._toolBar["rooms"].setEnabled(False)
elif not roomsEmpty:
self._toolBar["rooms"].setEnabled(True)
self._toolBar["roomsLabel"].setEnabled(self._toolBar["rooms"].isEnabled())
self._toolBar["join"].setEnabled(self._toolBar["rooms"].isEnabled())
def _setupRoomUI(self, room):
topic = room.topic if room.topic else ""
topicLabel = ClickableQLabel(topic)
topicLabel.setToolTip(self._("Click here to change room's topic"))
topicLabel.setWordWrap(True)
self.connect(topicLabel, QtCore.SIGNAL("clicked()"), self.changeTopic)
view = SnakeFireWebView(self)
view.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
frame = view.page().mainFrame()
#Send all link clicks to systems web browser
view.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
def linkClicked(url):
QtGui.QDesktopServices.openUrl(url)
view.connect(view, QtCore.SIGNAL("linkClicked (const QUrl&)"), linkClicked)
# Support auto scroll when needed
def autoScroll(size):
frame.scroll(0, size.height())
frame.connect(frame, QtCore.SIGNAL("contentsSizeChanged (const QSize&)"), autoScroll)
usersList = QtGui.QListWidget()
filesLabel = QtGui.QLabel("")
filesLabel.setOpenExternalLinks(True)
filesLabel.setWordWrap(True)
filesLabel.hide()
uploadButton = QtGui.QPushButton(self._("&Upload new file"))
self.connect(uploadButton, QtCore.SIGNAL("clicked()"), self.uploadFile)
uploadProgressBar = QtGui.QProgressBar()
uploadProgressLabel = QtGui.QLabel(self._("Uploading:"))
uploadCancelButton = QtGui.QPushButton(self._("Cancel"))
示例2: Snakefire
# 需要导入模块: from systray import Systray [as 别名]
# 或者: from systray.Systray import setToolTip [as 别名]
#.........这里部分代码省略.........
centralWidget.show()
def _notify(self, room, message):
raise NotImplementedError("_notify() must be implemented")
def _updateRoomLayout(self):
room = self.getCurrentRoom()
if room:
canUpload = not self._rooms[room.id]["upload"]
uploadButton = self._rooms[room.id]["uploadButton"]
if (
(canUpload and not uploadButton.isEnabled()) or
(not canUpload and uploadButton.isEnabled())
):
uploadButton.setEnabled(canUpload)
def _updateLayout(self):
self._menus["file"]["connect"].setEnabled(not self._connected and self._canConnect and not self._connecting)
self._menus["file"]["disconnect"].setEnabled(self._connected)
roomsEmpty = self._toolBar["rooms"].count() == 1 and self._toolBar["rooms"].itemData(0).isNull()
if not roomsEmpty and (not self._connected or not self._toolBar["rooms"].count()):
self._toolBar["rooms"].clear()
self._toolBar["rooms"].addItem(self._("No rooms available"))
self._toolBar["rooms"].setEnabled(False)
elif not roomsEmpty:
self._toolBar["rooms"].setEnabled(True)
self._toolBar["roomsLabel"].setEnabled(self._toolBar["rooms"].isEnabled())
self._toolBar["join"].setEnabled(self._toolBar["rooms"].isEnabled())
def _setupRoomUI(self, room):
topicLabel = ClickableQLabel(room.topic)
topicLabel.setToolTip(self._("Click here to change room's topic"))
topicLabel.setWordWrap(True)
self.connect(topicLabel, QtCore.SIGNAL("clicked()"), self.changeTopic)
editor = QtGui.QTextBrowser()
editor.setOpenExternalLinks(True)
usersList = QtGui.QListWidget()
filesLabel = QtGui.QLabel("")
filesLabel.setOpenExternalLinks(True)
filesLabel.setWordWrap(True)
filesLabel.hide()
uploadButton = QtGui.QPushButton(self._("&Upload new file"))
self.connect(uploadButton, QtCore.SIGNAL("clicked()"), self.uploadFile)
uploadProgressBar = QtGui.QProgressBar()
uploadProgressLabel = QtGui.QLabel(self._("Uploading:"))
uploadCancelButton = QtGui.QPushButton(self._("Cancel"))
self.connect(uploadCancelButton, QtCore.SIGNAL("clicked()"), self.uploadCancel)
uploadLayout = QtGui.QHBoxLayout()
uploadLayout.addWidget(uploadProgressLabel)
uploadLayout.addWidget(uploadProgressBar)
uploadLayout.addWidget(uploadCancelButton)
uploadWidget = QtGui.QWidget()
uploadWidget.setLayout(uploadLayout)
uploadWidget.hide()
leftFrameLayout = QtGui.QVBoxLayout()
示例3: Snakefire
# 需要导入模块: from systray import Systray [as 别名]
# 或者: from systray.Systray import setToolTip [as 别名]
#.........这里部分代码省略.........
def _notify(self, room, message):
raise NotImplementedError("_notify() must be implemented")
def _updateRoomLayout(self):
room = self.getCurrentRoom()
if room:
canUpload = not self._rooms[room.id]["upload"]
uploadButton = self._rooms[room.id]["uploadButton"]
if (
(canUpload and not uploadButton.isEnabled()) or
(not canUpload and uploadButton.isEnabled())
):
uploadButton.setEnabled(canUpload)
def _updateLayout(self):
self._menus["file"]["connect"].setEnabled(not self._connected and self._canConnect and not self._connecting)
self._menus["file"]["disconnect"].setEnabled(self._connected)
roomsEmpty = self._toolBar["rooms"].count() == 1 and self._toolBar["rooms"].itemData(0).isNull()
if not roomsEmpty and (not self._connected or not self._toolBar["rooms"].count()):
self._toolBar["rooms"].clear()
self._toolBar["rooms"].addItem(self._("No rooms available"))
self._toolBar["rooms"].setEnabled(False)
elif not roomsEmpty:
self._toolBar["rooms"].setEnabled(True)
self._toolBar["roomsLabel"].setEnabled(self._toolBar["rooms"].isEnabled())
self._toolBar["join"].setEnabled(self._toolBar["rooms"].isEnabled())
def _setupRoomUI(self, room):
topic = room.topic if room.topic else ""
topicLabel = ClickableQLabel(topic)
topicLabel.setToolTip(self._("Click here to change room's topic"))
topicLabel.setWordWrap(True)
self.connect(topicLabel, QtCore.SIGNAL("clicked()"), self.changeTopic)
view = SnakeFireWebView(self)
view.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
frame = view.page().mainFrame()
#Send all link clicks to systems web browser
view.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
def linkClicked(url): webbrowser.open(str(url.toString()))
view.connect(view, QtCore.SIGNAL("linkClicked (const QUrl&)"), linkClicked)
# Support auto scroll when needed
def autoScroll(size): frame.scroll(0, size.height())
frame.connect(frame, QtCore.SIGNAL("contentsSizeChanged (const QSize&)"), autoScroll)
usersList = QtGui.QListWidget()
filesLabel = QtGui.QLabel("")
filesLabel.setOpenExternalLinks(True)
filesLabel.setWordWrap(True)
filesLabel.hide()
uploadButton = QtGui.QPushButton(self._("&Upload new file"))
self.connect(uploadButton, QtCore.SIGNAL("clicked()"), self.uploadFile)
uploadProgressBar = QtGui.QProgressBar()
uploadProgressLabel = QtGui.QLabel(self._("Uploading:"))
uploadCancelButton = QtGui.QPushButton(self._("Cancel"))
self.connect(uploadCancelButton, QtCore.SIGNAL("clicked()"), self.uploadCancel)