예제 #1
0
def menu_back():
    forget_all()
    global_var.waiting_time = '-'
    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)
    eatery_header.pack()
    eatery_type_frame = eatery_type(fc_frame, bgOpenClose, bgEateries,
                                    global_var.stalls, logos_dict,
                                    eatery_to_menu)
    eatery_type_frame.place(x=0, y=0)
    fc_frame.pack()
예제 #2
0
def search():
    forget_all()
    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)
    eatery_header.pack()

    search_list = global_var.all_stalls[0][1] + global_var.all_stalls[1][1]
    search_list.sort()
    item = [['Item Found:', binarySearch(search_list, global_var.search)]]

    eatery_type_frame = eatery_type(fc_frame, bgOpenClose, bgEateries, item,
                                    logos_dict, eatery_to_menu)
    eatery_type_frame.place(x=0, y=0)
    fc_frame.pack()
예제 #3
0
def eatery_hallal():
    forget_all()

    eatery_header.pack()
    global_var.stalls = global_var.halal_stalls

    eatery_type_frame = eatery_type(fc_frame, bgOpenClose, bgEateries,
                                    global_var.stalls, logos_dict,
                                    eatery_to_menu)
    eatery_type_frame.place(x=0, y=0)
    fc_frame.pack()

    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)
예제 #4
0
def total_back():
    global_var.total_price = 0
    forget_all()
    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)

    static_fr = menu_header(menu_frame, global_var.menu_name, menu_veg,
                            menu_all, logos_dict, menu_back, opentime, qtime)
    static_fr.place(y=0)

    menu_items = menu(global_var.menu_name, global_var.dateis,
                      global_var.timeis)
    menu_items = sort_by_price(menu_items, global_var.menu_name)
    thelist = cat_and_items(global_var.menu_name, menu_items)
    menu_frm = menu_fr(menu_frame, bgMenuTitle, bgMenuItems, thelist,
                       global_var.menu_name, proceed)
    menu_frm.place(x=0, y=130)
    menu_frame.pack()
예제 #5
0
def type_to_fc():
    forget_all()
    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)
    eatery_header.pack()

    rest_stalls = eatery_list(all_eatery, 'fc')
    rest_stalls = checkOpen(rest_stalls, global_var.dateis, global_var.timeis)

    global_var.all_stalls = [['Open', rest_stalls[0]],
                             ['Closed', rest_stalls[1]]]
    global_var.halal_stalls = [[
        'Open', halal_filter(global_var.all_stalls[0][1])
    ], ['Closed', halal_filter(global_var.all_stalls[1][1])]]
    global_var.stalls = global_var.all_stalls

    eatery_type_frame = eatery_type(fc_frame, bgOpenClose, bgEateries,
                                    global_var.stalls, logos_dict,
                                    eatery_to_menu)
    eatery_type_frame.place(x=0, y=0)
    fc_frame.pack()
예제 #6
0
def home_to_desc():
    forget_all()
    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)
    desc_static_header.pack()
    desc_scrollable_list.pack()
예제 #7
0
def home_to_type():
    forget_all()
    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)
    choose_type_frame.pack()
예제 #8
0
def bar_to_home():
    global_var.waiting_time = '-'
    forget_all()
    top_bar_frame = bar(root, homebut, bar_to_home)
    top_bar_frame.place(y=0)
    home_frame.pack()
예제 #9
0
    menu_items = menu(global_var.menu_name, global_var.dateis,
                      global_var.timeis)
    menu_items = sort_by_price(menu_items, global_var.menu_name)
    thelist = cat_and_items(global_var.menu_name, menu_items)
    menu_frm = menu_fr(menu_frame, bgMenuTitle, bgMenuItems, thelist,
                       global_var.menu_name, proceed)
    menu_frm.place(x=0, y=130)
    menu_frame.pack()


#---Frames---#
home_frame = home(root, bg1, logo, home_to_type, home_to_userinput,
                  home_to_desc)
userdate_frame = userdate(root, bg1, userinput_to_type)
desc_static_header = static_header(root)
desc_scrollable_list = scroll(root, key, bgTitle, bgMenu, logos)
choose_type_frame = typeRes(root, bg2, rest_logo, fc_logo, type_to_rest,
                            type_to_fc)
eatery_header = static_header_eatery(root, eatery_hallal, eatery_all_type,
                                     eatery_back, search)
fc_frame = Frame(root, width=700, height=400)
menu_frame = Frame(root, width=700, height=600)
last_fr = Frame(root, width=700, height=600)

top_bar_frame = bar(root, homebut, bar_to_home)
top_bar_frame.place(y=0)

home_frame.pack()
root.mainloop()