Skip to content
Permalink
Browse files

test models and scripts are now hidden

  • Loading branch information
volaya committed Sep 21, 2013
1 parent 56d6496 commit 1517e58ae7c22948bea9cc2661e1280d13c71136
@@ -16,7 +16,7 @@
* *
***************************************************************************
"""
from processing import interface


__author__ = 'Victor Olaya'
__date__ = 'August 2012'
@@ -26,16 +26,14 @@

from PyQt4.QtCore import *
from PyQt4.QtGui import *

import webbrowser
from processing import interface
from processing.gui.MissingDependencyDialog import MissingDependencyDialog
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.modeler.Providers import Providers
from processing.gui.AlgorithmClassification import AlgorithmDecorator
from processing.core.Processing import Processing
from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingConfig import ProcessingConfig
from processing.tools import dataobjects
from processing.gui.ParametersDialog import ParametersDialog
from processing.gui.BatchProcessingDialog import BatchProcessingDialog
from processing.gui.EditRenderingStylesDialog import EditRenderingStylesDialog
@@ -302,6 +300,7 @@ def fillTreeUsingProviders(self):
text = unicode(self.searchBox.text())
for providerName in Processing.algs.keys():
groups = {}
count = 0
provider = Processing.algs[providerName]
name = "ACTIVATE_" + providerName.upper().replace(" ", "_")
if not ProcessingConfig.getSetting(name):
@@ -321,6 +320,7 @@ def fillTreeUsingProviders(self):
groups[alg.group] = groupItem
algItem = TreeAlgorithmItem(alg)
groupItem.addChild(algItem)
count += 1

actions = Processing.actions[providerName]
for action in actions:
@@ -337,7 +337,7 @@ def fillTreeUsingProviders(self):
if len(groups) > 0:
providerItem = QTreeWidgetItem()
providerItem.setText(0, Processing.getProviderFromName(providerName).getDescription()
+ " [" + str(len(provider)) + " geoalgorithms]")
+ " [" + str(count) + " geoalgorithms]")
providerItem.setIcon(0, Processing.getProviderFromName(providerName).getIcon())
providerItem.setToolTip(0, providerItem.text(0))
for groupItem in groups.values():
@@ -139,6 +139,9 @@ def openModel(self, filename):
self.name = line[len("NAME:"):]
elif line.startswith("GROUP:"):
self.group = line[len("GROUP:"):]
if self.group == "[Test models]":
self.showInModeler = False
self.showInToolbox = False
elif line.startswith("ALGORITHM:"):
algParams={}
algOutputs={}
@@ -87,6 +87,9 @@ def defineCharacteristicsFromFile(self):
self.script += line
line = lines.readline()
lines.close()
if self.group == "[Test scripts]":
self.showInModeler = False
self.showInToolbox = False

def defineCharacteristicsFromScript(self):
lines = self.script.split("\n")

0 comments on commit 1517e58

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