Skip to content
Permalink
Browse files

[processing] remove obsolete code and disable exporting models as script

until we update it so support new scripts format
  • Loading branch information
alexbruy committed Feb 5, 2018
1 parent fa5ab81 commit 4f2a4644dbdde1a4fa72b876f80c82cb6320dbe5

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -103,28 +103,6 @@ def deinitialize():

Processing.BASIC_PROVIDERS = []

@staticmethod
def addScripts(folder):
#Processing.initialize()
#provider = QgsApplication.processingRegistry().providerById("qgis")
#scripts = ScriptUtils.loadFromFolder(folder)
#for script in scripts:
# script.allowEdit = False
# script._icon = provider.icon()
#provider.externalAlgs.extend(scripts)
#provider.refreshAlgorithms()
pass

@staticmethod
def removeScripts(folder):
#provider = QgsApplication.processingRegistry().providerById("qgis")
#for alg in provider.externalAlgs[::-1]:
# path = os.path.dirname(alg.descriptionFile)
# if path == folder:
# provider.externalAlgs.remove(alg)
#provider.refreshAlgorithms()
pass

@staticmethod
def runAlgorithm(algOrName, parameters, onFinish=None, feedback=None, context=None):
if isinstance(algOrName, QgsProcessingAlgorithm):
@@ -114,8 +114,8 @@ def __init__(self, model=None):
QgsApplication.getThemeIcon('/mActionSaveAsPDF.svg'))
self.mActionExportSvg.setIcon(
QgsApplication.getThemeIcon('/mActionSaveAsSVG.svg'))
self.mActionExportPython.setIcon(
QgsApplication.getThemeIcon('/mActionSaveAsPython.svg'))
#~ self.mActionExportPython.setIcon(
#~ QgsApplication.getThemeIcon('/mActionSaveAsPython.svg'))
self.mActionEditHelp.setIcon(
QgsApplication.getThemeIcon('/mActionEditHelpContent.svg'))
self.mActionRun.setIcon(
@@ -270,7 +270,7 @@ def _mimeDataAlgorithm(items):
self.mActionExportImage.triggered.connect(self.exportAsImage)
self.mActionExportPdf.triggered.connect(self.exportAsPdf)
self.mActionExportSvg.triggered.connect(self.exportAsSvg)
self.mActionExportPython.triggered.connect(self.exportAsPython)
#self.mActionExportPython.triggered.connect(self.exportAsPython)
self.mActionEditHelp.triggered.connect(self.editHelp)
self.mActionRun.triggered.connect(self.runModel)

This file was deleted.

@@ -39,7 +39,6 @@
from processing.script.CreateNewScriptAction import CreateNewScriptAction
from processing.script.DeleteScriptAction import DeleteScriptAction
from processing.script.EditScriptAction import EditScriptAction
#from processing.script.CreateScriptCollectionPluginAction import CreateScriptCollectionPluginAction
from processing.script import ScriptUtils


@@ -51,7 +50,6 @@ def __init__(self):
self.folder_algorithms = []
self.actions = [CreateNewScriptAction(),
AddScriptFromFileAction(),
#CreateScriptCollectionPluginAction()
]
self.contextMenuActions = [EditScriptAction(),
DeleteScriptAction()]

This file was deleted.

0 comments on commit 4f2a464

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