forked from CEN-RA/Plugin_QGIS
Téléverser les fichiers vers "CenRa_SICEN"
This commit is contained in:
parent
babf387f37
commit
de1c84bf6d
BIN
CenRa_SICEN/sicen.png
Normal file
BIN
CenRa_SICEN/sicen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
921
CenRa_SICEN/sicen.py
Normal file
921
CenRa_SICEN/sicen.py
Normal file
@ -0,0 +1,921 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
/***************************************************************************
|
||||
SICEN
|
||||
A QGIS plugin
|
||||
Filtre sur données SICEN
|
||||
-------------------
|
||||
begin : 2014-10-17
|
||||
copyright : (C) 2014 by Guillaume COSTES (CENRA)
|
||||
email : guillaume.costes@espaces-naturels.fr
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
"""
|
||||
"""from __future__ import absolute_import
|
||||
# Import the PyQt and QGIS libraries
|
||||
from builtins import str
|
||||
from builtins import object
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from qgis.core import *
|
||||
from qgis.gui import *
|
||||
from qgis.utils import iface"""
|
||||
|
||||
from builtins import str
|
||||
from builtins import object
|
||||
import os
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtGui import *
|
||||
from qgis.PyQt import uic
|
||||
from qgis.core import *
|
||||
from qgis.core import QgsDataSourceUri, QgsWkbTypes, QgsLayerTreeGroup, QgsLayerTreeLayer
|
||||
from qgis.PyQt.QtGui import QFont
|
||||
from qgis.PyQt.QtWidgets import QMenu, QAction, QDialog, QDialogButtonBox, QLabel, QApplication, QTabWidget, QWidget, QGroupBox, QGridLayout, QComboBox, QCheckBox, QCalendarWidget, QToolBox, QFrame, QLineEdit, QSizePolicy, QFileDialog #Modifié
|
||||
|
||||
|
||||
# Initialize Qt resources from file resources.py
|
||||
from . import resources_rc
|
||||
# Import the code for the dialog
|
||||
from .sicendialog import SICENDialog
|
||||
from .tools.PythonSQL import *
|
||||
from .tools.resources import maj_verif
|
||||
import os.path
|
||||
import qgis
|
||||
import datetime
|
||||
import csv
|
||||
|
||||
import psycopg2
|
||||
import psycopg2.extras
|
||||
import base64
|
||||
#import socket
|
||||
import os
|
||||
#import sys
|
||||
|
||||
class SICEN(object):
|
||||
|
||||
def __init__(self, iface):
|
||||
# Save reference to the QGIS interface
|
||||
self.iface = iface
|
||||
# initialize plugin directory
|
||||
self.plugin_dir = os.path.dirname(__file__)
|
||||
# initialize locale
|
||||
locale = QSettings().value("locale/userLocale")[0:2]
|
||||
localePath = os.path.join(self.plugin_dir, 'i18n', 'sicen_{}.qm'.format(locale))
|
||||
|
||||
if os.path.exists(localePath):
|
||||
self.translator = QTranslator()
|
||||
self.translator.load(localePath)
|
||||
|
||||
if qVersion() > '4.3.3':
|
||||
QCoreApplication.installTranslator(self.translator)
|
||||
|
||||
# Create the dialog (after translation) and keep reference
|
||||
self.dlg = SICENDialog()
|
||||
maj_verif('CenRa_SICEN')
|
||||
|
||||
def initGui(self):
|
||||
self.toolBar = self.iface.addToolBar("SICEN")
|
||||
self.toolBar.setObjectName("SICEN")
|
||||
|
||||
## Create action that will start plugin configuration
|
||||
self.action = QAction(
|
||||
QIcon(":/plugins/sicen/sicen.png"),
|
||||
u"Ouverture des données SICEN", self.iface.mainWindow())
|
||||
# connect the action to the run method
|
||||
self.action.triggered.connect(self.ouverture)
|
||||
|
||||
# Add toolbar button and menu item
|
||||
self.toolBar.addAction(self.action)
|
||||
self.iface.addPluginToMenu(u"SICEN", self.action)
|
||||
|
||||
## Create action that will start plugin configuration
|
||||
self.action = QAction(
|
||||
QIcon(":/plugins/sicen/sicen_export.png"),
|
||||
u"Export liste d'espèces", self.iface.mainWindow())
|
||||
# connect the action to the run method
|
||||
self.action.triggered.connect(self.export)
|
||||
|
||||
# Add toolbar button and menu item
|
||||
self.toolBar.addAction(self.action)
|
||||
self.iface.addPluginToMenu(u"SICEN", self.action)
|
||||
|
||||
self.menu = QMenu()
|
||||
self.menu.setTitle( QCoreApplication.translate( "SICEN","&SICEN" ) )
|
||||
|
||||
self.sicen_ouverture = QAction( QIcon(":/plugins/SICEN/sicen.png"), QCoreApplication.translate("SICEN", u"Ouverture des données SICEN" ), self.iface.mainWindow() )
|
||||
self.sicen_export = QAction( QIcon(":/plugins/SICEN/sicen_export.png"), QCoreApplication.translate("SICEN", u"Export liste d'espèces" ), self.iface.mainWindow() )
|
||||
|
||||
self.menu.addActions( [self.sicen_ouverture, self.sicen_export] )
|
||||
|
||||
menu_bar = self.iface.mainWindow().menuBar()
|
||||
actions = menu_bar.actions()
|
||||
lastAction = actions[ len( actions ) - 1 ]
|
||||
menu_bar.insertMenu( lastAction, self.menu )
|
||||
|
||||
self.sicen_ouverture.triggered.connect(self.ouverture)
|
||||
self.sicen_export.triggered.connect(self.export)
|
||||
|
||||
def unload(self):
|
||||
# Remove the plugin menu item and icon
|
||||
self.iface.removePluginMenu(u"&SICEN", self.action)
|
||||
self.iface.removeToolBarIcon(self.action)
|
||||
|
||||
# run method that performs all the real work
|
||||
def ouverture(self):
|
||||
|
||||
first_conn = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=first_cnx password=" + password)
|
||||
first_cur = first_conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_cur.execute("SELECT mdp_w, login_w FROM pg_catalog.pg_user t1, admin_sig.vm_users_sig t2 WHERE t2.oid = t1.usesysid AND (login_w = '" + os_user + "' OR login_w = '" + os_user + "')")
|
||||
res_ident = first_cur.fetchone()
|
||||
mdp = base64.b64decode(str(res_ident[0])).decode('utf-8')
|
||||
user = res_ident[1]
|
||||
|
||||
con = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=" + user + " password=" + mdp)
|
||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_conn.close()
|
||||
|
||||
## Creation des listes deroulantes
|
||||
# Listing de valeur des champs
|
||||
SQL_observateur = u"""SELECT DISTINCT nom || '_' || prenom as nom FROM md.personne ORDER BY nom"""
|
||||
SQL_nom_com = u"""SELECT DISTINCT nom FROM saisie.commune ORDER BY nom"""
|
||||
SQL_nom_vern = u"""SELECT DISTINCT nom_vern FROM _agregation_ra.observations_table ORDER BY nom_vern"""
|
||||
SQL_nom_complet = u"""SELECT DISTINCT nom_complet FROM _agregation_ra.observations_table ORDER BY nom_complet"""
|
||||
SQL_ordre = u"""SELECT DISTINCT ordre FROM _agregation_ra.observations_table ORDER BY ordre"""
|
||||
|
||||
# Generation des listes
|
||||
cur.execute(SQL_observateur)
|
||||
list_observateur = cur.fetchall()
|
||||
|
||||
cur.execute(SQL_nom_com)
|
||||
list_nom_com = cur.fetchall()
|
||||
|
||||
cur.execute(SQL_nom_vern)
|
||||
list_nom_vern = cur.fetchall()
|
||||
|
||||
cur.execute(SQL_nom_complet)
|
||||
list_nom_complet = cur.fetchall()
|
||||
|
||||
cur.execute(SQL_ordre)
|
||||
list_ordre = cur.fetchall()
|
||||
|
||||
con.close()
|
||||
|
||||
|
||||
# Ajout des items dans les combobox
|
||||
self.dlg.observateur_1.clear()
|
||||
i = 0
|
||||
while i < len(list_observateur):
|
||||
self.dlg.observateur_1.addItems(list_observateur[i])
|
||||
i=i+1
|
||||
self.dlg.observateur_1.setCurrentIndex(-1) # Pour ne pas commencer la liste au premier item
|
||||
|
||||
self.dlg.observateur_2.clear()
|
||||
i = 0
|
||||
while i < len(list_observateur):
|
||||
self.dlg.observateur_2.addItems(list_observateur[i])
|
||||
i=i+1
|
||||
self.dlg.observateur_2.setCurrentIndex(-1)
|
||||
|
||||
self.dlg.observateur_3.clear()
|
||||
i = 0
|
||||
while i < len(list_observateur):
|
||||
self.dlg.observateur_3.addItems(list_observateur[i])
|
||||
i=i+1
|
||||
self.dlg.observateur_3.setCurrentIndex(-1)
|
||||
|
||||
self.dlg.observateur_4.clear()
|
||||
i = 0
|
||||
while i < len(list_observateur):
|
||||
self.dlg.observateur_4.addItems(list_observateur[i])
|
||||
i=i+1
|
||||
self.dlg.observateur_4.setCurrentIndex(-1)
|
||||
|
||||
self.dlg.nom_com_1.clear()
|
||||
i = 0
|
||||
while i < len(list_nom_com):
|
||||
self.dlg.nom_com_1.addItems(list_nom_com[i])
|
||||
i=i+1
|
||||
self.dlg.nom_com_1.setCurrentIndex(-1)
|
||||
|
||||
self.dlg.nom_com_2.clear()
|
||||
i = 0
|
||||
while i < len(list_nom_com):
|
||||
self.dlg.nom_com_2.addItems(list_nom_com[i])
|
||||
i=i+1
|
||||
self.dlg.nom_com_2.setCurrentIndex(-1)
|
||||
|
||||
self.dlg.nom_vern.clear()
|
||||
i = 0
|
||||
while i < len(list_nom_vern):
|
||||
self.dlg.nom_vern.addItems(list_nom_vern[i])
|
||||
i=i+1
|
||||
self.dlg.nom_vern.setCurrentIndex(-1)
|
||||
|
||||
self.dlg.nom_complet.clear()
|
||||
i = 0
|
||||
while i < len(list_nom_complet):
|
||||
self.dlg.nom_complet.addItems(list_nom_complet[i])
|
||||
i=i+1
|
||||
self.dlg.nom_complet.setCurrentIndex(-1)
|
||||
|
||||
self.dlg.ordre.clear()
|
||||
i = 0
|
||||
while i < len(list_ordre):
|
||||
self.dlg.ordre.addItems(list_ordre[i])
|
||||
i=i+1
|
||||
self.dlg.ordre.setCurrentIndex(-1)
|
||||
|
||||
# show the dialog
|
||||
self.dlg.show()
|
||||
# Run the dialog event loop
|
||||
result = self.dlg.exec_()
|
||||
# See if OK was pressed
|
||||
if result == 1:
|
||||
|
||||
first_conn = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=first_cnx password=" + password)
|
||||
first_cur = first_conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_cur.execute("SELECT mdp_w, login_w FROM pg_catalog.pg_user t1, admin_sig.vm_users_sig t2 WHERE t2.oid = t1.usesysid AND (login_w = '" + os_user + "' OR login_w = '" + os_user + "')")
|
||||
res_ident = first_cur.fetchone()
|
||||
mdp = base64.b64decode(str(res_ident[0])).decode('utf-8')
|
||||
user = res_ident[1]
|
||||
|
||||
con = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=" + user + " password=" + mdp)
|
||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_conn.close()
|
||||
|
||||
# Requete filtre observateur
|
||||
if self.dlg.observateur_1.currentIndex() != -1 :
|
||||
sql_obs1 = """ "observateur" LIKE '%""" + self.dlg.observateur_1.currentText() + "%' "
|
||||
else :
|
||||
sql_obs1 = ''
|
||||
|
||||
if self.dlg.observateur_2.currentIndex() != -1 :
|
||||
sql_obs2 = """ "observateur" LIKE '%""" + self.dlg.observateur_2.currentText() + "%' "
|
||||
else :
|
||||
sql_obs2 = ''
|
||||
|
||||
if self.dlg.observateur_3.currentIndex() != -1 :
|
||||
sql_obs3 = """ "observateur" LIKE '%""" + self.dlg.observateur_3.currentText() + "%' "
|
||||
else :
|
||||
sql_obs3 = ''
|
||||
|
||||
if self.dlg.observateur_4.currentIndex() != -1 :
|
||||
sql_obs4 = """ "observateur" LIKE '%""" + self.dlg.observateur_4.currentText() + "%' "
|
||||
else :
|
||||
sql_obs4 = ''
|
||||
|
||||
reqwhere_obs = sql_obs1 + 'OR' + sql_obs2 + 'OR' + sql_obs3 + 'OR' + sql_obs4
|
||||
|
||||
while reqwhere_obs[-2:] == 'OR' :
|
||||
reqwhere_obs = reqwhere_obs[:-2]
|
||||
while reqwhere_obs[:2] == 'OR' :
|
||||
reqwhere_obs = reqwhere_obs[2:]
|
||||
|
||||
# Requete communes
|
||||
# Connexion a la BD
|
||||
#con = psycopg2.connect("dbname="+ dbname + " user=" + user + " host=" + host + " password=" + password + " port=" + port)
|
||||
#cur = con.cursor()
|
||||
|
||||
if self.dlg.nom_com_1.currentIndex() != -1 :
|
||||
nom_com = self.dlg.nom_com_1.currentText()
|
||||
SQL_code_INSEE = u"""SELECT DISTINCT code_insee FROM saisie.commune WHERE nom = '""" + nom_com + "'"
|
||||
cur.execute(SQL_code_INSEE)
|
||||
list_code_INSEE = cur.fetchall()
|
||||
code_INSEE = list_code_INSEE[0][0]
|
||||
|
||||
sql_insee_1 = """ "code_insee" = '""" + code_INSEE + "' "
|
||||
else :
|
||||
sql_insee_1 = ''
|
||||
|
||||
if self.dlg.nom_com_2.currentIndex() != -1 :
|
||||
nom_com = self.dlg.nom_com_2.currentText()
|
||||
SQL_code_INSEE = u"""SELECT DISTINCT code_insee FROM saisie.commune WHERE nom = '""" + nom_com + "'"
|
||||
cur.execute(SQL_code_INSEE)
|
||||
list_code_INSEE = cur.fetchall()
|
||||
code_INSEE = list_code_INSEE[0][0]
|
||||
|
||||
sql_insee_2 = """ "code_insee" = '""" + code_INSEE + "' "
|
||||
else :
|
||||
sql_insee_2 = ''
|
||||
|
||||
reqwhere_insee = sql_insee_1 + 'OR' + sql_insee_2
|
||||
|
||||
while reqwhere_insee[-2:] == 'OR' :
|
||||
reqwhere_insee = reqwhere_insee[:-2]
|
||||
while reqwhere_insee[:2] == 'OR' :
|
||||
reqwhere_insee = reqwhere_insee[2:]
|
||||
|
||||
con.close()
|
||||
|
||||
# Requete date
|
||||
today = datetime.datetime.now().strftime("%Y-%m-%d")
|
||||
date_min = self.dlg.date_min.selectedDate().toString("yyyy-MM-dd")
|
||||
date_max = self.dlg.date_max.selectedDate().toString("yyyy-MM-dd")
|
||||
|
||||
if date_min != today :
|
||||
sql_date_min = """ "date_obs" >= '""" + date_min + "' "
|
||||
else :
|
||||
sql_date_min = ''
|
||||
|
||||
if date_max != today :
|
||||
sql_date_max = """ "date_obs" <= '""" + date_max + "' "
|
||||
else :
|
||||
sql_date_max = ''
|
||||
|
||||
reqwhere_date = sql_date_min + 'AND' + sql_date_max
|
||||
|
||||
while reqwhere_obs[-3:] == 'AND' :
|
||||
reqwhere_obs = reqwhere_obs[:-3]
|
||||
while reqwhere_obs[:3] == 'AND' :
|
||||
reqwhere_obs = reqwhere_obs[3:]
|
||||
|
||||
# Requete regne
|
||||
if self.dlg.Animalia.isChecked() == 1 :
|
||||
sql_Animalia = """"regne" = 'Animalia'"""
|
||||
else :
|
||||
sql_Animalia = ''
|
||||
|
||||
if self.dlg.Plantae.isChecked() == 1 :
|
||||
sql_Plantae = """"regne" = 'Plantae'"""
|
||||
else :
|
||||
sql_Plantae = ''
|
||||
|
||||
reqwhere_regne = sql_Animalia + 'OR' + sql_Plantae
|
||||
|
||||
while reqwhere_regne[-2:] == 'OR' :
|
||||
reqwhere_regne = reqwhere_regne[:-2]
|
||||
while reqwhere_regne[:2] == 'OR' :
|
||||
reqwhere_regne = reqwhere_regne[2:]
|
||||
|
||||
# Requete ordre
|
||||
if self.dlg.ordre.currentIndex() != -1 :
|
||||
reqwhere_ordre = """"ordre" = '""" + self.dlg.ordre.currentText() + "'"
|
||||
else :
|
||||
reqwhere_ordre = ''
|
||||
|
||||
# Requete sp
|
||||
if self.dlg.nom_vern.currentIndex() != -1 :
|
||||
sql_nom_vern = """"nom_vern" = '""" + self.dlg.nom_vern.currentText() + "'"
|
||||
else :
|
||||
sql_nom_vern = ''
|
||||
|
||||
if self.dlg.nom_complet.currentIndex() != -1 :
|
||||
sql_nom_complet = """"nom_complet" = '""" + self.dlg.nom_complet.currentText() + "'"
|
||||
else :
|
||||
sql_nom_complet = ''
|
||||
|
||||
reqwhere_sp = sql_nom_vern + 'OR' + sql_nom_complet
|
||||
|
||||
while reqwhere_sp[-2:] == 'OR' :
|
||||
reqwhere_sp = reqwhere_sp[:-2]
|
||||
while reqwhere_sp[:2] == 'OR' :
|
||||
reqwhere_sp = reqwhere_sp[2:]
|
||||
|
||||
# Requete filtre patrimonialite
|
||||
if self.dlg.LRD_01.isChecked() == 1 :
|
||||
sql_lrd01 = """ lrd01 IN ('VU','EN','RE','CR') """
|
||||
else :
|
||||
sql_lrd01 = ''
|
||||
|
||||
if self.dlg.LRD_07.isChecked() == 1 :
|
||||
sql_lrd07 = """ lrd07 IN ('VU','EN','RE','CR') """
|
||||
else :
|
||||
sql_lrd07 = ''
|
||||
|
||||
if self.dlg.LRD_26.isChecked() == 1 :
|
||||
sql_lrd26 = """ lrd26 IN ('VU','EN','RE','CR') """
|
||||
else :
|
||||
sql_lrd26 = ''
|
||||
|
||||
if self.dlg.LRD_38.isChecked() == 1 :
|
||||
sql_lrd38 = """ lrd38 IN ('VU','EN','RE','CR', 'AS-1', 'AS-2', 'AS-3') """
|
||||
else :
|
||||
sql_lrd38 = ''
|
||||
|
||||
if self.dlg.LRD_42.isChecked() == 1 :
|
||||
sql_lrd42 = """ lrd42 IN ('VU','EN','RE','CR') """
|
||||
else :
|
||||
sql_lrd42 = ''
|
||||
|
||||
if self.dlg.LRD_69.isChecked() == 1 :
|
||||
sql_lrd69 = """ lrd69 IN ('VU','EN','RE','CR') """
|
||||
else :
|
||||
sql_lrd69 = ''
|
||||
|
||||
if self.dlg.LRD_73.isChecked() == 1 :
|
||||
sql_lrd73 = """ lrd73 IN ('VU','EN','RE','CR') """
|
||||
else :
|
||||
sql_lrd73 = ''
|
||||
|
||||
if self.dlg.LRD_74.isChecked() == 1 :
|
||||
sql_lrd74 = """ lrd74 IN ('VU','EN','RE','CR') """
|
||||
else :
|
||||
sql_lrd74 = ''
|
||||
|
||||
if self.dlg.LRR_Flore.isChecked() == 1 :
|
||||
sql_LRR_Flore = u""" "TAXO_GROUPE" IN ('Plantes') AND (lrr like '%CR%' OR lrr like '%EN%' OR lrr like '%EW%' OR lrr like '%RE%' OR lrr like '%VU%')"""
|
||||
else :
|
||||
sql_LRR_Flore = ''
|
||||
|
||||
if self.dlg.LRR_Oiseaux.isChecked() == 1 :
|
||||
sql_LRR_Oiseaux = u""" "TAXO_GROUPE" = 'Oiseaux' AND (lrr like '%RE %' OR lrr like '%CR %' OR lrr like '%EN %' OR lrr like '%VU %') """
|
||||
else :
|
||||
sql_LRR_Oiseaux = ''
|
||||
|
||||
if self.dlg.LRR_Autre.isChecked() == 1 :
|
||||
sql_LRR_Autre = u""" (lrr like '%RE %' OR lrr like '%CR %' OR lrr like '%EN %' OR lrr like '%VU %') AND "TAXO_GROUPE" NOT IN ('Oiseaux', 'Plantes') """
|
||||
else :
|
||||
sql_LRR_Autre = ''
|
||||
|
||||
if self.dlg.LRN_Flore.isChecked() == 1 :
|
||||
sql_LRN_Flore = u""" "TAXO_GROUPE" ilike 'plantes' AND (lrr like '%CR%' OR lrr like '%EN%' OR lrr like '%EW%' OR lrr like '%RE%' OR lrr like '%VU%') """
|
||||
else :
|
||||
sql_LRN_Flore = ''
|
||||
|
||||
if self.dlg.LRN_Oiseaux.isChecked() == 1 :
|
||||
sql_LRN_Oiseaux = u""" "TAXO_GROUPE" = 'Oiseaux' AND (lrn like '%RE %' OR lrn like '%CR %' OR lrn like '%EN %' OR lrn like '%VU %') """
|
||||
else :
|
||||
sql_LRN_Oiseaux = ''
|
||||
|
||||
if self.dlg.LRN_Ortho.isChecked() == 1 :
|
||||
sql_LRN_Ortho = u""" "TAXO_GROUPE" ilike 'orthoptères' AND (lrn like '1%' OR lrn like '2%' OR lrn like '3%') """
|
||||
else :
|
||||
sql_LRN_Ortho = ''
|
||||
|
||||
if self.dlg.LRN_Autre.isChecked() == 1 :
|
||||
sql_LRN_Autre = u""" (lrr like '%CR%' OR lrr like '%EN%' OR lrr like '%EW%' OR lrr like '%RE%' OR lrr like '%VU%') AND "TAXO_GROUPE" NOT IN ('Oiseaux', 'Plantes', 'Orthoptères') """
|
||||
else :
|
||||
sql_LRN_Autre = ''
|
||||
|
||||
if self.dlg.LRE.isChecked() == 1 :
|
||||
sql_lre = """ lre IN ('VU','EN','RE','CR', 'EW', 'EX') """
|
||||
else :
|
||||
sql_lre = ''
|
||||
|
||||
if self.dlg.UICN.isChecked() == 1 :
|
||||
sql_UICN = """ lrm IN ('VU','EN','RE','CR', 'EW', 'EX') """
|
||||
else :
|
||||
sql_UICN = ''
|
||||
|
||||
|
||||
if self.dlg.PATRIMONIALITE.isChecked() == 1 :
|
||||
sql_patrimonialite = """"patrimonialite" IS NOT NULL """
|
||||
else :
|
||||
sql_patrimonialite = ''
|
||||
|
||||
if self.dlg.PATRI01.isChecked() == 1 :
|
||||
sql_patri01 = """"patri01" IS NOT NULL """
|
||||
else :
|
||||
sql_patri01 = ''
|
||||
|
||||
if self.dlg.PATRI07.isChecked() == 1 :
|
||||
sql_patri07 = """"patri07" IS NOT NULL """
|
||||
else :
|
||||
sql_patri07 = ''
|
||||
|
||||
if self.dlg.PATRI26.isChecked() == 1 :
|
||||
sql_patri26 = """"patri26" IS NOT NULL """
|
||||
else :
|
||||
sql_patri26 = ''
|
||||
|
||||
if self.dlg.PATRI38.isChecked() == 1 :
|
||||
sql_patri38 = """"patri38" IS NOT NULL """
|
||||
else :
|
||||
sql_patri38 = ''
|
||||
|
||||
if self.dlg.PATRI42.isChecked() == 1 :
|
||||
sql_patri42 = """"patri42" IS NOT NULL """
|
||||
else :
|
||||
sql_patri42 = ''
|
||||
|
||||
if self.dlg.PATRI69.isChecked() == 1 :
|
||||
sql_patri69 = """"patri69" IS NOT NULL """
|
||||
else :
|
||||
sql_patri69 = ''
|
||||
|
||||
if self.dlg.PATRI73.isChecked() == 1 :
|
||||
sql_patri73 = """"patri73" IS NOT NULL """
|
||||
else :
|
||||
sql_patri73 = ''
|
||||
|
||||
if self.dlg.PATRI74.isChecked() == 1 :
|
||||
sql_patri74 = """"patri74" IS NOT NULL """
|
||||
else :
|
||||
sql_patri74 = ''
|
||||
|
||||
|
||||
if self.dlg.ZNIEFF.isChecked() == 1 :
|
||||
sql_znieff = """"znieff" IS NOT NULL """
|
||||
else :
|
||||
sql_znieff = ''
|
||||
|
||||
if self.dlg.DH_AnnII.isChecked() == 1 :
|
||||
sql_dh_an2 = """"dh_an2" IS NOT NULL """
|
||||
else :
|
||||
sql_dh_an2 = ''
|
||||
|
||||
if self.dlg.PD_38.isChecked() == 1 :
|
||||
sql_pd38 = """"pd38" IS NOT NULL """
|
||||
else :
|
||||
sql_pd38 = ''
|
||||
|
||||
if self.dlg.PD_42.isChecked() == 1 :
|
||||
sql_pd42 = """"pd42" IS NOT NULL """
|
||||
else :
|
||||
sql_pd42 = ''
|
||||
|
||||
if self.dlg.PN.isChecked() == 1 :
|
||||
sql_pn = """"pn" IS NOT NULL """
|
||||
else :
|
||||
sql_pn = ''
|
||||
|
||||
if self.dlg.PR.isChecked() == 1 :
|
||||
sql_pr = """"pr" IS NOT NULL """
|
||||
else :
|
||||
sql_pr = ''
|
||||
|
||||
reqwhere_pat = sql_lrd01 + 'OR' + sql_lrd07 + 'OR' + sql_lrd26 + 'OR' + sql_lrd38 + 'OR' + sql_lrd42 + 'OR' + sql_lrd69 + 'OR' + sql_lrd73 + 'OR' + sql_lrd74 + 'OR' + sql_lre + 'OR' + sql_LRN_Flore + 'OR' + sql_LRN_Oiseaux + 'OR' + sql_LRN_Ortho + 'OR' + sql_LRN_Autre + 'OR' + sql_LRR_Flore + 'OR' + sql_LRR_Oiseaux + 'OR' + sql_LRR_Autre + 'OR' + sql_UICN + 'OR' + sql_pd38 + 'OR' + sql_pd42 + 'OR' + sql_pn + 'OR' + sql_pr + 'OR' + sql_dh_an2 + 'OR' + sql_patri01 + 'OR' + sql_patri07 + 'OR' + sql_patri26 + 'OR' + sql_patri38 + 'OR' + sql_patri42 + 'OR' + sql_patri69 + 'OR' + sql_patri73 + 'OR' + sql_patri74 + 'OR' + sql_patrimonialite
|
||||
|
||||
while reqwhere_pat.find('OROR') != -1 :
|
||||
reqwhere_pat = reqwhere_pat.replace('OROR','OR')
|
||||
while reqwhere_pat[-2:] == 'OR' :
|
||||
reqwhere_pat = reqwhere_pat[:-2]
|
||||
while reqwhere_pat[:2] == 'OR' :
|
||||
reqwhere_pat = reqwhere_pat[2:]
|
||||
|
||||
# Requete geom
|
||||
if self.dlg.bouton_geom.isChecked() == 1 :
|
||||
|
||||
layer = self.iface.activeLayer()
|
||||
if layer == None :
|
||||
#self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5)
|
||||
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=Qgis.Warning, duration=5)
|
||||
|
||||
else :
|
||||
selection = layer.selectedFeatures()
|
||||
if layer.selectedFeatureCount() == 1 :
|
||||
for feature in selection:
|
||||
geom = feature.geometry()
|
||||
poly = geom.asWkt()
|
||||
|
||||
buffer = self.dlg.buffer.text()
|
||||
reqwhere_geom = " ST_intersects(geometrie,ST_Buffer(ST_geomFromText('" + poly + "',2154), " + buffer + " ))"
|
||||
|
||||
# Requete finale
|
||||
reqwhere_final = '(' + reqwhere_obs + ')' + 'AND' + reqwhere_insee + 'AND' + reqwhere_ordre + 'AND' + reqwhere_sp + 'AND' + '(' + reqwhere_pat + ')' + 'AND' + reqwhere_regne + 'AND' + reqwhere_date + 'AND' + reqwhere_geom
|
||||
|
||||
# Nettoyage de la requete finale
|
||||
while reqwhere_final.find('ANDAND') != -1 :
|
||||
reqwhere_final = reqwhere_final.replace('ANDAND','AND')
|
||||
while reqwhere_final.find('AND()AND') != -1 :
|
||||
reqwhere_final = reqwhere_final.replace('AND()AND','AND')
|
||||
while reqwhere_final[-3:] == 'AND' :
|
||||
reqwhere_final = reqwhere_final[:-3]
|
||||
while reqwhere_final[:5] == '()AND' :
|
||||
reqwhere_final = reqwhere_final[5:]
|
||||
while reqwhere_final[-5:] == 'AND()' :
|
||||
reqwhere_final = reqwhere_final[:-5]
|
||||
while reqwhere_final[:3] == 'AND' :
|
||||
reqwhere_final = reqwhere_final[3:]
|
||||
|
||||
## Affichage des tables
|
||||
table_name = 'observations'
|
||||
|
||||
uri = QgsDataSourceUri()
|
||||
uri.setConnection(host ,port ,dbname ,user ,mdp)
|
||||
|
||||
if self.dlg.centroide.isChecked() == 1 :
|
||||
### Centroide
|
||||
if reqwhere_final.find('()') != -1 :
|
||||
reqwhere_final = ''
|
||||
uri.setDataSource("_agregation_ra", "observations_centroide", "geometrie", reqwhere_final, "gid")
|
||||
layer = self.iface.addVectorLayer(uri.uri(), table_name + '_centroides', "postgres")
|
||||
|
||||
else :
|
||||
|
||||
first_conn = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=first_cnx password=" + password)
|
||||
first_cur = first_conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_cur.execute("SELECT mdp_w, login_w FROM pg_catalog.pg_user t1, admin_sig.vm_users_sig t2 WHERE t2.oid = t1.usesysid AND (login_w = '" + os_user + "' OR login_w = '" + os_user + "')")
|
||||
res_ident = first_cur.fetchone()
|
||||
mdp = base64.b64decode(str(res_ident[0])).decode('utf-8')
|
||||
user = res_ident[1]
|
||||
con = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=" + user + " password=" + mdp)
|
||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_conn.close()
|
||||
|
||||
# Creation group de couches
|
||||
#i = qgis.utils.iface
|
||||
#legende = i.legendInterface()
|
||||
legende = QgsProject.instance().layerTreeRoot()
|
||||
#nomgroupe = 'Observations'
|
||||
#groupe = legende.addGroup(nomgroupe,False)
|
||||
groupe = legende.insertGroup(1, "Observations")
|
||||
groupe = legende.findGroup("Observations")
|
||||
|
||||
# Récupération de la liste de groupes
|
||||
#toc = iface.layerTreeView()
|
||||
#toc = qgis.utils.iface.legendInterface()
|
||||
#groups = toc.
|
||||
#groups = toc.groups()
|
||||
#index = groups.index(nomgroupe)
|
||||
index = 1
|
||||
|
||||
### Polygone
|
||||
reqwhere_final_poly = '(' + reqwhere_final + " AND GeometryType(geometrie) LIKE '%POLYGON%'" + ')'
|
||||
if reqwhere_final_poly.find('()') != -1 :
|
||||
reqwhere_final_poly = "(GeometryType(geometrie) LIKE '%POLYGON%')"
|
||||
|
||||
SQL_count_poly = u"""SELECT DISTINCT count(gid) AS count FROM _agregation_ra.observations_table WHERE """ + reqwhere_final_poly
|
||||
cur.execute(SQL_count_poly)
|
||||
list_count_poly = cur.fetchall()
|
||||
count_poly = list_count_poly[0][0]
|
||||
|
||||
if count_poly != 0:
|
||||
uri.setDataSource("_agregation_ra", "observations_table", "geometrie", reqwhere_final_poly, "gid")
|
||||
#layer_poly = self.iface.addVectorLayer(uri.uri(), table_name + '_poly', "postgres")
|
||||
layer_poly = QgsVectorLayer(uri.uri(), table_name + '_poly', "postgres")
|
||||
QgsProject.instance().addMapLayer(layer_poly, False)
|
||||
#legende.moveLayer(layer_poly,index)
|
||||
#groupe.addLayer(layer_poly)
|
||||
groupe.insertChildNode(0, QgsLayerTreeLayer(layer_poly))
|
||||
|
||||
### Point
|
||||
reqwhere_final_point = '(' + reqwhere_final + " AND GeometryType(geometrie) LIKE '%POINT%'" + ')'
|
||||
if reqwhere_final_point.find('()') != -1 :
|
||||
reqwhere_final_point = "(GeometryType(geometrie) LIKE '%POINT%')"
|
||||
|
||||
SQL_count_point = u"""SELECT DISTINCT count(gid) AS count FROM _agregation_ra.observations_table WHERE """ + reqwhere_final_point
|
||||
cur.execute(SQL_count_point)
|
||||
list_count_point = cur.fetchall()
|
||||
count_point = list_count_point[0][0]
|
||||
|
||||
if count_point != 0:
|
||||
uri.setDataSource("_agregation_ra", "observations_table", "geometrie", reqwhere_final_point, "gid")
|
||||
#layer_point = self.iface.addVectorLayer(uri.uri(), table_name + '_point', "postgres")
|
||||
layer_point = QgsVectorLayer(uri.uri(), table_name + '_point', "postgres")
|
||||
QgsProject.instance().addMapLayer(layer_point, False)
|
||||
#legende.moveLayer(layer_point,index)
|
||||
#groupe.addLayer(layer_point)
|
||||
groupe.insertChildNode(0, QgsLayerTreeLayer(layer_point))
|
||||
|
||||
### Ligne
|
||||
reqwhere_final_ligne = '(' + reqwhere_final + " AND GeometryType(geometrie) LIKE '%LINE%'" + ')'
|
||||
if reqwhere_final_ligne.find('()') != -1 :
|
||||
reqwhere_final_ligne = "(GeometryType(geometrie) LIKE '%LINE%')"
|
||||
|
||||
SQL_count_ligne = u"""SELECT DISTINCT count(gid) AS count FROM _agregation_ra.observations_table WHERE """ + reqwhere_final_ligne
|
||||
cur.execute(SQL_count_ligne)
|
||||
list_count_ligne = cur.fetchall()
|
||||
count_ligne = list_count_ligne[0][0]
|
||||
|
||||
if count_ligne != 0:
|
||||
uri.setDataSource("_agregation_ra", "observations_table", "geometrie", reqwhere_final_ligne, "gid")
|
||||
#layer_ligne = self.iface.addVectorLayer(uri.uri(), table_name + '_ligne', "postgres")
|
||||
layer_ligne = QgsVectorLayer(uri.uri(), table_name + '_ligne', "postgres")
|
||||
QgsProject.instance().addMapLayer(layer_ligne, False)
|
||||
#legende.moveLayer(layer_ligne,index)
|
||||
#groupe.addLayer(layer_ligne)
|
||||
groupe.insertChildNode(0, QgsLayerTreeLayer(layer_ligne))
|
||||
|
||||
# ajout des couches dans le groupe Observations
|
||||
#legende.setGroupExpanded (index, True)
|
||||
|
||||
#self.iface.messageBar().pushMessage(u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=QgsMessageBar.INFO, duration=10)
|
||||
self.iface.messageBar().pushMessage("Info", u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=Qgis.Success, duration=4)
|
||||
|
||||
|
||||
elif layer.selectedFeatureCount() == 0 :
|
||||
#self.iface.messageBar().pushMessage(u"Vous devez sélectionner au moins un polygone !", level=QgsMessageBar.WARNING, duration=5)
|
||||
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner au moins un polygone !", level=Qgis.Warning, duration=5)
|
||||
reqwhere_geom = ''
|
||||
|
||||
else :
|
||||
#self.iface.messageBar().pushMessage(u"Vous devez sélectionner qu'un seul polygone !", level=QgsMessageBar.WARNING, duration=5)
|
||||
self.iface.messageBar().pushMessage("Ooops", u"Vous ne devez sélectionner qu'un seul polygone !", level=Qgis.Warning, duration=5)
|
||||
reqwhere_geom = ''
|
||||
else :
|
||||
# Requete finale
|
||||
reqwhere_final = '(' + reqwhere_obs + ')' + 'AND' + reqwhere_insee + 'AND' + reqwhere_ordre + 'AND' + reqwhere_sp + 'AND' + '(' + reqwhere_pat + ')' + 'AND' + reqwhere_regne + 'AND' + reqwhere_date
|
||||
|
||||
# Nettoyage de la requete finale
|
||||
while reqwhere_final.find('ANDAND') != -1 :
|
||||
reqwhere_final = reqwhere_final.replace('ANDAND','AND')
|
||||
while reqwhere_final.find('AND()AND') != -1 :
|
||||
reqwhere_final = reqwhere_final.replace('AND()AND','AND')
|
||||
while reqwhere_final[-3:] == 'AND' :
|
||||
reqwhere_final = reqwhere_final[:-3]
|
||||
while reqwhere_final[:5] == '()AND' :
|
||||
reqwhere_final = reqwhere_final[5:]
|
||||
while reqwhere_final[-5:] == 'AND()' :
|
||||
reqwhere_final = reqwhere_final[:-5]
|
||||
while reqwhere_final[:3] == 'AND' :
|
||||
reqwhere_final = reqwhere_final[3:]
|
||||
|
||||
## Affichage des tables
|
||||
table_name = 'observations'
|
||||
|
||||
uri = QgsDataSourceUri()
|
||||
uri.setConnection(host ,port ,dbname ,user ,mdp)
|
||||
|
||||
## Centroide
|
||||
if self.dlg.centroide.isChecked() == 1 :
|
||||
if reqwhere_final.find('()') != -1 :
|
||||
reqwhere_final = ''
|
||||
uri.setDataSource("_agregation_ra", "observations_centroide", "geometrie", reqwhere_final, "gid")
|
||||
layer = self.iface.addVectorLayer(uri.uri(), table_name + '_centroides', "postgres")
|
||||
|
||||
else :
|
||||
|
||||
first_conn = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=first_cnx password=" + password)
|
||||
first_cur = first_conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_cur.execute("SELECT mdp_w, login_w FROM pg_catalog.pg_user t1, admin_sig.vm_users_sig t2 WHERE t2.oid = t1.usesysid AND (login_w = '" + os_user + "' OR login_w = '" + os_user + "')")
|
||||
res_ident = first_cur.fetchone()
|
||||
mdp = base64.b64decode(str(res_ident[0])).decode('utf-8')
|
||||
user = res_ident[1]
|
||||
con = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=" + user + " password=" + mdp)
|
||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_conn.close()
|
||||
|
||||
# Creation group de couches
|
||||
i = qgis.utils.iface
|
||||
#legende = i.legendInterface()
|
||||
legende = QgsProject.instance().layerTreeRoot()
|
||||
#nomgroupe = 'Observations'
|
||||
#groupe = legende.addGroup(nomgroupe,False)
|
||||
groupe = legende.insertGroup(1, "Observations")
|
||||
groupe = legende.findGroup("Observations")
|
||||
|
||||
# Récupération de la liste de groupes
|
||||
#toc = iface.layerTreeView()
|
||||
#toc = qgis.utils.iface.legendInterface()
|
||||
#groups = toc.
|
||||
#groups = toc.groups()
|
||||
#index = groups.index(nomgroupe)
|
||||
index = 1
|
||||
|
||||
### Polygone
|
||||
reqwhere_final_poly = '(' + reqwhere_final + " AND GeometryType(geometrie) LIKE '%POLYGON%'" + ')'
|
||||
if reqwhere_final_poly.find('()') != -1 :
|
||||
reqwhere_final_poly = "(GeometryType(geometrie) LIKE '%POLYGON%')"
|
||||
|
||||
SQL_count_poly = u"""SELECT DISTINCT count(gid) AS count FROM _agregation_ra.observations_table WHERE """ + reqwhere_final_poly
|
||||
cur.execute(SQL_count_poly)
|
||||
list_count_poly = cur.fetchall()
|
||||
count_poly = list_count_poly[0][0]
|
||||
|
||||
if count_poly != 0:
|
||||
uri.setDataSource("_agregation_ra", "observations_table", "geometrie", reqwhere_final_poly, "gid")
|
||||
#layer_poly = self.iface.addVectorLayer(uri.uri(), table_name + '_poly', "postgres")
|
||||
layer_poly = QgsVectorLayer(uri.uri(), table_name + '_poly', "postgres")
|
||||
QgsProject.instance().addMapLayer(layer_poly, False)
|
||||
#legende.moveLayer(layer_poly,index)
|
||||
#groupe.addLayer(layer_poly)
|
||||
groupe.insertChildNode(0, QgsLayerTreeLayer(layer_poly))
|
||||
|
||||
### Point
|
||||
reqwhere_final_point = '(' + reqwhere_final + " AND GeometryType(geometrie) LIKE '%POINT%'" + ')'
|
||||
if reqwhere_final_point.find('()') != -1 :
|
||||
reqwhere_final_point = "(GeometryType(geometrie) LIKE '%POINT%')"
|
||||
|
||||
SQL_count_point = u"""SELECT DISTINCT count(gid) AS count FROM _agregation_ra.observations_table WHERE """ + reqwhere_final_point
|
||||
cur.execute(SQL_count_point)
|
||||
list_count_point = cur.fetchall()
|
||||
count_point = list_count_point[0][0]
|
||||
|
||||
if count_point != 0:
|
||||
uri.setDataSource("_agregation_ra", "observations_table", "geometrie", reqwhere_final_point, "gid")
|
||||
#layer_point = self.iface.addVectorLayer(uri.uri(), table_name + '_point', "postgres")
|
||||
layer_point = QgsVectorLayer(uri.uri(), table_name + '_point', "postgres")
|
||||
QgsProject.instance().addMapLayer(layer_point, False)
|
||||
#legende.moveLayer(layer_point,index)
|
||||
#groupe.addLayer(layer_point)
|
||||
groupe.insertChildNode(0, QgsLayerTreeLayer(layer_point))
|
||||
|
||||
### Ligne
|
||||
reqwhere_final_ligne = '(' + reqwhere_final + " AND GeometryType(geometrie) LIKE '%LINE%'" + ')'
|
||||
if reqwhere_final_ligne.find('()') != -1 :
|
||||
reqwhere_final_ligne = "(GeometryType(geometrie) LIKE '%LINE%')"
|
||||
|
||||
SQL_count_ligne = u"""SELECT DISTINCT count(gid) AS count FROM _agregation_ra.observations_table WHERE """ + reqwhere_final_ligne
|
||||
cur.execute(SQL_count_ligne)
|
||||
list_count_ligne = cur.fetchall()
|
||||
count_ligne = list_count_ligne[0][0]
|
||||
|
||||
if count_ligne != 0:
|
||||
uri.setDataSource("_agregation_ra", "observations_table", "geometrie", reqwhere_final_ligne, "gid")
|
||||
#layer_ligne = self.iface.addVectorLayer(uri.uri(), table_name + '_ligne', "postgres")
|
||||
layer_ligne = QgsVectorLayer(uri.uri(), table_name + '_ligne', "postgres")
|
||||
QgsProject.instance().addMapLayer(layer_ligne, False)
|
||||
#legende.moveLayer(layer_ligne,index)
|
||||
#groupe.addLayer(layer_ligne)
|
||||
groupe.insertChildNode(0, QgsLayerTreeLayer(layer_ligne))
|
||||
|
||||
# ajout des couches dans le groupe Observations
|
||||
#legende.setGroupExpanded (index, True)
|
||||
|
||||
#self.iface.messageBar().pushMessage(u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=QgsMessageBar.INFO, duration=10)
|
||||
self.iface.messageBar().pushMessage("Info", u"Extraction réussie : ", u" Pensez à renommer vos couches pour plus de lisibilité.", level=Qgis.Success, duration=10)
|
||||
|
||||
pass
|
||||
|
||||
def export(self):
|
||||
|
||||
layer = self.iface.activeLayer()
|
||||
|
||||
if layer == None :
|
||||
#self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5)
|
||||
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=Qgis.Warning, duration=5)
|
||||
|
||||
else :
|
||||
selection = layer.selectedFeatures()
|
||||
if (layer.selectedFeatureCount() == 1) :
|
||||
for feature in selection:
|
||||
geom = feature.geometry()
|
||||
poly = geom.asWkt()
|
||||
|
||||
buffer = '100'
|
||||
|
||||
first_conn = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=first_cnx password=" + password)
|
||||
first_cur = first_conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_cur.execute("SELECT mdp_w, login_w FROM pg_catalog.pg_user t1, admin_sig.vm_users_sig t2 WHERE t2.oid = t1.usesysid AND (login_w = '" + os_user + "' OR login_w = '" + os_user + "')")
|
||||
res_ident = first_cur.fetchone()
|
||||
mdp = base64.b64decode(str(res_ident[0])).decode('utf-8')
|
||||
user = res_ident[1]
|
||||
|
||||
con = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=" + user + " password=" + mdp)
|
||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
||||
first_conn.close()
|
||||
|
||||
SQL_list_sp = u"""SELECT DISTINCT classe::text,ordre::text,nom_complet::text,split_part(nom_vern::text,',',1) as nom_vern,cd_ref::text as cd_ref,max(COALESCE(date_obs, date_debut_obs))::text AS derniere_obs FROM _agregation_ra.observations_table WHERE ST_intersects(geometrie,ST_Buffer(ST_geomFromText('""" + poly + "',2154), " + buffer + " ))GROUP BY classe::text, ordre::text, nom_complet::text, nom_vern::text, cd_ref::text ORDER BY nom_complet::text"""
|
||||
cur.execute(SQL_list_sp)
|
||||
data_sp = cur.fetchall()
|
||||
chemin_fichier, __ = QFileDialog.getSaveFileName(None, 'Enregistrer sous...', r"C:\Users\\Desktop\\" + str(os.environ.get("USERNAME")) + '_liste_sp.csv', "Fichiers CSV (*.csv)")
|
||||
#file = open(chemin_fichier, 'wb')
|
||||
file = open(chemin_fichier, 'w', newline='', encoding='utf-8')
|
||||
#file.write('\ufeff'.encode('utf8')) # BOM (optionel...Permet a Excel d'ouvrir proprement le fichier en UTF-8)
|
||||
file.write('\ufeff')
|
||||
writer = csv.writer(file, delimiter = ';') # délimiteur ';' pour faciliter l'ouverture avec Excel
|
||||
writer.writerow(['Classe', 'Ordre', 'Nom Complet', 'Nom Vernaculaire','cd_ref', 'Date Derniere Observation']) # Création des entêtes
|
||||
|
||||
for row in data_sp : # Boucle d'écriture ligne par ligne dans le csv
|
||||
#print(1)
|
||||
list_sp = []
|
||||
if row[0] == None : # Si la valeur est 'None' l'encodage ne peut se faire donc boucle d'évitement
|
||||
row0 = str(row[0])
|
||||
row0 = ''
|
||||
else :
|
||||
row0 = row[0]
|
||||
#print(row0)
|
||||
list_sp.append(row0)
|
||||
if row[1] == None : # Si la valeur est 'None' l'encodage ne peut se faire donc boucle d'évitement
|
||||
row1 = str(row[1])
|
||||
row1 = ''
|
||||
else :
|
||||
row1 = row[1]
|
||||
list_sp.append(row1)
|
||||
if row[2] == None : # Si la valeur est 'None' l'encodage ne peut se faire donc boucle d'évitement
|
||||
row2 = str(row[2])
|
||||
row2 = ''
|
||||
else :
|
||||
row2 = row[2]
|
||||
list_sp.append(row2)
|
||||
if row[3] == None : # Si la valeur est 'None' l'encodage ne peut se faire donc boucle d'évitement
|
||||
row3 = str(row[3])
|
||||
row3 = ''
|
||||
else :
|
||||
row3 = row[3]
|
||||
list_sp.append(row3)
|
||||
if row[4] == None :
|
||||
row4 = str(row[4])
|
||||
row4 = ''
|
||||
else :
|
||||
row4 = row[4]
|
||||
list_sp.append(row4)
|
||||
if row[5] == None :
|
||||
row5 = str(row[5])
|
||||
row5 = ''
|
||||
else :
|
||||
row5 = row[5]
|
||||
print(row5)
|
||||
list_sp.append(row5)
|
||||
writer.writerow(list_sp)
|
||||
|
||||
file.close()
|
||||
#self.iface.messageBar().pushMessage(u"Export réussi dans " + chemin_fichier , level=QgsMessageBar.INFO, duration=5)
|
||||
self.iface.messageBar().pushMessage("Ooops", u"Export réussi dans " + chemin_fichier, level=Qgis.Success, duration=5)
|
||||
|
||||
elif (layer.selectedFeatureCount() == 0) :
|
||||
#self.iface.messageBar().pushMessage(u"Vous devez sélectionner au moins un polygone !", level=QgsMessageBar.WARNING, duration=5)
|
||||
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner au moins un polygone !", level=Qgis.Warning, duration=5)
|
||||
|
||||
else :
|
||||
#self.iface.messageBar().pushMessage(u"Vous devez sélectionner qu'un seul polygone !", level=QgsMessageBar.WARNING, duration=5)
|
||||
self.iface.messageBar().pushMessage("Ooops", u"Vous ne devez sélectionner qu'un seul polygone !", level=Qgis.Warning, duration=5)
|
||||
BIN
CenRa_SICEN/sicen_export.png
Normal file
BIN
CenRa_SICEN/sicen_export.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
37
CenRa_SICEN/sicendialog.py
Normal file
37
CenRa_SICEN/sicendialog.py
Normal file
@ -0,0 +1,37 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
/***************************************************************************
|
||||
SICENDialog
|
||||
A QGIS plugin
|
||||
Filtre sur données SICEN
|
||||
-------------------
|
||||
begin : 2014-10-17
|
||||
copyright : (C) 2014 by Guillaume COSTES
|
||||
email : guillaume.costes@espaces-naturels.fr
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
"""
|
||||
|
||||
from qgis.PyQt import QtCore, QtGui
|
||||
from qgis.PyQt.QtWidgets import QAction, QDialog
|
||||
from .ui_sicen import Ui_SICEN
|
||||
# create the dialog for zoom to point
|
||||
|
||||
|
||||
class SICENDialog(QDialog, Ui_SICEN):
|
||||
def __init__(self):
|
||||
QDialog.__init__(self)
|
||||
# Set up the user interface from Designer.
|
||||
# After setupUI you can access any designer object by doing
|
||||
# self.<objectname>, and you can use autoconnect slots - see
|
||||
# http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html
|
||||
# #widgets-and-dialogs-with-auto-connect
|
||||
self.setupUi(self)
|
||||
756
CenRa_SICEN/ui_sicen.py
Normal file
756
CenRa_SICEN/ui_sicen.py
Normal file
@ -0,0 +1,756 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui_sicen.ui'
|
||||
#
|
||||
# Created: Wed Apr 22 14:03:07 2015
|
||||
# by: PyQt4 UI code generator 4.10.2
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from builtins import object
|
||||
from qgis.PyQt import QtCore, QtGui
|
||||
from qgis.PyQt.QtGui import QFont
|
||||
from qgis.PyQt.QtWidgets import QAction, QDialog, QDialogButtonBox, QLabel, QApplication, QTabWidget, QWidget, QGroupBox, QGridLayout, QComboBox, QCheckBox, QCalendarWidget, QToolBox, QFrame, QLineEdit, QSizePolicy #Modifié
|
||||
|
||||
|
||||
try:
|
||||
_fromUtf8 = QtCore.QString.fromUtf8
|
||||
except AttributeError:
|
||||
def _fromUtf8(s):
|
||||
return s
|
||||
|
||||
try:
|
||||
_encoding = QApplication.UnicodeUTF8
|
||||
def _translate(context, text, disambig):
|
||||
return QApplication.translate(context, text, disambig, _encoding)
|
||||
except AttributeError:
|
||||
def _translate(context, text, disambig):
|
||||
return QApplication.translate(context, text, disambig)
|
||||
|
||||
class Ui_SICEN(object):
|
||||
def setupUi(self, SICEN):
|
||||
SICEN.setObjectName(_fromUtf8("SICEN"))
|
||||
SICEN.resize(592, 556)
|
||||
self.buttonBox = QDialogButtonBox(SICEN)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(390, 520, 161, 32))
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel|QDialogButtonBox.Ok)
|
||||
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
|
||||
self.Titre = QLabel(SICEN)
|
||||
self.Titre.setGeometry(QtCore.QRect(110, 10, 331, 31))
|
||||
font = QFont()
|
||||
font.setPointSize(14)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.Titre.setFont(font)
|
||||
self.Titre.setObjectName(_fromUtf8("Titre"))
|
||||
self.Emprise = QTabWidget(SICEN)
|
||||
self.Emprise.setGeometry(QtCore.QRect(10, 80, 571, 431))
|
||||
self.Emprise.setTabPosition(QTabWidget.North)
|
||||
self.Emprise.setTabShape(QTabWidget.Rounded)
|
||||
self.Emprise.setObjectName(_fromUtf8("Emprise"))
|
||||
self.tab_2 = QWidget()
|
||||
self.tab_2.setObjectName(_fromUtf8("tab_2"))
|
||||
self.groupBox_4 = QGroupBox(self.tab_2)
|
||||
self.groupBox_4.setGeometry(QtCore.QRect(10, 9, 541, 81))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox_4.setFont(font)
|
||||
self.groupBox_4.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
|
||||
self.gridLayoutWidget_5 = QWidget(self.groupBox_4)
|
||||
self.gridLayoutWidget_5.setGeometry(QtCore.QRect(10, 20, 521, 51))
|
||||
self.gridLayoutWidget_5.setObjectName(_fromUtf8("gridLayoutWidget_5"))
|
||||
self.gridLayout_5 = QGridLayout(self.gridLayoutWidget_5)
|
||||
self.gridLayout_5.setMargin(0)
|
||||
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
|
||||
self.observateur_1 = QComboBox(self.gridLayoutWidget_5)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.observateur_1.setFont(font)
|
||||
self.observateur_1.setObjectName(_fromUtf8("observateur_1"))
|
||||
self.gridLayout_5.addWidget(self.observateur_1, 0, 0, 1, 1)
|
||||
self.observateur_3 = QComboBox(self.gridLayoutWidget_5)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.observateur_3.setFont(font)
|
||||
self.observateur_3.setObjectName(_fromUtf8("observateur_3"))
|
||||
self.gridLayout_5.addWidget(self.observateur_3, 1, 0, 1, 1)
|
||||
self.observateur_2 = QComboBox(self.gridLayoutWidget_5)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.observateur_2.setFont(font)
|
||||
self.observateur_2.setObjectName(_fromUtf8("observateur_2"))
|
||||
self.gridLayout_5.addWidget(self.observateur_2, 0, 1, 1, 1)
|
||||
self.observateur_4 = QComboBox(self.gridLayoutWidget_5)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.observateur_4.setFont(font)
|
||||
self.observateur_4.setObjectName(_fromUtf8("observateur_4"))
|
||||
self.gridLayout_5.addWidget(self.observateur_4, 1, 1, 1, 1)
|
||||
self.groupBox_5 = QGroupBox(self.tab_2)
|
||||
self.groupBox_5.setGeometry(QtCore.QRect(10, 100, 541, 71))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox_5.setFont(font)
|
||||
self.groupBox_5.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_5.setObjectName(_fromUtf8("groupBox_5"))
|
||||
self.gridLayoutWidget_6 = QWidget(self.groupBox_5)
|
||||
self.gridLayoutWidget_6.setGeometry(QtCore.QRect(10, 20, 521, 41))
|
||||
self.gridLayoutWidget_6.setObjectName(_fromUtf8("gridLayoutWidget_6"))
|
||||
self.gridLayout_6 = QGridLayout(self.gridLayoutWidget_6)
|
||||
self.gridLayout_6.setMargin(0)
|
||||
self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
|
||||
self.label = QLabel(self.gridLayoutWidget_6)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setItalic(True)
|
||||
font.setWeight(50)
|
||||
self.label.setFont(font)
|
||||
self.label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.gridLayout_6.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.label_2 = QLabel(self.gridLayoutWidget_6)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setItalic(True)
|
||||
font.setWeight(50)
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.gridLayout_6.addWidget(self.label_2, 0, 1, 1, 1)
|
||||
self.nom_com_1 = QComboBox(self.gridLayoutWidget_6)
|
||||
self.nom_com_1.setMinimumSize(QtCore.QSize(200, 0))
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.nom_com_1.setFont(font)
|
||||
self.nom_com_1.setObjectName(_fromUtf8("nom_com_1"))
|
||||
self.gridLayout_6.addWidget(self.nom_com_1, 1, 0, 1, 1)
|
||||
self.nom_com_2 = QComboBox(self.gridLayoutWidget_6)
|
||||
self.nom_com_2.setMinimumSize(QtCore.QSize(200, 0))
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.nom_com_2.setFont(font)
|
||||
self.nom_com_2.setObjectName(_fromUtf8("nom_com_2"))
|
||||
self.gridLayout_6.addWidget(self.nom_com_2, 1, 1, 1, 1)
|
||||
self.groupBox_7 = QGroupBox(self.tab_2)
|
||||
self.groupBox_7.setGeometry(QtCore.QRect(10, 180, 541, 221))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox_7.setFont(font)
|
||||
self.groupBox_7.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_7.setObjectName(_fromUtf8("groupBox_7"))
|
||||
self.gridLayoutWidget_8 = QWidget(self.groupBox_7)
|
||||
self.gridLayoutWidget_8.setGeometry(QtCore.QRect(10, 20, 520, 191))
|
||||
self.gridLayoutWidget_8.setObjectName(_fromUtf8("gridLayoutWidget_8"))
|
||||
self.gridLayout_8 = QGridLayout(self.gridLayoutWidget_8)
|
||||
self.gridLayout_8.setMargin(0)
|
||||
self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
|
||||
self.label_3 = QLabel(self.gridLayoutWidget_8)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setItalic(True)
|
||||
font.setWeight(50)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.gridLayout_8.addWidget(self.label_3, 0, 0, 1, 1)
|
||||
self.label_4 = QLabel(self.gridLayoutWidget_8)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setItalic(True)
|
||||
font.setWeight(50)
|
||||
self.label_4.setFont(font)
|
||||
self.label_4.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.gridLayout_8.addWidget(self.label_4, 0, 1, 1, 1)
|
||||
self.date_min = QCalendarWidget(self.gridLayoutWidget_8)
|
||||
self.date_min.setObjectName(_fromUtf8("date_min"))
|
||||
self.gridLayout_8.addWidget(self.date_min, 1, 0, 1, 1)
|
||||
self.date_max = QCalendarWidget(self.gridLayoutWidget_8)
|
||||
self.date_max.setObjectName(_fromUtf8("date_max"))
|
||||
self.gridLayout_8.addWidget(self.date_max, 1, 1, 1, 1)
|
||||
self.Emprise.addTab(self.tab_2, _fromUtf8(""))
|
||||
self.tab = QWidget()
|
||||
self.tab.setObjectName(_fromUtf8("tab"))
|
||||
self.groupBox_8 = QGroupBox(self.tab)
|
||||
self.groupBox_8.setGeometry(QtCore.QRect(10, 10, 511, 51))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox_8.setFont(font)
|
||||
self.groupBox_8.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_8.setObjectName(_fromUtf8("groupBox_8"))
|
||||
self.gridLayoutWidget_9 = QWidget(self.groupBox_8)
|
||||
self.gridLayoutWidget_9.setGeometry(QtCore.QRect(10, 20, 491, 21))
|
||||
self.gridLayoutWidget_9.setObjectName(_fromUtf8("gridLayoutWidget_9"))
|
||||
self.gridLayout_9 = QGridLayout(self.gridLayoutWidget_9)
|
||||
self.gridLayout_9.setMargin(0)
|
||||
self.gridLayout_9.setHorizontalSpacing(100)
|
||||
self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
|
||||
self.Animalia = QCheckBox(self.gridLayoutWidget_9)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.Animalia.setFont(font)
|
||||
self.Animalia.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.Animalia.setObjectName(_fromUtf8("Animalia"))
|
||||
self.gridLayout_9.addWidget(self.Animalia, 0, 0, 1, 1)
|
||||
self.Plantae = QCheckBox(self.gridLayoutWidget_9)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.Plantae.setFont(font)
|
||||
self.Plantae.setObjectName(_fromUtf8("Plantae"))
|
||||
self.gridLayout_9.addWidget(self.Plantae, 0, 1, 1, 1)
|
||||
self.gridLayoutWidget_10 = QWidget(self.tab)
|
||||
self.gridLayoutWidget_10.setGeometry(QtCore.QRect(9, 90, 511, 152))
|
||||
self.gridLayoutWidget_10.setObjectName(_fromUtf8("gridLayoutWidget_10"))
|
||||
self.gridLayout_11 = QGridLayout(self.gridLayoutWidget_10)
|
||||
self.gridLayout_11.setMargin(0)
|
||||
self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11"))
|
||||
self.label_6 = QLabel(self.gridLayoutWidget_10)
|
||||
self.label_6.setMinimumSize(QtCore.QSize(500, 20))
|
||||
self.label_6.setMaximumSize(QtCore.QSize(100, 16777215))
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setItalic(True)
|
||||
font.setWeight(50)
|
||||
self.label_6.setFont(font)
|
||||
self.label_6.setLayoutDirection(QtCore.Qt.LeftToRight)
|
||||
self.label_6.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_6.setObjectName(_fromUtf8("label_6"))
|
||||
self.gridLayout_11.addWidget(self.label_6, 4, 0, 1, 1)
|
||||
self.nom_vern = QComboBox(self.gridLayoutWidget_10)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.nom_vern.setFont(font)
|
||||
self.nom_vern.setObjectName(_fromUtf8("nom_vern"))
|
||||
self.gridLayout_11.addWidget(self.nom_vern, 3, 0, 1, 1)
|
||||
self.label_5 = QLabel(self.gridLayoutWidget_10)
|
||||
self.label_5.setMinimumSize(QtCore.QSize(500, 20))
|
||||
self.label_5.setMaximumSize(QtCore.QSize(100, 16777215))
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setItalic(True)
|
||||
font.setWeight(50)
|
||||
self.label_5.setFont(font)
|
||||
self.label_5.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
||||
self.gridLayout_11.addWidget(self.label_5, 2, 0, 1, 1)
|
||||
self.nom_complet = QComboBox(self.gridLayoutWidget_10)
|
||||
self.nom_complet.setMinimumSize(QtCore.QSize(500, 0))
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.nom_complet.setFont(font)
|
||||
self.nom_complet.setObjectName(_fromUtf8("nom_complet"))
|
||||
self.gridLayout_11.addWidget(self.nom_complet, 5, 0, 1, 1)
|
||||
self.ordre = QComboBox(self.gridLayoutWidget_10)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.ordre.setFont(font)
|
||||
self.ordre.setObjectName(_fromUtf8("ordre"))
|
||||
self.gridLayout_11.addWidget(self.ordre, 1, 0, 1, 1)
|
||||
self.label_13 = QLabel(self.gridLayoutWidget_10)
|
||||
self.label_13.setMinimumSize(QtCore.QSize(500, 20))
|
||||
self.label_13.setMaximumSize(QtCore.QSize(100, 16777215))
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setItalic(True)
|
||||
font.setWeight(50)
|
||||
self.label_13.setFont(font)
|
||||
self.label_13.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_13.setObjectName(_fromUtf8("label_13"))
|
||||
self.gridLayout_11.addWidget(self.label_13, 0, 0, 1, 1)
|
||||
self.Emprise.addTab(self.tab, _fromUtf8(""))
|
||||
self.tab_3 = QWidget()
|
||||
self.tab_3.setObjectName(_fromUtf8("tab_3"))
|
||||
self.protections = QToolBox(self.tab_3)
|
||||
self.protections.setGeometry(QtCore.QRect(10, 10, 511, 391))
|
||||
self.protections.setFrameShape(QFrame.NoFrame)
|
||||
self.protections.setFrameShadow(QFrame.Plain)
|
||||
self.protections.setLineWidth(1)
|
||||
self.protections.setObjectName(_fromUtf8("protections"))
|
||||
self.page_2 = QWidget()
|
||||
self.page_2.setGeometry(QtCore.QRect(0, 0, 511, 310))
|
||||
self.page_2.setObjectName(_fromUtf8("page_2"))
|
||||
self.groupBox = QGroupBox(self.page_2)
|
||||
self.groupBox.setGeometry(QtCore.QRect(0, 0, 511, 121))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox.setFont(font)
|
||||
self.groupBox.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox.setObjectName(_fromUtf8("groupBox"))
|
||||
self.gridLayoutWidget_2 = QWidget(self.groupBox)
|
||||
self.gridLayoutWidget_2.setGeometry(QtCore.QRect(10, 20, 491, 88))
|
||||
self.gridLayoutWidget_2.setObjectName(_fromUtf8("gridLayoutWidget_2"))
|
||||
self.gridLayout_2 = QGridLayout(self.gridLayoutWidget_2)
|
||||
self.gridLayout_2.setMargin(0)
|
||||
self.gridLayout_2.setHorizontalSpacing(50)
|
||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
||||
self.LRD_38 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_38.setFont(font)
|
||||
self.LRD_38.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRD_38.setObjectName(_fromUtf8("LRD_38"))
|
||||
self.gridLayout_2.addWidget(self.LRD_38, 3, 0, 1, 1)
|
||||
self.LRD_01 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_01.setFont(font)
|
||||
self.LRD_01.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRD_01.setObjectName(_fromUtf8("LRD_01"))
|
||||
self.gridLayout_2.addWidget(self.LRD_01, 0, 0, 1, 1)
|
||||
self.LRD_07 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_07.setFont(font)
|
||||
self.LRD_07.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRD_07.setObjectName(_fromUtf8("LRD_07"))
|
||||
self.gridLayout_2.addWidget(self.LRD_07, 1, 0, 1, 1)
|
||||
self.LRD_26 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_26.setFont(font)
|
||||
self.LRD_26.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRD_26.setObjectName(_fromUtf8("LRD_26"))
|
||||
self.gridLayout_2.addWidget(self.LRD_26, 2, 0, 1, 1)
|
||||
self.LRD_42 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_42.setFont(font)
|
||||
self.LRD_42.setObjectName(_fromUtf8("LRD_42"))
|
||||
self.gridLayout_2.addWidget(self.LRD_42, 0, 1, 1, 1)
|
||||
self.LRD_69 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_69.setFont(font)
|
||||
self.LRD_69.setObjectName(_fromUtf8("LRD_69"))
|
||||
self.gridLayout_2.addWidget(self.LRD_69, 1, 1, 1, 1)
|
||||
self.LRD_73 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_73.setFont(font)
|
||||
self.LRD_73.setObjectName(_fromUtf8("LRD_73"))
|
||||
self.gridLayout_2.addWidget(self.LRD_73, 2, 1, 1, 1)
|
||||
self.LRD_74 = QCheckBox(self.gridLayoutWidget_2)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRD_74.setFont(font)
|
||||
self.LRD_74.setObjectName(_fromUtf8("LRD_74"))
|
||||
self.gridLayout_2.addWidget(self.LRD_74, 3, 1, 1, 1)
|
||||
self.groupBox_2 = QGroupBox(self.page_2)
|
||||
self.groupBox_2.setGeometry(QtCore.QRect(0, 130, 511, 71))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox_2.setFont(font)
|
||||
self.groupBox_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_2.setObjectName(_fromUtf8("groupBox_2"))
|
||||
self.gridLayoutWidget_3 = QWidget(self.groupBox_2)
|
||||
self.gridLayoutWidget_3.setGeometry(QtCore.QRect(10, 20, 491, 42))
|
||||
self.gridLayoutWidget_3.setObjectName(_fromUtf8("gridLayoutWidget_3"))
|
||||
self.gridLayout_3 = QGridLayout(self.gridLayoutWidget_3)
|
||||
self.gridLayout_3.setMargin(0)
|
||||
self.gridLayout_3.setHorizontalSpacing(50)
|
||||
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
|
||||
self.LRR_Flore = QCheckBox(self.gridLayoutWidget_3)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRR_Flore.setFont(font)
|
||||
self.LRR_Flore.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRR_Flore.setObjectName(_fromUtf8("LRR_Flore"))
|
||||
self.gridLayout_3.addWidget(self.LRR_Flore, 0, 0, 1, 1)
|
||||
self.LRR_Oiseaux = QCheckBox(self.gridLayoutWidget_3)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRR_Oiseaux.setFont(font)
|
||||
self.LRR_Oiseaux.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRR_Oiseaux.setObjectName(_fromUtf8("LRR_Oiseaux"))
|
||||
self.gridLayout_3.addWidget(self.LRR_Oiseaux, 1, 0, 1, 1)
|
||||
self.LRR_Autre = QCheckBox(self.gridLayoutWidget_3)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRR_Autre.setFont(font)
|
||||
self.LRR_Autre.setObjectName(_fromUtf8("LRR_Autre"))
|
||||
self.gridLayout_3.addWidget(self.LRR_Autre, 0, 1, 1, 1)
|
||||
self.groupBox_3 = QGroupBox(self.page_2)
|
||||
self.groupBox_3.setGeometry(QtCore.QRect(0, 210, 511, 71))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox_3.setFont(font)
|
||||
self.groupBox_3.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
|
||||
self.gridLayoutWidget_4 = QWidget(self.groupBox_3)
|
||||
self.gridLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 491, 42))
|
||||
self.gridLayoutWidget_4.setObjectName(_fromUtf8("gridLayoutWidget_4"))
|
||||
self.gridLayout_4 = QGridLayout(self.gridLayoutWidget_4)
|
||||
self.gridLayout_4.setContentsMargins(-1, 0, -1, -1)
|
||||
self.gridLayout_4.setHorizontalSpacing(50)
|
||||
self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
|
||||
self.LRN_Autre = QCheckBox(self.gridLayoutWidget_4)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRN_Autre.setFont(font)
|
||||
self.LRN_Autre.setObjectName(_fromUtf8("LRN_Autre"))
|
||||
self.gridLayout_4.addWidget(self.LRN_Autre, 1, 1, 1, 1)
|
||||
self.LRN_Flore = QCheckBox(self.gridLayoutWidget_4)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRN_Flore.setFont(font)
|
||||
self.LRN_Flore.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRN_Flore.setObjectName(_fromUtf8("LRN_Flore"))
|
||||
self.gridLayout_4.addWidget(self.LRN_Flore, 0, 0, 1, 1)
|
||||
self.LRN_Oiseaux = QCheckBox(self.gridLayoutWidget_4)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRN_Oiseaux.setFont(font)
|
||||
self.LRN_Oiseaux.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.LRN_Oiseaux.setObjectName(_fromUtf8("LRN_Oiseaux"))
|
||||
self.gridLayout_4.addWidget(self.LRN_Oiseaux, 1, 0, 1, 1)
|
||||
self.LRN_Ortho = QCheckBox(self.gridLayoutWidget_4)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.LRN_Ortho.setFont(font)
|
||||
self.LRN_Ortho.setObjectName(_fromUtf8("LRN_Ortho"))
|
||||
self.gridLayout_4.addWidget(self.LRN_Ortho, 0, 1, 1, 1)
|
||||
self.gridLayoutWidget_11 = QWidget(self.page_2)
|
||||
self.gridLayoutWidget_11.setGeometry(QtCore.QRect(6, 290, 501, 19))
|
||||
self.gridLayoutWidget_11.setObjectName(_fromUtf8("gridLayoutWidget_11"))
|
||||
self.gridLayout_12 = QGridLayout(self.gridLayoutWidget_11)
|
||||
self.gridLayout_12.setMargin(0)
|
||||
self.gridLayout_12.setHorizontalSpacing(50)
|
||||
self.gridLayout_12.setObjectName(_fromUtf8("gridLayout_12"))
|
||||
self.UICN = QCheckBox(self.gridLayoutWidget_11)
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.UICN.setFont(font)
|
||||
self.UICN.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.UICN.setObjectName(_fromUtf8("UICN"))
|
||||
self.gridLayout_12.addWidget(self.UICN, 0, 0, 1, 1)
|
||||
self.LRE = QCheckBox(self.gridLayoutWidget_11)
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.LRE.setFont(font)
|
||||
self.LRE.setObjectName(_fromUtf8("LRE"))
|
||||
self.gridLayout_12.addWidget(self.LRE, 0, 1, 1, 1)
|
||||
self.protections.addItem(self.page_2, _fromUtf8(""))
|
||||
self.page = QWidget()
|
||||
self.page.setGeometry(QtCore.QRect(0, 0, 100, 30))
|
||||
self.page.setObjectName(_fromUtf8("page"))
|
||||
self.PATRIMONIALITE = QCheckBox(self.page)
|
||||
self.PATRIMONIALITE.setGeometry(QtCore.QRect(140, 10, 251, 17))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.PATRIMONIALITE.setFont(font)
|
||||
self.PATRIMONIALITE.setObjectName(_fromUtf8("PATRIMONIALITE"))
|
||||
self.gridLayoutWidget = QWidget(self.page)
|
||||
self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 40, 501, 88))
|
||||
self.gridLayoutWidget.setObjectName(_fromUtf8("gridLayoutWidget"))
|
||||
self.gridLayout = QGridLayout(self.gridLayoutWidget)
|
||||
self.gridLayout.setMargin(0)
|
||||
self.gridLayout.setHorizontalSpacing(50)
|
||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
||||
self.PATRI38 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI38.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.PATRI38.setObjectName(_fromUtf8("PATRI38"))
|
||||
self.gridLayout.addWidget(self.PATRI38, 3, 0, 1, 1)
|
||||
self.PATRI01 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI01.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.PATRI01.setObjectName(_fromUtf8("PATRI01"))
|
||||
self.gridLayout.addWidget(self.PATRI01, 0, 0, 1, 1)
|
||||
self.PATRI07 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI07.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.PATRI07.setObjectName(_fromUtf8("PATRI07"))
|
||||
self.gridLayout.addWidget(self.PATRI07, 1, 0, 1, 1)
|
||||
self.PATRI26 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI26.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.PATRI26.setObjectName(_fromUtf8("PATRI26"))
|
||||
self.gridLayout.addWidget(self.PATRI26, 2, 0, 1, 1)
|
||||
self.PATRI42 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI42.setObjectName(_fromUtf8("PATRI42"))
|
||||
self.gridLayout.addWidget(self.PATRI42, 0, 1, 1, 1)
|
||||
self.PATRI69 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI69.setObjectName(_fromUtf8("PATRI69"))
|
||||
self.gridLayout.addWidget(self.PATRI69, 1, 1, 1, 1)
|
||||
self.PATRI73 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI73.setObjectName(_fromUtf8("PATRI73"))
|
||||
self.gridLayout.addWidget(self.PATRI73, 2, 1, 1, 1)
|
||||
self.PATRI74 = QCheckBox(self.gridLayoutWidget)
|
||||
self.PATRI74.setObjectName(_fromUtf8("PATRI74"))
|
||||
self.gridLayout.addWidget(self.PATRI74, 3, 1, 1, 1)
|
||||
self.ZNIEFF = QCheckBox(self.page)
|
||||
self.ZNIEFF.setGeometry(QtCore.QRect(140, 140, 221, 17))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.ZNIEFF.setFont(font)
|
||||
self.ZNIEFF.setObjectName(_fromUtf8("ZNIEFF"))
|
||||
self.protections.addItem(self.page, _fromUtf8(""))
|
||||
self.page_3 = QWidget()
|
||||
self.page_3.setGeometry(QtCore.QRect(0, 0, 100, 30))
|
||||
self.page_3.setObjectName(_fromUtf8("page_3"))
|
||||
self.groupBox_6 = QGroupBox(self.page_3)
|
||||
self.groupBox_6.setGeometry(QtCore.QRect(0, 10, 511, 51))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.groupBox_6.setFont(font)
|
||||
self.groupBox_6.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
|
||||
self.groupBox_6.setObjectName(_fromUtf8("groupBox_6"))
|
||||
self.gridLayoutWidget_7 = QWidget(self.groupBox_6)
|
||||
self.gridLayoutWidget_7.setGeometry(QtCore.QRect(10, 20, 491, 21))
|
||||
self.gridLayoutWidget_7.setObjectName(_fromUtf8("gridLayoutWidget_7"))
|
||||
self.gridLayout_7 = QGridLayout(self.gridLayoutWidget_7)
|
||||
self.gridLayout_7.setMargin(0)
|
||||
self.gridLayout_7.setHorizontalSpacing(50)
|
||||
self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
|
||||
self.PD_42 = QCheckBox(self.gridLayoutWidget_7)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.PD_42.setFont(font)
|
||||
self.PD_42.setObjectName(_fromUtf8("PD_42"))
|
||||
self.gridLayout_7.addWidget(self.PD_42, 0, 1, 1, 1)
|
||||
self.PD_38 = QCheckBox(self.gridLayoutWidget_7)
|
||||
font = QFont()
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.PD_38.setFont(font)
|
||||
self.PD_38.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
self.PD_38.setObjectName(_fromUtf8("PD_38"))
|
||||
self.gridLayout_7.addWidget(self.PD_38, 0, 0, 1, 1)
|
||||
self.PR = QCheckBox(self.page_3)
|
||||
self.PR.setGeometry(QtCore.QRect(10, 70, 171, 17))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.PR.setFont(font)
|
||||
self.PR.setObjectName(_fromUtf8("PR"))
|
||||
self.PN = QCheckBox(self.page_3)
|
||||
self.PN.setGeometry(QtCore.QRect(10, 100, 171, 17))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.PN.setFont(font)
|
||||
self.PN.setObjectName(_fromUtf8("PN"))
|
||||
self.DH_AnnII = QCheckBox(self.page_3)
|
||||
self.DH_AnnII.setGeometry(QtCore.QRect(10, 130, 201, 17))
|
||||
font = QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.DH_AnnII.setFont(font)
|
||||
self.DH_AnnII.setObjectName(_fromUtf8("DH_AnnII"))
|
||||
self.protections.addItem(self.page_3, _fromUtf8(""))
|
||||
self.Emprise.addTab(self.tab_3, _fromUtf8(""))
|
||||
self.tab_4 = QWidget()
|
||||
self.tab_4.setObjectName(_fromUtf8("tab_4"))
|
||||
self.gridLayoutWidget_12 = QWidget(self.tab_4)
|
||||
self.gridLayoutWidget_12.setGeometry(QtCore.QRect(30, 30, 481, 130))
|
||||
self.gridLayoutWidget_12.setObjectName(_fromUtf8("gridLayoutWidget_12"))
|
||||
self.gridLayout_10 = QGridLayout(self.gridLayoutWidget_12)
|
||||
self.gridLayout_10.setMargin(0)
|
||||
self.gridLayout_10.setVerticalSpacing(20)
|
||||
self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10"))
|
||||
self.label_7 = QLabel(self.gridLayoutWidget_12)
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
self.label_7.setFont(font)
|
||||
self.label_7.setObjectName(_fromUtf8("label_7"))
|
||||
self.gridLayout_10.addWidget(self.label_7, 0, 1, 1, 1)
|
||||
self.label_14 = QLabel(self.gridLayoutWidget_12)
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
self.label_14.setFont(font)
|
||||
self.label_14.setObjectName(_fromUtf8("label_14"))
|
||||
self.gridLayout_10.addWidget(self.label_14, 2, 1, 1, 1)
|
||||
self.label_12 = QLabel(self.gridLayoutWidget_12)
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
self.label_12.setFont(font)
|
||||
self.label_12.setObjectName(_fromUtf8("label_12"))
|
||||
self.gridLayout_10.addWidget(self.label_12, 1, 1, 1, 1)
|
||||
self.buffer = QLineEdit(self.gridLayoutWidget_12)
|
||||
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.buffer.sizePolicy().hasHeightForWidth())
|
||||
self.buffer.setSizePolicy(sizePolicy)
|
||||
self.buffer.setMaximumSize(QtCore.QSize(100, 16777215))
|
||||
self.buffer.setInputMethodHints(QtCore.Qt.ImhPreferNumbers)
|
||||
self.buffer.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.buffer.setObjectName(_fromUtf8("buffer"))
|
||||
self.gridLayout_10.addWidget(self.buffer, 2, 2, 1, 1)
|
||||
self.label_8 = QLabel(self.gridLayoutWidget_12)
|
||||
self.label_8.setMaximumSize(QtCore.QSize(20, 16777215))
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.label_8.setFont(font)
|
||||
self.label_8.setObjectName(_fromUtf8("label_8"))
|
||||
self.gridLayout_10.addWidget(self.label_8, 0, 0, 1, 1)
|
||||
self.label_9 = QLabel(self.gridLayoutWidget_12)
|
||||
self.label_9.setMaximumSize(QtCore.QSize(20, 16777215))
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.label_9.setFont(font)
|
||||
self.label_9.setObjectName(_fromUtf8("label_9"))
|
||||
self.gridLayout_10.addWidget(self.label_9, 1, 0, 1, 1)
|
||||
self.label_10 = QLabel(self.gridLayoutWidget_12)
|
||||
self.label_10.setMaximumSize(QtCore.QSize(20, 16777215))
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.label_10.setFont(font)
|
||||
self.label_10.setObjectName(_fromUtf8("label_10"))
|
||||
self.gridLayout_10.addWidget(self.label_10, 2, 0, 1, 1)
|
||||
self.label_15 = QLabel(self.tab_4)
|
||||
self.label_15.setGeometry(QtCore.QRect(70, 180, 111, 16))
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
self.label_15.setFont(font)
|
||||
self.label_15.setObjectName(_fromUtf8("label_15"))
|
||||
self.label_11 = QLabel(self.tab_4)
|
||||
self.label_11.setGeometry(QtCore.QRect(40, 180, 12, 16))
|
||||
self.label_11.setMaximumSize(QtCore.QSize(20, 16777215))
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.label_11.setFont(font)
|
||||
self.label_11.setObjectName(_fromUtf8("label_11"))
|
||||
self.bouton_geom = QCheckBox(self.tab_4)
|
||||
self.bouton_geom.setGeometry(QtCore.QRect(190, 180, 21, 16))
|
||||
self.bouton_geom.setMaximumSize(QtCore.QSize(150, 16777215))
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
font.setWeight(50)
|
||||
self.bouton_geom.setFont(font)
|
||||
self.bouton_geom.setLayoutDirection(QtCore.Qt.LeftToRight)
|
||||
self.bouton_geom.setText(_fromUtf8(""))
|
||||
self.bouton_geom.setIconSize(QtCore.QSize(20, 20))
|
||||
self.bouton_geom.setObjectName(_fromUtf8("bouton_geom"))
|
||||
self.Emprise.addTab(self.tab_4, _fromUtf8(""))
|
||||
self.centroide = QCheckBox(SICEN)
|
||||
self.centroide.setGeometry(QtCore.QRect(80, 50, 411, 20))
|
||||
font = QFont()
|
||||
font.setPointSize(10)
|
||||
font.setItalic(True)
|
||||
self.centroide.setFont(font)
|
||||
self.centroide.setObjectName(_fromUtf8("centroide"))
|
||||
|
||||
self.retranslateUi(SICEN)
|
||||
self.Emprise.setCurrentIndex(0)
|
||||
self.protections.setCurrentIndex(0)
|
||||
self.buttonBox.accepted.connect(SICEN.accept)
|
||||
self.buttonBox.rejected.connect(SICEN.reject) #Modifié
|
||||
QtCore.QMetaObject.connectSlotsByName(SICEN)
|
||||
|
||||
def retranslateUi(self, SICEN):
|
||||
SICEN.setWindowTitle(_translate("SICEN", "SICEN", None))
|
||||
self.Titre.setText(_translate("SICEN", "Ouverture des observations SICEN", None))
|
||||
self.groupBox_4.setTitle(_translate("SICEN", "Observateur(s)", None))
|
||||
self.groupBox_5.setTitle(_translate("SICEN", "Localisation", None))
|
||||
self.label.setText(_translate("SICEN", "Commune n°1", None))
|
||||
self.label_2.setText(_translate("SICEN", "Commune n°2", None))
|
||||
self.groupBox_7.setTitle(_translate("SICEN", "Date", None))
|
||||
self.label_3.setText(_translate("SICEN", "Supérieur à :", None))
|
||||
self.label_4.setText(_translate("SICEN", "Inférieur à :", None))
|
||||
self.Emprise.setTabText(self.Emprise.indexOf(self.tab_2), _translate("SICEN", "Généralités", None))
|
||||
self.groupBox_8.setTitle(_translate("SICEN", "Règne", None))
|
||||
self.Animalia.setText(_translate("SICEN", "Animal", None))
|
||||
self.Plantae.setText(_translate("SICEN", "Végétal", None))
|
||||
self.label_6.setText(_translate("SICEN", "Nom Complet : ", None))
|
||||
self.label_5.setText(_translate("SICEN", "Nom Vernaculaire : ", None))
|
||||
self.label_13.setText(_translate("SICEN", "Ordre :", None))
|
||||
self.Emprise.setTabText(self.Emprise.indexOf(self.tab), _translate("SICEN", "Filtre par Taxons", None))
|
||||
self.groupBox.setTitle(_translate("SICEN", "Départementales", None))
|
||||
self.LRD_38.setText(_translate("SICEN", "Isère - 38", None))
|
||||
self.LRD_01.setText(_translate("SICEN", "Ain - 01", None))
|
||||
self.LRD_07.setText(_translate("SICEN", "Ardèche - 07", None))
|
||||
self.LRD_26.setText(_translate("SICEN", "Drôme - 26", None))
|
||||
self.LRD_42.setText(_translate("SICEN", "42 - Loire", None))
|
||||
self.LRD_69.setText(_translate("SICEN", "69 - Rhône", None))
|
||||
self.LRD_73.setText(_translate("SICEN", "73 - Savoie", None))
|
||||
self.LRD_74.setText(_translate("SICEN", "74 - Haute-Savoie", None))
|
||||
self.groupBox_2.setTitle(_translate("SICEN", "Régionales", None))
|
||||
self.LRR_Flore.setText(_translate("SICEN", "Flore", None))
|
||||
self.LRR_Oiseaux.setText(_translate("SICEN", "Oiseaux", None))
|
||||
self.LRR_Autre.setText(_translate("SICEN", "Autre", None))
|
||||
self.groupBox_3.setTitle(_translate("SICEN", "Nationales", None))
|
||||
self.LRN_Autre.setText(_translate("SICEN", "Autre", None))
|
||||
self.LRN_Flore.setText(_translate("SICEN", "Flore", None))
|
||||
self.LRN_Oiseaux.setText(_translate("SICEN", "Oiseaux", None))
|
||||
self.LRN_Ortho.setText(_translate("SICEN", "Orthoptères", None))
|
||||
self.UICN.setText(_translate("SICEN", "UICN", None))
|
||||
self.LRE.setText(_translate("SICEN", "Liste Rouge Européenne", None))
|
||||
self.protections.setItemText(self.protections.indexOf(self.page_2), _translate("SICEN", "Listes Rouges", None))
|
||||
self.PATRIMONIALITE.setText(_translate("SICEN", "Espèces Patrimoniales en Rhône-Alpes", None))
|
||||
self.PATRI38.setText(_translate("SICEN", "Isère - 38", None))
|
||||
self.PATRI01.setText(_translate("SICEN", "Ain - 01", None))
|
||||
self.PATRI07.setText(_translate("SICEN", "Ardèche - 07", None))
|
||||
self.PATRI26.setText(_translate("SICEN", "Drôme - 26", None))
|
||||
self.PATRI42.setText(_translate("SICEN", "42 - Loire", None))
|
||||
self.PATRI69.setText(_translate("SICEN", "69 - Rhône", None))
|
||||
self.PATRI73.setText(_translate("SICEN", "73 - Savoie", None))
|
||||
self.PATRI74.setText(_translate("SICEN", "74 - Haute-Savoie", None))
|
||||
self.ZNIEFF.setText(_translate("SICEN", "Espèces Déterminantes ZNIEFF", None))
|
||||
self.protections.setItemText(self.protections.indexOf(self.page), _translate("SICEN", "Patrimonialités", None))
|
||||
self.groupBox_6.setTitle(_translate("SICEN", "Départementales", None))
|
||||
self.PD_42.setText(_translate("SICEN", "42 - Loire", None))
|
||||
self.PD_38.setText(_translate("SICEN", "Isère - 38", None))
|
||||
self.PR.setText(_translate("SICEN", "Régionale", None))
|
||||
self.PN.setText(_translate("SICEN", "Nationale", None))
|
||||
self.DH_AnnII.setText(_translate("SICEN", "Directive Habitat - Annexe II", None))
|
||||
self.protections.setItemText(self.protections.indexOf(self.page_3), _translate("SICEN", "Protections", None))
|
||||
self.Emprise.setTabText(self.Emprise.indexOf(self.tab_3), _translate("SICEN", "Filtre par Patrimonialités / Protections", None))
|
||||
self.label_7.setText(_translate("SICEN", "Sélectionnez une table", None))
|
||||
self.label_14.setText(_translate("SICEN", "Déterminez un tampon autour du polygone (en mètre)", None))
|
||||
self.label_12.setText(_translate("SICEN", "Sélectionnez un polygone dans cette table", None))
|
||||
self.buffer.setText(_translate("SICEN", "100", None))
|
||||
self.label_8.setText(_translate("SICEN", "1.", None))
|
||||
self.label_9.setText(_translate("SICEN", "2.", None))
|
||||
self.label_10.setText(_translate("SICEN", "3.", None))
|
||||
self.label_15.setText(_translate("SICEN", "Cochez cette case", None))
|
||||
self.label_11.setText(_translate("SICEN", "4.", None))
|
||||
self.Emprise.setTabText(self.Emprise.indexOf(self.tab_4), _translate("SICEN", "Filtre par Emprise", None))
|
||||
self.centroide.setText(_translate("SICEN", "Utiliser les centroïdes pour les observations autres que ponctuelles", None))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user