def on_enter(self, value=None):

        if not value:
            value = 0
        if self.container is not None:
            self.container.clear_widgets()

        for i in range(int(value)):
            self.resources.append(ResourceData(1, 1, True))

            label = Label(text=str(i + 1) + '.')
            self.container.add_widget(label)

            lengthinput = TextInput(multiline=False, input_type='number')
            lengthinput.bind(text=partial(self.save_length, i))
            self.container.add_widget(lengthinput)

            checkbox = CheckBox(group='sign' + str(i), active=True)
            checkbox.bind(active=partial(self.on_checkbox_active, True))

            checkbox2 = CheckBox(group='sign' + str(i))
            checkbox2.bind(active=partial(self.on_checkbox_active, False))

            self.container.add_widget(checkbox)
            self.container.add_widget(checkbox2)

            amountinput = TextInput(multiline=False, input_type='number')
            amountinput.bind(text=partial(self.save_amount, i))
            self.container.add_widget(amountinput)
Esempio n. 2
0
    def __init__(self, title, choices, key, callback):
        Factory.Popup.__init__(self)
        print(choices, type(choices))
        if type(choices) is list:
            choices = dict(map(lambda x: (x, x), choices))
        layout = self.ids.choices
        layout.bind(minimum_height=layout.setter('height'))
        for k, v in sorted(choices.items()):
            l = Label(text=v)
            l.height = '48dp'
            l.size_hint_x = 4
            cb = CheckBox(group='choices')
            cb.value = k
            cb.height = '48dp'
            cb.size_hint_x = 1

            def f(cb, x):
                if x: self.value = cb.value

            cb.bind(active=f)
            if k == key:
                cb.active = True
            layout.add_widget(l)
            layout.add_widget(cb)
        layout.add_widget(Widget(size_hint_y=1))
        self.callback = callback
        self.title = title
        self.value = key
        self.app = App.get_running_app()
Esempio n. 3
0
    def __init__(self, screen, **kwargs):
        super(OrientationTest, self).__init__(screen, **kwargs)

        self.test_field = GridLayout(rows=2,
                                     size_hint_y=.3,
                                     pos_hint={"y": .2})
        self.instruction = "TESTO TEST ZPRACOVVÁVÁ TESTUJÍCÍ!!!\nZeptejte se: Kolikátého je\nDoplňující otázky: Řekněte mi, jaký je rok, \nměsíc, přesné datum a den v týdnu?\nNyní mi řekněte název tohoto místa a města, \nve kterém jsme."

        self.labels = [
            Label(text="Datum"),
            Label(text="Měsíc"),
            Label(text="Rok"),
            Label(text="Den"),
            Label(text="Místo"),
            Label(text="Město")
        ]
        self.ch_boxes = {}

        for label in self.labels:
            chb = CheckBox()
            chb.bind(active=partial(self.checkbox_callback, self))
            self.ch_boxes[label] = chb

        with self.canvas.before:
            Color(0, 0, 0, 1)
            self.rec = Rectangle(size=Window.size)
Esempio n. 4
0
    def next_label(self):
        global list_tasks
        global list_completed
        global check_ref_box
        global whole_box

        lay = BoxLayout(orientation='vertical',
                        size=self.size,
                        size_hint=(1, .4),
                        pos_hint={
                            'center_x': .4,
                            'center_y': .5
                        })
        lay.clear_widgets()
        for i, task in enumerate(list_tasks):
            layout = BoxLayout(orientation="horizontal",
                               size_hint=(.5, 1),
                               pos_hint={
                                   'center_x': .5,
                                   'center_y': .5
                               })
            check_ref_box.append(layout)
            check = CheckBox()
            self.check_ref[f'checkbox_{i}'] = [check, task]
            check.bind(active=lambda checkid, checkval: on_checkbox_active(
                self.check_ref))
            layout.add_widget(check)
            layout.add_widget(Label(text=task, color=(1, 1, 1, 1)))
            lay.add_widget(layout)
        self.add_widget(lay)
        event_3 = Clock.create_trigger(self.speaker_end,
                                       timeout=1,
                                       interval=False)
        event_3()
        whole_box = lay
Esempio n. 5
0
File: item.py Progetto: iocafe/iocom
    def setup_variable(self, ioc_root, label_text, description, use_checkbox):
        self.my_label_text = label_text

        if use_checkbox:
            b = CheckBox()
            b.size_hint = (0.35, 1)
            if self.my_down:
                b.bind(on_release = self.on_checkbox_modified)
            self.add_widget(b)
            self.my_checkbox = b
            self.my_text = None

        else:
            t = Button(text = '', markup = True, halign="center", valign="center")
            t.size_hint = (0.35, 1)
            t.bind(size=t.setter('text_size')) 
            t.background_color = [0 , 0, 0, 0]
            if self.my_down:
                t.bind(on_release = self.my_create_popup)
            self.add_widget(t)
            self.my_text = t
            self.my_checkbox = None

        self.my_label.text = '[size=16]' + label_text + '[/size]'
        self.my_description.text = '[size=14][color=909090]' + description + '[/color][/size]'
Esempio n. 6
0
 def __init__(self, **kwargs):
   barsize = kwargs.pop('n', 1)
   self.value = "0" * barsize
   self.orientation = 'vertical'
   self.color = kwargs.pop('color', (0.2, 0.2, 0.2, 0.5))
   self.callback = kwargs.pop('callback', lambda: None)
   self.height = 70
   self.padding = 10
   self.spacing = 10
   self.size_hint = (1, None)
   super(ToggleBar, self).__init__(**kwargs)
   self.checkboxes = []
   box = BoxLayout(orientation='horizontal')
   box.size_hint = (1, 0.6)
   
   for n in range(barsize):
     checkbox = CheckBox(size_hint=(1.0/barsize, 0.70))
     checkbox.bind(active=self.checkbox_toggle)
     box.add_widget(checkbox)
     self.checkboxes.append(checkbox)
   
   if 'label' in kwargs:
     self.label = Label(text=kwargs['label'], markup=True, size_hint=(1, 0.3))
     self.add_widget(self.label)
   
   self.add_widget(box)
   self.value_label = Label(text="0"*barsize)
   self.value_label.size_hint = (1, 0.3)
   self.add_widget(self.value_label)  
Esempio n. 7
0
 def __init__(self, title, choices, key, callback):
     Factory.Popup.__init__(self)
     if type(choices) is list:
         choices = dict(map(lambda x: (x,x), choices))
     layout = self.ids.choices
     layout.bind(minimum_height=layout.setter('height'))
     for k, v in sorted(choices.items()):
         l = Label(text=v)
         l.height = '48dp'
         l.size_hint_x = 4
         cb = CheckBox(group='choices')
         cb.value = k
         cb.height = '48dp'
         cb.size_hint_x = 1
         def f(cb, x):
             if x: self.value = cb.value
         cb.bind(active=f)
         if k == key:
             cb.active = True
         layout.add_widget(l)
         layout.add_widget(cb)
     layout.add_widget(Widget(size_hint_y=1))
     self.callback = callback
     self.title = title
     self.value = key
Esempio n. 8
0
    def get_labels(self):

        for idxRM, wgtRM in self.listOfBoxsDatasetLabels_Ids.items():
            self.ids.boxLayoutLabelsAvailableId.remove_widget(wgtRM)

        newBox = BoxLayout()
        newLabel = Label()
        newCheckBox = CheckBox()
        self.listOfLabels_CheckBoxs_Ids["CheckBox_" + str("All")] = newCheckBox
        self.listOfBoxsDatasetLabels_Ids["Box_" + str("All")] = newBox
        newLabel.text = "All"
        newCheckBox.color = (1, 1, 1, 1)
        newBox.size_hint = (1, None)
        newBox.add_widget(newLabel)
        newBox.add_widget(newCheckBox)
        self.ids.boxLayoutLabelsAvailableId.add_widget(newBox)
        newCheckBox.bind(active=self.disable_input)

        for file in self.Datasetlabels:
            newBox = BoxLayout()
            newLabel = Label()
            newCheckBox = CheckBox()
            self.listOfLabels_CheckBoxs_Ids["CheckBox_" +
                                            str(file)] = newCheckBox
            self.listOfBoxsDatasetLabels_Ids["Box_" + str(file)] = newBox
            newLabel.text = file
            newLabel.text_size = (self.width, None)
            newCheckBox.color = (1, 1, 1, 1)
            newBox.size_hint = (1, None)
            newBox.add_widget(newLabel)
            newBox.add_widget(newCheckBox)

            self.ids.boxLayoutLabelsAvailableId.add_widget(newBox)
Esempio n. 9
0
 def __init__(self, **kwargs):
     super(LoginScreen, self).__init__(**kwargs)
     #self.cols = 3       # 3 columns 
     self.rows = 4       # 4 rows 
     self.add_widget(Label(text='User Name'))        # add widget label : content User Name
     self.username = TextInput(multiline=False)      # no multiline text input support
     self.add_widget(self.username)                  # add 'username' textinput
     self.add_widget(Label(text='Pass Word'))        # add widget label : content User Name
     self.password = TextInput(multiline=False, password=True)   #password auto-hidden
     self.add_widget(self.password)
     self.btn1 = Button(text='Login', fontsize=14)   # add login button
     self.add_widget(self.btn1)
     self.btn2 = Button(text='Sign up', fontsize=14) # add Sign up button
     self.add_widget(self.btn2)
     
     def on_checkbox_active(checkbox, value):            
         '''
         Once checkbox's state is changed.
         if checked, then pass "True" to on_checkbox_active
         if not, then pass "False" to on_checkbox_active
         '''
         if value:
             pass
         else:
             pass
     checkbox = CheckBox()
     checkbox.bind(active=on_checkbox_active)            #checked , then dispatch to on_checkbox_active
     self.add_widget(checkbox)                      # add check box to remember password
