def unload(self): ''' Here we put all the actions to be performed when the plugin is unloaded ''' # iface.mapCanvas().unsetMapTool(self.mapTool) '''Remove menus and buttons''' iface.removeToolBarIcon(self.toolAction) iface.removePluginMenu("what3words", self.toolAction) iface.removePluginMenu("what3words", self.zoomToAction) '''Remove qgiscommons menus''' removeSettingsMenu("what3words") removeHelpMenu("what3words") removeAboutMenu("what3words") '''Remove the main plugin widget''' iface.removeDockWidget(self.zoomToDialog) '''Remove processing provider''' if processingOk: Processing.removeProvider(self.provider) '''Remove tests''' try: from what3words.tests import testerplugin from qgistester.tests import removeTestModule removeTestModule(testerplugin, "what3words") except: pass
def unload(self): self.iface.mapCanvas().unsetMapTool(self.mapTool) self.iface.removeDockWidget(self.mgrsDock) self.mgrsDock = None self.iface.removeToolBarIcon(self.toolAction) self.iface.removePluginMenu('MGRS', self.toolAction) self.iface.removePluginMenu('MGRS', self.zoomToAction) removeHelpMenu("MGRS") removeAboutMenu("MGRS") if processingOk: Processing.removeProvider(self.provider) try: from mgrstools.tests import testerplugin from qgistester.tests import removeTestModule removeTestModule(testerplugin, 'MGRS tools') except: pass try: from lessons import removeLessonsFolder folder = os.path.join(pluginPath, '_lessons') removeLessonsFolder(folder) except: pass
def unload(self): self.iface.mapCanvas().unsetMapTool(self.mapTool) self.iface.removeToolBarIcon(self.toolAction) self.iface.removePluginMenu("what3words", self.toolAction) self.iface.removePluginMenu("what3words", self.zoomToAction) removeSettingsMenu("what3words") removeHelpMenu("what3words") removeAboutMenu("what3words") self.iface.removeDockWidget(self.zoomToDialog) if processingOk: Processing.removeProvider(self.provider) try: from what3words.tests import testerplugin from qgistester.tests import removeTestModule removeTestModule(testerplugin, "what3words") except: pass try: from lessons import removeLessonsFolder folder = os.path.join(pluginPath, '_lessons') removeLessonsFolder(folder) except: pass
def unload(self): if self.dock is not None: if self.dock.plot_dock_widget is not None: self.dock.plot_dock_widget.close() self.iface.removeDockWidget(self.dock.plot_dock_widget) self.dock.close() self.iface.removeDockWidget(self.dock) self.menu.removeAction(self.aboutAction) self.menu.removeAction(self.uploadAction) if not self.crayfishLibFound: self.iface.pluginMenu().removeAction(self.menu.menuAction()) return self.iface.legendInterface().removeLegendLayerAction( self.actionExportGrid) self.iface.legendInterface().removeLegendLayerAction( self.actionExportContours) self.iface.legendInterface().removeLegendLayerAction(self.uploadAction) self.iface.legendInterface().removeLegendLayerAction( self.actionExportAnimation) # Remove the plugin menu item and icon layerTB = self.iface.layerToolBar() layerTB.removeAction(self.action) # Remove menu item self.menu.removeAction(self.action) self.menu.removeAction(self.actionExportGrid) self.menu.removeAction(self.actionExportContours) self.menu.removeAction(self.actionExportAnimation) self.iface.pluginMenu().removeAction(self.menu.menuAction()) # Unregister plugin layer type QgsPluginLayerRegistry.instance().removePluginLayerType( CrayfishPluginLayer.LAYER_TYPE) # Unregister data item provider if self.dataItemsProvider is not None: QgsDataItemProviderRegistry.instance().removeProvider( self.dataItemsProvider) self.dataItemsProvider = None # Make connections QObject.disconnect(self.lr, SIGNAL("layersWillBeRemoved(QStringList)"), self.layersRemoved) QObject.disconnect(self.lr, SIGNAL("layerWillBeRemoved(QString)"), self.layerRemoved) QObject.disconnect(self.lr, SIGNAL("layerWasAdded(QgsMapLayer*)"), self.layerWasAdded) # Remove processing integration try: from processing.core.Processing import Processing Processing.removeProvider(self.processing_provider) except ImportError: pass self.processing_provider = None
def unload(self): """ Remove the plugin menu item and icon """ self.iface.removePluginVectorMenu(u"&Atmospheric Correction", self.action) self.iface.removeToolBarIcon(self.action) Processing.removeProvider(self.provider) Processing.removeProvider(self.provider)
def unload(self): self.iface.removePluginWebMenu(u'&QuickOSM', self.mainWindowAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.myQueriesAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.queryAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.quickQueryAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.osmFileAction) self.iface.removeToolBarIcon(self.mainWindowAction) Processing.removeProvider(self.provider)
def unload(self): pem.removePkiTempFiles(self.explorer.catalogs()) self.explorer.deleteLater() self.iface.removePluginWebMenu(u"GeoServer", self.explorerAction) self.iface.removePluginWebMenu(u"GeoServer", self.configAction) self.iface.removePluginWebMenu(u"GeoServer", self.helpAction) Processing.removeProvider(self.provider) layerwatcher.disconnectLayerWasAdded()
def unload(self): pem.removePkiTempFiles(self.explorer.catalogs()) self.explorer.deleteLater() self.iface.removePluginWebMenu(u"GeoServer", self.explorerAction) self.iface.removePluginWebMenu(u"GeoServer", self.configAction) self.iface.removePluginWebMenu(u"GeoServer", self.helpAction) Processing.removeProvider(self.provider) layerwatcher.disconnectLayerWasAdded()
def unload(self): self.iface.removePluginWebMenu(u'&QuickOSM', self.mainWindowAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.myQueriesAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.queryAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.quickQueryAction) self.iface.removePluginWebMenu(u'&QuickOSM', self.osmFileAction) self.iface.removeToolBarIcon(self.mainWindowAction) Processing.removeProvider(self.provider)
def unload(self): """Removes the plugin menu item and icon from QGIS GUI.""" for action in self.actions: self.iface.removePluginMenu(self.tr(u'&PostTelemac'), action) self.toolbar.removeAction(action) # remove the toolbar if len(self.toolbar.actions()) == 0: del self.toolbar if DOPROCESSING: Processing.removeProvider(self.provider)
def unload(self): self.iface.mapCanvas().unsetMapTool(self.mapTool) self.iface.removeToolBarIcon(self.toolAction) self.iface.removePluginMenu("what3words", self.toolAction) self.iface.removePluginMenu("what3words", self.zoomToAction) self.iface.removePluginMenu("what3words", self.apikeyAction) self.iface.removeDockWidget(self.zoomToDialog) if processingOk: Processing.removeProvider(self.provider)
def unload(self): """Removes the plugin menu item and icon from QGIS GUI.""" for action in self.actions: self.iface.removePluginVectorMenu( self.tr(u'&An Urban Planners Network Analysis Tools'), action) self.iface.removeToolBarIcon(action) # remove the toolbar del self.toolbar Processing.removeProvider(self.provider)
def unload(self): self.iface.mapCanvas().unsetMapTool(self.mapTool) self.iface.removeToolBarIcon(self.toolAction) self.iface.removePluginMenu("what3words", self.toolAction) self.iface.removePluginMenu("what3words", self.zoomToAction) self.iface.removePluginMenu("what3words", self.apikeyAction) self.iface.removeDockWidget(self.zoomToDialog) if processingOk: Processing.removeProvider(self.provider)
def unload(self): """Removes the plugin menu item and icon from QGIS GUI.""" for action in self.actions: self.iface.removePluginMenu(self.tr(u'&QFieldSync'), action) self.iface.removeToolBarIcon(action) # remove the toolbar del self.toolbar Processing.removeProvider(self.processing_provider) self.processing_provider = None
def unload(self): """Removes the plugin menu item and icon from QGIS GUI.""" for action in self.actions: self.iface.removePluginMenu( self.tr(u'&PostTelemac'), action) self.toolbar.removeAction(action) # remove the toolbar if len(self.toolbar.actions()) == 0 : del self.toolbar if DOPROCESSING : Processing.removeProvider(self.provider)
def unload(self): pem.removePkiTempFiles(self.explorer.catalogs()) self.explorer.deleteLater() self.iface.removePluginWebMenu(u"GeoServer", self.explorerAction) self.iface.removePluginWebMenu(u"GeoServer", self.configAction) self.iface.removePluginWebMenu(u"GeoServer", self.helpAction) if processingOk: Processing.removeProvider(self.provider) layerwatcher.disconnectLayerWasAdded() try: from qgistester.tests import removeTestModule from geoserverexplorer.test import testplugin from geoserverexplorer.test import testpkiplugin removeTestModule(testplugin, "GeoServer") removeTestModule(testpkiplugin, "PKI GeoServer") except Exception as ex: pass
def unload(self): if hasattr(self.iface, "addPluginToWebMenu"): self.iface.removePluginWebMenu("WPS-Client", self.action) self.iface.removePluginWebMenu("WPS-Client", self.actionAbout) else: self.iface.removePluginToMenu("WPS", self.action) self.iface.removePluginToMenu("WPS", self.actionAbout) self.iface.removeToolBarIcon(self.action) if self.myDockWidget: self.myDockWidget.close() self.myDockWidget = None if self.provider: Processing.removeProvider(self.provider)
def unload(self): pem.removePkiTempFiles(self.explorer.catalogs()) self.explorer.deleteLater() self.iface.removePluginWebMenu(u"GeoServer", self.explorerAction) self.iface.removePluginWebMenu(u"GeoServer", self.configAction) self.iface.removePluginWebMenu(u"GeoServer", self.helpAction) if processingOk: Processing.removeProvider(self.provider) layerwatcher.disconnectLayerWasAdded() try: from qgistester.tests import removeTestModule from geoserverexplorer.test import testplugin from geoserverexplorer.test import testpkiplugin removeTestModule(testplugin, "GeoServer") removeTestModule(testpkiplugin, "PKI GeoServer") except Exception as ex: pass
def unload(self): # remove from menu self.iface.removePluginVectorMenu(u'Shape Tools', self.shapeAction) self.iface.removePluginVectorMenu(u'Shape Tools', self.xyLineAction) self.iface.removePluginVectorMenu(u'Shape Tools', self.geodesicDensifyAction) self.iface.removePluginVectorMenu(u'Shape Tools', self.measureAction) self.iface.removePluginVectorMenu(u'Shape Tools', self.settingsAction) self.iface.removePluginVectorMenu(u'Shape Tools', self.helpAction) # Remove from toolbar self.iface.removeToolBarIcon(self.shapeAction) self.iface.removeToolBarIcon(self.xyLineAction) self.iface.removeToolBarIcon(self.geodesicDensifyAction) self.iface.removeToolBarIcon(self.measureAction) # remove the toolbar del self.toolbar if processingOk: Processing.removeProvider(self.provider)
def unload(self): """Removes the plugin menu item and icon from QGIS GUI.""" #print "** UNLOAD dzetsaka" """ for action in self.actions: self.iface.removePluginRasterMenu( self.tr(u'&dzetsaka : Classification tool'), action) self.iface.removeToolBarIcon(action) # remove the toolbar del self.toolbar """ self.menu.deleteLater() self.dockwidget.deleteLater() # remove from processing Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.spatialiteAlgorithmProvider) Processing.removeProvider(self.epanetAlgoProvider) # Remove the plugin menu item and icon for a in self.actions: self.iface.removeToolBarIcon(a)
def unload(self): if processing_installed: Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.provider) # remove the plugin menu item and icon self.iface.removePluginMenu("&SQUAD", self.action) self.iface.removeToolBarIcon(self.action)
def unload(self): self.plugin_menu.removeAction(self.main_action) Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.provider) self.iface.removePluginMenu("&Dirno scripts", self.profilAction)
def unload(self): self.iface.removePluginVectorMenu(u"&Blurring", self.action) self.iface.removeToolBarIcon(self.action) Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.provider)
def unload(self): pem.removePkiTempFiles(self.explorer.catalogs()) self.explorer.deleteLater() Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.epanetAlgoProvider) # Remove the plugin menu item and icon for a in self.actions: self.iface.removeToolBarIcon(a)
def unload(self): self.iface.removePluginVectorMenu('&Conefor inputs', self.action) self.iface.removeVectorToolBarIcon(self.action) Processing.removeProvider(self.processing_provider)
def unload(self): Processing.removeAlgListListener(self.algListener) Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.provider) self.iface.removePluginWebMenu(u"&qgis2web", self.action) self.iface.removeToolBarIcon(self.action)
def unload(self): self.plugin_menu.removeAction(self.main_action) Processing.removeProvider(self.provider)
def unload(self): Processing.removeProvider(self.provider) # Remove the plugin menu item and icon self.iface.removePluginMenu(u"&Interlis", self.action) self.iface.removeToolBarIcon(self.action)