From 2b44918f19b99055150d60334992ccade7068ac7 Mon Sep 17 00:00:00 2001 From: Samweli Date: Tue, 3 Dec 2024 00:42:01 +0300 Subject: [PATCH 1/2] updated plugin name and icon --- config.json | 6 ++-- resources/icon.svg | 31 +++++++++++++++++++++ resources/resources.qrc | 2 +- src/qgis_gea_plugin/definitions/defaults.py | 2 +- src/qgis_gea_plugin/main.py | 14 +++++----- src/qgis_gea_plugin/ui/main_dockwidget.ui | 4 +-- 6 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 resources/icon.svg diff --git a/config.json b/config.json index 63aae78..daa1011 100644 --- a/config.json +++ b/config.json @@ -1,15 +1,15 @@ { "general": { - "name" : "QGIS GEA afforestation tool", + "name" : "EPAL - Eligible Project Area Locator.", "qgisMinimumVersion": 3.20, "qgisMaximumVersion": 3.99, - "icon": "icon.png", + "icon": "icon.svg", "experimental": false, "deprecated": false, "homepage": "https://github.com/kartoza/qgis-gea-plugin", "tracker": "https://github.com/kartoza/qgis-gea-plugin/issues", "repository": "https://github.com/kartoza/qgis-gea-plugin", - "tags": ["gea", "maps", "afforestation"], + "tags": ["epal", "maps", "afforestation"], "category": ["plugins"], "hasProcessingProvider": "no", "about": "Adds functionality inside QGIS to enable GEA afforestation visualization and analysis.", diff --git a/resources/icon.svg b/resources/icon.svg new file mode 100644 index 0000000..4b8e5c4 --- /dev/null +++ b/resources/icon.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/resources/resources.qrc b/resources/resources.qrc index 94499f0..4455d88 100644 --- a/resources/resources.qrc +++ b/resources/resources.qrc @@ -1,5 +1,5 @@ - icon.png + icon.svg diff --git a/src/qgis_gea_plugin/definitions/defaults.py b/src/qgis_gea_plugin/definitions/defaults.py index 5ef1729..11f551e 100644 --- a/src/qgis_gea_plugin/definitions/defaults.py +++ b/src/qgis_gea_plugin/definitions/defaults.py @@ -3,7 +3,7 @@ Definitions for all defaults settings """ -PLUGIN_ICON = ":/plugins/qgis_gea_plugin/icon.png" +PLUGIN_ICON = ":/plugins/qgis_gea_plugin/icon.svg" ANIMATION_PLAY_ICON = ":/images/themes/default/mActionPlay.svg" ANIMATION_PAUSE_ICON = ":/images/themes/default/temporal_navigation/pause.svg" diff --git a/src/qgis_gea_plugin/main.py b/src/qgis_gea_plugin/main.py index 287ac01..59a1b63 100644 --- a/src/qgis_gea_plugin/main.py +++ b/src/qgis_gea_plugin/main.py @@ -38,10 +38,10 @@ def __init__(self, iface): # Declare instance attributes self.actions = [] - self.menu = self.tr("&QGIS GEA Afforestation tool") + self.menu = self.tr("&EPAL - Eligible Project Area Locator.") self.pluginIsActive = False - self.toolbar = self.iface.addToolBar("Open QGIS GEA Afforestation tool") - self.toolbar.setObjectName("QGIS GEA Afforestation tool") + self.toolbar = self.iface.addToolBar("Open EPAL - Eligible Project Area Locator") + self.toolbar.setObjectName("EPAL - Eligible Project Area Locator.") self.main_widget = QgisGeaPlugin( iface=self.iface, parent=self.iface.mainWindow() @@ -57,7 +57,7 @@ def tr(self, message): :rtype: QString """ # noinspection PyTypeChecker,PyArgumentList,PyCallByClass - return QCoreApplication.translate("QGIS GEA plugin", message) + return QCoreApplication.translate("EPAL - Eligible Project Area Locator", message) def add_action( self, @@ -141,7 +141,7 @@ def add_action( def initGui(self): """Create the menu entries and toolbar icons inside the QGIS GUI.""" - icon_path = ":/plugins/qgis_gea_plugin/icon.png" + icon_path = ":/plugins/qgis_gea_plugin/icon.svg" self.add_action( icon_path, text=self.tr("Open Plugin"), @@ -157,8 +157,8 @@ def unload(self): """Removes the plugin menu item and icon from QGIS GUI.""" try: for action in self.actions: - self.iface.removePluginMenu(self.tr("&QGIS GEA Afforestation tool"), action) - self.iface.removePluginWebMenu(self.tr("&QGIS GEA Afforestation tool"), action) + self.iface.removePluginMenu(self.tr("&EPAL - Eligible Project Area Locator."), action) + self.iface.removePluginWebMenu(self.tr("&EPAL - Eligible Project Area Locator."), action) self.iface.removeToolBarIcon(action) except Exception as e: diff --git a/src/qgis_gea_plugin/ui/main_dockwidget.ui b/src/qgis_gea_plugin/ui/main_dockwidget.ui index f8d7db2..913d6f6 100644 --- a/src/qgis_gea_plugin/ui/main_dockwidget.ui +++ b/src/qgis_gea_plugin/ui/main_dockwidget.ui @@ -7,11 +7,11 @@ 0 0 741 - 716 + 747 - GEA Afforestation tool + EPAL - Eligible Project Area Locator From bcc1e7815bafffaa1e0d60d144f87838717dd532 Mon Sep 17 00:00:00 2001 From: Samweli Date: Tue, 3 Dec 2024 20:53:52 +0300 Subject: [PATCH 2/2] removed remaining GEA names shown to user --- config.json | 2 +- src/qgis_gea_plugin/__init__.py | 2 +- src/qgis_gea_plugin/gui/attribute_form.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index daa1011..02956e9 100644 --- a/config.json +++ b/config.json @@ -12,7 +12,7 @@ "tags": ["epal", "maps", "afforestation"], "category": ["plugins"], "hasProcessingProvider": "no", - "about": "Adds functionality inside QGIS to enable GEA afforestation visualization and analysis.", + "about": "Adds functionality inside QGIS to enable EPAL afforestation visualization and analysis.", "author": "Kartoza", "email": "info@kartoza.com", "description": "View, browse and navigate through imagery.", diff --git a/src/qgis_gea_plugin/__init__.py b/src/qgis_gea_plugin/__init__.py index 4165a31..145b46a 100644 --- a/src/qgis_gea_plugin/__init__.py +++ b/src/qgis_gea_plugin/__init__.py @@ -3,7 +3,7 @@ /*************************************************************************** QgisGea - A QGIS plugin that enables usage of the GEA afforestation data visualization. + A QGIS plugin that enables usage of the EPAL afforestation data visualization. ------------------- begin : 2024-06-27 copyright : (C) 2024 by Kartoza diff --git a/src/qgis_gea_plugin/gui/attribute_form.py b/src/qgis_gea_plugin/gui/attribute_form.py index 411df6e..0259b8e 100644 --- a/src/qgis_gea_plugin/gui/attribute_form.py +++ b/src/qgis_gea_plugin/gui/attribute_form.py @@ -91,7 +91,7 @@ def accept(self): if fields.indexFromName(field) != -1: reply = QtWidgets.QMessageBox.warning( self, - tr("QGIS GEA PLUGIN"), + tr("QGIS EPAL PLUGIN"), tr('Field "{}" already exists in the layer.' 'Do you want to proceed and overwrite it?'). format(field),