fixed CQ for bitmessageqt.statusbar module
This commit is contained in:
parent
95fc981ae2
commit
1571176082
|
@ -1,8 +1,12 @@
|
|||
from PyQt4 import QtCore, QtGui
|
||||
from Queue import Queue
|
||||
# pylint: disable=unused-argument
|
||||
"""Status bar Module"""
|
||||
|
||||
from time import time
|
||||
from PyQt4 import QtGui
|
||||
|
||||
|
||||
class BMStatusBar(QtGui.QStatusBar):
|
||||
"""Status bar with queue and priorities"""
|
||||
duration = 10000
|
||||
deleteAfter = 60
|
||||
|
||||
|
@ -13,6 +17,9 @@ class BMStatusBar(QtGui.QStatusBar):
|
|||
self.iterator = 0
|
||||
|
||||
def timerEvent(self, event):
|
||||
"""an event handler which allows to queue and prioritise messages to
|
||||
show in the status bar, for example if many messages come very quickly
|
||||
after one another, it adds delays and so on"""
|
||||
while len(self.important) > 0:
|
||||
self.iterator += 1
|
||||
try:
|
||||
|
@ -30,9 +37,3 @@ class BMStatusBar(QtGui.QStatusBar):
|
|||
self.important.append([message, time()])
|
||||
self.iterator = len(self.important) - 2
|
||||
self.timerEvent(None)
|
||||
|
||||
def showMessage(self, message, timeout=0):
|
||||
super(BMStatusBar, self).showMessage(message, timeout)
|
||||
|
||||
def clearMessage(self):
|
||||
super(BMStatusBar, self).clearMessage()
|
||||
|
|
Reference in New Issue
Block a user