26
26
27
27
__revision__ = '$Format:%H$'
28
28
29
+ from pprint import pformat
30
+ import time
31
+
29
32
from qgis .PyQt .QtCore import Qt
30
33
from qgis .PyQt .QtWidgets import QMessageBox , QApplication , QPushButton , QWidget , QVBoxLayout , QSizePolicy
31
34
from qgis .PyQt .QtGui import QCursor , QColor , QPalette
@@ -168,8 +171,6 @@ def accept(self):
168
171
169
172
parameters = self .getParamValues ()
170
173
171
- QgsMessageLog .logMessage (str (parameters ), 'Processing' , QgsMessageLog .CRITICAL )
172
-
173
174
if checkCRS and not self .alg .validateInputCrs (parameters , context ):
174
175
reply = QMessageBox .question (self , self .tr ("Unmatching CRS's" ),
175
176
self .tr ('Layers do not all use the same CRS. This can '
@@ -221,6 +222,9 @@ def accept(self):
221
222
self .setInfo (
222
223
self .tr ('<b>Algorithm {0} starting...</b>' ).format (self .alg .displayName ()))
223
224
225
+ feedback .pushInfo (self .tr ('Input parameters:\n {}\n ' .format (pformat (parameters ))))
226
+ start_time = time .time ()
227
+
224
228
if self .iterateParam :
225
229
if executeIterating (self .alg , parameters , self .iterateParam , context , feedback ):
226
230
self .finish (parameters , context , feedback )
@@ -234,6 +238,9 @@ def accept(self):
234
238
# ProcessingLog.addToLog(command)
235
239
self .buttonCancel .setEnabled (self .alg .flags () & QgsProcessingAlgorithm .FlagCanCancel )
236
240
result = executeAlgorithm (self .alg , parameters , context , feedback )
241
+ feedback .pushInfo (self .tr ('Execution completed in {0:0.2f} seconds' .format (time .time () - start_time )))
242
+ feedback .pushInfo (self .tr ('Results:\n {}\n ' .format (pformat (result ))))
243
+
237
244
self .buttonCancel .setEnabled (False )
238
245
self .finish (result , context , feedback )
239
246
#TODO
0 commit comments