code: def selectComponent(self, component, index=None, command=QtGui.QItemSelectionModel.Toggle):
          
          if command == QtGui.QItemSelectionModel.Toggle:
              if component in self._selectedComponents:
                  self._selectedComponents.remove(component)
                  if index is None:
                      index = self.model().indexByComponent(component)
                  self.selectionChanged.emit(self.selection(), QtGui.QItemSelection(index, index))
                  if len(self._selectedComponents) == 0:
                      self.hintRequested.emit('Select Components in view to modify')
              else:
                  self._selectedComponents.append(component)
                  self.selectionChanged.emit(self.selection(), QtGui.QItemSelection())
                  self.hintRequested.emit('Select more components, or click again to toggle inclusion. To edit parameter type or bounds, select parameter field in table')
          else:
              raise Exception("Selection command not supported")
docs: Selects the given *component* according to *command* policy
          (actually, only toggle supported). If index is None, looks up index
          of component in model