def METHOD_NAME(self, qp):
    size = self.size()
    w = size.width()
    h = size.height()
    lower_threshold = self.margin*self.range
    upper_threshold = (1-self.margin)*self.range
    till = round(old_div((h * (self.range-self.value)),self.range))
    if self.value <= lower_threshold or self.value >= upper_threshold:
        qp.setBrush(QColor(255, 100, 100))
    else:
        qp.setBrush(QColor(50, 255, 50))
    qp.setPen(QColor(0,0,0))
    qp.drawRect(0, h-1, w, till-h)
    pen = QPen(QColor(20, 20, 20), 1, Qt.SolidLine)
    qp.setPen(pen)
    qp.setBrush(Qt.NoBrush)
    qp.drawRect(0, 0, w-1, h-1)
    sepeation_marks = int(round(h / 10.0))
    for i in range(sepeation_marks, 10*sepeation_marks, sepeation_marks):
        qp.drawLine(0, i, 5, i)