2012-10-05 23:28:47 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
"""
|
|
|
|
***************************************************************************
|
2013-08-12 20:44:27 +02:00
|
|
|
ProcessingResults.py
|
2012-10-05 23:28:47 +02:00
|
|
|
---------------------
|
|
|
|
Date : August 2012
|
|
|
|
Copyright : (C) 2012 by Victor Olaya
|
|
|
|
Email : volayaf at gmail dot com
|
|
|
|
***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************
|
|
|
|
"""
|
2016-09-21 18:24:26 +02:00
|
|
|
from builtins import object
|
2012-10-05 23:28:47 +02:00
|
|
|
|
|
|
|
__author__ = 'Victor Olaya'
|
|
|
|
__date__ = 'August 2012'
|
|
|
|
__copyright__ = '(C) 2012, Victor Olaya'
|
2013-10-01 20:52:22 +03:00
|
|
|
|
2012-10-05 23:28:47 +02:00
|
|
|
# This will get replaced with a git SHA1 when you do a git archive
|
2013-10-01 20:52:22 +03:00
|
|
|
|
2012-10-05 23:28:47 +02:00
|
|
|
__revision__ = '$Format:%H$'
|
|
|
|
|
2017-02-10 13:35:58 +02:00
|
|
|
from qgis.PyQt.QtCore import QObject, pyqtSignal
|
2013-10-01 20:52:22 +03:00
|
|
|
|
2017-02-10 13:35:58 +02:00
|
|
|
|
|
|
|
class ProcessingResults(QObject):
|
|
|
|
|
|
|
|
resultAdded = pyqtSignal()
|
2012-09-15 18:25:25 +03:00
|
|
|
|
|
|
|
results = []
|
|
|
|
|
2017-02-10 13:35:58 +02:00
|
|
|
def addResult(self, icon, name, result):
|
|
|
|
self.results.append(Result(icon, name, result))
|
|
|
|
self.resultAdded.emit()
|
2012-09-15 18:25:25 +03:00
|
|
|
|
2017-02-10 13:35:58 +02:00
|
|
|
def getResults(self):
|
|
|
|
return self.results
|
2012-09-15 18:25:25 +03:00
|
|
|
|
|
|
|
|
2016-09-21 18:24:26 +02:00
|
|
|
class Result(object):
|
2012-09-15 18:25:25 +03:00
|
|
|
|
2017-02-10 13:35:58 +02:00
|
|
|
def __init__(self, icon, name, filename):
|
|
|
|
self.icon = icon
|
2012-09-15 18:25:25 +03:00
|
|
|
self.name = name
|
|
|
|
self.filename = filename
|
2017-02-10 13:35:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
resultsList = ProcessingResults()
|