ProcessingResults.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. """
  2. ***************************************************************************
  3. ProcessingResults.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 QObject, pyqtSignal
  21. class ProcessingResults(QObject):
  22. resultAdded = pyqtSignal()
  23. results = []
  24. def addResult(self, icon, name, timestamp, result):
  25. self.results.append(Result(icon, name, timestamp, result))
  26. self.resultAdded.emit()
  27. def getResults(self):
  28. return self.results
  29. class Result:
  30. def __init__(self, icon, name, timestamp, filename):
  31. self.icon = icon
  32. self.name = name
  33. self.timestamp = timestamp
  34. self.filename = filename
  35. resultsList = ProcessingResults()