Skip to content
Browse files

[processing] switch a couple of modeler pop up dialogs to message bars

  • Loading branch information
nirvn committed Nov 23, 2016
1 parent d559d7f commit 6e2288dccbd251dc223c7f9f56a3ce1d1b232b44
Showing with 8 additions and 8 deletions.
  1. +8 −8 python/plugins/processing/modeler/
@@ -65,7 +65,7 @@ def __init__(self, alg=None): = QgsMessageBar(), QSizePolicy.Fixed)

self.zoom = 1

@@ -189,9 +189,9 @@ def _mimeDataAlgorithm(items):
if hasattr(self.searchBox, 'setPlaceholderText'):
if hasattr(self.textName, 'setPlaceholderText'):
self.textName.setPlaceholderText('[Enter model name here]'))
self.textName.setPlaceholderText('Enter model name here'))
if hasattr(self.textGroup, 'setPlaceholderText'):
self.textGroup.setPlaceholderText('[Enter group name here]'))
self.textGroup.setPlaceholderText('Enter group name here'))

# Connect signals and slots
@@ -262,9 +262,7 @@ def editHelp(self):

def runModel(self):
if len(self.alg.algs) == 0:
QMessageBox.warning(self,'Empty model'),"Model doesn't contains any algorithms and/or "
"parameters and can't be executed"))"", "Model doesn't contain any algorithm and/or parameter and can't be executed", level=QgsMessageBar.WARNING, duration=5)

if self.alg.provider is None:
@@ -306,6 +304,8 @@ def exportAsImage(self):"", "Model was correctly exported as image", level=QgsMessageBar.SUCCESS, duration=5)

def exportAsPython(self):
filename, filter = QFileDialog.getSaveFileName(self,'Save Model As Python Script'), '',
@@ -319,8 +319,8 @@ def exportAsPython(self):
text = self.alg.toPython()
with, 'w', encoding='utf-8') as fout:
QMessageBox.information(self,'Model exported'),'Model was correctly exported.'))"", "Model was correctly exported as python script", level=QgsMessageBar.SUCCESS, duration=5)

def saveModel(self, saveAs):
if str(self.textGroup.text()).strip() == '' \

0 comments on commit 6e2288d

Please sign in to comment.
You can’t perform that action at this time.