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


Python ScriptEditorDialog.show方法代码示例

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


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

示例1: execute

# 需要导入模块: from processing.script.ScriptEditorDialog import ScriptEditorDialog [as 别名]
# 或者: from processing.script.ScriptEditorDialog.ScriptEditorDialog import show [as 别名]
 def execute(self):
     filePath = ScriptUtils.findAlgorithmSource(self.itemData.name())
     if filePath is not None:
         dlg = ScriptEditorDialog(filePath, iface.mainWindow())
         dlg.show()
     else:
         QMessageBox.warning(None,
                             self.tr("Edit Script"),
                             self.tr("Can not find corresponding script file.")
                             )
开发者ID:dmarteau,项目名称:QGIS,代码行数:12,代码来源:EditScriptAction.py

示例2: execute

# 需要导入模块: from processing.script.ScriptEditorDialog import ScriptEditorDialog [as 别名]
# 或者: from processing.script.ScriptEditorDialog.ScriptEditorDialog import show [as 别名]
    def execute(self):
        settings = QgsSettings()
        lastDir = settings.value('Processing/lastScriptsDir', '')
        filename, selected_filter = QFileDialog.getOpenFileName(self.toolbox,
                                                                self.tr('Open Script', 'AddScriptFromFileAction'), lastDir,
                                                                self.tr('Script files (*.py)', 'AddScriptFromFileAction'))
        if filename:
            settings.setValue('Processing/lastScriptsDir',
                              QFileInfo(filename).absoluteDir().absolutePath())

            dlg = ScriptEditorDialog(filePath=filename)
            dlg.show()
开发者ID:tcoupin,项目名称:QGIS,代码行数:14,代码来源:OpenScriptFromFileAction.py

示例3: execute

# 需要导入模块: from processing.script.ScriptEditorDialog import ScriptEditorDialog [as 别名]
# 或者: from processing.script.ScriptEditorDialog.ScriptEditorDialog import show [as 别名]
    def execute(self):
        dlg = ScriptEditorDialog(None)

        pluginPath = os.path.split(os.path.dirname(__file__))[0]
        templatePath = os.path.join(
            pluginPath, 'script', 'ScriptTemplate.py')

        with codecs.open(templatePath, 'r', encoding='utf-8') as f:
            templateTxt = f.read()
            dlg.editor.setText(templateTxt)

        dlg.show()
开发者ID:vmora,项目名称:QGIS,代码行数:14,代码来源:AddScriptFromTemplateAction.py

示例4: execute

# 需要导入模块: from processing.script.ScriptEditorDialog import ScriptEditorDialog [as 别名]
# 或者: from processing.script.ScriptEditorDialog.ScriptEditorDialog import show [as 别名]
    def execute(self):
        alg = self.itemData
        dlg = ScriptEditorDialog(None)

        dlg.editor.setText('\n'.join(alg.asPythonCode(QgsProcessing.PythonQgsProcessingAlgorithmSubclass, 4)))
        dlg.show()
开发者ID:boundlessgeo,项目名称:QGIS,代码行数:8,代码来源:ExportModelAsPythonScriptAction.py

示例5: execute

# 需要导入模块: from processing.script.ScriptEditorDialog import ScriptEditorDialog [as 别名]
# 或者: from processing.script.ScriptEditorDialog.ScriptEditorDialog import show [as 别名]
 def execute(self):
     dlg = ScriptEditorDialog(None)
     dlg.show()
开发者ID:elpaso,项目名称:QGIS,代码行数:5,代码来源:CreateNewScriptAction.py

示例6: export_as_script_algorithm

# 需要导入模块: from processing.script.ScriptEditorDialog import ScriptEditorDialog [as 别名]
# 或者: from processing.script.ScriptEditorDialog.ScriptEditorDialog import show [as 别名]
    def export_as_script_algorithm(self):
        dlg = ScriptEditorDialog(None)

        dlg.editor.setText('\n'.join(self.model.asPythonCode(QgsProcessing.PythonQgsProcessingAlgorithmSubclass, 4)))
        dlg.show()
开发者ID:dwsilk,项目名称:QGIS,代码行数:7,代码来源:ModelerDialog.py


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