33
33
from qgis .PyQt import uic
34
34
from qgis .PyQt .QtCore import Qt , QRectF , QMimeData , QPoint , QPointF , QSettings , QByteArray
35
35
from qgis .PyQt .QtWidgets import QGraphicsView , QTreeWidget , QMessageBox , QFileDialog , QTreeWidgetItem
36
- from qgis .PyQt .QtGui import QIcon , QImage , QPainter
36
+ from qgis .PyQt .QtGui import QIcon , QImage , QPainter , QSizePolicy
37
37
from qgis .core import QgsApplication
38
+ from qgis .gui import QgsMessageBar
38
39
from processing .core .ProcessingConfig import ProcessingConfig
39
40
from processing .core .ProcessingLog import ProcessingLog
40
41
from processing .gui .HelpEditionDialog import HelpEditionDialog
@@ -60,6 +61,10 @@ def __init__(self, alg=None):
60
61
super (ModelerDialog , self ).__init__ (None )
61
62
self .setupUi (self )
62
63
64
+ self .bar = QgsMessageBar ()
65
+ self .bar .setSizePolicy (QSizePolicy .Minimum , QSizePolicy .Fixed )
66
+ self .layout ().insertWidget (1 , self .bar )
67
+
63
68
self .zoom = 1
64
69
65
70
self .setWindowFlags (Qt .WindowMinimizeButtonHint |
@@ -335,9 +340,8 @@ def saveModel(self, saveAs):
335
340
fout .write (text )
336
341
fout .close ()
337
342
self .update = True
338
- QMessageBox .information (self , self .tr ('Model saved' ),
339
- self .tr ('Model was correctly saved.' ))
340
-
343
+ self .bar .pushMessage ("" , "Model was correctly saved" , level = QgsMessageBar .SUCCESS , duration = 5 )
344
+
341
345
self .hasChanged = False
342
346
343
347
def openModel (self ):
0 commit comments