Esempio n. 10
0
 def __init__(self, label, layout, initial=False):
     self._label = label
     self._is_active = initial
     check_box = CheckBox(active=initial)
     layout.add_widget(Label(text=label, color=[0, 0, 0, 1]))
     layout.add_widget(check_box)
     check_box.bind(active=self._on_click)
Esempio n. 11
0
    def __init__(self, value=True, on_change=None, **kwargs):
        super().__init__(**kwargs)

        w = CheckBox(active=value)
        if callable(on_change): w.bind(active=on_change)
        self.field = w
        self.ids['layout'].add_widget(w)
Esempio n. 12
0
 def __init__(self, title, choices, key, callback, keep_choice_order=False):
     Factory.Popup.__init__(self)
     print(choices, type(choices))
     if keep_choice_order:
         orig_index = {choice: i for (i, choice) in enumerate(choices)}
         sort_key = lambda x: orig_index[x[0]]
     else:
         sort_key = lambda x: x
     if type(choices) is list:
         choices = dict(map(lambda x: (x,x), choices))
     layout = self.ids.choices
     layout.bind(minimum_height=layout.setter('height'))
     for k, v in sorted(choices.items(), key=sort_key):
         l = Label(text=v)
         l.height = '48dp'
         l.size_hint_x = 4
         cb = CheckBox(group='choices')
         cb.value = k
         cb.height = '48dp'
         cb.size_hint_x = 1
         def f(cb, x):
             if x: self.value = cb.value
         cb.bind(active=f)
         if k == key:
             cb.active = True
         layout.add_widget(l)
         layout.add_widget(cb)
     layout.add_widget(Widget(size_hint_y=1))
     self.callback = callback
     self.title = title
     self.value = key
Esempio n. 13
0
    def gen_list(self, specialized=None):
        self.list.clear_widgets()

        self.specialized = specialized
        # Denylist content
        if specialized == None:
            self.denylist = db.get_denylist()
        else:
            self.denylist = specialized
        self.ui_to_item = {}

        if len(self.denylist.items) > 5:
            self.list.height = 100 * len(self.denylist.items)

        def on_checkbox_active(checkbox, value):
            item = self.ui_to_item[checkbox]
            keywords = ", ".join(item.keywords)
            if value:
                item.active = True
            else:
                item.active = False

        for item in self.denylist.items:
            checkbox = CheckBox(active=item.active)
            self.ui_to_item[checkbox] = item
            checkbox.bind(active=on_checkbox_active)
            self.list.add_widget(checkbox)
            keywords = Label(text=", ".join(item.keywords), font_size=20)
            self.list.add_widget(keywords)

            remove = Button(text="Remove", font_size=20)
            self.ui_to_item[remove] = item
            remove.bind(on_press=self.remove_item)
            self.list.add_widget(remove)
Esempio n. 14
0
	def show(self, streams):
		self.clear()
		index = 0
		indexHeaderLabel = Label(text='Stream')
		activeHeaderLabel = Label(text='Active')
		speedHeaderLabel = Label(text='Particle speed')

		self.add_widget(indexHeaderLabel)
		self.add_widget(activeHeaderLabel)
		self.add_widget(speedHeaderLabel)

		for stream in streams:
			Logger.debug("Got stream: " + str(stream))
			streamIndexLabel = Label(text=str(index), size_hint=(self.col1Width, self.rowHeight))

			activeCheckbox = CheckBox(active=stream.get_active())
			activeCheckbox.bind(active=partial(self.on_active_change, stream))

			particleSpeedCheckBox = CheckBox(active=True)
			particleSpeedCheckBox.bind(active=partial(self.on_particle_speed_change, stream))
			self.add_widget(streamIndexLabel)
			self.add_widget(activeCheckbox)
			self.add_widget(particleSpeedCheckBox)
			index = index + 1
		self.popup.open()
Esempio n. 15
0
class RootWidget(GridLayout):
    def __init__(self, **kwargs):
        super(RootWidget, self).__init__(cols=2)

        self.label=Label(text="Check 1")
        self.add_widget(self.label)

        self.checkbox = CheckBox()
        self.checkbox.bind(active=self.on_checkbox_active)
        self.add_widget(self.checkbox)

        self.label=Label(text="Check 2")
        self.add_widget(self.label)

        checkbox1 = CheckBox()
        self.add_widget(checkbox1)

        self.label=Label(text="Check 3")
        self.add_widget(self.label)

        checkbox3 = CheckBox()
        self.add_widget(checkbox3)
 
    def on_checkbox_active(self, checkbox, value):
        if value:
            print('The checkbox', checkbox, 'is active')
        else:
            print('The checkbox', checkbox, 'is inactive')
Esempio n. 16
0
    def __init__(self,**kwargs):
        super(Medicine,self).__init__(**kwargs)
        self.active_checkboxes = []
        self.checkboxeslist = []
        self.scrollsize = fullapp.size[0]*0.86,fullapp.size[1]*0.57
        self.scrollpos = fullapp.size[0]*0.07,fullapp.size[1]*0.34

        self.canvas.add(Rectangle(size=fullapp.size,pos=fullapp.pos,source="MainBackgroundWhiter.png"))
        self.add_widget(MenuButton())
        rect = Rectangle(size=(fullapp.size[0],fullapp.size[1]*0.236),pos=fullapp.pos,source='FrontForScroll.png')
        self.canvas.add(rect)
        self.canvas.add(Color(0.5,0.5,0.5,1))
        self.canvas.add(Rectangle(size=self.scrollsize,pos=self.scrollpos))

        MedScroll = ScrollView()
        MedScroll.size_hint = (None,None)
        MedScroll.size = self.scrollsize
        MedScroll.pos = self.scrollpos

        MedBox = Widget()
        MedBox.size_of_drug = (self.scrollsize[0],fullapp.size[1]*0.1)
        MedBox.spacing = fullapp.size[1]*0.01
        MedBox.size = (self.scrollsize[0],(MedBox.spacing+MedBox.size_of_drug[1])*len(IlnessBase.Medicine)-MedBox.spacing)
        MedBox.size_hint_y = None

        for i in range(len(IlnessBase.Medicine)):
            text = Label(color=(1,1,1,1),markup=True)
            text.text = IlnessBase.Medicine[i][:IlnessBase.Medicine[i].find(':')] + '  ' + '[i][size=11][color=272727]' + 'ATX num ' + IlnessBase.Medicine[i][IlnessBase.Medicine[i].find(':')+1:] + '[/i][/size][/color]'
            text.text_size = MedBox.size_of_drug
            text.text_size[0] -= MedBox.size_of_drug[1]
            text.halign = 'left'
            text.valign = 'middle'
            text.pos = (MedBox.size_of_drug[0]/4.3,i*(MedBox.spacing+MedBox.size_of_drug[1])-MedBox.size_of_drug[1]/2)
            b = Button(size=MedBox.size_of_drug,pos=(0,i*(MedBox.spacing+MedBox.size_of_drug[1])))
            b.bind(on_press=self.on_button)
            b.add_widget(text)
            checkbox = CheckBox(size=(MedBox.size_of_drug[1],MedBox.size_of_drug[1]),pos = (MedBox.size_of_drug[0]-MedBox.size_of_drug[1],i*(MedBox.spacing+MedBox.size_of_drug[1])))
            checkbox.num = i
            checkbox.bind(active=self.on_checkbox)
            b.add_widget(checkbox)
            self.checkboxeslist.append(checkbox)
            b.ATXNum = IlnessBase.Medicine[i][IlnessBase.Medicine[i].find(':')+1:]
            MedBox.add_widget(b)

        TopLabel = Label(bold=True,size_hint=(None,None),text='check prep:',font_size=fullapp.size[1]*0.036,color = (0,0,0,1),pos = (fullapp.size[0]*0.34,fullapp.size[1]*0.85))
        
        self.SomeWidget = Widget(pos=(0,0),size_hint=(None,None),size = fullapp.size)
        CancelButton = Button(text = 'exit',font_size=fullapp.size[1]*0.022,size_hint=(None,None),size=(MedBox.size_of_drug[0]/2.01,fullapp.size[1]*0.05),
            pos = (self.scrollpos[0],self.scrollpos[1]-fullapp.size[1]*0.05-1),background_color = (0.3,0.3,0.9,1),on_press=self.on_cancel)
        OkButton = Button(text = 'chose',font_size=fullapp.size[1]*0.022,size_hint=(None,None),size=(MedBox.size_of_drug[0]/2.01,fullapp.size[1]*0.05),
            pos = (self.scrollpos[0]+MedBox.size_of_drug[0]/2+1,self.scrollpos[1]-fullapp.size[1]*0.05-1),background_color = (0.3,0.3,0.9,1),on_press=self.on_choose)
        
        self.SomeWidget.add_widget(CancelButton)
        self.SomeWidget.add_widget(OkButton)
        self.SomeWidget.opacity=0

        MedScroll.add_widget(MedBox)
        self.add_widget(self.SomeWidget)
        self.add_widget(MedScroll)
        self.add_widget(TopLabel)
