Skip to content


Browse files Browse the repository at this point in the history
[processing] switch a couple of modeler pop up dialogs to message bars
  • Loading branch information
nirvn committed Nov 23, 2016
1 parent d559d7f commit 6e2288d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/plugins/processing/modeler/
Expand Up @@ -65,7 +65,7 @@ def __init__(self, alg=None): = QgsMessageBar(), QSizePolicy.Fixed)

self.zoom = 1

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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'), '',
Expand All @@ -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() == '' \
Expand Down

0 comments on commit 6e2288d

Please sign in to comment.