Ejemplo n.º 1
0
    def on_enter(self):
        self.ids.panel_container.clear_widgets()
        self.panel = MDExpansionPanel(icon="all.png",
                                      panel_cls=MDExpansionPanelOneLine(
                                          text="Moje testy", ),
                                      content=Content())

        self.ids.panel_container.add_widget(self.panel)
        self.panel.bind(on_open=self.panel_open, on_close=self.panel_close)
Ejemplo n.º 2
0
    def on_start(self):
        self.autonomous = AutonomousDropDown(self)
        self.teleop = TeleOpDropDown(self)
        self.endgame = EndgameDropDown(self)
        self.penalties = PenaltiesDropDown(self)

        scoring_dropdowns = [self.autonomous, self.teleop, self.endgame]
        for dropdown in scoring_dropdowns:
            panel = MDExpansionPanel(
                icon="",
                content=dropdown,
                panel_cls=MDExpansionPanelOneLine(text=dropdown.title))
            panel.bind(_state=self.rescroll)
            self.root.ids.score_sheet.ids.scoring_menu.add_widget(panel)

        penalty_panel = MDExpansionPanel(
            icon="",
            content=self.penalties,
            panel_cls=MDExpansionPanelOneLine(text=self.penalties.title))
        penalty_panel.bind(_state=self.rescroll)
        self.root.ids.score_sheet.ids.penalties_menu.add_widget(penalty_panel)

        self.root.ids.toolbar2.ids.label_title.font_size = "24sp"

        self.started = True
Ejemplo n.º 3
0
    def on_start(self):
        self.root.ids.mybox.add_widget(
            MDExpansionPanel(content=Content(),
                             panel_cls=MDExpansionPanelThreeLine(
                                 text="text",
                                 secondary_text="Secondary text",
                                 tertiary_text="Tertiary text",
                             )))

        self.root.ids.mybox.add_widget(
            MDExpansionPanel(content=Content(),
                             panel_cls=MDExpansionPanelThreeLine(
                                 text="text",
                                 secondary_text="Secondary text",
                                 tertiary_text="Tertiary text",
                             )))
Ejemplo n.º 4
0
    def add_phone_numbers(self):
        self.data_first = Show.pickle_list(self)[0]

        country = self.default_country[5]

        try:
           country = self.default_country[5].replace("ê", "ę")

        except Exception:
            pass

        try:
            country = self.default_country[5].replace("³", "ł")

        except Exception:
            pass

        self.data_second = Show.pickle_list(self)[3][country]


        for i in range(len(self.data_first)):
            self.exp = MDExpansionPanel(icon=f'images/emergency/{self.data_first[i]}.png',
                                        content=CustomList(text=self.data_second[i]),
                                        panel_cls=MDExpansionPanelOneLine(
                                            text=self.data_first[i]
                                        ))
            self.numbers_container.add_widget(self.exp)
Ejemplo n.º 5
0
 def load_nav(self):
     self.display.ids.nav_drawer_.nav_list.add_widget(
         MDExpansionPanel(icon="img/logo.png",
                          content=Content(),
                          panel_cls=MDExpansionPanelOneLine(
                              text="Добавить",
                              secondary_text="Secondary text",
                              tertiary_text="Tertiary text",
                          )))
Ejemplo n.º 6
0
 def on_start(self):
     for i in range(10):
         self.root.ids.box.add_widget(
             MDExpansionPanel(icon=f"{images_path}kivymd_logo.png",
                              content=Content(),
                              panel_cls=MDExpansionPanelThreeLine(
                                  text="Doctor Singh",
                                  secondary_text="Subject:",
                                  tertiary_text="Message",
                              )))
Ejemplo n.º 7
0
    def provinces_list(self, *args):
        self.phone_number_screen_manager.current = 'phone_provinces'
        content = self.pickle_list()[4]
        self.delete_container = MDGridLayout(cols=1, adaptive_height=True)
        self.phone_provinces.add_widget(self.delete_container)
        for key, value in content.items():
            item = MDExpansionPanel(
                icon=f'images/provinces/{key}.png',
                content=ProvinceContent(content[key]),
                panel_cls=MDExpansionPanelOneLine(text=key))

            self.delete_container.add_widget(item)