Esempio n. 17
0
 def feature_listing(self):
     count = 0
     file = open("./feature_list.txt", "r")
     feature = file.read().split("\n") # Current feature list
     for each in feature:
         if each == "":
             break
         new_box = SBox()
         new_box.id = each
         new_box.orientation = "horizontal"
         new_box.size_hint = (1, .1)
         new_checkbox = CheckBox()
         new_checkbox.id = each
         new_checkbox.size_hint = (.05, 1)
         new_checkbox.group = "feature"
         new_checkbox.bind(on_press=self.change_detection)
         new_box.add_widget(new_checkbox)
         new_label = SLabel()
         new_label.id = each
         new_label.text = each
         new_label.bind(on_press=self.change_detection)
         new_label.size_hint = (.95, 1)
         new_box.add_widget(new_label)
         self.ids.holder.add_widget(new_box)
         if each == KivyCamera.feature_detect:
             new_box.background_color = (0.5, 0.5, 0.5, 1)
             new_checkbox.active = True
         count+=1
     rh = (10-count)/10
     space_box = BoxLayout()
     space_box.size_hint = (1, rh)
     self.ids.holder.add_widget(space_box)
     file.close()
Esempio n. 18
0
 def __init__(self, title, choices, key, callback, *, description='', keep_choice_order=False):
     Factory.Popup.__init__(self)
     self.description = description
     if keep_choice_order:
         orig_index = {choice: i for (i, choice) in enumerate(choices)}
         sort_key = lambda x: orig_index[x[0]]
     else:
         sort_key = lambda x: x
     if type(choices) is list:
         choices = dict(map(lambda x: (x,x), choices))
     layout = self.ids.choices
     layout.bind(minimum_height=layout.setter('height'))
     for k, v in sorted(choices.items(), key=sort_key):
         l = Label(text=v)
         l.height = '48dp'
         l.size_hint_x = 4
         cb = CheckBox(group='choices')
         cb.value = k
         cb.height = '48dp'
         cb.size_hint_x = 1
         def f(cb, x):
             if x: self.value = cb.value
         cb.bind(active=f)
         if k == key:
             cb.active = True
         layout.add_widget(l)
         layout.add_widget(cb)
     layout.add_widget(Widget(size_hint_y=1))
     self.callback = callback
     self.title = title
     self.value = key
Esempio n. 19
0
    def __init__(self, last_screen, **kwargs):
        super(Screen, self).__init__(**kwargs)

        # Back Button
        def back_callback(self):
            sm.current = last_screen

        backButton = Button(text='back', size_hint_y=None, height=70)
        backButton.bind(on_press=back_callback)

        # Display output checkbox
        def change_output(self, value):
            global output
            if value:
                output = 5
            else:
                output = 4

        row = GridLayout(cols=2, size_hint_y=None, height=70)
        checkbox = CheckBox()
        checkbox.bind(active=change_output)
        row.add_widget(Label(text='Video2HDMI'))
        row.add_widget(checkbox)

        # Settings grid
        screen = GridLayout(rows=4)
        screen.add_widget(row)

        # Finally add back button
        screen.add_widget(backButton)
        self.add_widget(screen)
Esempio n. 20
0
    def getPadWidget(self):
        cbKeyScreen = CheckBox(size_hint=(.1, .1),
                               pos=(20, Window.size[1] - 100))
        cbKeyScreen.bind(active=self.on_changeSettings)

        self.root = cbKeyScreen
        return cbKeyScreen
    def generate_config(self):
        def update(conf):
            def real_update(_, value):
                if conf == "DELTA":
                    try:
                        value = int(value)
                    except ValueError:
                        value = -1
                CONFIG[conf] = value

            return real_update

        def toggle_auto(_, active):
            CONFIG["AUTO_OPEN"] = True if active else ""

        def save(*_):
            content = json.dumps(CONFIG)
            with open("config.json", "w+") as f:
                f.write(content)
            self.stop()

        if self.gps:
            time.sleep(2)
            plyer.gps.stop()
            while not self.config['ADRESSE']:
                time.sleep(1)

        layout = BoxLayout(orientation='vertical')
        for x in CONFIG:
            if x == "AUTO_OPEN":
                continue
            val = CONFIG[x] or x
            textinput = TextInput(
                text=(val.replace("VILLEN", "VILLE DE NAISSANCE").replace(
                    "CPPPP", "Code Postal")),
                multiline=False,
            )
            textinput.bind(text=update(x))
            layout.add_widget(textinput)

        auto_open = BoxLayout(orientation="horizontal")
        auto_open.add_widget(Label(text="Open pdf automatically"))
        open_checkbox = CheckBox()
        open_checkbox.bind(active=toggle_auto)
        auto_open.add_widget(open_checkbox)

        layout.add_widget(auto_open)
        layout.add_widget(Button(text="sport", on_press=self.make_pdf))
        layout.add_widget(Button(text="courses", on_press=self.make_pdf))
        layout.add_widget(Button(text="feu", on_press=self.make_pdf))
        layout.add_widget(
            Button(text="""
        Never get back to this screen and generate both automatically when I open the app
        (Will use current settings... Advice: Double-check)
        """,
                   on_press=save))

        return layout
Esempio n. 22
0
    def __init__(self, **kwargs):
        global recflag
        recflag = False
        global text
        text = None
        super(CasterGUI, self).__init__(**kwargs)

        version_info = Label(text="NewsBcaster v0.1", font_size=20, size_hint=(1, 0.5),
                             pos_hint={"center_x": 0.5, "center_y": 0.95})

        start_button = Button(text="Start Broadcast", background_color=(0, 1, .5, 1), size_hint=(.25, .10),
                              pos_hint={"center_x": 0.25, "center_y": 0.85})

        start_button.bind(on_press=lambda x: self.callback_start())

        stop_button = Button(text="Stop Broadcast", background_color=(1, 0.1, 0.1, 1), size_hint=(.25, 0.10),
                             pos_hint={"center_x": 0.75, "center_y": 0.85})

        stop_button.bind(on_press=lambda x: self.callback_stop())

        path_to_video = TextInput(text="lmao.mp4", multiline=False, size_hint=(.60, 0.10),
                                  pos_hint={"center_x": .40, "center_y": .70})

        upload_video = Button(text="Upload Video", background_color=(0, 1, 1, 1), size_hint=(.20, .10),
                              pos_hint={"center_x": 0.80, "center_y": 0.70})

        overlay_text = TextInput(text="Headlines Go Here", multiline=True, size_hint=(.60, 0.10),
                                 pos_hint={"center_x": .40, "center_y": .15})

        upload_video.bind(on_press=lambda x: self.callback_upload(path_to_video.text, overlay_text.text))


        add_overlay = Button(text="Add Overlay", background_color=(1, 1, 1, 1), size_hint=(.20, 0.10),
                             pos_hint={"center_x": 0.80, "center_y": 0.15})

        # video_previewer = Video(source="lmao.mp4", state='play', size_hint=(.32, 0.20),
        # pos_hint={"center_x": 0.50, "center_y": 0.50})

        record_start = Button(text="Audio Recording", background_color=(0.9, 0.4, 0.1, 1), size_hint=(.20, .10),
                              pos_hint={"center_x": 0.75, "center_y": 0.30})

        checkbox = CheckBox(size_hint=(.10, .10), pos_hint={"center_x": 0.50, "center_y": 0.30})

        checkbox.bind(active=on_checkbox_active)

        fetch_headlines = Button(text="Fetch Headlines", background_color=(0.9, 0.4, 0.1, 1), size_hint=(.20, .10),
                                 pos_hint={"center_x": 0.25, "center_y": 0.30})

        fetch_headlines.bind(on_press=lambda x: self.fetch_start())

        record_start.bind(on_press=lambda x: self.rec_start())

        stop_button.bind(on_press=lambda x: self.rec_start())

        for widgets in [version_info, start_button, stop_button, add_overlay, path_to_video, overlay_text,
                        upload_video, record_start, fetch_headlines, checkbox]:
            self.add_widget(widgets)
Esempio n. 23
0
 def analysis(self, *latgs):
     self.clear_widgets()
     label = Button(text=' Checklist ',
                    background_normal='bottone3.png',
                    size_hint=(0.31, 0.14),
                    bold=True,
                    font_size='20sp',
                    color=(1, 1, 1, .9),
                    valign='top',
                    pos_hint={
                        'center_x': .5,
                        'center_y': .92
                    })
     pict = Image(source='./logo.png',
                  size_hint=(1, .16),
                  pos_hint={
                      'center_x': .68,
                      'center_y': .92
                  })
     self.add_widget(label)
     self.add_widget(pict)
     label1 = Label(
         text=
         'Assembled Device \n\nSample Added \n\nBL Substrate Added \n\nCartridge inserted',
         color=(1, 1, 1, .9),
         font_size='15sp',
         pos_hint={
             'center_x': .24,
             'center_y': .56
         })
     checkbox = CheckBox(pos_hint={'center_x': .10, 'center_y': .61})
     checkbox1 = CheckBox(pos_hint={'center_x': .10, 'center_y': .51})
     checkbox.bind(active=self.on_checkbox_active)
     button4 = Button(text='Acquire',
                      background_normal='bottone3.png',
                      size_hint=(0.21, 0.11),
                      bold=True,
                      font_size='20sp',
                      pos_hint={
                          'center_x': .5,
                          'center_y': .1
                      })
     self.add_widget(button4)
     button4.bind(on_press=self.camerabutton)
     self.add_widget(label1)
     self.add_widget(checkbox1)
     self.add_widget(checkbox)
     button1 = Button(text='Home',
                      background_normal='bottone3.png',
                      size_hint=(0.11, 0.10),
                      pos_hint={
                          'center_x': .1,
                          'center_y': .1
                      })
     button1.bind(on_press=self.start)
     self.add_widget(button1)
