Esempio n. 1
0
 def get_file(self):
     """Slot that opens a file dialog to choose a kml file or multiple files simultaneously
     """
     filenames = get_open_filenames(
         self, "Open KML File", os.path.dirname(str(self.directory_location)), "KML Files (*.kml)")
     if not filenames:
         return
     self.select_file(filenames)
Esempio n. 2
0
 def get_file(self):
     """
     Slot that opens a file dialog to choose a kml file or multiple files simultaneously
     """
     filenames = get_open_filenames(
         self, "Open KML File", os.path.dirname(str(self.directory_location)), "KML Files (*.kml)")
     if not filenames:
         return
     self.select_file(filenames)
     # set color icons according to linewidth to newly added KML files
     for filename in filenames:
         if filename is not None:
             item_list = self.listWidget.findItems(filename, QtCore.Qt.MatchExactly)
             for item in item_list:
                 index = self.listWidget.row(item)
                 self.listWidget.item(index).setIcon(self.show_color_icon(filename, self.set_color(filename)))