def add_components(self): Functions.add_to_layout( self, self.banner_image, Functions.add_to_layout( self.selector_group, AddSelectorButton.AddSelectorButton(stevens=self.stevens, selector_group=self.selector_group)), self.start_button )
def update_schedule(self, schedule): Functions.clear_layout(self) self.schedule = schedule section_label_layout_list = [] for section in self.schedule.section_list: section_label_layout_list.append( Functions.add_to_layout( LayoutFactory.make_layout(BoxLayout)( orientation="horizontal", spacing=15, padding=10, size_hint=(1, .2), background_color=(235, 235, 235), pos_hint={ 'center_x': .5, 'center_y': .5 }), Kiveasy.Label(text="{} - {}".format( section.section, section.title), pos_hint={ 'center_x': .5, 'center_y': .5 }), Kiveasy.Label(text="{} - {}".format( Functions.time_to_nice_str(section.start_time), Functions.time_to_nice_str(section.end_time)), size_hint=(.5, None), pos_hint={ 'center_x': .5, 'center_y': .5 }))) Functions.add_to_layout( self, Image(source="Images/Schedule Mockup {}.jpg".format( random.randint(0, 4)), ), *section_label_layout_list, Kiveasy.Label(text="Total Credit: {}".format( self.schedule.credit_sum), bold=True, size_hint=(None, .2), pos_hint={ 'center_x': .5, 'center_y': .5 }))
def get_layouts(self): popup_layout = BoxLayout(orientation='vertical', pos_hint={ 'center_x': .5, 'center_y': .5 }, spacing=15, padding=10) section_layout = BoxLayout(orientation='vertical', spacing=15, padding=10) popup_layout.add_widget( CourseInput(pop_up=self, section_layout=section_layout)) Functions.add_to_layout(popup_layout, section_layout, PopupCloseButton(pop_up=self)) return popup_layout, section_layout
def add_components(self): Functions.add_to_layout(self, self.schedule_arrow_group, self.schedule_layout, self.page_one_button)
def do_init_setup(self): Functions.add_to_layout(self, self.back_button, self.schedule_indicator_label, self.forward_button)
def do_init_setup(self): Functions.clear_layout(self) Functions.add_to_layout( self, Kiveasy.Label(text="No schedules could be generated"))
def build(self): Functions.add_to_layout(self.screen_manager, self.screen_one, self.screen_two) return self.screen_manager