Compare commits

...

24 Commits
1.16 ... main

Author SHA1 Message Date
02681490f6 Repaire 2026-01-09 11:16:56 +01:00
4b8bc74386 test de push 2026-01-09 10:25:55 +01:00
9a85e9aaae test maj new pc 2026-01-09 10:19:23 +01:00
910ba14dc9 test maj new pc 2026-01-09 10:07:07 +01:00
d9f27eaa0f maj 2025-12-18 15:49:14 +01:00
2842526605 nouvelle image 2025-12-18 15:40:03 +01:00
ec677ffc5a v2 n2000 A3 + comparaison 2025-12-17 10:20:32 +01:00
3c9a6a8b88 v2 n2000 landscape simple 2025-12-16 17:25:27 +01:00
06321e4e26 check droit user sigdb only to check all db 2025-12-15 16:05:12 +01:00
83e22782f7 maj n2000 landscape 2025-12-15 15:03:34 +01:00
43acfca13b n2000 landscape 2025-12-15 14:29:31 +01:00
102fd30686 MAJ 2025-12-15 12:00:16 +01:00
b3186f6e16 nouvelle mise en page pour n2000 v2 2025-12-15 11:49:42 +01:00
8e93f7051a loading parametre for old file 2025-12-12 17:04:52 +01:00
b893764961 flake8 + parametrage suplementaire 2025-12-12 16:02:56 +01:00
4051a6855b mise en page pour N2000 2025-12-12 12:14:17 +01:00
42f33f619c Verification nom de couche dans DB 2025-12-09 17:04:20 +01:00
e4725c4ece Merge branch 'main' of ssh://gitea.cenra-outils.org:2222/CEN-RA/Plugin_QGIS 2025-12-09 10:40:03 +01:00
28ee42d3ea fusion 2025-12-09 10:38:43 +01:00
2d2337057f maj 2025-12-08 17:13:56 +01:00
ce6f30ea2c message d'erreur pour les droits 2025-12-08 17:12:24 +01:00
d50f601bd9 Show psql grands 2025-12-08 11:59:04 +01:00
26678fb257 clean 2025-12-01 15:51:40 +01:00
cef46278bc correctif mineur 2025-09-25 13:50:17 +02:00
16 changed files with 1383 additions and 696 deletions

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'])
@ -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] == ' ':

View File

