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


Python QgsApplication.processingRegistry方法代码示例

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


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

示例1: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        """Removes the plugin menu item and icon from QGIS GUI."""

        # close dock
        self.pluginIsActive = False
        if self.dockwidget is not None:
            self.dockwidget.close()

        # Remove processing algorithms
        QgsApplication.processingRegistry().removeProvider(self.provider)
        
        
#        self.iface.removePluginMenu(self.pluginName, self.settingsIcon)
#        self.iface.removePluginMenu(self.tr(u'&dzetsaka'),self.actions[0])
        
        for action in self.actions:
            self.iface.removeToolBarIcon(action)
            self.iface.removePluginMenu(
                self.tr(u'&dzetsaka'),
                action)
#
#        # remove the toolbar
#       qg del self.toolbar
    # -------------------------------------------------------------------------- 
开发者ID:nkarasiak,项目名称:dzetsaka,代码行数:26,代码来源:dzetsaka.py

示例2: initGui

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def initGui(self):
        """Create the menu & tool bar items within QGIS"""
        icon = QIcon(os.path.dirname(__file__) + "/icon.png")
        self.kmlAction = QAction(icon, "Import KML/KMZ", self.iface.mainWindow())
        self.kmlAction.triggered.connect(self.showDialog)
        self.kmlAction.setCheckable(False)
        self.iface.addToolBarIcon(self.kmlAction)
        self.iface.addPluginToVectorMenu("KML Tools", self.kmlAction)
        # Expansion of HTML description field
        icon = QIcon(os.path.dirname(__file__) + "/html.png")
        self.htmlDescAction = QAction(icon, "Expand HTML description field", self.iface.mainWindow())
        self.htmlDescAction.triggered.connect(self.htmlDescDialog)
        self.htmlDescAction.setCheckable(False)
        self.iface.addToolBarIcon(self.htmlDescAction)
        self.iface.addPluginToVectorMenu("KML Tools", self.htmlDescAction)
        # Help
        icon = QIcon(os.path.dirname(__file__) + '/help.png')
        self.helpAction = QAction(icon, "Help", self.iface.mainWindow())
        self.helpAction.triggered.connect(self.help)
        self.iface.addPluginToVectorMenu('KML Tools', self.helpAction)

        # Add the processing provider
        QgsApplication.processingRegistry().addProvider(self.provider) 
开发者ID:NationalSecurityAgency,项目名称:qgis-kmltools-plugin,代码行数:25,代码来源:kmltools.py

示例3: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        """
        Removes the plugin menu item and icon from QGIS GUI
        """
        self.guiManager.unload()
        for action in self.actions:
            self.iface.removePluginMenu(
                '&DSGTools',
                action)
            self.iface.removeToolBarIcon(action)
            self.iface.unregisterMainWindowAction(action)

        if self.dsgTools is not None:
            self.menuBar.removeAction(self.dsgTools.menuAction())
        self.iface.mainWindow().removeToolBar(self.toolbar)
        QgsApplication.processingRegistry().removeProvider(self.provider)
        del self.dsgTools
        del self.toolbar 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:20,代码来源:dsg_tools.py

示例4: execute

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def execute(self):
        """
        Called whenever the action is triggered
        """
        reply = QMessageBox.question(None,
                                     self.tr("Delete Script"),
                                     self.tr("Are you sure you want to delete this script?"),
                                     QMessageBox.Yes | QMessageBox.No,
                                     QMessageBox.No)
        if reply == QMessageBox.Yes:
            file_path = self.itemData.description_file
            if file_path is not None:
                os.remove(file_path)
                QgsApplication.processingRegistry().providerById("r").refreshAlgorithms()
            else:
                QMessageBox.warning(None,
                                    self.tr("Delete Script"),
                                    self.tr("Can not find corresponding script file.")) 
开发者ID:north-road,项目名称:qgis-processing-r,代码行数:20,代码来源:delete_script.py

示例5: initGui

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def initGui(self):
        QgsApplication.processingRegistry().addProvider(self.provider) 
开发者ID:dts-ait,项目名称:qgis-edge-bundling,代码行数:4,代码来源:edgebundlingProviderPlugin.py

