nouvelle mise en page pour n2000 v2
This commit is contained in:
parent
8e93f7051a
commit
b3186f6e16
@ -465,7 +465,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)
|
||||||
@ -479,7 +479,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'])
|
||||||
@ -638,9 +639,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))
|
||||||
@ -651,6 +652,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()
|
||||||
|
|
||||||
@ -658,9 +660,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))
|
||||||
@ -671,10 +673,11 @@ 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", self.template_parameters['Arrow_path']))
|
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.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.setSvgStrokeColor(QColor(255, 255, 255, 255))
|
||||||
north.setSvgFillColor(QColor(76, 76, 76, 255))
|
north.setSvgFillColor(QColor(76, 76, 76, 255))
|
||||||
north.setBackgroundEnabled(self.template_parameters['Arrow_background'])
|
north.setBackgroundEnabled(self.template_parameters['Arrow_background'])
|
||||||
@ -727,10 +730,10 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
logo_credit.setResizeMode(QgsLayoutItemPicture.Zoom)
|
logo_credit.setResizeMode(QgsLayoutItemPicture.Zoom)
|
||||||
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'])
|
||||||
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'])
|
||||||
logo_credit.setItemRotation(self.template_parameters['Logo_2_rotate'])
|
|
||||||
if logo_run[0] == ' ':
|
if logo_run[0] == ' ':
|
||||||
logo_credit.setPicturePath(self.s.value("automap/logoteck", 1, type=str) + logo_run[1:])
|
logo_credit.setPicturePath(self.s.value("automap/logoteck", 1, type=str) + logo_run[1:])
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -108,7 +108,7 @@ def fletch_canvas(self):
|
|||||||
if page_rotate == 'Landscape':
|
if page_rotate == 'Landscape':
|
||||||
if values_page == 'A4':
|
if values_page == 'A4':
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(206.0, 200, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_size'] = QgsLayoutSize(206.0, 200, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(28, 208.0, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(29, 8.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_rotate'] = 270
|
self.template_parameters['Carte_rotate'] = 270
|
||||||
self.template_parameters['Carte_frame'] = True
|
self.template_parameters['Carte_frame'] = True
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0, 40, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0, 40, QgsUnitTypes.LayoutMillimeters)
|
||||||
@ -120,78 +120,78 @@ def fletch_canvas(self):
|
|||||||
self.template_parameters['Legande_rotate'] = 270
|
self.template_parameters['Legande_rotate'] = 270
|
||||||
self.template_parameters['Legande_frame'] = True
|
self.template_parameters['Legande_frame'] = True
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(31, 19.0, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(30, 23.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_rotate'] = 270
|
self.template_parameters['Arrow_rotate'] = 270
|
||||||
self.template_parameters['Arrow_background'] = False
|
self.template_parameters['Arrow_background'] = False
|
||||||
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
|
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(50.857142857142854, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(50, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(233, 112.85714285714286, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(241, 112, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_rotate'] = 270
|
self.template_parameters['Echelle_rotate'] = 270
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(228, 206.0, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(237, 206.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_rotate'] = 270
|
self.template_parameters['Logo_rotate'] = 270
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(206.0, 11, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_size'] = QgsLayoutSize(206.0, 11, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 208.0, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 208.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_rotate'] = 270
|
self.template_parameters['Titre_rotate'] = 270
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(50.857142857142854, 6, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_size'] = QgsLayoutSize(207, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(177, 196, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(28, 202, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_rotate'] = 0
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
self.template_parameters['Credit_alignment'] = 0x0001
|
self.template_parameters['Credit_alignment'] = 0x0001
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(50.857142857142854, 6, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_size'] = QgsLayoutSize(207, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(177, 202, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(28, 196, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_rotate'] = 0
|
self.template_parameters['Source_rotate'] = 0
|
||||||
self.template_parameters['Source_alignment'] = 0x0001
|
self.template_parameters['Source_alignment'] = 0x0001
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(202.0, 14, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(202.0, 14, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(13, 206.0, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(13, 206.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_rotate'] = 270
|
self.template_parameters['Sous_titre_rotate'] = 270
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50.857142857142854, 13, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50, 13, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(241, 112.85714285714286, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(233, 112, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_rotate'] = 270
|
self.template_parameters['Echelle_2_rotate'] = 270
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(228, 162, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(237, 162, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_rotate'] = 270
|
self.template_parameters['Logo_2_rotate'] = 270
|
||||||
if values_page == 'A3':
|
if values_page == 'A3':
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(290, 282, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_size'] = QgsLayoutSize(290, 282, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(39, 293, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(39, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_rotate'] = 270
|
self.template_parameters['Carte_rotate'] = 0
|
||||||
self.template_parameters['Carte_frame'] = True
|
self.template_parameters['Carte_frame'] = True
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(70, 56, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(70, 55, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(296, 76, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(320, 80, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_rotate'] = 270
|
self.template_parameters['Carte_2_rotate'] = 270
|
||||||
self.template_parameters['Carte_2_frame'] = True
|
self.template_parameters['Carte_2_frame'] = True
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(290, 51, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_size'] = QgsLayoutSize(290, 5., QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(364, 293, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(365, 295, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_rotate'] = 270
|
self.template_parameters['Legande_rotate'] = 270
|
||||||
self.template_parameters['Legande_frame'] = True
|
self.template_parameters['Legande_frame'] = True
|
||||||
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(44, 27, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(41, 31, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_rotate'] = 270
|
self.template_parameters['Arrow_rotate'] = 270
|
||||||
self.template_parameters['Arrow_background'] = False
|
self.template_parameters['Arrow_background'] = False
|
||||||
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
|
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(72, 11, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(72, 11, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(329, 159, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(360, 160, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_rotate'] = 270
|
self.template_parameters['Echelle_rotate'] = 270
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(56, 42, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_size'] = QgsLayoutSize(40, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(321, 290, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(340, 290, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_rotate'] = 270
|
self.template_parameters['Logo_rotate'] = 270
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(290, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_size'] = QgsLayoutSize(290, 15, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 293, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 293, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_rotate'] = 270
|
self.template_parameters['Titre_rotate'] = 270
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(72, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_size'] = QgsLayoutSize(290, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(250, 276, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(39, 282, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_rotate'] = 0
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
self.template_parameters['Credit_alignment'] = 0x0001
|
self.template_parameters['Credit_alignment'] = 0x0001
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(72, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_size'] = QgsLayoutSize(290, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(250, 285, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(39, 274, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_rotate'] = 0
|
self.template_parameters['Source_rotate'] = 0
|
||||||
self.template_parameters['Source_alignment'] = 0x0001
|
self.template_parameters['Source_alignment'] = 0x0001
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(285, 20, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(285, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(19, 291, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(19, 291, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_rotate'] = 270
|
self.template_parameters['Sous_titre_rotate'] = 270
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(72, 19, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(70, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(340, 159, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(330, 159, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_rotate'] = 270
|
self.template_parameters['Echelle_2_rotate'] = 270
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(56, 42, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(296, 229, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(340, 230, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_rotate'] = 270
|
self.template_parameters['Logo_2_rotate'] = 270
|
||||||
return self.template_parameters
|
return self.template_parameters
|
||||||
|
|||||||
197
CenRa_AUTOMAP/tools/mises_en_pages/n2000_comparaison.py
Normal file
197
CenRa_AUTOMAP/tools/mises_en_pages/n2000_comparaison.py
Normal 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, 140, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(28, 3, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 270
|
||||||
|
self.template_parameters['Carte_frame'] = True
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 40, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(165, 55, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 270
|
||||||
|
self.template_parameters['Carte_2_frame'] = True
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286, 36, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(185, 145, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 270
|
||||||
|
self.template_parameters['Legande_frame'] = True
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(29, 4, 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(196, 210, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(185, 290, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 270
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(290.0, 10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 295, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 270
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(145.0, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(173, 143.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 180
|
||||||
|
self.template_parameters['Credit_alignment'] = 0x0001
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(145.0, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(173, 137.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 180
|
||||||
|
self.template_parameters['Source_alignment'] = 0x0001
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(290, 10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(12, 295, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 270
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50.0, 13, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(185, 210, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(185, 248, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 270
|
||||||
|
if values_page == 'A3':
|
||||||
|
self.template_parameters['Carte_size'] = QgsLayoutSize(225.0, 200, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(28, 3, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 270
|
||||||
|
self.template_parameters['Carte_frame'] = True
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 40, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(250, 55, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 270
|
||||||
|
self.template_parameters['Carte_2_frame'] = True
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(200, 36, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(260, 235, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 270
|
||||||
|
self.template_parameters['Legande_frame'] = True
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(29, 4, 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(276, 325, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(265, 410, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 270
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(405.0, 10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 410, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 270
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(225.0, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(253, 203.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 180
|
||||||
|
self.template_parameters['Credit_alignment'] = 0x0001
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(225.0, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(253, 197.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 180
|
||||||
|
self.template_parameters['Source_alignment'] = 0x0001
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(405, 10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(12, 410, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 270
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50.0, 13, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(265, 325, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(265, 365, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 270
|
||||||
|
if page_rotate == 'Landscape':
|
||||||
|
if values_page == 'A4':
|
||||||
|
self.template_parameters['Carte_size'] = QgsLayoutSize(206.0, 200, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(29, 8.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 270
|
||||||
|
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(210, 54.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 270
|
||||||
|
self.template_parameters['Carte_2_frame'] = True
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(206.0, 36, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(258, 208.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 270
|
||||||
|
self.template_parameters['Legande_frame'] = True
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.0, 14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(30, 23.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 270
|
||||||
|
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(241, 112, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(237, 206.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 270
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(206.0, 11, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 208.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 270
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(207, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(28, 202, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
|
self.template_parameters['Credit_alignment'] = 0x0001
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(207, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(28, 196, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 0
|
||||||
|
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(13, 206.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 270
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50, 13, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(233, 112, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40.0, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(237, 162, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 270
|
||||||
|
if values_page == 'A3':
|
||||||
|
self.template_parameters['Carte_size'] = QgsLayoutSize(290, 282, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(39, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 0
|
||||||
|
self.template_parameters['Carte_frame'] = True
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(70, 55, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(320, 80, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 270
|
||||||
|
self.template_parameters['Carte_2_frame'] = True
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(290, 5., QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(365, 295, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 270
|
||||||
|
self.template_parameters['Legande_frame'] = True
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(20, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(41, 31, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 270
|
||||||
|
self.template_parameters['Arrow_background'] = False
|
||||||
|
self.template_parameters['Arrow_path'] = "NorthArrow_03.svg"
|
||||||
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(72, 11, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(360, 160, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(40, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(340, 290, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 270
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(290, 15, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(3, 293, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 270
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(290, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(39, 282, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
|
self.template_parameters['Credit_alignment'] = 0x0001
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(290, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(39, 274, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 0
|
||||||
|
self.template_parameters['Source_alignment'] = 0x0001
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(285, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(19, 291, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 270
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(70, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(330, 159, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 270
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40, 30, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(340, 230, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 270
|
||||||
|
return self.template_parameters
|
||||||
Loading…
x
Reference in New Issue
Block a user