+class Nav(QWidget):
+ def __init__(self, parent=None):
+ QWidget.__init__(self, parent)
+
+ self.title = QLabel("", self)
+ self.link = QLabel("", self)
+ self.link.setAlignment(Qt.AlignRight)
+
+ hlayout = QHBoxLayout()
+ hlayout.addWidget(self.title)
+ hlayout.addStretch()
+ hlayout.addWidget(self.link)
+ self.setLayout(hlayout)
+
+ def setTitle(self, title):
+ self.title.setText(title)
+
+ def setLink(self, link):
+ self.link.setText(link)
+
+
+class Status(QLabel):
+ def __init__(self, parent=None):
+ QLabel.__init__(self, "", parent)
+
+ def set(self, msg, timeout):
+ self.setText(msg)
+ if timeout:
+ QTimer.singleShot(timeout, self, SLOT("clear()"))
+
+ def sliceUpdateDate(self):
+ rspec_file = config.getSliceRSpecFile()
+ creation_time = os.stat(rspec_file).st_ctime
+ last_update = time.ctime(creation_time)
+ self.set(last_update, timeout=None)
+
+ def clear(self):
+# self.setText("")
+ self.sliceUpdateDate()
+