import sys from qt import * import string import time from Misc import disable_resize class StatusBarDialog(QProgressDialog): def __init__(self, parent, title, message, cancelText, steps): QProgressDialog.__init__(self, parent, "", True) self.setCaption("%s - Pylude" % title) self.setIcon(QPixmap("images/prelude.png")) self.setLabelText(message) self.setCancelButtonText(cancelText) self.setTotalSteps(steps) self.setProgress(0) self.setMinimumDuration(5) def update(self, message, value=1): self.setLabelText(message) self.setProgress(self.progress() + value)