Esempio n. 24
0
 def __init__(self,**kwargs):
     super(StartWindow,self).__init__(**kwargs)
     inters=self.get_interfaces("ls /sys/class/net")
     self.iface="eth0"
     for iface in inters:
         lbl=Label(text=iface)
         cbok=CheckBox(group="face")
         cbok.bind(active=partial(self.set_interface,iface))
         self.ids["interfaces"].add_widget(lbl)
         self.ids["interfaces"].add_widget(cbok)
Esempio n. 25
0
 def __init__(self, name, app=None, *args, **kwargs):
     self.service = Service(name)
     self.app = app
     super(ServiceItem, self).__init__()
     process_row = BoxLayout(height=30, size_hint_y=None)
     run_process_check = CheckBox()
     run_process_check.bind(active=self.toggle_process)
     process_row.add_widget(run_process_check)
     process_row.add_widget(Label(text=str(name)))
     self.add_widget(process_row)
Esempio n. 26
0
 def add_checkbox(self):
     checkbox_grid = GridLayout(cols=2,
                                row_force_default=True,
                                row_default_height=40)
     checkbox = CheckBox(size_hint_x=None, width=50)
     checkbox_grid.add_widget(checkbox)
     checkbox.bind(active=self.on_checkbox_active)
     checkbox_grid.add_widget(
         Label(text='Whisper', size_hint_x=None, width=50))
     self.box_lay.add_widget(checkbox_grid)
Esempio n. 27
0
class ActionCheckButton(ActionItem, BoxLayout):
    '''ActionCheckButton is a check button displaying text with a checkbox
    '''

    checkbox = ObjectProperty(None)
    '''Instance of :class:`~kivy.uix.checkbox.CheckBox`.
       :data:`checkbox` is a :class:`~kivy.properties.StringProperty`
    '''

    text = StringProperty('Check Button')
    '''text which is displayed by ActionCheckButton.
       :data:`text` is a :class:`~kivy.properties.StringProperty`
    '''

    cont_menu = ObjectProperty(None)

    __events__ = ('on_active', )

    def __init__(self, **kwargs):
        super(ActionCheckButton, self).__init__(**kwargs)
        self._label = Label()
        self.checkbox = CheckBox(active=True)
        self.checkbox.size_hint_x = None
        self.checkbox.x = self.x + 2
        self.checkbox.width = '20sp'
        BoxLayout.add_widget(self, self.checkbox)
        BoxLayout.add_widget(self, self._label)
        self._label.valign = 'middle'
        self._label.text = self.text
        self.checkbox.bind(active=partial(self.dispatch, 'on_active'))
        Clock.schedule_once(self._label_setup, 0)

    def _label_setup(self, dt):
        '''To setup text_size of _label
        '''
        self._label.text_size = (self.minimum_width - self.checkbox.width - 4,
                                 self._label.size[1])

    def on_touch_down(self, touch):
        '''Override of its parent's on_touch_down, used to reverse the state
           of CheckBox.
        '''
        if not self.disabled and self.collide_point(*touch.pos):
            self.checkbox.active = not self.checkbox.active
            self.cont_menu.dismiss()

    def on_active(self, *args):
        '''Default handler for 'on_active' event.
        '''
        pass

    def on_text(self, instance, value):
        '''Used to set the text of label
        '''
        self._label.text = value
Esempio n. 28
0
class ActionCheckButton(ActionItem, BoxLayout):
    '''ActionCheckButton is a check button displaying text with a checkbox
    '''

    checkbox = ObjectProperty(None)
    '''Instance of :class:`~kivy.uix.checkbox.CheckBox`.
       :data:`checkbox` is a :class:`~kivy.properties.StringProperty`
    '''

    text = StringProperty('Check Button')
    '''text which is displayed by ActionCheckButton.
       :data:`text` is a :class:`~kivy.properties.StringProperty`
    '''

    cont_menu = ObjectProperty(None)

    __events__ = ('on_active',)

    def __init__(self, **kwargs):
        super(ActionCheckButton, self).__init__(**kwargs)
        self._label = Label()
        self.checkbox = CheckBox(active=True)
        self.checkbox.size_hint_x = None
        self.checkbox.x = self.x + 2
        self.checkbox.width = '20sp'
        BoxLayout.add_widget(self, self.checkbox)
        BoxLayout.add_widget(self, self._label)
        self._label.valign = 'middle'
        self._label.text = self.text
        self.checkbox.bind(active=partial(self.dispatch, 'on_active'))
        Clock.schedule_once(self._label_setup, 0)

    def _label_setup(self, dt):
        '''To setup text_size of _label
        '''
        self._label.text_size = (self.minimum_width - self.checkbox.width - 4,
                                 self._label.size[1])

    def on_touch_down(self, touch):
        '''Override of its parent's on_touch_down, used to reverse the state
           of CheckBox.
        '''
        if not self.disabled and self.collide_point(*touch.pos):
            self.checkbox.active = not self.checkbox.active
            self.cont_menu.dismiss()

    def on_active(self, *args):
        '''Default handler for 'on_active' event.
        '''
        pass

    def on_text(self, instance, value):
        '''Used to set the text of label
        '''
        self._label.text = value
Esempio n. 29
0
 def __init__(self, meta, **kwargs):
     super(FormatSelectPopup, self).__init__(**kwargs)
     self.selected_format_id.clear()
     formats_sorted = sorted(meta["formats"], key=lambda k: k["format"])
     for format in formats_sorted:
         grid = self.ids.layout
         grid.add_widget(Label(text=format["format"] + " " + format["ext"]))
         checkbox = CheckBox(active=False, size_hint_x=None, width=100)
         callback = partial(self.on_checkbox_active, format["format_id"])
         checkbox.bind(active=callback)
         grid.add_widget(checkbox)
Esempio n. 30
0
    def _addCheckBox(self, title, stars):
        checkbox = CheckBox(color=[0, 255, 0, 100])
        checkbox.bind(active=partial(self._on_checkbox_active, stars))
        self.add_widget(checkbox)
        self.add_widget(
            Label(text='[b]' + title + '[/b]', markup=True, font_size='20sp'))

        starText = ''
        for i in range(stars):
            starText += "* "
        self.add_widget(Label(text='[b]' + starText + '[/b]', markup=True))
Esempio n. 31
0
class SettingsBox(GridLayout):
    def __init__(self, **kwargs):
        super(SettingsBox, self).__init__(**kwargs)

        self.settings_list = []

        self.cols = 1

        self.dict_options = {
            'Tokenizer': ['word', 'sent', 'None'],
            'StopWords': ['nltk', 'Extend', 'None'],
            'Stemmer': ['Port', 'SnowBall', 'ISR'],
            'Vectorizer': ['Count', 'TfiDf', 'None']
        }

        self.list_operations = [
            'Tokenizer', 'Stemmer', 'StopWords', 'Lemmatization', 'Vectorizers'
        ]

        self.default_settings = ['word', 'nltk', 'Port', 'Count']

        for i in self.dict_options:
            box = BoxLayout()
            box.add_widget(Label(text=i))

            for j in self.dict_options[i]:

                box.add_widget(Label(text=j))

                self.checkbox = CheckBox(group=j)
                self.checkbox.bind(on_press=self.get_settings)
                if j in self.default_settings:
                    self.checkbox.active = True
                if j == 'None':
                    self.checkbox.disabled = True
                box.add_widget(self.checkbox)

            self.add_widget(box)

    def get_settings(self, instance):
        try:
            if instance.active:
                self.settings_list.append(instance.group)
            elif not instance.active:
                self.settings_list.remove(instance.group)
        except:
            print('error')

        finally:
            print(self.settings_list)

    def setting(self):
        return self.settings_list
Esempio n. 32
0
 def buildCenterMenu(self, wrapper, rebuild=False):
     if(rebuild): wrapper.clear_widgets()
     
     numberOfItems = len(self.sharedInstance.data.temp) if self.sharedInstance.data.temp else 0
     for i in range(0, numberOfItems):
         checkbox = CheckBox(active=True)
         checkbox.bind(active=app.checkBoxCallback)
         self.checkBoxesPlotBind[checkbox] = self.graphScreen.getGraph().plots[i]
         
         labelText = self.sharedInstance.data.temp[i] if self.sharedInstance.data.temp else "Nazwa atrybutu"
         label = Label(text=labelText, halign = "right",width=100, col_default_width=20, col_force_default=True)
         wrapper.add_widget(label)
         wrapper.add_widget(checkbox)
Esempio n. 33
0
    def build(self):
        bl = BoxLayout()
        material = BoxLayout()

        view_type = BoxLayout()

        checkbox_type_m1 = CheckBox()
        checkbox_type_m1.bind(active=self.on_check_type_material)

        checkbox_type_m2 = CheckBox()
        checkbox_type_m2.bind(active=self.on_check_type_material)

        checkbox_view_outer = CheckBox()
        checkbox_view_outer.bind(active=self.on_check_view_outer)

        checkbox_view_inter = CheckBox()
        checkbox_view_inter.bind(active=self.on_check_view_inter)

        material.add_widget(checkbox_type_m1)
        material.add_widget(checkbox_type_m2)
        view_type.add_widget(checkbox_view_outer)
        view_type.add_widget(checkbox_view_inter)

        bl.add_widget(material)
        bl.add_widget(view_type)

        return bl
