forked from CEN-RA/Plugin_QGIS
adjust polices
This commit is contained in:
parent
36403781ac
commit
124938ff6b
@ -76,7 +76,8 @@ url_ortho = 'http://tiles.craig.fr/ortho/service/?crs=EPSG:2154&featureCount=10&
|
|||||||
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'
|
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'
|
||||||
url_pente = 'http://tiles.craig.fr/mnt/crs=EPSG:2154&featureCount=10&format=image/png&layers=pente&maxHeight=256&maxWidth=256&styles=&url=http://tiles.craig.fr/mnt'
|
url_pente = 'http://tiles.craig.fr/mnt/crs=EPSG:2154&featureCount=10&format=image/png&layers=pente&maxHeight=256&maxWidth=256&styles=&url=http://tiles.craig.fr/mnt'
|
||||||
data_source = [
|
data_source = [
|
||||||
'CENRA',
|
'CEN Isère',
|
||||||
|
'CEN-RA',
|
||||||
'IGN',
|
'IGN',
|
||||||
'CRAIG',
|
'CRAIG',
|
||||||
'OpenStreetMap',
|
'OpenStreetMap',
|
||||||
@ -184,7 +185,9 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
for l,logo_x in enumerate(custome_bibliotech):
|
for l,logo_x in enumerate(custome_bibliotech):
|
||||||
logo_library.append(' '+os.path.basename(logo_x))
|
logo_library.append(' '+os.path.basename(logo_x))
|
||||||
|
|
||||||
bibliotech = glob.glob(resources_path("logo_library","*.png"))
|
bibliotech_png = glob.glob(resources_path("logo_library","*.png"))
|
||||||
|
bibliotech_jpeg = glob.glob(resources_path("logo_library","*.jpg"))
|
||||||
|
bibliotech = [*bibliotech_png, *bibliotech_jpeg]
|
||||||
for l,logo_x in enumerate(bibliotech):
|
for l,logo_x in enumerate(bibliotech):
|
||||||
logo_library.append(os.path.basename(logo_x))
|
logo_library.append(os.path.basename(logo_x))
|
||||||
self.mComboBox_4.addItems(sorted(logo_library))
|
self.mComboBox_4.addItems(sorted(logo_library))
|
||||||
@ -483,13 +486,15 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
image1.attemptMove(self.template_parameters['image_position'])
|
image1.attemptMove(self.template_parameters['image_position'])
|
||||||
image1.attemptResize(self.template_parameters['image_size'])
|
image1.attemptResize(self.template_parameters['image_size'])
|
||||||
self.layout.addLayoutItem(image1)
|
self.layout.addLayoutItem(image1)
|
||||||
|
image1.setMode(QgsLayoutItemPicture.FormatRaster)
|
||||||
|
|
||||||
# Ajout de la vague basse
|
# Ajout de la vague basse
|
||||||
image2= QgsLayoutItemPicture(self.layout)
|
image2 = QgsLayoutItemPicture(self.layout)
|
||||||
image2.setPicturePath(resources_path("mises_en_pages","vague2.png"))
|
image2.setPicturePath(resources_path("mises_en_pages","vague2.png"))
|
||||||
image2.attemptMove(self.template_parameters['image_position_2'])
|
image2.attemptMove(self.template_parameters['image_position_2'])
|
||||||
image2.attemptResize(self.template_parameters['image_size_2'])
|
image2.attemptResize(self.template_parameters['image_size_2'])
|
||||||
self.layout.addLayoutItem(image2)
|
self.layout.addLayoutItem(image2)
|
||||||
|
image2.setMode(QgsLayoutItemPicture.FormatRaster)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -498,7 +503,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.layout.addLayoutItem(title)
|
self.layout.addLayoutItem(title)
|
||||||
titre = layout_name
|
titre = layout_name
|
||||||
title.setText(titre)
|
title.setText(titre)
|
||||||
title.setFont(QFont("Calibri", 15, QFont.Bold))
|
title.setFont(QFont("Museo 700", 15, QFont.Bold))
|
||||||
|
title.setFontColor(QColor(62, 62, 62, 24))
|
||||||
title.attemptMove(self.template_parameters['title_position'])
|
title.attemptMove(self.template_parameters['title_position'])
|
||||||
title.attemptResize(self.template_parameters['title_size'])
|
title.attemptResize(self.template_parameters['title_size'])
|
||||||
title.setBackgroundEnabled(True)
|
title.setBackgroundEnabled(True)
|
||||||
@ -516,7 +522,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
if self.radioButton_9.isChecked() == 1:
|
if self.radioButton_9.isChecked() == 1:
|
||||||
titre = titre + ' [%' + self.comboBox_4.currentText() + '%]'
|
titre = titre + ' [%' + self.comboBox_4.currentText() + '%]'
|
||||||
subtitle.setText(titre)
|
subtitle.setText(titre)
|
||||||
subtitle.setFont(QFont("MS Shell Dlg 2", 10))
|
subtitle.setFont(QFont("Calibri", 10))
|
||||||
|
subtitle.setFontColor(QColor(0, 69, 148, 58))
|
||||||
subtitle.attemptMove(self.template_parameters['subtitle_position'])
|
subtitle.attemptMove(self.template_parameters['subtitle_position'])
|
||||||
subtitle.attemptResize(self.template_parameters['subtitle_size'])
|
subtitle.attemptResize(self.template_parameters['subtitle_size'])
|
||||||
subtitle.setId("SubTitle")
|
subtitle.setId("SubTitle")
|
||||||
@ -533,7 +540,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
logo.setMode(QgsLayoutItemPicture.FormatRaster)
|
logo.setMode(QgsLayoutItemPicture.FormatRaster)
|
||||||
logo.attemptMove(self.template_parameters['logo_position'])
|
logo.attemptMove(self.template_parameters['logo_position'])
|
||||||
logo.setFixedSize(self.template_parameters['logo_size'])
|
logo.setFixedSize(self.template_parameters['logo_size'])
|
||||||
logo.setPicturePath(resources_path("icons","CEN.png"))
|
logo.setPicturePath(resources_path("icons","CEN38.jpg"))
|
||||||
logo.setId('logo')
|
logo.setId('logo')
|
||||||
self.layout.addLayoutItem(logo)
|
self.layout.addLayoutItem(logo)
|
||||||
|
|
||||||
@ -597,9 +604,14 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
legend.setEqualColumnWidth(True)
|
legend.setEqualColumnWidth(True)
|
||||||
legend.setSplitLayer(True)
|
legend.setSplitLayer(True)
|
||||||
legend.setColumnSpace(5)
|
legend.setColumnSpace(5)
|
||||||
|
legend.setTitle('Légende')
|
||||||
legend.rstyle(QgsLegendStyle.Title).setMargin(1.5) # 1 mm
|
legend.rstyle(QgsLegendStyle.Title).setMargin(1.5) # 1 mm
|
||||||
|
legend.rstyle(QgsLegendStyle.Title).setFont(QFont("Calibri", 12,QFont.Bold))
|
||||||
legend.rstyle(QgsLegendStyle.Group).setMargin(QgsLegendStyle.Top, 3)
|
legend.rstyle(QgsLegendStyle.Group).setMargin(QgsLegendStyle.Top, 3)
|
||||||
|
legend.rstyle(QgsLegendStyle.Group).setFont(QFont("Calibri", 10))
|
||||||
legend.rstyle(QgsLegendStyle.Subgroup).setMargin(QgsLegendStyle.Top, 3)
|
legend.rstyle(QgsLegendStyle.Subgroup).setMargin(QgsLegendStyle.Top, 3)
|
||||||
|
legend.rstyle(QgsLegendStyle.Subgroup).setFont(QFont("Calibri", 10,QFont.Bold))
|
||||||
|
legend.rstyle(QgsLegendStyle.SymbolLabel).setFont(QFont("Calibri", 10))
|
||||||
legend.setColumnCount(self.spinBox.value())
|
legend.setColumnCount(self.spinBox.value())
|
||||||
|
|
||||||
legend.adjustBoxSize()
|
legend.adjustBoxSize()
|
||||||
@ -624,6 +636,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.scalebarnumeric_qpt.attemptMove(self.template_parameters['scalebarnumeric_position'])
|
self.scalebarnumeric_qpt.attemptMove(self.template_parameters['scalebarnumeric_position'])
|
||||||
self.scalebarnumeric_qpt.attemptResize(self.template_parameters['scalebarnumeric_size'])
|
self.scalebarnumeric_qpt.attemptResize(self.template_parameters['scalebarnumeric_size'])
|
||||||
self.scalebarnumeric_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
|
self.scalebarnumeric_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
|
||||||
|
self.scalebarnumeric_qpt.setFont(QFont("Calibri", 10))
|
||||||
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))
|
||||||
|
|
||||||
@ -642,6 +655,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.scalebar_qpt.attemptMove(self.template_parameters['scalebar_position'])
|
self.scalebar_qpt.attemptMove(self.template_parameters['scalebar_position'])
|
||||||
self.scalebar_qpt.attemptResize(self.template_parameters['scalebar_size'])
|
self.scalebar_qpt.attemptResize(self.template_parameters['scalebar_size'])
|
||||||
self.scalebar_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
|
self.scalebar_qpt.setAlignment(QgsScaleBarSettings.Alignment(1))
|
||||||
|
self.scalebar_qpt.setFont(QFont("Calibri", 10))
|
||||||
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))
|
||||||
|
|
||||||
@ -656,9 +670,9 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
north.attemptResize(self.template_parameters['north_size'])
|
north.attemptResize(self.template_parameters['north_size'])
|
||||||
|
|
||||||
if self.radioButton_10.isChecked() == 1:
|
if self.radioButton_10.isChecked() == 1:
|
||||||
info_text = ["Source : " + self.mComboBox_3.currentText()][0]
|
info_text = ["Source : ©" + ', ©'.join(self.mComboBox_3.checkedItems())][0]
|
||||||
else:
|
else:
|
||||||
info_text = ["Source : " + self.lineEdit_4.text()][0]
|
info_text = ["Source : ©" + self.lineEdit_4.text()][0]
|
||||||
# ajout note info:
|
# ajout note info:
|
||||||
info = ["Réalisation : " + "CEN Isère (" + date.today().strftime(
|
info = ["Réalisation : " + "CEN Isère (" + date.today().strftime(
|
||||||
"%d/%m/%Y") + ")"]
|
"%d/%m/%Y") + ")"]
|
||||||
@ -668,6 +682,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
credit_text.setHAlign(Qt.AlignRight)
|
credit_text.setHAlign(Qt.AlignRight)
|
||||||
credit_text.setVAlign(Qt.AlignVCenter)
|
credit_text.setVAlign(Qt.AlignVCenter)
|
||||||
credit_text.setItemRotation(-90)
|
credit_text.setItemRotation(-90)
|
||||||
|
credit_text.setBackgroundEnabled(True)
|
||||||
|
credit_text.setBackgroundColor(QColor(255, 255, 255, 30))
|
||||||
credit_text2 = QgsLayoutItemLabel(self.layout)
|
credit_text2 = QgsLayoutItemLabel(self.layout)
|
||||||
credit_text2.setText(info_text)
|
credit_text2.setText(info_text)
|
||||||
credit_text2.setFont(QFont("Calibri", 9))
|
credit_text2.setFont(QFont("Calibri", 9))
|
||||||
@ -756,7 +772,6 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
bar_echelle.setUnits(QgsUnitTypes.DistanceKilometers)
|
bar_echelle.setUnits(QgsUnitTypes.DistanceKilometers)
|
||||||
bar_echelle.setUnitLabel("km")
|
bar_echelle.setUnitLabel("km")
|
||||||
bar_echelle.setUnitsPerSegment(round((echelle.scale()*0.02)/1000))
|
bar_echelle.setUnitsPerSegment(round((echelle.scale()*0.02)/1000))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
bar_echelle.setUnits(QgsUnitTypes.DistanceMeters)
|
bar_echelle.setUnits(QgsUnitTypes.DistanceMeters)
|
||||||
bar_echelle.setUnitLabel("m")
|
bar_echelle.setUnitLabel("m")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user