v_net_components.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. """
  2. ***************************************************************************
  3. v_net_components.py
  4. ---------------------
  5. Date : December 2015
  6. Copyright : (C) 2015 by Médéric Ribreux
  7. Email : medspx at medspx dot fr
  8. ***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************
  16. """
  17. __author__ = 'Médéric Ribreux'
  18. __date__ = 'December 2015'
  19. __copyright__ = '(C) 2015, Médéric Ribreux'
  20. from .v_net import incorporatePoints, variableOutput
  21. from qgis.core import QgsProcessingParameterDefinition
  22. def processCommand(alg, parameters, context, feedback):
  23. # We need to disable only output_point parameter
  24. outPoint = alg.parameterDefinition('output_point')
  25. outPoint.setFlags(outPoint.flags() | QgsProcessingParameterDefinition.FlagHidden)
  26. incorporatePoints(alg, parameters, context, feedback)
  27. outPoint.setFlags(outPoint.flags() | QgsProcessingParameterDefinition.FlagHidden)
  28. def processOutputs(alg, parameters, context, feedback):
  29. outputParameter = {'output': ['output', 'line', 1, True],
  30. 'output_point': ['output', 'point', 2, True]}
  31. variableOutput(alg, outputParameter, parameters, context)