Esempio n. 34
0
    def build(self):
        def on_act(*args):
            print "OK"
            print args[0], args[1]

        parent = Widget()

        layout = GridLayout(rows=1, spacing=5, size_hint_y=None)

        layout.bind(minimum_height=layout.setter('height'))

        btn1 = CheckBox(size=(25, 25), group="gr1")
        layout.add_widget(btn1)
        btn1.bind(active=on_act)

        btn2 = CheckBox(size=(25, 25), group="gr1")
        layout.add_widget(btn2)
        btn2.bind(active=on_act)

        btn3 = CheckBox(size=(25, 25), group="gr1")
        layout.add_widget(btn3)
        btn3.bind(active=on_act)

        btn4 = CheckBox(size=(25, 25), group="gr1")
        layout.add_widget(btn4)
        btn4.bind(active=on_act)

        parent.add_widget(layout)

        return parent
Esempio n. 35
0
    def build(self):

        self.accumulate = False
        self.accumulated = None

        main_window = BoxLayout(orientation='vertical',
                                size=(10, 10))  # main window
        main_window.add_widget(
            Label(text='PyConnections',
                  pos_hint={
                      'center_x': .5,
                      'center_y': .5
                  },
                  size_hint=(None, 100),
                  font_size='80sp'))

        containt_box = GridLayout(cols=1,
                                  padding=10,
                                  spacing=20,
                                  size_hint=(None, None))

        containt_box.bind(minimum_height=containt_box.setter('height'))

        tempos = self.__intertools(
        )  # calling the method that read conections.txt file

        check_acumula_tempo = CheckBox(size_hint_y=None)
        check_acumula_tempo.bind(active=self.on_activate)

        #adding times using looping
        botao = []
        for index, tempo in enumerate(tempos):

            botao.append(
                Button(text=tempo, size=(800, 40), size_hint=(None, None)))
            botao[index].bind(on_press=self.alter_time)
            containt_box.add_widget(botao[index])

        view_temp = ScrollView(size_hint=(None, None),
                               size=(800, 200),
                               pos_hint={
                                   'center_x': .5,
                                   'center_y': .0
                               },
                               do_scroll_x=False)

        view_temp.add_widget(containt_box)
        main_window.add_widget(check_acumula_tempo)
        main_window.add_widget(view_temp)
        return main_window
Esempio n. 36
0
 def getCellChk(self,fila,columna,Activo,Disabled = False,Size=200,Tipo="chk"):
     """Funcion que devuelve una celda completa para manejo de checkbox"""
     cell = GridRow()
     cell.id = "row{0}_col{1}".format(fila,columna)
     cell.size = [Size,40]
     cchk=CheckBox()
     cchk.id=Tipo
     cchk.active=Activo
     cchk.disabled=Disabled
     cchk.background_checkbox_disabled_down='atlas://data/images/defaulttheme/checkbox_on'
     cchk.text_size=cell.size
     if Tipo == "borrar":
         cchk.bind(active=self.borradoCkick)
     cell.add_widget(cchk)
     return cell
Esempio n. 37
0
	def agregar(self, nombre):

		box = BoxLayout()

		bloqueado = CheckBox(active= False)
		bloqueado.bind(active= lambda inst, valor : self.recursos[nombre].bloquear(valor))
			
		usado = Label(text="-")

		box.add_widget(Label(text=nombre))
		box.add_widget(usado)
		box.add_widget(bloqueado)

		self.add_widget(box)
		self.visores[nombre] = usado
Esempio n. 38
0
 def show_plugins(self, plugins_list):
     def on_checkbox_active(cb, value):
         self.plugins.toggle_enabled(self.electrum_config, cb.name)
     for item in self.plugins.descriptions:
         if 'kivy' not in item.get('available_for', []):
             continue
         name = item.get('name')
         label = Label(text=item.get('fullname'))
         plugins_list.add_widget(label)
         cb = CheckBox()
         cb.name = name
         p = self.plugins.get(name)
         cb.active = (p is not None) and p.is_enabled()
         cb.bind(active=on_checkbox_active)
         plugins_list.add_widget(cb)
 def show_plugins(self, plugins_list):
     def on_checkbox_active(cb, value):
         self.plugins.toggle_enabled(self.electrum_config, cb.name)
     for item in self.plugins.descriptions:
         if 'kivy' not in item.get('available_for', []):
             continue
         name = item.get('name')
         label = Label(text=item.get('fullname'))
         plugins_list.add_widget(label)
         cb = CheckBox()
         cb.name = name
         p = self.plugins.get(name)
         cb.active = (p is not None) and p.is_enabled()
         cb.bind(active=on_checkbox_active)
         plugins_list.add_widget(cb)
Esempio n. 40
0
	def build2(self):
		textinput = TextInput(text='Type the broadcast message here', multiline=False)
		textinput.bind(on_text_validate=self.broadcast_now)
		root.add_widget(textinput)
		
		enable_fb = AnchorLayout(anchor_x = 'right', anchor_y='bottom')
		box1 = BoxLayout(orientation="vertical")
		tick_fb = Label(text="fb")
		box1.add_widget(tick_fb)
		post_to_facebook = CheckBox()
		post_to_facebook.bind(active=self.on_facebook_active)
		box1.add_widget(post_to_facebook)
		enable_fb.add_widget(box1)
		
		enable_twit = AnchorLayout(anchor_x = 'right', anchor_y='bottom')
		box1 = BoxLayout(orientation="vertical")
		tick_fb = Label(text="twtr")
		box1.add_widget(tick_fb)
		post_to_facebook = CheckBox()
		post_to_facebook.bind(active=self.on_twitter_active)
		box1.add_widget(post_to_facebook)
		enable_twit.add_widget(box1)
		
		post_root = BoxLayout(orientation="horizontal")
		post_root.add_widget(enable_fb)
		post_root.add_widget(enable_twit)
		root.add_widget(post_root)
		
		button = Button(text="Submit")
		button.bind(on_press = self.broadcast_now)
		root.add_widget(button)
		
		#Facebook posts
		posts = BoxLayout(orientation="horizontal")
		fb_posts = BoxLayout(orientation="vertical")
		fb_posts_header = Label(text="Status Messages")
		fb_posts.add_widget(fb_posts_header)
		fb_posts.add_widget(self.build3(fb_posts))
		posts.add_widget(fb_posts)
		
		#Twitter posts
		twit_posts = BoxLayout(orientation="vertical")
		twit_posts_header = Label(text="Tweets")
		twit_posts.add_widget(twit_posts_header)
		twit_posts.add_widget(self.build4())
		posts.add_widget(twit_posts)
		
		root.add_widget(posts)
Esempio n. 41
0
 def addTask(self, tasktext):
     check = CheckBox(size_hint_x=None, width=30, active=True)
     check.bind(active=partial(self.reactivateTask, tasktext))
     
     task = TextInput(text=tasktext, multiline=True)
     #task.do_cursor_movement('cursor_home',control=True, alt=False)
     task.disabled=True
     
     delete = Button(text='X', size_hint_x=None, width=30)
     delete.bind(on_press=partial(self.removeTask, tasktext))
     
     self.TaskDic[tasktext]=[check, task, delete]
     
     self.add_widget(check)
     self.add_widget(task)
     self.add_widget(delete)
Esempio n. 42
0
    def __init__(self, **kwargs):
        super(CategoryChecklist, self).__init__(**kwargs)
        self.cols = 4


        with conn:
            c = conn.cursor()
            c.execute("SELECT DISTINCT Category FROM Inventory")
            part = c.fetchall()
            for i in part:
                check = CheckBox(group='categories')
                check.id = i[0]
                check.bind(active=self.on_checkbox_active)
                print(check.id)
                self.add_widget(check)
                self.add_widget(Label(text=i[0]))
Esempio n. 43
0
    def __init__(self, categories,**kwargs):
        super().__init__(**kwargs)
        self.rows=1
        self.categories=categories
        self.cols=len(categories)
        self.stored=[]

        self.final=""
        for n in categories:
            temp=GridLayout(rows=2, cols=1)
            check=CheckBox(group=".".join(categories))
            check.bind(on_release=self.happening)
            self.stored.append(check)
            temp.add_widget(Label(text=n))
            temp.add_widget(self.stored[-1])
            self.add_widget(temp)
Esempio n. 44
0
class SpeachRepeatTest(Test):
    """Speach repeating test"""
    def __init__(self, screen, **kwargs):
        super(SpeachRepeatTest, self).__init__(screen, **kwargs)
        self.desc = "Opakování"
        self.instruction = "TENTO TEST ZPRACOVÁVÁ TESTUJÍCÍ!\nŘekněte: „Přečtu vám větu a Vy jí po mně zopakujete \npřesně tak slovo od slova jak jsem jí řekl.“"
        self.instruction_audio = "sounds/ins6-1.mp3"
        self.test_field = GridLayout(cols=3,
                                     size_hint=(.8, .5),
                                     row_force_default=True,
                                     row_default_height=70,
                                     pos_hint={"x": .1})
        self.sent_1 = Label(
            text=u"Pouze vím, že je to Jan, kdo má dnes pomáhat.",
            font_size="55px")
        self.sent_1_chb = CheckBox(size_hint_x=None, width=20)
        self.sent_2 = Label(
            text=u"Když jsou v místnosti psi, kočka se vždy schová pod gauč.",
            font_size="55px")
        self.sent_2_chb = CheckBox(size_hint_x=None, width=20)

        self.sent_1_chb.bind(active=partial(self.checkbox_callback, self))
        self.sent_2_chb.bind(active=partial(self.checkbox_callback, self))

        with self.canvas.before:
            Color(0, 0, 0, 1)
            self.rec = Rectangle(size=Window.size)

    def draw_uix(self):
        self.test_field.add_widget(utils.AudioButton("sounds/ins6-2.mp3"))
        self.test_field.add_widget(self.sent_1)
        self.test_field.add_widget(self.sent_1_chb)
        self.test_field.add_widget(utils.AudioButton("sounds/ins6-3.mp3"))
        self.test_field.add_widget(self.sent_2)
        self.test_field.add_widget(self.sent_2_chb)
        self.add_widget(self.test_field)
        super(SpeachRepeatTest, self).draw_uix()

    def checkbox_callback(self, inst, button, state):
        if state == True:
            self.points += 1
        else:
            self.points -= 1

    def export_layout(self):
        return utils.microgrid(True, Label(text=self.desc),
                               Label(text=str(self.points)))
