diff --git a/CenRa_FLUX/flux_editor.py b/CenRa_FLUX/flux_editor.py
index d3afe21..ea5013d 100644
--- a/CenRa_FLUX/flux_editor.py
+++ b/CenRa_FLUX/flux_editor.py
@@ -26,6 +26,7 @@ from qgis.PyQt.QtWidgets import (
QToolButton,
QTableWidget,
QTableWidgetItem,
+ QMessageBox,
QVBoxLayout,
)
from .tools.PythonSQL import *
@@ -242,9 +243,9 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
def limite_flux(self):
- if self.tableWidget_2.rowCount() > 3:
+ if self.tableWidget_2.rowCount() > 5:
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !",
- "Le nombre de flux à charger en une seule fois est limité à 3 pour des questions de performances. Souhaitez vous tout de même charger les " + str(
+ "Le nombre de flux à charger en une seule fois est limité à 5 pour des questions de performances. Souhaitez vous tout de même charger les " + str(
self.tableWidget_2.rowCount()) + " flux sélectionnés ? (risque de plantage de QGIS)",
QMessageBox.Yes | QMessageBox.No)
if self.QMBquestion == QMessageBox.Yes:
@@ -253,7 +254,7 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
if self.QMBquestion == QMessageBox.No:
print("Annulation du chargement des couches")
- if self.tableWidget_2.rowCount() <= 3:
+ if self.tableWidget_2.rowCount() <= 5:
self.chargement_flux()
def chargement_flux(self):
diff --git a/CenRa_FLUX/metadata.txt b/CenRa_FLUX/metadata.txt
index 1a7b13e..9474397 100644
--- a/CenRa_FLUX/metadata.txt
+++ b/CenRa_FLUX/metadata.txt
@@ -6,7 +6,7 @@
name=CenRa_FLUX
qgisMinimumVersion=3.0
description=Permet d'ouvrire une table dans la base PostGis
-version=2.0
+version=2.1
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr
@@ -32,7 +32,7 @@ icon=icon.png
# experimental flag
experimental=False
-changelog=
CenRA_FLUX:
22/10/2024 - Version 2.0:
- Reformatage du code.03/10/2024 - Version 1.14:
- Remonte la fênetre dans la pille.13/09/2024 - Version 1.13:
- MAJ sur le lien du changelog- Bug-fix: Ouvre MultiPolygone et Polygon séparément.10/09/2024 - Version 1.11:
- Ouverture de table contenant plusieurs géométries.26/08/2024 - Version 1.10:
- Ajoute d'un changelog et vérification de mise à jour.
+changelog=CenRA_FLUX:
22/10/2024 - Version 2.1:
- Correctif de bug. - Evolution de la limit de 3 à 5. 22/10/2024 - Version 2.0:
- Reformatage du code.03/10/2024 - Version 1.14:
- Remonte la fênetre dans la pille.13/09/2024 - Version 1.13:
- MAJ sur le lien du changelog- Bug-fix: Ouvre MultiPolygone et Polygon séparément.10/09/2024 - Version 1.11:
- Ouverture de table contenant plusieurs géométries.26/08/2024 - Version 1.10:
- Ajoute d'un changelog et vérification de mise à jour.
# deprecated flag (applies to the whole plugin, not just a single version)
deprecated=False
diff --git a/CenRa_Metabase/editor.py b/CenRa_Metabase/editor.py
index 1d496b9..5a882a0 100644
--- a/CenRa_Metabase/editor.py
+++ b/CenRa_Metabase/editor.py
@@ -64,6 +64,12 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
self.issues_app.setAutoRaise(True)
self.issues_app.setText('')
self.issues_app.setIcon(QIcon(QgsApplication.iconPath('mIconInfo.svg')))
+ self.auto_adding.setIcon(QtGui.QIcon(resources_path('icons','auto_add.png')))
+ self.auto_adding.hide()
+ if os.getlogin() == 'tlaveille' or 'lpoulin' or 'rclement':
+ self.auto_adding.show()
+
+ self.auto_adding.clicked.connect(self.auto_run)
self.issues_app.clicked.connect(self.issues_open)
self.categories_select_view.itemDoubleClicked.connect(self.add_categories_view)
self.categories_view.itemDoubleClicked.connect(self.deleter_categories_view)
@@ -78,6 +84,20 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
self.delete_lien_button.clicked.connect(self.delete_lien)
self.delete_contact_button.clicked.connect(self.delete_contact)
+ def auto_run(self):
+ self.role_box.setCurrentIndex(1)
+ self.nom_line.setText('LAVEILLE')
+ self.organisation_box.setCurrentIndex(1)
+ self.email_line.setText('tom.laveille@cen-rhonealpes.fr')
+ self.telephone_line.setText('0451260811')
+ self.add_contact()
+
+ self.type_box.setCurrentIndex(16)
+ self.url_line.setText('www.cen-rhonealpes.fr')
+ self.mime_box.setCurrentIndex(16)
+ self.format_box.setCurrentIndex(0)
+ self.taille_line.setText('45')
+ self.add_lien()
def add_metadata(self):
table_name = layer.dataProvider().uri().table()
schema_name = layer.dataProvider().uri().schema()
@@ -363,7 +383,6 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
self.nbr_layers.setPlainText(count_layers)
self.typegeom_plaintext.setPlainText(geomtype)
-
crs_name = str(layer.crs().description())
self.crsname_plaintext.setPlainText(crs_name)
crs_code = str(layer.crs().authid())
diff --git a/CenRa_Metabase/tools/icons/auto_add.png b/CenRa_Metabase/tools/icons/auto_add.png
new file mode 100644
index 0000000..021f85b
Binary files /dev/null and b/CenRa_Metabase/tools/icons/auto_add.png differ
diff --git a/CenRa_Metabase/tools/ui/CenRa_Metabase_editorwidget_base.ui b/CenRa_Metabase/tools/ui/CenRa_Metabase_editorwidget_base.ui
index 91c6c4b..ac91920 100644
--- a/CenRa_Metabase/tools/ui/CenRa_Metabase_editorwidget_base.ui
+++ b/CenRa_Metabase/tools/ui/CenRa_Metabase_editorwidget_base.ui
@@ -101,9 +101,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html>
+</style></head><body style=" font-family:'Myriad Pro Black'; font-size:10pt; font-weight:600; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400;"><br /></p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400;"><br /></p></body></html>
@@ -365,7 +365,7 @@ p, li { white-space: pre-wrap; }
2024
12
- 25
+ 24
@@ -830,7 +830,7 @@ p, li { white-space: pre-wrap; }
2024
12
- 23
+ 22
@@ -1582,7 +1582,7 @@ p, li { white-space: pre-wrap; }
2024
12
- 24
+ 23
@@ -1681,7 +1681,7 @@ p, li { white-space: pre-wrap; }
2024
12
- 24
+ 23
@@ -1879,6 +1879,31 @@ p, li { white-space: pre-wrap; }
Qt::NoArrow
+
+
+ true
+
+
+
+ 550
+ 10
+ 41
+ 41
+
+
+
+ ...
+
+
+
+ 32
+ 32
+
+
+
+ Qt::NoArrow
+
+
titre_line
diff --git a/CenRa_PAGERENDER/canvas_editor.py b/CenRa_PAGERENDER/canvas_editor.py
index caf3233..b4bbf69 100644
--- a/CenRa_PAGERENDER/canvas_editor.py
+++ b/CenRa_PAGERENDER/canvas_editor.py
@@ -135,6 +135,7 @@ class PageRender_Editor(QDialog, EDITOR_CLASS):
self.path = path[1:]+'\\demoV2.py'
#self.tabWidget.setStyleSheet('background-image: url('+path+'/tools/bg/Capture.png);')
+ self.toolButton.setIcon(QtGui.QIcon(resources_path('ui','rotate.png')))
self.horizontalSlider.valueChanged.connect(self.horizontal)
self.verticalSlider.valueChanged.connect(self.vertical)
diff --git a/CenRa_PAGERENDER/metadata.txt b/CenRa_PAGERENDER/metadata.txt
index e39108e..fe649f0 100644
--- a/CenRa_PAGERENDER/metadata.txt
+++ b/CenRa_PAGERENDER/metadata.txt
@@ -6,7 +6,7 @@
name=CenRa_PageRender
qgisMinimumVersion=3.0
description=CenRa_PageRender
-version=1.2
+version=1.3
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr
@@ -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=CenRa_PageRender:
21/10/2024 - Version 1.1:
- Les match en if. - Bouton de scroll et adaptation portrait.09/10/2024 - Version 1.0:
- Création.
+changelog=CenRa_PageRender:
08/11/2024 - Version 1.3:
- Correctif de bug. 21/10/2024 - Version 1.1:
- Les match en if. - Bouton de scroll et adaptation portrait.09/10/2024 - Version 1.0:
- Création.
# Tags are comma separated with spaces allowed
tags=python
diff --git a/CenRa_PAGERENDER/tools/ui/CenRa_PageRender_base.ui b/CenRa_PAGERENDER/tools/ui/CenRa_PageRender_base.ui
index abb71cb..fcd8676 100644
--- a/CenRa_PAGERENDER/tools/ui/CenRa_PageRender_base.ui
+++ b/CenRa_PAGERENDER/tools/ui/CenRa_PageRender_base.ui
@@ -547,7 +547,7 @@
210
10
- 20
+ 16
21
@@ -674,6 +674,9 @@
true
+
+ true
+
frame
horizontalSlider
diff --git a/CenRa_PAGERENDER/tools/ui/rotate.png b/CenRa_PAGERENDER/tools/ui/rotate.png
new file mode 100644
index 0000000..85826ed
Binary files /dev/null and b/CenRa_PAGERENDER/tools/ui/rotate.png differ
diff --git a/CenRa_PAGERENDER/tools/ui/size.png b/CenRa_PAGERENDER/tools/ui/size.png
new file mode 100644
index 0000000..7cd2a08
Binary files /dev/null and b/CenRa_PAGERENDER/tools/ui/size.png differ
diff --git a/CenRa_PAGERENDER/tools/ui/size_0.png b/CenRa_PAGERENDER/tools/ui/size_0.png
new file mode 100644
index 0000000..571076b
Binary files /dev/null and b/CenRa_PAGERENDER/tools/ui/size_0.png differ
diff --git a/CenRa_POSTGIS/postgis_editor.py b/CenRa_POSTGIS/postgis_editor.py
index c581304..b345589 100644
--- a/CenRa_POSTGIS/postgis_editor.py
+++ b/CenRa_POSTGIS/postgis_editor.py
@@ -416,9 +416,11 @@ class Postgis_Editor(QDialog, EDITOR_CLASS):
SQL_trigger_length_m = "CREATE TRIGGER length_m" + tablename + " BEFORE INSERT OR UPDATE ON " + schema + "." + tablename + " FOR EACH ROW EXECUTE PROCEDURE ref.length_m();"
SQL_trigger_length_km = "CREATE TRIGGER length_km" + tablename + " BEFORE INSERT OR UPDATE ON " + schema + "." + tablename + " FOR EACH ROW EXECUTE PROCEDURE ref.length_km();"
SQL_trigger_coordonnees = "CREATE TRIGGER coordonnees" + tablename + " BEFORE INSERT OR UPDATE ON " + schema + "." + tablename + " FOR EACH ROW EXECUTE PROCEDURE ref.coordonnees();"
+ SQL_GRANT_TABLE="GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON "+schema+"."+tablename+" TO grp_qgis;GRANT DELETE, INSERT, REFERENCES, SELECT, TRIGGER, TRUNCATE, UPDATE ON "+schema+"."+tablename+" TO grp_sig;GRANT ALL ON SEQUENCE "+schema+"."+tablename+"_gid_seq TO grp_qgis;"
cur.execute(SQL_vierge)
cur.execute(SQL_pkey)
+ cur.execute(SQL_GRANT_TABLE)
if self.couche_vierge_point.isChecked() == 1 :
cur.execute(SQL_trigger_coordonnees)
diff --git a/CenRa_POSTGIS/tools/PythonSQL.py b/CenRa_POSTGIS/tools/PythonSQL.py
index 9880760..1bfaf2d 100644
--- a/CenRa_POSTGIS/tools/PythonSQL.py
+++ b/CenRa_POSTGIS/tools/PythonSQL.py
@@ -29,6 +29,8 @@ else:
os_user = os.environ['USERNAME']
if os_user == 'STAGE':
os_user='stage'
+if os_user == 'Administrateur':
+ os_user='stage'
geom = "geom"
champ_travaux_prevus_multipolygon="""(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, surface_m2 double precision, surface_ha double precision, date_creation date, date_maj date, geom geometry(MultiPolygon,2154))"""
diff --git a/plugins.xml b/plugins.xml
index 117caad..b9ad961 100644
--- a/plugins.xml
+++ b/plugins.xml
@@ -51,9 +51,9 @@
cenra,sicen
-
+
- 2.0
+ 2.1
3.16
https://plateformesig.cenra-outils.org/
CenRa_FLUX.zip
@@ -62,7 +62,7 @@
https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_FLUX.zip
CEN-Rhone-Alpes
2024-02-06
- 2024-10-22
+ 2024-11-08
False
False
cenra,flux
@@ -102,9 +102,9 @@
cenra,mise en page,atlas
-
+
- 1.2
+ 1.3
3.16
https://plateformesig.cenra-outils.org/
CenRa_PAGERENDER.zip
@@ -113,7 +113,7 @@
https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_PAGERENDER.zip
CEN-Rhone-Alpes
2024-10-09
- 2024-10-21
+ 2024-11-08
True
False
cenra,mise en page,atlas