示例6: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        QgsApplication.processingRegistry().removeProvider(self.provider) 
开发者ID:dts-ait,项目名称:qgis-edge-bundling,代码行数:4,代码来源:edgebundlingProviderPlugin.py

示例7: initGui

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def initGui(self):
        """Create the menu entries and toolbar icons inside the QGIS GUI."""

        QgsApplication.processingRegistry().addProvider(self.provider)

        icon_path = ':/plugins/dzetsaka/img/icon.png'
        self.add_action(
            icon_path,
            text=self.tr(u'welcome message'),
            callback=self.showWelcomeWidget,
            add_to_toolbar=False,
            parent=self.iface.mainWindow())

        icon_path = ':/plugins/dzetsaka/img/icon.png'
        self.add_action(
            icon_path,
            text=self.tr(u'classification dock'),
            callback=self.run,
            parent=self.iface.mainWindow())

        icon_settings_path = ':/plugins/dzetsaka/img/dzetsaka_settings.png'
        self.add_action(
            icon_settings_path,
            text=self.tr(u'settings'),
            callback=self.loadSettings,
            add_to_toolbar=True,
            parent=self.iface.mainWindow())
        
        self.dockIcon = QAction(QIcon(':/plugins/dzetsaka/img/icon.png'), 'dzetsaka classification dock', self.iface.mainWindow())
        self.dockIcon.triggered.connect(self.run)
        self.iface.addToolBarIcon(self.dockIcon)
        self.actions.append(self.dockIcon)
        
        self.settingsIcon = QAction(QIcon(':/plugins/dzetsaka/img/dzetsaka_settings.png'), 'dzetsaka settings', self.iface.mainWindow())
        self.settingsIcon.triggered.connect(self.loadSettings)
        self.iface.addToolBarIcon(self.settingsIcon)
        self.actions.append(self.settingsIcon)
        
    # -------------------------------------------------------------------------- 
开发者ID:nkarasiak,项目名称:dzetsaka,代码行数:41,代码来源:dzetsaka.py

示例8: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        '''Unload LatLonTools from the QGIS interface'''
        self.zoomToDialog.removeMarker()
        self.multiZoomDialog.removeMarkers()
        if self.mapTool:
            self.canvas.unsetMapTool(self.mapTool)
        if self.showMapTool:
            self.canvas.unsetMapTool(self.showMapTool)
        self.iface.removePluginMenu('Lat Lon Tools', self.copyAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.copyCanvasAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.externMapAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.zoomToAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.multiZoomToAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.convertCoordinatesAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.conversionsAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.settingsAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.helpAction)
        self.iface.removePluginMenu('Lat Lon Tools', self.digitizeAction)
        self.iface.removeDockWidget(self.zoomToDialog)
        self.iface.removeDockWidget(self.multiZoomDialog)
        # Remove Toolbar Icons
        self.iface.removeToolBarIcon(self.copyAction)
        self.iface.removeToolBarIcon(self.copyCanvasAction)
        self.iface.removeToolBarIcon(self.zoomToAction)
        self.iface.removeToolBarIcon(self.externMapAction)
        self.iface.removeToolBarIcon(self.multiZoomToAction)
        self.iface.removeToolBarIcon(self.convertCoordinatesAction)
        self.iface.removeToolBarIcon(self.digitizeAction)
        del self.toolbar

        self.zoomToDialog = None
        self.multiZoomDialog = None
        self.settingsDialog = None
        self.showMapTool = None
        self.mapTool = None
        self.digitizerDialog = None
        self.convertCoordinateDialog = None
        QgsApplication.processingRegistry().removeProvider(self.provider) 
开发者ID:NationalSecurityAgency,项目名称:qgis-latlontools-plugin,代码行数:40,代码来源:latLonTools.py

示例9: initGui

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def initGui(self):
        """Create the menu entries and toolbar icons inside the QGIS GUI."""

        QgsApplication.processingRegistry().addProvider(self.provider)
        self.dialog.initGui() 
开发者ID:GIScience,项目名称:orstools-qgis-plugin,代码行数:7,代码来源:ORStoolsPlugin.py

示例10: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        """remove menu entry and toolbar icons"""
        QgsApplication.processingRegistry().removeProvider(self.provider)
        self.dialog.unload() 