Esempio n. 45
0
class NumberTest(Test):
    """Abstraction Tes"""
    def __init__(self, screen, **kwargs):
        super(NumberTest, self).__init__(screen, **kwargs)
        self.desc = "Opakování číslic"
        self.instruction = "TENTO TEST ZPRACOVÁVÁ TESTUJÍCÍ!\nŘeknu Vám řadu číslic. Až skončím,\nopakujte je ve stejném pořadí, v jakém jste\nje slyšel/a."
        self.instruction_audio = "sounds/ins4-1.mp3"
        self.test_field = GridLayout(cols=1,
                                     pos_hint={
                                         "x": .1,
                                         "y": .3
                                     },
                                     size_hint=(.8, .25),
                                     row_default_height=70,
                                     row_force_default=True)
        self.normal_lb = Label(text="2 1 8 5 4", font_size="60px")
        self.normal_chb = CheckBox()
        self.reverse_lb = Label(text="7 4 2", font_size="60px")
        self.reverse_chb = CheckBox()

        self.normal_chb.bind(active=partial(self.checkbox_callback, self))
        self.reverse_chb.bind(active=partial(self.checkbox_callback, self))

        with self.canvas.before:
            Color(0, 0, 0, 1)
            self.rec = Rectangle(size=Window.size)

    def draw_uix(self):
        self.test_field.add_widget(
            utils.microgrid(False, utils.AudioButton("sounds/ins4-2.mp3"),
                            self.normal_chb, self.normal_lb,
                            utils.AudioButton("sounds/ins4-3.mp3")))
        self.test_field.add_widget(
            utils.microgrid(False, utils.AudioButton("sounds/ins4-4.mp3"),
                            self.reverse_chb, self.reverse_lb))
        self.add_widget(self.test_field)
        super(NumberTest, self).draw_uix()

    def checkbox_callback(self, inst, button, state):
        if state == True:
            self.points += 1
        else:
            self.points -= 1

    def export_layout(self):
        return utils.microgrid(True, Label(text=self.desc),
                               Label(text=str(self.points)))
    def __init__(self, settings, dashboard_factory, **kwargs):
        super(DashboardScreenPreferences, self).__init__(**kwargs)
        self._settings = settings

        current_screens = self._settings.userPrefs.get_dashboard_screens()
        screen_keys = dashboard_factory.available_dashboards
        for key in screen_keys:
            [name, image] = dashboard_factory.get_dashboard_preview_image_path(key)
            checkbox = CheckBox()
            checkbox.active = True if key in current_screens else False
            checkbox.bind(active=lambda i, v, k=key:self._screen_selected(k, v))
            screen_item = DashboardScreenItem()
            screen_item.add_widget(checkbox)
            screen_item.add_widget(FieldLabel(text=name))
            screen_item.add_widget(Image(source=image))
            self.ids.grid.add_widget(screen_item)
        self._current_screens = current_screens
Esempio n. 47
0
    def _get_body(self):
        if self.dont_show_value is None:
            return self._message
        else:
            pnl = BoxLayout(orientation='vertical')
            pnl.add_widget(self._message)

            pnl_cbx = BoxLayout(
                size_hint_y=None, height=metrics.dp(35), spacing=5)
            cbx = CheckBox(
                active=self.dont_show_value, size_hint_x=None,
                width=metrics.dp(50))
            cbx.bind(active=self.setter('dont_show_value'))
            pnl_cbx.add_widget(cbx)
            pnl_cbx.add_widget(
                LabelEx(text=self.dont_show_text, halign='left'))

            pnl.add_widget(pnl_cbx)
            return pnl
	def _displayHeatmapGenerationPopup(self, press):
		print "Building Heatmap Generation Box"
		self.progressPopupDescription = Label(text = "Generating Heatmaps can take a long time. \nAre you sure you want to do this?")
		self.heatmapButton = Button(text="Generate")
		self.heatmapButton.bind(on_press=self._generateHeatmap)
		checkbox = CheckBox()
		checkbox.bind(active=self._on_checkbox_active)
		cancelButton = Button(text="Cancel")
		layout = BoxLayout(orientation='vertical')
		layout.add_widget(self.progressPopupDescription)
		layout.add_widget(self.heatmapButton)
		layout.add_widget(checkbox)
		layout.add_widget(cancelButton)
		layout.add_widget(self.progressBar)
		popup = Popup(title="Heatmap", content = layout, size_hint=(None, None), size = (400,400))
		cancelButton.bind(on_press = lambda widget:self._cancelHeatmapGeneration(popup))
		popup.open()
		self.heatmapPopup = popup
		print "Heatmap Generation Box Generated"
Esempio n. 49
0
 def __init__(self, title, choices, key, callback):
     Factory.Popup.__init__(self)
     for k, v in choices.items():
         l = Label(text=v)
         l.height = '48dp'
         cb = CheckBox(group='choices')
         cb.value = k
         cb.height = '48dp'
         def f(cb, x):
             if x: self.value = cb.value
         cb.bind(active=f)
         if k == key:
             cb.active = True
         self.ids.choices.add_widget(l)
         self.ids.choices.add_widget(cb)
     self.ids.choices.add_widget(Widget(size_hint_y=1))
     self.callback = callback
     self.title = title
     self.value = key
Esempio n. 50
0
class Test_input(GridLayout):

    def __init__(self, **kwargs):
        super(Test_input, self).__init__(**kwargs)
        self.cols = 1
        self.text = Label(text='un label')
        self.add_widget(self.text)
        self.checkbox = CheckBox(text="Bifeaza-ma!")
        self.add_widget (self.checkbox)
        self.checkbox.bind(active=self.Ruleaza_la_activare)
    
    def Ruleaza_la_activare(self ,value ,instance):
        global check1
        print value
        print instance
        if (check1 %2 == 0) :
            print('Checkbox este activ')
        else:
            print('Checkbox este inactiv')
        check1 += 1
Esempio n. 51
0
    def __init__(self, **kwargs):
        super( _player_type_box, self ).__init__( orientation = "horizontal", **kwargs)
        self.type = 0 # 0 is Human, 1 is PC

        if 'type' in kwargs:
            self.type = kwargs['type']

        group_name = "type" + str( _player_type_box._index )
        
        human_cb = CheckBox( group=group_name, active=self.type == 0, size_hint=(0.1, 1) )
        human_cb.bind( active = self.set_human )

        pc_cb = CheckBox( group=group_name, active=self.type == 1, size_hint=(0.1, 1) )

        self.add_widget( human_cb )
        self.add_widget( Label( text="Human", font_size=13 ) )
        self.add_widget( pc_cb )
        self.add_widget( Label( text="PC", font_size=13 ) )

        _player_type_box._index += 1
Esempio n. 52
0
    def getPropertyEditors(self, skin):
        """
        get all the controls for editing the extra properties of this control.
        The list of controls that is returned, our bound to this object (changes will be stored in the skin object)
        :param skin: json object
        :return: a list of kivy controls that can be used for editing the properties for the skin.
        """
        items = []
        grd = GridLayout(cols=2)
        grd.bind(minimum_height = grd.setter('height'))
        grd.size_hint = (1, None)

        chk = CheckBox(active=sm.getVar(skin,  self.asset, "show_label", False), height='28dp', size_hint=(1, None))
        chk.bind(active=self.on_show_labelChanged)
        lbl = Label(text='show label', height='28dp', size_hint=(1, None), halign='right')
        lbl.bind(size = lbl.setter('text_size'))
        grd.add_widget(lbl)
        grd.add_widget(chk)

        chk = CheckBox(active=sm.getVar(skin,  self.asset, "show_marker", False), height='28dp', size_hint=(1, None))
        chk.bind(active=self.on_show_markerChanged)
        lbl = Label(text='show marker', height='28dp', size_hint=(1, None), halign='right')
        lbl.bind(size = lbl.setter('text_size'))
        grd.add_widget(lbl)
        grd.add_widget(chk)

        chk = CheckBox(active=sm.getVar(skin,  self.asset, "send_on_release", False), height='28dp', size_hint=(1, None))
        chk.bind(active=self.on_send_on_release_Changed)
        lbl = Label(text='send on release', height='28dp', size_hint=(1, None), halign='right')
        lbl.bind(size = lbl.setter('text_size'))
        grd.add_widget(lbl)
        grd.add_widget(chk)

        items.append(grd)
        return items
