ScaleWidget   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
c 4
b 0
f 0
dl 0
loc 7
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 6 2
1
import tkinter
2
3
4
class MyWidget:  # pragma : no cover
5
    def __init__(self, label):
6
        self.label = label
7
8
9
class TrueFalseWidget(MyWidget):  # pragma : no cover
10
    def __init__(self, label):
11
        super(TrueFalseWidget, self).__init__(label)
12
        self.widget = None
13
        self.labelw = None
14
15
    def draw(self, root, line):
16
        self.widget = tkinter.Checkbutton(root)
17
        self.widget.grid(column=1, row=line, sticky=tkinter.NSEW)
18
        self.labelw = tkinter.Label(root, text=self.label, justify=tkinter.LEFT)
19
        self.labelw.grid(column=2, row=line, sticky=tkinter.NSEW)
20
21
22
class ScaleWidget(tkinter.Frame):  # pragma : no cover
23
    def __init__(self, master, label, min_, max_, redundancy=0):
24
        super(ScaleWidget, self).__init__(master)
25
        self.min = min_
26
        self.max = max_
27
        self.variables = [tkinter.Entry(master, width=2) for _ in range(redundancy + 1)]
28
        self.label = tkinter.Label(master, text=label)
29