'Status bar widget base for widgets that update based on timers.'

def __init__(self, parent, statusbar):

    super(BaseTimerStatus, self).__init__(parent, statusbar)
    self.label = QLabel(self.TITLE)
    self.value = QLabel()
    self.setToolTip(self.TIP)
    self.value.setAlignment(Qt.AlignRight)
    self.value.setFont(self.label_font)
    fm = self.value.fontMetrics()
    self.value.setMinimumWidth(fm.width('000%'))
    layout = self.layout()
    layout.addWidget(self.label)
    layout.addWidget(self.value)
    layout.addSpacing(20)
    if self.is_supported():
        self.timer = QTimer()
        self.timer.timeout.connect(self.update_label)
        self.timer.start(2000)
    else:
        self.timer = None
        self.hide()
