コード例 #1
0
    def unload(self):
        actions = self.iface.mainWindow().menuBar().actions()
        for action in actions:
            if action.menu().objectName() == 'mPluginMenu':
                menuPlugin = action.menu()
                menuPlugin.removeAction(self.actionRunWizard)
                if utils.isRepositoryInDirectory():
                    menuPlugin.removeAction(self.actionPluginManager)

        removeSettingsMenu('Boundless Connect')
        removeHelpMenu('Boundless Connect')
        removeAboutMenu('Boundless Connect')

        self.dockWidget.hide()

        try:
            from boundlessconnect.tests import testerplugin
            from qgistester.tests import removeTestModule
            removeTestModule(testerplugin, 'Boundless Connect')
        except Exception as e:
            pass

        try:
            from lessons import removeLessonsFolder
            folder = os.path.join(pluginPath, '_lessons')
            removeLessonsFolder(folder)
        except:
            pass
コード例 #2
0
    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
コード例 #3
0
    def unload(self):
        if not self.is_supported():
            return
        # noinspection PyBroadException
        try:
            # noinspection PyPackageRequirements,PyUnresolvedReferences
            from .tests import testerplugin
            # noinspection PyUnresolvedReferences
            from qgistester.tests import removeTestModule
            removeTestModule(testerplugin, self.tr("OS Certificate Store"))
        except:
            pass

        # noinspection PyBroadException
        try:
            # noinspection PyUnresolvedReferences
            from lessons import removeLessonsFolder
            folder = os.path.join(os.path.dirname(__file__), "_lessons")
            removeLessonsFolder(folder)
        except:
            pass

        self.iface.removePluginMenu(self.tr("OS Certificate Store"),
                                    self.action_about)
        self.iface.removePluginMenu(self.tr("OS Certificate Store"),
                                    self.action_setting)
        if self.action_run is not None:
            self.iface.removePluginMenu(self.tr("OS Certificate Store"),
                                        self.action_run)
コード例 #4
0
    def unload(self):
        navigatorInstance.setVisible(False)
        try:
            QgsMapLayerRegistry.instance().layerWasAdded.disconnect(trackLayer)
            QgsMapLayerRegistry.instance().layerRemoved.disconnect(
                layerRemoved)
        except:
            pass
        self.menu.deleteLater()
        self.toolButton.deleteLater()
        layers = list(QgsMapLayerRegistry.instance().mapLayers().values())
        for layer in layers:
            removeLayerActions(layer)
        removeNonexistentTrackedLayers()
        deleteTempFolder()

        try:
            from qgistester.tests import removeTestModule
            from geogig.tests import testplugin
            removeTestModule(testplugin, "GeoGig Light")
        except Exception as e:
            pass

        try:
            from lessons import removeLessonsFolder
            removeLessonsFolder(folder, "geogig")
        except:
            return
コード例 #5
0
    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
コード例 #6
0
    def unload(self):
        try:
            from lessons import removeLessonsFolder
        except:
            return

        removeLessonsFolder(self.folder, "examplelessons")
コード例 #7
0
    def unload(self):
        QgsRendererV2Registry.instance().removeRenderer('MilStd2525Renderer')

        removeHelpMenu("MIL-STD-2525")
        removeAboutMenu("MIL-STD-2525")

        try:
            from milstd2525.tests import testerplugin
            from qgistester.tests import removeTestModule
            removeTestModule(testerplugin, 'MIL-STD-2525')
        except:
            pass

        try:
            from lessons import removeLessonsFolder
            folder = os.path.join(pluginPath, '_lessons')
            removeLessonsFolder(folder)
        except:
            pass
コード例 #8
0
    def unload(self):
        try:
            from .tests import testerplugin
            from qgistester.tests import removeTestModule
            removeTestModule(testerplugin, "[pluginname]")
        except:
            pass

        try:
            from lessons import removeLessonsFolder
            folder = os.path.join(os.path.dirname(__file__), "_lessons")
            removeLessonsFolder(folder)
        except:
            pass

        self.iface.removePluginWebMenu("[pluginname]", self.action)
        self.iface.removeToolBarIcon(self.action)
        removeSettingsMenu("[pluginname]")
        removeAboutMenu("[pluginname]")
        removeHelpMenu("[pluginname]")
コード例 #9
0
    def unload(self):
        try:
            from .tests import testerplugin
            from qgistester.tests import removeTestModule
            removeTestModule(testerplugin, "Data Cube Plugin")
        except:
            pass

        try:
            from lessons import removeLessonsFolder
            folder = os.path.join(os.path.dirname(__file__), "_lessons")
            removeLessonsFolder(folder)
        except:
            pass

        self.iface.removePluginMenu("Data Cube Plugin", self.dataCubeAction)
        self.iface.removePluginMenu("Data Cube Plugin", self.mosaicAction)
        #removeSettingsMenu("Data Cube Plugin")
        removeAboutMenu("Data Cube Plugin")
        removeHelpMenu("Data Cube Plugin")

        removeTempFolder()
コード例 #10
0
    def unload(self):
        # noinspection PyArgumentList
        QgsApplication.rendererRegistry().removeRenderer('MilStd2525Renderer')

        removeHelpMenu("MIL-STD-2525")
        removeAboutMenu("MIL-STD-2525")

        # noinspection PyBroadException
        try:
            from milstd2525.tests import testerplugin
            # noinspection PyUnresolvedReferences
            from qgistester.tests import removeTestModule
            removeTestModule(testerplugin, 'MIL-STD-2525')
        except:
            pass

        # noinspection PyBroadException
        try:
            # noinspection PyUnresolvedReferences
            from lessons import removeLessonsFolder
            folder = os.path.join(os.path.dirname(__file__), '_lessons')
            removeLessonsFolder(folder)
        except:
            pass
コード例 #11
0
    def unload(self):
        navigatorInstance.setVisible(False)
        try:
            QgsMapLayerRegistry.instance().layerWasAdded.disconnect(trackLayer)
            QgsMapLayerRegistry.instance().layerRemoved.disconnect(layerRemoved)
        except:
            pass

        self.menu.deleteLater()
        self.toolButton.deleteLater()

        self.iface.removePluginMenu("&GeoGig", self.explorerAction)
        self.iface.removePluginMenu("&GeoGig", self.toolAction)

        layers = list(QgsMapLayerRegistry.instance().mapLayers().values())
        for layer in layers:
            removeLayerActions(layer)
        removeNonexistentTrackedLayers()
        removeTempFolder()

        try:
            from qgistester.tests import removeTestModule
            from geogig.tests import testplugin
            removeTestModule(testplugin, "GeoGig Light")
        except Exception as e:
            pass

        try:
            from lessons import removeLessonsFolder
            removeLessonsFolder(folder, "geogig")
        except:
            pass

        removeHelpMenu("GeoGig")
        removeAboutMenu("GeoGig")
        removeSettingsMenu("GeoGig")