From 698b26478a85e60069c59d8761f73e38e483ce6f Mon Sep 17 00:00:00 2001 From: Ismail Sunni Date: Sat, 8 Jul 2023 00:00:28 +0700 Subject: [PATCH] Help button. --- qgis_hub_plugin/gui/resource_browser.py | 16 ++++++++-------- qgis_hub_plugin/metadata.txt | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/qgis_hub_plugin/gui/resource_browser.py b/qgis_hub_plugin/gui/resource_browser.py index f3d6bb1..a67f359 100644 --- a/qgis_hub_plugin/gui/resource_browser.py +++ b/qgis_hub_plugin/gui/resource_browser.py @@ -2,28 +2,24 @@ import platform import tempfile import zipfile +from functools import partial from pathlib import Path -from qgis.core import ( - Qgis, - QgsApplication, - QgsProject, - QgsRasterLayer, - QgsStyle, - QgsVectorLayer, -) +from qgis.core import Qgis, QgsApplication, QgsProject, QgsStyle, QgsVectorLayer from qgis.gui import QgsMessageBar from qgis.PyQt import uic from qgis.PyQt.QtCore import QItemSelectionModel, QRegExp, QSize, Qt, QUrl, pyqtSlot from qgis.PyQt.QtGui import QDesktopServices, QPixmap, QStandardItem, QStandardItemModel from qgis.PyQt.QtWidgets import ( QDialog, + QDialogButtonBox, QFileDialog, QGraphicsPixmapItem, QGraphicsScene, QSizePolicy, ) +from qgis_hub_plugin.__about__ import __uri_homepage__ from qgis_hub_plugin.core.api_client import get_all_resources from qgis_hub_plugin.core.custom_filter_proxy import MultiRoleFilterProxyModel from qgis_hub_plugin.gui.constants import ( @@ -107,6 +103,10 @@ def __init__(self, parent=None, iface=None): self.listViewToolButton.toggled.connect(self.show_list_view) self.iconViewToolButton.toggled.connect(self.show_icon_view) + self.buttonBox.button(QDialogButtonBox.Help).clicked.connect( + partial(QDesktopServices.openUrl, QUrl(__uri_homepage__)) + ) + # Match with the size of the thumbnail self.iconSizeSlider.setMinimum(20) self.iconSizeSlider.setMaximum(128) diff --git a/qgis_hub_plugin/metadata.txt b/qgis_hub_plugin/metadata.txt index 616aecc..69f5e51 100644 --- a/qgis_hub_plugin/metadata.txt +++ b/qgis_hub_plugin/metadata.txt @@ -1,16 +1,16 @@ [general] name=QGIS Hub Plugin -about=A QGIS plugins to fetch resources from the QGIS Hub +about=A QGIS plugin to fetch resources from the QGIS Hub category=Web hasProcessingProvider=no -description=A QGIS plugins to fetch resources from the QGIS Hub +description=A QGIS plugin to fetch resources from the QGIS Hub icon=resources/images/default_icon.png tags=style, model, layer, resource, 3d model, project, hub # credits and contact -author=Ismail Sunni +author=Ismail Sunni, Ronit Jadhav email=imajimatika@gmail.com -homepage=https://github.com/qgis/QGIS-Hub-Plugin +homepage=https://qgis.github.io/QGIS-Hub-Plugin/ repository=https://github.com/qgis/QGIS-Hub-Plugin tracker=https://github.com/qgis/QGIS-Hub-Plugin/issues