Custom CenIsere

This commit is contained in:
Natacha 2024-11-28 16:35:32 +01:00
parent 66df248ab8
commit 6a66140db7
17 changed files with 962 additions and 137 deletions

View File

@ -50,7 +50,7 @@ class PgAutoMap:
maj_verif(NAME)
# Display About window on first use
version = qgis.utils.pluginMetadata('CenRa_AUTOMAP','version')
version = qgis.utils.pluginMetadata('CenIsere_AUTOMAP','version')
s = QSettings()
versionUse = s.value("automap/version", 1, type=str)
if str(versionUse) != str(version) :
@ -61,20 +61,20 @@ class PgAutoMap:
def initGui(self):
""" Build the plugin GUI. """
self.toolBar = iface.addToolBar("CenRa_AutoMap")
self.toolBar.setObjectName("CenRa_AutoMap")
self.toolBar = iface.addToolBar("CenIsere_AutoMap")
self.toolBar.setObjectName("CenIsere_AutoMap")
icon = QIcon(resources_path('icons', 'icon.png'))
# Open the online help
self.help_action = QAction(icon, 'CenRa_AutoMap', iface.mainWindow())
self.help_action = QAction(icon, 'CenIsere_AutoMap', iface.mainWindow())
iface.pluginHelpMenu().addAction(self.help_action)
self.help_action.triggered.connect(self.open_help)
if not self.canvas_editor:
self.canvas_editor = AutoMap_Editor()
self.automap_action = QAction(icon, 'CenRa_AutoMap',None)
self.automap_action = QAction(icon, 'CenIsere_AutoMap',None)
self.toolBar.addAction(self.automap_action)
self.automap_action.triggered.connect(self.open_editor)
'''
@ -118,7 +118,7 @@ class PgAutoMap:
dialog.exec_()
def open_help():
""" Open the online help. """
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
QDesktopServices.openUrl(QUrl('https://plateformesig.CenIsere-outils.org/'))
def open_editor(self):
self.canvas_editor.show()
@ -127,7 +127,7 @@ class PgAutoMap:
def unload(self):
""" Unload the plugin. """
if self.canvas_editor:
iface.removePluginMenu('CenRa_AutoMap',self.automap_action)
iface.removePluginMenu('CenIsere_AutoMap',self.automap_action)
if self.provider:
QgsApplication.processingRegistry().removeProvider(self.provider)

View File

@ -1,4 +1 @@
# CenRa_AutoMap
---
Outil de création de mise en page,
Permet de préprogramé des mise en page pour les mêtre à disposition des collégue.
# CenIsere_AutoMap

View File

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
__copyright__ = "Copyright 2021, 3Liz"
__license__ = "GPL version 3"
__email__ = "info@3liz.org"
def classFactory(iface):
# noinspection PyPep8Naming
def classFactory(iface): # pylint: disable=invalid-name
_ = iface
from CenRa_AUTOMAP.CenRa_AutoMap import PgAutoMap
from CenIsere_AUTOMAP.CenIsere_AutoMap import PgAutoMap
return PgAutoMap()

View File

@ -12,7 +12,7 @@ ABOUT_FORM_CLASS, _ = uic.loadUiType(
os.path.join(
str(Path(__file__).resolve().parent),
'tools/ui',
'CenRa_AutoMap_about_form.ui'
'CenIsere_AutoMap_about_form.ui'
)
)
@ -26,7 +26,7 @@ class AutoMapAboutDialog(QDialog, ABOUT_FORM_CLASS):
self.iface = iface
self.setupUi(self)
self.viewer.setHtml(devlog('CenRa_AUTOMAP'))
self.viewer.setHtml(devlog('CenIsere_AUTOMAP'))
self.rejected.connect(self.onReject)
self.buttonBox.rejected.connect(self.onReject)
@ -43,4 +43,4 @@ class AutoMapAboutDialog(QDialog, ABOUT_FORM_CLASS):
Run some actions when
the user closes the dialog
"""
self.close()
self.close()

View File

@ -8,7 +8,6 @@ from pathlib import Path
from xml.dom.minidom import parseString
from qgis.gui import *
import qgis
from importlib import import_module
from qgis.core import (
NULL,
QgsApplication,
@ -57,7 +56,6 @@ from qgis.PyQt.QtWidgets import (
QTableWidgetItem,
QVBoxLayout,
)
from PyQt5 import QtGui
from qgis.PyQt.QtXml import QDomDocument
from qgis.utils import iface
import glob
@ -67,16 +65,12 @@ from .tools.resources import (
login_base,
send_issues,
)
from .issues import CenRa_Issues
from .tools.mises_en_pages import carto_standard
from .tools.mises_en_pages import full_page
from .tools.mises_en_pages import demo
from .tools.mises_en_pages.canvas import (fletch_canvas)
from .issues import CenIsere_Issues
from datetime import date
EDITOR_CLASS = load_ui('CenRa_AutoMap_base.ui')
LOGGER = logging.getLogger('CenRa_AutoMap')
EDITOR_CLASS = load_ui('CenIsere_AutoMap_base.ui')
LOGGER = logging.getLogger('CenIsere_AutoMap')
url_osm = 'https://osm.datagrandest.fr/mapcache/?crs=EPSG:2154&featureCount=10&format=image/png&layers=pure&maxHeight=256&maxWidth=256&styles=&url=https://osm.datagrandest.fr/mapcache'
url_ortho = 'http://tiles.craig.fr/ortho/service/?crs=EPSG:2154&featureCount=10&format=image/jpeg&layers=ortho&maxHeight=256&maxWidth=256&styles=&url=http://tiles.craig.fr/ortho/service'
url_mnt = 'http://tiles.craig.fr/mnt/crs=EPSG:2154&featureCount=10&format=image/png&layers=relief&maxHeight=256&maxWidth=256&styles=&url=http://tiles.craig.fr/mnt'
@ -104,9 +98,6 @@ data_source = [
'Plan cadastral informatisé - Etalab - juillet 202X',
'Parcellaire Express - IGN - 202X',
]
A4_size = {'Portrait':{'RIGHT':210,'LEFT':0,'TOP':0,'BOTTOM':297},'Landscape':{'RIGHT':297,'LEFT':0,'TOP':0,'BOTTOM':210}}
A3_size = {'Portrait':{'RIGHT':298,'LEFT':0,'TOP':0,'BOTTOM':420},'Landscape':{'RIGHT':420,'LEFT':0,'TOP':0,'BOTTOM':298}}
class AutoMap_Editor(QDialog, EDITOR_CLASS):
def __init__(self, parent=None):
@ -115,7 +106,6 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.setupUi(self)
self.settings = QgsSettings()
self.s = QSettings()
self.setWindowIcon(QtGui.QIcon(resources_path('icons','icon.png')))
path = ''
ix = 0
@ -139,7 +129,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
## On ajoute le nom des templates à la liste déroulante de l'onglet "mises en page" :
mises_en_page = []
for filename in glob.glob(resources_path("mises_en_pages","*.py")):
for filename in glob.glob(resources_path("mises_en_pages","*.qpt")):
mises_en_page.append(filename)
@ -149,42 +139,32 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.comboBox.setCurrentIndex(1)
self.template_parameters = {
'Carte_size': None,
'Carte_locals' : None,
'Carte_rotate':None,
'Carte_2_size' : None,
'Carte_2_locals' : None,
'Carte_2_rotate':None,
'Legande_size': None,
'Legande_locals': None,
'Legande_rotate':None,
'Arrow_size': None,
'Arrow_locals': None,
'Arrow_rotate':None,
'Echelle_size': None,
'Echelle_locals': None,
'Echelle_rotate':None,
'Logo_size': None,
'Logo_locals': None,
'Logo_rotate':None,
'Titre_size':None,
'Titre_locals':None,
'Titre_rotate':None,
'Sous_titre_size':None,
'Sous_titre_locals':None,
'Sous_titre_rotate':None,
'Credit_size': None,
'Credit_locals': None,
'Credit_rotate':None,
'Source_size': None,
'Source_locals': None,
'Source_rotate':None,
'Logo_2_size': None,
'Logo_2_locals': None,
'Logo_2_rotate': None,
'Echelle_2_size': None,
'Echelle_2_locals': None,
'Echelle_2_rotate': None,
'map_size': None,
'map_position' : None,
'position_map_size' : None,
'position_map_position' : None,
'title_position': None,
'title_size': None,
'subtitle_position': None,
'subtitle_size': None,
'logo_position': None,
'logo_size': None,
'legend_position': None,
'legend_size': None,
'scalebarnumeric_position':None,
'scalebarnumeric_size':None,
'scalebar_position': None,
'scalebar_size': None,
'north_position': None,
'north_size': None,
'credit_text_position': None,
'credit_text_size': None,
'credit_text2_position': None,
'credit_text2_size': None,
'image_size':None,
'image_position':None,
'image_size_2':None,
'image_position_2':None,
# Add more variables as needed
}
self.update_logo_library()
@ -439,15 +419,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
doc.setContent(template_content)
self.layout.loadFromTemplate(doc, QgsReadWriteContext(), True)
self.layout.setName(layout_name)
if self.radioButton_6.isChecked() and self.radioButton_7.isChecked():
logo_div = A4_size['Portrait']['RIGHT']
if self.radioButton_6.isChecked() and self.radioButton_8.isChecked():
logo_div = A4_size['Portrait']['BOTTOM']
if self.radioButton_5.isChecked() and self.radioButton_7.isChecked():
logo_div = A3_size['Portrait']['RIGHT']
if self.radioButton_5.isChecked() and self.radioButton_8.isChecked():
logo_div = A3_size['Portrait']['BOTTOM']
if True:#os.path.basename(filename) == "1. Modèle carto standard (consolidé).qpt":
self.actualisation_mise_en_page()
@ -460,10 +433,10 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.map_modele_test.setExtent(iface.mapCanvas().extent())
# Position de la carte dans le composeur
self.map_modele_test.setItemRotation(self.template_parameters['Carte_rotate'])
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['map_position'])
# on dimensionne le rendu de la carte (pour référence la page totale est une page A4 donc 297*210)
self.map_modele_test.attemptResize(self.template_parameters['map_size'])
self.map_modele_test.setKeepLayerSet(True)
self.map_modele_test.setKeepLayerStyles(True)
if self.radioButton_11.isChecked() == 1:
@ -477,9 +450,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.position_map.setExtent(QgsRectangle(641552,6647386, 995856,6331104))
self.position_map.setFollowVisibilityPreset(True)
self.position_map.setFollowVisibilityPresetName(self.comboBox_6.currentText())
self.position_map.setItemRotation(self.template_parameters['Carte_2_rotate'])
self.position_map.attemptResize(self.template_parameters['Carte_2_size'])
self.position_map.attemptMove(self.template_parameters['Carte_2_locals'])
self.position_map.attemptMove(self.template_parameters['position_map_position'])
self.position_map.attemptResize(self.template_parameters['position_map_size'])
overviewitem = QgsLayoutItemMapOverviewStack(self.position_map)
map_overview = self.position_map.overview()
map_overview.setLinkedMap(self.map_modele_test)
@ -487,28 +459,45 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
overviewitem.addOverview(map_overview)
self.position_map.refresh()
self.map_modele_test.setFrameEnabled(True)
self.map_modele_test.setFrameEnabled(False)
self.layout.addLayoutItem(self.position_map)
self.position_map.setId("Carte_locals")
self.position_map.setId("carte_position")
self.map_modele_test.refresh()
self.map_modele_test.setBackgroundColor(QColor(255, 255, 255, 255))
self.map_modele_test.setFrameEnabled(True)
self.map_modele_test.setFrameEnabled(False)
if self.radioButton_9.isChecked() == 1:
self.map_modele_test.setAtlasDriven(True)
self.layout.addLayoutItem(self.map_modele_test)
self.map_modele_test.setId("carte_principale")
if self.comboBox.currentText() == "3. Modèle carto standard Cen Isere.qpt":
# Ajout de la vague haute
image1 = QgsLayoutItemPicture(self.layout)
image1.setPicturePath(resources_path("mises_en_pages","vague.png"))
image1.attemptMove(self.template_parameters['image_position'])
image1.attemptResize(self.template_parameters['image_size'])
self.layout.addLayoutItem(image1)
# Ajout de la vague basse
image2= QgsLayoutItemPicture(self.layout)
image2.setPicturePath(resources_path("mises_en_pages","vague2.png"))
image2.attemptMove(self.template_parameters['image_position_2'])
image2.attemptResize(self.template_parameters['image_size_2'])
self.layout.addLayoutItem(image2)
## Ajout d'un titre à la mise en page
title = QgsLayoutItemLabel(self.layout)
self.layout.addLayoutItem(title)
titre = layout_name
title.setText(titre)
title.setFont(QFont("Calibri", 15, QFont.Bold))
title.setItemRotation(self.template_parameters['Titre_rotate'])
title.attemptResize(self.template_parameters['Titre_size'])
title.attemptMove(self.template_parameters['Titre_locals'])
title.attemptMove(self.template_parameters['title_position'])
title.attemptResize(self.template_parameters['title_size'])
title.setBackgroundEnabled(True)
title.setBackgroundColor(QColor(255, 255, 255, 130))
self.layout.addItem(title)
@ -525,9 +514,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
titre = titre + ' [%' + self.comboBox_4.currentText() + '%]'
subtitle.setText(titre)
subtitle.setFont(QFont("MS Shell Dlg 2", 10))
subtitle.setItemRotation(self.template_parameters['Sous_titre_rotate'])
subtitle.attemptResize(self.template_parameters['Sous_titre_size'])
subtitle.attemptMove(self.template_parameters['Sous_titre_locals'])
subtitle.attemptMove(self.template_parameters['subtitle_position'])
subtitle.attemptResize(self.template_parameters['subtitle_size'])
subtitle.setId("SubTitle")
subtitle.setBackgroundEnabled(True)
subtitle.setBackgroundColor(QColor(255, 255, 255, 130))
@ -540,10 +528,9 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
logo = QgsLayoutItemPicture(self.layout)
logo.setResizeMode(QgsLayoutItemPicture.Zoom)
logo.setMode(QgsLayoutItemPicture.FormatRaster)
logo.setItemRotation(self.template_parameters['Logo_rotate'])
logo.setFixedSize(self.template_parameters['Logo_size'])
logo.attemptMove(self.template_parameters['Logo_locals'])
logo.setPicturePath(resources_path("icons","CEN_RA.png"))
logo.attemptMove(self.template_parameters['logo_position'])
logo.setFixedSize(self.template_parameters['logo_size'])
logo.setPicturePath(resources_path("icons","CEN.png"))
logo.setId('logo')
self.layout.addLayoutItem(logo)
@ -618,7 +605,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.layout.refresh()
legend.updateLegend()
legend.attemptMove(self.template_parameters['Legande_locals'])
legend.attemptMove(self.template_parameters['legend_position'])
## Ajout de l'échelle numeric à la mise en page
self.scalebarnumeric_qpt = QgsLayoutItemScaleBar(self.layout)
@ -630,9 +618,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.scalebarnumeric_qpt.setNumberOfSegments(2)
self.scalebarnumeric_qpt.setNumberOfSegmentsLeft(0)
self.scalebarnumeric_qpt.attemptMove(self.template_parameters['Echelle_locals'])
self.scalebarnumeric_qpt.attemptResize(self.template_parameters['Echelle_size'])
self.scalebarnumeric_qpt.setItemRotation(self.template_parameters['Echelle_rotate'])
self.scalebarnumeric_qpt.attemptMove(self.template_parameters['scalebarnumeric_position'])
self.scalebarnumeric_qpt.attemptResize(self.template_parameters['scalebarnumeric_size'])
self.scalebarnumeric_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
self.scalebarnumeric_qpt.setBackgroundEnabled(True)
self.scalebarnumeric_qpt.setBackgroundColor(QColor(255, 255, 255, 130))
@ -649,9 +636,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.scalebar_qpt.setNumberOfSegments(2)
self.scalebar_qpt.setNumberOfSegmentsLeft(0)
self.scalebar_qpt.attemptMove(self.template_parameters['Echelle_2_locals'])
self.scalebar_qpt.attemptResize(self.template_parameters['Echelle_2_size'])
self.scalebar_qpt.setItemRotation(self.template_parameters['Echelle_2_rotate'])
self.scalebar_qpt.attemptMove(self.template_parameters['scalebar_position'])
self.scalebar_qpt.attemptResize(self.template_parameters['scalebar_size'])
self.scalebar_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
self.scalebar_qpt.setBackgroundEnabled(True)
self.scalebar_qpt.setBackgroundColor(QColor(255, 255, 255, 130))
@ -663,47 +649,44 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
north = QgsLayoutItemPicture(self.layout)
north.setPicturePath(resources_path("mises_en_pages","NorthArrow_02.svg"))
self.layout.addLayoutItem(north)
north.attemptMove(self.template_parameters['Arrow_locals'])
north.attemptResize(self.template_parameters['Arrow_size'])
north.setItemRotation(self.template_parameters['Arrow_rotate'])
north.attemptMove(self.template_parameters['north_position'])
north.attemptResize(self.template_parameters['north_size'])
if self.radioButton_10.isChecked() == 1:
info_text = ["Source : " + self.mComboBox_3.currentText()][0]
else:
info_text = ["Source : " + self.lineEdit_4.text()][0]
# ajout note info:
info = ["Réalisation : " + "CEN Rhône-Alpes (" + date.today().strftime(
info = ["Réalisation : " + "CEN Isère (" + date.today().strftime(
"%d/%m/%Y") + ")"]
credit_text = QgsLayoutItemLabel(self.layout)
credit_text.setText(info[0])
credit_text.setFont(QFont("Calibri", 9))
credit_text.setHAlign(Qt.AlignRight)
credit_text.setVAlign(Qt.AlignVCenter)
credit_text.setItemRotation(-90)
credit_text2 = QgsLayoutItemLabel(self.layout)
credit_text2.setText(info_text)
credit_text2.setFont(QFont("Calibri", 9))
credit_text2.setHAlign(Qt.AlignRight)
credit_text2.setVAlign(Qt.AlignVCenter)
credit_text.setItemRotation(self.template_parameters['Credit_rotate'])
credit_text.attemptResize(self.template_parameters['Credit_size'])
credit_text.attemptMove(self.template_parameters['Credit_locals'])
credit_text2.setItemRotation(self.template_parameters['Source_rotate'])
credit_text2.attemptResize(self.template_parameters['Source_size'])
credit_text2.attemptMove(self.template_parameters['Source_locals'])
credit_text.attemptMove(self.template_parameters['credit_text_position'])
credit_text.attemptResize(self.template_parameters['credit_text_size'])
credit_text2.attemptMove(self.template_parameters['credit_text2_position'])
credit_text2.attemptResize(self.template_parameters['credit_text2_size'])
self.layout.addLayoutItem(credit_text)
self.layout.addLayoutItem(credit_text2)
## Ajout du logo credit en bas à droit de la page
len_item = (len(self.mComboBox_4.checkedItems()))
for logo_run in self.mComboBox_4.checkedItems():
logo_credit = QgsLayoutItemPicture(self.layout)
logo_credit.setResizeMode(QgsLayoutItemPicture.Zoom)
logo_credit.setMode(QgsLayoutItemPicture.FormatRaster)
cur_x = self.template_parameters['Logo_2_locals'].x()
logo_credit.attemptMove(self.template_parameters['Logo_2_locals'])
cur_x = self.template_parameters['logo_credit_position'].x()
logo_credit.attemptMove(self.template_parameters['logo_credit_position'])
logo_credit.setPictureAnchor(4)
self.template_parameters['Logo_2_locals'].setX(cur_x+(logo_div/len_item))
logo_credit.setFixedSize(self.template_parameters['Logo_2_size'])
self.template_parameters['logo_credit_position'].setX(cur_x+51)
logo_credit.setFixedSize(self.template_parameters['logo_credit_size'])
if logo_run[0] == ' ':
logo_credit.setPicturePath(self.s.value("automap/logoteck", 1, type=str)+logo_run[1:])
else:
@ -739,6 +722,10 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
self.close()
def actualisation_mise_en_page(self):
A4_size = {'Portrait':{'RIGHT':210,'LEFT':0,'TOP':0,'BOTTOM':297},'Landscape':{'RIGHT':297,'LEFT':0,'TOP':0,'BOTTOM':210}}
A3_size = {'Portrait':{'RIGHT':298,'LEFT':0,'TOP':0,'BOTTOM':420},'Landscape':{'RIGHT':420,'LEFT':0,'TOP':0,'BOTTOM':298}}
values_page = self.comboBox.currentText()
if self.radioButton_6.isChecked() and self.radioButton_7.isChecked():
@ -757,24 +744,19 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
pc = self.layout.pageCollection()
pc.pages()[0].setPageSize('A3', QgsLayoutItemPage.Landscape)
if values_page == "demo.py":
self.template_parameters = demo.fletch_canvas(self)
if values_page == "carto_standard.py":
self.template_parameters = carto_standard.fletch_canvas(self)
if values_page == "full_page.py":
self.template_parameters = full_page.fletch_canvas(self)
self.template_parameters = fletch_canvas(self,values_page)
def bar_echelle_auto(self, echelle, bar_echelle):
if True:
if echelle.scale() >= 40000:
if echelle.scale() >= 20000:
bar_echelle.setUnits(QgsUnitTypes.DistanceKilometers)
bar_echelle.setUnitLabel("km")
bar_echelle.setUnitsPerSegment(round((echelle.scale()*0.04)/1000))
bar_echelle.setUnitsPerSegment(round((echelle.scale()*0.02)/1000))
else:
bar_echelle.setUnits(QgsUnitTypes.DistanceMeters)
bar_echelle.setUnitLabel("m")
bar_echelle.setUnitsPerSegment(round(echelle.scale()*0.04))
bar_echelle.setUnitsPerSegment(round(echelle.scale()*0.02))
bar_echelle.update()

View File

@ -39,9 +39,9 @@ from .tools.resources import (
send_issues,
)
EDITOR_CLASS = load_ui('CenRa_IssuesSend.ui')
EDITOR_CLASS = load_ui('CenIsere_IssuesSend.ui')
class CenRa_Issues(QDialog, EDITOR_CLASS):
class CenIsere_Issues(QDialog, EDITOR_CLASS):
def __init__(self, parent=None):
_ = parent

View File

@ -3,12 +3,12 @@
# This file should be included when you package your plugin.# Mandatory items:
[general]
name=CenRa_AutoMap
name=CenIsere_AutoMap
qgisMinimumVersion=3.0
description=CenRa_AutoMap
version=1.7
description=CenIsere_AutoMap
version=1.6
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr
about=Outils de création de mise en page prédéfinis pour simplifier et organiser cette étape.
@ -21,7 +21,7 @@ tracker=https://gitea.cenra-outils.org/api/v1/repos/CEN-RA/Plugin_QGIS/issues
hasProcessingProvider=no
# Uncomment the following line and add your changelog:
changelog=<h2>CenRa_AutoMap:</h2></br><p><h3>21/10/2024 - Version 1.7: </h3> - Epurations du code.</p></br><p><h3>07/10/2024 - Version 1.6: </h3> - Option de bibliotheque de logo custome.</p></br><p><h3>03/10/2024 - Version 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 1.4: </h3> - Mise en page plein écrant.</br></p></br><p><h3>01/10/2024 - Version 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 1.2: </h3> - Activation du thème. </br> - Ajouter une carte de suivie. </br><p></br><h3>27/09/2024 - Version 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 1.0: </h3> - Lancement du plugin CenRa_AutoMap avec une seul mise en page. </p></br>
changelog=<h2>CenIsere_AutoMap:</h2></br><p><h3>07/10/2024 - Version 1.6: </h3> - Option de bibliotheque de logo custome.</p></br><p><h3>03/10/2024 - Version 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 1.4: </h3> - Mise en page plein écrant.</br></p></br><p><h3>01/10/2024 - Version 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 1.2: </h3> - Activation du thème. </br> - Ajouter une carte de suivie. </br><p></br><h3>27/09/2024 - Version 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 1.0: </h3> - Lancement du plugin CenIsere_AutoMap avec une seul mise en page. </p></br>
# Tags are comma separated with spaces allowed
tags=python
@ -41,7 +41,7 @@ deprecated=False
# plugin_dependencies=
Category of the plugin: Raster, Vector, Database or Web
# category=cenra,mise en page,atlas
# category=CenIsere,mise en page,atlas
# If the plugin can run on QGIS Server.
server=False

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

View File

@ -0,0 +1,120 @@
<Layout worldFileMap="" name="test.qpt" printResolution="300" units="mm">
<Snapper snapToGrid="0" snapToItems="1" tolerance="5" snapToGuides="1"/>
<Grid resolution="10" offsetUnits="mm" offsetX="0" resUnits="mm" offsetY="0"/>
<PageCollection>
<symbol name="" clip_to_extent="1" type="fill" force_rhr="0" alpha="1">
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
<layer class="SimpleFill" locked="0" enabled="1" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="color" value="255,255,255,255" type="QString"/>
<Option name="joinstyle" value="miter" type="QString"/>
<Option name="offset" value="0,0" type="QString"/>
<Option name="offset_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="offset_unit" value="MM" type="QString"/>
<Option name="outline_color" value="35,35,35,255" type="QString"/>
<Option name="outline_style" value="no" type="QString"/>
<Option name="outline_width" value="0.26" type="QString"/>
<Option name="outline_width_unit" value="MM" type="QString"/>
<Option name="style" value="solid" type="QString"/>
</Option>
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="color" v="255,255,255,255"/>
<prop k="joinstyle" v="miter"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="no"/>
<prop k="outline_width" v="0.26"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="style" v="solid"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<LayoutItem zValue="0" id="" itemRotation="0" position="0,0,mm" frame="false" templateUuid="{5c80221d-7561-455b-94fd-69a27d877679}" referencePoint="0" opacity="1" frameJoinStyle="miter" uuid="{5c80221d-7561-455b-94fd-69a27d877679}" blendMode="0" size="297,210,mm" groupUuid="" outlineWidthM="0.3,mm" positionOnPage="0,0,mm" type="65638" excludeFromExports="0" positionLock="false" background="true" visibility="1">
<FrameColor green="0" blue="0" red="0" alpha="255"/>
<BackgroundColor green="255" blue="255" red="255" alpha="255"/>
<LayoutObject>
<dataDefinedProperties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</dataDefinedProperties>
<customproperties>
<Option/>
</customproperties>
</LayoutObject>
<symbol name="" clip_to_extent="1" type="fill" force_rhr="0" alpha="1">
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
<layer class="SimpleFill" locked="0" enabled="1" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="color" value="255,255,255,255" type="QString"/>
<Option name="joinstyle" value="miter" type="QString"/>
<Option name="offset" value="0,0" type="QString"/>
<Option name="offset_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="offset_unit" value="MM" type="QString"/>
<Option name="outline_color" value="35,35,35,255" type="QString"/>
<Option name="outline_style" value="no" type="QString"/>
<Option name="outline_width" value="0.26" type="QString"/>
<Option name="outline_width_unit" value="MM" type="QString"/>
<Option name="style" value="solid" type="QString"/>
</Option>
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="color" v="255,255,255,255"/>
<prop k="joinstyle" v="miter"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="no"/>
<prop k="outline_width" v="0.26"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="style" v="solid"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</LayoutItem>
<GuideCollection visible="1"/>
</PageCollection>
<customproperties>
<Option type="Map">
<Option name="atlasRasterFormat" value="png" type="QString"/>
<Option name="imageAntialias" value="true" type="bool"/>
<Option name="imageCropMarginBottom" value="0" type="int"/>
<Option name="imageCropMarginLeft" value="0" type="int"/>
<Option name="imageCropMarginRight" value="0" type="int"/>
<Option name="imageCropMarginTop" value="0" type="int"/>
<Option name="imageCropToContents" value="false" type="bool"/>
<Option name="singleFile" value="true" type="bool"/>
</Option>
</customproperties>
<Atlas coverageLayer="" pageNameExpression="" filterFeatures="0" filenamePattern="'output_'||@atlas_featurenumber" enabled="0" hideCoverage="0" sortFeatures="0"/>
</Layout>

View File

@ -0,0 +1,120 @@
<Layout worldFileMap="" name="test.qpt" printResolution="300" units="mm">
<Snapper snapToGrid="0" snapToItems="1" tolerance="5" snapToGuides="1"/>
<Grid resolution="10" offsetUnits="mm" offsetX="0" resUnits="mm" offsetY="0"/>
<PageCollection>
<symbol name="" clip_to_extent="1" type="fill" force_rhr="0" alpha="1">
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
<layer class="SimpleFill" locked="0" enabled="1" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="color" value="255,255,255,255" type="QString"/>
<Option name="joinstyle" value="miter" type="QString"/>
<Option name="offset" value="0,0" type="QString"/>
<Option name="offset_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="offset_unit" value="MM" type="QString"/>
<Option name="outline_color" value="35,35,35,255" type="QString"/>
<Option name="outline_style" value="no" type="QString"/>
<Option name="outline_width" value="0.26" type="QString"/>
<Option name="outline_width_unit" value="MM" type="QString"/>
<Option name="style" value="solid" type="QString"/>
</Option>
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="color" v="255,255,255,255"/>
<prop k="joinstyle" v="miter"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="no"/>
<prop k="outline_width" v="0.26"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="style" v="solid"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<LayoutItem zValue="0" id="" itemRotation="0" position="0,0,mm" frame="false" templateUuid="{5c80221d-7561-455b-94fd-69a27d877679}" referencePoint="0" opacity="1" frameJoinStyle="miter" uuid="{5c80221d-7561-455b-94fd-69a27d877679}" blendMode="0" size="297,210,mm" groupUuid="" outlineWidthM="0.3,mm" positionOnPage="0,0,mm" type="65638" excludeFromExports="0" positionLock="false" background="true" visibility="1">
<FrameColor green="0" blue="0" red="0" alpha="255"/>
<BackgroundColor green="255" blue="255" red="255" alpha="255"/>
<LayoutObject>
<dataDefinedProperties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</dataDefinedProperties>
<customproperties>
<Option/>
</customproperties>
</LayoutObject>
<symbol name="" clip_to_extent="1" type="fill" force_rhr="0" alpha="1">
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
<layer class="SimpleFill" locked="0" enabled="1" pass="0">
<Option type="Map">
<Option name="border_width_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="color" value="255,255,255,255" type="QString"/>
<Option name="joinstyle" value="miter" type="QString"/>
<Option name="offset" value="0,0" type="QString"/>
<Option name="offset_map_unit_scale" value="3x:0,0,0,0,0,0" type="QString"/>
<Option name="offset_unit" value="MM" type="QString"/>
<Option name="outline_color" value="35,35,35,255" type="QString"/>
<Option name="outline_style" value="no" type="QString"/>
<Option name="outline_width" value="0.26" type="QString"/>
<Option name="outline_width_unit" value="MM" type="QString"/>
<Option name="style" value="solid" type="QString"/>
</Option>
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="color" v="255,255,255,255"/>
<prop k="joinstyle" v="miter"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="no"/>
<prop k="outline_width" v="0.26"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="style" v="solid"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" value="" type="QString"/>
<Option name="properties"/>
<Option name="type" value="collection" type="QString"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</LayoutItem>
<GuideCollection visible="1"/>
</PageCollection>
<customproperties>
<Option type="Map">
<Option name="atlasRasterFormat" value="png" type="QString"/>
<Option name="imageAntialias" value="true" type="bool"/>
<Option name="imageCropMarginBottom" value="0" type="int"/>
<Option name="imageCropMarginLeft" value="0" type="int"/>
<Option name="imageCropMarginRight" value="0" type="int"/>
<Option name="imageCropMarginTop" value="0" type="int"/>
<Option name="imageCropToContents" value="false" type="bool"/>
<Option name="singleFile" value="true" type="bool"/>
</Option>
</customproperties>
<Atlas coverageLayer="" pageNameExpression="" filterFeatures="0" filenamePattern="'output_'||@atlas_featurenumber" enabled="0" hideCoverage="0" sortFeatures="0"/>
</Layout>

View File

@ -0,0 +1,114 @@
<Layout units="mm" worldFileMap="" printResolution="300" name="3. Modèle_carto_standard_cenIsere">
<Snapper snapToGuides="1" tolerance="5" snapToItems="1" snapToGrid="0"/>
<Grid offsetUnits="mm" resUnits="mm" resolution="10" offsetX="0" offsetY="0"/>
<PageCollection>
<symbol clip_to_extent="1" force_rhr="0" type="fill" name="" alpha="1">
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
<layer locked="0" pass="0" enabled="1" class="SimpleFill">
<Option type="Map">
<Option value="3x:0,0,0,0,0,0" type="QString" name="border_width_map_unit_scale"/>
<Option value="255,255,255,255" type="QString" name="color"/>
<Option value="miter" type="QString" name="joinstyle"/>
<Option value="0,0" type="QString" name="offset"/>
<Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/>
<Option value="MM" type="QString" name="offset_unit"/>
<Option value="35,35,35,255" type="QString" name="outline_color"/>
<Option value="no" type="QString" name="outline_style"/>
<Option value="0.26" type="QString" name="outline_width"/>
<Option value="MM" type="QString" name="outline_width_unit"/>
<Option value="solid" type="QString" name="style"/>
</Option>
<prop v="3x:0,0,0,0,0,0" k="border_width_map_unit_scale"/>
<prop v="255,255,255,255" k="color"/>
<prop v="miter" k="joinstyle"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0.26" k="outline_width"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="solid" k="style"/>
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<LayoutItem type="65638" zValue="0" blendMode="0" referencePoint="0" frameJoinStyle="miter" outlineWidthM="0.3,mm" frame="false" groupUuid="" itemRotation="0" excludeFromExports="0" background="true" opacity="1" visibility="1" size="297,210,mm" positionOnPage="0,0,mm" id="" templateUuid="{2b090846-ab96-44d2-b168-90e1bcb35427}" uuid="{2b090846-ab96-44d2-b168-90e1bcb35427}" position="0,0,mm" positionLock="false">
<FrameColor red="0" blue="0" green="0" alpha="255"/>
<BackgroundColor red="255" blue="255" green="255" alpha="255"/>
<LayoutObject>
<dataDefinedProperties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</dataDefinedProperties>
<customproperties>
<Option/>
</customproperties>
</LayoutObject>
<symbol clip_to_extent="1" force_rhr="0" type="fill" name="" alpha="1">
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
<layer locked="0" pass="0" enabled="1" class="SimpleFill">
<Option type="Map">
<Option value="3x:0,0,0,0,0,0" type="QString" name="border_width_map_unit_scale"/>
<Option value="255,255,255,255" type="QString" name="color"/>
<Option value="miter" type="QString" name="joinstyle"/>
<Option value="0,0" type="QString" name="offset"/>
<Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/>
<Option value="MM" type="QString" name="offset_unit"/>
<Option value="35,35,35,255" type="QString" name="outline_color"/>
<Option value="no" type="QString" name="outline_style"/>
<Option value="0.26" type="QString" name="outline_width"/>
<Option value="MM" type="QString" name="outline_width_unit"/>
<Option value="solid" type="QString" name="style"/>
</Option>
<prop v="3x:0,0,0,0,0,0" k="border_width_map_unit_scale"/>
<prop v="255,255,255,255" k="color"/>
<prop v="miter" k="joinstyle"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0.26" k="outline_width"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="solid" k="style"/>
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</LayoutItem>
<GuideCollection visible="1"/>
</PageCollection>
<customproperties>
<Option type="Map">
<Option value="png" type="QString" name="atlasRasterFormat"/>
<Option value="true" type="bool" name="singleFile"/>
</Option>
</customproperties>
<Atlas filterFeatures="0" pageNameExpression="" filenamePattern="'output_'||@atlas_featurenumber" hideCoverage="0" enabled="0" sortFeatures="0" coverageLayer=""/>
</Layout>

View File

@ -0,0 +1,492 @@
from qgis.core import (
QgsLayoutSize,
QgsUnitTypes,
QgsLayoutPoint,
)
def fletch_canvas(self,values_page):
### Modèle carto standard ###
if values_page == '1. Modèle carto standard.qpt':
if self.radioButton_6.isChecked() and self.radioButton_7.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(199, 175, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(55, 5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(145, 228, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(145, 215, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(193, 214, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(205, 125, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(104, 201, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_6.isChecked() and self.radioButton_8.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(285, 145, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 185, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 168, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(207, 193, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(207, 180, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(273, 182, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(189, 168.5, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_5.isChecked() and self.radioButton_7.isChecked():
self.template_parameters['map_size'] = QgsLayoutSize(285, 260, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 395, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 284, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(50, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(207, 310, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(50, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(207, 298, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(273, 297, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(189, 284, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_5.isChecked() and self.radioButton_8.isChecked():
self.template_parameters['map_size'] = QgsLayoutSize(408.5, 222, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(5, 23.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(409, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(409, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 249, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(323, 282, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(323, 270, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(402, 270, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(415, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(313, 247, QgsUnitTypes.LayoutMillimeters)
### Modèle carto plein page ###
if values_page == '2. Modèle carto plein page.qpt':
if self.radioButton_6.isChecked() and self.radioButton_7.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(210, 297, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(133, 215, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(3, 288, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(3, 273, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(196, 283, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(205, 125, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(55, 292, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_6.isChecked() and self.radioButton_8.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(297, 210, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 185, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(231, 135, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(3, 201, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(3, 186, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(283, 196, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(98, 205, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_5.isChecked() and self.radioButton_7.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(297, 420, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 370, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(219, 324, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(3, 410, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(3, 395, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(24, 24, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(271, 394, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(291, 125, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(98, 414, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_5.isChecked() and self.radioButton_8.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(420, 297, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(0, 0, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(411, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(411, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 247, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(341, 196, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(64, 7, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(3, 287, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(65, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(3, 272, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(24, 24, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(394, 271, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(414, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(185, 292, QgsUnitTypes.LayoutMillimeters)
### Modèle carto standard CEN ISERE###
if values_page == '3. Modèle carto standard Cen Isere.qpt':
if self.radioButton_6.isChecked() and self.radioButton_7.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(199, 175, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(55, 5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(145, 228, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(145, 215, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(193, 214, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(205, 125, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(104, 201, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size'] = QgsLayoutSize(200, 175, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position'] = QgsLayoutPoint(4.5, 18, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size_2'] = QgsLayoutSize(200, 175, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position_2'] = QgsLayoutPoint(4.5, 194.9, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_6.isChecked() and self.radioButton_8.isChecked():
self.template_parameters['position_map_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['position_map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_size'] = QgsLayoutSize(285, 145, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 185, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 168, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(207, 193, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(207, 180, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(273, 182, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(189, 168.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size'] = QgsLayoutSize(286, 145, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position'] = QgsLayoutPoint(5.5, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size_2'] = QgsLayoutSize(286, 145, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position_2'] = QgsLayoutPoint(5.5, 162.2, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_5.isChecked() and self.radioButton_7.isChecked():
self.template_parameters['map_size'] = QgsLayoutSize(285, 260, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 395, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 284, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(50, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(207, 310, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(50, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(207, 298, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(273, 297, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(189, 284, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size'] = QgsLayoutSize(286, 260, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position'] = QgsLayoutPoint(5.5, 13, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size_2'] = QgsLayoutSize(286, 260, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position_2'] = QgsLayoutPoint(5.5, 278.2, QgsUnitTypes.LayoutMillimeters)
if self.radioButton_5.isChecked() and self.radioButton_8.isChecked():
self.template_parameters['map_size'] = QgsLayoutSize(408.5, 222, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['map_position'] = QgsLayoutPoint(5, 23.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_size'] = QgsLayoutSize(409, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['title_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_size'] = QgsLayoutSize(409, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['subtitle_position'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_position'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['logo_credit_position'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['legend_position'] = QgsLayoutPoint(5, 249, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebarnumeric_position'] = QgsLayoutPoint(323, 282, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['scalebar_position'] = QgsLayoutPoint(323, 270, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['north_position'] = QgsLayoutPoint(402, 270, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text_position'] = QgsLayoutPoint(415, 123, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['credit_text2_position'] = QgsLayoutPoint(313, 247, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size'] = QgsLayoutSize(409.3, 222, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position'] = QgsLayoutPoint(4.5, 8, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_size_2'] = QgsLayoutSize(409.3, 222, QgsUnitTypes.LayoutMillimeters)
self.template_parameters['image_position_2'] = QgsLayoutPoint(4.6, 237.15, QgsUnitTypes.LayoutMillimeters)
# Retour des info #
return self.template_parameters

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -89,7 +89,7 @@ def resources_path(*args):
:return: Absolute path to the resources folder.
:rtype: str
"""
path = abspath(abspath(join(plugin_path(), "CenRa_AUTOMAP\\tools")))
path = abspath(abspath(join(plugin_path(), "CenIsere_AUTOMAP/tools")))
for item in args:
path = abspath(join(path, item))
return path
@ -184,4 +184,4 @@ def devlog(NAME):
import qgis
devmaj = '<head><style>* {margin:0; padding:0; }</style></head>'
devmaj = devmaj+qgis.utils.pluginMetadata(NAME,'changelog')
return devmaj
return devmaj