Exemplo n.º 1
0
    def __init__(self, **kwargs):
        super(Mainnavscreen, self).__init__(**kwargs)

        global Mdnavigationdrawer
        navigationLayout = NavigationLayout()
        Containor = ScreenManager()
        Containor.add_widget(Main())
        navigationLayout.add_widget(Containor)

        Mdnavigationdrawer = MDNavigationDrawer()
        box = BoxLayout(orientation='vertical')
        box.add_widget(
            Button(background_normal="Pictures/banner.webp",
                   size_hint=(1, None),
                   size=(0, Window.height * 0.5)))
        Drawer_list = {
            "star": "Starred",
            "settings": "Settings",
            "bookmark": "Rate & Share"
        }
        for i, j in Drawer_list.items():
            Item = TwoLineIconListItem(text=str(j))
            Item.add_widget(IconLeftWidget(icon=str(i)))
            Item.bind(on_release=self.list_action)
            box.add_widget(Item)
        box.add_widget(ScrollView())
        Mdnavigationdrawer.add_widget(box)

        navigationLayout.add_widget(Mdnavigationdrawer)

        self.add_widget(navigationLayout)
Exemplo n.º 2
0
 def load_activity_page(self):
     ContentNavigationDrawer.populateNavDrawerValues(self)
     self.ids['actscroll'].clear_widgets()
     query = f'''SELECT ACTIVITY_ID, ORG_ID, NAME, LOCATION, DISASTER, TARGET_AMT FROM ACTIVITY WHERE 
     ORG_ID = {globalvariables.var_org_id} AND STATUS='Y' '''
     # run direct SQL
     print(globalvariables.var_org_id)
     stmt = ibm_db.exec_immediate(connection.conn, query)
     actlist = ibm_db.fetch_both(stmt)
     item = TwoLineIconListItem()
     while (actlist):
         icon = IconLeftWidget(icon="bank")
         item = TwoLineIconListItem(text=str(actlist[2]),
                                    secondary_text=str(actlist[3]))
         item.add_widget(icon)
         item.bind(on_release=self.row_press)
         self.ids['actscroll'].add_widget(item)
         actlist = ibm_db.fetch_both(
             stmt)  #for incrementing rows inside while loop
Exemplo n.º 3
0
    def __init__(self, **kwargs):
        super(setting, self).__init__(**kwargs)
        box = BoxLayout(orientation="vertical")

        toolbar = TwoLineIconListItem(bg_color=(0, .588, .533, 1))
        back_icon = IconLeftWidget(icon='arrow-left-thick')

        back_icon.bind(on_release=self.back)

        toolbar.add_widget(back_icon)

        box.add_widget(toolbar)
        item = TwoLineIconListItem(
            text="Theme Style",
            secondary_text='Change the screen to Dark or light')
        item.add_widget(IconLeftWidget(icon="moon-waning-crescent"))
        item.bind(on_release=self.darkmode)
        box.add_widget(item)

        item1 = TwoLineIconListItem(
            text="Bold Format",
            secondary_text='Change the font to bold or normal')
        item1.add_widget(IconLeftWidget(icon="format-bold"))
        item1.bind(on_release=self.Bold)
        box.add_widget(item1)

        item2 = TwoLineIconListItem(
            text="Index lines", secondary_text='Change index lines to 3 or 1')
        item2.add_widget(IconLeftWidget(icon="layers"))
        item2.bind(on_release=self.Lines)
        box.add_widget(item2)
        box.add_widget(ScrollView())
        self.add_widget(box)