ToolboxAction.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. """
  2. ***************************************************************************
  3. ToolboxAction.py
  4. ---------------------
  5. Date : August 2012
  6. Copyright : (C) 2012 by Victor Olaya
  7. Email : volayaf at gmail dot com
  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__ = 'Victor Olaya'
  18. __date__ = 'August 2012'
  19. __copyright__ = '(C) 2012, Victor Olaya'
  20. from qgis.PyQt.QtCore import QCoreApplication
  21. from qgis.core import QgsApplication
  22. class ToolboxAction:
  23. def setData(self, toolbox):
  24. self.toolbox = toolbox
  25. def getIcon(self):
  26. return QgsApplication.getThemeIcon("/processingAlgorithm.svg")
  27. def tr(self, string, context=''):
  28. if context == '':
  29. context = self.__class__.__name__
  30. return QCoreApplication.translate(context, string)