@ -7,7 +7,7 @@ name=CenRa_AutoMap
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
supportsQt6=True supportsQt6=True
description=CenRa_AutoMap description=CenRa_AutoMap
version=2.1 version=2.7
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 +22,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_AUTOMAP:</h2></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> changelog=<h2>CenRa_AUTOMAP:</h2></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

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -3,6 +3,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'
@ -18,15 +20,20 @@ def fletch_canvas(self):
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_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0, 50, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0.0 self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286, 90, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286, 90, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Legande_frame'] = False
self.template_parameters['Arrow_size'] = QgsLayoutSize(12.0, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(12.0, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(191, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(191, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Arrow_background'] = True
self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854, 5, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854, 5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(145, 229, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(145, 229, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Echelle_rotate'] = 0.0
@ -39,9 +46,11 @@ def fletch_canvas(self):
self.template_parameters['Credit_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 158.0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 158.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270.0 self.template_parameters['Credit_rotate'] = 270.0
self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 200, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 200, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0 self.template_parameters['Source_rotate'] = 0.0
self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(198.85714285714286, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(198.85714285714286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Sous_titre_rotate'] = 0.0
@ -55,15 +64,20 @@ def fletch_canvas(self):
self.template_parameters['Carte_size'] = QgsLayoutSize(280, 247, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(280, 247, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0.0 self.template_parameters['Carte_rotate'] = 0.0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(70, 70, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(70, 70, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0.0 self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_size'] = QgsLayoutSize(280, 127, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(280, 127, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(7, 289, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(7, 289, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Legande_frame'] = False
self.template_parameters['Arrow_size'] = QgsLayoutSize(17, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(17, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(269, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(269, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Arrow_background'] = True
self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(77, 7, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(77, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(205, 323, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(205, 323, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Echelle_rotate'] = 0.0
@ -76,9 +90,11 @@ def fletch_canvas(self):
self.template_parameters['Credit_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(289, 223, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(289, 223, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270.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_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 282, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 282, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0 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_size'] = QgsLayoutSize(280, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Sous_titre_rotate'] = 0.0
@ -94,15 +110,20 @@ def fletch_canvas(self):
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_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100.0, 100, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(100.0, 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_2_rotate'] = 0.0 self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_size'] = QgsLayoutSize(285.14285714285717, 41, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(285.14285714285717, 41, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(6, 168, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(6, 168, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Legande_frame'] = False
self.template_parameters['Arrow_size'] = QgsLayoutSize(13.142857142857142, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(13.142857142857142, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(277, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(277, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Arrow_background'] = True
self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854, 15, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(232, 193, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(232, 193, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Echelle_rotate'] = 0.0
@ -115,9 +136,11 @@ def fletch_canvas(self):
self.template_parameters['Credit_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(291, 127.0, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(291, 127.0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270.0 self.template_parameters['Credit_rotate'] = 270.0
self.template_parameters['Credit_alignment'] = 0x0002
self.template_parameters['Source_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_size'] = QgsLayoutSize(100.0, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(189, 169, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(189, 169, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0 self.template_parameters['Source_rotate'] = 0.0
self.template_parameters['Source_alignment'] = 0x0002
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286.0, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286.0, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Sous_titre_rotate'] = 0.0
@ -131,15 +154,20 @@ def fletch_canvas(self):
self.template_parameters['Carte_size'] = QgsLayoutSize(402, 205, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(402, 205, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_rotate'] = 0.0 self.template_parameters['Carte_rotate'] = 0.0
self.template_parameters['Carte_frame'] = True
self.template_parameters['Carte_2_size'] = QgsLayoutSize(141, 141, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_size'] = QgsLayoutSize(141, 141, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_2_rotate'] = 0.0 self.template_parameters['Carte_2_rotate'] = 0.0
self.template_parameters['Carte_2_frame'] = False
self.template_parameters['Legande_size'] = QgsLayoutSize(402, 58, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_size'] = QgsLayoutSize(402, 58, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_locals'] = QgsLayoutPoint(8, 237, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Legande_locals'] = QgsLayoutPoint(8, 237, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Legande_rotate'] = 0.0 self.template_parameters['Legande_rotate'] = 0.0
self.template_parameters['Legande_frame'] = False
self.template_parameters['Arrow_size'] = QgsLayoutSize(19, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_size'] = QgsLayoutSize(19, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(391, 8, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Arrow_locals'] = QgsLayoutPoint(391, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Arrow_rotate'] = 0.0 self.template_parameters['Arrow_rotate'] = 0.0
self.template_parameters['Arrow_background'] = True
self.template_parameters['Arrow_path'] = "NorthArrow_02.svg"
self.template_parameters['Echelle_size'] = QgsLayoutSize(77, 21, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_size'] = QgsLayoutSize(77, 21, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(327, 272, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Echelle_locals'] = QgsLayoutPoint(327, 272, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Echelle_rotate'] = 0.0 self.template_parameters['Echelle_rotate'] = 0.0
@ -152,9 +180,11 @@ def fletch_canvas(self):
self.template_parameters['Credit_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_locals'] = QgsLayoutPoint(410, 179, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Credit_locals'] = QgsLayoutPoint(410, 179, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Credit_rotate'] = 270.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_size'] = QgsLayoutSize(141, 6, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_locals'] = QgsLayoutPoint(267, 238, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Source_locals'] = QgsLayoutPoint(267, 238, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Source_rotate'] = 0.0 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_size'] = QgsLayoutSize(403, 11, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Sous_titre_rotate'] = 0.0 self.template_parameters['Sous_titre_rotate'] = 0.0

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'
@ -52,6 +54,13 @@ def fletch_canvas(self):
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
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 values_page == 'A3': if values_page == 'A3':
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)
@ -89,6 +98,14 @@ def fletch_canvas(self):
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
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':
@ -128,6 +145,14 @@ def fletch_canvas(self):
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
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 values_page == 'A4': if values_page == 'A4':
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)
@ -165,6 +190,14 @@ def fletch_canvas(self):
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
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

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'
@ -52,6 +54,14 @@ def fletch_canvas(self):
self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0, 30, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 233, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 233, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_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 values_page == 'A3': if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(237, 369, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(237, 369, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters)
@ -89,6 +99,15 @@ def fletch_canvas(self):
self.template_parameters['Logo_2_size'] = QgsLayoutSize(42, 42, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(42, 42, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 329, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 329, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_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 == 'A4': if values_page == 'A4':
self.template_parameters['Carte_size'] = QgsLayoutSize(254.85714285714286, 175, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(254.85714285714286, 175, QgsUnitTypes.LayoutMillimeters)
@ -127,6 +146,14 @@ def fletch_canvas(self):
self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0, 30, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 146, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 146, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_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 values_page == 'A3': if values_page == 'A3':
self.template_parameters['Carte_size'] = QgsLayoutSize(359, 247, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_size'] = QgsLayoutSize(359, 247, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters) self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters)
@ -164,4 +191,13 @@ def fletch_canvas(self):
self.template_parameters['Logo_2_size'] = QgsLayoutSize(42, 42, QgsUnitTypes.LayoutMillimeters) 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_locals'] = QgsLayoutPoint(58, 206, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_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
return self.template_parameters return self.template_parameters

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(90, 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, 234, 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(90, 233, 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(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(209, 174.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(40.0, 30, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(252, 174, 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

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(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(160, 264, 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(40.0, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(160, 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(110, 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(110, 180, 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(52, 175, 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

View File

@ -103,7 +103,7 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
self.toolButton.setIcon(QtGui.QIcon(resources_path('ui', 'find.png'))) self.toolButton.setIcon(QtGui.QIcon(resources_path('ui', 'find.png')))
self.comboBox_2.addItem("SIG") self.comboBox_2.addItem("SIG")
self.comboBox_2.addItem('REF') self.comboBox_2.addItem('REF')
self.comboBox.currentIndexChanged.connect(self.initialisation_flux)
self.commandLinkButton.clicked.connect(self.selection_flux) self.commandLinkButton.clicked.connect(self.selection_flux)
self.tableWidget.itemDoubleClicked.connect(self.selection_flux) self.tableWidget.itemDoubleClicked.connect(self.selection_flux)
self.pushButton_2.clicked.connect(self.limite_flux) self.pushButton_2.clicked.connect(self.limite_flux)
@ -123,6 +123,7 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
self.DeBUG.addItem('01') self.DeBUG.addItem('01')
self.DeBUG.addItem('0726') self.DeBUG.addItem('0726')
self.DeBUG.addItem('4269') self.DeBUG.addItem('4269')
self.comboBox.currentIndexChanged.connect(self.initialisation_flux)
self.DeBUG.currentIndexChanged.connect(self.SwitchDEBUG) self.DeBUG.currentIndexChanged.connect(self.SwitchDEBUG)
self.DeBUG.hide() self.DeBUG.hide()
@ -186,8 +187,8 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
dbtype = refdb dbtype = refdb
con = psycopg2.connect("host=" + host + " port=" + port + " dbname=" + dbtype + " user=" + user + " password=" + mdp) con = psycopg2.connect("host=" + host + " port=" + port + " dbname=" + dbtype + " user=" + user + " password=" + mdp)
cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor) cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
self.initialisation_flux()
self.combobox_custom() self.combobox_custom()
# self.initialisation_flux()
# Create the dialog with elements (after translation) and keep reference # Create the dialog with elements (after translation) and keep reference
# Only create GUI ONCE in callback, so that it will only load when the plugin is started # Only create GUI ONCE in callback, so that it will only load when the plugin is started
if self.first_start is True: if self.first_start is True:
@ -210,27 +211,27 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
dbtype = sigdb dbtype = sigdb
con = psycopg2.connect("host=" + host + " port=" + port + " dbname=" + dbtype + " user=" + user + " password=" + mdp) con = psycopg2.connect("host=" + host + " port=" + port + " dbname=" + dbtype + " user=" + user + " password=" + mdp)
cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor) cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
self.initialisation_flux()
self.combobox_custom() self.combobox_custom()
# self.initialisation_flux()
# Create the dialog with elements (after translation) and keep reference # Create the dialog with elements (after translation) and keep reference
# Only create GUI ONCE in callback, so that it will only load when the plugin is started # Only create GUI ONCE in callback, so that it will only load when the plugin is started
if self.first_start is True: if self.first_start is True:
self.first_start = False self.first_start = False
# show the dialog # show the dialog
self.show() # self.show()
# Run the dialog event loop # Run the dialog event loop
result = self.exec() # result = self.exec()
# See if OK was pressed # See if OK was pressed
if result: # if result:
# Do something useful here - delete the line containing pass and # Do something useful here - delete the line containing pass and
# substitute with your code. # substitute with your code.
pass # pass
def suppression_flux(self): def suppression_flux(self):
self.tableWidget_2.removeRow(self.tableWidget_2.currentRow()) self.tableWidget_2.removeRow(self.tableWidget_2.currentRow())
def initialisation_flux(self): def initialisation_flux(self):
print('run_time') print('run')
if dbtype == sigdb: if dbtype == sigdb:
# self.toolButton.setEnabled(1) # self.toolButton.setEnabled(1)
if self.comboBox.currentText() == 'toutes les catégories': if self.comboBox.currentText() == 'toutes les catégories':
@ -245,8 +246,7 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
if self.comboBox.currentText() == 'toutes les catégories': if self.comboBox.currentText() == 'toutes les catégories':
custom_list = schemaname_list_ref custom_list = schemaname_list_ref
else: else:
custom_list = """SELECT schemaname,tablename from pg_catalog.pg_tables custom_list = """SELECT schemaname, tablename from pg_catalog.pg_tables WHERE schemaname LIKE '""" + str(self.comboBox.currentText()) + """' AND tablename NOT LIKE 'qgis_projects' order by schemaname, tablename;"""
where schemaname like '""" + str(self.comboBox.currentText()) + """' order by schemaname,tablename;"""
cur.execute(custom_list) cur.execute(custom_list)
list_schema = cur.fetchall() list_schema = cur.fetchall()
@ -275,6 +275,16 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
cur.execute(SQLProjectsQgis) cur.execute(SQLProjectsQgis)
list_projects_qgis.append(cur.fetchall()) list_projects_qgis.append(cur.fetchall())
if self.comboBox.currentText() == 'toutes les catégories':
SQLGrands = """SELECT concat(table_schema,'.',table_name) FROM information_schema.role_table_grants WHERE grantee in(SELECT rolname FROM pg_catalog.pg_roles WHERE oid in(SELECT roleid FROM pg_auth_members WHERE member = (SELECT usesysid FROM pg_catalog.pg_user WHERE usename = '""" + user + """'))) and privilege_type = 'SELECT';"""
else:
SQLGrands = """SELECT concat(table_schema,'.',table_name) FROM information_schema.role_table_grants WHERE grantee in(SELECT rolname FROM pg_catalog.pg_roles WHERE oid in(SELECT roleid FROM pg_auth_members WHERE member = (SELECT usesysid FROM pg_catalog.pg_user WHERE usename = '""" + user + """'))) and privilege_type = 'SELECT' AND table_schema LIKE '_""" + str(self.comboBox.currentText()) + """_%';"""
cur.execute(SQLGrands)
list_grands = cur.fetchall()
GrandUser = []
for grandsFind in list_grands:
GrandUser.append(grandsFind[0])
self.tableWidget.setRowCount(len(list_schema)) self.tableWidget.setRowCount(len(list_schema))
self.tableWidget.setColumnCount(4) self.tableWidget.setColumnCount(4)
i = 0 i = 0
@ -324,13 +334,27 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
self.tableWidget.setItem(i, 2, item) self.tableWidget.setItem(i, 2, item)
item = QTableWidgetItem(table_name) item = QTableWidgetItem(table_name)
self.tableWidget.setItem(i, 3, item) self.tableWidget.setItem(i, 3, item)
if True:
if (str(value[0]) + '.' + str(value[1])) in GrandUser:
pass
else:
# print(str(value[0]) + '.' + str(value[1]), 'bad')
for j in range(self.tableWidget.columnCount()):
self.tableWidget.item(i, j).setBackground(QtGui.QColor(187, 134, 192, 50))
self.tableWidget.item(i, j).setToolTip('Droit insuffisant pour ouvrire la couche !')
i = i + 1 i = i + 1
if self.comboBox.currentText() == 'toutes les catégories':
SQLprojects = """SELECT schemaname, tablename FROM pg_catalog.pg_tables WHERE tablename LIKE 'qgis_projects'""" SQLprojects = """SELECT schemaname, tablename FROM pg_catalog.pg_tables WHERE tablename LIKE 'qgis_projects'"""
else:
SQLprojects = """SELECT schemaname, tablename FROM pg_catalog.pg_tables WHERE tablename LIKE 'qgis_projects' AND schemaname LIKE '""" + str(self.comboBox.currentText()) + """';"""
cur.execute(SQLprojects) cur.execute(SQLprojects)
list_projects = cur.fetchall() list_projects = cur.fetchall()
list_projects_qgis = [] list_projects_qgis = []
if len(list_projects) <= 1: if len(list_projects) >= 1:
for ProjectName in list_projects: for ProjectName in list_projects:
SQLProjectsQgis = """SELECT name, metadata, content FROM """ + '"' + ProjectName[0] + '"."' + ProjectName[1] + '"' SQLProjectsQgis = """SELECT name, metadata, content FROM """ + '"' + ProjectName[0] + '"."' + ProjectName[1] + '"'
cur.execute(SQLProjectsQgis) cur.execute(SQLProjectsQgis)
@ -343,10 +367,10 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
itemIcon.setIcon(icon) itemIcon.setIcon(icon)
self.tableWidget.setItem(i, 0, itemIcon) self.tableWidget.setItem(i, 0, itemIcon)
item = QTableWidgetItem('QGIS') item = QTableWidgetItem('qgis')
self.tableWidget.setItem(i, 1, item) self.tableWidget.setItem(i, 1, item)
item = QTableWidgetItem('projet') item = QTableWidgetItem(ProjectName[0])
self.tableWidget.setItem(i, 2, item) self.tableWidget.setItem(i, 2, item)
item = QTableWidgetItem(Project[0]) item = QTableWidgetItem(Project[0])
@ -441,15 +465,28 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
# p = [] # p = []
SQLloadRaster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """ SQLloadRaster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """
SQLextension = """SELECT count(extname) FROM pg_catalog.pg_extension WHERE extname LIKE 'postgis_raster';"""
cur.execute(SQLextension)
count_extension = cur.fetchall()[0][0]
if count_extension == 1:
cur.execute(SQLloadRaster) cur.execute(SQLloadRaster)
list_raster = cur.fetchall() list_raster = cur.fetchall()
else:
list_raster = []
RasterList = [] RasterList = []
for rasterFind in list_raster: for rasterFind in list_raster:
RasterList.append(rasterFind[0]) RasterList.append(rasterFind[0])
for row in range(0, self.tableWidget_2.rowCount()): for row in range(0, self.tableWidget_2.rowCount()):
color_rgba = 855030089 color_rgba_db = 855030089
if self.tableWidget_2.item(row, 1).background().color().rgba() != color_rgba: color_rgba_droit = 851150528
# print(self.tableWidget_2.item(row, 1).background().color().rgba())
if self.tableWidget_2.item(row, 1).background().color().rgba() == color_rgba_droit:
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !", "Vous ne disposez pas des droit pour la couche «" + str(self.tableWidget_2.item(row, 1).text()) + ' ' + str(self.tableWidget_2.item(row, 2).text()) + "» !", QMessageBox.StandardButton(0x00004000))
elif self.tableWidget_2.item(row, 1).background().color().rgba() != color_rgba_db:
# supression de la partie de l'url après le point d'interrogation # supression de la partie de l'url après le point d'interrogation
if dbtype == sigdb: if dbtype == sigdb:
code = self.tableWidget_2.item(row, 1).text() code = self.tableWidget_2.item(row, 1).text()
@ -457,26 +494,28 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
if code == 'travaux' or code == 'agregation': if code == 'travaux' or code == 'agregation':
schema = self.tableWidget_2.item(row, 2).text() schema = self.tableWidget_2.item(row, 2).text()
table = self.tableWidget_2.item(row, 3).text() table = self.tableWidget_2.item(row, 3).text()
elif code == '00':
table = self.tableWidget_2.item(row, 3).text()
else: else:
table = self.tableWidget_2.item(row, 3).text() table = self.tableWidget_2.item(row, 3).text()
table = schema + '_' + table table = schema + '_' + table
elif dbtype == refdb: elif dbtype == refdb:
# code = self.tableWidget_2.item(row,1).text() code = self.tableWidget_2.item(row, 1).text()
schema = self.tableWidget_2.item(row, 2).text() schema = self.tableWidget_2.item(row, 2).text()
table = self.tableWidget_2.item(row, 3).text() table = self.tableWidget_2.item(row, 3).text()
# .split("?", 1)[0] # .split("?", 1)[0]
uri = QgsDataSourceUri() uri = QgsDataSourceUri()
uri.setConnection(host, port, dbtype, user, mdp) uri.setConnection(host, port, dbtype, user, mdp)
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
if (schema + '.' + table) in RasterList: if (schema + '.' + table) in RasterList:
uri.setDataSource(schema, table, "rast") uri.setDataSource(schema, table, "rast")
uri.setKeyColumn('rid') uri.setKeyColumn('rid')
uri.setSrid('2154') uri.setSrid('2154')
layer = QgsRasterLayer(uri.uri(), table, "postgresraster") layer = QgsRasterLayer(uri.uri(), table, "postgresraster")
QgsProject.instance().addMapLayer(layer) QgsProject.instance().addMapLayer(layer)
elif code == 'QGIS': elif code == 'qgis':
schema = '_' + self.tableWidget_2.item(row, 2).text() schema = self.tableWidget_2.item(row, 2).text()
print(schema)
table = self.tableWidget_2.item(row, 3).text() table = self.tableWidget_2.item(row, 3).text()
uri_project = 'postgresql://' + user + ':' + mdp + '@' + host + ':' + port + '?sslmode=disable&dbname=' + dbtype + "&schema=" + schema + '&project=' + table uri_project = 'postgresql://' + user + ':' + mdp + '@' + host + ':' + port + '?sslmode=disable&dbname=' + dbtype + "&schema=" + schema + '&project=' + table
QgsProject.instance().read(uri_project) QgsProject.instance().read(uri_project)
@ -486,8 +525,14 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
# Chargement de la couche PostGIS # Chargement de la couche PostGIS
geom_type = 'SELECT right(st_geometrytype(geom),-3) as a FROM ' + schema + '.' + table + ' GROUP BY a' geom_type = 'SELECT right(st_geometrytype(geom),-3) as a FROM ' + schema + '.' + table + ' GROUP BY a'
try:
cur.execute(geom_type) cur.execute(geom_type)
list_typegeom = cur.fetchall() list_typegeom = cur.fetchall()
UndefinedTable = True
except psycopg2.errors.UndefinedTable:
print("Error table name")
list_typegeom = ''
UndefinedTable = False
if len(list_typegeom) > 1: if len(list_typegeom) > 1:
for typegeom in list_typegeom: for typegeom in list_typegeom:
if typegeom[0] == 'MultiPolygon': if typegeom[0] == 'MultiPolygon':
@ -508,9 +553,12 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
# Ajout de la couche au canevas QGIS # Ajout de la couche au canevas QGIS
QgsProject.instance().addMapLayer(layer) QgsProject.instance().addMapLayer(layer)
else: else:
if UndefinedTable:
layer = QgsVectorLayer(uri.uri(), table, "postgres") layer = QgsVectorLayer(uri.uri(), table, "postgres")
# Ajout de la couche au canevas QGIS # Ajout de la couche au canevas QGIS
QgsProject.instance().addMapLayer(layer) QgsProject.instance().addMapLayer(layer)
else:
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !", "La couche «" + str(self.tableWidget_2.item(row, 1).text()) + ' ' + str(self.tableWidget_2.item(row, 2).text()) + "» semble ne pas avoir le même nom dans la BD, merci de contacter votre administrateur pour régler le problème !", QMessageBox.StandardButton(0x00004000))
else: else:
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !", "La couche «" + str(self.tableWidget_2.item(row, 1).text()) + ' ' + str(self.tableWidget_2.item(row, 2).text()) + "» ne ce trouve pas dans cette BD !", QMessageBox.StandardButton(0x00004000)) self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !", "La couche «" + str(self.tableWidget_2.item(row, 1).text()) + ' ' + str(self.tableWidget_2.item(row, 2).text()) + "» ne ce trouve pas dans cette BD !", QMessageBox.StandardButton(0x00004000))
@ -527,6 +575,7 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
self.comboBox.addItem('69') self.comboBox.addItem('69')
self.comboBox.addItem('agregation') self.comboBox.addItem('agregation')
self.comboBox.addItem('travaux') self.comboBox.addItem('travaux')
self.comboBox.addItem('qgis')
self.comboBox.addItem('form') self.comboBox.addItem('form')
if dbtype == refdb: if dbtype == refdb:
self.toolButton.setEnabled(0) self.toolButton.setEnabled(0)

View File

@ -7,7 +7,7 @@ name=CenRa_FLUX
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
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.7 version=3.15
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 +32,7 @@ icon=icon.png
# experimental flag # experimental flag
experimental=False experimental=False
changelog=<h2>CenRa_FLUX:</h2></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> changelog=<h2>CenRa_FLUX:</h2></br><p><h3>15/12/2025 - Version 3.15: </h3> - information visuel des droit d access a la donnee sur tout les base.</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

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:
@ -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()

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'
@ -22,8 +24,8 @@ def fletch_canvas(self):
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)
@ -59,8 +61,8 @@ def fletch_canvas(self):
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)
@ -97,8 +99,8 @@ def fletch_canvas(self):
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)
@ -134,8 +136,8 @@ def fletch_canvas(self):
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)

View File

@ -7,7 +7,7 @@ name=CenRa_PageRender
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
supportsQt6=True supportsQt6=True
description=CenRa_PageRender description=CenRa_PageRender
version=0.2.1 version=0.2.3
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 +22,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>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> changelog=<h2>CenRa_PAGERENDER:</h2></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

View File

@ -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>

View File

@ -50,9 +50,9 @@
<tags>cenra,sicen</tags> <tags>cenra,sicen</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_FLUX" version="3.7"> <pyqgis_plugin name="CenRa_FLUX" version="3.15">
<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.7</version> <version>3.15</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_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>
@ -61,7 +61,7 @@
<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>2024-02-06</create_date>
<update_date>2025-09-05</update_date> <update_date>2025-12-15</update_date>
<experimental>False</experimental> <experimental>False</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,flux</tags> <tags>cenra,flux</tags>
@ -84,9 +84,9 @@
<tags>cenra,metabase</tags> <tags>cenra,metabase</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_AUTOMAP" version="2.1"> <pyqgis_plugin name="CenRa_AUTOMAP" version="2.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>2.1</version> <version>2.7</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_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>
@ -95,15 +95,15 @@
<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>2024-09-25</create_date>
<update_date>2025-07-30</update_date> <update_date>2025-12-18</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.1"> <pyqgis_plugin name="CenRa_PAGERENDER" version="0.2.3">
<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.1</version> <version>0.2.3</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_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>
@ -112,7 +112,7 @@
<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>2024-10-09</create_date>
<update_date>2025-07-30</update_date> <update_date>2025-12-15</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>