Exemple #1
0
    def unload(self):
        # """Removes the plugin menu item and icon from QGIS GUI."""
        # self.iface.legendInterface().removeLegendLayerAction(
        #     self.dockWidget.inner_control.actionImportQGISProject
        # )
        # self.iface.legendInterface().removeLegendLayerAction(
        #     self.dockWidget.inner_control.actionImportQGISResource
        # )
        # Hack - qgis delete only one action, we have two same actions
        self.iface.legendInterface().removeLegendLayerAction(
            self.dockWidget.inner_control.actionImportQGISResource
        )
        self.iface.legendInterface().removeLegendLayerAction(
            self.dockWidget.inner_control.actionImportQGISResource
        )
        self.iface.legendInterface().removeLegendLayerAction(
            self.dockWidget.inner_control.actionImportUpdateStyle
        )

        for action in self.actions:
            self.iface.removePluginMenu(
                self.tr(u'&NextGIS Connect'),
                action)
            self.iface.removeToolBarIcon(action)

        mw = self.iface.mainWindow()
        PluginSettings.set_dock_area(mw.dockWidgetArea(self.dockWidget))
        PluginSettings.set_dock_floating(self.dockWidget.isFloating())
        PluginSettings.set_dock_pos(self.dockWidget.pos())
        PluginSettings.set_dock_size(self.dockWidget.size())
        PluginSettings.set_dock_visibility(self.dockWidget.isVisible())

        self.iface.removeDockWidget(self.dockWidget)
    def unload(self):
        """Removes the plugin menu item and icon from QGIS GUI."""
        self.iface.legendInterface().removeLegendLayerAction(
            self.dockWidget.inner_control.actionImportQGISProject
        )
        self.iface.legendInterface().removeLegendLayerAction(
            self.dockWidget.inner_control.actionImportQGISResource
        )
        # Hack - qgis delete only one action, we have two same actions
        self.iface.legendInterface().removeLegendLayerAction(
            self.dockWidget.inner_control.actionImportQGISProject
        )
        self.iface.legendInterface().removeLegendLayerAction(
            self.dockWidget.inner_control.actionImportQGISResource
        )

        for action in self.actions:
            self.iface.removePluginMenu(
                self.tr(u'&NextGIS Connect'),
                action)
            self.iface.removeToolBarIcon(action)

        mw = self.iface.mainWindow()
        PluginSettings.set_dock_area(mw.dockWidgetArea(self.dockWidget))
        PluginSettings.set_dock_floating(self.dockWidget.isFloating())
        PluginSettings.set_dock_pos(self.dockWidget.pos())
        PluginSettings.set_dock_size(self.dockWidget.size())
        PluginSettings.set_dock_visibility(self.dockWidget.isVisible())

        self.iface.removeDockWidget(self.dockWidget)
    def unload(self):
        # Remove the plugin menu item and icon
        self.iface.removePluginWebMenu(self.menu_name, self.action_convert)
        self.iface.removePluginWebMenu(self.menu_name, self.action_batch_geocoding)
        self.iface.removePluginWebMenu(self.menu_name, self.action_quick_geocoding)

        self.action_convert = None
        self.action_batch_geocoding = None
        self.action_quick_geocoding = None
        self.toolbar = None

        mw = self.iface.mainWindow()
        PluginSettings.set_dock_area(mw.dockWidgetArea(self.__quick_tlb))
        PluginSettings.set_dock_floating(self.__quick_tlb.isFloating())
        PluginSettings.set_dock_pos(self.__quick_tlb.pos())
        PluginSettings.set_dock_size(self.__quick_tlb.size())
        PluginSettings.set_dock_visibility(self.__quick_tlb.isVisible())
        PluginSettings.set_dock_geocoder_name(self.__quick_tlb.get_active_geocoder_name())

        self.iface.removeDockWidget(self.__quick_tlb)
        del self.__quick_tlb
Exemple #4
0
    def unload(self):
        # Remove the plugin menu item and icon
        self.iface.removePluginWebMenu(self.menu_name, self.action_convert)
        self.iface.removePluginWebMenu(self.menu_name,
                                       self.action_batch_geocoding)
        self.iface.removePluginWebMenu(self.menu_name,
                                       self.action_quick_geocoding)

        self.action_convert = None
        self.action_batch_geocoding = None
        self.action_quick_geocoding = None
        self.toolbar = None

        mw = self.iface.mainWindow()
        PluginSettings.set_dock_area(mw.dockWidgetArea(self.__quick_tlb))
        PluginSettings.set_dock_floating(self.__quick_tlb.isFloating())
        PluginSettings.set_dock_pos(self.__quick_tlb.pos())
        PluginSettings.set_dock_size(self.__quick_tlb.size())
        PluginSettings.set_dock_visibility(self.__quick_tlb.isVisible())
        PluginSettings.set_dock_geocoder_name(
            self.__quick_tlb.get_active_geocoder_name())

        self.iface.removeDockWidget(self.__quick_tlb)
        del self.__quick_tlb