Esempio n. 53
0
class CvImg(App):
    def build(self): #UIの構築等
        args = sys.argv
        self.src = cv2.imread(args[1], cv2.IMREAD_GRAYSCALE)
        if self.src is None:
            return -1
        self.src = cv2.flip(self.src, 0)
        # ButtonやSlider等は基本size_hintでサイズ比率を指定(絶対値の時はNoneでsize=)
        # Imageに後で画像を描く
        self.kvImage1 = Image(size_hint=(1.0, 0.9))
        # Layoutを作ってadd_widgetで順次モノを置いていく(並びは置いた順)
        kvBoxLayout1 = BoxLayout(orientation='vertical')
        kvBoxLayout1.add_widget(self.kvImage1)
        # 複数行に何か並べる場合はGridLayoutの方が楽そう
        kvGridLayout1 = GridLayout(cols = 2, size_hint=(1.0, 0.1))
        kvCheckBox1Label = Label(text = 'Sobel', halign='right')
        self.kvCheckBox1 = CheckBox(group = 'method', active= True)
        self.kvCheckBox1.bind(active = self.on_checkbox_active)
        kvCheckBox2Label = Label(text = 'Canny', halign='right')
        self.kvCheckBox2 = CheckBox(group = 'method')
        self.kvCheckBox2.bind(active = self.on_checkbox_active)
        kvGridLayout1.add_widget(kvCheckBox1Label)
        kvGridLayout1.add_widget(self.kvCheckBox1)
        kvGridLayout1.add_widget(kvCheckBox2Label)
        kvGridLayout1.add_widget(self.kvCheckBox2)
        kvBoxLayout1.add_widget(kvGridLayout1)
        self.process()
        return kvBoxLayout1

    def on_checkbox_active(self, checkbox, value):
        self.process()

    def process(self):
        if (self.kvCheckBox1.active):
            dst = cv2.Sobel(self.src, cv2.CV_8U, 1, 0, ksize = 5)
        else:
            dst = cv2.Canny(self.src, 100, 200)
        kvImage1Texture = Texture.create(size=(dst.shape[1], dst.shape[0]), colorfmt='bgr')
        kvImage1Texture.blit_buffer(cv2.merge((dst, dst, dst)).tostring(), colorfmt='bgr', bufferfmt='ubyte')
        self.kvImage1.texture = kvImage1Texture
Esempio n. 54
0
def gpu_overclock(self):
    layout = GridLayout(cols=1, size_hint=(None, 1.0), width=700)
    layout.bind(minimum_height=layout.setter('height'))
    panel = SettingsPanel(title="Gpu Overclocking", settings=self)   
    main = BoxLayout(orientation = 'vertical')
    root = ScrollView(size_hint=(None, None),bar_margin=-11, bar_color=(47 / 255., 167 / 255., 212 / 255., 1.), do_scroll_x=False)
    root.size = (600, 400)
    root.add_widget(layout)
    main.add_widget(root)
    done = Button(text ='Done')
    main.add_widget(done)

    sio = SettingItem(panel = panel, title = "Sio", disabled=False, desc = "CONFIG_IOSCHED_SIO")
    sio_radio = CheckBox(active=False)
    sio.add_widget(sio_radio)
    layout.add_widget(sio)
    
    vr = SettingItem(panel = panel, title = "VR", disabled=False, desc = "CONFIG_IOSCHED_VR")
    vr_radio = CheckBox(active=False)
    vr.add_widget(vr_radio)
    layout.add_widget(vr)
            
    popup = Popup(background='atlas://images/eds/pop', title='GPU Overclocking', content=main, auto_dismiss=True, size_hint=(None, None), size=(630, 500))
    done.bind(on_release=popup.dismiss)
    popup.open()
    
    def on_sio_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    sio_radio.bind(active=on_sio_active)
    
    def on_vr_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    vr_radio.bind(active=on_vr_active)
Esempio n. 55
0
 def __init__(self, **kwargs):
   barsize = kwargs.pop('n', 1)
   self.value = "0" * barsize
   self.orientation = 'vertical'
   self.color = kwargs.pop('color', (0.2, 0.2, 0.2, 0.5))
   self.callback = kwargs.pop('callback', lambda: None)
   self.height = 70
   self.padding = 10
   self.spacing = 10
   self.size_hint = (1, None)
   super(ToggleBar, self).__init__(**kwargs)
   self.checkboxes = []
   
   master_box = BoxLayout(orientation='vertical')
   box = BoxLayout(orientation='horizontal')
   box.size_hint = (1, 0.6)
   for n in range(barsize):
     checkbox = CheckBox(size_hint=(1.0/barsize, 0.70))
     checkbox.bind(active=self.checkbox_toggle)
     self.checkboxes.append(checkbox)
     
     #If bit position is divisible by the breaking point, add a new row:
     if ((n + 1) % kwargs['breakpoint']) == 0:
       box.add_widget(checkbox)
       master_box.add_widget(box)
       box = BoxLayout(orientation='horizontal')
       box.size_hint = (1, 0.6)
     else:
       box.add_widget(checkbox)
   
   if 'label' in kwargs:
     self.label = Label(text=kwargs['label'], markup=True, size_hint=(1, 0.3))
     self.add_widget(self.label)
   
   self.add_widget(master_box)
   self.value_label = Label(text="0"*barsize)
   self.value_label.size_hint = (1, 0.3)
   self.add_widget(self.value_label)  
Esempio n. 56
0
class Test_input(GridLayout):

    def __init__(self, **kwargs):
        super(Test_input, self).__init__(**kwargs)
        self.cols = 1
        self.text = Label(text='un label')
        self.add_widget(self.text)
        self.checkbox1 = CheckBox(text="1",group = "test")
        self.add_widget (self.checkbox1)
        self.checkbox2 = CheckBox()
        self.checkbox2.group = "test"
        self.add_widget (self.checkbox2)
        self.checkbox1.bind(active=self.Ruleaza_la_activare)
    
    def Ruleaza_la_activare(self ,value ,instance):
        global check1
        print value,"Asta e value"
        print instance,"Asta este instance"
        if (check1 %2 == 0) :
            print('The checkbox1 is active')
        else:
            print('The checkbox2 is active')
        check1 += 1
Esempio n. 57
0
class MailList(ScrollView):
    event_callback = ObjectProperty(p)
    mails_info = DictProperty({"title": []})
    icon_mail_read = StringProperty("data/logo/kivy-icon-32.png")
    icon_mail_not_read = StringProperty("data/logo/kivy-icon-32.png")
    icon_mail_atfile = StringProperty("data/logo/kivy-icon-32.png")
    icon_del_mail = StringProperty("data/logo/kivy-icon-32.png")
    from_whom = DictProperty({"userfrom": "From whom", "user": "******"})
    direction = StringProperty("user")
    not_theme = StringProperty("Not Theme")
    title_theme = StringProperty("Theme:")
    title_sent = StringProperty("Submitted:")
    user_color = StringProperty("#2fbfe0")
    spinner_list = ListProperty([])
    spinner_title = StringProperty("Menu")
    spinner_background_button = StringProperty(
        "atlas://data/images/defaulttheme/action_bar")

    def __init__(self, **kvargs):
        super(MailList, self).__init__(**kvargs)
        self.check_mails = []
        # {'id_message': <kivy.uix.boxlayout.BoxLayout object at 0xb2da674c>,
        #                <kivy.uix.boxlayout.BoxLayout object at 0xb5sd6fre>}
        # Для удаления виджетов с информацией о сообщении, добавленых в
        # box_info_mail_str_one и ox_info_mail_str_one.
        self.list_content = {}

        box_for_spinner = BoxLayout(orientation="vertical")
        spinner = \
            CustomSpinner(text=self.spinner_title, size_hint=(1, .08),
                          values=self.spinner_list,
                          background_normal=self.spinner_background_button)
        spinner.bind(text=self.event_callback)

        scroll_view_one = ScrollView()
        self.box_mail = GridLayout(cols=1, spacing=17, size_hint_y=None)
        self.box_mail.bind(minimum_height=self.box_mail.setter("height"))

        for i, title in enumerate(self.mails_info["title"]):
            id_message = self.mails_info["id"][i]

            if title == "":
                title = self.not_theme

            box_info_mail_str_one = BoxLayout(size_hint_y=None, height=40)
            box_info_mail_str_two = BoxLayout(orientation="vertical",
                                              size_hint_y=None, height=40)
            self.list_content[id_message] = [box_info_mail_str_one,
                                             box_info_mail_str_two]
            #  _____/
            # |    /|
            # | \/  |
            # |_____|
            #
            self.check = CheckBox(id=id_message, size_hint=(.2, 1))
            self.check.bind(active=self.calculate_check_mail)
            box_info_mail_str_one.add_widget(self.check)

            # #1
            num_message = Label(text="\n\n#{}".format(str(i + 1)),
                                id="num_mail", markup=True)
            box_info_mail_str_one.add_widget(num_message)
            num_message.bind(size=lambda *args: self._update_window_size(args))
            #   ____
            #  |    |
            #  ======
            # |      |
            #  ======
            # |______|
            #
            box_info_mail_str_one.add_widget(
                ImageButton(source=self.icon_del_mail, size_hint=(.5, 1),
                            id="trash_{}".format(id_message),
                            on_press=self.event_callback))

            # Проверка на прочтеное/не прочтенное сообщение,
            # указываем путь к соответствующей иконке.
            if self.mails_info["unread"][i] == "1":
                if self.mails_info["attfile"][i] == "1":  # прикрепленный файл
                    icon_mail = self.icon_mail_atfile
                else:
                    icon_mail = self.icon_mail_not_read
            else:
                icon_mail = self.icon_mail_read

            #  _________
            # |\       /|
            # | \_____/ |
            # |_________|
            #
            box_info_mail_str_one.add_widget(
                ImageButton(source=icon_mail, size_hint=(.5, 1),
                            id="mail_{}".format(id_message),
                            on_press=self.event_callback))

            # Автор
            author = Label(
                text="{}: [color={}][ref={user}]{user}[/ref][/color]".format(
                    self.from_whom[self.direction], self.user_color,
                    user=self.mails_info[self.direction][i]),
                markup=True, id="author",
                on_ref_press=self.event_callback)
            box_info_mail_str_one.add_widget(author)
            author.bind(size=lambda *args: self._update_window_size(args))
            self.box_mail.add_widget(box_info_mail_str_one)

            # Отправлено: 01.01.12
            _time = \
                time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(
                    int(self.mails_info["date"][i])))
            time_mail = Label(text="{} {}".format(self.title_sent, _time),
                              markup=True)
            time_mail.bind(size=lambda *args: self._update_window_size(args))
            box_info_mail_str_two.add_widget(time_mail)

            # Тема: Без темы
            if self.mails_info["system"][i] == "1":  # цвета тем сообщений
                color_theme = "#ff0b00"
            else:
                color_theme = "#ff7f32"

            theme_mail = Label(text="{} [color={}]{}[/color]".format(
                self.title_theme, color_theme, title.encode("utf-8")),
                               size_hint_y=None, height=45, markup=True)
            theme_mail.bind(size=lambda *args: self._update_window_size(args))
            box_info_mail_str_two.add_widget(theme_mail)

            # -----------------------------------------------------------------
            box_info_mail_str_two.add_widget(SettingSpacer())
            self.box_mail.add_widget(box_info_mail_str_two)

        scroll_view_one.add_widget(self.box_mail)
        box_for_spinner.add_widget(spinner)
        box_for_spinner.add_widget(scroll_view_one)
        self.add_widget(box_for_spinner)

    def _update_window_size(self, *args):
        label = args[0][0]
        width = args[0][1][0]
        height = 40

        if label.id == "num_mail":
            label.text_size = (width, 20)
        else:
            label.text_size = (width - 30, height)

    def calculate_check_mail(self, instance, value):
        """Добавляет в список отмеченные сообщения."""

        id_check = instance.id
        state_check = value

        if state_check:
            self.check_mails.append(id_check)
        else:
            self.check_mails.remove(id_check)
