Compare commits

...
65 Commits
Author SHA1 Message Date
tlaveille 4e6fde2f3e test 2026-09-11 12:19:09 +02:00
tlaveille af7aafc29a maj 1.45 2026-09-04 16:11:11 +02:00
tlaveille c077e576a2 maj 1.45 2026-08-31 14:54:31 +02:00
tlaveille 40dc397ed7 Ajout de guillemets doubles pour prendre en compte les noms de colonne ambigus, à la création d'atlas avec des labels dynamiques. 2026-08-31 14:52:28 +02:00
tlaveille ffa2128434 maj 1.44 + logo life dombes 2026-07-09 16:08:19 +02:00
tlaveille fbdc653c9b n2000 logo maj size 2026-06-30 12:00:49 +02:00
tlaveille a4e96b8491 maj 1.43 2026-05-22 15:48:48 +02:00
tlaveille e23b9e80c0 Option authentification pour table avec droits particuliers. 2026-05-22 15:05:31 +02:00
tlaveille 5fd101543e maj 1.42 2026-05-21 09:08:12 +02:00
tlaveille def79fdaa9 Performance optimisée hors connexion 2026-05-21 08:36:37 +02:00
tlaveille eae3a80f31 maj 1.41 2026-05-04 11:57:50 +02:00
tlaveille 61ed7b286a delete n2000 old logo 2026-05-04 11:27:25 +02:00
tlaveille 4a3d0a38c3 rollback 2026-04-22 12:11:34 +02:00
tlaveille 1185a7313d test 2026-04-22 12:11:07 +02:00
tlaveille d844b9d416 add ok/close to change log 2026-03-27 13:56:27 +01:00
tlaveille 5200a3b3c2 maj 1.40 2026-03-23 11:33:59 +01:00
tlaveille 8c8068b330 Désactivation qu'en hors connexion pour accélérer QGIS. 2026-03-23 11:30:41 +01:00
tlaveille 8a1e7e6d70 fix bug entre q4 et les logo/icon 2026-03-20 11:47:02 +01:00
tlaveille 2765093f1d 100% flake8 compatible 2026-03-19 08:59:07 +01:00
tlaveille 614195fbaf maj all plugin qgis 4.0 2026-03-12 16:12:00 +01:00
tlaveille ebeefb78b9 qgisMaximumVersion = 4.99 2026-03-12 09:06:45 +01:00
tlaveille 256a0ac6d4 maj flux 3.20 2026-03-05 11:42:17 +01:00
tlaveille af10bce94c nom de la variable XML 2026-03-05 11:34:24 +01:00
tlaveille 8c55d902c0 lecture des description dans un tooltip 2026-03-05 10:09:58 +01:00
tlaveille 5a03084daa ouverture des couche flage 00 2026-02-26 15:14:49 +01:00
tlaveille a3b634d514 maj flux 3.19 2026-02-26 14:22:25 +01:00
tlaveille 728f72cffd visualisation des droit des vue et vue materialiser 2026-02-26 11:59:33 +01:00
tlaveille 272b47a174 maj flux 3.18 2026-02-25 11:26:50 +01:00
tlaveille 21a652fdb2 filtre par localisation bug fix 2026-02-25 11:13:35 +01:00
tlaveille 799a635edc mise à jour et ajoue de tool tip. 2026-02-13 15:10:07 +01:00
tlaveille ff2e0f22be commant 2026-02-12 11:41:59 +01:00
tlaveille 8c1ee42080 kill des connection postgresql 2026-02-12 11:05:14 +01:00
tlaveille a3479085b6 system de favorit 2026-02-12 10:04:28 +01:00
tlaveille 1b54026a13 system de favorit 2026-02-11 14:15:22 +01:00
tlaveille 670c698b77 Fix de bug et optimisation d'exécution. 2026-02-10 10:17:45 +01:00
tlaveille 9b438f5bf1 repaire git flux 2026-01-14 14:05:14 +01:00
tlaveille 02681490f6 Repaire 2026-01-09 11:16:56 +01:00
tlaveille 4b8bc74386 test de push 2026-01-09 10:25:55 +01:00
tlaveille 9a85e9aaae test maj new pc 2026-01-09 10:19:23 +01:00
tlaveille 910ba14dc9 test maj new pc 2026-01-09 10:07:07 +01:00
tlaveille d9f27eaa0f maj 2025-12-18 15:49:14 +01:00
tlaveille 2842526605 nouvelle image 2025-12-18 15:40:03 +01:00
tlaveille ec677ffc5a v2 n2000 A3 + comparaison 2025-12-17 10:20:32 +01:00
tlaveille 3c9a6a8b88 v2 n2000 landscape simple 2025-12-16 17:25:27 +01:00
tlaveille 06321e4e26 check droit user sigdb only to check all db 2025-12-15 16:05:12 +01:00
tlaveille 83e22782f7 maj n2000 landscape 2025-12-15 15:03:34 +01:00
tlaveille 43acfca13b n2000 landscape 2025-12-15 14:29:31 +01:00
tlaveille 102fd30686 MAJ 2025-12-15 12:00:16 +01:00
tlaveille b3186f6e16 nouvelle mise en page pour n2000 v2 2025-12-15 11:49:42 +01:00
tlaveille 8e93f7051a loading parametre for old file 2025-12-12 17:04:52 +01:00
tlaveille b893764961 flake8 + parametrage suplementaire 2025-12-12 16:02:56 +01:00
tlaveille 4051a6855b mise en page pour N2000 2025-12-12 12:14:17 +01:00
tlaveille 42f33f619c Verification nom de couche dans DB 2025-12-09 17:04:20 +01:00
tlaveille e4725c4ece Merge branch 'main' of ssh://gitea.cenra-outils.org:2222/CEN-RA/Plugin_QGIS 2025-12-09 10:40:03 +01:00
tlaveille 28ee42d3ea fusion 2025-12-09 10:38:43 +01:00
tlaveille 2d2337057f maj 2025-12-08 17:13:56 +01:00
tlaveille ce6f30ea2c message d'erreur pour les droits 2025-12-08 17:12:24 +01:00
tlaveille d50f601bd9 Show psql grands 2025-12-08 11:59:04 +01:00
tlaveille 26678fb257 clean 2025-12-01 15:51:40 +01:00
tlaveille cef46278bc correctif mineur 2025-09-25 13:50:17 +02:00
tlaveille f34842bfac utf-8 fix 2025-09-05 10:03:50 +02:00
tlaveille 897ed3ae58 v1.14 2025-09-05 10:00:03 +02:00
tlaveille 2236123050 Open QGIS project from psql 2025-09-05 09:52:59 +02:00
tlaveille 9ad5baa4ed MAJ 2025-07-30 10:18:44 +02:00
tlaveille 36de24532a flake8 and Qt6 fix 2025-07-30 09:57:09 +02:00
50 changed files with 2206 additions and 1424 deletions
+11 -7
View File
@@ -4,7 +4,8 @@ __email__ = "info@3liz.org"
from qgis.core import QgsApplication from qgis.core import QgsApplication
from qgis.PyQt.QtCore import Qt, QUrl from qgis.PyQt.QtCore import QUrl
# from qgis.PyQt.QtCore import Qt
from qgis.PyQt.QtGui import QDesktopServices, QIcon from qgis.PyQt.QtGui import QDesktopServices, QIcon
from qgis.PyQt.QtWidgets import QAction from qgis.PyQt.QtWidgets import QAction
from qgis.utils import iface from qgis.utils import iface
@@ -34,8 +35,11 @@ from .tools.resources import (
) )
pyperclip() pyperclip()
from .canvas_editor import AutoMap_Editor try:
from .style_invoke import AutoMap_Style from .canvas_editor import AutoMap_Editor
# from .style_invoke import AutoMap_Style
except NameError:
print('404')
class PgAutoMap: class PgAutoMap:
@@ -82,11 +86,11 @@ class PgAutoMap:
self.toolBar.addAction(self.automap_action) self.toolBar.addAction(self.automap_action)
self.automap_action.triggered.connect(self.open_editor) self.automap_action.triggered.connect(self.open_editor)
if not self.style_dock: # if not self.style_dock:
self.style_dock = AutoMap_Style() # self.style_dock = AutoMap_Style()
if os.environ['USERNAME'] == 'tlaveille' or os.environ['USERNAME'] == 'lpoulin' or os.environ['USERNAME'] == 'rclement': # if os.environ['USERNAME'] == 'tlaveille' or os.environ['USERNAME'] == 'lpoulin' or os.environ['USERNAME'] == 'rclement':
iface.addDockWidget(Qt.DockWidgetArea(0x1), self.style_dock) # iface.addDockWidget(Qt.DockWidgetArea(0x1), self.style_dock)
def open_about_dialog(self): def open_about_dialog(self):
""" """
+39 -17
View File
@@ -14,6 +14,7 @@ from qgis.core import (
QgsLayoutItemLabel, QgsLayoutItemLabel,
QgsLayoutItemPicture, QgsLayoutItemPicture,
QgsLayoutItemLegend, QgsLayoutItemLegend,
QgsLayoutItem,
QgsLegendStyle, QgsLegendStyle,
QgsLayoutItemScaleBar, QgsLayoutItemScaleBar,
QgsLayerTreeGroup, QgsLayerTreeGroup,
@@ -116,15 +117,19 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
'Carte_size': None, 'Carte_size': None,
'Carte_locals': None, 'Carte_locals': None,
'Carte_rotate': None, 'Carte_rotate': None,
'Carte_frame': None,
'Carte_2_size': None, 'Carte_2_size': None,
'Carte_2_locals': None, 'Carte_2_locals': None,
'Carte_2_rotate': None, 'Carte_2_rotate': None,
'Legande_size': None, 'Legande_size': None,
'Legande_locals': None, 'Legande_locals': None,
'Legande_rotate': None, 'Legande_rotate': None,
'Legande_frame': None,
'Arrow_size': None, 'Arrow_size': None,
'Arrow_locals': None, 'Arrow_locals': None,
'Arrow_rotate': None, 'Arrow_rotate': None,
'Arrow_background': None,
'Arrow_path': None,
'Echelle_size': None, 'Echelle_size': None,
'Echelle_locals': None, 'Echelle_locals': None,
'Echelle_rotate': None, 'Echelle_rotate': None,
@@ -140,9 +145,11 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
'Credit_size': None, 'Credit_size': None,
'Credit_locals': None, 'Credit_locals': None,
'Credit_rotate': None, 'Credit_rotate': None,
'Credit_alignment': None,
'Source_size': None, 'Source_size': None,
'Source_locals': None, 'Source_locals': None,
'Source_rotate': None, 'Source_rotate': None,
'Source_alignment': None,
'Logo_2_size': None, 'Logo_2_size': None,
'Logo_2_locals': None, 'Logo_2_locals': None,
'Logo_2_rotate': None, 'Logo_2_rotate': None,
@@ -459,7 +466,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.map_modele_test.setExtent(iface.mapCanvas().extent()) self.map_modele_test.setExtent(iface.mapCanvas().extent())
# Position de la carte dans le composeur # Position de la carte dans le composeur
self.map_modele_test.setItemRotation(self.template_parameters['Carte_rotate']) self.map_modele_test.setMapRotation(self.template_parameters['Carte_rotate'])
self.map_modele_test.attemptResize(self.template_parameters['Carte_size']) self.map_modele_test.attemptResize(self.template_parameters['Carte_size'])
self.map_modele_test.attemptMove(self.template_parameters['Carte_locals']) self.map_modele_test.attemptMove(self.template_parameters['Carte_locals'])
# on dimensionne le rendu de la carte (pour référence la page totale est une page A4 donc 297*210) # on dimensionne le rendu de la carte (pour référence la page totale est une page A4 donc 297*210)
@@ -473,7 +480,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
if self.radioButton_12.isChecked() == 1: if self.radioButton_12.isChecked() == 1:
self.position_map = QgsLayoutItemMap(self.layout) self.position_map = QgsLayoutItemMap(self.layout)
self.position_map.setRect(20, 20, 20, 20) self.position_map.setRect(20, 20, 20, 20)
self.position_map.setExtent(QgsRectangle(641552, 6647386, 995856, 6331104)) self.position_map.setExtent(QgsRectangle(618704, 6329245, 1018704, 6649245))
# self.position_map.setExtent(QgsRectangle(641552, 6647386, 995856, 6331104))
self.position_map.setFollowVisibilityPreset(True) self.position_map.setFollowVisibilityPreset(True)
self.position_map.setFollowVisibilityPresetName(self.comboBox_6.currentText()) self.position_map.setFollowVisibilityPresetName(self.comboBox_6.currentText())
self.position_map.setItemRotation(self.template_parameters['Carte_2_rotate']) self.position_map.setItemRotation(self.template_parameters['Carte_2_rotate'])
@@ -487,13 +495,14 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
# overviewitem.addOverview(map_overview) # overviewitem.addOverview(map_overview)
self.position_map.refresh() self.position_map.refresh()
self.map_modele_test.setFrameEnabled(True) self.map_modele_test.setFrameEnabled(self.template_parameters['Carte_frame'])
self.position_map.setFrameEnabled(self.template_parameters['Carte_2_frame'])
self.layout.addLayoutItem(self.position_map) self.layout.addLayoutItem(self.position_map)
self.position_map.setId("Carte_locals") self.position_map.setId("Carte_locals")
self.map_modele_test.refresh() self.map_modele_test.refresh()
self.map_modele_test.setBackgroundColor(QColor(255, 255, 255, 255)) self.map_modele_test.setBackgroundColor(QColor(255, 255, 255, 255))
self.map_modele_test.setFrameEnabled(True) self.map_modele_test.setFrameEnabled(self.template_parameters['Carte_frame'])
if self.radioButton_9.isChecked() == 1: if self.radioButton_9.isChecked() == 1:
self.map_modele_test.setAtlasDriven(True) self.map_modele_test.setAtlasDriven(True)
self.layout.addLayoutItem(self.map_modele_test) self.layout.addLayoutItem(self.map_modele_test)
@@ -504,7 +513,9 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.layout.addLayoutItem(title) self.layout.addLayoutItem(title)
titre = titre_layout_name titre = titre_layout_name
title.setText(titre) title.setText(titre)
title.setFont(QFont("Calibri", 15, False)) Font = QFont("Calibri", 15, False)
Font.setBold(True)
title.setFont(Font)
title.setItemRotation(self.template_parameters['Titre_rotate']) title.setItemRotation(self.template_parameters['Titre_rotate'])
title.attemptResize(self.template_parameters['Titre_size']) title.attemptResize(self.template_parameters['Titre_size'])
title.attemptMove(self.template_parameters['Titre_locals']) title.attemptMove(self.template_parameters['Titre_locals'])
@@ -521,7 +532,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.layout.addLayoutItem(subtitle) self.layout.addLayoutItem(subtitle)
titre = self.lineEdit_3.text() titre = self.lineEdit_3.text()
if self.radioButton_9.isChecked() == 1: if self.radioButton_9.isChecked() == 1:
titre = titre + ' [%' + self.comboBox_4.currentText() + '%]' titre = titre + ' [%"' + self.comboBox_4.currentText() + '"%]'
subtitle.setText(titre) subtitle.setText(titre)
subtitle.setFont(QFont("Calibri", 10)) subtitle.setFont(QFont("Calibri", 10))
subtitle.setItemRotation(self.template_parameters['Sous_titre_rotate']) subtitle.setItemRotation(self.template_parameters['Sous_titre_rotate'])
@@ -537,6 +548,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
# Ajout du logo CEN NA en haut à gauche de la page # Ajout du logo CEN NA en haut à gauche de la page
logo = QgsLayoutItemPicture(self.layout) logo = QgsLayoutItemPicture(self.layout)
logo.setResizeMode(QgsLayoutItemPicture.Zoom) logo.setResizeMode(QgsLayoutItemPicture.Zoom)
logo.setPictureAnchor(QgsLayoutItem.ReferencePoint(4))
logo.setMode(QgsLayoutItemPicture.FormatRaster) logo.setMode(QgsLayoutItemPicture.FormatRaster)
logo.setItemRotation(self.template_parameters['Logo_rotate']) logo.setItemRotation(self.template_parameters['Logo_rotate'])
logo.setFixedSize(self.template_parameters['Logo_size']) logo.setFixedSize(self.template_parameters['Logo_size'])
@@ -551,7 +563,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
legend.setId('legende_model1') legend.setId('legende_model1')
# legend.setTitle('Legende') # legend.setTitle('Legende')
legend.adjustBoxSize() legend.adjustBoxSize()
legend.setFrameEnabled(False) legend.setFrameEnabled(self.template_parameters['Legande_frame'])
legend.setAutoUpdateModel(False) legend.setAutoUpdateModel(False)
legend.setLinkedMap(self.map_modele_test) legend.setLinkedMap(self.map_modele_test)
@@ -608,6 +620,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
legend.rstyle(QgsLegendStyle.Group).setMargin(QgsLegendStyle.Top, 3) legend.rstyle(QgsLegendStyle.Group).setMargin(QgsLegendStyle.Top, 3)
legend.rstyle(QgsLegendStyle.Subgroup).setMargin(QgsLegendStyle.Top, 3) legend.rstyle(QgsLegendStyle.Subgroup).setMargin(QgsLegendStyle.Top, 3)
legend.setColumnCount(self.spinBox.value()) legend.setColumnCount(self.spinBox.value())
legend.setItemRotation(self.template_parameters['Legande_rotate'])
legend.adjustBoxSize() legend.adjustBoxSize()
legend.setBackgroundEnabled(True) legend.setBackgroundEnabled(True)
@@ -628,9 +641,9 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.scalebarnumeric_qpt.setNumberOfSegmentsLeft(0) self.scalebarnumeric_qpt.setNumberOfSegmentsLeft(0)
self.scalebarnumeric_qpt.setFont(QFont("Calibri", 12)) self.scalebarnumeric_qpt.setFont(QFont("Calibri", 12))
self.scalebarnumeric_qpt.setItemRotation(self.template_parameters['Echelle_rotate'])
self.scalebarnumeric_qpt.attemptMove(self.template_parameters['Echelle_locals']) self.scalebarnumeric_qpt.attemptMove(self.template_parameters['Echelle_locals'])
self.scalebarnumeric_qpt.attemptResize(self.template_parameters['Echelle_size']) self.scalebarnumeric_qpt.attemptResize(self.template_parameters['Echelle_size'])
self.scalebarnumeric_qpt.setItemRotation(self.template_parameters['Echelle_rotate'])
self.scalebarnumeric_qpt.setAlignment(QgsScaleBarSettings.Alignment(1)) self.scalebarnumeric_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
self.scalebarnumeric_qpt.setBackgroundEnabled(True) self.scalebarnumeric_qpt.setBackgroundEnabled(True)
self.scalebarnumeric_qpt.setBackgroundColor(QColor(255, 255, 255, 130)) self.scalebarnumeric_qpt.setBackgroundColor(QColor(255, 255, 255, 130))
@@ -641,6 +654,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.scalebar_qpt = QgsLayoutItemScaleBar(self.layout) self.scalebar_qpt = QgsLayoutItemScaleBar(self.layout)
self.scalebar_qpt.setStyle('Single Box') self.scalebar_qpt.setStyle('Single Box')
self.scalebar_qpt.setLinkedMap(self.map_modele_test) self.scalebar_qpt.setLinkedMap(self.map_modele_test)
self.scalebar_qpt.setFillColor(QColor(144, 144, 144, 255))
self.scalebar_qpt.applyDefaultSize() self.scalebar_qpt.applyDefaultSize()
self.scalebar_qpt.applyDefaultSettings() self.scalebar_qpt.applyDefaultSettings()
@@ -648,9 +662,9 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.scalebar_qpt.setNumberOfSegmentsLeft(0) self.scalebar_qpt.setNumberOfSegmentsLeft(0)
self.scalebar_qpt.setFont(QFont("Calibri", 12)) self.scalebar_qpt.setFont(QFont("Calibri", 12))
self.scalebar_qpt.setItemRotation(self.template_parameters['Echelle_2_rotate'])
self.scalebar_qpt.attemptMove(self.template_parameters['Echelle_2_locals']) self.scalebar_qpt.attemptMove(self.template_parameters['Echelle_2_locals'])
self.scalebar_qpt.attemptResize(self.template_parameters['Echelle_2_size']) self.scalebar_qpt.attemptResize(self.template_parameters['Echelle_2_size'])
self.scalebar_qpt.setItemRotation(self.template_parameters['Echelle_2_rotate'])
self.scalebar_qpt.setAlignment(QgsScaleBarSettings.Alignment(1)) self.scalebar_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
self.scalebar_qpt.setBackgroundEnabled(True) self.scalebar_qpt.setBackgroundEnabled(True)
self.scalebar_qpt.setBackgroundColor(QColor(255, 255, 255, 130)) self.scalebar_qpt.setBackgroundColor(QColor(255, 255, 255, 130))
@@ -660,12 +674,16 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
# ajout de la fleche du Nord # ajout de la fleche du Nord
north = QgsLayoutItemPicture(self.layout) north = QgsLayoutItemPicture(self.layout)
north.setPicturePath(resources_path("mises_en_pages", "NorthArrow_02.svg")) north.setPicturePath(resources_path("mises_en_pages", self.template_parameters['Arrow_path']))
north.setLinkedMap(self.map_modele_test)
self.layout.addLayoutItem(north) self.layout.addLayoutItem(north)
north.setPictureAnchor(QgsLayoutItem.ReferencePoint(4))
north.setItemRotation(self.template_parameters['Arrow_rotate'])
north.attemptMove(self.template_parameters['Arrow_locals']) north.attemptMove(self.template_parameters['Arrow_locals'])
north.attemptResize(self.template_parameters['Arrow_size']) north.attemptResize(self.template_parameters['Arrow_size'])
north.setItemRotation(self.template_parameters['Arrow_rotate']) north.setSvgStrokeColor(QColor(255, 255, 255, 255))
north.setBackgroundEnabled(True) north.setSvgFillColor(QColor(76, 76, 76, 255))
north.setBackgroundEnabled(self.template_parameters['Arrow_background'])
north.setBackgroundColor(QColor(255, 255, 255, 130)) north.setBackgroundColor(QColor(255, 255, 255, 130))
if self.radioButton_10.isChecked() == 1: if self.radioButton_10.isChecked() == 1:
@@ -686,15 +704,17 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
credit_text = QgsLayoutItemLabel(self.layout) credit_text = QgsLayoutItemLabel(self.layout)
credit_text.setText(info[0]) credit_text.setText(info[0])
credit_text.setFont(QFont("Calibri", 9)) credit_text.setFont(QFont("Calibri", 9))
credit_text.setHAlign(Qt.AlignmentFlag(0x0002)) credit_text.setHAlign(Qt.AlignmentFlag(self.template_parameters['Credit_alignment']))
credit_text.setVAlign(Qt.AlignmentFlag(0x0080)) credit_text.setVAlign(Qt.AlignmentFlag(0x0080))
credit_text.setMarginX(2)
credit_text.setBackgroundEnabled(True) credit_text.setBackgroundEnabled(True)
credit_text.setBackgroundColor(QColor(255, 255, 255, 130)) credit_text.setBackgroundColor(QColor(255, 255, 255, 130))
credit_text2 = QgsLayoutItemLabel(self.layout) credit_text2 = QgsLayoutItemLabel(self.layout)
credit_text2.setText(info_text) credit_text2.setText(info_text)
credit_text2.setFont(QFont("Calibri", 9)) credit_text2.setFont(QFont("Calibri", 9))
credit_text2.setHAlign(Qt.AlignmentFlag(0x0002)) credit_text2.setHAlign(Qt.AlignmentFlag(self.template_parameters['Source_alignment']))
credit_text2.setVAlign(Qt.AlignmentFlag(0x0080)) credit_text2.setVAlign(Qt.AlignmentFlag(0x0080))
credit_text2.setMarginX(2)
credit_text.setItemRotation(self.template_parameters['Credit_rotate']) credit_text.setItemRotation(self.template_parameters['Credit_rotate'])
credit_text.attemptResize(self.template_parameters['Credit_size']) credit_text.attemptResize(self.template_parameters['Credit_size'])
credit_text.attemptMove(self.template_parameters['Credit_locals']) credit_text.attemptMove(self.template_parameters['Credit_locals'])
@@ -711,11 +731,11 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
for logo_run in self.mComboBox_4.checkedItems(): for logo_run in self.mComboBox_4.checkedItems():
logo_credit = QgsLayoutItemPicture(self.layout) logo_credit = QgsLayoutItemPicture(self.layout)
logo_credit.setResizeMode(QgsLayoutItemPicture.Zoom) logo_credit.setResizeMode(QgsLayoutItemPicture.Zoom)
logo_credit.setPictureAnchor(QgsLayoutItem.ReferencePoint(4))
logo_credit.setMode(QgsLayoutItemPicture.FormatRaster) logo_credit.setMode(QgsLayoutItemPicture.FormatRaster)
cur_x = self.template_parameters['Logo_2_locals'].x() cur_x = self.template_parameters['Logo_2_locals'].x()
logo_credit.setItemRotation(self.template_parameters['Logo_2_rotate'])
logo_credit.attemptMove(self.template_parameters['Logo_2_locals']) logo_credit.attemptMove(self.template_parameters['Logo_2_locals'])
print(logo_credit.pictureAnchor())
# logo_credit.setPictureAnchor(4)
self.template_parameters['Logo_2_locals'].setX(cur_x + (logo_div / len_item)) self.template_parameters['Logo_2_locals'].setX(cur_x + (logo_div / len_item))
logo_credit.setFixedSize(self.template_parameters['Logo_2_size']) logo_credit.setFixedSize(self.template_parameters['Logo_2_size'])
if logo_run[0] == ' ': if logo_run[0] == ' ':
@@ -781,6 +801,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
del self.QMBquestion del self.QMBquestion
except ValueError: except ValueError:
TryMessage = True TryMessage = True
except AttributeError:
TryMessage = True
if TryMessage is True: if TryMessage is True:
iface.openLayoutDesigner(layout_modifie) iface.openLayoutDesigner(layout_modifie)
@@ -808,7 +830,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
pc.pages()[0].setPageSize('A3', QgsLayoutItemPage.Landscape) pc.pages()[0].setPageSize('A3', QgsLayoutItemPage.Landscape)
values_page_import = values_page[:-3] values_page_import = values_page[:-3]
eval("exec('from .tools.mises_en_pages import '+values_page_import)") eval("exec('from .tools.mises_en_pages import ' + values_page_import)")
eval("exec('self.template_parameters = '+ values_page_import + '.fletch_canvas(self)')") eval("exec('self.template_parameters = '+ values_page_import + '.fletch_canvas(self)')")
def bar_echelle_auto(self, echelle, bar_echelle): def bar_echelle_auto(self, echelle, bar_echelle):
+4 -3
View File
@@ -5,9 +5,10 @@
[general] [general]
name=CenRa_AutoMap name=CenRa_AutoMap
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
supportsQt6=True supportsQt6=True
description=CenRa_AutoMap description=CenRa_AutoMap
version=2.0 version=2.13
author=Conservatoire d'Espaces Naturels de Rhône-Alpes author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr email=si_besoin@cen-rhonealpes.fr
@@ -20,9 +21,9 @@ tracker=https://gitea.cenra-outils.org/api/v1/repos/CEN-RA/Plugin_QGIS/issues
# Recommended items: # Recommended items:
hasProcessingProvider=no # hasProcessingProvider=no
# Uncomment the following line and add your changelog: # Uncomment the following line and add your changelog:
changelog=<h2>CenRa_AUTOMAP:</h2></br><p><h3>19/05/2025 - Version 2.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>11/04/2025 - Version 1.7: </h3> - Correctif d'orthographe.</p></br><p><h3>09/04/2025 - Version 1.6: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 1.5: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 1.4: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 1.3: </h3> - Fenêtre redimensionnable avec déplaçable avec la mollette sourit.</p></br><p><h3>25/02/2025 - Version 1.2: </h3> - DockWidget pour ouverture de couche avec theme.</p></br><p><h3>28/01/2025 - Version 1.1: </h3> - Multi-Composeur pris en charge.</p></br><p><h3>27/01/2025 - Version 1.0: </h3> - Version releases.</br> - Ajoute un message d'avertissement au moment d'écraser la mise en page.</br> - Ajoute prénom et nom dans la réalisation.</br> - Utilisation de Calibri.</p></br><p><h3>13/01/2025 - Version 0.1.10: </h3> - Correctif.</p></br><p><h3>07/01/2025 - Version 0.1.9: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>19/12/2024 - Version 0.1.8: </h3> - Nouvelle mise en page.</br> - Incrémentation automatique de nouveau modele de mise en page. </br> - Correctif de bug.</p></br><p><h3>21/10/2024 - Version 0.1.7: </h3> - Epurations du code.</p></br><p><h3>07/10/2024 - Version 0.1.6: </h3> - Option de bibliotheque de logo custome.</p></br><p><h3>03/10/2024 - Version 0.1.5: </h3> - Remonte la fênetre dans la pille.</br> - Gestion du nombre de colonne dans la légend.</br></p></br><p><h3>02/10/2024 - Version 0.1.4: </h3> - Mise en page plein écrant.</br></p></br><p><h3>01/10/2024 - Version 0.1.3: </h3> - Récupération du titre et sous-titre pour mise en page existente.</br> - Integration de bibliotheque de logo.</br> - Integration de gestionaire pour les source de donnée.</br> - Mise en place d'une bar d'echelle adaptative. </br></p></br><p><h3>30/09/2024 - Version 0.1.2: </h3> - Activation du thème. </br> - Ajouter une carte de suivie. </br><p></br><h3>27/09/2024 - Version 0.1.1: </h3> - Ajout d'une liste déroulante pour les sources de données. </br>- Bouton pour ajouter des fonts de carte customisés. </br>- Fonctionnalité de génération d'atlas. </p></br><p><h3>26/09/2024 - Version 0.1.0: </h3> - Lancement du plugin CenRa_AutoMap avec une seul mise en page. </p></br> changelog=<h2>CenRa_AUTOMAP:</h2></br><p><h3>31/08/2026 - Version 2.13: </h3> - Ajout de guillemets doubles pour prendre en compte les noms de colonne ambigus, la creation d'atlas avec des labels dynamiques. </p></br><p><h3>30/06/2026 - Version 2.12: </h3> - Mise en page N2000 Logo redimensionner.</p></br><p><h3>21/05/2026 - Version 2.11: </h3> - Optimisation des performances hors connexion.</br></p></br><p><h3>04/05/2026 - Version 2.10: </h3> - Suppression ancien logo n2000.</p></br><p><h3>12/03/2026 - Version 2.9: </h3> - qgisMaximumVersion est 4.0.</p></br><p><h3>09/01/2026 - Version 2.8: </h3> - deplacement de l'echelle.</p></br><p><h3>18/12/2025 - Version 2.7: </h3> - fix de bug gitea.</p></br><p><h3>18/12/2025 - Version 2.6: </h3> - ajoue du logo n2000 et region.</p></br><p><h3>17/12/2025 - Version 2.5: </h3> - Carte n2000 mise a jour landscape et portrait.</p></br><p><h3>15/12/2025 - Version 2.4: </h3> - Landescape pour n2000.</p></br><p><h3>15/12/2025 - Version 2.3: </h3> - nouvelle mise en page n2000.</p></br><p><h3>12/12/2025 - Version 2.2: </h3> - nouvelle mise en page pour n2000.</p></br><p><h3>30/07/2025 - Version 2.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 2.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>11/04/2025 - Version 1.7: </h3> - Correctif d'orthographe.</p></br><p><h3>09/04/2025 - Version 1.6: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 1.5: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 1.4: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 1.3: </h3> - Fenêtre redimensionnable avec déplaçable avec la mollette sourit.</p></br><p><h3>25/02/2025 - Version 1.2: </h3> - DockWidget pour ouverture de couche avec theme.</p></br><p><h3>28/01/2025 - Version 1.1: </h3> - Multi-Composeur pris en charge.</p></br><p><h3>27/01/2025 - Version 1.0: </h3> - Version releases.</br> - Ajoute un message d'avertissement au moment d'écraser la mise en page.</br> - Ajoute prénom et nom dans la réalisation.</br> - Utilisation de Calibri.</p></br><p><h3>13/01/2025 - Version 0.1.10: </h3> - Correctif.</p></br><p><h3>07/01/2025 - Version 0.1.9: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>19/12/2024 - Version 0.1.8: </h3> - Nouvelle mise en page.</br> - Incrémentation automatique de nouveau modele de mise en page. </br> - Correctif de bug.</p></br><p><h3>21/10/2024 - Version 0.1.7: </h3> - Epurations du code.</p></br><p><h3>07/10/2024 - Version 0.1.6: </h3> - Option de bibliotheque de logo custome.</p></br><p><h3>03/10/2024 - Version 0.1.5: </h3> - Remonte la fênetre dans la pille.</br> - Gestion du nombre de colonne dans la légend.</br></p></br><p><h3>02/10/2024 - Version 0.1.4: </h3> - Mise en page plein écrant.</br></p></br><p><h3>01/10/2024 - Version 0.1.3: </h3> - Récupération du titre et sous-titre pour mise en page existente.</br> - Integration de bibliotheque de logo.</br> - Integration de gestionaire pour les source de donnée.</br> - Mise en place d'une bar d'echelle adaptative. </br></p></br><p><h3>30/09/2024 - Version 0.1.2: </h3> - Activation du thème. </br> - Ajouter une carte de suivie. </br><p></br><h3>27/09/2024 - Version 0.1.1: </h3> - Ajout d'une liste déroulante pour les sources de données. </br>- Bouton pour ajouter des fonts de carte customisés. </br>- Fonctionnalité de génération d'atlas. </p></br><p><h3>26/09/2024 - Version 0.1.0: </h3> - Lancement du plugin CenRa_AutoMap avec une seul mise en page. </p></br>
# Tags are comma separated with spaces allowed # Tags are comma separated with spaces allowed
tags=python tags=python
+23 -77
View File
@@ -1,95 +1,41 @@
import logging import logging
import os # from qgis.gui import *
from collections import namedtuple
from enum import Enum
from functools import partial
from pathlib import Path
from xml.dom.minidom import parseString
from qgis.gui import *
import qgis
from importlib import import_module
from qgis.core import ( from qgis.core import (
NULL,
QgsApplication,
QgsScaleBarSettings,
QgsDataSourceUri, QgsDataSourceUri,
QgsProject, QgsProject,
QgsProviderConnectionException,
QgsProviderRegistry,
QgsRasterLayer,
QgsSettings, QgsSettings,
QgsVectorLayer, QgsVectorLayer,
QgsGeometry,
QgsPrintLayout,
QgsReadWriteContext,
QgsLayoutItemMap,
QgsLayoutItemPage,
QgsLayoutSize,
QgsUnitTypes,
QgsLayoutPoint,
QgsLayoutItemLabel,
QgsLayoutItemPicture,
QgsLayoutItemLegend,
QgsLegendStyle,
QgsLayoutItemScaleBar,
QgsLayerTreeGroup,
QgsCoordinateReferenceSystem,
QgsCoordinateTransform,
QgsLayerTree,
QgsLayoutTableColumn,
QgsRectangle,
QgsLayoutItemMapOverviewStack,
QgsMapThemeCollection, QgsMapThemeCollection,
) )
from qgis.PyQt.QtCore import QLocale, QUrl, QDateTime, Qt from qgis.PyQt.QtCore import QSettings
from qgis.PyQt.QtGui import QDesktopServices, QIcon, QColor, QFont, QMovie from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtPrintSupport import QPrinter
from qgis.PyQt.QtWidgets import ( from qgis.PyQt.QtWidgets import (
QDockWidget, QDockWidget,
QAction,
QMessageBox,
QPushButton,
QDockWidget,
QFileDialog,
QInputDialog, QInputDialog,
QMenu,
QToolButton,
QTableWidget,
QTableWidgetItem,
QVBoxLayout,
) )
import psycopg2
try:
from PyQt5.QtCore import QSettings
from PyQt5 import QtGui
from PyQt5 import QtWidgets
except:
from PyQt6.QtCore import QSettings
from PyQt6 import QtGui
from PyQt6 import QtWidgets
from qgis.PyQt.QtXml import QDomDocument
from qgis.utils import iface
import glob
try:
from qgis.PyQt.QtXml import QDomDocument
try:
Enabled = True Enabled = True
from .tools.StyleLayer import * from .tools.StyleLayer import host, port, dbname, os_user
except: except ValueError:
Enabled = False Enabled = False
from .tools.resources import ( from .tools.resources import (
load_ui, load_ui,
resources_path, resources_path,
send_issues, # send_issues,
) )
from .issues import CenRa_Issues # from .issues import CenRa_Issues
from datetime import date # from datetime import date
EDITOR_CLASS = load_ui('CenRa_AutoMapStyle_base.ui') EDITOR_CLASS = load_ui('CenRa_AutoMapStyle_base.ui')
LOGGER = logging.getLogger('CenRa_AutoMapStyle') LOGGER = logging.getLogger('CenRa_AutoMapStyle')
class AutoMap_Style(QDockWidget, EDITOR_CLASS):
class AutoMap_Style(QDockWidget, EDITOR_CLASS):
def __init__(self, parent=None): def __init__(self, parent=None):
_ = parent _ = parent
super().__init__() super().__init__()
@@ -97,7 +43,7 @@ class AutoMap_Style(QDockWidget, EDITOR_CLASS):
self.settings = QgsSettings() self.settings = QgsSettings()
self.s = QSettings() self.s = QSettings()
self.toolButton.setIcon(QtGui.QIcon(resources_path('icons','loader.png'))) self.toolButton.setIcon(QIcon(resources_path('icons', 'loader.png')))
self.loadComboBox() self.loadComboBox()
self.toolButton.clicked.connect(self.loadStyle) self.toolButton.clicked.connect(self.loadStyle)
@@ -118,7 +64,7 @@ class AutoMap_Style(QDockWidget, EDITOR_CLASS):
def loginfo(self): def loginfo(self):
InputDialog = QInputDialog() InputDialog = QInputDialog()
mdp = InputDialog.getText(None,'Foncier','Mot de pass base foncier:') mdp = InputDialog.getText(None, 'Foncier', 'Mot de pass base foncier:')
return mdp return mdp
def loadAdministratif(self): def loadAdministratif(self):
@@ -129,24 +75,24 @@ class AutoMap_Style(QDockWidget, EDITOR_CLASS):
mdp = self.loginfo()[0] mdp = self.loginfo()[0]
if mdp != '': if mdp != '':
# couche = [['_form_power_rename','_form_power_rename_contour_2025'],['_42_bois_du_roy','_42_bois_du_roy_habitat_2021']] # couche = [['_form_power_rename','_form_power_rename_contour_2025'],['_42_bois_du_roy','_42_bois_du_roy_habitat_2021']]
couche = [['administratif','departements2024','gid'],['administratif','v_communes','id']] couche = [['administratif', 'departements2024', 'gid'], ['administratif', 'v_communes', 'id']]
for schema_table in couche: for schema_table in couche:
schema = schema_table[0] schema = schema_table[0]
table = schema_table[1] table = schema_table[1]
key = schema_table[2] key = schema_table[2]
uri = QgsDataSourceUri() uri = QgsDataSourceUri()
uri.setConnection(host ,port ,dbname ,os_user ,mdp) uri.setConnection(host, port, dbname, os_user, mdp)
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma # nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
uri.setDataSource(schema, table, "geom") uri.setDataSource(schema, table, "geom")
uri.setKeyColumn(key) uri.setKeyColumn(key)
layer = QgsVectorLayer(uri.uri(), table, "postgres") layer = QgsVectorLayer(uri.uri(), table, "postgres")
if layer.isValid() == True: if layer.isValid() is True:
layerName = layer.name() layerName = layer.name()
listStyle = layer.listStylesInDatabase() listStyle = layer.listStylesInDatabase()
try: try:
StyleExist = True StyleExist = True
indexStyle = (listStyle[2].index(layerName)) indexStyle = (listStyle[2].index(layerName))
except: except ValueError:
StyleExist = False StyleExist = False
if StyleExist: if StyleExist:
StyleId = (listStyle[1][indexStyle]) StyleId = (listStyle[1][indexStyle])
@@ -171,23 +117,23 @@ class AutoMap_Style(QDockWidget, EDITOR_CLASS):
mdp = self.loginfo()[0] mdp = self.loginfo()[0]
if mdp != '': if mdp != '':
# couche = [['_form_power_rename','_form_power_rename_contour_2025'],['_42_bois_du_roy','_42_bois_du_roy_habitat_2021']] # couche = [['_form_power_rename','_form_power_rename_contour_2025'],['_42_bois_du_roy','_42_bois_du_roy_habitat_2021']]
couche = [['sites','v_sites_parcelles'],['sites','v_sites'],['inventaires','suivi_zh'],['inventaires','suivi_ps']] couche = [['sites', 'v_sites_parcelles'], ['sites', 'v_sites'], ['inventaires', 'suivi_zh'], ['inventaires', 'suivi_ps']]
for schema_table in couche: for schema_table in couche:
schema = schema_table[0] schema = schema_table[0]
table = schema_table[1] table = schema_table[1]
uri = QgsDataSourceUri() uri = QgsDataSourceUri()
uri.setConnection(host ,port ,dbname ,os_user ,mdp) uri.setConnection(host, port, dbname, os_user, mdp)
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma # nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
uri.setDataSource(schema, table, "geom") uri.setDataSource(schema, table, "geom")
uri.setKeyColumn('gid') uri.setKeyColumn('gid')
layer = QgsVectorLayer(uri.uri(), table, "postgres") layer = QgsVectorLayer(uri.uri(), table, "postgres")
if layer.isValid() == True: if layer.isValid() is True:
layerName = layer.name() layerName = layer.name()
listStyle = layer.listStylesInDatabase() listStyle = layer.listStylesInDatabase()
try: try:
StyleExist = True StyleExist = True
indexStyle = (listStyle[2].index(layerName)) indexStyle = (listStyle[2].index(layerName))
except: except ValueError:
StyleExist = False StyleExist = False
if StyleExist: if StyleExist:
StyleId = (listStyle[1][indexStyle]) StyleId = (listStyle[1][indexStyle])
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

@@ -1,168 +1,198 @@
from qgis.core import ( from qgis.core import (
QgsLayoutSize, QgsLayoutSize,
QgsUnitTypes, QgsUnitTypes,
QgsLayoutPoint, QgsLayoutPoint,
) )
def fletch_canvas(self): def fletch_canvas(self):
if self.radioButton_6.isChecked(): if self.radioButton_6.isChecked():
values_page = 'A4' values_page = 'A4'
else: else:
values_page = 'A3' values_page = 'A3'
if self.radioButton_7.isChecked(): if self.radioButton_7.isChecked():
page_rotate = 'Portrait' page_rotate = 'Portrait'
else: else:
page_rotate = 'Landscape' page_rotate = 'Landscape'
if page_rotate == 'Portrait': if page_rotate == 'Portrait':
if values_page == 'A4': if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(198.85714285714286,175, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(198.85714285714286, 175, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0.0 self.template_parameters['Carte_rotate'] = 0.0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0,50, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0.0 self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286,90, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286, 90, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(12.0,12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(191, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Legande_frame'] = False
self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854,5, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(12.0, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(145, 229, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(191, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Logo_size'] = QgsLayoutSize(46.0,16, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Logo_rotate'] = 0.0 self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854, 5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_size'] = QgsLayoutSize(198.85714285714286,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(145, 229, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_rotate'] = 0.0
self.template_parameters['Titre_rotate'] = 0.0 self.template_parameters['Logo_size'] = QgsLayoutSize(46.0, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 158.0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_rotate'] = 0.0
self.template_parameters['Credit_rotate'] = 270.0 self.template_parameters['Titre_size'] = QgsLayoutSize(198.85714285714286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 200, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_rotate'] = 0.0
self.template_parameters['Source_rotate'] = 0.0 self.template_parameters['Credit_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(198.85714285714286,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 158.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_rotate'] = 270.0
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(54.857142857142854,15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(145, 215, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 200, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0.0 self.template_parameters['Source_rotate'] = 0.0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50.0,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(198.85714285714286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0.0 self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
if values_page == 'A3': self.template_parameters['Sous_titre_rotate'] = 0.0
self.template_parameters['Carte_size'] = QgsLayoutSize(280,247, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(54.857142857142854, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(145, 215, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0.0 self.template_parameters['Echelle_2_rotate'] = 0.0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(70,70, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(50.0, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0.0 self.template_parameters['Logo_2_rotate'] = 0.0
self.template_parameters['Legande_size'] = QgsLayoutSize(280,127, QgsUnitTypes.LayoutMillimeters) if values_page == 'A3':
self.template_parameters['Legande_locals'] = QgsLayoutPoint(7, 289, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(280, 247, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Carte_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(17,17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_rotate'] = 0.0
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(269, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_frame'] = True
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Carte_2_size'] = QgsLayoutSize(70, 70, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(77,7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(205, 323, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Logo_size'] = QgsLayoutSize(65,23, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(280, 127, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(7, 289, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0.0 self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Titre_size'] = QgsLayoutSize(280,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_frame'] = False
self.template_parameters['Titre_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(17, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0.0 self.template_parameters['Arrow_locals'] = QgsLayoutPoint(269, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Credit_locals'] = QgsLayoutPoint(289, 223, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Credit_rotate'] = 270.0 self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Source_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(77, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 282, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(205, 323, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0 self.template_parameters['Echelle_rotate'] = 0.0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(280,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(65, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Logo_rotate'] = 0.0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(77,21, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(280, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(205, 303, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0.0 self.template_parameters['Titre_rotate'] = 0.0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(70,28, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(7, 388, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(289, 223, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0.0 self.template_parameters['Credit_rotate'] = 270.0
self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 282, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0
self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(280, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(77, 21, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(205, 303, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0.0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(70, 28, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(7, 388, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0.0
if page_rotate == 'Landscape': if page_rotate == 'Landscape':
if values_page == 'A4': if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(285.14285714285717,145, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(285.14285714285717, 145, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0.0 self.template_parameters['Carte_rotate'] = 0.0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100.0,100, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(100.0, 100, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0.0 self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(285.14285714285717,41, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Legande_locals'] = QgsLayoutPoint(6, 168, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Legande_size'] = QgsLayoutSize(285.14285714285717, 41, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(13.142857142857142,12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(6, 168, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(277, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Legande_frame'] = False
self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854,15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(13.142857142857142, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(232, 193, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(277, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Logo_size'] = QgsLayoutSize(46.0,16, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Logo_rotate'] = 0.0 self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_size'] = QgsLayoutSize(286.0,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(232, 193, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_rotate'] = 0.0
self.template_parameters['Titre_rotate'] = 0.0 self.template_parameters['Logo_size'] = QgsLayoutSize(46.0, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(291, 127.0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_rotate'] = 0.0
self.template_parameters['Credit_rotate'] = 270.0 self.template_parameters['Titre_size'] = QgsLayoutSize(286.0, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(189, 169, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_rotate'] = 0.0
self.template_parameters['Source_rotate'] = 0.0 self.template_parameters['Credit_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286.0,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(291, 127.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_rotate'] = 270.0
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(54.857142857142854,15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(232, 179, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(189, 169, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0.0 self.template_parameters['Source_rotate'] = 0.0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50.0,50, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(6, 118, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286.0, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0.0 self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
if values_page == 'A3': self.template_parameters['Sous_titre_rotate'] = 0.0
self.template_parameters['Carte_size'] = QgsLayoutSize(402,205, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(54.857142857142854, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(232, 179, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0.0 self.template_parameters['Echelle_2_rotate'] = 0.0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(141,141, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(50.0, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(6, 118, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0.0 self.template_parameters['Logo_2_rotate'] = 0.0
self.template_parameters['Legande_size'] = QgsLayoutSize(402,58, QgsUnitTypes.LayoutMillimeters) if values_page == 'A3':
self.template_parameters['Legande_locals'] = QgsLayoutPoint(8, 237, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(402, 205, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(19,17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_rotate'] = 0.0
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(391, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_frame'] = True
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Carte_2_size'] = QgsLayoutSize(141, 141, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(77,21, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(327, 272, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Logo_size'] = QgsLayoutSize(65,23, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(402, 58, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(8, 237, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0.0 self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Titre_size'] = QgsLayoutSize(403,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_frame'] = False
self.template_parameters['Titre_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(19, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0.0 self.template_parameters['Arrow_locals'] = QgsLayoutPoint(391, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Credit_locals'] = QgsLayoutPoint(410, 179, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Credit_rotate'] = 270.0 self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Source_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(77, 21, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(267, 238, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(327, 272, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0 self.template_parameters['Echelle_rotate'] = 0.0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(403,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(65, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Logo_rotate'] = 0.0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(77,21, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(403, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(327, 252, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0.0 self.template_parameters['Titre_rotate'] = 0.0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(70,70, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(8, 166, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(410, 179, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0.0 self.template_parameters['Credit_rotate'] = 270.0
self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(267, 238, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0
self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(403, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(77, 21, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(327, 252, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0.0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(70, 70, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(8, 166, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0.0
return self.template_parameters return self.template_parameters
+196 -163
View File
@@ -1,170 +1,203 @@
from qgis.core import ( from qgis.core import (
QgsLayoutSize, QgsLayoutSize,
QgsUnitTypes, QgsUnitTypes,
QgsLayoutPoint, QgsLayoutPoint,
) )
def fletch_canvas(self): def fletch_canvas(self):
if self.radioButton_6.isChecked(): if self.radioButton_6.isChecked():
values_page = 'A4' values_page = 'A4'
else: else:
values_page = 'A3' values_page = 'A3'
if self.radioButton_7.isChecked(): if self.radioButton_7.isChecked():
page_rotate = 'Portrait' page_rotate = 'Portrait'
else: else:
page_rotate = 'Landscape' page_rotate = 'Landscape'
if page_rotate == 'Portrait': if page_rotate == 'Portrait':
if values_page == 'A4': if values_page == 'A4':
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_size'] = QgsLayoutSize(210, 297, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(210, 297, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(133, 215, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(133, 215, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 288, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 288, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 273, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 273, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(196, 283, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(196, 283, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 125, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 125, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(55, 292, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(55, 292, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_rotate'] = 270 self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A3': self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_frame'] = False
self.template_parameters['Carte_size'] = QgsLayoutSize(297, 420, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters) if values_page == 'A3':
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(297, 420, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 370, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(219, 324, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 410, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 395, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(24, 24, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 370, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(271, 394, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(219, 324, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(291, 125, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 410, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(98, 414, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 395, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Arrow_size'] = QgsLayoutSize(24, 24, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Arrow_locals'] = QgsLayoutPoint(271, 394, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Credit_locals'] = QgsLayoutPoint(291, 125, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Source_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Source_locals'] = QgsLayoutPoint(98, 414, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_frame'] = False
self.template_parameters['Arrow_background'] = True
self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_alignment'] = 0x0002
if page_rotate == 'Landscape': if page_rotate == 'Landscape':
if values_page == 'A3': if values_page == 'A3':
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_size'] = QgsLayoutSize(420, 297, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(420, 297, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_size'] = QgsLayoutSize(411, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(411, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(411, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(411, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 247, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 247, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(341, 196, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(341, 196, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 287, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 287, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 272, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 272, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(24, 24, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(24, 24, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(394, 271, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(394, 271, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(414, 123, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(414, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(185, 292, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(185, 292, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_rotate'] = 270 self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A4': self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Carte_size'] = QgsLayoutSize(297, 210, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_frame'] = False
self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters) if values_page == 'A4':
self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(297, 210, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 185, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(231, 135, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 201, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 186, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(283, 196, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 185, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(231, 135, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(98, 205, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(3, 201, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Echelle_2_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(3, 186, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Arrow_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Arrow_locals'] = QgsLayoutPoint(283, 196, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Credit_locals'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Source_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270 self.template_parameters['Source_locals'] = QgsLayoutPoint(98, 205, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_frame'] = False
self.template_parameters['Arrow_background'] = True
self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_alignment'] = 0x0002
# Retour des info # # Retour des info #
return self.template_parameters return self.template_parameters
+199 -163
View File
@@ -1,167 +1,203 @@
from qgis.core import ( from qgis.core import (
QgsLayoutSize, QgsLayoutSize,
QgsUnitTypes, QgsUnitTypes,
QgsLayoutPoint, QgsLayoutPoint,
) )
def fletch_canvas(self):
if self.radioButton_6.isChecked():
values_page = 'A4'
else:
values_page = 'A3'
if self.radioButton_7.isChecked():
page_rotate = 'Portrait'
else:
page_rotate = 'Landscape'
if page_rotate == 'Portrait':
if values_page == 'A4': def fletch_canvas(self):
self.template_parameters['Carte_size'] = QgsLayoutSize(168.0,262, QgsUnitTypes.LayoutMillimeters) if self.radioButton_6.isChecked():
self.template_parameters['Carte_locals'] = QgsLayoutPoint(41, 1, QgsUnitTypes.LayoutMillimeters) values_page = 'A4'
self.template_parameters['Carte_rotate'] = 0 else:
self.template_parameters['Carte_2_size'] = QgsLayoutSize(78.85714285714286,70, QgsUnitTypes.LayoutMillimeters) values_page = 'A3'
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(130, 1, QgsUnitTypes.LayoutMillimeters) if self.radioButton_7.isChecked():
self.template_parameters['Carte_2_rotate'] = 0 page_rotate = 'Portrait'
self.template_parameters['Legande_size'] = QgsLayoutSize(168.0,32, QgsUnitTypes.LayoutMillimeters) else:
self.template_parameters['Legande_locals'] = QgsLayoutPoint(41, 264, QgsUnitTypes.LayoutMillimeters) page_rotate = 'Landscape'
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters) if page_rotate == 'Portrait':
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(13, 254, QgsUnitTypes.LayoutMillimeters) if values_page == 'A4':
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Carte_size'] = QgsLayoutSize(168.0, 262, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(38.857142857142854,7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(41, 1, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(1, 289, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Carte_2_size'] = QgsLayoutSize(78.85714285714286, 70, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_size'] = QgsLayoutSize(34.857142857142854,10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(130, 1, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 139, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Legande_size'] = QgsLayoutSize(168.0, 32, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_size'] = QgsLayoutSize(38.857142857142854,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(41, 264, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(1, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(74.85714285714286,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(13, 254, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(43, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Echelle_size'] = QgsLayoutSize(38.857142857142854, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(104.0,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(1, 289, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 256, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Logo_size'] = QgsLayoutSize(34.857142857142854, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(38.857142857142854,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 139, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(1, 14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Titre_size'] = QgsLayoutSize(38.857142857142854, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(38.857142857142854,13, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(1, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(1, 276, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Credit_size'] = QgsLayoutSize(74.85714285714286, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0,30, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(43, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 233, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Source_size'] = QgsLayoutSize(104.0, 6, QgsUnitTypes.LayoutMillimeters)
if values_page == 'A3': self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 256, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_size'] = QgsLayoutSize(237,369, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_rotate'] = 0
self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(38.857142857142854, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(1, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_size'] = QgsLayoutSize(111,99, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(183, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(38.857142857142854, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(1, 276, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(237,45, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Legande_locals'] = QgsLayoutPoint(58, 372, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 233, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(19, 358, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Carte_frame'] = True
self.template_parameters['Echelle_size'] = QgsLayoutSize(55,10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(2, 408, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_frame'] = False
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Arrow_background'] = True
self.template_parameters['Logo_size'] = QgsLayoutSize(49,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 196, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Titre_size'] = QgsLayoutSize(55,15, QgsUnitTypes.LayoutMillimeters) if values_page == 'A3':
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(237, 369, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_size'] = QgsLayoutSize(106,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Credit_locals'] = QgsLayoutPoint(60, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(111, 99, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(183, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_size'] = QgsLayoutSize(147,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 361, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(237, 45, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Legande_locals'] = QgsLayoutPoint(58, 372, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(55,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(20, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Arrow_locals'] = QgsLayoutPoint(19, 358, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55,19, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(2, 389, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(55, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Echelle_locals'] = QgsLayoutPoint(2, 408, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_size'] = QgsLayoutSize(42,42, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 329, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(49, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 196, QgsUnitTypes.LayoutMillimeters)
if page_rotate == 'Landscape': self.template_parameters['Logo_rotate'] = 0
if values_page == 'A4': self.template_parameters['Titre_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_size'] = QgsLayoutSize(254.85714285714286,175, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(41, 1, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Credit_size'] = QgsLayoutSize(106, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_size'] = QgsLayoutSize(78.85714285714286,70, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(60, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(217, 1, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Source_size'] = QgsLayoutSize(147, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_size'] = QgsLayoutSize(254.85714285714286,32, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 361, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(41, 177, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_rotate'] = 0
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Sous_titre_size'] = QgsLayoutSize(55, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(13, 168, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55, 19, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_size'] = QgsLayoutSize(38.857142857142854,7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(2, 389, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(1, 202, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Logo_2_size'] = QgsLayoutSize(42, 42, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_size'] = QgsLayoutSize(34.857142857142854,10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 329, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 94, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(38.857142857142854,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_frame'] = True
self.template_parameters['Titre_locals'] = QgsLayoutPoint(1, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Legande_frame'] = False
self.template_parameters['Credit_size'] = QgsLayoutSize(74.85714285714286,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Credit_locals'] = QgsLayoutPoint(43, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_size'] = QgsLayoutSize(104.0,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Source_locals'] = QgsLayoutPoint(190, 169, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 if page_rotate == 'Landscape':
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(38.857142857142854,14, QgsUnitTypes.LayoutMillimeters) if values_page == 'A4':
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(1, 14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(254.85714285714286, 175, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Carte_locals'] = QgsLayoutPoint(41, 1, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(38.857142857142854,13, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(1, 189, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(78.85714285714286, 70, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(217, 1, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0,30, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 146, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(254.85714285714286, 32, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Legande_locals'] = QgsLayoutPoint(41, 177, QgsUnitTypes.LayoutMillimeters)
if values_page == 'A3': self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Carte_size'] = QgsLayoutSize(359,247, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(13, 168, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(111,99, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(38.857142857142854, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(306, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(1, 202, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Legande_size'] = QgsLayoutSize(359,45, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(34.857142857142854, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(58, 250, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 94, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(38.857142857142854, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(19, 237, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(1, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Echelle_size'] = QgsLayoutSize(55,10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(74.85714285714286, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(2, 285, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(43, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(49,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(104.0, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 133, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(190, 169, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Source_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(55,15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(38.857142857142854, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(1, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(106,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(38.857142857142854, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(60, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(1, 189, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Source_size'] = QgsLayoutSize(147,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(268, 238, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 146, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(55,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_frame'] = True
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55,19, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_frame'] = False
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(2, 267, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_background'] = True
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Logo_2_size'] = QgsLayoutSize(42,42, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 206, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Logo_2_rotate'] = 0 if values_page == 'A3':
return self.template_parameters self.template_parameters['Carte_size'] = QgsLayoutSize(359, 247, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(111, 99, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(306, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Legande_size'] = QgsLayoutSize(359, 45, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(58, 250, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_size'] = QgsLayoutSize(20, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(19, 237, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_size'] = QgsLayoutSize(55, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(2, 285, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(49, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 133, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(106, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(60, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Source_size'] = QgsLayoutSize(147, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(268, 238, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(55, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55, 19, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(2, 267, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(42, 42, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 206, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Logo_2_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_frame'] = False
self.template_parameters['Arrow_background'] = True
self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_alignment'] = 0x0002
return self.template_parameters
+197
View File
@@ -0,0 +1,197 @@
from qgis.core import (
QgsLayoutSize,
QgsUnitTypes,
QgsLayoutPoint,
)
def fletch_canvas(self):
if self.radioButton_6.isChecked():
values_page = 'A4'
else:
values_page = 'A3'
if self.radioButton_7.isChecked():
page_rotate = 'Portrait'
else:
page_rotate = 'Landscape'
if page_rotate == 'Portrait':
if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(206.0, 200, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(2, 29, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(58.857142857142854, 40, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(146, 218, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286, 36, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(6, 260, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(191, 32, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(50.0, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(140, 244, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(6, 241, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(206.0, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(198.0, 5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(3, 228.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(198.0, 5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(8, 228.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 270
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(202.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(4, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50.0, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(130, 233, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(80.0, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(48, 234, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(290, 282, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(3, 41, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(83, 56, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(206, 307, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(280, 51, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(8, 367, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(20, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(269, 45, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(70, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(125, 350, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(56, 28, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(8, 330, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(290, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(280, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(4, 322, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(280, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(11, 322, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 270
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(285, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(6, 19, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(70, 19, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(125, 330, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(56, 28, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(68, 330, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
if page_rotate == 'Landscape':
if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(189.0, 189, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(9, 18.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0, 40, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(194, 20.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(203.0, 62, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(199, 63.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(177, 20.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(50, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(247, 43, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(228, 149.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(289.0, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 1.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(191, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(8, 201, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(191, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(8, 195, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(289.0, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(3, 12.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(249, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(80.0, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(208, 172, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(305.0, 273, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(9, 18.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0, 40, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(311, 20.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(203.0, 62, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(317, 63.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(296, 20.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(50, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(364, 43, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(320, 264.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(413.0, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 1.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(306, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(8, 285, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(306, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(8, 279, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(413.0, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(3, 12.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(366, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(369, 264, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
return self.template_parameters
@@ -0,0 +1,197 @@
from qgis.core import (
QgsLayoutSize,
QgsUnitTypes,
QgsLayoutPoint,
)
def fletch_canvas(self):
if self.radioButton_6.isChecked():
values_page = 'A4'
else:
values_page = 'A3'
if self.radioButton_7.isChecked():
page_rotate = 'Portrait'
else:
page_rotate = 'Landscape'
if page_rotate == 'Portrait':
if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(145.0, 135, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(4, 18, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 40, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(146, 21, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286, 36, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(153, 64, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(6, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(50.0, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(154, 220, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(148, 267, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(205.0, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 1, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(145.0, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(4, 147.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(145.0, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(4, 141.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(205, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50.0, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(162, 208, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(80.0, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(128, 234, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(233.0, 192, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(4, 18, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 40, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(234, 21, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(190, 36, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(242, 64, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(6, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(50.0, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(154, 220, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(248, 386, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(293.0, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 1, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(233.0, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(4, 204.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(233.0, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(4, 198.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(293, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50.0, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(252, 330, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(160, 234, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
if page_rotate == 'Landscape':
if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(145.0, 140, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(150, 27.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(253, 144.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(110.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(183, 175.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(278, 29.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(50, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(138, 191, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 175.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(288.0, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 1.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(140, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(150, 167, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(140, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(156, 167, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 270
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(288.0, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(3, 11.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(138, 180, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(80.0, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(52, 172, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(200.0, 230, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(216, 27.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(373, 234.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Carte_2_frame'] = True
self.template_parameters['Legande_size'] = QgsLayoutSize(110.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(253, 264.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Legande_frame'] = True
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(401, 29.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Arrow_background'] = False
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(50, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(150, 281, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 265.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(413.0, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 1.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(230, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(216, 257, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270
self.template_parameters['Credit_alignment'] = 0x0001
self.template_parameters['Source_size'] = QgsLayoutSize(230, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(222, 257, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 270
self.template_parameters['Source_alignment'] = 0x0001
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(413.0, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(3, 11.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(150, 270, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(72, 265, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0
return self.template_parameters
+5 -1
View File
@@ -21,7 +21,11 @@ from .tools.resources import (
maj_verif, maj_verif,
) )
pyperclip() pyperclip()
from .copie_editor import Copie_Editor
try:
from .copie_editor import Copie_Editor
except NameError:
print('404')
class PgCopie: class PgCopie:
+4 -4
View File
@@ -9,7 +9,7 @@ from builtins import str
from qgis.PyQt.QtCore import QSettings from qgis.PyQt.QtCore import QSettings
from qgis.PyQt.QtWidgets import QDialog, QMessageBox from qgis.PyQt.QtWidgets import QDialog, QMessageBox
from qgis.PyQt import QtGui from qgis.PyQt import QtGui
from qgis.core import QgsDataSourceUri, QgsSettings, QgsWkbTypes from qgis.core import QgsDataSourceUri, QgsSettings, QgsWkbTypes, Qgis
try: try:
from .tools.PythonSQL import login_base from .tools.PythonSQL import login_base
@@ -50,7 +50,7 @@ class Copie_Editor(QDialog, EDITOR_CLASS):
if layer is None: if layer is None:
# self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5) # self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=1, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=Qgis.Warning, duration=5)
else: else:
# Récupération des sources de la couche active # Récupération des sources de la couche active
@@ -67,7 +67,7 @@ class Copie_Editor(QDialog, EDITOR_CLASS):
if source_db != sigdb: if source_db != sigdb:
# self.iface.messageBar().pushMessage(u"Un référentiel ne peut être copié, utilisez les filtres !", level=QgsMessageBar.CRITICAL, duration=10) # self.iface.messageBar().pushMessage(u"Un référentiel ne peut être copié, utilisez les filtres !", level=QgsMessageBar.CRITICAL, duration=10)
self.iface.messageBar().pushMessage("Ooops", u"Vous ne pouvez copier des couches que dans sigXX", level=2, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous ne pouvez copier des couches que dans sigXX", level=Qgis.Critical, duration=5)
else: else:
user = account[0] user = account[0]
mdp = account[1] mdp = account[1]
@@ -208,5 +208,5 @@ class Copie_Editor(QDialog, EDITOR_CLASS):
con.close() con.close()
# self.iface.messageBar().pushMessage("Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\"." , level=QgsMessageBar.INFO, duration=10) # self.iface.messageBar().pushMessage("Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\"." , level=QgsMessageBar.INFO, duration=10)
self.iface.messageBar().pushMessage("Bravo!", "Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\".", level=3, duration=5) self.iface.messageBar().pushMessage("Bravo!", "Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\".", level=Qgis.Info, duration=5)
pass pass
+3 -2
View File
@@ -9,9 +9,10 @@
[general] [general]
name=CenRA_COPIE name=CenRA_COPIE
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
supportsQt6=True supportsQt6=True
description=Permet la copie d'une table dans une base PostGis description=Permet la copie d'une table dans une base PostGis
version=3.0 version=3.2
author=Conservatoire d'Espaces Naturels de Rhône-Alpes author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr email=si_besoin@cen-rhonealpes.fr
@@ -20,7 +21,7 @@ email=si_besoin@cen-rhonealpes.fr
# Recommended items: # Recommended items:
# Uncomment the following line and add your changelog: # Uncomment the following line and add your changelog:
changelog=<h2>CenRa_COPIE:</h2></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>11/04/2025 - Version 2.5: </h3> - Correctif de bug.</p></br><p><h3>09/04/2025 - Version 2.4: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.3: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 2.2: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>22/10/2024 - Version 2:</h3>- Refonte du code.</p></br><p><h3>13/09/2024 - Version 1.5:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p> changelog=<h2>CenRa_COPIE:</h2></br><p><h3>12/03/2026 - Version 3.2: </h3> - qgisMaximumVersion est 4.0.</p></br><p><h3>30/07/2025 - Version 3.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>11/04/2025 - Version 2.5: </h3> - Correctif de bug.</p></br><p><h3>09/04/2025 - Version 2.4: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.3: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 2.2: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>22/10/2024 - Version 2:</h3>- Refonte du code.</p></br><p><h3>13/09/2024 - Version 1.5:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
# Tags are comma separated with spaces allowed # Tags are comma separated with spaces allowed
tags=cenra, database, table tags=cenra, database, table
+3 -7
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CenRa_Metabase_editorwidget_base</class> <class>CenRa_Metabase_editorwidget_base</class>
<widget class="QDialog" name="CenRa_Metabase_editorwidget_base"> <widget class="QDialog" name="CenRa_about_base">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@@ -13,10 +13,6 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Journal des modifications</string> <string>Journal des modifications</string>
</property> </property>
<property name="windowIcon">
<iconset>
<normaloff>../../CenRa_Metabase/tools/ui/icon.svg</normaloff>../../CenRa_Metabase/tools/ui/icon.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
@@ -38,7 +34,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>453</width> <width>453</width>
<height>570</height> <height>547</height>
</rect> </rect>
</property> </property>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
@@ -70,7 +66,7 @@
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::NoButton</set> <set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
+4 -1
View File
@@ -20,7 +20,10 @@ from .tools.resources import (
) )
pyperclip() pyperclip()
from .flux_editor import Flux_Editor try:
from .flux_editor import Flux_Editor
except NameError:
print('404')
class PgFlux: class PgFlux:
+572 -229
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -5,9 +5,10 @@
[general] [general]
name=CenRa_FLUX name=CenRa_FLUX
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
supportsQt6=True supportsQt6=True
description=Permet d'ouvrire une table dans la base PostGis description=Permet d'ouvrire une table dans la base PostGis
version=3.5 version=3.24
author=Conservatoire d'Espaces Naturels de Rhône-Alpes author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr email=si_besoin@cen-rhonealpes.fr
@@ -32,7 +33,7 @@ icon=icon.png
# experimental flag # experimental flag
experimental=False experimental=False
changelog=<h2>CenRa_FLUX:</h2></br><p><h3>29/07/2025 - Version 3.5: </h3> - Bug fix sur les donnee raster.</p></br><p><h3>23/07/2025 - Version 3.4: </h3> - Ouverture raster dans la base SIG.</p></br><p><h3>23/07/2025 - Version 3.3: </h3> - Optimisation des chargement.</p></br><p><h3>22/07/2025 - Version 3.2: </h3> - Visualisation des format raster et vecteur dans REF.</p></br><p><h3>21/07/2025 - Version 3.1: </h3> - Bug fix pour l'ouverture de plus de 5 couches.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6.</p></br><p><h3>09/04/2025 - Version 2.9: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.8: </h3> - Optimisation pour le TT.</p></br><p><h3>07/04/2025 - Version 2.7: </h3> - mode debug.</p></br><p><h3>03/04/2025 - Version 2.6: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 2.5: </h3> - Visualisation distincte des couches ne se trouvant pas dans l'antenne.</p></br><p><h3>13/02/2025 - Version 2.4: </h3> - Ajoute redimensionnement et déplacement mollette.</p></br><p><h3>05/02/2025 - Version 2.3: </h3> - Bouton de visualisation des couches se trouvent uniquement dans le canva de la carte.</p></br><p><h3>07/01/2025 - Version 2.2: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.1:</h3> - Correctif de bug.</br> - Evolution de la limit de 3 à 5. </br></p></br><p><h3>22/10/2024 - Version 2.0:</h3> - Reformatage du code.</br></p></br><p><h3>03/10/2024 - Version 1.14:</h3> - Remonte la fênetre dans la pille.</br></p><p><h3>13/09/2024 - Version 1.13:</h3>- MAJ sur le lien du changelog</br>- Bug-fix: Ouvre MultiPolygone et Polygon séparément.</p></br><p><h3>10/09/2024 - Version 1.11:</h3>- Ouverture de table contenant plusieurs géométries.</p></br><p><h3>26/08/2024 - Version 1.10:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p> changelog=<h2>CenRa_FLUX:</h2></br><p><h3>22/05/2026 - Version 3.24: </h3> - Option authentification pour table avec droits particuliers.</p></br><p><h3>21/05/2026 - Version 3.23: </h3> - Optimisation des performances hors connexion.</p></br><p><h3>23/03/2026 - Version 3.22: </h3> - Pache mineur.</p></br><p><h3>12/03/2026 - Version 3.21: </h3> - qgisMaximumVersion est 4.0.</p></br><p><h3>05/03/2026 - Version 3.20: </h3> - Visualisation des metadonnees avec un tooltip au survol de la couche.</p></br><p><h3>26/02/2026 - Version 3.19: </h3> - Visualisation des droits pour les vues materialisees.</p></br><p><h3>25/02/2026 - Version 3.18: </h3> - Filtre par secteur geographique compatible avec les favoris.</p></br><p><h3>12/02/2026 - Version 3.17: </h3> - Favorit dans la BD Ref.</p></br><p><h3>11/02/2026 - Version 3.16: </h3> - Creation de favori et visualisation.</p></br><p><h3>10/02/2026 - Version 3.15: </h3> - Sauvegarde la recherche.</p></br><p><h3>08/12/2025 - Version 3.14: </h3> - message d'erreur pour les drois de couche sur la DB.</p></br><p><h3>08/12/2025 - Version 3.13: </h3> - Detection des droit utilisateur.</p></br><p><h3>25/09/2025 - Version 3.12: </h3> - version +1.</p></br><p><h3>25/09/2025 - Version 3.11: </h3> - Correctife sur les code 00.</p></br><p><h3>24/09/2025 - Version 3.10: </h3> - Erreur sur l ouverture des couche raster. </p></br><p><h3>24/09/2025 - Version 3.9: </h3> - bugfix lier aux extention pgsql.</p></br><p><h3>09/09/2025 - Version 3.8: </h3> - Bug REF fix.</p></br><p><h3>05/09/2025 - Version 3.7: </h3> - Ouverture de projet QGIS contenue dans la base de donnees.</p></br><p><h3>30/07/2025 - Version 3.6: </h3> - Correctife de bug.</p></br><p><h3>29/07/2025 - Version 3.5: </h3> - Bug fix sur les donnee raster.</p></br><p><h3>23/07/2025 - Version 3.4: </h3> - Ouverture raster dans la base SIG.</p></br><p><h3>23/07/2025 - Version 3.3: </h3> - Optimisation des chargement.</p></br><p><h3>22/07/2025 - Version 3.2: </h3> - Visualisation des format raster et vecteur dans REF.</p></br><p><h3>21/07/2025 - Version 3.1: </h3> - Bug fix pour l'ouverture de plus de 5 couches.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6.</p></br><p><h3>09/04/2025 - Version 2.9: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.8: </h3> - Optimisation pour le TT.</p></br><p><h3>07/04/2025 - Version 2.7: </h3> - mode debug.</p></br><p><h3>03/04/2025 - Version 2.6: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 2.5: </h3> - Visualisation distincte des couches ne se trouvant pas dans l'antenne.</p></br><p><h3>13/02/2025 - Version 2.4: </h3> - Ajoute redimensionnement et déplacement mollette.</p></br><p><h3>05/02/2025 - Version 2.3: </h3> - Bouton de visualisation des couches se trouvent uniquement dans le canva de la carte.</p></br><p><h3>07/01/2025 - Version 2.2: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.1:</h3> - Correctif de bug.</br> - Evolution de la limit de 3 à 5. </br></p></br><p><h3>22/10/2024 - Version 2.0:</h3> - Reformatage du code.</br></p></br><p><h3>03/10/2024 - Version 1.14:</h3> - Remonte la fênetre dans la pille.</br></p><p><h3>13/09/2024 - Version 1.13:</h3>- MAJ sur le lien du changelog</br>- Bug-fix: Ouvre MultiPolygone et Polygon séparément.</p></br><p><h3>10/09/2024 - Version 1.11:</h3>- Ouverture de table contenant plusieurs géométries.</p></br><p><h3>26/08/2024 - Version 1.10:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
# deprecated flag (applies to the whole plugin, not just a single version) # deprecated flag (applies to the whole plugin, not just a single version)
deprecated=False deprecated=False
+51 -7
View File
@@ -2,13 +2,57 @@
schemaname_distinct = """SELECT DISTINCT schemaname from pg_catalog.pg_tables schemaname_distinct = """SELECT DISTINCT schemaname from pg_catalog.pg_tables
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier' WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
order by schemaname;""" order by schemaname;"""
schemaname_list_ref = """SELECT schemaname,tablename from pg_catalog.pg_tables
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier' schemaname_list_ref = """
order by schemaname,tablename;""" WITH TableList AS (SELECT
schemaname_list = """(SELECT schemaname,tablename from pg_catalog.pg_tables schemaname,
where schemaname like 'trav%' or schemaname like '\\_ag%' or schemaname like '\\_00%' or schemaname like '\\_01%' or schemaname like '\\_07%' or schemaname like '\\_26%' or schemaname like '\\_form%' or schemaname like '\\_42%' or schemaname like '\\_69%' order by schemaname,tablename) tablename
UNION FROM pg_catalog.pg_tables
(SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews order by schemaname,tablename) order by schemaname,tablename;""" WHERE
schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
ORDER BY schemaname,tablename),
TableDescription AS (SELECT
schemaname,
tablename,
description
FROM TableList
LEFT JOIN pg_description ON objoid = (quote_ident(schemaname)||'.'||quote_ident(tablename))::regclass
ORDER BY schemaname, tablename)
SELECT * FROM TableDescription;
"""
schemaname_list = """
WITH
TableList as (SELECT
schemaname,
tablename
FROM pg_catalog.pg_tables
WHERE schemaname LIKE 'trav%' OR schemaname LIKE '_ag%' OR schemaname LIKE '_00%' OR schemaname LIKE '_01%' OR schemaname LIKE '_07%' OR schemaname LIKE '_26%' OR schemaname LIKE '_form%' OR schemaname LIKE '_42%' OR schemaname LIKE '_69%'
ORDER BY schemaname,tablename),
ViewList as (SELECT
schemaname,
matviewname AS tablename
FROM pg_catalog.pg_matviews
ORDER BY schemaname,tablename),
TableAndView as (SELECT
schemaname,
tablename
FROM TableList
UNION SELECT schemaname,tablename FROM ViewList),
TableViewDescription as (SELECT
schemaname,
tablename,
description
FROM TableAndView
LEFT JOIN pg_description ON objoid = (quote_ident(schemaname)||'.'||quote_ident(tablename))::regclass
ORDER BY schemaname,tablename)
SELECT * FROM TableViewDescription;
"""
geom = "geom" geom = "geom"
champ_travaux_prevus_multipolygon = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, surface_m2 double precision, surface_ha double precision, date_creation date, date_maj date, geom geometry(MultiPolygon,2154))""" champ_travaux_prevus_multipolygon = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, surface_m2 double precision, surface_ha double precision, date_creation date, date_maj date, geom geometry(MultiPolygon,2154))"""
champ_travaux_prevus_multilinestring = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, longueur_m double precision, longueur_km double precision, date_creation date, date_maj date, geom geometry(MultiLineString,2154))""" champ_travaux_prevus_multilinestring = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, longueur_m double precision, longueur_km double precision, date_creation date, date_maj date, geom geometry(MultiLineString,2154))"""
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="128px" height="128px" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<polygon fill="#EE7913" points="68.613,69.625 86.891,69.625 71.697,54.625 52.613,54.625 52.613,72.746 68.613,88.548 "/>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="402.5244" y1="-220.8706" x2="400.6479" y2="-97.5023" gradientTransform="matrix(1 0 0 -1 -300.5195 -92.5547)">
<stop offset="0" style="stop-color:#589632"/>
<stop offset="1" style="stop-color:#93B023"/>
</linearGradient>
<polygon fill="url(#SVGID_1_)" points="126.613,109.057 94.488,77.625 76.613,77.625 76.613,96.033 107.143,126.625
126.613,126.625 "/>
<polygon fill="#F0E64A" points="76.613,77.625 94.488,77.625 86.891,69.625 68.613,69.625 68.613,88.548 76.613,96.033 "/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="365.4619" y1="-221.1455" x2="363.5923" y2="-98.227" gradientTransform="matrix(1 0 0 -1 -300.5195 -92.5547)">
<stop offset="0" style="stop-color:#589632"/>
<stop offset="1" style="stop-color:#93B023"/>
</linearGradient>
<path fill="url(#SVGID_2_)" d="M68.923,101.552c-1.165,0.242-1.769,0.157-4.685,0.157c-20.866,0-38.612-17.158-38.612-39.406
c0-22.248,17.551-39.027,38.612-39.027s37.833,16.78,37.833,39.027c0,3.619-0.451,7.099-1.284,10.398L120.1,92.012
c4.979-8.726,7.765-18.869,7.765-29.857c0-34.289-27.363-59.963-64.016-59.963C27.363,2.191,0,27.696,0,62.154
c0,34.625,27.363,60.638,63.848,60.638c9.417,0,16.069-1.469,23.042-3.761L68.923,101.552z"/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="53.083,54.625 71.697,54.625 126.613,109.057
126.613,126.625 "/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+1 -1
View File
@@ -155,7 +155,7 @@ def maj_verif(NAME):
try: try:
urllib.request.urlopen('https://google.com') urllib.request.urlopen('https://google.com')
binar = True binar = True
except NameError: except urllib.error.URLError:
binar = False binar = False
if binar: if binar:
try: try:
@@ -1,252 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>910</width>
<height>800</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>910</width>
<height>800</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>910</width>
<height>800</height>
</size>
</property>
<property name="windowTitle">
<string>SIG CEN-RA</string>
</property>
<widget class="QComboBox" name="comboBox">
<property name="geometry">
<rect>
<x>260</x>
<y>130</y>
<width>171</width>
<height>22</height>
</rect>
</property>
<property name="editable">
<bool>false</bool>
</property>
<property name="currentText">
<string notr="true"/>
</property>
</widget>
<widget class="QComboBox" name="comboBox_2">
<property name="geometry">
<rect>
<x>370</x>
<y>80</y>
<width>171</width>
<height>22</height>
</rect>
</property>
<property name="editable">
<bool>false</bool>
</property>
<property name="currentText">
<string notr="true"/>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>345</x>
<y>10</y>
<width>221</width>
<height>71</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/plugins/CenRa_FLUX/logo.jpg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>370</x>
<y>750</y>
<width>171</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Charger les couches</string>
</property>
</widget>
<widget class="QTableWidget" name="tableWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>30</x>
<y>170</y>
<width>850</width>
<height>281</height>
</rect>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
<widget class="QTableWidget" name="tableWidget_2">
<property name="geometry">
<rect>
<x>30</x>
<y>550</y>
<width>850</width>
<height>181</height>
</rect>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton">
<property name="geometry">
<rect>
<x>400</x>
<y>470</y>
<width>61</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</iconset>
</property>
<property name="iconSize">
<size>
<width>50</width>
<height>40</height>
</size>
</property>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton_2">
<property name="geometry">
<rect>
<x>460</x>
<y>470</y>
<width>61</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>:/plugins/CenRa_FLUX/arrow-up.png</normaloff>:/plugins/CenRa_FLUX/arrow-up.png</iconset>
</property>
<property name="iconSize">
<size>
<width>50</width>
<height>40</height>
</size>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>480</x>
<y>130</y>
<width>171</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Recherche par mots-clés</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>40</x>
<y>150</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<family>Calibri</family>
<pointsize>10</pointsize>
<italic>false</italic>
</font>
</property>
<property name="text">
<string>Liste des flux disponibles :</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>30</x>
<y>530</y>
<width>171</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<family>Calibri</family>
<pointsize>10</pointsize>
<italic>false</italic>
</font>
</property>
<property name="text">
<string>Flux sélectionné(s) à charger :</string>
</property>
</widget>
<zorder>label_3</zorder>
<zorder>comboBox</zorder>
<zorder>comboBox_2</zorder>
<zorder>pushButton_2</zorder>
<zorder>tableWidget</zorder>
<zorder>tableWidget_2</zorder>
<zorder>commandLinkButton</zorder>
<zorder>commandLinkButton_2</zorder>
<zorder>lineEdit</zorder>
<zorder>label</zorder>
<zorder>label_2</zorder>
</widget>
<resources/>
<connections/>
</ui>
+29
View File
@@ -386,6 +386,35 @@
<string notr="true">background-color: rgba(255, 255, 255,0.50);</string> <string notr="true">background-color: rgba(255, 255, 255,0.50);</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton" name="toolButton_2">
<property name="geometry">
<rect>
<x>700</x>
<y>130</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<zorder>commandLinkButton_2</zorder>
<zorder>pushButton_2</zorder>
<zorder>label</zorder>
<zorder>tableWidget_2</zorder>
<zorder>comboBox</zorder>
<zorder>lineEdit</zorder>
<zorder>toolButton</zorder>
<zorder>tableWidget</zorder>
<zorder>label_2</zorder>
<zorder>label_3</zorder>
<zorder>comboBox_2</zorder>
<zorder>commandLinkButton</zorder>
<zorder>checkBox</zorder>
<zorder>DeBUG</zorder>
<zorder>toolButton_2</zorder>
<zorder>viewer</zorder>
</widget> </widget>
</widget> </widget>
</item> </item>
+3 -7
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CenRa_Metabase_editorwidget_base</class> <class>CenRa_Metabase_editorwidget_base</class>
<widget class="QDialog" name="CenRa_Metabase_editorwidget_base"> <widget class="QDialog" name="CenRa_about_base">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@@ -13,10 +13,6 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Journal des modifications</string> <string>Journal des modifications</string>
</property> </property>
<property name="windowIcon">
<iconset>
<normaloff>../../CenRa_Metabase/tools/ui/icon.svg</normaloff>../../CenRa_Metabase/tools/ui/icon.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
@@ -38,7 +34,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>453</width> <width>453</width>
<height>570</height> <height>547</height>
</rect> </rect>
</property> </property>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
@@ -70,7 +66,7 @@
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::NoButton</set> <set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

+6 -2
View File
@@ -31,8 +31,12 @@ from .tools.resources import (
maj_verif, maj_verif,
) )
pyperclip() pyperclip()
from .dock import CenRa_Metabase
from .editor import Metabase_Editor try:
from .dock import CenRa_Metabase
from .editor import Metabase_Editor
except NameError:
print('404')
# from CenRa_Metabase.issues import CenRa_Issues # from CenRa_Metabase.issues import CenRa_Issues
+2 -1
View File
@@ -12,6 +12,7 @@ from qgis.core import (
QgsSettings, QgsSettings,
QgsGeometry, QgsGeometry,
QgsWkbTypes, QgsWkbTypes,
Qgis,
) )
from qgis.PyQt import QtGui, QtCore from qgis.PyQt import QtGui, QtCore
from qgis.PyQt.QtGui import QIcon from qgis.PyQt.QtGui import QIcon
@@ -238,7 +239,7 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
self.new_data(layer) self.new_data(layer)
else: else:
self.close() self.close()
iface.messageBar().pushMessage("Information:", "Cette couche n'est pas stockée dans PostgreSQL", level=1, duration=30) iface.messageBar().pushMessage("Information:", "Cette couche n'est pas stockée dans PostgreSQL", level=Qgis.Warning, duration=30)
def is_in_psql(self, layer): def is_in_psql(self, layer):
try: try:
+3 -2
View File
@@ -5,9 +5,10 @@
[general] [general]
name=CenRa_Metabase name=CenRa_Metabase
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
supportsQt6=True supportsQt6=True
description=CenRa_METABASE description=CenRa_METABASE
version=0.3.0 version=0.3.2
author=Conservatoire d'Espaces Naturels de Rhône-Alpes author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr email=si_besoin@cen-rhonealpes.fr
@@ -22,7 +23,7 @@ tracker=https://gitea.cenra-outils.org/api/v1/repos/CEN-RA/Plugin_QGIS/issues
hasProcessingProvider=no hasProcessingProvider=no
# Uncomment the following line and add your changelog: # Uncomment the following line and add your changelog:
changelog=<h2>CenRa_METABASE:</h2></br><p><h3>19/05/2025 - Version 0.3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>09/04/2025 - Version 0.2.3: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 0.2.2: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 0.2.1: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 0.2.0: </h3> - Deployment sur serveur SIG.</p></br><p><h3>07/01/2025 - Version 0.1.6: </h3> - ByPass du certif ssl ci erreur</p></br><p><h3>19/12/2024 - Version 0.1.5: </h3> - Fix les problem de lenteur qu'en la base est down.</p></br><p><h3>12/12/2024 - Version 0.1.4: </h3> - Crash Fix .</p></br><p><h3>08/10/2024 - Version 0.1.3: </h3> - Lecture de métadonnée des flux WMS/WFS.</p></br><p><h3>07/10/2024 - Version 0.1.2: </h3> - Correctif de bug.</p></br><p><h3>03/10/2024 - Version 0.1.1: </h3> - Remonte la fênetre dans la pille.</p></br><p><h3>26/08/2024 - Version 0.1.0: </h3> - Lancement du plugin CenRa_Metabase </p> changelog=<h2>CenRa_METABASE:</h2></br><p><h3>12/03/2026 - Version 0.3.2: </h3> - qgisMaximumVersion est 4.0.</p></br><p><h3>30/07/2025 - Version 0.3.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 0.3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>09/04/2025 - Version 0.2.3: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 0.2.2: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 0.2.1: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 0.2.0: </h3> - Deployment sur serveur SIG.</p></br><p><h3>07/01/2025 - Version 0.1.6: </h3> - ByPass du certif ssl ci erreur</p></br><p><h3>19/12/2024 - Version 0.1.5: </h3> - Fix les problem de lenteur qu'en la base est down.</p></br><p><h3>12/12/2024 - Version 0.1.4: </h3> - Crash Fix .</p></br><p><h3>08/10/2024 - Version 0.1.3: </h3> - Lecture de métadonnée des flux WMS/WFS.</p></br><p><h3>07/10/2024 - Version 0.1.2: </h3> - Correctif de bug.</p></br><p><h3>03/10/2024 - Version 0.1.1: </h3> - Remonte la fênetre dans la pille.</p></br><p><h3>26/08/2024 - Version 0.1.0: </h3> - Lancement du plugin CenRa_Metabase </p>
# Tags are comma separated with spaces allowed # Tags are comma separated with spaces allowed
tags=python tags=python
+3 -7
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CenRa_Metabase_editorwidget_base</class> <class>CenRa_Metabase_editorwidget_base</class>
<widget class="QDialog" name="CenRa_Metabase_editorwidget_base"> <widget class="QDialog" name="CenRa_about_base">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@@ -13,10 +13,6 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Journal des modifications</string> <string>Journal des modifications</string>
</property> </property>
<property name="windowIcon">
<iconset>
<normaloff>../../CenRa_Metabase/tools/ui/icon.svg</normaloff>../../CenRa_Metabase/tools/ui/icon.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
@@ -38,7 +34,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>453</width> <width>453</width>
<height>570</height> <height>547</height>
</rect> </rect>
</property> </property>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
@@ -70,7 +66,7 @@
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::NoButton</set> <set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
+56 -11
View File
@@ -68,6 +68,7 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
'Source': 0, 'Source': 0,
'Echelle_2': 0, 'Echelle_2': 0,
'Logo_2': 0} 'Logo_2': 0}
self.varObject = {}
path = '' path = ''
ix = 0 ix = 0
@@ -83,6 +84,7 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
self.horizontalSlider.valueChanged.connect(self.horizontal) self.horizontalSlider.valueChanged.connect(self.horizontal)
self.verticalSlider.valueChanged.connect(self.vertical) self.verticalSlider.valueChanged.connect(self.vertical)
self.tableWidget.itemSelectionChanged.connect(self.setSlider) self.tableWidget.itemSelectionChanged.connect(self.setSlider)
self.tableWidget_2.cellChanged.connect(self.setObject)
self.radioButton.toggled.connect(self.setSlider) self.radioButton.toggled.connect(self.setSlider)
self.pushButton.clicked.connect(self.export) self.pushButton.clicked.connect(self.export)
self.spinBox.editingFinished.connect(self.valueSlider) self.spinBox.editingFinished.connect(self.valueSlider)
@@ -181,8 +183,8 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
QApplication.restoreOverrideCursor() QApplication.restoreOverrideCursor()
def select_file(self): def select_file(self):
options = QFileDialog.Options() # options = QFileDialog.Options()
options |= QFileDialog.ShowDirsOnly # options |= QFileDialog.getExistingDirectory()
folder = QFileDialog.getOpenFileName(self, "Sélection du fichier ", '', 'Python(*.py)') folder = QFileDialog.getOpenFileName(self, "Sélection du fichier ", '', 'Python(*.py)')
if folder[0] != '': if folder[0] != '':
return folder[0] return folder[0]
@@ -197,7 +199,7 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
sourcefile = open(logopath, 'r') sourcefile = open(logopath, 'r')
splitsource = sourcefile.read().splitlines() splitsource = sourcefile.read().splitlines()
all_children = self.frame.children() all_children = self.frame.children()
all_element = ['_locals', '_size', '_rotate'] all_element = ['_locals', '_size', '_rotate', '_frame', '_background', '_path']
for children in all_children: for children in all_children:
flen = 0 flen = 0
for element in all_element: for element in all_element:
@@ -207,7 +209,17 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
if find_it.find(recherche_element) != -1: if find_it.find(recherche_element) != -1:
flen = flen + 1 flen = flen + 1
if flen == 1: if flen == 1:
if element != '_rotate': if element == '_frame' or element == '_background' or element == '_path':
value_find = (find_it.split('=')[1]).replace('"', '')
if children.objectName() in self.varObject:
if element[1:] in self.varObject[children.objectName()]:
self.varObject[children.objectName()][element[1:]] = value_find
else:
self.varObject[children.objectName()].update({element[1:]: value_find})
else:
self.varObject.update({children.objectName(): {element[1:]: value_find}})
# print(self.varObject)
elif element != '_rotate':
value_find = (find_it[find_it[:].find('(') + 1:-33]).split(',') value_find = (find_it[find_it[:].find('(') + 1:-33]).split(',')
if element == '_size': if element == '_size':
Psize_h = float(value_find[0]) * 3.5 Psize_h = float(value_find[0]) * 3.5
@@ -276,6 +288,8 @@ from qgis.core import (
QgsUnitTypes, QgsUnitTypes,
QgsLayoutPoint, QgsLayoutPoint,
) )
def fletch_canvas(self): def fletch_canvas(self):
if self.radioButton_6.isChecked(): if self.radioButton_6.isChecked():
values_page = 'A4' values_page = 'A4'
@@ -297,6 +311,16 @@ def fletch_canvas(self):
if values_page == '""" + page_size + """':""" if values_page == '""" + page_size + """':"""
for children in all_children: for children in all_children:
selection = children selection = children
if selection.objectName() in self.varObject:
for parametre_object in self.varObject[selection.objectName()]:
if str(selection.objectName()) != "Arrow" and str(parametre_object) != "path":
export_str = export_str + """
self.template_parameters['""" + str(selection.objectName()) + '_' + str(parametre_object) + """'] = """ + str(self.varObject[selection.objectName()][parametre_object])
elif str(selection.objectName()) == "Arrow" and str(parametre_object) == "path":
if str(self.varObject[selection.objectName()][parametre_object]) == "":
self.varObject[selection.objectName()][parametre_object] = "NorthArrow_02.svg"
export_str = export_str + """
self.template_parameters['""" + str(selection.objectName()) + '_' + str(parametre_object) + """'] = '""" + str(self.varObject[selection.objectName()][parametre_object]) + "'"
if page_type == 'Portrait': if page_type == 'Portrait':
item_rotate_object = self.varPortrait[selection.objectName() + '_rotate'][0] item_rotate_object = self.varPortrait[selection.objectName() + '_rotate'][0]
if item_rotate_object == 0 or item_rotate_object == 180: if item_rotate_object == 0 or item_rotate_object == 180:
@@ -346,7 +370,7 @@ def fletch_canvas(self):
locals_h = str(locals_h) locals_h = str(locals_h)
export_str = export_str + """ export_str = export_str + """
self.template_parameters['""" + selection.objectName() + """_size'] = QgsLayoutSize(""" + size_w + """,""" + size_h + """, QgsUnitTypes.LayoutMillimeters) self.template_parameters['""" + selection.objectName() + """_size'] = QgsLayoutSize(""" + size_w + """, """ + size_h + """, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['""" + selection.objectName() + """_locals'] = QgsLayoutPoint(""" + locals_w + """, """ + locals_h + """, QgsUnitTypes.LayoutMillimeters) self.template_parameters['""" + selection.objectName() + """_locals'] = QgsLayoutPoint(""" + locals_w + """, """ + locals_h + """, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['""" + selection.objectName() + """_rotate'] = """ + str(item_rotate_object) self.template_parameters['""" + selection.objectName() + """_rotate'] = """ + str(item_rotate_object)
export_str = export_str + """ export_str = export_str + """
@@ -406,9 +430,29 @@ def fletch_canvas(self):
frame_y = self.frame.y() frame_y = self.frame.y()
self.frame.move(frame_x, frame_y) self.frame.move(frame_x, frame_y)
def setParameter(self, selection_name):
if selection_name in self.varObject:
for table2Range in range(0, self.tableWidget_2.rowCount()):
rowName = self.tableWidget_2.item(table2Range, 0).text()
if rowName in self.varObject[selection_name]:
self.tableWidget_2.setItem(table2Range, 1, QTableWidgetItem(str(self.varObject[selection_name][rowName])))
else:
self.varObject[selection_name].update({rowName: ""})
self.tableWidget_2.setItem(table2Range, 1, QTableWidgetItem(''))
else:
self.varObject.update({selection_name: {"frame": "", "background": "", "path": ""}})
self.tableWidget_2.setItem(1, 1, QTableWidgetItem(''))
self.tableWidget_2.setItem(2, 1, QTableWidgetItem(''))
self.tableWidget_2.setItem(3, 1, QTableWidgetItem(''))
def setObject(self, event):
selection_name = (self.tableWidget.currentItem()).text()
rowName = self.tableWidget_2.item(event, 0).text()
rowValue = self.tableWidget_2.item(event, 1).text()
self.varObject[selection_name][rowName] = rowValue
def setSlider(self): def setSlider(self):
if self.tableWidget.currentItem() is not None: if self.tableWidget.currentItem() is not None:
print(self.tableWidget.tabKeyNavigation())
selection_name = (self.tableWidget.currentItem()).text() selection_name = (self.tableWidget.currentItem()).text()
all_children = self.frame.children() all_children = self.frame.children()
selection = 0 selection = 0
@@ -431,6 +475,7 @@ def fletch_canvas(self):
self.verticalSlider.setValue(yy) self.verticalSlider.setValue(yy)
self.spinBox.setValue(xx) self.spinBox.setValue(xx)
self.spinBox_2.setValue(yy) self.spinBox_2.setValue(yy)
self.setParameter(selection_name)
def rotate_color(self, selection, last_children): def rotate_color(self, selection, last_children):
global last_select global last_select
@@ -439,16 +484,16 @@ def fletch_canvas(self):
else: else:
ColorCode = "249, 238, 148, 50" ColorCode = "249, 238, 148, 50"
if self.rotate_object[selection.objectName()] == 0: if self.rotate_object[selection.objectName()] == 0:
selection.setStyleSheet("border: 2px solid;border-color:red;border-bottom-color: blue;background-color: rgb(" + ColorCode + ")") selection.setStyleSheet("border: 2px solid;border-color:red;border-bottom-color: blue;background-color: rgba(" + ColorCode + ")")
elif self.rotate_object[selection.objectName()] == 90: elif self.rotate_object[selection.objectName()] == 90:
selection.setStyleSheet("border: 2px solid;border-color:red;border-left-color: blue;background-color: rgb(" + ColorCode + ")") selection.setStyleSheet("border: 2px solid;border-color:red;border-left-color: blue;background-color: rgba(" + ColorCode + ")")
elif self.rotate_object[selection.objectName()] == 180: elif self.rotate_object[selection.objectName()] == 180:
selection.setStyleSheet("border: 2px solid;border-color:red;border-top-color: blue;background-color: rgb(" + ColorCode + ")") selection.setStyleSheet("border: 2px solid;border-color:red;border-top-color: blue;background-color: rgba(" + ColorCode + ")")
elif self.rotate_object[selection.objectName()] == 270: elif self.rotate_object[selection.objectName()] == 270:
selection.setStyleSheet("border: 2px solid;border-color:red;border-right-color: blue;background-color: rgb(" + ColorCode + ")") selection.setStyleSheet("border: 2px solid;border-color:red;border-right-color: blue;background-color: rgba(" + ColorCode + ")")
if last_children != 0: if last_children != 0:
if last_select != selection.objectName(): if last_select != selection.objectName():
last_children.setStyleSheet("background-color: rgb(10, 10, 10, 50)") last_children.setStyleSheet("background-color: rgba(10, 10, 10, 50)")
last_select = selection.objectName() last_select = selection.objectName()
+54 -52
View File
@@ -4,6 +4,8 @@ from qgis.core import (
QgsUnitTypes, QgsUnitTypes,
QgsLayoutPoint, QgsLayoutPoint,
) )
def fletch_canvas(self): def fletch_canvas(self):
if self.radioButton_6.isChecked(): if self.radioButton_6.isChecked():
values_page = 'A4' values_page = 'A4'
@@ -16,152 +18,152 @@ def fletch_canvas(self):
if page_rotate == 'Portrait': if page_rotate == 'Portrait':
if values_page == 'A4': if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(200.0,200, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(200.0, 200, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(85.71428571428571,69, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(85.71428571428571, 69, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(209, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(209, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Legande_size'] = QgsLayoutSize(140.0,147, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(85.71428571428571, 131, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(41, 110, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(209, 74, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(189, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(189, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_size'] = QgsLayoutSize(51.42857142857143,7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(51.42857142857143, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(9, 197, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(9, 197, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(45.714285714285715,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(45.714285714285715, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(154.28571428571428,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(154.28571428571428, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(51, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(51, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(51.42857142857143, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(151, 197, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(151, 197, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Source_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(51.42857142857143, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(229, 197, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(229, 197, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(125.71428571428571,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(125.71428571428571, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(60, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(60, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(51.42857142857143,13, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(51.42857142857143, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(9, 184, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(9, 184, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(28.571428571428573,29, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(28.571428571428573, 29, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(9, 151, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(9, 151, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A3': if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(282,282, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(282, 282, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(121,97, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(121, 97, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(294, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(294, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Legande_size'] = QgsLayoutSize(197,207, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(121, 185, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(58, 156, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(294, 105, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(20, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(266, 28, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(266, 28, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_size'] = QgsLayoutSize(73,10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(73, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(12, 278, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(12, 278, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(64,16, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(64, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(218,16, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(218, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(73, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(73, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(73, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(214, 278, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(214, 278, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Source_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(73, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(322, 278, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(322, 278, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(177,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(177, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(85, 28, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(85, 28, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(73,18, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(73, 18, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(12, 260, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(12, 260, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40,40, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(40, 40, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(12, 214, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(12, 214, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
if page_rotate == 'Landscape': if page_rotate == 'Landscape':
if values_page == 'A4': if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(200.0,200, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(200.0, 200, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(85.71428571428571,69, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(85.71428571428571, 69, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(209, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(209, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Legande_size'] = QgsLayoutSize(140.0,147, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(85.71428571428571, 131, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(49, 15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(209, 74, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(189, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(189, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_size'] = QgsLayoutSize(51.42857142857143,7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(51.42857142857143, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(9, 197, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(9, 197, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(45.714285714285715,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(45.714285714285715, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(154.28571428571428,11, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(154.28571428571428, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(51, 3, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(51, 3, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(51.42857142857143, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(151, 197, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(151, 197, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Source_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(51.42857142857143, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(229, 197, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(229, 197, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(125.71428571428571,14, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(125.71428571428571, 14, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(60, 20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(60, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(51.42857142857143,13, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(51.42857142857143, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(9, 184, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(9, 184, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(28.571428571428573,29, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(28.571428571428573, 29, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(9, 151, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(9, 151, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
if values_page == 'A3': if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(282,282, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(282, 282, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0 self.template_parameters['Carte_rotate'] = 0
self.template_parameters['Carte_2_size'] = QgsLayoutSize(121,97, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(121, 97, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(294, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(294, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0 self.template_parameters['Carte_2_rotate'] = 0
self.template_parameters['Legande_size'] = QgsLayoutSize(197,207, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(121, 185, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(69, 21, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(294, 105, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0 self.template_parameters['Legande_rotate'] = 0
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(20, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(266, 28, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(266, 28, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0 self.template_parameters['Arrow_rotate'] = 0
self.template_parameters['Echelle_size'] = QgsLayoutSize(73,10, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(73, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(12, 278, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(12, 278, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0 self.template_parameters['Echelle_rotate'] = 0
self.template_parameters['Logo_size'] = QgsLayoutSize(64,16, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_size'] = QgsLayoutSize(64, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_rotate'] = 0 self.template_parameters['Logo_rotate'] = 0
self.template_parameters['Titre_size'] = QgsLayoutSize(218,16, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_size'] = QgsLayoutSize(218, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_locals'] = QgsLayoutPoint(73, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Titre_locals'] = QgsLayoutPoint(73, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Titre_rotate'] = 0 self.template_parameters['Titre_rotate'] = 0
self.template_parameters['Credit_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(73, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(214, 278, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(214, 278, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 0 self.template_parameters['Credit_rotate'] = 0
self.template_parameters['Source_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(73, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(322, 278, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(322, 278, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0 self.template_parameters['Source_rotate'] = 0
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(177,20, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(177, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(85, 28, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(85, 28, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0 self.template_parameters['Sous_titre_rotate'] = 0
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(73,18, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_size'] = QgsLayoutSize(73, 18, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(12, 260, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(12, 260, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_2_rotate'] = 0 self.template_parameters['Echelle_2_rotate'] = 0
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40,40, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(40, 40, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(12, 214, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(12, 214, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_rotate'] = 0 self.template_parameters['Logo_2_rotate'] = 0
return self.template_parameters return self.template_parameters
+3 -2
View File
@@ -5,9 +5,10 @@
[general] [general]
name=CenRa_PageRender name=CenRa_PageRender
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
supportsQt6=True supportsQt6=True
description=CenRa_PageRender description=CenRa_PageRender
version=0.2.0 version=0.2.5
author=Conservatoire d'Espaces Naturels de Rhône-Alpes author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr email=si_besoin@cen-rhonealpes.fr
@@ -22,7 +23,7 @@ tracker=https://gitea.cenra-outils.org/api/v1/repos/CEN-RA/Plugin_QGIS/issues
hasProcessingProvider=no hasProcessingProvider=no
# Uncomment the following line and add your changelog: # Uncomment the following line and add your changelog:
changelog=<h2>CenRa_PAGERENDER:</h2></br><p><h3>19/05/2025 - Version 0.2.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>03/04/2025 - Version 0.1.6: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 0.1.5: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>14/11/2024 - Version 0.1.4: </h3> - Implementation de la mollet. </br> - Implementation du dragging pour déplacer et modification de la taille </br></p></br><p><h3>08/11/2024 - Version 0.1.3: </h3> - Correctif de bug. </br><p><h3>21/10/2024 - Version 0.1.1: </h3> - Les match en if. </br> - Bouton de scroll et adaptation portrait.</p></br><p><h3>09/10/2024 - Version 0.1.0: </h3> - Création.</p> changelog=<h2>CenRa_PAGERENDER:</h2></br><p><h3>23/03/2026 - Version 0.2.5: </h3> - Pache mineur.</p></br><p><h3>12/03/2026 - Version 0.2.4: </h3> - qgisMaximumVersion est 4.0.</p></br><p><h3>15/12/2025 - Version 0.2.3: </h3> - nouveau systeme de parametrage.</p></br><p><h3>12/12/2025 - Version 0.2.2: </h3> - bug sur le background.</p></br><p><h3>30/07/2025 - Version 0.2.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 0.2.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>03/04/2025 - Version 0.1.6: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 0.1.5: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>14/11/2024 - Version 0.1.4: </h3> - Implementation de la mollet. </br> - Implementation du dragging pour déplacer et modification de la taille </br></p></br><p><h3>08/11/2024 - Version 0.1.3: </h3> - Correctif de bug. </br><p><h3>21/10/2024 - Version 0.1.1: </h3> - Les match en if. </br> - Bouton de scroll et adaptation portrait.</p></br><p><h3>09/10/2024 - Version 0.1.0: </h3> - Création.</p>
# Tags are comma separated with spaces allowed # Tags are comma separated with spaces allowed
tags=python tags=python
+1 -1
View File
@@ -147,7 +147,7 @@ def maj_verif(NAME):
try: try:
urllib.request.urlopen('https://google.com') urllib.request.urlopen('https://google.com')
binar = True binar = True
except urllib.requests.URLError: except urllib.error.URLError:
binar = False binar = False
if binar: if binar:
try: try:
@@ -118,12 +118,6 @@
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QFrame#frame{background-color: rgb(255, 255, 255, 170);}</string> <string notr="true">QFrame#frame{background-color: rgb(255, 255, 255, 170);}</string>
</property> </property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QLabel" name="Carte"> <widget class="QLabel" name="Carte">
<property name="geometry"> <property name="geometry">
<rect> <rect>
@@ -133,27 +127,15 @@
<height>700</height> <height>700</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>5</number>
</property>
<property name="midLineWidth">
<number>2</number>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="margin"> <property name="margin">
<number>5</number> <number>5</number>
</property> </property>
@@ -167,11 +149,11 @@
<height>240</height> <height>240</height>
</rect> </rect>
</property> </property>
<property name="styleSheet"> <property name="autoFillBackground">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <bool>false</bool>
</property> </property>
<property name="frameShadow"> <property name="styleSheet">
<enum>QFrame::Plain</enum> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -186,8 +168,11 @@
<height>460</height> <height>460</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -202,8 +187,11 @@
<height>50</height> <height>50</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -218,8 +206,11 @@
<height>25</height> <height>25</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -234,8 +225,11 @@
<height>40</height> <height>40</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -257,19 +251,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>-1</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -277,9 +259,6 @@
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap"> <property name="wordWrap">
<bool>false</bool> <bool>false</bool>
</property> </property>
@@ -299,8 +278,11 @@
<height>20</height> <height>20</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -315,8 +297,11 @@
<height>20</height> <height>20</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -338,19 +323,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>-1</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -358,9 +331,6 @@
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
</property>
<property name="wordWrap"> <property name="wordWrap">
<bool>false</bool> <bool>false</bool>
</property> </property>
@@ -380,8 +350,11 @@
<height>45</height> <height>45</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -396,8 +369,11 @@
<height>100</height> <height>100</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">background-color: rgb(10, 10, 10, 50)</string> <string notr="true">background-color: rgba(10, 10, 10, 50)</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@@ -416,29 +392,23 @@
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QFrame#frame_2{background-color: rgb(255, 255, 255, 170);}</string> <string notr="true">QFrame#frame_2{background-color: rgb(255, 255, 255, 170);}</string>
</property> </property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QTableWidget" name="tableWidget"> <widget class="QTableWidget" name="tableWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>10</y> <y>10</y>
<width>161</width> <width>161</width>
<height>641</height> <height>381</height>
</rect> </rect>
</property> </property>
<property name="midLineWidth"> <property name="midLineWidth">
<number>1</number> <number>1</number>
</property> </property>
<property name="horizontalScrollBarPolicy"> <property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum> <enum>Qt::ScrollBarAsNeeded</enum>
</property> </property>
<property name="sizeAdjustPolicy"> <property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum> <enum>QAbstractScrollArea::AdjustIgnored</enum>
</property> </property>
<property name="editTriggers"> <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set> <set>QAbstractItemView::NoEditTriggers</set>
@@ -462,10 +432,10 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="selectionMode"> <property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum> <enum>QAbstractItemView::NoSelection</enum>
</property> </property>
<property name="selectionBehavior"> <property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum> <enum>QAbstractItemView::SelectItems</enum>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@@ -474,7 +444,7 @@
</size> </size>
</property> </property>
<property name="textElideMode"> <property name="textElideMode">
<enum>Qt::ElideMiddle</enum> <enum>Qt::ElideLeft</enum>
</property> </property>
<property name="showGrid"> <property name="showGrid">
<bool>true</bool> <bool>true</bool>
@@ -535,7 +505,7 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
<y>650</y> <y>660</y>
<width>161</width> <width>161</width>
<height>21</height> <height>21</height>
</rect> </rect>
@@ -544,6 +514,117 @@
<string>Load</string> <string>Load</string>
</property> </property>
</widget> </widget>
<widget class="QTableWidget" name="tableWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>400</y>
<width>161</width>
<height>241</height>
</rect>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustIgnored</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="dragEnabled">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="defaultDropAction">
<enum>Qt::IgnoreAction</enum>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="iconSize">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
<property name="textElideMode">
<enum>Qt::ElideLeft</enum>
</property>
<property name="showGrid">
<bool>true</bool>
</property>
<property name="cornerButtonEnabled">
<bool>true</bool>
</property>
<property name="rowCount">
<number>3</number>
</property>
<property name="columnCount">
<number>2</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>50</number>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>78</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderMinimumSectionSize">
<number>20</number>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>30</number>
</attribute>
<row/>
<row/>
<row/>
<column/>
<column/>
<item row="0" column="0">
<property name="text">
<string>frame</string>
</property>
</item>
<item row="1" column="0">
<property name="text">
<string>background</string>
</property>
</item>
<item row="2" column="0">
<property name="text">
<string>path</string>
</property>
</item>
</widget>
</widget> </widget>
<widget class="QRadioButton" name="radioButton"> <widget class="QRadioButton" name="radioButton">
<property name="geometry"> <property name="geometry">
@@ -595,12 +676,12 @@
<rect> <rect>
<x>240</x> <x>240</x>
<y>10</y> <y>10</y>
<width>61</width> <width>88</width>
<height>22</height> <height>22</height>
</rect> </rect>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::UpDownArrows</enum>
</property> </property>
<property name="suffix"> <property name="suffix">
<string/> <string/>
@@ -617,12 +698,12 @@
<rect> <rect>
<x>310</x> <x>310</x>
<y>10</y> <y>10</y>
<width>61</width> <width>88</width>
<height>22</height> <height>22</height>
</rect> </rect>
</property> </property>
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::UpDownArrows</enum>
</property> </property>
<property name="suffix"> <property name="suffix">
<string/> <string/>
@@ -671,9 +752,6 @@
<property name="value"> <property name="value">
<number>40</number> <number>40</number>
</property> </property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="invertedAppearance"> <property name="invertedAppearance">
<bool>true</bool> <bool>true</bool>
</property> </property>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CenRa_Metabase_editorwidget_base</class> <class>CenRa_Metabase_editorwidget_base</class>
<widget class="QDialog" name="CenRa_Metabase_editorwidget_base"> <widget class="QDialog" name="CenRa_about_base">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@@ -13,10 +13,6 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Journal des modifications</string> <string>Journal des modifications</string>
</property> </property>
<property name="windowIcon">
<iconset>
<normaloff>../../CenRa_Metabase/tools/ui/icon.svg</normaloff>../../CenRa_Metabase/tools/ui/icon.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
@@ -38,7 +34,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>453</width> <width>453</width>
<height>570</height> <height>547</height>
</rect> </rect>
</property> </property>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
@@ -70,7 +66,7 @@
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::NoButton</set> <set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
+10 -14
View File
@@ -25,10 +25,12 @@ from .tools.resources import (
) )
pyperclip() pyperclip()
from .postgis_editor import Postgis_Editor try:
from .postgis_creator import Postgis_Creator from .postgis_editor import Postgis_Editor
from .postgis_rename import Postgis_Rename from .postgis_creator import Postgis_Creator
from .postgis_rename import Postgis_Rename
except NameError:
print('Module introuvable...')
IPAddr = socket.gethostbyname(socket.gethostname()) IPAddr = socket.gethostbyname(socket.gethostname())
@@ -101,19 +103,13 @@ class PgPostgis:
self.postgis_rename = QAction(icon3, 'dossier_rename', None) self.postgis_rename = QAction(icon3, 'dossier_rename', None)
self.toolBar.addAction(self.postgis_rename) self.toolBar.addAction(self.postgis_rename)
self.postgis_rename.triggered.connect(self.open_rename) self.postgis_rename.triggered.connect(self.open_rename)
self.postgis_rename.setEnabled(False)
self.postgis_rename.setVisible(0)
if os.environ['USERNAME'] == 'tlaveille' or os.environ['USERNAME'] == 'lpoulin' or os.environ['USERNAME'] == 'rclement': if os.environ['USERNAME'] == 'tlaveille' or os.environ['USERNAME'] == 'lpoulin' or os.environ['USERNAME'] == 'rclement':
self.action_rename.setEnabled(True) if os.access('N:/', os.R_OK):
self.postgis_rename.setEnabled(True) self.postgis_rename.setEnabled(True)
self.postgis_rename.setVisible(1) self.postgis_rename.setVisible(1)
else:
self.action_rename.setEnabled(False)
self.postgis_rename.setEnabled(False)
self.postgis_rename.setVisible(0)
self.postgis_rename.setEnabled(False)
if os.access('N:/', os.R_OK):
self.postgis_rename.setEnabled(True)
def open_about_dialog(self): def open_about_dialog(self):
""" """
+3 -2
View File
@@ -11,9 +11,10 @@
[general] [general]
name=CenRa_POSTGIS name=CenRa_POSTGIS
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
supportsQt6=True supportsQt6=True
description=Permet de crée un dossier dans la base PostGis description=Permet de crée un dossier dans la base PostGis
version=3.0 version=3.4
author=Conservatoire d'Espaces Naturels de Rhône-Alpes author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr email=si_besoin@cen-rhonealpes.fr
@@ -22,7 +23,7 @@ email=si_besoin@cen-rhonealpes.fr
# Optional items: # Optional items:
# Uncomment the following line and add your changelog entries: # Uncomment the following line and add your changelog entries:
changelog=<h2>CenRa_POSTGIS:</h2></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>09/04/2025 - Version 2.9: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.8: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 2.7: </h3> - Mise a jour de securite.</p></br><p><h3>12/02/2025 - Version 2.6: </h3> - InDev:renomé les schema et table.</p></br><p><h3>04/02/2025 - Version 2.5: </h3> - Correctif bug création de couche.</p></br><p><h3>23/01/2025 - Version 2.4: </h3> - Correctif sur les pkey.</p></br><p><h3>22/01/2025 - Version 2.3: </h3> - Correctif sur la creation de projet.</p></br><p><h3>21/01/2025 - Version 2.2: </h3> - Correctif sur la longeur des nom.</p></br><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.0:</h3>- Refont du code.</p> changelog=<h2>CenRa_POSTGIS:</h2></br><p><h3>21/05/2026 - Version 3.4: </h3> - Optimisation des performances hors connexion.</p></br><p><h3>23/03/2026 - Version 3.3: </h3> - Optimisation pour QGIS.</p></br><p><h3>12/03/2026 - Version 3.2: </h3> - qgisMaximumVersion est 4.0.</p></br><p><h3>30/07/2025 - Version 3.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>09/04/2025 - Version 2.9: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.8: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 2.7: </h3> - Mise a jour de securite.</p></br><p><h3>12/02/2025 - Version 2.6: </h3> - InDev:renomé les schema et table.</p></br><p><h3>04/02/2025 - Version 2.5: </h3> - Correctif bug création de couche.</p></br><p><h3>23/01/2025 - Version 2.4: </h3> - Correctif sur les pkey.</p></br><p><h3>22/01/2025 - Version 2.3: </h3> - Correctif sur la creation de projet.</p></br><p><h3>21/01/2025 - Version 2.2: </h3> - Correctif sur la longeur des nom.</p></br><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.0:</h3>- Refont du code.</p>
# tags are comma separated with spaces allowed # tags are comma separated with spaces allowed
tags=cenra, postgis, database tags=cenra, postgis, database
+5 -4
View File
@@ -5,7 +5,7 @@ from __future__ import absolute_import
# from builtins import next # from builtins import next
# from builtins import str # from builtins import str
# from builtins import object # from builtins import object
# import qgis import os
from qgis.PyQt.QtCore import QSettings from qgis.PyQt.QtCore import QSettings
from qgis.PyQt.QtWidgets import QDialog, QMessageBox from qgis.PyQt.QtWidgets import QDialog, QMessageBox
# from qgis.PyQt.QtGui import QIcon # from qgis.PyQt.QtGui import QIcon
@@ -15,10 +15,11 @@ from qgis.PyQt.QtWidgets import QDialog, QMessageBox
from qgis.PyQt import QtGui from qgis.PyQt import QtGui
# from qgis.core import * # from qgis.core import *
from qgis.core import QgsSettings from qgis.core import QgsSettings, Qgis
try: try:
from .tools.PythonSQL import login_base if os.path.exists('N:'):
from .tools.PythonSQL import login_base
except ValueError: except ValueError:
print('Pas de fichier PythonSQL') print('Pas de fichier PythonSQL')
@@ -98,7 +99,7 @@ class Postgis_Creator(QDialog, EDITOR_CLASS):
cur.execute(SQL_schema) cur.execute(SQL_schema)
cur.execute(SQL_GRANT_SCHEMA) cur.execute(SQL_GRANT_SCHEMA)
else: else:
iface.messageBar().pushMessage("POSTGRESQL :", "Pas de couche sélectionnée, création refusée.", level=1, duration=30) iface.messageBar().pushMessage("POSTGRESQL :", "Pas de couche sélectionnée, création refusée.", level=Qgis.Warning, duration=30)
create_contour(self, schema, cur, con, host, port, dbname, user, mdp) create_contour(self, schema, cur, con, host, port, dbname, user, mdp)
create_habita(self, schema, cur, con, host, port, dbname, user, mdp) create_habita(self, schema, cur, con, host, port, dbname, user, mdp)
+4 -3
View File
@@ -4,8 +4,8 @@ from __future__ import absolute_import
# Import the PyQt and QGIS libraries # Import the PyQt and QGIS libraries
from builtins import next from builtins import next
from builtins import str from builtins import str
# from builtins import object import os
# import qgis
from qgis.PyQt.QtCore import QSettings from qgis.PyQt.QtCore import QSettings
from qgis.PyQt.QtWidgets import QDialog, QMessageBox from qgis.PyQt.QtWidgets import QDialog, QMessageBox
# from qgis.PyQt.QtGui import QIcon # from qgis.PyQt.QtGui import QIcon
@@ -16,7 +16,8 @@ from qgis.PyQt import QtGui
from qgis.core import QgsSettings from qgis.core import QgsSettings
try: try:
from .tools.PythonSQL import login_base if os.path.exists('N:'):
from .tools.PythonSQL import login_base
except ValueError: except ValueError:
print('Pas de fichier PythonSQL') print('Pas de fichier PythonSQL')
# from .tools.SQLRequet import * # from .tools.SQLRequet import *
+5 -4
View File
@@ -5,7 +5,7 @@ from __future__ import absolute_import
# from builtins import next # from builtins import next
from builtins import str from builtins import str
# from builtins import object # from builtins import object
# import qgis import os
from qgis.PyQt.QtCore import QSettings from qgis.PyQt.QtCore import QSettings
from qgis.PyQt.QtWidgets import QDialog, QMessageBox, QDialogButtonBox from qgis.PyQt.QtWidgets import QDialog, QMessageBox, QDialogButtonBox
# from qgis.PyQt.QtGui import QIcon # from qgis.PyQt.QtGui import QIcon
@@ -18,7 +18,8 @@ from qgis.PyQt import QtGui
from qgis.core import QgsSettings, QgsDataSourceUri, QgsProject from qgis.core import QgsSettings, QgsDataSourceUri, QgsProject
try: try:
from .tools.PythonSQL import login_base if os.path.exists('N:'):
from .tools.PythonSQL import login_base
except ValueError: except ValueError:
print('Pas de fichier PythonSQL') print('Pas de fichier PythonSQL')
# from .tools.SQLRequet import * # from .tools.SQLRequet import *
@@ -48,8 +49,8 @@ try:
dbname = account[4] dbname = account[4]
cur = account[7] cur = account[7]
con = account[8] con = account[8]
except ValueError: except NameError:
print('') print('Fails to login DB for account')
class Postgis_Rename(QDialog, EDITOR_CLASS): class Postgis_Rename(QDialog, EDITOR_CLASS):
+3 -3
View File
@@ -156,7 +156,7 @@ def maj_verif(NAME):
# url = qgis.utils.pluginMetadata(NAME, 'repository') # url = qgis.utils.pluginMetadata(NAME, 'repository')
# URL = url+'/raw/branch/main/plugins.xml' # URL = url+'/raw/branch/main/plugins.xml'
URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/plugins.xml' URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/plugins.xml'
# print(URL) # print(URL)
version = qgis.utils.pluginMetadata(NAME, 'version') version = qgis.utils.pluginMetadata(NAME, 'version')
len_version = len(version) len_version = len(version)
try: try:
@@ -169,10 +169,10 @@ def maj_verif(NAME):
version_web = str(urllib.request.urlopen(URL).read()) version_web = str(urllib.request.urlopen(URL).read())
plugin_num = version_web.find(NAME) plugin_num = version_web.find(NAME)
valeur_version_web = version_web.find('<version>', plugin_num) + 9 valeur_version_web = version_web.find('<version>', plugin_num) + 9
version_plugin = version_web[valeur_version_web:valeur_version_web + len_version] version_plugin = version_web[valeur_version_web: valeur_version_web + len_version]
if version_plugin != version: if version_plugin != version:
iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30) iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30)
except urllib.error.URLError: except NameError:
print("error gitea version ssl") print("error gitea version ssl")
else: else:
iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30) iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30)
+3 -7
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>CenRa_Metabase_editorwidget_base</class> <class>CenRa_Metabase_editorwidget_base</class>
<widget class="QDialog" name="CenRa_Metabase_editorwidget_base"> <widget class="QDialog" name="CenRa_about_base">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@@ -13,10 +13,6 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Journal des modifications</string> <string>Journal des modifications</string>
</property> </property>
<property name="windowIcon">
<iconset>
<normaloff>../../CenRa_Metabase/tools/ui/icon.svg</normaloff>../../CenRa_Metabase/tools/ui/icon.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QScrollArea" name="scrollArea"> <widget class="QScrollArea" name="scrollArea">
@@ -38,7 +34,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>453</width> <width>453</width>
<height>570</height> <height>547</height>
</rect> </rect>
</property> </property>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
@@ -70,7 +66,7 @@
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::NoButton</set> <set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
+3 -2
View File
@@ -11,9 +11,10 @@
[general] [general]
name=CenRa SICEN name=CenRa SICEN
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
qgisMaximumVersion=4.99
supportsQt6=True supportsQt6=True
description=Filtre des données saisies dans SICEN et export d'une liste d'espèces. description=Filtre des données saisies dans SICEN et export d'une liste d'espèces.
version=2.0 version=2.2
author=Conservatoire d'Espaces Naturels de Rhône-Alpes author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr email=si_besoin@cen-rhonealpes.fr
@@ -22,7 +23,7 @@ email=si_besoin@cen-rhonealpes.fr
# Optional items: # Optional items:
# Uncomment the following line and add your changelog entries: # Uncomment the following line and add your changelog entries:
changelog=<h2>CenRa_SICEN:</h2></br><p><h3>19/05/2025 - Version 2.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>09/04/2025 - Version 1.11: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 1.10: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 1.9: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 1.8: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>13/09/2024 - Version 1.7:</h3> - Il est maintenant possible de sélectionné plusieurs entité pour le filtre par Emprise.</br>- Ajoute d'un changelog.</br>- Ajoute une vérification de mise à jour.</p> changelog=<h2>CenRa_SICEN:</h2></br><p><h3>12/03/2026 - Version 2.2: </h3> - qgisMaximumVersion est 4.0.</p></br><p><h3>30/07/2025 - Version 2.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 2.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>09/04/2025 - Version 1.11: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 1.10: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 1.9: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 1.8: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>13/09/2024 - Version 1.7:</h3> - Il est maintenant possible de sélectionné plusieurs entité pour le filtre par Emprise.</br>- Ajoute d'un changelog.</br>- Ajoute une vérification de mise à jour.</p>
# tags are comma separated with spaces allowed # tags are comma separated with spaces allowed
tags=cenra, postgis, sicen tags=cenra, postgis, sicen
+34 -37
View File
@@ -5,13 +5,13 @@ from builtins import object
import os import os
# from qgis.PyQt import uic # from qgis.PyQt import uic
from qgis.core import QgsDataSourceUri, QgsLayerTreeLayer, QgsProject, QgsVectorLayer from qgis.core import QgsDataSourceUri, QgsLayerTreeLayer, QgsProject, QgsVectorLayer, Qgis
from qgis.PyQt.QtGui import QIcon from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QMenu, QAction, QFileDialog from qgis.PyQt.QtWidgets import QMenu, QAction, QFileDialog
from qgis.PyQt.QtCore import QSettings, QTranslator, QCoreApplication, qVersion from qgis.PyQt.QtCore import QSettings, QTranslator, QCoreApplication, qVersion
# Initialize Qt resources from file resources.py # Initialize Qt resources from file resources.py
from . import resources_rc # from . import resources_rc
# Import the code for the dialog # Import the code for the dialog
from .sicendialog import SICENDialog from .sicendialog import SICENDialog
@@ -22,21 +22,16 @@ import csv
from .forms.about_form import AboutDialog from .forms.about_form import AboutDialog
# import psycopg2
# import psycopg2.extras
# import base64
import socket import socket
import os import os
from .tools.resources import maj_verif, pyperclip from .tools.resources import maj_verif, pyperclip, resources_path
pyperclip() pyperclip()
try: try:
from .tools.PythonSQL import login_base from .tools.PythonSQL import login_base
except ValueError: except ValueError:
print('Pas de fichier PythonSQL') print('Pas de fichier PythonSQL')
# import sys
class SICEN(object): class SICEN(object):
@@ -73,43 +68,43 @@ class SICEN(object):
self.toolBar.setObjectName("SICEN") self.toolBar.setObjectName("SICEN")
# Create action that will start plugin configuration # Create action that will start plugin configuration
self.action = QAction( self.action_open = QAction(
QIcon(":/plugins/sicen/sicen.png"), QIcon(resources_path("icon", "sicen.png")),
u"Ouverture des données SICEN", self.iface.mainWindow()) u"Ouverture des données SICEN", self.iface.mainWindow())
self.action.setEnabled(False) self.action_open.setEnabled(False)
if os.access('N:/', os.R_OK): if os.access('N:/', os.R_OK):
self.action.setEnabled(True) self.action_open.setEnabled(True)
# connect the action to the run method # connect the action to the run method
self.action.triggered.connect(self.ouverture) self.action_open.triggered.connect(self.ouverture)
# Add toolbar button and menu item # Add toolbar button and menu item
self.toolBar.addAction(self.action) self.toolBar.addAction(self.action_open)
self.iface.addPluginToMenu(u"SICEN", self.action) self.iface.addPluginToMenu(u"SICEN", self.action_open)
# Create action that will start plugin configuration # Create action that will start plugin configuration
self.action = QAction( self.action_export = QAction(
QIcon(":/plugins/sicen/sicen_export.png"), QIcon(resources_path("icon", "sicen_export.png")),
u"Export liste d'espèces", self.iface.mainWindow()) u"Export liste d'espèces", self.iface.mainWindow())
self.action.setEnabled(False) self.action_export.setEnabled(False)
IPAddr = socket.gethostbyname(socket.gethostname()) IPAddr = socket.gethostbyname(socket.gethostname())
if IPAddr[0:11] == "100.100.100": if IPAddr[0:11] == "100.100.100":
self.action.setEnabled(True) self.action_export.setEnabled(True)
elif IPAddr[0:9] == "192.168.0": elif IPAddr[0:9] == "192.168.0":
self.action.setEnabled(True) self.action_export.setEnabled(True)
elif IPAddr[0:9] == "192.168.1": elif IPAddr[0:9] == "192.168.1":
self.action.setEnabled(True) self.action_export.setEnabled(True)
# connect the action to the run method # connect the action to the run method
self.action.triggered.connect(self.export) self.action_export.triggered.connect(self.export)
# Add toolbar button and menu item # Add toolbar button and menu item
self.toolBar.addAction(self.action) self.toolBar.addAction(self.action_export)
self.iface.addPluginToMenu(u"SICEN", self.action) self.iface.addPluginToMenu(u"SICEN", self.action_export)
self.menu = QMenu() self.menu = QMenu()
self.menu.setTitle(QCoreApplication.translate("SICEN", "&SICEN")) self.menu.setTitle(QCoreApplication.translate("SICEN", "&SICEN"))
self.sicen_ouverture = QAction(QIcon(":/plugins/SICEN/sicen.png"), QCoreApplication.translate("SICEN", u"Ouverture des données SICEN"), self.iface.mainWindow()) self.sicen_ouverture = QAction(QIcon(resources_path("icon", "sicen.png")), QCoreApplication.translate("SICEN", u"Ouverture des données SICEN"), self.iface.mainWindow())
self.sicen_export = QAction(QIcon(":/plugins/SICEN/sicen_export.png"), QCoreApplication.translate("SICEN", u"Export liste d'espèces"), self.iface.mainWindow()) self.sicen_export = QAction(QIcon(resources_path("icon", "sicen_export.png")), QCoreApplication.translate("SICEN", u"Export liste d'espèces"), self.iface.mainWindow())
self.menu.addActions([self.sicen_ouverture, self.sicen_export]) self.menu.addActions([self.sicen_ouverture, self.sicen_export])
@@ -127,8 +122,10 @@ class SICEN(object):
def unload(self): def unload(self):
# Remove the plugin menu item and icon # Remove the plugin menu item and icon
self.iface.removePluginMenu(u"&SICEN", self.action) self.iface.removePluginMenu(u"&SICEN", self.action_open)
self.iface.removeToolBarIcon(self.action) self.iface.removeToolBarIcon(self.action_open)
self.iface.removePluginMenu(u"&SICEN", self.action_export)
self.iface.removeToolBarIcon(self.action_export)
# run method that performs all the real work # run method that performs all the real work
def ouverture(self): def ouverture(self):
@@ -553,7 +550,7 @@ class SICEN(object):
layer = self.iface.activeLayer() layer = self.iface.activeLayer()
if layer is None: if layer is None:
# self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5) # self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=1, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=Qgis.Warning, duration=5)
else: else:
selection = layer.selectedFeatures() selection = layer.selectedFeatures()
@@ -688,16 +685,16 @@ class SICEN(object):
# legende.setGroupExpanded (index, True) # legende.setGroupExpanded (index, True)
# self.iface.messageBar().pushMessage(u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=QgsMessageBar.INFO, duration=10) # self.iface.messageBar().pushMessage(u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=QgsMessageBar.INFO, duration=10)
self.iface.messageBar().pushMessage("Info", u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=0, duration=4) self.iface.messageBar().pushMessage("Info", u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=Qgis.Info, duration=4)
elif layer.selectedFeatureCount() == 0: elif layer.selectedFeatureCount() == 0:
# self.iface.messageBar().pushMessage(u"Vous devez sélectionner au moins un polygone !", level=QgsMessageBar.WARNING, duration=5) # self.iface.messageBar().pushMessage(u"Vous devez sélectionner au moins un polygone !", level=QgsMessageBar.WARNING, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner au moins un polygone !", level=1, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner au moins un polygone !", level=Qgis.Warning, duration=5)
reqwhere_geom = '' reqwhere_geom = ''
else: else:
# self.iface.messageBar().pushMessage(u"Vous devez sélectionner qu'un seul polygone !", level=QgsMessageBar.WARNING, duration=5) # self.iface.messageBar().pushMessage(u"Vous devez sélectionner qu'un seul polygone !", level=QgsMessageBar.WARNING, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Vous ne devez sélectionner qu'un seul polygone !", level=1, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous ne devez sélectionner qu'un seul polygone !", level=Qgis.Warning, duration=5)
reqwhere_geom = '' reqwhere_geom = ''
else: else:
# Requete finale # Requete finale
@@ -819,7 +816,7 @@ class SICEN(object):
# legende.setGroupExpanded (index, True) # legende.setGroupExpanded (index, True)
# self.iface.messageBar().pushMessage(u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=QgsMessageBar.INFO, duration=10) # self.iface.messageBar().pushMessage(u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=QgsMessageBar.INFO, duration=10)
self.iface.messageBar().pushMessage("Info", u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=0, duration=10) self.iface.messageBar().pushMessage("Info", u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=Qgis.Info, duration=10)
pass pass
@@ -829,7 +826,7 @@ class SICEN(object):
if layer is None: if layer is None:
# self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5) # self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=1, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=Qgis.Warning, duration=5)
else: else:
selection = layer.selectedFeatures() selection = layer.selectedFeatures()
@@ -912,12 +909,12 @@ class SICEN(object):
file.close() file.close()
# self.iface.messageBar().pushMessage(u"Export réussi dans " + chemin_fichier , level=QgsMessageBar.INFO, duration=5) # self.iface.messageBar().pushMessage(u"Export réussi dans " + chemin_fichier , level=QgsMessageBar.INFO, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Export réussi dans " + chemin_fichier, level=0, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Export réussi dans " + chemin_fichier, level=Qgis.Info, duration=5)
elif (layer.selectedFeatureCount() == 0): elif (layer.selectedFeatureCount() == 0):
# self.iface.messageBar().pushMessage(u"Vous devez sélectionner au moins un polygone !", level=QgsMessageBar.WARNING, duration=5) # self.iface.messageBar().pushMessage(u"Vous devez sélectionner au moins un polygone !", level=QgsMessageBar.WARNING, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner au moins un polygone !", level=1, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner au moins un polygone !", level=Qgis.Warning, duration=5)
else: else:
# self.iface.messageBar().pushMessage(u"Vous devez sélectionner qu'un seul polygone !", level=QgsMessageBar.WARNING, duration=5) # self.iface.messageBar().pushMessage(u"Vous devez sélectionner qu'un seul polygone !", level=QgsMessageBar.WARNING, duration=5)
self.iface.messageBar().pushMessage("Ooops", u"Vous ne devez sélectionner qu'un seul polygone !", level=1, duration=5) self.iface.messageBar().pushMessage("Ooops", u"Vous ne devez sélectionner qu'un seul polygone !", level=Qgis.Warning, duration=5)

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

+1 -1
View File
@@ -90,7 +90,7 @@ def resources_path(*args):
:return: Absolute path to the resources folder. :return: Absolute path to the resources folder.
:rtype: str :rtype: str
""" """
path = abspath(abspath(join(plugin_path(), "CenRa_COPIE\\tools"))) path = abspath(abspath(join(plugin_path(), "CenRa_SICEN\\tools")))
for item in args: for item in args:
path = abspath(join(path, item)) path = abspath(join(path, item))
return path return path
+34 -25
View File
@@ -1,25 +1,27 @@
<plugins> <plugins>
<pyqgis_plugin name="CenRa_POSTGIS" version="3.0"> <pyqgis_plugin name="CenRa_POSTGIS" version="3.4">
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>3.0</version> <version>3.4</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_POSTGIS.zip</file_name> <file_name>CenRa_POSTGIS.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
<author_name>CEN-Rhone-Alpes</author_name> <author_name>CEN-Rhone-Alpes</author_name>
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_POSTGIS.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_POSTGIS.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-02-06</create_date> <create_date>2026-05-21</create_date>
<update_date>2025-05-19</update_date> <update_date>2026-03-12</update_date>
<experimental>False</experimental> <experimental>False</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,postgis</tags> <tags>cenra,postgis</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_COPIE" version="3.0"> <pyqgis_plugin name="CenRa_COPIE" version="3.2">
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>3.0</version> <version>3.2</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_COPIE.zip</file_name> <file_name>CenRa_COPIE.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
@@ -27,16 +29,17 @@
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_COPIE.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_COPIE.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-02-06</create_date> <create_date>2024-02-06</create_date>
<update_date>2025-05-19</update_date> <update_date>2026-03-12</update_date>
<experimental>False</experimental> <experimental>False</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,copie</tags> <tags>cenra,copie</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_SICEN" version="2.0"> <pyqgis_plugin name="CenRa_SICEN" version="2.2">
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>2.0</version> <version>2.2</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_SICEN.zip</file_name> <file_name>CenRa_SICEN.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
@@ -44,33 +47,35 @@
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_SICEN.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_SICEN.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-02-06</create_date> <create_date>2024-02-06</create_date>
<update_date>2025-05-19</update_date> <update_date>2026-03-12</update_date>
<experimental>False</experimental> <experimental>False</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,sicen</tags> <tags>cenra,sicen</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_FLUX" version="3.5"> <pyqgis_plugin name="CenRa_FLUX" version="3.24">
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>3.5</version> <version>3.24</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_FLUX.zip</file_name> <file_name>CenRa_FLUX.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
<author_name>CEN-Rhone-Alpes</author_name> <author_name>CEN-Rhone-Alpes</author_name>
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_FLUX.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_FLUX.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-02-06</create_date> <create_date>2026-05-22</create_date>
<update_date>2025-07-29</update_date> <update_date>2026-03-12</update_date>
<experimental>False</experimental> <experimental>False</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,flux</tags> <tags>cenra,flux</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_METABASE" version="0.3.0"> <pyqgis_plugin name="CenRa_METABASE" version="0.3.2">
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>0.3.0</version> <version>0.3.2</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_METABASE.zip</file_name> <file_name>CenRa_METABASE.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
@@ -78,41 +83,43 @@
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_METABASE.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_METABASE.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-09-12</create_date> <create_date>2024-09-12</create_date>
<update_date>2025-05-19</update_date> <update_date>2026-03-12</update_date>
<experimental>True</experimental> <experimental>True</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,metabase</tags> <tags>cenra,metabase</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_AUTOMAP" version="2.0"> <pyqgis_plugin name="CenRa_AUTOMAP" version="2.13">
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>2.0</version> <version>2.13</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_AUTOMAP.zip</file_name> <file_name>CenRa_AUTOMAP.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
<author_name>CEN-Rhone-Alpes</author_name> <author_name>CEN-Rhone-Alpes</author_name>
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_AUTOMAP.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_AUTOMAP.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-09-25</create_date> <create_date>2026-08-31</create_date>
<update_date>2025-05-19</update_date> <update_date>2026-03-12</update_date>
<experimental>False</experimental> <experimental>False</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,mise en page,atlas</tags> <tags>cenra,mise en page,atlas</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_PAGERENDER" version="0.2.0"> <pyqgis_plugin name="CenRa_PAGERENDER" version="0.2.5">
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>0.2.0</version> <version>0.2.5</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_PAGERENDER.zip</file_name> <file_name>CenRa_PAGERENDER.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
<author_name>CEN-Rhone-Alpes</author_name> <author_name>CEN-Rhone-Alpes</author_name>
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_PAGERENDER.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_PAGERENDER.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-10-09</create_date> <create_date>2026-03-23</create_date>
<update_date>2025-05-19</update_date> <update_date>2026-03-12</update_date>
<experimental>True</experimental> <experimental>True</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,mise en page,atlas</tags> <tags>cenra,mise en page,atlas</tags>
@@ -122,6 +129,7 @@
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>0.1.0</version> <version>0.1.0</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_gn2qgis.zip</file_name> <file_name>CenRa_gn2qgis.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>
@@ -139,6 +147,7 @@
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description> <description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
<version>0.1.0</version> <version>0.1.0</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<qgis_maximum_version>4.99</qgis_maximum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>BiodivAURA.zip</file_name> <file_name>BiodivAURA.zip</file_name>
<icon>CEN-Rhone-Alpes.png</icon> <icon>CEN-Rhone-Alpes.png</icon>