def load_projects(self): try: project_startup = utilities.load_json_file(STARTUP_LOCATION) utilities.window_stay_on_top(project_startup['window_stay_on_top'], self.main_ui) self.window_stay_on_top_action.setChecked( project_startup['window_stay_on_top']) except: pass if os.path.exists(DATA_PATH): for data_file in os.listdir(DATA_PATH): try: data = data_file.split('.')[-1] if data == 'project': project_name = data_file.split('.')[:-1][0] utilities.add_remove_combo(self.project_combo, add=True, data=project_name) except: pass if os.path.exists(STARTUP_LOCATION): try: project_number = utilities.search_combo_items( self.project_combo, project_startup['main_project']) self.project_combo.setCurrentIndex(project_number) except: pass self.set_project_dir()
def load_projects( self ): try: project_startup = utilities.load_json_file( STARTUP_LOCATION ) utilities.window_stay_on_top( project_startup['window_stay_on_top'], self.main_ui ) self.window_stay_on_top_action.setChecked( project_startup['window_stay_on_top'] ) except: pass if os.path.exists( DATA_PATH ): for data_file in os.listdir( DATA_PATH ): try: data = data_file.split( '.' )[-1] if data == 'project': project_name = data_file.split( '.' )[:-1][0] utilities.add_remove_combo( self.project_combo, add = True, data = project_name ) except: pass if os.path.exists( STARTUP_LOCATION ): try: project_number = utilities.search_combo_items( self.project_combo, project_startup['main_project'] ) self.project_combo.setCurrentIndex( project_number ) except: pass self.set_project_dir()
def edit_group_list( self ): self.group_ui = edit_group_list.Edit_Group_List() try: project_startup = utilities.load_json_file( STARTUP_LOCATION ) utilities.window_stay_on_top( project_startup['window_stay_on_top'], self.group_ui ) except: pass self.group_ui.show()
def edit_group_list(self): self.group_ui = edit_group_list.Edit_Group_List() try: project_startup = utilities.load_json_file(STARTUP_LOCATION) utilities.window_stay_on_top(project_startup['window_stay_on_top'], self.group_ui) except: pass self.group_ui.show()
def set_project_startup( self ): self.project_cleanup() project_name = str( self.project_combo.currentText() ) utilities.window_stay_on_top( self.window_stay_on_top_action.isChecked(), self.main_ui ) self.main_ui.show() try: utilities.window_stay_on_top( self.window_stay_on_top_action.isChecked(), self.group_ui ) self.group_ui.show() except: pass project_data = {'main_project': project_name, 'window_stay_on_top': self.window_stay_on_top_action.isChecked ()} utilities.write_json_file( STARTUP_LOCATION, project_data )
def set_project_startup(self): self.project_cleanup() project_name = str(self.project_combo.currentText()) utilities.window_stay_on_top( self.window_stay_on_top_action.isChecked(), self.main_ui) self.main_ui.show() try: utilities.window_stay_on_top( self.window_stay_on_top_action.isChecked(), self.group_ui) self.group_ui.show() except: pass project_data = { 'main_project': project_name, 'window_stay_on_top': self.window_stay_on_top_action.isChecked() } utilities.write_json_file(STARTUP_LOCATION, project_data)