19 lines
482 B
Python
19 lines
482 B
Python
import cairo
|
|
|
|
class Gauge():
|
|
__slots__ = 'min_value', 'max_value', 'value',
|
|
|
|
def __init__(self, min_value: float, max_value: float):
|
|
self.min_value: float = min_value
|
|
self.max_value: float = max_value
|
|
self.value: float = min_value
|
|
|
|
def set_value(self, value):
|
|
self.value = value
|
|
|
|
def draw_bg(self, cr: cairo.Context):
|
|
raise NotImplementedError
|
|
|
|
def draw_fg(self, cr: cairo.Context):
|
|
raise NotImplementedError
|
|
|