开发者ID:GIScience,项目名称:orstools-qgis-plugin,代码行数:6,代码来源:ORStoolsPlugin.py

示例11: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        """Remove the plugin menu item and icon from QGIS GUI."""
        self.iface.removePluginVectorMenu("KML Tools", self.kmlAction)
        self.iface.removePluginVectorMenu("KML Tools", self.htmlDescAction)
        self.iface.removePluginVectorMenu("KML Tools", self.helpAction)
        self.iface.removeToolBarIcon(self.kmlAction)
        self.iface.removeToolBarIcon(self.htmlDescAction)
        QgsApplication.processingRegistry().removeProvider(self.provider) 
开发者ID:NationalSecurityAgency,项目名称:qgis-kmltools-plugin,代码行数:10,代码来源:kmltools.py

示例12: initProcessing

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def initProcessing(self):
        """Create the Processing provider"""
        QgsApplication.processingRegistry().addProvider(self.provider) 
开发者ID:ghtmtt,项目名称:DataPlotly,代码行数:5,代码来源:data_plotly.py

示例13: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        """Removes the plugin menu item and icon from QGIS GUI."""
        self.show_dock_action.deleteLater()
        self.show_dock_action = None
        self.menu.deleteLater()
        self.menu = None
        self.toolbar.deleteLater()
        self.toolbar = None

        # Remove processing provider
        QgsApplication.processingRegistry().removeProvider(self.provider) 
开发者ID:ghtmtt,项目名称:DataPlotly,代码行数:13,代码来源:data_plotly.py

示例14: unload

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def unload(self):
        self.canvas.unsetMapTool(self.azDigitizerTool)
        self.canvas.unsetMapTool(self.lineDigitizerTool)

        # remove from menu
        self.iface.removePluginVectorMenu('Shape Tools', self.createShapesAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.xyLineAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.geodesicDensifyAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.simplifyGeomAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.geodesicLineBreakAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.measureAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.measureLayerAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.transformsAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.digitizeAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.lineDigitizeAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.settingsAction)
        self.iface.removePluginVectorMenu('Shape Tools', self.helpAction)
        # Remove from toolbar
        self.iface.removeToolBarIcon(self.createShapeToolbar)
        self.iface.removeToolBarIcon(self.xyLineAction)
        self.iface.removeToolBarIcon(self.geodesicDensifyAction)
        self.iface.removeToolBarIcon(self.simplifyToolbar)
        self.iface.removeToolBarIcon(self.geodesicLineBreakAction)
        self.iface.removeToolBarIcon(self.measureAction)
        self.iface.removeToolBarIcon(self.measureLayerAction)
        self.iface.removeToolBarIcon(self.transformationsAction)
        self.iface.removeToolBarIcon(self.digitizeAction)
        self.iface.removeToolBarIcon(self.lineDigitizeAction)
        self.iface.removeToolBarIcon(self.tranformToolbar)
        self.azDigitizerTool = None
        self.lineDigitizerTool = None
        # remove the toolbar
        del self.toolbar

        QgsApplication.processingRegistry().removeProvider(self.provider) 
开发者ID:NationalSecurityAgency,项目名称:qgis-shapetools-plugin,代码行数:37,代码来源:shapeTools.py

示例15: initGui

# 需要导入模块: from qgis.core import QgsApplication [as 别名]
# 或者: from qgis.core.QgsApplication import processingRegistry [as 别名]
def initGui(self):
        """
        Create the menu entries and toolbar icons inside the QGIS GUI
        """

        self.dsgTools = QMenu(self.iface.mainWindow())
        self.dsgTools.setObjectName(u'DsgTools')
        self.dsgTools.setTitle(u'DSGTools')
        self.menuBar.insertMenu(self.iface.firstRightStandardMenu().menuAction(), self.dsgTools)
        #GuiManager
        self.guiManager = GuiManager(self.iface, parentMenu = self.dsgTools, toolbar = self.toolbar)
        self.guiManager.initGui()
        #provider
        QgsApplication.processingRegistry().addProvider(self.provider) 
开发者ID:dsgoficial,项目名称:DsgTools,代码行数:16,代码来源:dsg_tools.py


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