当前位置: 首页>>代码示例>>Python>>正文


Python SextanteConfig.addSetting方法代码示例

本文整理汇总了Python中sextante.core.SextanteConfig.SextanteConfig.addSetting方法的典型用法代码示例。如果您正苦于以下问题:Python SextanteConfig.addSetting方法的具体用法?Python SextanteConfig.addSetting怎么用?Python SextanteConfig.addSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sextante.core.SextanteConfig.SextanteConfig的用法示例。


在下文中一共展示了SextanteConfig.addSetting方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     '''this is the place where you should add config parameters to SEXTANTE using the SextanteConfig class.
     this method is called when a provider is added to SEXTANTE.
     By default it just adds a setting to activate or deactivate algorithms from the provider'''
     SextanteConfig.settingIcons[self.getDescription()] = self.getIcon()
     name = "ACTIVATE_" + self.getName().upper().replace(" ", "_")
     SextanteConfig.addSetting(Setting(self.getDescription(), name, "Activate", self.activate))
开发者ID:sawajid,项目名称:Quantum-GIS,代码行数:9,代码来源:AlgorithmProvider.py

示例2: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     '''In this method we add settings needed to configure our provider.
     Do not forget to call the parent method, since it takes care or
     automatically adding a setting for activating or deactivating the
     algorithms in the provider'''
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(Setting("Example algorithms", ExampleAlgorithmProvider.MY_DUMMY_SETTING, "Example setting", "Default value"))
     '''To get the parameter of a setting parameter, use SextanteConfig.getSetting(name_of_parameter)'''
开发者ID:carsonfarmer,项目名称:Quantum-GIS,代码行数:10,代码来源:ExampleAlgorithmProvider.py

示例3: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     if SextanteUtils.isWindows() or SextanteUtils.isMac():
         SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_FOLDER, "GRASS folder", GrassUtils.grassPath()))
         SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_WIN_SHELL, "Msys folder", GrassUtils.grassWinShell()))
     SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_COMMANDS, "Log execution commands", False))
     SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_CONSOLE, "Log console output", False))
     SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_HELP_FOLDER, "GRASS help folder", GrassUtils.grassHelpPath()))
开发者ID:Nald,项目名称:Quantum-GIS,代码行数:10,代码来源:GrassAlgorithmProvider.py

示例4: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
    def initializeSettings(self):
        '''add settings needed to configure our provider.'''
        # call the parent method which takes care of adding a setting for 
        # activating or deactivating the algorithms in the provider
        AlgorithmProvider.initializeSettings(self)

        # add settings
        SextanteConfig.addSetting(Setting("LWGEOM algorithms", LwgeomAlgorithmProvider.LWGEOM_PATH_SETTING, "Path to liblwgeom", ""))
开发者ID:SIGISLV,项目名称:processinglwgeomprovider,代码行数:10,代码来源:LwgeomAlgorithmProvider.py

示例5: okPressed

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def okPressed(self):
     for setting in self.items.keys():
         if isinstance(setting.value,bool):
             setting.value = (self.items[setting].checkState(1) == QtCore.Qt.Checked)
         elif isinstance(setting.value, (float,int, long)):
             value = str(self.items[setting].text(1))
             try:
                 value = float(value)
                 setting.value = value
             except ValueError:
                 QtGui.QMessageBox.critical(self, "Wrong value","Wrong parameter value:\n" + value)
                 return
         else:
             setting.value = str(self.items[setting].text(1))
         SextanteConfig.addSetting(setting)
     SextanteConfig.saveSettings()
     self.toolbox.updateTree()
     self.close()
开发者ID:mokerjoke,项目名称:Quantum-GIS,代码行数:20,代码来源:ConfigDialog.py

示例6: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     '''In this method we add settings needed to configure our provider.
     Do not forget to call the parent method, since it takes care or
     automatically adding a setting for activating or deactivating the
     algorithms in the provider'''
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(Setting(self.getDescription(
     ), IliUtils.JAVA_EXEC, "Java executable", IliUtils.java_exec_default()))
     SextanteConfig.addSetting(
         Setting(self.getDescription(), IliUtils.ILI2C_JAR, "ili2c.jar path", "ili2c.jar"))
     SextanteConfig.addSetting(Setting(
         self.getDescription(), IliUtils.ILI2PG_JAR, "ili2pg.jar path", "ili2pg.jar"))
     SextanteConfig.addSetting(Setting(
         self.getDescription(), IliUtils.CREATEDB_EXEC, "createdb path", "createdb"))
开发者ID:kfischerar,项目名称:ogrtools,代码行数:16,代码来源:ogralgorithmprovider.py

示例7: accept

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
    def accept(self):
        for setting in self.items.keys():
            if isinstance(setting.value,bool):
                setting.value = (self.items[setting].checkState(1) == Qt.Checked)
            elif isinstance(setting.value, (float,int, long)):
                value = str(self.items[setting].text(1))
                try:
                    value = float(value)
                    setting.value = value
                except ValueError:
                    QMessageBox.critical(self,
                                         self.tr("Wrong value"),
                                         self.tr("Wrong parameter value:\n%1").arg(value)
                                        )
                    return
            else:
                setting.value = str(self.items[setting].text(1))
            SextanteConfig.addSetting(setting)
        SextanteConfig.saveSettings()
        self.toolbox.updateTree()

        QDialog.accept(self)
