def setZonesFile(self, filename): """ do following with given path to homogeneous file 1. show path 2. show all fields for selection of field with zone identifier 3. show all fields for selection of field with building count 4. show projection 5. set path in project 6. additional updates in other tabs """ # update UI logUICall.log('\tset zones file to %s ...' % filename,logUICall.DEBUG_L2) self.ui.txt_zones_select_file.setText(filename) logUICall.log('\tupdate combo box ...',logUICall.DEBUG_L2) fields = shapefile_fields(filename) self.ui.cb_zones_class_field.clear() self.ui.cb_zones_count_field.clear() self.ui.cb_zones_class_field.addItems([' '] + fields) self.ui.cb_zones_count_field.addItems([' '] + fields) self.ui.cb_zones_proj.clear() self.ui.cb_zones_proj.addItem (shapefile_projection(filename)) # update project if project exists if self.project is not None: self.project.zone_file = filename self.app.refreshPreview()
def setPopGridFile(self, filename): """ do following with given path to population grid file 1. show path 2. show all fields for selection of field with population count 3. show projection 4. set path in project 5. additional updates in other tabs """ # update UI logUICall.log('\tset pop grid file to %s ...' % filename,logUICall.DEBUG_L2) self.ui.txt_pop_select_file.setText(filename) logUICall.log('\tupdate combo box ...',logUICall.DEBUG_L2) fields = shapefile_fields(filename) self.ui.cb_pop_pop_field.clear() self.ui.cb_pop_pop_field.addItems([' '] + fields) self.ui.cb_pop_proj.clear() self.ui.cb_pop_proj.addItem (shapefile_projection(filename)) # update project if project exists if self.project is not None: self.project.popgrid_file = filename self.app.refreshPreview()
def setFootprintFile(self, filename): """ do following with given path to footprint file 1. show path 2. show all fields for selection of field with story 3. show projection 4. set path in project 5. additional updates in other tabs """ # update UI logUICall.log('\tset footprint file to %s ...' % filename,logUICall.DEBUG_L2) self.ui.txt_fp_select_file.setText(filename) logUICall.log('\tupdate combo box ...',logUICall.DEBUG_L2) self.ui.cb_fp_story_field.clear() self.ui.cb_fp_story_field.addItems (shapefile_fields(filename)) self.ui.cb_fp_proj.clear() self.ui.cb_fp_proj.addItem (shapefile_projection(filename)) # update project if project exists if self.project is not None: self.project.fp_file = filename self.app.refreshPreview()