class Status(QLabel):
def __init__(self, parent=None):
QLabel.__init__(self, "", parent)
+ self.sliceUpdateDate()
def set(self, msg, timeout):
self.setText(msg)
if timeout:
- QTimer.singleShot(timeout, self, SLOT("clear()"))
+ QTimer.singleShot(timeout, self.reset)
def sliceUpdateDate(self):
rspec_file = config.getSliceRSpecFile()
+ if not os.path.exists(rspec_file):
+ return
+
creation_time = os.stat(rspec_file).st_ctime
last_update = time.ctime(creation_time)
- self.set(last_update, timeout=None)
+ self.set("Slice data last updated on %s" % last_update, timeout=None)
- def clear(self):
-# self.setText("")
- self.sliceUpdateDate()
+ def reset(self):
+ self.setText("")
+ QTimer.singleShot(1500, self.sliceUpdateDate)
class SfaWindow(QWidget):