开发者ID:L-Infantini,项目名称:Quantum-GIS,代码行数:24,代码来源:ConfigDialog.py

示例8: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(
         Setting(self.getDescription(), RUtils.RSCRIPTS_FOLDER, "R Scripts folder", RUtils.RScriptsFolder())
     )
     if SextanteUtils.isWindows():
         SextanteConfig.addSetting(Setting(self.getDescription(), RUtils.R_FOLDER, "R folder", RUtils.RFolder()))
         SextanteConfig.addSetting(Setting(self.getDescription(), RUtils.R_USE64, "Use 64 bit version", False))
开发者ID:jietaowang,项目名称:Quantum-GIS,代码行数:10,代码来源:RAlgorithmProvider.py

示例9: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(
         Setting(
             self.getDescription(),
             TauDEMUtils.TAUDEM_FOLDER,
             "TauDEM command line tools folder",
             TauDEMUtils.taudemPath(),
         )
     )
     SextanteConfig.addSetting(
         Setting(
             self.getDescription(),
             TauDEMUtils.MPIEXEC_FOLDER,
             "MPICH2/OpenMPI bin directory",
             TauDEMUtils.mpiexecPath(),
         )
     )
     SextanteConfig.addSetting(
         Setting(self.getDescription(), TauDEMUtils.MPI_PROCESSES, "Number of MPI parallel processes to use", 2)
     )
开发者ID:endmax,项目名称:Quantum-GIS,代码行数:23,代码来源:TauDEMAlgorithmProvider.py

示例10: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(Setting(self.getDescription(),
                                       WpsAlgorithmProvider.WPS_DESCRIPTIONS,
                                       "WPS description cache folder",
                                       WpsAlgorithmProvider.WpsDescriptionFolder()))
开发者ID:bpross-52n,项目名称:qgis-wps-client,代码行数:8,代码来源:WpsAlgorithmProvider.py

示例11: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     if SextanteUtils.isWindows():
         SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_FOLDER, "SAGA folder", SagaUtils.sagaPath()))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_AUTO_RESAMPLING, "Use min covering grid system for resampling", True))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_LOG_COMMANDS, "Log execution commands", False))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_LOG_CONSOLE, "Log console output", False))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_XMIN, "Resampling region min x", 0))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_YMIN, "Resampling region min y", 0))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_XMAX, "Resampling region max x", 1000))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_YMAX, "Resampling region max y", 1000))
     SextanteConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_RESAMPLING_REGION_CELLSIZE, "Resampling region cellsize", 1))
开发者ID:Nald,项目名称:Quantum-GIS,代码行数:14,代码来源:SagaAlgorithmProvider.py

示例12: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(Setting(self.getDescription(), LasToolsUtils.LASTOOLS_FOLDER, "LASTools folder", LasToolsUtils.LasToolsPath()))
     SextanteConfig.addSetting(Setting(self.getDescription(), FusionUtils.FUSION_FOLDER, "Fusion folder",
                                       FusionUtils.FusionPath()))
开发者ID:mokerjoke,项目名称:Quantum-GIS,代码行数:7,代码来源:LidarToolsAlgorithmProvider.py

示例13: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(Setting(self.getDescription(), ScriptUtils.SCRIPTS_FOLDER, "Scripts folder", ScriptUtils.scriptsFolder()))
开发者ID:geodenilson,项目名称:Quantum-GIS,代码行数:5,代码来源:ScriptAlgorithmProvider.py

示例14: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     SextanteConfig.addSetting(Setting(self.getDescription(), ModelerUtils.MODELS_FOLDER, "Models folder", ModelerUtils.modelsFolder()))
开发者ID:Nald,项目名称:Quantum-GIS,代码行数:5,代码来源:ModelerAlgorithmProvider.py

示例15: initializeSettings

# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import addSetting [as 别名]
 def initializeSettings(self):
     AlgorithmProvider.initializeSettings(self)
     if SextanteUtils.isWindows() or SextanteUtils.isMac():
         SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_FOLDER, "GRASS folder", GrassUtils.grassPath()))
         SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_WIN_SHELL, "Msys folder", GrassUtils.grassWinShell()))
     SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_COMMANDS, "Log execution commands", False))
     SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LOG_CONSOLE, "Log console output", False))
     #SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_AUTO_REGION, "Use min covering region", True))
     SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_LATLON, "Coordinates are lat/lon", False))
     #=======================================================================
     # SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_REGION_XMIN, "GRASS Region min x", 0))
     # SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_REGION_YMIN, "GRASS Region min y", 0))
     # SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_REGION_XMAX, "GRASS Region max x", 1000))
     # SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_REGION_YMAX, "GRASS Region max y", 1000))
     # SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_REGION_CELLSIZE, "GRASS Region cellsize", 100))
     #=======================================================================
     SextanteConfig.addSetting(Setting(self.getDescription(), GrassUtils.GRASS_HELP_FOLDER, "GRASS help folder", GrassUtils.grassHelpPath()))
开发者ID:mokerjoke,项目名称:Quantum-GIS,代码行数:19,代码来源:GrassAlgorithmProvider.py


注:本文中的sextante.core.SextanteConfig.SextanteConfig.addSetting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。