Ejemplo n.º 8
0
 def on_start(self):
     for i in range(10):
         self.help_str.get_screen('hello').ids.box.add_widget(
             MDExpansionPanel(
                 icon = 'corona.jpg',
                 content = Content(),
                 panel_cls = MDExpansionPanelThreeLine(
                     text = "Main Text",
                     secondary_text = "text 1",
                     tertiary_text = "text 2" 
                 )
             )
         )
Ejemplo n.º 9
0
    def down_button(self, country, *args):
        try:
            self.clear_screen()
        except:
            pass
        self.phone_number_screen_manager.current = 'phone_number_list'
        numbers = self.pickle_list()[3][country]
        if len(numbers) == self.NORMAL:
            names = self.pickle_list()[0]
            self.container = SecondScreen()
            self.phone_container.add_widget(self.container)
            for i in range(self.NORMAL):
                self.container.add_widget(
                    MDExpansionPanel(
                        icon=f'images/emergency/{names[i]}.png',
                        content=PhoneContent(numbers[i]),
                        panel_cls=MDExpansionPanelOneLine(text=names[i])))

        elif len(numbers) == self.EXTENDED:
            names = self.pickle_list()[1]
            self.container = SecondScreen()
            self.phone_container.add_widget(self.container)
            self.prov_item = OneLineAvatarIconListItem(
                text='Numery ws. koronawirusa w Województwach',
                on_release=self.clear_add_provinces)
            prov_item_icon_left = IconLeftWidget(
                icon='images/emergency/mask.png', size_hint=(0.9, 0.9))
            prov_item_icon_right = IconRightWidget(icon='arrow-right')
            self.phone_list_container.add_widget(self.prov_item)
            self.prov_item.add_widget(prov_item_icon_left)
            self.prov_item.add_widget(prov_item_icon_right)
            for i in range(self.EXTENDED):
                self.container.add_widget(
                    MDExpansionPanel(
                        icon=f'images/emergency/{names[i]}.png',
                        content=PhoneContent(numbers[i]),
                        panel_cls=MDExpansionPanelOneLine(text=names[i])))
Ejemplo n.º 10
0
    def menu_item_callback(self, instance, value):

        returned_list = search(value, parsed_date)
        self.root.ids.main_content.clear_widgets()
        for doggy in returned_list:
            cont = Content()
            cont.update(
                ItemDrawer(icon='images/id.png', text=f" Id - {doggy.id}"))
            cont.update(
                ItemDrawer(icon='images/tem3.png',
                           text=f" Temperament - {doggy.temperament}"))
            self.root.ids.main_content.add_widget(
                MDExpansionPanel(
                    icon=f"images/doggy2.png",
                    content=cont,
                    panel_cls=MDExpansionPanelThreeLine(
                        text=doggy.name,
                        secondary_text=f"Life span - {doggy.life_span}",
                        tertiary_text=f"Weight - {doggy.weight} kg",
                    )))
Ejemplo n.º 11
0
    def on_enter(self):
        self.ids.cards.clear_widgets()
        self.panel0 = MDExpansionPanel(
            icon="flash",
            content=AContent(),
            panel_cls=MDExpansionPanelOneLine(text="Definuj si ciele"),
        )

        self.ids.cards.add_widget(self.panel0)
        self.panel0.bind(on_open=self.panel_open, on_close=self.panel_close)

        self.panel1 = MDExpansionPanel(
            icon="human-greeting",
            content=MeContent(),
            panel_cls=MDExpansionPanelOneLine(text="Ja"),
        )

        self.ids.cards.add_widget(self.panel1)
        self.panel1.bind(on_open=self.panel_open, on_close=self.panel_close)

        self.panel2 = MDExpansionPanel(
            icon="human-capacity-increase",
            content=TeamContent(),
            panel_cls=MDExpansionPanelOneLine(text="Tím"),
        )

        self.ids.cards.add_widget(self.panel2)
        self.panel2.bind(on_open=self.panel_open, on_close=self.panel_close)

        self.panel3 = MDExpansionPanel(
            icon="human-male-female",
            content=WeContent(),
            panel_cls=MDExpansionPanelOneLine(text="Vzťah"),
        )

        self.ids.cards.add_widget(self.panel3)
        self.panel3.bind(on_open=self.panel_open, on_close=self.panel_close)