Esempio n. 58
0
	def __init__(self, **kwargs):

		super(mainScreen, self).__init__(**kwargs)
		Window.size = (1000, 500)
		layout = FloatLayout(size=(1000, 500))

		self.keyword_input = TextInput(multiline=False
		,size_hint=(.40, .25),
		pos=(5, 330))
		self.add_widget(self.keyword_input)

		keyword_label = Label(
    	text='Keyword Input',
    	size_hint=(.10, .10),
    	pos=(5, 450))
		self.add_widget(keyword_label)

		# research button
		pesquisar = Button(
    	text='Pesquisar',
   		size_hint=(.1, .1),
   		pos=(5, 270))
		self.add_widget(pesquisar)
		pesquisar.bind(on_press=self.pesquisar)

		# result button
		result = Button(
    	text='Resultados',
   		size_hint=(.1, .1),
   		pos=(310, 270))
		self.add_widget(result)
		result.bind(on_press=self.result)

		resultados = Label(
    	text=self.result_sentence,
   		size_hint=(.50, .50),
   		pos=(5,5))
		self.add_widget(resultados)

		limpar_banco = Button(
    	text='Limpar Banco',
   		size_hint=(.1, .1),
   		pos=(890, 5))
		self.add_widget(limpar_banco)
		limpar_banco.bind(on_press=self.limpar_banco)

		frase_label = Label(
    	text='Frase Input',
    	size_hint=(.10, .10),
    	pos=(490, 450))
		self.add_widget(frase_label)

		self.frase_input = TextInput(multiline=False
		,size_hint=(.40, .25),
		pos=(500, 330))
		self.add_widget(self.frase_input)

		treinar = Button(
    	text='Treinar',
   		size_hint=(.1, .1),
   		pos=(500, 270))
		self.add_widget(treinar)
		treinar.bind(on_press=self.treinar)

		addFrase = Button(
    	text='Adicionar Frase',
   		size_hint=(.2, .1),
   		pos=(620, 270))
		self.add_widget(addFrase)
		addFrase.bind(on_press=self.addFrase)

		# good mood label for language 
		good_mood_label = Label(
    		text='Good Humor',
    		size_hint=(.1, .1),
    		pos=(500, 230))
		self.add_widget(good_mood_label)	

		# good mood checkbox
		good_mood = CheckBox(
			size_hint=(.1, .1),
			pos=(570, 230)
		)
		self.add_widget(good_mood)
		good_mood.bind(active=self.select_good_mood)

		# bad mood label for language 
		bad_mood_label = Label(
    		text='Bad Humor',
    		size_hint=(.1, .1),
    		pos=(500, 200))
		self.add_widget(bad_mood_label)	

		# bad mood checkbox
		bad_mood = CheckBox(
			size_hint=(.1, .1),
			pos=(570, 200)
		)
		self.add_widget(bad_mood)
		bad_mood.bind(active=self.select_bad_mood)

		# makes connection with database
		self.dbc = db.lp.ConexaoMySQL("localhost", "root", "", "projetoLPWords")
Esempio n. 59
0
def overclock(self):
    layout = GridLayout(cols=1, size_hint=(None, 1.0), width=700)
    layout.bind(minimum_height=layout.setter('height'))
    panel = SettingsPanel(title="Kernel Base", settings=self)   
    main = BoxLayout(orientation = 'vertical')
    root = ScrollView(size_hint=(None, None),bar_margin=-11, bar_color=(47 / 255., 167 / 255., 212 / 255., 1.), do_scroll_x=False)
    root.size = (600, 400)
    root.add_widget(layout)
    main.add_widget(root)
    done = Button(text ='Done')
    main.add_widget(done)

    ghz15 = SettingItem(panel = panel, title = "1.5ghz", disabled=False, desc = "CONFIG_MSM_CPU_MAX_CLK_1DOT5GHZ")
    ghz15_radio = CheckBox(group="overclock", active=False)
    ghz15.add_widget(ghz15_radio)
    layout.add_widget(ghz15)
    
    ghz17 = SettingItem(panel = panel, title = "1.7ghz", disabled=False, desc = "CONFIG_MSM_CPU_MAX_CLK_1DOT7GHZ")
    ghz17_radio = CheckBox(group="overclock",active=False)
    ghz17.add_widget(ghz17_radio)
    layout.add_widget(ghz17)
    
    ghz18 = SettingItem(panel = panel, title = "1.8ghz", disabled=False, desc = "CONFIG_MSM_CPU_MAX_CLK_1DOT8GHZ")
    ghz18_radio = CheckBox(group="overclock",active=False)
    ghz18.add_widget(ghz18_radio)
    layout.add_widget(ghz18)
    
    ghz21 = SettingItem(panel = panel, title = "2.1ghz", disabled=False, desc = "CONFIG_MSM_CPU_MAX_CLK_2DOT1GHZ")
    ghz21_radio = CheckBox(group="overclock",active=False)
    ghz21.add_widget(ghz21_radio)
    layout.add_widget(ghz21)
            
    popup = Popup(background='atlas://images/eds/pop', title='Overclocking', content=main, auto_dismiss=True, size_hint=(None, None), size=(630, 500))
    done.bind(on_release=popup.dismiss)
    popup.open()

    def on_ghz15_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    ghz15_radio.bind(active=on_ghz15_active)
    
    def on_ghz17_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    ghz17_radio.bind(active=on_ghz17_active)
    
    def on_ghz18_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    ghz18_radio.bind(active=on_ghz18_active)
    
    def on_ghz21_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    ghz21_radio.bind(active=on_ghz21_active)
Esempio n. 60
0
def gov_select(self):
    layout = GridLayout(cols=1, size_hint=(None, 1.0), width=700)
    layout.bind(minimum_height=layout.setter('height'))
    panel = SettingsPanel(title="Governors", settings=self)   
    main = BoxLayout(orientation = 'vertical')
    root = ScrollView(size_hint=(None, None),bar_margin=-11, bar_color=(47 / 255., 167 / 255., 212 / 255., 1.), do_scroll_x=False)
    root.size = (600, 400)
    root.add_widget(layout)
    main.add_widget(root)
    done = Button(text ='Done')
    main.add_widget(done)

    lion = SettingItem(panel = panel, title = "Lionhart", disabled=False, desc = "CONFIG_CPU_FREQ_GOV_LIONHEART")
    lion_radio = CheckBox(active=False)
    lion.add_widget(lion_radio)
    layout.add_widget(lion)
    
    inte = SettingItem(panel = panel, title = "Intellidemand", disabled=False, desc = "CONFIG_CPU_FREQ_GOV_INTELLIDEMAND")
    inte_radio = CheckBox(active=False)
    inte.add_widget(inte_radio)
    layout.add_widget(inte)
    
    zen = SettingItem(panel = panel, title = "Savanged Zen", disabled=False, desc = "CONFIG_CPU_FREQ_GOV_SAVAGEDZEN")
    zen_radio = CheckBox(active=False)
    zen.add_widget(zen_radio)
    layout.add_widget(zen)
    
    wax = SettingItem(panel = panel, title = "Brazillian Wax", disabled=False, desc = "CONFIG_CPU_FREQ_GOV_BRAZILLIANWAX")
    wax_radio = CheckBox(active=False)
    wax.add_widget(wax_radio)
    layout.add_widget(wax)
            
    popup = Popup(background='atlas://images/eds/pop', title='Governors', content=main, auto_dismiss=True, size_hint=(None, None), size=(630, 500))
    done.bind(on_release=popup.dismiss)
    popup.open()
    
    def on_lion_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    lion_radio.bind(active=on_lion_active)
    
    def on_inte_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    inte_radio.bind(active=on_inte_active)
    
    def on_zen_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    zen_radio.bind(active=on_zen_active)
    
    def on_wax_active(checkbox, value):
        if value:
            print 'The checkbox', checkbox, 'is active'
        else:
            print 'The checkbox', checkbox, 'is inactive'
    wax_radio.bind(active=on_wax_active)