def showSelectionDialog(self):
     if self.datatype == ParameterMultipleInput.TYPE_RASTER:
         options = QGisLayers.getRasterLayers()
     elif self.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
         options = QGisLayers.getVectorLayers()
     else:
         options = QGisLayers.getVectorLayers(self.datatype)
     opts = []
     for opt in options:
         opts.append(opt.name())
     self.options = opts
     
     dlg = MultipleInputDialog(self.options, self.selectedoptions)
     dlg.exec_()
     if dlg.selectedoptions != None:
         self.selectedoptions = dlg.selectedoptions
         self.label.setText(str(len(self.selectedoptions)) + " elements selected")
예제 #2
0
 def showSelectionDialog(self):
     #If there is a datatype, we use it to create the list of options
     if self.datatype is not None:
         if self.datatype == ParameterMultipleInput.TYPE_RASTER:
             options = QGisLayers.getRasterLayers()
         elif self.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
             options = QGisLayers.getVectorLayers()
         else:
             options = QGisLayers.getVectorLayers(self.datatype)
         opts = []
         for opt in options:
             opts.append(opt.name())
         self.options = opts
     dlg = MultipleInputDialog(self.options, self.selectedoptions)
     dlg.exec_()
     if dlg.selectedoptions != None:
         self.selectedoptions = dlg.selectedoptions
         self.label.setText(
             str(len(self.selectedoptions)) + " elements selected")
예제 #3
0
 def showSelectionDialog(self):
     #=======================================================================
     # #If there is a datatype, we use it to create the list of options
     # if self.datatype is not None:
     #    if self.datatype == ParameterMultipleInput.TYPE_RASTER:
     #        options = QGisLayers.getRasterLayers()
     #    elif self.datatype == ParameterMultipleInput.TYPE_VECTOR_ANY:
     #        options = QGisLayers.getVectorLayers()
     #    else:
     #        options = QGisLayers.getVectorLayers(self.datatype)
     #    opts = []
     #    for opt in options:
     #        opts.append(opt.name())
     #    self.options = opts
     #=======================================================================
     dlg = MultipleInputDialog(self.options, self.selectedoptions)
     dlg.exec_()
     if dlg.selectedoptions != None:
         self.selectedoptions = dlg.selectedoptions
         self.label.setText(str(len(self.selectedoptions)) + " elements selected")
예제 #4
0
 def showSelectionDialog(self):
     dlg = MultipleInputDialog(self.options, self.selectedoptions)
     dlg.exec_()
     if dlg.selectedoptions != None:
         self.selectedoptions = dlg.selectedoptions
         self.label.setText(str(len(self.selectedoptions)) + " elements selected")