From 5cf93803670d8d6680a968f18a0347c10e2bdfba Mon Sep 17 00:00:00 2001 From: Tom LAVEILLE Date: Thu, 26 Sep 2024 16:50:38 +0200 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"CenRa=5FAUTOMAP"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CenRa_AUTOMAP/__init__.py | 10 ++++++++ CenRa_AUTOMAP/about_form.py | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 CenRa_AUTOMAP/__init__.py create mode 100644 CenRa_AUTOMAP/about_form.py diff --git a/CenRa_AUTOMAP/__init__.py b/CenRa_AUTOMAP/__init__.py new file mode 100644 index 00000000..037523af --- /dev/null +++ b/CenRa_AUTOMAP/__init__.py @@ -0,0 +1,10 @@ +__copyright__ = "Copyright 2021, 3Liz" +__license__ = "GPL version 3" +__email__ = "info@3liz.org" + + +# noinspection PyPep8Naming +def classFactory(iface): # pylint: disable=invalid-name + _ = iface + from CenRa_AUTOMAP.CenRa_AutoMap import PgAutoMap + return PgAutoMap() diff --git a/CenRa_AUTOMAP/about_form.py b/CenRa_AUTOMAP/about_form.py new file mode 100644 index 00000000..3d9836b2 --- /dev/null +++ b/CenRa_AUTOMAP/about_form.py @@ -0,0 +1,46 @@ +import os.path + +from pathlib import Path + +from qgis.PyQt import uic +from qgis.PyQt.QtGui import QPixmap +from qgis.PyQt.QtWidgets import QDialog + +from .tools.resources import devlog + +ABOUT_FORM_CLASS, _ = uic.loadUiType( + os.path.join( + str(Path(__file__).resolve().parent), + 'tools/ui', + 'CenRa_AutoMap_about_form.ui' + ) +) + + +class AutoMapAboutDialog(QDialog, ABOUT_FORM_CLASS): + + """ About - Let the user display the about dialog. """ + + def __init__(self, iface, parent=None): + super().__init__(parent) + self.iface = iface + self.setupUi(self) + + self.viewer.setHtml(devlog('CenRa_AUTOMAP')) + + self.rejected.connect(self.onReject) + self.buttonBox.rejected.connect(self.onReject) + self.buttonBox.accepted.connect(self.onAccept) + + def onAccept(self): + """ + Save options when pressing OK button + """ + self.accept() + + def onReject(self): + """ + Run some actions when + the user closes the dialog + """ + self.close() \ No newline at end of file