def newEvent(self, pixmap, text, lifetime, sound): self.labelEvent.setText(str(text)) if not pixmap: pixmap = self.standardIcon self.labelImage.setPixmap(pixmap) self.labelTime.setText(time.strftime("%H:%M:%S", time.gmtime())) QtCore.QTimer.singleShot(lifetime * 1000, self, QtCore.SLOT('hide()')) if sound: util.sound("notification_system/sfx/multimedia_pop_up_alert_tone_2.wav") self.show()
def newEvent(self, pixmap, text, lifetime, sound): self.labelEvent.setText(str(text)) if not pixmap: pixmap = self.standardIcon self.labelImage.setPixmap(pixmap) self.labelTime.setText(time.strftime("%H:%M:%S", time.gmtime())) QtCore.QTimer.singleShot(lifetime * 1000, self, QtCore.SLOT('hide()')) if sound: util.sound("chat/sfx/query.wav") self.show()
def pingWindow(self): QtGui.QApplication.alert(self.lobby.client) if not self.isVisible() or QtGui.QApplication.activeWindow() != self.lobby.client: if self.oneMinuteOrOlder(): if self.lobby.client.soundeffects: util.sound("chat/sfx/query.wav") if not self.isVisible(): if not self.blinker.isActive() and not self == self.lobby.currentWidget(): self.startBlink()
def newEvent(self, pixmap, text, lifetime, sound): """ Called to display a new popup Keyword arguments: pixmap -- Icon for the event (displayed left) text- HTMl-Text of the vent (displayed right) lifetime -- Display duration sound -- true|false if should played """ self.labelEvent.setText(str(text)) if not pixmap: pixmap = self.standardIcon self.labelImage.setPixmap(pixmap) self.labelTime.setText(time.strftime("%H:%M:%S", time.gmtime())) QtCore.QTimer.singleShot(lifetime * 1000, self, QtCore.SLOT('hide()')) if sound: util.sound("chat/sfx/query.wav") self.show()