def __init__(self, master): """Constructor: Takes in a main tkinter window and creates a user interface""" self.__original_fields = [] VAR = variables.Variables() # Start the variables reader self.get_menubar(master, master) # Setup menu bar items # Setup file / folder input output dialog boxes input_string, output_string = self.get_io(master, master, VAR) self.__input_string = input_string self.__output_string = output_string options_frame, mapping_list = self.get_mapping(master, VAR) self.__options_frame = options_frame self.__mapping_list = mapping_list # Setup Module checks arcpy_found = setup.check_arcpy(master, 4, 0, 3, 0, 6) # Setup command buttons run_button = self.get_buttons(master, master, VAR) # Disable run button if critical modules are not found if arcpy_found == False: run_button.configure( state=TK.DISABLED) #Disable if modules not available # Build options list for the first time. This is here since it can # not be built until both the input and options frames are in place self.set_option_list(master, VAR)
def __init__(self, master): """Constructor: Takes in a main tkinter window and creates a user interface""" self.__original_fields = [] VAR = variables.Variables() # Start the variables reader self.get_menubar(master, master) # Setup menu bar items # Setup file / folder input output dialog boxes input_string, output_string = self.get_io (master, master, VAR) self.__input_string = input_string self.__output_string = output_string options_frame, mapping_list = self.get_mapping (master, VAR) self.__options_frame = options_frame self.__mapping_list = mapping_list # Setup Module checks arcpy_found = setup.check_arcpy(master, 4, 0, 3, 0, 6) # Setup command buttons run_button = self.get_buttons (master, master, VAR) # Disable run button if critical modules are not found if arcpy_found == False: run_button.configure (state=TK.DISABLED) #Disable if modules not available # Build options list for the first time. This is here since it can # not be built until both the input and options frames are in place self.set_option_list (master, VAR)
def __init__(self, master): """Constructor: Takes in a main tkinter window and creates a user interface""" VAR = variables.Variables() # Start the variables reader self.get_menubar(master, master) # Setup menu bar items # Setup file / folder input output dialog boxes input_string, output_string = self.get_io (master, master, VAR) self.__input_string = input_string self.__output_string = output_string # Setup Module checks arcpy_found = setup.check_arcpy(master, 4, 0, 3, 0, 6) # Setup command buttons run_button = self.get_buttons (master, master, VAR) # Disable run button if critical modules are not found if arcpy_found == False: run_button.configure (state=TK.DISABLED) #Disable if modules not available
def __init__(self, master): """Setup the main GUI window and load default or starting settings.""" VAR = variables.Variables() # Start the variables reader self.get_menubar(master, master) # Setup menu bar items # Setup file / folder input output dialog boxes input_string, dem_string, output_string = self.get_io(master, VAR) self.__input_string = input_string self.__dem_string = dem_string self.__output_string = output_string #Settings Frame options_frame = TK.LabelFrame(master, text='Options') options_frame.grid(row=3, column=0, columnspan=3, padx=6, pady=6) # Setup Centerline options centerline_boolean, cellsize_string, smoothing_string, cellsize_entry, smoothing_entry = self.get_centerline( options_frame, VAR) self.__centerline_boolean = centerline_boolean self.__cellsize_string = cellsize_string self.__smoothing_string = smoothing_string self.__cellsize_entry = cellsize_entry self.__smoothing_entry = smoothing_entry # Setup optional table check button frame hypsometry_boolean, slope_boolean, aspect_boolean = self.get_tables( options_frame, VAR) self.__hypsometry_boolean = hypsometry_boolean self.__slope_boolean = slope_boolean self.__aspect_boolean = aspect_boolean # Setup optional populate field check buttons glims_boolean, rgi_boolean, rgi_version, rgi_region, ver_entry, reg_entry = self.get_populate( options_frame, VAR) self.__glims_boolean = glims_boolean self.__rgi_boolean = rgi_boolean self.__rgi_version = rgi_version self.__rgi_region = rgi_region self.__rgi_version_entry = ver_entry self.__rgi_region_entry = reg_entry # Setup application parameters needed at runtime i.e. scale raster scaling_string, buffer_string = self.get_parameters(options_frame, VAR) self.__scaling_string = scaling_string self.__buffer_string = buffer_string # Setup bin options for application min_string, max_string, size_string = self.get_bins(options_frame, VAR) self.__min_string = min_string self.__max_string = max_string self.__size_string = size_string # Setup a restore defaults button for the application self.reset_default(options_frame, VAR) # Setup Module checks arcpy_found = setup.check_arcpy(master, 4, 0, 3, 0, 6) # Setup command buttons run_button = self.get_buttons(master, master, VAR) # Disable run button if critical modules are not found if arcpy_found == False: run_button.configure( state=TK.DISABLED) #Disable if modules not available self.enable() # Enable or disable buttons depending on need
def __init__ (self, master): """Setup the main GUI window and load default or starting settings.""" VAR = variables.Variables() # Start the variables reader self.get_menubar(master, master) # Setup menu bar items # Setup file / folder input output dialog boxes input_string, dem_string, output_string = self.get_io (master, VAR) self.__input_string = input_string self.__dem_string = dem_string self.__output_string = output_string #Settings Frame options_frame = TK.LabelFrame(master, text= 'Options') options_frame.grid (row =3, column =0, columnspan = 3, padx =6, pady = 6) # Setup Centerline options centerline_boolean, cellsize_string, smoothing_string, cellsize_entry, smoothing_entry= self.get_centerline (options_frame, VAR) self.__centerline_boolean = centerline_boolean self.__cellsize_string = cellsize_string self.__smoothing_string = smoothing_string self.__cellsize_entry = cellsize_entry self.__smoothing_entry = smoothing_entry # Setup optional table check button frame hypsometry_boolean, slope_boolean, aspect_boolean = self.get_tables (options_frame, VAR) self.__hypsometry_boolean = hypsometry_boolean self.__slope_boolean = slope_boolean self.__aspect_boolean = aspect_boolean # Setup optional populate field check buttons glims_boolean, rgi_boolean, rgi_version, rgi_region, ver_entry, reg_entry = self.get_populate (options_frame, VAR) self.__glims_boolean = glims_boolean self.__rgi_boolean = rgi_boolean self.__rgi_version = rgi_version self.__rgi_region = rgi_region self.__rgi_version_entry = ver_entry self.__rgi_region_entry = reg_entry # Setup application parameters needed at runtime i.e. scale raster scaling_string, buffer_string = self.get_parameters (options_frame, VAR) self.__scaling_string = scaling_string self.__buffer_string = buffer_string # Setup bin options for application min_string, max_string, size_string = self.get_bins (options_frame, VAR) self.__min_string = min_string self.__max_string = max_string self.__size_string = size_string # Setup a restore defaults button for the application self.reset_default (options_frame, VAR) # Setup Module checks arcpy_found = setup.check_arcpy(master, 4, 0, 3, 0, 6) # Setup command buttons run_button = self.get_buttons (master, master, VAR) # Disable run button if critical modules are not found if arcpy_found == False: run_button.configure (state=TK.DISABLED) #Disable if modules not available self.enable() # Enable or disable buttons depending on need