Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f34842bfac | ||
|
|
897ed3ae58 | ||
|
|
2236123050 | ||
|
|
9ad5baa4ed | ||
|
|
36de24532a | ||
|
|
6c1af3c61c | ||
|
|
d7267c0542 | ||
|
|
fd5d516f14 | ||
|
|
ca1d895eb1 | ||
|
|
e503423e49 | ||
|
|
3564209574 | ||
|
|
7df08ae02a | ||
|
|
133e785568 | ||
|
|
9b7ab9ab15 | ||
|
|
c02da75f0b | ||
|
|
d4b181ff61 | ||
|
|
7a3814a429 | ||
|
|
1cd816c706 | ||
|
|
94cac31fbb | ||
|
|
2690220a02 | ||
|
|
3719456f04 | ||
|
|
bea31c870b | ||
|
|
2d04e34ed2 | ||
|
|
ac070f866e | ||
|
|
4851339008 | ||
|
|
f2d11a64e4 | ||
|
|
4c52c85efb | ||
|
|
3ef37aa696 | ||
|
|
3b0758ea5c | ||
|
|
852301a537 | ||
|
|
b3451773be | ||
|
|
72a4a8a7b7 | ||
|
|
c809c12c9f | ||
|
|
bc538524fb | ||
|
|
23f21a4c39 | ||
|
|
2b00cf9106 | ||
|
|
ad49b80b5a | ||
|
|
dbe918cfcf | ||
|
|
f692414698 | ||
|
|
75ec1c0191 | ||
|
|
ca79b96958 | ||
|
|
ce85b09e11 | ||
|
|
8e84d39165 | ||
|
|
72e91a527a | ||
|
|
b3eeb2d60c | ||
|
|
ea6fb7c870 | ||
|
|
1aee5d90d7 | ||
|
|
901d1b9441 | ||
|
|
cd4d320614 | ||
|
|
c7ff62c717 | ||
|
|
49b78e58ac | ||
|
|
1a17bb7d7c | ||
|
|
e2e062ed12 | ||
|
|
a90a45a0b9 | ||
|
|
80a563357d | ||
|
|
be3a082f93 | ||
|
|
cbe6952c9a | ||
|
|
bbb41400e5 | ||
|
|
d92744fe6b | ||
|
|
a7d7ea83f4 | ||
|
|
622a54e7b9 | ||
|
|
55b0826248 | ||
|
|
3141ccb15c | ||
|
|
3301c1395d | ||
|
|
7c46818923 | ||
|
|
b05a047a87 | ||
|
|
65b24ff13d | ||
|
|
ec175643bc | ||
|
|
08dda9ebb0 | ||
|
|
1fbfb009cf | ||
|
|
1c6eaa82be | ||
|
|
50902b8664 | ||
|
|
3490c51112 | ||
|
|
f79642c826 | ||
|
|
f59fac229e | ||
|
|
a3cf4248cf | ||
|
|
94d4ff85ab | ||
|
|
947a6ddd18 | ||
|
|
cf4cfc4636 | ||
|
|
ea796cf346 | ||
|
|
a37e46cfc9 | ||
|
|
9129ad279b | ||
|
|
a02ab6376e | ||
|
|
69da8e8e82 | ||
|
|
161505e4a1 | ||
|
|
873a2a0ec7 | ||
|
|
df07e9ffdb | ||
|
|
36f1145d81 | ||
|
|
9519dee924 | ||
|
|
0e2e8a555d | ||
|
|
bff19fd919 | ||
|
|
ff71cdf577 | ||
|
|
a7c2f6c169 | ||
|
|
2377238e8c | ||
|
|
bd82fb6745 | ||
|
|
a08679f0fa | ||
|
|
66e0ddc496 | ||
|
|
99f059b649 | ||
|
|
87a1b82ee9 | ||
|
|
7c38bc1326 | ||
|
|
36e55f268c | ||
|
|
7dd203f520 | ||
|
|
7fceab83bb | ||
|
|
ef182560a6 | ||
|
|
1b7803a33f | ||
|
|
32a4f593a8 | ||
|
|
97c7702312 | ||
|
|
972e815f1e | ||
|
|
17d56dd4dc | ||
|
|
d25ce2b893 | ||
|
|
5570519e0d | ||
|
|
7a3f223024 | ||
|
|
5e71a891d0 | ||
|
|
0f6b4224c3 | ||
|
|
d2cc8e2802 | ||
|
|
c1b771cef6 | ||
|
|
1458982089 | ||
|
|
af7a63e728 | ||
|
|
89b5e326d1 | ||
|
|
94eaa2e272 | ||
|
|
e6d7917a35 | ||
|
|
da1309f415 | ||
|
|
e566ce6015 | ||
|
|
6169664ae4 | ||
|
|
654a8f579f | ||
|
|
7fd53159e9 | ||
|
|
b685580d54 |
@@ -17,3 +17,5 @@
|
|||||||
#ReIgnore
|
#ReIgnore
|
||||||
**/__pycache__
|
**/__pycache__
|
||||||
**/test/
|
**/test/
|
||||||
|
PythonSQL.py
|
||||||
|
StyleLayer.py
|
||||||
@@ -4,14 +4,14 @@ __email__ = "info@3liz.org"
|
|||||||
|
|
||||||
|
|
||||||
from qgis.core import QgsApplication
|
from qgis.core import QgsApplication
|
||||||
from qgis.PyQt.QtCore import QCoreApplication, Qt, QTranslator, QUrl
|
from qgis.PyQt.QtCore import Qt, QUrl
|
||||||
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
||||||
from qgis.PyQt.QtWidgets import QAction, QMessageBox
|
from qgis.PyQt.QtWidgets import QAction
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
import qgis
|
import qgis
|
||||||
|
|
||||||
|
|
||||||
#include <QSettings>
|
# include <QSettings>
|
||||||
'''
|
'''
|
||||||
from pg_metadata.connection_manager import (
|
from pg_metadata.connection_manager import (
|
||||||
store_connections,
|
store_connections,
|
||||||
@@ -24,38 +24,43 @@ from pg_metadata.processing.provider import PgMetadataProvider
|
|||||||
from pg_metadata.qgis_plugin_tools.tools.custom_logging import setup_logger
|
from pg_metadata.qgis_plugin_tools.tools.custom_logging import setup_logger
|
||||||
'''
|
'''
|
||||||
import os
|
import os
|
||||||
|
from qgis.PyQt.QtCore import QSettings
|
||||||
|
from .about_form import AboutDialog
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
plugin_path,
|
# plugin_path,
|
||||||
resources_path,
|
resources_path,
|
||||||
|
pyperclip,
|
||||||
maj_verif,
|
maj_verif,
|
||||||
)
|
)
|
||||||
from .canvas_editor import AutoMap_Editor
|
pyperclip()
|
||||||
from .about_form import AutoMapAboutDialog
|
|
||||||
|
from .canvas_editor import AutoMap_Editor
|
||||||
|
from .style_invoke import AutoMap_Style
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
|
||||||
|
|
||||||
class PgAutoMap:
|
class PgAutoMap:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
""" Constructor. """
|
""" Constructor. """
|
||||||
self.canvas_editor = None
|
self.canvas_editor = None
|
||||||
|
self.style_dock = None
|
||||||
# self.issues = None
|
# self.issues = None
|
||||||
self.provider = None
|
self.provider = None
|
||||||
self.locator_filter = None
|
self.locator_filter = None
|
||||||
self.dock_action = None
|
self.dock_action = None
|
||||||
self.help_action = None
|
self.help_action = None
|
||||||
plugin_dir = os.path.dirname(__file__)
|
plugin_dir = os.path.dirname(__file__)
|
||||||
end_find = plugin_dir.rfind('\\')+1
|
end_find = plugin_dir.rfind('\\') + 1
|
||||||
global NAME
|
global NAME
|
||||||
NAME = plugin_dir[end_find:]
|
NAME = plugin_dir[end_find:]
|
||||||
maj_verif(NAME)
|
maj_verif(NAME)
|
||||||
|
|
||||||
# Display About window on first use
|
# Display About window on first use
|
||||||
version = qgis.utils.pluginMetadata('CenRa_AUTOMAP','version')
|
version = qgis.utils.pluginMetadata('CenRa_AUTOMAP', 'version')
|
||||||
s = QSettings()
|
s = QSettings()
|
||||||
versionUse = s.value("automap/version", 1, type=str)
|
versionUse = s.value("automap/version", 1, type=str)
|
||||||
if str(versionUse) != str(version) :
|
if str(versionUse) != str(version):
|
||||||
s.setValue("automap/version", str(version))
|
s.setValue("automap/version", str(version))
|
||||||
print(versionUse,version)
|
print(versionUse, version)
|
||||||
self.open_about_dialog()
|
self.open_about_dialog()
|
||||||
|
|
||||||
def initGui(self):
|
def initGui(self):
|
||||||
@@ -73,49 +78,23 @@ class PgAutoMap:
|
|||||||
if not self.canvas_editor:
|
if not self.canvas_editor:
|
||||||
self.canvas_editor = AutoMap_Editor()
|
self.canvas_editor = AutoMap_Editor()
|
||||||
|
|
||||||
|
self.automap_action = QAction(icon, 'CenRa_AutoMap', None)
|
||||||
self.automap_action = QAction(icon, 'CenRa_AutoMap',None)
|
|
||||||
self.toolBar.addAction(self.automap_action)
|
self.toolBar.addAction(self.automap_action)
|
||||||
self.automap_action.triggered.connect(self.open_editor)
|
self.automap_action.triggered.connect(self.open_editor)
|
||||||
'''
|
|
||||||
if not self.locator_filter:
|
|
||||||
self.locator_filter = LocatorFilter(iface)
|
|
||||||
iface.registerLocatorFilter(self.locator_filter)
|
|
||||||
|
|
||||||
@staticmethod
|
if not self.style_dock:
|
||||||
def check_invalid_connection_names():
|
self.style_dock = AutoMap_Style()
|
||||||
""" Check for invalid connection names in the QgsSettings. """
|
|
||||||
valid, invalid = validate_connections_names()
|
|
||||||
n_invalid = len(invalid)
|
|
||||||
|
|
||||||
if n_invalid == 0:
|
if os.environ['USERNAME'] == 'tlaveille' or os.environ['USERNAME'] == 'lpoulin' or os.environ['USERNAME'] == 'rclement':
|
||||||
return
|
iface.addDockWidget(Qt.DockWidgetArea(0x1), self.style_dock)
|
||||||
|
|
||||||
invalid_text = ', '.join(invalid)
|
|
||||||
msg = QMessageBox()
|
|
||||||
msg.setIcon(QMessageBox.Warning)
|
|
||||||
msg.setWindowTitle(tr('PgMetadata: Database connection(s) not available'))
|
|
||||||
msg.setText(tr(
|
|
||||||
f'{n_invalid} connection(s) listed in PgMetadata’s settings are invalid or '
|
|
||||||
f'no longer available: {invalid_text}'))
|
|
||||||
msg.setInformativeText(tr(
|
|
||||||
'Do you want to remove these connection(s) from the PgMetadata settings? '
|
|
||||||
'(You can also do this later with the “Set Connections” tool.)'))
|
|
||||||
msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No)
|
|
||||||
clicked = msg.exec()
|
|
||||||
|
|
||||||
if clicked == QMessageBox.Yes:
|
|
||||||
iface.messageBar().pushSuccess('PgMetadata', tr(f'{n_invalid} invalid connection(s) removed.'))
|
|
||||||
store_connections(valid)
|
|
||||||
if clicked == QMessageBox.No:
|
|
||||||
iface.messageBar().pushInfo('PgMetadata', tr(f'Keeping {n_invalid} invalid connections.'))
|
|
||||||
'''
|
|
||||||
def open_about_dialog(self):
|
def open_about_dialog(self):
|
||||||
"""
|
"""
|
||||||
About dialog
|
About dialog
|
||||||
"""
|
"""
|
||||||
dialog = AutoMapAboutDialog(iface)
|
dialog = AboutDialog(iface)
|
||||||
dialog.exec_()
|
dialog.exec()
|
||||||
|
|
||||||
def open_help():
|
def open_help():
|
||||||
""" Open the online help. """
|
""" Open the online help. """
|
||||||
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
|
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
|
||||||
@@ -127,7 +106,7 @@ class PgAutoMap:
|
|||||||
def unload(self):
|
def unload(self):
|
||||||
""" Unload the plugin. """
|
""" Unload the plugin. """
|
||||||
if self.canvas_editor:
|
if self.canvas_editor:
|
||||||
iface.removePluginMenu('CenRa_AutoMap',self.automap_action)
|
iface.removePluginMenu('CenRa_AutoMap', self.automap_action)
|
||||||
|
|
||||||
if self.provider:
|
if self.provider:
|
||||||
QgsApplication.processingRegistry().removeProvider(self.provider)
|
QgsApplication.processingRegistry().removeProvider(self.provider)
|
||||||
|
|||||||
@@ -1 +1,6 @@
|
|||||||
# CenRa_AutoMap
|
# CenRa_AutoMap
|
||||||
|
---
|
||||||
|
Outil de création de mise en page,
|
||||||
|
Permet de préprogramé des mise en page pour les mêtre à disposition des collégue.
|
||||||
|
|
||||||
|
> [Point de départ de création du plugin](https://github.com/CEN-Nouvelle-Aquitaine/MapCEN)
|
||||||
@@ -3,7 +3,7 @@ import os.path
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from qgis.PyQt import uic
|
from qgis.PyQt import uic
|
||||||
from qgis.PyQt.QtGui import QPixmap
|
# from qgis.PyQt.QtGui import QPixmap
|
||||||
from qgis.PyQt.QtWidgets import QDialog
|
from qgis.PyQt.QtWidgets import QDialog
|
||||||
|
|
||||||
from .tools.resources import devlog
|
from .tools.resources import devlog
|
||||||
@@ -12,12 +12,12 @@ ABOUT_FORM_CLASS, _ = uic.loadUiType(
|
|||||||
os.path.join(
|
os.path.join(
|
||||||
str(Path(__file__).resolve().parent),
|
str(Path(__file__).resolve().parent),
|
||||||
'tools/ui',
|
'tools/ui',
|
||||||
'CenRa_AutoMap_about_form.ui'
|
'CenRa_about_form.ui'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class AutoMapAboutDialog(QDialog, ABOUT_FORM_CLASS):
|
class AboutDialog(QDialog, ABOUT_FORM_CLASS):
|
||||||
|
|
||||||
""" About - Let the user display the about dialog. """
|
""" About - Let the user display the about dialog. """
|
||||||
|
|
||||||
|
|||||||
@@ -1,78 +1,41 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from PyQt5.QtCore import QSettings
|
|
||||||
from collections import namedtuple
|
|
||||||
from enum import Enum
|
|
||||||
from functools import partial
|
|
||||||
from pathlib import Path
|
|
||||||
from xml.dom.minidom import parseString
|
|
||||||
from qgis.gui import *
|
|
||||||
import qgis
|
|
||||||
from importlib import import_module
|
|
||||||
from qgis.core import (
|
from qgis.core import (
|
||||||
NULL,
|
|
||||||
QgsApplication,
|
|
||||||
QgsScaleBarSettings,
|
QgsScaleBarSettings,
|
||||||
QgsDataSourceUri,
|
|
||||||
QgsProject,
|
QgsProject,
|
||||||
QgsProviderConnectionException,
|
|
||||||
QgsProviderRegistry,
|
|
||||||
QgsRasterLayer,
|
QgsRasterLayer,
|
||||||
QgsSettings,
|
QgsSettings,
|
||||||
QgsVectorLayer,
|
QgsVectorLayer,
|
||||||
QgsGeometry,
|
|
||||||
QgsPrintLayout,
|
QgsPrintLayout,
|
||||||
QgsReadWriteContext,
|
QgsReadWriteContext,
|
||||||
QgsLayoutItemMap,
|
QgsLayoutItemMap,
|
||||||
QgsLayoutItemPage,
|
QgsLayoutItemPage,
|
||||||
QgsLayoutSize,
|
|
||||||
QgsUnitTypes,
|
QgsUnitTypes,
|
||||||
QgsLayoutPoint,
|
|
||||||
QgsLayoutItemLabel,
|
QgsLayoutItemLabel,
|
||||||
QgsLayoutItemPicture,
|
QgsLayoutItemPicture,
|
||||||
QgsLayoutItemLegend,
|
QgsLayoutItemLegend,
|
||||||
QgsLegendStyle,
|
QgsLegendStyle,
|
||||||
QgsLayoutItemScaleBar,
|
QgsLayoutItemScaleBar,
|
||||||
QgsLayerTreeGroup,
|
QgsLayerTreeGroup,
|
||||||
QgsCoordinateReferenceSystem,
|
|
||||||
QgsCoordinateTransform,
|
|
||||||
QgsLayerTree,
|
|
||||||
QgsLayoutTableColumn,
|
|
||||||
QgsRectangle,
|
QgsRectangle,
|
||||||
QgsLayoutItemMapOverviewStack,
|
|
||||||
)
|
)
|
||||||
from qgis.PyQt.QtCore import QLocale, QUrl, QDateTime, Qt
|
from qgis.PyQt.QtCore import Qt
|
||||||
from qgis.PyQt.QtGui import QDesktopServices, QIcon, QColor, QFont, QMovie
|
from qgis.PyQt.QtGui import QColor, QFont
|
||||||
from qgis.PyQt.QtPrintSupport import QPrinter
|
|
||||||
from qgis.PyQt.QtWebKitWidgets import QWebPage
|
|
||||||
from qgis.PyQt.QtWidgets import (
|
from qgis.PyQt.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QAction,
|
QMessageBox,
|
||||||
QDockWidget,
|
QPushButton,
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
QInputDialog,
|
|
||||||
QMenu,
|
|
||||||
QToolButton,
|
|
||||||
QTableWidget,
|
|
||||||
QTableWidgetItem,
|
|
||||||
QVBoxLayout,
|
|
||||||
)
|
)
|
||||||
from PyQt5 import QtGui
|
from qgis.PyQt.QtCore import QSettings
|
||||||
|
from qgis.PyQt import QtGui
|
||||||
from qgis.PyQt.QtXml import QDomDocument
|
from qgis.PyQt.QtXml import QDomDocument
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
import glob
|
import glob
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
load_ui,
|
load_ui,
|
||||||
resources_path,
|
resources_path,
|
||||||
login_base,
|
|
||||||
send_issues,
|
|
||||||
)
|
)
|
||||||
from .issues import CenRa_Issues
|
|
||||||
|
|
||||||
from .tools.mises_en_pages import carto_standard
|
|
||||||
from .tools.mises_en_pages import full_page
|
|
||||||
from .tools.mises_en_pages import demo
|
|
||||||
|
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
|
||||||
EDITOR_CLASS = load_ui('CenRa_AutoMap_base.ui')
|
EDITOR_CLASS = load_ui('CenRa_AutoMap_base.ui')
|
||||||
@@ -82,49 +45,50 @@ 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',
|
'CENRA',
|
||||||
'IGN',
|
'IGN',
|
||||||
'CRAIG',
|
'CRAIG',
|
||||||
'OpenStreetMap',
|
'OpenStreetMap',
|
||||||
'Sandre',
|
'Sandre',
|
||||||
'BRGM',
|
'BRGM',
|
||||||
'MUSÉUM NATIONAL D’HISTOIRE NATURELLE',
|
'MUSÉUM NATIONAL D’HISTOIRE NATURELLE',
|
||||||
"Muséum national d'Histoire naturelle",
|
"Muséum national d'Histoire naturelle",
|
||||||
'ONF',
|
'ONF',
|
||||||
'20xx LPO',
|
'20xx LPO',
|
||||||
'ofb.gouv.fr',
|
'ofb.gouv.fr',
|
||||||
'Stamen Design',
|
'Stamen Design',
|
||||||
'MTES',
|
'MTES',
|
||||||
'MTES',
|
'MTES',
|
||||||
'FEDER',
|
'FEDER',
|
||||||
'DREAL Auvergne-Rhône-Alpes',
|
'DREAL Auvergne-Rhône-Alpes',
|
||||||
'INSEE',
|
'INSEE',
|
||||||
'DGFiP',
|
'DGFiP',
|
||||||
'Fédération des Conservatoires d’espaces naturels',
|
'Fédération des Conservatoires d’espaces naturels',
|
||||||
'Plan cadastral informatisé - Etalab - juillet 202X',
|
'Plan cadastral informatisé - Etalab - juillet 202X',
|
||||||
'Parcellaire Express - IGN - 202X',
|
'Parcellaire Express - IGN - 202X',
|
||||||
]
|
]
|
||||||
A4_size = {'Portrait':{'RIGHT':210,'LEFT':0,'TOP':0,'BOTTOM':297},'Landscape':{'RIGHT':297,'LEFT':0,'TOP':0,'BOTTOM':210}}
|
A4_size = {'Portrait': {'RIGHT': 210, 'LEFT': 0, 'TOP': 0, 'BOTTOM': 297}, 'Landscape': {'RIGHT': 297, 'LEFT': 0, 'TOP': 0, 'BOTTOM': 210}}
|
||||||
A3_size = {'Portrait':{'RIGHT':298,'LEFT':0,'TOP':0,'BOTTOM':420},'Landscape':{'RIGHT':420,'LEFT':0,'TOP':0,'BOTTOM':298}}
|
A3_size = {'Portrait': {'RIGHT': 298, 'LEFT': 0, 'TOP': 0, 'BOTTOM': 420}, 'Landscape': {'RIGHT': 420, 'LEFT': 0, 'TOP': 0, 'BOTTOM': 298}}
|
||||||
|
|
||||||
|
|
||||||
class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
_ = parent
|
_ = parent
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.settings = QgsSettings()
|
self.settings = QgsSettings()
|
||||||
self.s = QSettings()
|
self.s = QSettings()
|
||||||
self.setWindowIcon(QtGui.QIcon(resources_path('icons','icon.png')))
|
self.setWindowIcon(QtGui.QIcon(resources_path('icons', 'icon.png')))
|
||||||
|
|
||||||
path = ''
|
path = ''
|
||||||
ix = 0
|
ix = 0
|
||||||
plugin_dir = str(os.path.dirname(os.path.abspath(__file__))).split(os.sep)
|
plugin_dir = str(os.path.dirname(os.path.abspath(__file__))).split(os.sep)
|
||||||
for i in plugin_dir[1:]:
|
for i in plugin_dir[1:]:
|
||||||
ix = ix+1
|
ix = ix + 1
|
||||||
path = path+'/'+i
|
path = path + '/' + i
|
||||||
self.tabWidget.setStyleSheet('background-image: url('+path+'/tools/bg/Capture.png);')
|
# self.tabWidget.setStyleSheet('background-image: url('+path+'/tools/bg/Capture.png);')
|
||||||
|
|
||||||
|
self.verticalScrollBar.hide()
|
||||||
self.commandLinkButton.clicked.connect(self.chargement_qpt)
|
self.commandLinkButton.clicked.connect(self.chargement_qpt)
|
||||||
self.radioButton_9.clicked.connect(self.statu_atlas)
|
self.radioButton_9.clicked.connect(self.statu_atlas)
|
||||||
self.radioButton_10.clicked.connect(self.statu_source)
|
self.radioButton_10.clicked.connect(self.statu_source)
|
||||||
@@ -135,14 +99,14 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.commandLinkButton_2.clicked.connect(self.load_ortho)
|
self.commandLinkButton_2.clicked.connect(self.load_ortho)
|
||||||
self.commandLinkButton_3.clicked.connect(self.load_osm)
|
self.commandLinkButton_3.clicked.connect(self.load_osm)
|
||||||
self.CustomeLogo.clicked.connect(self.deflogoteck)
|
self.CustomeLogo.clicked.connect(self.deflogoteck)
|
||||||
|
self.verticalScrollBar.valueChanged.connect(self.moveFrame)
|
||||||
|
|
||||||
## On ajoute le nom des templates à la liste déroulante de l'onglet "mises en page" :
|
# On ajoute le nom des templates à la liste déroulante de l'onglet "mises en page" :
|
||||||
mises_en_page = []
|
mises_en_page = []
|
||||||
|
|
||||||
for filename in glob.glob(resources_path("mises_en_pages","*.py")):
|
for filename in glob.glob(resources_path("mises_en_pages", "*.py")):
|
||||||
mises_en_page.append(filename)
|
mises_en_page.append(filename)
|
||||||
|
|
||||||
|
|
||||||
for i, filename in enumerate(mises_en_page):
|
for i, filename in enumerate(mises_en_page):
|
||||||
nom_fichier = os.path.basename(filename)
|
nom_fichier = os.path.basename(filename)
|
||||||
self.comboBox.addItem(nom_fichier)
|
self.comboBox.addItem(nom_fichier)
|
||||||
@@ -150,35 +114,35 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
|
|
||||||
self.template_parameters = {
|
self.template_parameters = {
|
||||||
'Carte_size': None,
|
'Carte_size': None,
|
||||||
'Carte_locals' : None,
|
'Carte_locals': None,
|
||||||
'Carte_rotate':None,
|
'Carte_rotate': None,
|
||||||
'Carte_2_size' : None,
|
'Carte_2_size': None,
|
||||||
'Carte_2_locals' : None,
|
'Carte_2_locals': None,
|
||||||
'Carte_2_rotate':None,
|
'Carte_2_rotate': None,
|
||||||
'Legande_size': None,
|
'Legande_size': None,
|
||||||
'Legande_locals': None,
|
'Legande_locals': None,
|
||||||
'Legande_rotate':None,
|
'Legande_rotate': None,
|
||||||
'Arrow_size': None,
|
'Arrow_size': None,
|
||||||
'Arrow_locals': None,
|
'Arrow_locals': None,
|
||||||
'Arrow_rotate':None,
|
'Arrow_rotate': None,
|
||||||
'Echelle_size': None,
|
'Echelle_size': None,
|
||||||
'Echelle_locals': None,
|
'Echelle_locals': None,
|
||||||
'Echelle_rotate':None,
|
'Echelle_rotate': None,
|
||||||
'Logo_size': None,
|
'Logo_size': None,
|
||||||
'Logo_locals': None,
|
'Logo_locals': None,
|
||||||
'Logo_rotate':None,
|
'Logo_rotate': None,
|
||||||
'Titre_size':None,
|
'Titre_size': None,
|
||||||
'Titre_locals':None,
|
'Titre_locals': None,
|
||||||
'Titre_rotate':None,
|
'Titre_rotate': None,
|
||||||
'Sous_titre_size':None,
|
'Sous_titre_size': None,
|
||||||
'Sous_titre_locals':None,
|
'Sous_titre_locals': None,
|
||||||
'Sous_titre_rotate':None,
|
'Sous_titre_rotate': None,
|
||||||
'Credit_size': None,
|
'Credit_size': None,
|
||||||
'Credit_locals': None,
|
'Credit_locals': None,
|
||||||
'Credit_rotate':None,
|
'Credit_rotate': None,
|
||||||
'Source_size': None,
|
'Source_size': None,
|
||||||
'Source_locals': None,
|
'Source_locals': None,
|
||||||
'Source_rotate':None,
|
'Source_rotate': None,
|
||||||
'Logo_2_size': None,
|
'Logo_2_size': None,
|
||||||
'Logo_2_locals': None,
|
'Logo_2_locals': None,
|
||||||
'Logo_2_rotate': None,
|
'Logo_2_rotate': None,
|
||||||
@@ -194,15 +158,25 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.hide_source()
|
self.hide_source()
|
||||||
self.hide_atlas()
|
self.hide_atlas()
|
||||||
|
|
||||||
|
def wheelEvent(self, event):
|
||||||
|
if (event.angleDelta().y() >= 1):
|
||||||
|
vsb = self.verticalScrollBar.value() + 20
|
||||||
|
else:
|
||||||
|
vsb = self.verticalScrollBar.value() - 20
|
||||||
|
self.verticalScrollBar.setValue(vsb)
|
||||||
|
|
||||||
|
def moveFrame(self):
|
||||||
|
self.frame.move(self.frame.x(), self.verticalScrollBar.value())
|
||||||
|
|
||||||
def update_logo_library(self):
|
def update_logo_library(self):
|
||||||
self.mComboBox_4.clear()
|
self.mComboBox_4.clear()
|
||||||
logo_library = []
|
logo_library = []
|
||||||
custome_bibliotech = glob.glob(self.s.value("automap/logoteck", 1, type=str)+'*.*')
|
custome_bibliotech = glob.glob(self.s.value("automap/logoteck", 1, type=str) + '*.*')
|
||||||
for l,logo_x in enumerate(custome_bibliotech):
|
for number, 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 = glob.glob(resources_path("logo_library", "*.png"))
|
||||||
for l,logo_x in enumerate(bibliotech):
|
for number, 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))
|
||||||
|
|
||||||
@@ -210,7 +184,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
options = QFileDialog.Options()
|
options = QFileDialog.Options()
|
||||||
options |= QFileDialog.ShowDirsOnly
|
options |= QFileDialog.ShowDirsOnly
|
||||||
folder = QFileDialog.getExistingDirectory(self, "Sélection du dossier parent", options=options)
|
folder = QFileDialog.getExistingDirectory(self, "Sélection du dossier parent", options=options)
|
||||||
return folder+'/'
|
return folder + '/'
|
||||||
|
|
||||||
def deflogoteck(self):
|
def deflogoteck(self):
|
||||||
folder = self.select_file()
|
folder = self.select_file()
|
||||||
@@ -225,16 +199,20 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
try:
|
try:
|
||||||
layout_subtitle = project_subtitle.layoutManager().layoutByName(self.comboBox_7.currentText())
|
layout_subtitle = project_subtitle.layoutManager().layoutByName(self.comboBox_7.currentText())
|
||||||
self.lineEdit_3.setText(layout_subtitle.itemById("SubTitle").text())
|
self.lineEdit_3.setText(layout_subtitle.itemById("SubTitle").text())
|
||||||
except:
|
except NameError:
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
def load_ortho(self):
|
def load_ortho(self):
|
||||||
global myGroup,last_group
|
global myGroup, last_group
|
||||||
runing = False
|
runing = False
|
||||||
try: myGroup
|
try:
|
||||||
except NameError: runing = True
|
myGroup
|
||||||
try: last_group
|
except NameError:
|
||||||
except NameError: last_group = ''
|
runing = True
|
||||||
|
try:
|
||||||
|
last_group
|
||||||
|
except NameError:
|
||||||
|
last_group = ''
|
||||||
if runing or (last_group != '' and last_group != 'ortho'):
|
if runing or (last_group != '' and last_group != 'ortho'):
|
||||||
layername = False
|
layername = False
|
||||||
layerAll = QgsProject.instance().layerTreeRoot().children()
|
layerAll = QgsProject.instance().layerTreeRoot().children()
|
||||||
@@ -243,7 +221,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
if layeritem.name() == 'SuperFont':
|
if layeritem.name() == 'SuperFont':
|
||||||
myGroup = layerAll[xl]
|
myGroup = layerAll[xl]
|
||||||
layername = True
|
layername = True
|
||||||
xl = xl+1
|
xl = xl + 1
|
||||||
if layername:
|
if layername:
|
||||||
(QgsProject.instance().layerTreeRoot()).removeChildNode(myGroup)
|
(QgsProject.instance().layerTreeRoot()).removeChildNode(myGroup)
|
||||||
runing = True
|
runing = True
|
||||||
@@ -253,32 +231,36 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
myGroup = (QgsProject.instance().layerTreeRoot()).addGroup("SuperFont")
|
myGroup = (QgsProject.instance().layerTreeRoot()).addGroup("SuperFont")
|
||||||
last_group = 'ortho'
|
last_group = 'ortho'
|
||||||
|
|
||||||
#OSM_RASTER = QgsRasterLayer(url_osm, 'OpenStreetMap Backgound', 'wms')
|
# OSM_RASTER = QgsRasterLayer(url_osm, 'OpenStreetMap Backgound', 'wms')
|
||||||
ORTHO_RASTER = QgsRasterLayer(url_ortho, 'Orthophoto AURA', 'wms')
|
ORTHO_RASTER = QgsRasterLayer(url_ortho, 'Orthophoto AURA', 'wms')
|
||||||
MNT_RASTER = QgsRasterLayer(url_mnt, 'MNT RGE Alti (<= 1:100000)', 'wms')
|
MNT_RASTER = QgsRasterLayer(url_mnt, 'MNT RGE Alti (<= 1:100000)', 'wms')
|
||||||
PENTE_RASTER = QgsRasterLayer(url_pente, 'Pente RGE Alti 0 à 90°(<= 1:100000)', 'wms')
|
PENTE_RASTER = QgsRasterLayer(url_pente, 'Pente RGE Alti 0 à 90°(<= 1:100000)', 'wms')
|
||||||
|
|
||||||
#OSM_RASTER.loadNamedStyle(resources_path("font","osm_background.qml"))
|
# OSM_RASTER.loadNamedStyle(resources_path("font", "osm_background.qml"))
|
||||||
ORTHO_RASTER.loadNamedStyle(resources_path("font","ortho_aura.qml"))
|
ORTHO_RASTER.loadNamedStyle(resources_path("font", "ortho_aura.qml"))
|
||||||
MNT_RASTER.loadNamedStyle(resources_path("font","mnt_alti.qml"))
|
MNT_RASTER.loadNamedStyle(resources_path("font", "mnt_alti.qml"))
|
||||||
|
|
||||||
#QgsProject.instance().addMapLayer(OSM_RASTER,False)
|
# QgsProject.instance().addMapLayer(OSM_RASTER,False)
|
||||||
QgsProject.instance().addMapLayer(ORTHO_RASTER,False)
|
QgsProject.instance().addMapLayer(ORTHO_RASTER, False)
|
||||||
QgsProject.instance().addMapLayer(MNT_RASTER,False)
|
QgsProject.instance().addMapLayer(MNT_RASTER, False)
|
||||||
QgsProject.instance().addMapLayer(PENTE_RASTER,False)
|
QgsProject.instance().addMapLayer(PENTE_RASTER, False)
|
||||||
|
|
||||||
#myGroup.addLayer(OSM_RASTER)
|
# myGroup.addLayer(OSM_RASTER)
|
||||||
myGroup.addLayer(ORTHO_RASTER)
|
myGroup.addLayer(ORTHO_RASTER)
|
||||||
myGroup.addLayer(MNT_RASTER)
|
myGroup.addLayer(MNT_RASTER)
|
||||||
myGroup.addLayer(PENTE_RASTER)
|
myGroup.addLayer(PENTE_RASTER)
|
||||||
|
|
||||||
def load_osm(self):
|
def load_osm(self):
|
||||||
global myGroup,last_group
|
global myGroup, last_group
|
||||||
runing = False
|
runing = False
|
||||||
try: myGroup
|
try:
|
||||||
except NameError: runing = True
|
myGroup
|
||||||
try: last_group
|
except NameError:
|
||||||
except NameError: last_group = ''
|
runing = True
|
||||||
|
try:
|
||||||
|
last_group
|
||||||
|
except NameError:
|
||||||
|
last_group = ''
|
||||||
if runing or (last_group != '' and last_group != 'osm'):
|
if runing or (last_group != '' and last_group != 'osm'):
|
||||||
layername = False
|
layername = False
|
||||||
layerAll = QgsProject.instance().layerTreeRoot().children()
|
layerAll = QgsProject.instance().layerTreeRoot().children()
|
||||||
@@ -287,7 +269,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
if layeritem.name() == 'SuperFont':
|
if layeritem.name() == 'SuperFont':
|
||||||
myGroup = layerAll[xl]
|
myGroup = layerAll[xl]
|
||||||
layername = True
|
layername = True
|
||||||
xl = xl+1
|
xl = xl + 1
|
||||||
if layername:
|
if layername:
|
||||||
(QgsProject.instance().layerTreeRoot()).removeChildNode(myGroup)
|
(QgsProject.instance().layerTreeRoot()).removeChildNode(myGroup)
|
||||||
runing = True
|
runing = True
|
||||||
@@ -297,21 +279,21 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
last_group = 'osm'
|
last_group = 'osm'
|
||||||
|
|
||||||
OSM_RASTER = QgsRasterLayer(url_osm, 'OpenStreetMap Backgound', 'wms')
|
OSM_RASTER = QgsRasterLayer(url_osm, 'OpenStreetMap Backgound', 'wms')
|
||||||
#ORTHO_RASTER = QgsRasterLayer(url_ortho, 'Orthophoto AURA', 'wms')
|
# ORTHO_RASTER = QgsRasterLayer(url_ortho, 'Orthophoto AURA', 'wms')
|
||||||
MNT_RASTER = QgsRasterLayer(url_mnt, 'MNT RGE Alti (<= 1:100000)', 'wms')
|
MNT_RASTER = QgsRasterLayer(url_mnt, 'MNT RGE Alti (<= 1:100000)', 'wms')
|
||||||
PENTE_RASTER = QgsRasterLayer(url_pente, 'Pente RGE Alti 0 à 90°(<= 1:100000)', 'wms')
|
PENTE_RASTER = QgsRasterLayer(url_pente, 'Pente RGE Alti 0 à 90°(<= 1:100000)', 'wms')
|
||||||
|
|
||||||
OSM_RASTER.loadNamedStyle(resources_path("font","osm_background.qml"))
|
OSM_RASTER.loadNamedStyle(resources_path("font", "osm_background.qml"))
|
||||||
#ORTHO_RASTER.loadNamedStyle(resources_path("font","ortho_aura.qml"))
|
# ORTHO_RASTER.loadNamedStyle(resources_path("font","ortho_aura.qml"))
|
||||||
MNT_RASTER.loadNamedStyle(resources_path("font","mnt_alti.qml"))
|
MNT_RASTER.loadNamedStyle(resources_path("font", "mnt_alti.qml"))
|
||||||
|
|
||||||
QgsProject.instance().addMapLayer(OSM_RASTER,False)
|
QgsProject.instance().addMapLayer(OSM_RASTER, False)
|
||||||
#QgsProject.instance().addMapLayer(ORTHO_RASTER,False)
|
# QgsProject.instance().addMapLayer(ORTHO_RASTER,False)
|
||||||
QgsProject.instance().addMapLayer(MNT_RASTER,False)
|
QgsProject.instance().addMapLayer(MNT_RASTER, False)
|
||||||
QgsProject.instance().addMapLayer(PENTE_RASTER,False)
|
QgsProject.instance().addMapLayer(PENTE_RASTER, False)
|
||||||
|
|
||||||
myGroup.addLayer(OSM_RASTER)
|
myGroup.addLayer(OSM_RASTER)
|
||||||
#myGroup.addLayer(ORTHO_RASTER)
|
# myGroup.addLayer(ORTHO_RASTER)
|
||||||
myGroup.addLayer(MNT_RASTER)
|
myGroup.addLayer(MNT_RASTER)
|
||||||
myGroup.addLayer(PENTE_RASTER)
|
myGroup.addLayer(PENTE_RASTER)
|
||||||
|
|
||||||
@@ -325,6 +307,8 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.comboBox_6.clear()
|
self.comboBox_6.clear()
|
||||||
self.comboBox_7.clear()
|
self.comboBox_7.clear()
|
||||||
|
|
||||||
|
if (self.s.value("automap/prenom_nom", "1", type=str) != "1"):
|
||||||
|
self.lineEdit_5.setText(self.s.value("automap/prenom_nom", 1, type=str))
|
||||||
couches = []
|
couches = []
|
||||||
couche_vecteur = ['']
|
couche_vecteur = ['']
|
||||||
mapThemes = ['']
|
mapThemes = ['']
|
||||||
@@ -351,6 +335,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.show_map()
|
self.show_map()
|
||||||
else:
|
else:
|
||||||
self.hide_map()
|
self.hide_map()
|
||||||
|
|
||||||
def show_map(self):
|
def show_map(self):
|
||||||
self.groupBox_3.setEnabled(True)
|
self.groupBox_3.setEnabled(True)
|
||||||
self.groupBox_3.show()
|
self.groupBox_3.show()
|
||||||
@@ -364,6 +349,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.show_titre()
|
self.show_titre()
|
||||||
else:
|
else:
|
||||||
self.hide_titre()
|
self.hide_titre()
|
||||||
|
|
||||||
def show_titre(self):
|
def show_titre(self):
|
||||||
self.lineEdit_2.setEnabled(False)
|
self.lineEdit_2.setEnabled(False)
|
||||||
self.lineEdit_2.hide()
|
self.lineEdit_2.hide()
|
||||||
@@ -381,6 +367,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.show_source()
|
self.show_source()
|
||||||
else:
|
else:
|
||||||
self.hide_source()
|
self.hide_source()
|
||||||
|
|
||||||
def show_source(self):
|
def show_source(self):
|
||||||
self.lineEdit_4.setEnabled(False)
|
self.lineEdit_4.setEnabled(False)
|
||||||
self.lineEdit_4.hide()
|
self.lineEdit_4.hide()
|
||||||
@@ -413,7 +400,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.comboBox_4.clear()
|
self.comboBox_4.clear()
|
||||||
if self.comboBox_2.currentText() != '':
|
if self.comboBox_2.currentText() != '':
|
||||||
layer = QgsProject.instance().mapLayersByName(self.comboBox_2.currentText())[0]
|
layer = QgsProject.instance().mapLayersByName(self.comboBox_2.currentText())[0]
|
||||||
#BUG sur layer.fields() pas défini sur ce qui est pas vecteur
|
# BUG sur layer.fields() pas défini sur ce qui est pas vecteur
|
||||||
for vfields in layer.fields():
|
for vfields in layer.fields():
|
||||||
fields.append(vfields.name())
|
fields.append(vfields.name())
|
||||||
self.comboBox_3.addItems(sorted(fields))
|
self.comboBox_3.addItems(sorted(fields))
|
||||||
@@ -427,18 +414,29 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
layout_name = self.comboBox_7.currentText()
|
layout_name = self.comboBox_7.currentText()
|
||||||
else:
|
else:
|
||||||
layout_name = self.lineEdit_2.text()
|
layout_name = self.lineEdit_2.text()
|
||||||
layouts_list = self.manager.printLayouts()
|
# layouts_list = self.manager.printLayouts()
|
||||||
|
|
||||||
for filename in glob.glob(resources_path("mises_en_pages","*.qpt")):
|
for filename in glob.glob(resources_path("mises_en_pages", "*.qpt")):
|
||||||
with open(os.path.join(os.getcwd(), filename), 'r') as f:
|
with open(os.path.join(os.getcwd(), filename), 'r') as f:
|
||||||
self.layout = QgsPrintLayout(project)
|
self.layout = QgsPrintLayout(project)
|
||||||
self.layout.initializeDefaults()
|
self.layout.initializeDefaults()
|
||||||
myAtlas=self.layout.atlas()
|
# myAtlas = self.layout.atlas()
|
||||||
template_content = f.read()
|
template_content = f.read()
|
||||||
doc = QDomDocument()
|
doc = QDomDocument()
|
||||||
doc.setContent(template_content)
|
doc.setContent(template_content)
|
||||||
self.layout.loadFromTemplate(doc, QgsReadWriteContext(), True)
|
self.layout.loadFromTemplate(doc, QgsReadWriteContext(), True)
|
||||||
|
|
||||||
|
try:
|
||||||
|
cutLayout = layout_name.index("¶")
|
||||||
|
except ValueError:
|
||||||
|
cutLayout = 0
|
||||||
|
|
||||||
|
if cutLayout >= 1:
|
||||||
self.layout.setName(layout_name)
|
self.layout.setName(layout_name)
|
||||||
|
titre_layout_name = layout_name[:cutLayout]
|
||||||
|
else:
|
||||||
|
self.layout.setName(layout_name)
|
||||||
|
titre_layout_name = layout_name
|
||||||
|
|
||||||
if self.radioButton_6.isChecked() and self.radioButton_7.isChecked():
|
if self.radioButton_6.isChecked() and self.radioButton_7.isChecked():
|
||||||
logo_div = A4_size['Portrait']['RIGHT']
|
logo_div = A4_size['Portrait']['RIGHT']
|
||||||
@@ -448,11 +446,12 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
logo_div = A3_size['Portrait']['RIGHT']
|
logo_div = A3_size['Portrait']['RIGHT']
|
||||||
if self.radioButton_5.isChecked() and self.radioButton_8.isChecked():
|
if self.radioButton_5.isChecked() and self.radioButton_8.isChecked():
|
||||||
logo_div = A3_size['Portrait']['BOTTOM']
|
logo_div = A3_size['Portrait']['BOTTOM']
|
||||||
if True:#os.path.basename(filename) == "1. Modèle carto standard (consolidé).qpt":
|
# os.path.basename(filename) == "1. Modèle carto standard (consolidé).qpt":
|
||||||
|
if True:
|
||||||
|
|
||||||
self.actualisation_mise_en_page()
|
self.actualisation_mise_en_page()
|
||||||
|
|
||||||
## Add map to layout
|
# Add map to layout
|
||||||
self.map_modele_test = QgsLayoutItemMap(self.layout)
|
self.map_modele_test = QgsLayoutItemMap(self.layout)
|
||||||
# Charger une carte vide
|
# Charger une carte vide
|
||||||
self.map_modele_test.setRect(20, 20, 20, 20)
|
self.map_modele_test.setRect(20, 20, 20, 20)
|
||||||
@@ -474,17 +473,18 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
if self.radioButton_12.isChecked() == 1:
|
if self.radioButton_12.isChecked() == 1:
|
||||||
self.position_map = QgsLayoutItemMap(self.layout)
|
self.position_map = QgsLayoutItemMap(self.layout)
|
||||||
self.position_map.setRect(20, 20, 20, 20)
|
self.position_map.setRect(20, 20, 20, 20)
|
||||||
self.position_map.setExtent(QgsRectangle(641552,6647386, 995856,6331104))
|
self.position_map.setExtent(QgsRectangle(641552, 6647386, 995856, 6331104))
|
||||||
self.position_map.setFollowVisibilityPreset(True)
|
self.position_map.setFollowVisibilityPreset(True)
|
||||||
self.position_map.setFollowVisibilityPresetName(self.comboBox_6.currentText())
|
self.position_map.setFollowVisibilityPresetName(self.comboBox_6.currentText())
|
||||||
self.position_map.setItemRotation(self.template_parameters['Carte_2_rotate'])
|
self.position_map.setItemRotation(self.template_parameters['Carte_2_rotate'])
|
||||||
self.position_map.attemptResize(self.template_parameters['Carte_2_size'])
|
self.position_map.attemptResize(self.template_parameters['Carte_2_size'])
|
||||||
self.position_map.attemptMove(self.template_parameters['Carte_2_locals'])
|
self.position_map.attemptMove(self.template_parameters['Carte_2_locals'])
|
||||||
overviewitem = QgsLayoutItemMapOverviewStack(self.position_map)
|
self.position_map.overview().setLinkedMap(self.map_modele_test)
|
||||||
map_overview = self.position_map.overview()
|
# overviewitem = QgsLayoutItemMapOverviewStack(self.position_map)
|
||||||
map_overview.setLinkedMap(self.map_modele_test)
|
# map_overview = self.position_map.overview()
|
||||||
map_overview.setCentered(True)
|
# map_overview.setLinkedMap(self.map_modele_test)
|
||||||
overviewitem.addOverview(map_overview)
|
# map_overview.setCentered(True)
|
||||||
|
# overviewitem.addOverview(map_overview)
|
||||||
|
|
||||||
self.position_map.refresh()
|
self.position_map.refresh()
|
||||||
self.map_modele_test.setFrameEnabled(True)
|
self.map_modele_test.setFrameEnabled(True)
|
||||||
@@ -499,12 +499,12 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.layout.addLayoutItem(self.map_modele_test)
|
self.layout.addLayoutItem(self.map_modele_test)
|
||||||
self.map_modele_test.setId("carte_principale")
|
self.map_modele_test.setId("carte_principale")
|
||||||
|
|
||||||
## Ajout d'un titre à la mise en page
|
# Ajout d'un titre à la mise en page
|
||||||
title = QgsLayoutItemLabel(self.layout)
|
title = QgsLayoutItemLabel(self.layout)
|
||||||
self.layout.addLayoutItem(title)
|
self.layout.addLayoutItem(title)
|
||||||
titre = layout_name
|
titre = titre_layout_name
|
||||||
title.setText(titre)
|
title.setText(titre)
|
||||||
title.setFont(QFont("Calibri", 15, QFont.Bold))
|
title.setFont(QFont("Calibri", 15, False))
|
||||||
title.setItemRotation(self.template_parameters['Titre_rotate'])
|
title.setItemRotation(self.template_parameters['Titre_rotate'])
|
||||||
title.attemptResize(self.template_parameters['Titre_size'])
|
title.attemptResize(self.template_parameters['Titre_size'])
|
||||||
title.attemptMove(self.template_parameters['Titre_locals'])
|
title.attemptMove(self.template_parameters['Titre_locals'])
|
||||||
@@ -513,18 +513,17 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
title.setBackgroundColor(QColor(255, 255, 255, 130))
|
title.setBackgroundColor(QColor(255, 255, 255, 130))
|
||||||
self.layout.addItem(title)
|
self.layout.addItem(title)
|
||||||
# title.adjustSizeToText() on n'utilise plutot setFixedSize pour pouvoir centrer le titre de manière plus optimale ici
|
# title.adjustSizeToText() on n'utilise plutot setFixedSize pour pouvoir centrer le titre de manière plus optimale ici
|
||||||
title.setHAlign(Qt.AlignHCenter)
|
title.setHAlign(Qt.AlignmentFlag(0x0004))
|
||||||
title.setVAlign(Qt.AlignVCenter)
|
title.setVAlign(Qt.AlignmentFlag(0x0080))
|
||||||
|
|
||||||
|
# Ajout d'un sous titre à la mise en page
|
||||||
## Ajout d'un sous titre à la mise en page
|
|
||||||
subtitle = QgsLayoutItemLabel(self.layout)
|
subtitle = QgsLayoutItemLabel(self.layout)
|
||||||
self.layout.addLayoutItem(subtitle)
|
self.layout.addLayoutItem(subtitle)
|
||||||
titre = self.lineEdit_3.text()
|
titre = self.lineEdit_3.text()
|
||||||
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.setItemRotation(self.template_parameters['Sous_titre_rotate'])
|
subtitle.setItemRotation(self.template_parameters['Sous_titre_rotate'])
|
||||||
subtitle.attemptResize(self.template_parameters['Sous_titre_size'])
|
subtitle.attemptResize(self.template_parameters['Sous_titre_size'])
|
||||||
subtitle.attemptMove(self.template_parameters['Sous_titre_locals'])
|
subtitle.attemptMove(self.template_parameters['Sous_titre_locals'])
|
||||||
@@ -532,23 +531,21 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
subtitle.setBackgroundEnabled(True)
|
subtitle.setBackgroundEnabled(True)
|
||||||
subtitle.setBackgroundColor(QColor(255, 255, 255, 130))
|
subtitle.setBackgroundColor(QColor(255, 255, 255, 130))
|
||||||
self.layout.addItem(subtitle)
|
self.layout.addItem(subtitle)
|
||||||
subtitle.setHAlign(Qt.AlignHCenter)
|
subtitle.setHAlign(Qt.AlignmentFlag(0x0004))
|
||||||
subtitle.setVAlign(Qt.AlignVCenter)
|
subtitle.setVAlign(Qt.AlignmentFlag(0x0080))
|
||||||
|
|
||||||
|
# Ajout du logo CEN NA en haut à gauche de la page
|
||||||
## Ajout du logo CEN NA en haut à gauche de la page
|
|
||||||
logo = QgsLayoutItemPicture(self.layout)
|
logo = QgsLayoutItemPicture(self.layout)
|
||||||
logo.setResizeMode(QgsLayoutItemPicture.Zoom)
|
logo.setResizeMode(QgsLayoutItemPicture.Zoom)
|
||||||
logo.setMode(QgsLayoutItemPicture.FormatRaster)
|
logo.setMode(QgsLayoutItemPicture.FormatRaster)
|
||||||
logo.setItemRotation(self.template_parameters['Logo_rotate'])
|
logo.setItemRotation(self.template_parameters['Logo_rotate'])
|
||||||
logo.setFixedSize(self.template_parameters['Logo_size'])
|
logo.setFixedSize(self.template_parameters['Logo_size'])
|
||||||
logo.attemptMove(self.template_parameters['Logo_locals'])
|
logo.attemptMove(self.template_parameters['Logo_locals'])
|
||||||
logo.setPicturePath(resources_path("icons","CEN_RA.png"))
|
logo.setPicturePath(resources_path("icons", "CEN_RA.png"))
|
||||||
logo.setId('logo')
|
logo.setId('logo')
|
||||||
self.layout.addLayoutItem(logo)
|
self.layout.addLayoutItem(logo)
|
||||||
|
|
||||||
|
# Ajout de la legende :
|
||||||
## Ajout de la legende :
|
|
||||||
legend = QgsLayoutItemLegend(self.layout)
|
legend = QgsLayoutItemLegend(self.layout)
|
||||||
|
|
||||||
legend.setId('legende_model1')
|
legend.setId('legende_model1')
|
||||||
@@ -593,6 +590,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
layertreelayer = root.findLayer(layer.id())
|
layertreelayer = root.findLayer(layer.id())
|
||||||
|
|
||||||
# get the parent of the layer tree layer (layer tree root, or group)
|
# get the parent of the layer tree layer (layer tree root, or group)
|
||||||
|
if layertreelayer is not None:
|
||||||
parent = layertreelayer.parent()
|
parent = layertreelayer.parent()
|
||||||
|
|
||||||
# if the parent is a group and has a name, find it and remove the layer
|
# if the parent is a group and has a name, find it and remove the layer
|
||||||
@@ -603,7 +601,6 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
else:
|
else:
|
||||||
root_group.removeLayer(layer)
|
root_group.removeLayer(layer)
|
||||||
|
|
||||||
|
|
||||||
legend.setEqualColumnWidth(True)
|
legend.setEqualColumnWidth(True)
|
||||||
legend.setSplitLayer(True)
|
legend.setSplitLayer(True)
|
||||||
legend.setColumnSpace(5)
|
legend.setColumnSpace(5)
|
||||||
@@ -620,7 +617,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
legend.updateLegend()
|
legend.updateLegend()
|
||||||
legend.attemptMove(self.template_parameters['Legande_locals'])
|
legend.attemptMove(self.template_parameters['Legande_locals'])
|
||||||
|
|
||||||
## Ajout de l'échelle numeric à la mise en page
|
# Ajout de l'échelle numeric à la mise en page
|
||||||
self.scalebarnumeric_qpt = QgsLayoutItemScaleBar(self.layout)
|
self.scalebarnumeric_qpt = QgsLayoutItemScaleBar(self.layout)
|
||||||
self.scalebarnumeric_qpt.setStyle('Numeric')
|
self.scalebarnumeric_qpt.setStyle('Numeric')
|
||||||
self.scalebarnumeric_qpt.setLinkedMap(self.map_modele_test)
|
self.scalebarnumeric_qpt.setLinkedMap(self.map_modele_test)
|
||||||
@@ -630,6 +627,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.scalebarnumeric_qpt.setNumberOfSegments(2)
|
self.scalebarnumeric_qpt.setNumberOfSegments(2)
|
||||||
self.scalebarnumeric_qpt.setNumberOfSegmentsLeft(0)
|
self.scalebarnumeric_qpt.setNumberOfSegmentsLeft(0)
|
||||||
|
|
||||||
|
self.scalebarnumeric_qpt.setFont(QFont("Calibri", 12))
|
||||||
self.scalebarnumeric_qpt.attemptMove(self.template_parameters['Echelle_locals'])
|
self.scalebarnumeric_qpt.attemptMove(self.template_parameters['Echelle_locals'])
|
||||||
self.scalebarnumeric_qpt.attemptResize(self.template_parameters['Echelle_size'])
|
self.scalebarnumeric_qpt.attemptResize(self.template_parameters['Echelle_size'])
|
||||||
self.scalebarnumeric_qpt.setItemRotation(self.template_parameters['Echelle_rotate'])
|
self.scalebarnumeric_qpt.setItemRotation(self.template_parameters['Echelle_rotate'])
|
||||||
@@ -639,7 +637,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
|
|
||||||
self.layout.addLayoutItem(self.scalebarnumeric_qpt)
|
self.layout.addLayoutItem(self.scalebarnumeric_qpt)
|
||||||
|
|
||||||
## Ajout de l'échelle à la mise en page
|
# Ajout de l'échelle à la mise en page
|
||||||
self.scalebar_qpt = QgsLayoutItemScaleBar(self.layout)
|
self.scalebar_qpt = QgsLayoutItemScaleBar(self.layout)
|
||||||
self.scalebar_qpt.setStyle('Single Box')
|
self.scalebar_qpt.setStyle('Single Box')
|
||||||
self.scalebar_qpt.setLinkedMap(self.map_modele_test)
|
self.scalebar_qpt.setLinkedMap(self.map_modele_test)
|
||||||
@@ -649,6 +647,7 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.scalebar_qpt.setNumberOfSegments(2)
|
self.scalebar_qpt.setNumberOfSegments(2)
|
||||||
self.scalebar_qpt.setNumberOfSegmentsLeft(0)
|
self.scalebar_qpt.setNumberOfSegmentsLeft(0)
|
||||||
|
|
||||||
|
self.scalebar_qpt.setFont(QFont("Calibri", 12))
|
||||||
self.scalebar_qpt.attemptMove(self.template_parameters['Echelle_2_locals'])
|
self.scalebar_qpt.attemptMove(self.template_parameters['Echelle_2_locals'])
|
||||||
self.scalebar_qpt.attemptResize(self.template_parameters['Echelle_2_size'])
|
self.scalebar_qpt.attemptResize(self.template_parameters['Echelle_2_size'])
|
||||||
self.scalebar_qpt.setItemRotation(self.template_parameters['Echelle_2_rotate'])
|
self.scalebar_qpt.setItemRotation(self.template_parameters['Echelle_2_rotate'])
|
||||||
@@ -661,39 +660,53 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
|
|
||||||
# ajout de la fleche du Nord
|
# ajout de la fleche du Nord
|
||||||
north = QgsLayoutItemPicture(self.layout)
|
north = QgsLayoutItemPicture(self.layout)
|
||||||
north.setPicturePath(resources_path("mises_en_pages","NorthArrow_02.svg"))
|
north.setPicturePath(resources_path("mises_en_pages", "NorthArrow_02.svg"))
|
||||||
self.layout.addLayoutItem(north)
|
self.layout.addLayoutItem(north)
|
||||||
north.attemptMove(self.template_parameters['Arrow_locals'])
|
north.attemptMove(self.template_parameters['Arrow_locals'])
|
||||||
north.attemptResize(self.template_parameters['Arrow_size'])
|
north.attemptResize(self.template_parameters['Arrow_size'])
|
||||||
north.setItemRotation(self.template_parameters['Arrow_rotate'])
|
north.setItemRotation(self.template_parameters['Arrow_rotate'])
|
||||||
|
north.setBackgroundEnabled(True)
|
||||||
|
north.setBackgroundColor(QColor(255, 255, 255, 130))
|
||||||
|
|
||||||
if self.radioButton_10.isChecked() == 1:
|
if self.radioButton_10.isChecked() == 1:
|
||||||
info_text = ["Source : " + self.mComboBox_3.currentText()][0]
|
text_source = ' '
|
||||||
|
for Item_mComboBox_3 in self.mComboBox_3.checkedItems():
|
||||||
|
text_source = text_source + Item_mComboBox_3 + ','
|
||||||
|
text_source = text_source[:-1]
|
||||||
|
info_text = ["Source :" + text_source][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 Rhône-Alpes (" + date.today().strftime(
|
if self.radioButton_14.isChecked() == 1:
|
||||||
"%d/%m/%Y") + ")"]
|
self.s.setValue("automap/prenom_nom", self.lineEdit_5.text())
|
||||||
|
prenom_nom = self.s.value("automap/prenom_nom", 1, type=str)
|
||||||
|
info = ["Réalisation : " + "CEN Rhône-Alpes (" + date.today().strftime("%d/%m/%Y") + ") par " + prenom_nom]
|
||||||
|
else:
|
||||||
|
info = ["Réalisation : " + "CEN Rhône-Alpes (" + date.today().strftime("%d/%m/%Y") + ")"]
|
||||||
credit_text = QgsLayoutItemLabel(self.layout)
|
credit_text = QgsLayoutItemLabel(self.layout)
|
||||||
credit_text.setText(info[0])
|
credit_text.setText(info[0])
|
||||||
credit_text.setFont(QFont("Calibri", 9))
|
credit_text.setFont(QFont("Calibri", 9))
|
||||||
credit_text.setHAlign(Qt.AlignRight)
|
credit_text.setHAlign(Qt.AlignmentFlag(0x0002))
|
||||||
credit_text.setVAlign(Qt.AlignVCenter)
|
credit_text.setVAlign(Qt.AlignmentFlag(0x0080))
|
||||||
|
credit_text.setBackgroundEnabled(True)
|
||||||
|
credit_text.setBackgroundColor(QColor(255, 255, 255, 130))
|
||||||
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))
|
||||||
credit_text2.setHAlign(Qt.AlignRight)
|
credit_text2.setHAlign(Qt.AlignmentFlag(0x0002))
|
||||||
credit_text2.setVAlign(Qt.AlignVCenter)
|
credit_text2.setVAlign(Qt.AlignmentFlag(0x0080))
|
||||||
credit_text.setItemRotation(self.template_parameters['Credit_rotate'])
|
credit_text.setItemRotation(self.template_parameters['Credit_rotate'])
|
||||||
credit_text.attemptResize(self.template_parameters['Credit_size'])
|
credit_text.attemptResize(self.template_parameters['Credit_size'])
|
||||||
credit_text.attemptMove(self.template_parameters['Credit_locals'])
|
credit_text.attemptMove(self.template_parameters['Credit_locals'])
|
||||||
credit_text2.setItemRotation(self.template_parameters['Source_rotate'])
|
credit_text2.setItemRotation(self.template_parameters['Source_rotate'])
|
||||||
credit_text2.attemptResize(self.template_parameters['Source_size'])
|
credit_text2.attemptResize(self.template_parameters['Source_size'])
|
||||||
credit_text2.attemptMove(self.template_parameters['Source_locals'])
|
credit_text2.attemptMove(self.template_parameters['Source_locals'])
|
||||||
|
credit_text2.setBackgroundEnabled(True)
|
||||||
|
credit_text2.setBackgroundColor(QColor(255, 255, 255, 130))
|
||||||
self.layout.addLayoutItem(credit_text)
|
self.layout.addLayoutItem(credit_text)
|
||||||
self.layout.addLayoutItem(credit_text2)
|
self.layout.addLayoutItem(credit_text2)
|
||||||
|
|
||||||
## Ajout du logo credit en bas à droit de la page
|
# Ajout du logo credit en bas à droit de la page
|
||||||
len_item = (len(self.mComboBox_4.checkedItems()))
|
len_item = (len(self.mComboBox_4.checkedItems()))
|
||||||
for logo_run in self.mComboBox_4.checkedItems():
|
for logo_run in self.mComboBox_4.checkedItems():
|
||||||
logo_credit = QgsLayoutItemPicture(self.layout)
|
logo_credit = QgsLayoutItemPicture(self.layout)
|
||||||
@@ -701,14 +714,15 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
logo_credit.setMode(QgsLayoutItemPicture.FormatRaster)
|
logo_credit.setMode(QgsLayoutItemPicture.FormatRaster)
|
||||||
cur_x = self.template_parameters['Logo_2_locals'].x()
|
cur_x = self.template_parameters['Logo_2_locals'].x()
|
||||||
logo_credit.attemptMove(self.template_parameters['Logo_2_locals'])
|
logo_credit.attemptMove(self.template_parameters['Logo_2_locals'])
|
||||||
logo_credit.setPictureAnchor(4)
|
print(logo_credit.pictureAnchor())
|
||||||
self.template_parameters['Logo_2_locals'].setX(cur_x+(logo_div/len_item))
|
# logo_credit.setPictureAnchor(4)
|
||||||
|
self.template_parameters['Logo_2_locals'].setX(cur_x + (logo_div / len_item))
|
||||||
logo_credit.setFixedSize(self.template_parameters['Logo_2_size'])
|
logo_credit.setFixedSize(self.template_parameters['Logo_2_size'])
|
||||||
if logo_run[0] == ' ':
|
if logo_run[0] == ' ':
|
||||||
logo_credit.setPicturePath(self.s.value("automap/logoteck", 1, type=str)+logo_run[1:])
|
logo_credit.setPicturePath(self.s.value("automap/logoteck", 1, type=str) + logo_run[1:])
|
||||||
else:
|
else:
|
||||||
logo_credit.setPicturePath(resources_path("logo_library",logo_run))
|
logo_credit.setPicturePath(resources_path("logo_library", logo_run))
|
||||||
logo_credit.setId('logo_'+logo_run)
|
logo_credit.setId('logo_' + logo_run)
|
||||||
logo_credit.setBackgroundEnabled(True)
|
logo_credit.setBackgroundEnabled(True)
|
||||||
logo_credit.setBackgroundColor(QColor(255, 255, 255, 130))
|
logo_credit.setBackgroundColor(QColor(255, 255, 255, 130))
|
||||||
self.layout.addLayoutItem(logo_credit)
|
self.layout.addLayoutItem(logo_credit)
|
||||||
@@ -719,12 +733,34 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
|
|
||||||
existing_layout = project.layoutManager().layoutByName(self.layout.name())
|
existing_layout = project.layoutManager().layoutByName(self.layout.name())
|
||||||
if existing_layout:
|
if existing_layout:
|
||||||
if self.radioButton_12.isChecked() != 1:
|
self.QMBquestion = QMessageBox()
|
||||||
|
self.QMBquestion.setWindowTitle(u"Attention !")
|
||||||
|
self.QMBquestion.setIcon(QMessageBox.Icon.Warning)
|
||||||
|
self.QMBquestion.setText("Mise en page existante, la mise en page va être écrasée !")
|
||||||
|
self.QMBquestion.setStandardButtons(QMessageBox.StandardButton(0x00004000) | QMessageBox.StandardButton(0x00010000))
|
||||||
|
self.QMBquestion.addButton(QPushButton('Autre mise en page'), QMessageBox.ButtonRole(0))
|
||||||
|
self.QMBquestion = self.QMBquestion.exec()
|
||||||
|
|
||||||
|
# if self.radioButton_12.isChecked() != 1:
|
||||||
|
if self.QMBquestion == QMessageBox.StandardButton(0x00004000):
|
||||||
project.layoutManager().removeLayout(existing_layout)
|
project.layoutManager().removeLayout(existing_layout)
|
||||||
|
# result = project.layoutManager().addLayout(self.layout)
|
||||||
|
elif self.QMBquestion != QMessageBox.StandardButton(0x00010000):
|
||||||
|
LayoutCOUNT = 0
|
||||||
|
arrayManager = []
|
||||||
|
for AddArrayManager in project.layoutManager().layouts():
|
||||||
|
arrayManager.append(AddArrayManager.name())
|
||||||
|
arrayManager.sort()
|
||||||
|
for LayoutNAME in arrayManager:
|
||||||
|
if LayoutNAME == layout_name:
|
||||||
|
LayoutCOUNT = LayoutCOUNT + 1
|
||||||
|
if LayoutNAME == layout_name + "¶" + str(LayoutCOUNT):
|
||||||
|
LayoutCOUNT = LayoutCOUNT + 1
|
||||||
|
layout_name = (layout_name + "¶" + str(LayoutCOUNT))
|
||||||
|
self.layout.setName(layout_name)
|
||||||
|
|
||||||
result = project.layoutManager().addLayout(self.layout)
|
else:
|
||||||
|
existing_layout = True
|
||||||
|
|
||||||
|
|
||||||
self.manager.addLayout(self.layout)
|
self.manager.addLayout(self.layout)
|
||||||
if self.radioButton_9.isChecked() == 1:
|
if self.radioButton_9.isChecked() == 1:
|
||||||
@@ -735,8 +771,24 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
|
|
||||||
fichier_mise_en_page = layout_name
|
fichier_mise_en_page = layout_name
|
||||||
layout_modifie = QgsProject.instance().layoutManager().layoutByName(fichier_mise_en_page)
|
layout_modifie = QgsProject.instance().layoutManager().layoutByName(fichier_mise_en_page)
|
||||||
|
try:
|
||||||
|
if (self.QMBquestion == QMessageBox.AcceptRole):
|
||||||
|
TryMessage = (self.QMBquestion == QMessageBox.AcceptRole)
|
||||||
|
elif (self.QMBquestion == QMessageBox.Yes):
|
||||||
|
TryMessage = (self.QMBquestion == QMessageBox.Yes)
|
||||||
|
else:
|
||||||
|
TryMessage = False
|
||||||
|
del self.QMBquestion
|
||||||
|
except ValueError:
|
||||||
|
TryMessage = True
|
||||||
|
except AttributeError:
|
||||||
|
TryMessage = True
|
||||||
|
|
||||||
|
if TryMessage is True:
|
||||||
iface.openLayoutDesigner(layout_modifie)
|
iface.openLayoutDesigner(layout_modifie)
|
||||||
self.close()
|
self.close()
|
||||||
|
else:
|
||||||
|
self.activateWindow()
|
||||||
|
|
||||||
def actualisation_mise_en_page(self):
|
def actualisation_mise_en_page(self):
|
||||||
values_page = self.comboBox.currentText()
|
values_page = self.comboBox.currentText()
|
||||||
@@ -757,24 +809,19 @@ class AutoMap_Editor(QDialog, EDITOR_CLASS):
|
|||||||
pc = self.layout.pageCollection()
|
pc = self.layout.pageCollection()
|
||||||
pc.pages()[0].setPageSize('A3', QgsLayoutItemPage.Landscape)
|
pc.pages()[0].setPageSize('A3', QgsLayoutItemPage.Landscape)
|
||||||
|
|
||||||
if values_page == "demo.py":
|
values_page_import = values_page[:-3]
|
||||||
self.template_parameters = demo.fletch_canvas(self)
|
eval("exec('from .tools.mises_en_pages import ' + values_page_import)")
|
||||||
if values_page == "carto_standard.py":
|
eval("exec('self.template_parameters = '+ values_page_import + '.fletch_canvas(self)')")
|
||||||
self.template_parameters = carto_standard.fletch_canvas(self)
|
|
||||||
if values_page == "full_page.py":
|
|
||||||
self.template_parameters = full_page.fletch_canvas(self)
|
|
||||||
|
|
||||||
def bar_echelle_auto(self, echelle, bar_echelle):
|
def bar_echelle_auto(self, echelle, bar_echelle):
|
||||||
|
|
||||||
if True:
|
if True:
|
||||||
if echelle.scale() >= 40000:
|
if echelle.scale() >= 40000:
|
||||||
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.04)/1000))
|
bar_echelle.setUnitsPerSegment(round((echelle.scale() * 0.04) / 1000))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
bar_echelle.setUnits(QgsUnitTypes.DistanceMeters)
|
bar_echelle.setUnits(QgsUnitTypes.DistanceMeters)
|
||||||
bar_echelle.setUnitLabel("m")
|
bar_echelle.setUnitLabel("m")
|
||||||
bar_echelle.setUnitsPerSegment(round(echelle.scale()*0.04))
|
bar_echelle.setUnitsPerSegment(round(echelle.scale() * 0.04))
|
||||||
|
|
||||||
bar_echelle.update()
|
bar_echelle.update()
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
plugin_dir = os.path.dirname(__file__)
|
|
||||||
end_find = plugin_dir.rfind('\\')+1
|
|
||||||
|
|
||||||
NAME = plugin_dir[end_find:]
|
|
||||||
#print(NAME)
|
|
||||||
|
|
||||||
from qgis.gui import *
|
from qgis.gui import *
|
||||||
|
|
||||||
from qgis.core import (
|
from qgis.core import (
|
||||||
@@ -35,21 +29,27 @@ from qgis.utils import iface
|
|||||||
|
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
load_ui,
|
load_ui,
|
||||||
resources_path,
|
# resources_path,
|
||||||
send_issues,
|
send_issues,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
plugin_dir = os.path.dirname(__file__)
|
||||||
|
end_find = plugin_dir.rfind('\\') + 1
|
||||||
|
|
||||||
|
NAME = plugin_dir[end_find:]
|
||||||
|
# print(NAME)
|
||||||
|
|
||||||
EDITOR_CLASS = load_ui('CenRa_IssuesSend.ui')
|
EDITOR_CLASS = load_ui('CenRa_IssuesSend.ui')
|
||||||
|
|
||||||
class CenRa_Issues(QDialog, EDITOR_CLASS):
|
|
||||||
|
|
||||||
|
class CenRa_Issues(QDialog, EDITOR_CLASS):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
_ = parent
|
_ = parent
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.settings = QgsSettings()
|
self.settings = QgsSettings()
|
||||||
|
|
||||||
#place connect here
|
# place connect here
|
||||||
self.annuler_button.clicked.connect(self.close)
|
self.annuler_button.clicked.connect(self.close)
|
||||||
self.ok_button.clicked.connect(self.run_sendissues)
|
self.ok_button.clicked.connect(self.run_sendissues)
|
||||||
|
|
||||||
@@ -63,17 +63,22 @@ class CenRa_Issues(QDialog, EDITOR_CLASS):
|
|||||||
statu_autre = self.check_autre.isChecked()
|
statu_autre = self.check_autre.isChecked()
|
||||||
|
|
||||||
statu = []
|
statu = []
|
||||||
if statu_bug == True : statu = statu + [1]
|
if statu_bug is True:
|
||||||
if statu_aide == True : statu = statu + [3]
|
statu = statu + [1]
|
||||||
if statu_question == True : statu = statu + [5]
|
if statu_aide is True:
|
||||||
if statu_amelioration == True : statu = statu + [2]
|
statu = statu + [3]
|
||||||
if statu_autre == True : statu = statu + [6]
|
if statu_question is True:
|
||||||
|
statu = statu + [5]
|
||||||
|
if statu_amelioration is True:
|
||||||
|
statu = statu + [2]
|
||||||
|
if statu_autre is True:
|
||||||
|
statu = statu + [6]
|
||||||
|
|
||||||
if len(statu) >= 1:
|
if len(statu) >= 1:
|
||||||
import qgis
|
import qgis
|
||||||
url = qgis.utils.pluginMetadata(NAME,'tracker')
|
url = qgis.utils.pluginMetadata(NAME, 'tracker')
|
||||||
print(text_message)
|
print(text_message)
|
||||||
send_info = send_issues(url,text_titre,text_message,statu)
|
send_info = send_issues(url, text_titre, text_message, statu)
|
||||||
code = send_info.status_code
|
code = send_info.status_code
|
||||||
print(code)
|
print(code)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -5,8 +5,9 @@
|
|||||||
[general]
|
[general]
|
||||||
name=CenRa_AutoMap
|
name=CenRa_AutoMap
|
||||||
qgisMinimumVersion=3.0
|
qgisMinimumVersion=3.0
|
||||||
|
supportsQt6=True
|
||||||
description=CenRa_AutoMap
|
description=CenRa_AutoMap
|
||||||
version=1.7
|
version=2.1
|
||||||
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
||||||
email=si_besoin@cen-rhonealpes.fr
|
email=si_besoin@cen-rhonealpes.fr
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ tracker=https://gitea.cenra-outils.org/api/v1/repos/CEN-RA/Plugin_QGIS/issues
|
|||||||
|
|
||||||
hasProcessingProvider=no
|
hasProcessingProvider=no
|
||||||
# Uncomment the following line and add your changelog:
|
# Uncomment the following line and add your changelog:
|
||||||
changelog=<h2>CenRa_AutoMap:</h2></br><p><h3>21/10/2024 - Version 1.7: </h3> - Epurations du code.</p></br><p><h3>07/10/2024 - Version 1.6: </h3> - Option de bibliotheque de logo custome.</p></br><p><h3>03/10/2024 - Version 1.5: </h3> - Remonte la fênetre dans la pille.</br> - Gestion du nombre de colonne dans la légend.</br></p></br><p><h3>02/10/2024 - Version 1.4: </h3> - Mise en page plein écrant.</br></p></br><p><h3>01/10/2024 - Version 1.3: </h3> - Récupération du titre et sous-titre pour mise en page existente.</br> - Integration de bibliotheque de logo.</br> - Integration de gestionaire pour les source de donnée.</br> - Mise en place d'une bar d'echelle adaptative. </br></p></br><p><h3>30/09/2024 - Version 1.2: </h3> - Activation du thème. </br> - Ajouter une carte de suivie. </br><p></br><h3>27/09/2024 - Version 1.1: </h3> - Ajout d'une liste déroulante pour les sources de données. </br>- Bouton pour ajouter des fonts de carte customisés. </br>- Fonctionnalité de génération d'atlas. </p></br><p><h3>26/09/2024 - Version 1.0: </h3> - Lancement du plugin CenRa_AutoMap avec une seul mise en page. </p></br>
|
changelog=<h2>CenRa_AUTOMAP:</h2></br><p><h3>30/07/2025 - Version 2.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 2.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>11/04/2025 - Version 1.7: </h3> - Correctif d'orthographe.</p></br><p><h3>09/04/2025 - Version 1.6: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 1.5: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 1.4: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 1.3: </h3> - Fenêtre redimensionnable avec déplaçable avec la mollette sourit.</p></br><p><h3>25/02/2025 - Version 1.2: </h3> - DockWidget pour ouverture de couche avec theme.</p></br><p><h3>28/01/2025 - Version 1.1: </h3> - Multi-Composeur pris en charge.</p></br><p><h3>27/01/2025 - Version 1.0: </h3> - Version releases.</br> - Ajoute un message d'avertissement au moment d'écraser la mise en page.</br> - Ajoute prénom et nom dans la réalisation.</br> - Utilisation de Calibri.</p></br><p><h3>13/01/2025 - Version 0.1.10: </h3> - Correctif.</p></br><p><h3>07/01/2025 - Version 0.1.9: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>19/12/2024 - Version 0.1.8: </h3> - Nouvelle mise en page.</br> - Incrémentation automatique de nouveau modele de mise en page. </br> - Correctif de bug.</p></br><p><h3>21/10/2024 - Version 0.1.7: </h3> - Epurations du code.</p></br><p><h3>07/10/2024 - Version 0.1.6: </h3> - Option de bibliotheque de logo custome.</p></br><p><h3>03/10/2024 - Version 0.1.5: </h3> - Remonte la fênetre dans la pille.</br> - Gestion du nombre de colonne dans la légend.</br></p></br><p><h3>02/10/2024 - Version 0.1.4: </h3> - Mise en page plein écrant.</br></p></br><p><h3>01/10/2024 - Version 0.1.3: </h3> - Récupération du titre et sous-titre pour mise en page existente.</br> - Integration de bibliotheque de logo.</br> - Integration de gestionaire pour les source de donnée.</br> - Mise en place d'une bar d'echelle adaptative. </br></p></br><p><h3>30/09/2024 - Version 0.1.2: </h3> - Activation du thème. </br> - Ajouter une carte de suivie. </br><p></br><h3>27/09/2024 - Version 0.1.1: </h3> - Ajout d'une liste déroulante pour les sources de données. </br>- Bouton pour ajouter des fonts de carte customisés. </br>- Fonctionnalité de génération d'atlas. </p></br><p><h3>26/09/2024 - Version 0.1.0: </h3> - Lancement du plugin CenRa_AutoMap avec une seul mise en page. </p></br>
|
||||||
|
|
||||||
# Tags are comma separated with spaces allowed
|
# Tags are comma separated with spaces allowed
|
||||||
tags=python
|
tags=python
|
||||||
|
|||||||
@@ -0,0 +1,151 @@
|
|||||||
|
import logging
|
||||||
|
# from qgis.gui import *
|
||||||
|
|
||||||
|
from qgis.core import (
|
||||||
|
QgsDataSourceUri,
|
||||||
|
QgsProject,
|
||||||
|
QgsSettings,
|
||||||
|
QgsVectorLayer,
|
||||||
|
QgsMapThemeCollection,
|
||||||
|
)
|
||||||
|
from qgis.PyQt.QtCore import QSettings
|
||||||
|
from qgis.PyQt.QtGui import QIcon
|
||||||
|
from qgis.PyQt.QtWidgets import (
|
||||||
|
QDockWidget,
|
||||||
|
QInputDialog,
|
||||||
|
)
|
||||||
|
|
||||||
|
from qgis.PyQt.QtXml import QDomDocument
|
||||||
|
|
||||||
|
try:
|
||||||
|
Enabled = True
|
||||||
|
from .tools.StyleLayer import host, port, dbname, os_user
|
||||||
|
except ValueError:
|
||||||
|
Enabled = False
|
||||||
|
from .tools.resources import (
|
||||||
|
load_ui,
|
||||||
|
resources_path,
|
||||||
|
# send_issues,
|
||||||
|
)
|
||||||
|
# from .issues import CenRa_Issues
|
||||||
|
|
||||||
|
# from datetime import date
|
||||||
|
|
||||||
|
EDITOR_CLASS = load_ui('CenRa_AutoMapStyle_base.ui')
|
||||||
|
LOGGER = logging.getLogger('CenRa_AutoMapStyle')
|
||||||
|
|
||||||
|
|
||||||
|
class AutoMap_Style(QDockWidget, EDITOR_CLASS):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
_ = parent
|
||||||
|
super().__init__()
|
||||||
|
self.setupUi(self)
|
||||||
|
self.settings = QgsSettings()
|
||||||
|
self.s = QSettings()
|
||||||
|
|
||||||
|
self.toolButton.setIcon(QIcon(resources_path('icons', 'loader.png')))
|
||||||
|
|
||||||
|
self.loadComboBox()
|
||||||
|
self.toolButton.clicked.connect(self.loadStyle)
|
||||||
|
|
||||||
|
def loadComboBox(self):
|
||||||
|
style = self.comboBox
|
||||||
|
style.clear()
|
||||||
|
style.addItem('')
|
||||||
|
style.addItem('Foncier')
|
||||||
|
style.addItem('Administratif')
|
||||||
|
|
||||||
|
def loadStyle(self):
|
||||||
|
style = self.comboBox.currentText()
|
||||||
|
if style == 'Foncier':
|
||||||
|
self.loadFoncier()
|
||||||
|
if style == 'Administratif':
|
||||||
|
self.loadAdministratif()
|
||||||
|
|
||||||
|
def loginfo(self):
|
||||||
|
InputDialog = QInputDialog()
|
||||||
|
mdp = InputDialog.getText(None, 'Foncier', 'Mot de pass base foncier:')
|
||||||
|
return mdp
|
||||||
|
|
||||||
|
def loadAdministratif(self):
|
||||||
|
mtc = QgsProject.instance().mapThemeCollection()
|
||||||
|
theme_name = 'Administratif'
|
||||||
|
theme_state = mtc.mapThemeState(theme_name)
|
||||||
|
|
||||||
|
mdp = self.loginfo()[0]
|
||||||
|
if mdp != '':
|
||||||
|
# couche = [['_form_power_rename','_form_power_rename_contour_2025'],['_42_bois_du_roy','_42_bois_du_roy_habitat_2021']]
|
||||||
|
couche = [['administratif', 'departements2024', 'gid'], ['administratif', 'v_communes', 'id']]
|
||||||
|
for schema_table in couche:
|
||||||
|
schema = schema_table[0]
|
||||||
|
table = schema_table[1]
|
||||||
|
key = schema_table[2]
|
||||||
|
uri = QgsDataSourceUri()
|
||||||
|
uri.setConnection(host, port, dbname, os_user, mdp)
|
||||||
|
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
|
||||||
|
uri.setDataSource(schema, table, "geom")
|
||||||
|
uri.setKeyColumn(key)
|
||||||
|
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
||||||
|
if layer.isValid() is True:
|
||||||
|
layerName = layer.name()
|
||||||
|
listStyle = layer.listStylesInDatabase()
|
||||||
|
try:
|
||||||
|
StyleExist = True
|
||||||
|
indexStyle = (listStyle[2].index(layerName))
|
||||||
|
except ValueError:
|
||||||
|
StyleExist = False
|
||||||
|
if StyleExist:
|
||||||
|
StyleId = (listStyle[1][indexStyle])
|
||||||
|
styleTuple = layer.getStyleFromDatabase(StyleId)
|
||||||
|
styleqml = styleTuple[0]
|
||||||
|
styledoc = QDomDocument()
|
||||||
|
styledoc.setContent(styleqml)
|
||||||
|
layer.importNamedStyle(styledoc)
|
||||||
|
|
||||||
|
# Ajout de la couche au canevas QGIS
|
||||||
|
QgsProject.instance().addMapLayer(layer)
|
||||||
|
|
||||||
|
layer_record = QgsMapThemeCollection.MapThemeLayerRecord(layer)
|
||||||
|
theme_state.addLayerRecord(layer_record)
|
||||||
|
mtc.insert(theme_name, theme_state)
|
||||||
|
|
||||||
|
def loadFoncier(self):
|
||||||
|
mtc = QgsProject.instance().mapThemeCollection()
|
||||||
|
theme_name = 'Foncier'
|
||||||
|
theme_state = mtc.mapThemeState(theme_name)
|
||||||
|
|
||||||
|
mdp = self.loginfo()[0]
|
||||||
|
if mdp != '':
|
||||||
|
# couche = [['_form_power_rename','_form_power_rename_contour_2025'],['_42_bois_du_roy','_42_bois_du_roy_habitat_2021']]
|
||||||
|
couche = [['sites', 'v_sites_parcelles'], ['sites', 'v_sites'], ['inventaires', 'suivi_zh'], ['inventaires', 'suivi_ps']]
|
||||||
|
for schema_table in couche:
|
||||||
|
schema = schema_table[0]
|
||||||
|
table = schema_table[1]
|
||||||
|
uri = QgsDataSourceUri()
|
||||||
|
uri.setConnection(host, port, dbname, os_user, mdp)
|
||||||
|
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
|
||||||
|
uri.setDataSource(schema, table, "geom")
|
||||||
|
uri.setKeyColumn('gid')
|
||||||
|
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
||||||
|
if layer.isValid() is True:
|
||||||
|
layerName = layer.name()
|
||||||
|
listStyle = layer.listStylesInDatabase()
|
||||||
|
try:
|
||||||
|
StyleExist = True
|
||||||
|
indexStyle = (listStyle[2].index(layerName))
|
||||||
|
except ValueError:
|
||||||
|
StyleExist = False
|
||||||
|
if StyleExist:
|
||||||
|
StyleId = (listStyle[1][indexStyle])
|
||||||
|
styleTuple = layer.getStyleFromDatabase(StyleId)
|
||||||
|
styleqml = styleTuple[0]
|
||||||
|
styledoc = QDomDocument()
|
||||||
|
styledoc.setContent(styleqml)
|
||||||
|
layer.importNamedStyle(styledoc)
|
||||||
|
|
||||||
|
# Ajout de la couche au canevas QGIS
|
||||||
|
QgsProject.instance().addMapLayer(layer)
|
||||||
|
|
||||||
|
layer_record = QgsMapThemeCollection.MapThemeLayerRecord(layer)
|
||||||
|
theme_state.addLayerRecord(layer_record)
|
||||||
|
mtc.insert(theme_name, theme_state)
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import sys
|
|
||||||
import socket
|
|
||||||
import os
|
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
|
||||||
#print(IPAddr)
|
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
|
||||||
host = "100.100.100.81"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig4269"
|
|
||||||
sigdb="sig4269"
|
|
||||||
refdb="ref_geo4269"
|
|
||||||
password = "McVities"
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
host = "192.168.0.201"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig01"
|
|
||||||
sigdb="sig01"
|
|
||||||
refdb="ref_geo01"
|
|
||||||
password = "McVities"
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
host = "192.168.1.201"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig0726"
|
|
||||||
sigdb="sig0726"
|
|
||||||
refdb="ref_geo0726"
|
|
||||||
password = "McVities"
|
|
||||||
if sys.platform == 'linux':
|
|
||||||
os_user = os.environ['USER']
|
|
||||||
else:
|
|
||||||
os_user = os.environ['USERNAME']
|
|
||||||
if os_user == 'STAGE':
|
|
||||||
os_user='stage'
|
|
||||||
if os_user == 'Administrateur':
|
|
||||||
os_user='stage'
|
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -15,154 +15,154 @@ def fletch_canvas(self):
|
|||||||
|
|
||||||
if page_rotate == 'Portrait':
|
if page_rotate == 'Portrait':
|
||||||
if values_page == 'A4':
|
if values_page == 'A4':
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_size'] = QgsLayoutSize(198.85714285714286,175, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(199, 175, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_rotate'] = 0.0
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50.0,50, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(5, 25, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_rotate'] = 0.0
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_size'] = QgsLayoutSize(198.85714285714286,90, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 205, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(55, 5, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_rotate'] = 0.0
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(145, 228, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(12.0,12, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(191, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(145, 215, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_rotate'] = 0.0
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(12, 12, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854,5, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(193, 214, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(145, 229, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_rotate'] = 0.0
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 125, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_size'] = QgsLayoutSize(46.0,16, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 201, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
|
||||||
self.template_parameters['Credit_rotate'] = 270
|
|
||||||
self.template_parameters['Source_rotate'] = 0
|
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
|
||||||
if values_page == 'A3':
|
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(50, 50, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(2.5, 20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(285, 260, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_rotate'] = 0.0
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 395, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_size'] = QgsLayoutSize(198.85714285714286,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 284, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_rotate'] = 0.0
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(50, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(207, 310, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(205, 158.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(50, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_rotate'] = 270.0
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(207, 298, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 200, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(273, 297, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_rotate'] = 0.0
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(198.85714285714286,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_rotate'] = 0.0
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(189, 284, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(54.857142857142854,15, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(145, 215, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
self.template_parameters['Echelle_2_rotate'] = 0.0
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50.0,20, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
self.template_parameters['Logo_2_rotate'] = 0.0
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
if values_page == 'A3':
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
self.template_parameters['Carte_size'] = QgsLayoutSize(280,247, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_rotate'] = 270
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_rotate'] = 0
|
self.template_parameters['Carte_rotate'] = 0.0
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(70,70, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(7, 35, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
self.template_parameters['Carte_2_rotate'] = 0.0
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(280,127, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(7, 289, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 0.0
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(17,17, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(269, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 0.0
|
||||||
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(77,7, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(205, 323, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 0.0
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(65,23, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 0.0
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(280,11, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 0.0
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(289, 223, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 270.0
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 282, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 0.0
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(280,11, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 0.0
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(77,21, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(205, 303, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 0.0
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(70,28, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(7, 388, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 0.0
|
||||||
|
|
||||||
if page_rotate == 'Landscape':
|
if page_rotate == 'Landscape':
|
||||||
if values_page == 'A4':
|
if values_page == 'A4':
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(285, 145, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_size'] = QgsLayoutSize(285.14285714285717,145, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_rotate'] = 0.0
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100.0,100, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_rotate'] = 0.0
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_size'] = QgsLayoutSize(285.14285714285717,41, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(6, 168, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_rotate'] = 0.0
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(13.142857142857142,12, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(277, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 0.0
|
||||||
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(54.857142857142854,15, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(232, 193, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 0.0
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(46.0,16, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_rotate'] = 0.0
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 185, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_size'] = QgsLayoutSize(286.0,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 168, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_rotate'] = 0.0
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(207, 193, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(291, 127.0, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_rotate'] = 270.0
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(207, 180, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_size'] = QgsLayoutSize(100.0,4, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(189, 169, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(273, 182, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Source_rotate'] = 0.0
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(286.0,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(291.5, 123, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 12, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_rotate'] = 0.0
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(189, 168.5, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(54.857142857142854,15, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(232, 179, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
self.template_parameters['Echelle_2_rotate'] = 0.0
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50.0,50, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(6, 118, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
self.template_parameters['Logo_2_rotate'] = 0.0
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
|
||||||
self.template_parameters['Credit_rotate'] = 270
|
|
||||||
self.template_parameters['Source_rotate'] = 0
|
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
|
||||||
if values_page == 'A3':
|
if values_page == 'A3':
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(408.5, 222, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_size'] = QgsLayoutSize(402,205, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(5, 23.5, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_rotate'] = 0.0
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(141,141, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(409, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(8, 32, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_rotate'] = 0.0
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(409, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_size'] = QgsLayoutSize(402,58, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(8, 237, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(46, 16, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_rotate'] = 0.0
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 4, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(19,17, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(391, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Arrow_rotate'] = 0.0
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(77,21, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(5, 249, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(327, 272, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Echelle_rotate'] = 0.0
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(323, 282, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_size'] = QgsLayoutSize(65,23, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55, 15, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(323, 270, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_rotate'] = 0.0
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(8.4, 12.5, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_size'] = QgsLayoutSize(403,11, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(402, 270, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(7, 6, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Titre_rotate'] = 0.0
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(415, 123, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(100, 3.9, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(410, 179, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(313, 247, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Credit_rotate'] = 270.0
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
self.template_parameters['Source_size'] = QgsLayoutSize(141,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(267, 238, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
self.template_parameters['Source_rotate'] = 0.0
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(403,11, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(7, 17, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
self.template_parameters['Sous_titre_rotate'] = 0.0
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(77,21, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Credit_rotate'] = 270
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(327, 252, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Source_rotate'] = 0
|
self.template_parameters['Echelle_2_rotate'] = 0.0
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(70,70, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(8, 166, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
self.template_parameters['Logo_2_rotate'] = 0.0
|
||||||
|
|
||||||
return self.template_parameters
|
return self.template_parameters
|
||||||
@@ -1,167 +0,0 @@
|
|||||||
|
|
||||||
from qgis.core import (
|
|
||||||
QgsLayoutSize,
|
|
||||||
QgsUnitTypes,
|
|
||||||
QgsLayoutPoint,
|
|
||||||
)
|
|
||||||
def fletch_canvas(self):
|
|
||||||
if self.radioButton_6.isChecked():
|
|
||||||
values_page = 'A4'
|
|
||||||
else:
|
|
||||||
values_page = 'A3'
|
|
||||||
if self.radioButton_7.isChecked():
|
|
||||||
page_rotate = 'Portrait'
|
|
||||||
else:
|
|
||||||
page_rotate = 'Landscape'
|
|
||||||
|
|
||||||
if page_rotate == 'Portrait':
|
|
||||||
if values_page == 'A4':
|
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(200.0,200, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 6, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(80.0,80, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(126, 210, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(86.0,86, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(6, 208, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(189, 20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(51.42857142857143,7, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(9, 197, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(45.714285714285715,11, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 3, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(154.28571428571428,11, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(51, 3, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(151, 210, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_rotate'] = 0
|
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(229, 197, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_rotate'] = 0
|
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(125.71428571428571,14, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(60, 20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(51.42857142857143,13, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(9, 184, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(28.571428571428573,29, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(9, 151, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
|
||||||
if values_page == 'A3':
|
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(282,282, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(113,113, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(178, 296, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(121,121, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(8, 293, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(267, 28, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(73,10, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(13, 278, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(64,16, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 4, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(218,16, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(72, 4, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(213, 296, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_rotate'] = 0
|
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(323, 278, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_rotate'] = 0
|
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(177,20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(85, 28, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(73,18, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(13, 259, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40,40, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(13, 213, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
|
||||||
if page_rotate == 'Landscape':
|
|
||||||
if values_page == 'A4':
|
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(200.0,200, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(6, 6, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(85.71428571428571,69, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(209, 3, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(85.71428571428571,131, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(209, 74, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(189, 20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(51.42857142857143,7, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(9, 197, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(45.714285714285715,11, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 3, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(154.28571428571428,11, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(51, 3, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(151, 197, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_rotate'] = 0
|
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(51.42857142857143,6, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(229, 197, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_rotate'] = 0
|
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(125.71428571428571,14, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(60, 20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(51.42857142857143,13, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(9, 184, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(28.571428571428573,29, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(9, 151, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
|
||||||
if values_page == 'A3':
|
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(282,282, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_locals'] = QgsLayoutPoint(8, 8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_rotate'] = 0
|
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(121,97, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(294, 4, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Carte_2_rotate'] = 0
|
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(121,185, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_locals'] = QgsLayoutPoint(294, 105, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Legande_rotate'] = 0
|
|
||||||
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(266, 28, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Arrow_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_size'] = QgsLayoutSize(73,10, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(12, 278, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(64,16, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 4, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_rotate'] = 0
|
|
||||||
self.template_parameters['Titre_size'] = QgsLayoutSize(218,16, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_locals'] = QgsLayoutPoint(73, 4, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Titre_rotate'] = 0
|
|
||||||
self.template_parameters['Credit_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_locals'] = QgsLayoutPoint(214, 278, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Credit_rotate'] = 0
|
|
||||||
self.template_parameters['Source_size'] = QgsLayoutSize(73,8, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_locals'] = QgsLayoutPoint(322, 278, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Source_rotate'] = 0
|
|
||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(177,20, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(85, 28, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
|
||||||
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(73,18, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(12, 260, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(40,40, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(12, 214, QgsUnitTypes.LayoutMillimeters)
|
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
|
||||||
return self.template_parameters
|
|
||||||
@@ -25,7 +25,7 @@ def fletch_canvas(self):
|
|||||||
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(200, 8, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(5, 10, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_size'] = QgsLayoutSize(48, 17, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_position'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(5, 2, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(50, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(5, 275, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Legande_size'] = QgsLayoutSize(405, 203, QgsUnitTypes.LayoutMillimeters)
|
||||||
@@ -91,7 +91,7 @@ def fletch_canvas(self):
|
|||||||
self.template_parameters['Logo_2_rotate'] = 0
|
self.template_parameters['Logo_2_rotate'] = 0
|
||||||
|
|
||||||
if page_rotate == 'Landscape':
|
if page_rotate == 'Landscape':
|
||||||
if values_page == 'A4':
|
if values_page == 'A3':
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(420, 297, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_size'] = QgsLayoutSize(420, 297, QgsUnitTypes.LayoutMillimeters)
|
||||||
@@ -128,7 +128,7 @@ def fletch_canvas(self):
|
|||||||
self.template_parameters['Sous_titre_rotate'] = 0
|
self.template_parameters['Sous_titre_rotate'] = 0
|
||||||
self.template_parameters['Echelle_2_rotate'] = 0
|
self.template_parameters['Echelle_2_rotate'] = 0
|
||||||
self.template_parameters['Logo_2_rotate'] = 0
|
self.template_parameters['Logo_2_rotate'] = 0
|
||||||
if values_page == 'A3':
|
if values_page == 'A4':
|
||||||
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(100, 100, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(6, 23, QgsUnitTypes.LayoutMillimeters)
|
||||||
self.template_parameters['Carte_size'] = QgsLayoutSize(297, 210, QgsUnitTypes.LayoutMillimeters)
|
self.template_parameters['Carte_size'] = QgsLayoutSize(297, 210, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
|
||||||
|
from qgis.core import (
|
||||||
|
QgsLayoutSize,
|
||||||
|
QgsUnitTypes,
|
||||||
|
QgsLayoutPoint,
|
||||||
|
)
|
||||||
|
def fletch_canvas(self):
|
||||||
|
if self.radioButton_6.isChecked():
|
||||||
|
values_page = 'A4'
|
||||||
|
else:
|
||||||
|
values_page = 'A3'
|
||||||
|
if self.radioButton_7.isChecked():
|
||||||
|
page_rotate = 'Portrait'
|
||||||
|
else:
|
||||||
|
page_rotate = 'Landscape'
|
||||||
|
|
||||||
|
if page_rotate == 'Portrait':
|
||||||
|
if values_page == 'A4':
|
||||||
|
self.template_parameters['Carte_size'] = QgsLayoutSize(168.0,262, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(41, 1, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 0
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(78.85714285714286,70, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(130, 1, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 0
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(168.0,32, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(41, 264, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 0
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(13, 254, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(38.857142857142854,7, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(1, 289, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(34.857142857142854,10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 139, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 0
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(38.857142857142854,11, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(1, 3, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 0
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(74.85714285714286,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(43, 3, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(104.0,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(104, 256, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 0
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(38.857142857142854,14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(1, 14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(38.857142857142854,13, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(1, 276, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0,30, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 233, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 0
|
||||||
|
if values_page == 'A3':
|
||||||
|
self.template_parameters['Carte_size'] = QgsLayoutSize(237,369, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 0
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(111,99, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(183, 2, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 0
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(237,45, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(58, 372, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 0
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(19, 358, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(55,10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(2, 408, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(49,14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 196, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 0
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(55,15, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 0
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(106,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(60, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(147,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(147, 361, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 0
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(55,20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55,19, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(2, 389, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(42,42, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 329, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 0
|
||||||
|
if page_rotate == 'Landscape':
|
||||||
|
if values_page == 'A4':
|
||||||
|
self.template_parameters['Carte_size'] = QgsLayoutSize(254.85714285714286,175, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(41, 1, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 0
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(78.85714285714286,70, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(217, 1, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 0
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(254.85714285714286,32, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(41, 177, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 0
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(14.285714285714286,14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(13, 168, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(38.857142857142854,7, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(1, 202, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(34.857142857142854,10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(3, 94, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 0
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(38.857142857142854,11, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(1, 3, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 0
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(74.85714285714286,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(43, 3, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(104.0,6, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(190, 169, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 0
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(38.857142857142854,14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(1, 14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(38.857142857142854,13, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(1, 189, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(30.0,30, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(41, 146, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 0
|
||||||
|
if values_page == 'A3':
|
||||||
|
self.template_parameters['Carte_size'] = QgsLayoutSize(359,247, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_locals'] = QgsLayoutPoint(58, 2, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_rotate'] = 0
|
||||||
|
self.template_parameters['Carte_2_size'] = QgsLayoutSize(111,99, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_locals'] = QgsLayoutPoint(306, 2, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Carte_2_rotate'] = 0
|
||||||
|
self.template_parameters['Legande_size'] = QgsLayoutSize(359,45, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_locals'] = QgsLayoutPoint(58, 250, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Legande_rotate'] = 0
|
||||||
|
self.template_parameters['Arrow_size'] = QgsLayoutSize(20,20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_locals'] = QgsLayoutPoint(19, 237, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Arrow_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_size'] = QgsLayoutSize(55,10, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_locals'] = QgsLayoutPoint(2, 285, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_size'] = QgsLayoutSize(49,14, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_locals'] = QgsLayoutPoint(4, 133, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_rotate'] = 0
|
||||||
|
self.template_parameters['Titre_size'] = QgsLayoutSize(55,15, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_locals'] = QgsLayoutPoint(2, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Titre_rotate'] = 0
|
||||||
|
self.template_parameters['Credit_size'] = QgsLayoutSize(106,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_locals'] = QgsLayoutPoint(60, 4, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Credit_rotate'] = 0
|
||||||
|
self.template_parameters['Source_size'] = QgsLayoutSize(147,8, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_locals'] = QgsLayoutPoint(268, 238, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Source_rotate'] = 0
|
||||||
|
self.template_parameters['Sous_titre_size'] = QgsLayoutSize(55,20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_locals'] = QgsLayoutPoint(2, 20, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Sous_titre_rotate'] = 0
|
||||||
|
self.template_parameters['Echelle_2_size'] = QgsLayoutSize(55,19, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_locals'] = QgsLayoutPoint(2, 267, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Echelle_2_rotate'] = 0
|
||||||
|
self.template_parameters['Logo_2_size'] = QgsLayoutSize(42,42, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_locals'] = QgsLayoutPoint(58, 206, QgsUnitTypes.LayoutMillimeters)
|
||||||
|
self.template_parameters['Logo_2_rotate'] = 0
|
||||||
|
return self.template_parameters
|
||||||
@@ -4,6 +4,7 @@ import configparser
|
|||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import base64
|
import base64
|
||||||
|
import os
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
from os.path import abspath, join, pardir, dirname
|
from os.path import abspath, join, pardir, dirname
|
||||||
@@ -107,25 +108,15 @@ def load_ui(*args):
|
|||||||
|
|
||||||
return ui_class
|
return ui_class
|
||||||
|
|
||||||
def login_base(take=None):
|
def pyperclip():
|
||||||
from CenRa_METABASE.tools.PythonSQL import host,port,dbname,password,os_user
|
dst = dirname(dirname(__file__))+"\\tools\\"
|
||||||
first_conn = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=first_cnx password=" + password)
|
if os.access('N:/',os.R_OK):
|
||||||
first_cur = first_conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/StyleLayer.py'
|
||||||
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 + "')")
|
try:
|
||||||
res_ident = first_cur.fetchone()
|
shutil.copy(src, dst)
|
||||||
|
except:
|
||||||
|
print('404')
|
||||||
|
|
||||||
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()
|
|
||||||
|
|
||||||
if take:
|
|
||||||
return cur,con
|
|
||||||
else:
|
|
||||||
return cur
|
|
||||||
def send_issues(url,titre,body,labels):
|
def send_issues(url,titre,body,labels):
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
@@ -158,7 +149,7 @@ def maj_verif(NAME):
|
|||||||
|
|
||||||
url = qgis.utils.pluginMetadata(NAME,'repository')
|
url = qgis.utils.pluginMetadata(NAME,'repository')
|
||||||
#URL = url+'/raw/branch/main/plugins.xml'
|
#URL = url+'/raw/branch/main/plugins.xml'
|
||||||
URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/releases/plugins.xml'
|
URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/plugins.xml'
|
||||||
# print(URL)
|
# print(URL)
|
||||||
version = qgis.utils.pluginMetadata(NAME,'version')
|
version = qgis.utils.pluginMetadata(NAME,'version')
|
||||||
len_version = len(version)
|
len_version = len(version)
|
||||||
@@ -168,12 +159,15 @@ def maj_verif(NAME):
|
|||||||
except:
|
except:
|
||||||
binar = False
|
binar = False
|
||||||
if binar:
|
if binar:
|
||||||
|
try:
|
||||||
version_web = str(urllib.request.urlopen(URL).read())
|
version_web = str(urllib.request.urlopen(URL).read())
|
||||||
plugin_num = version_web.find(NAME)
|
plugin_num = version_web.find(NAME)
|
||||||
valeur_version_web = version_web.find('<version>',plugin_num)+9
|
valeur_version_web = version_web.find('<version>',plugin_num)+9
|
||||||
version_plugin = version_web[valeur_version_web:valeur_version_web+len_version]
|
version_plugin = version_web[valeur_version_web:valeur_version_web+len_version]
|
||||||
if version_plugin != version:
|
if version_plugin != version:
|
||||||
iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30)
|
iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30)
|
||||||
|
except:
|
||||||
|
print("error gitea version ssl")
|
||||||
else:
|
else:
|
||||||
iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30)
|
iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CenRa_AutoMapStyle</class>
|
||||||
|
<widget class="QDockWidget" name="CenRa_AutoMapStyle">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>48</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="floating">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="features">
|
||||||
|
<set>QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable</set>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>CenRa_AutoMap</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Style:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QToolButton" name="toolButton">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>CenRa_Metabase_editorwidget_base</class>
|
|
||||||
<widget class="QDialog" name="CenRa_Metabase_editorwidget_base">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>471</width>
|
|
||||||
<height>594</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Metabase</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>../../CenRa_Metabase/tools/ui/icon.svg</normaloff>../../CenRa_Metabase/tools/ui/icon.svg</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="mouseTracking">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>453</width>
|
|
||||||
<height>547</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>451</width>
|
|
||||||
<height>541</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>DevLog</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWebView" name="viewer" native="true">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>431</width>
|
|
||||||
<height>511</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="url" stdset="0">
|
|
||||||
<url>
|
|
||||||
<string>about:blank</string>
|
|
||||||
</url>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>QWebView</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header location="global">QtWebKitWidgets/QWebView</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1150</width>
|
<width>1144</width>
|
||||||
<height>778</height>
|
<height>765</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -51,26 +51,76 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Liste de templates existants</string>
|
<string>Liste de templates existants</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QGroupBox" name="groupBox_6">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>680</x>
|
<x>920</x>
|
||||||
<y>350</y>
|
<y>10</y>
|
||||||
<width>141</width>
|
<width>211</width>
|
||||||
<height>41</height>
|
<height>71</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="text">
|
||||||
<string notr="true">QGroupBox#groupBox_6{background-color: rgb(255, 255, 255, 170);}</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QCommandLinkButton" name="commandLinkButton">
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QScrollBar" name="verticalScrollBar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>1120</x>
|
||||||
|
<y>9</y>
|
||||||
|
<width>20</width>
|
||||||
|
<height>741</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-500</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="invertedAppearance">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="frame">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
|
<width>1141</width>
|
||||||
|
<height>761</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>950</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>111</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QGroupBox#groupBox_2{background-color: rgb(255, 255, 255, 170);}</string>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<widget class="QCommandLinkButton" name="commandLinkButton_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>60</y>
|
||||||
<width>141</width>
|
<width>141</width>
|
||||||
<height>41</height>
|
<height>41</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -85,7 +135,32 @@
|
|||||||
<string notr="true">background-color: qconicalgradient(cx:0, cy:0, angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69), stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208), stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130), stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625 rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));</string>
|
<string notr="true">background-color: qconicalgradient(cx:0, cy:0, angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69), stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208), stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130), stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625 rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string> Mise en page</string>
|
<string>OpenStreetMap</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCommandLinkButton" name="commandLinkButton_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>141</width>
|
||||||
|
<height>41</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Segoe UI</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qconicalgradient(cx:0, cy:0, angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69), stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208), stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130), stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625 rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string> Ortho</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -93,9 +168,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>20</x>
|
<x>20</x>
|
||||||
<y>70</y>
|
<y>50</y>
|
||||||
<width>391</width>
|
<width>391</width>
|
||||||
<height>611</height>
|
<height>631</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -114,9 +189,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>10</y>
|
<y>20</y>
|
||||||
<width>311</width>
|
<width>251</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -186,9 +261,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>170</y>
|
<y>180</y>
|
||||||
<width>311</width>
|
<width>91</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -234,9 +309,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>260</y>
|
<y>270</y>
|
||||||
<width>311</width>
|
<width>111</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -257,9 +332,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>350</y>
|
<y>360</y>
|
||||||
<width>311</width>
|
<width>111</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -305,7 +380,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>40</x>
|
||||||
<y>470</y>
|
<y>490</y>
|
||||||
<width>290</width>
|
<width>290</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -342,9 +417,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>440</y>
|
<y>470</y>
|
||||||
<width>311</width>
|
<width>161</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -485,7 +560,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>270</x>
|
<x>270</x>
|
||||||
<y>570</y>
|
<y>590</y>
|
||||||
<width>82</width>
|
<width>82</width>
|
||||||
<height>15</height>
|
<height>15</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -621,7 +696,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>40</x>
|
||||||
<y>530</y>
|
<y>550</y>
|
||||||
<width>310</width>
|
<width>310</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -658,9 +733,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>500</y>
|
<y>530</y>
|
||||||
<width>311</width>
|
<width>111</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -681,9 +756,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>340</x>
|
<x>340</x>
|
||||||
<y>470</y>
|
<y>490</y>
|
||||||
<width>42</width>
|
<width>42</width>
|
||||||
<height>22</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
@@ -697,7 +772,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>560</y>
|
<y>580</y>
|
||||||
<width>111</width>
|
<width>111</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -706,44 +781,76 @@
|
|||||||
<string>Custom Bibliotheque</string>
|
<string>Custom Bibliotheque</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<zorder>comboBox_7</zorder>
|
<widget class="QRadioButton" name="radioButton_14">
|
||||||
<zorder>mComboBox_3</zorder>
|
<property name="geometry">
|
||||||
<zorder>label_4</zorder>
|
<rect>
|
||||||
<zorder>comboBox</zorder>
|
<x>50</x>
|
||||||
<zorder>lineEdit_2</zorder>
|
<y>440</y>
|
||||||
<zorder>label_6</zorder>
|
<width>121</width>
|
||||||
<zorder>lineEdit_3</zorder>
|
<height>21</height>
|
||||||
<zorder>label_7</zorder>
|
</rect>
|
||||||
<zorder>label_8</zorder>
|
</property>
|
||||||
<zorder>lineEdit_4</zorder>
|
<property name="font">
|
||||||
<zorder>mComboBox_2</zorder>
|
<font>
|
||||||
|
<pointsize>7</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Prénom Nom</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_5">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>140</x>
|
||||||
|
<y>440</y>
|
||||||
|
<width>201</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="clearButtonEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<zorder>label_14</zorder>
|
<zorder>label_14</zorder>
|
||||||
|
<zorder>label_8</zorder>
|
||||||
|
<zorder>label_7</zorder>
|
||||||
|
<zorder>label_15</zorder>
|
||||||
|
<zorder>label_6</zorder>
|
||||||
|
<zorder>label_4</zorder>
|
||||||
|
<zorder>comboBox_7</zorder>
|
||||||
|
<zorder>comboBox</zorder>
|
||||||
<zorder>horizontalLayoutWidget</zorder>
|
<zorder>horizontalLayoutWidget</zorder>
|
||||||
<zorder>horizontalLayoutWidget_2</zorder>
|
<zorder>horizontalLayoutWidget_2</zorder>
|
||||||
<zorder>radioButton_9</zorder>
|
<zorder>radioButton_9</zorder>
|
||||||
<zorder>radioButton_10</zorder>
|
<zorder>radioButton_10</zorder>
|
||||||
<zorder>radioButton_11</zorder>
|
<zorder>radioButton_11</zorder>
|
||||||
<zorder>radioButton_13</zorder>
|
<zorder>radioButton_13</zorder>
|
||||||
<zorder>mComboBox_4</zorder>
|
|
||||||
<zorder>label_15</zorder>
|
|
||||||
<zorder>spinBox</zorder>
|
<zorder>spinBox</zorder>
|
||||||
<zorder>CustomeLogo</zorder>
|
<zorder>CustomeLogo</zorder>
|
||||||
</widget>
|
<zorder>mComboBox_3</zorder>
|
||||||
<widget class="QLabel" name="label_5">
|
<zorder>mComboBox_4</zorder>
|
||||||
<property name="geometry">
|
<zorder>mComboBox_2</zorder>
|
||||||
<rect>
|
<zorder>lineEdit_3</zorder>
|
||||||
<x>920</x>
|
<zorder>lineEdit_4</zorder>
|
||||||
<y>10</y>
|
<zorder>lineEdit_2</zorder>
|
||||||
<width>211</width>
|
<zorder>radioButton_14</zorder>
|
||||||
<height>71</height>
|
<zorder>lineEdit_5</zorder>
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@@ -788,9 +895,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>130</y>
|
<y>140</y>
|
||||||
<width>311</width>
|
<width>111</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -811,9 +918,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>70</y>
|
<y>80</y>
|
||||||
<width>311</width>
|
<width>121</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -882,9 +989,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>30</x>
|
||||||
<y>10</y>
|
<y>20</y>
|
||||||
<width>311</width>
|
<width>91</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -902,69 +1009,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>970</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>161</width>
|
|
||||||
<height>111</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QGroupBox#groupBox_2{background-color: rgb(255, 255, 255, 170);}</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<widget class="QCommandLinkButton" name="commandLinkButton_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>141</width>
|
|
||||||
<height>41</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Segoe UI</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: qconicalgradient(cx:0, cy:0, angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69), stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208), stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130), stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625 rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>OpenStreetMap</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QCommandLinkButton" name="commandLinkButton_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>141</width>
|
|
||||||
<height>41</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Segoe UI</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: qconicalgradient(cx:0, cy:0, angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69), stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208), stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130), stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625 rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string> Ortho</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
@@ -1008,9 +1052,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>20</y>
|
||||||
<width>311</width>
|
<width>91</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -1031,9 +1075,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>70</y>
|
<y>80</y>
|
||||||
<width>311</width>
|
<width>91</width>
|
||||||
<height>41</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -1093,12 +1137,48 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<zorder>groupBox</zorder>
|
<widget class="QGroupBox" name="groupBox_6">
|
||||||
<zorder>groupBox_6</zorder>
|
<property name="geometry">
|
||||||
<zorder>groupBox_7</zorder>
|
<rect>
|
||||||
|
<x>680</x>
|
||||||
|
<y>350</y>
|
||||||
|
<width>141</width>
|
||||||
|
<height>41</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QGroupBox#groupBox_6{background-color: rgb(255, 255, 255, 170);}</string>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<widget class="QCommandLinkButton" name="commandLinkButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>141</width>
|
||||||
|
<height>41</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Segoe UI</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: qconicalgradient(cx:0, cy:0, angle:135, stop:0 rgba(255, 255, 0, 69), stop:0.375 rgba(255, 255, 0, 69), stop:0.423533 rgba(251, 255, 0, 145), stop:0.45 rgba(247, 255, 0, 208), stop:0.477581 rgba(255, 244, 71, 130), stop:0.518717 rgba(255, 218, 71, 130), stop:0.55 rgba(255, 255, 0, 255), stop:0.57754 rgba(255, 203, 0, 130), stop:0.625 rgba(255, 255, 0, 69), stop:1 rgba(255, 255, 0, 69));</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string> Mise en page</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<zorder>frame</zorder>
|
||||||
<zorder>label_5</zorder>
|
<zorder>label_5</zorder>
|
||||||
<zorder>groupBox_2</zorder>
|
<zorder>verticalScrollBar</zorder>
|
||||||
<zorder>groupBox_3</zorder>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>FLUX</string>
|
<string>Journal des modifications</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@@ -29,9 +29,6 @@
|
|||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@@ -41,7 +38,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>453</width>
|
<width>453</width>
|
||||||
<height>547</height>
|
<height>570</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
@@ -56,7 +53,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>DevLog</string>
|
<string>DevLog</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWebView" name="viewer" native="true">
|
<widget class="QTextBrowser" name="viewer">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
@@ -65,11 +62,6 @@
|
|||||||
<height>511</height>
|
<height>511</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="url" stdset="0">
|
|
||||||
<url>
|
|
||||||
<string>about:blank</string>
|
|
||||||
</url>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -78,19 +70,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::NoButton</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>QWebView</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header location="global">QtWebKitWidgets/QWebView</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
@@ -4,25 +4,25 @@ __email__ = "info@3liz.org"
|
|||||||
|
|
||||||
|
|
||||||
from qgis.core import QgsApplication
|
from qgis.core import QgsApplication
|
||||||
from qgis.PyQt.QtCore import QCoreApplication, Qt, QTranslator, QUrl
|
from qgis.PyQt.QtCore import QSettings, QUrl
|
||||||
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
||||||
from qgis.PyQt.QtWidgets import QAction, QMessageBox
|
from qgis.PyQt.QtWidgets import QAction
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
import qgis
|
import qgis
|
||||||
|
|
||||||
|
|
||||||
#include <QSettings>
|
# include <QSettings>
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
from .about_form import AboutDialog
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
plugin_path,
|
# plugin_path,
|
||||||
|
pyperclip,
|
||||||
resources_path,
|
resources_path,
|
||||||
maj_verif,
|
maj_verif,
|
||||||
)
|
)
|
||||||
|
pyperclip()
|
||||||
from .copie_editor import Copie_Editor
|
from .copie_editor import Copie_Editor
|
||||||
from .about_form import CopieAboutDialog
|
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
|
||||||
|
|
||||||
class PgCopie:
|
class PgCopie:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -34,18 +34,18 @@ class PgCopie:
|
|||||||
self.dock_action = None
|
self.dock_action = None
|
||||||
self.help_action = None
|
self.help_action = None
|
||||||
plugin_dir = os.path.dirname(__file__)
|
plugin_dir = os.path.dirname(__file__)
|
||||||
end_find = plugin_dir.rfind('\\')+1
|
end_find = plugin_dir.rfind('\\') + 1
|
||||||
global NAME
|
global NAME
|
||||||
NAME = plugin_dir[end_find:]
|
NAME = plugin_dir[end_find:]
|
||||||
maj_verif(NAME)
|
maj_verif(NAME)
|
||||||
|
|
||||||
# Display About window on first use
|
# Display About window on first use
|
||||||
version = qgis.utils.pluginMetadata('CenRa_Copie','version')
|
version = qgis.utils.pluginMetadata('CenRa_COPIE', 'version')
|
||||||
s = QSettings()
|
s = QSettings()
|
||||||
versionUse = s.value("copie/version", 1, type=str)
|
versionUse = s.value("copie/version", 1, type=str)
|
||||||
if str(versionUse) != str(version) :
|
if str(versionUse) != str(version):
|
||||||
s.setValue("copie/version", str(version))
|
s.setValue("copie/version", str(version))
|
||||||
print(versionUse,version)
|
print(versionUse, version)
|
||||||
self.open_about_dialog()
|
self.open_about_dialog()
|
||||||
|
|
||||||
def initGui(self):
|
def initGui(self):
|
||||||
@@ -63,16 +63,21 @@ class PgCopie:
|
|||||||
if not self.action_editor:
|
if not self.action_editor:
|
||||||
self.action_editor = Copie_Editor()
|
self.action_editor = Copie_Editor()
|
||||||
|
|
||||||
self.copie_editor = QAction(icon, 'Copie',None)
|
self.copie_editor = QAction(icon, 'Copie', None)
|
||||||
self.toolBar.addAction(self.copie_editor)
|
self.toolBar.addAction(self.copie_editor)
|
||||||
self.copie_editor.triggered.connect(self.open_editor)
|
self.copie_editor.triggered.connect(self.open_editor)
|
||||||
|
self.copie_editor.setEnabled(False)
|
||||||
|
# IPAddr = socket.gethostbyname(socket.gethostname())
|
||||||
|
if os.access('N:/', os.R_OK):
|
||||||
|
self.copie_editor.setEnabled(True)
|
||||||
|
|
||||||
def open_about_dialog(self):
|
def open_about_dialog(self):
|
||||||
"""
|
"""
|
||||||
About dialog
|
About dialog
|
||||||
"""
|
"""
|
||||||
dialog = CopieAboutDialog(iface)
|
dialog = AboutDialog(iface)
|
||||||
dialog.exec_()
|
dialog.exec()
|
||||||
|
|
||||||
def open_help():
|
def open_help():
|
||||||
""" Open the online help. """
|
""" Open the online help. """
|
||||||
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
|
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
|
||||||
@@ -84,8 +89,7 @@ class PgCopie:
|
|||||||
def unload(self):
|
def unload(self):
|
||||||
""" Unload the plugin. """
|
""" Unload the plugin. """
|
||||||
if self.action_editor:
|
if self.action_editor:
|
||||||
iface.removePluginMenu('CenRa_Copie',self.copie_editor)
|
iface.removePluginMenu('CenRa_Copie', self.copie_editor)
|
||||||
|
|
||||||
|
|
||||||
if self.provider:
|
if self.provider:
|
||||||
QgsApplication.processingRegistry().removeProvider(self.provider)
|
QgsApplication.processingRegistry().removeProvider(self.provider)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import os.path
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from qgis.PyQt import uic
|
from qgis.PyQt import uic
|
||||||
from qgis.PyQt.QtGui import QPixmap
|
# from qgis.PyQt.QtGui import QPixmap
|
||||||
from qgis.PyQt.QtWidgets import QDialog
|
from qgis.PyQt.QtWidgets import QDialog
|
||||||
|
|
||||||
from .tools.resources import devlog
|
from .tools.resources import devlog
|
||||||
@@ -17,7 +17,7 @@ ABOUT_FORM_CLASS, _ = uic.loadUiType(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class CopieAboutDialog(QDialog, ABOUT_FORM_CLASS):
|
class AboutDialog(QDialog, ABOUT_FORM_CLASS):
|
||||||
|
|
||||||
""" About - Let the user display the about dialog. """
|
""" About - Let the user display the about dialog. """
|
||||||
|
|
||||||
|
|||||||
@@ -4,55 +4,55 @@ from __future__ import absolute_import
|
|||||||
# Import the PyQt and QGIS libraries
|
# Import the PyQt and QGIS libraries
|
||||||
from builtins import next
|
from builtins import next
|
||||||
from builtins import str
|
from builtins import str
|
||||||
from builtins import object
|
# from builtins import object
|
||||||
import qgis
|
# import qgis
|
||||||
from qgis.PyQt.QtCore import QSettings
|
from qgis.PyQt.QtCore import QSettings
|
||||||
from qgis.PyQt.QtWidgets import QAction, QMenu, QDialog
|
from qgis.PyQt.QtWidgets import QDialog, QMessageBox
|
||||||
from qgis.PyQt.QtGui import QIcon
|
from qgis.PyQt import QtGui
|
||||||
from PyQt5.QtCore import *
|
from qgis.core import QgsDataSourceUri, QgsSettings, QgsWkbTypes, Qgis
|
||||||
from PyQt5.QtGui import *
|
|
||||||
from PyQt5 import QtGui
|
try:
|
||||||
from qgis.core import *
|
from .tools.PythonSQL import login_base
|
||||||
from qgis.core import QgsDataSourceUri
|
except ValueError:
|
||||||
|
print('Pas de fichier PythonSQL')
|
||||||
|
|
||||||
from .tools.PythonSQL import *
|
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
load_ui,
|
load_ui,
|
||||||
resources_path,
|
resources_path,
|
||||||
login_base,
|
# send_issues,
|
||||||
send_issues,
|
|
||||||
)
|
)
|
||||||
from .issues import CenRa_Issues
|
# from .issues import CenRa_Issues
|
||||||
|
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
import os.path
|
# import os
|
||||||
import webbrowser, os
|
# import os.path
|
||||||
import psycopg2
|
# import webbrowser
|
||||||
import psycopg2.extras
|
# import psycopg2
|
||||||
import base64
|
# import psycopg2.extras
|
||||||
|
# import base64
|
||||||
|
|
||||||
EDITOR_CLASS = load_ui('CenRa_Copie_base.ui')
|
EDITOR_CLASS = load_ui('CenRa_Copie_base.ui')
|
||||||
|
|
||||||
class Copie_Editor(QDialog, EDITOR_CLASS):
|
|
||||||
|
|
||||||
|
class Copie_Editor(QDialog, EDITOR_CLASS):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
_ = parent
|
_ = parent
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.settings = QgsSettings()
|
self.settings = QgsSettings()
|
||||||
self.s = QSettings()
|
self.s = QSettings()
|
||||||
self.setWindowIcon(QtGui.QIcon(resources_path('icons','icon.png')))
|
self.setWindowIcon(QtGui.QIcon(resources_path('icons', 'icon.png')))
|
||||||
self.iface = iface
|
self.iface = iface
|
||||||
|
|
||||||
def raise_(self):
|
def raise_(self):
|
||||||
"""Run method that performs all the real work"""
|
"""Run method that performs all the real work"""
|
||||||
layer = self.iface.activeLayer()
|
layer = self.iface.activeLayer()
|
||||||
|
|
||||||
if layer == None :
|
if layer is None:
|
||||||
#self.iface.messageBar().pushMessage(u"Vous devez sélectionner une table !", level=QgsMessageBar.WARNING, duration=5)
|
# 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)
|
self.iface.messageBar().pushMessage("Ooops", u"Vous devez sélectionner une table !", level=Qgis.Warning, duration=5)
|
||||||
|
|
||||||
else :
|
else:
|
||||||
# Récupération des sources de la couche active
|
# Récupération des sources de la couche active
|
||||||
list_sources = layer.source().split(" ")
|
list_sources = layer.source().split(" ")
|
||||||
# dbname
|
# dbname
|
||||||
@@ -62,21 +62,20 @@ class Copie_Editor(QDialog, EDITOR_CLASS):
|
|||||||
# tablename
|
# tablename
|
||||||
source_tablename = [s for s in list_sources if "table" in s][0].split('"')[3]
|
source_tablename = [s for s in list_sources if "table" in s][0].split('"')[3]
|
||||||
|
|
||||||
|
account = login_base("account")
|
||||||
|
sigdb = account[5]
|
||||||
|
|
||||||
if source_db != sigdb:
|
if source_db != sigdb:
|
||||||
#self.iface.messageBar().pushMessage(u"Un référentiel ne peut être copié, utilisez les filtres !", level=QgsMessageBar.CRITICAL, duration=10)
|
# self.iface.messageBar().pushMessage(u"Un référentiel ne peut être copié, utilisez les filtres !", level=QgsMessageBar.CRITICAL, duration=10)
|
||||||
self.iface.messageBar().pushMessage("Ooops", u"Vous ne pouvez copier des couches que dans sigXX", level=Qgis.Critical, duration=5)
|
self.iface.messageBar().pushMessage("Ooops", u"Vous ne pouvez copier des couches que dans sigXX", level=Qgis.Critical, duration=5)
|
||||||
|
else:
|
||||||
else :
|
user = account[0]
|
||||||
|
mdp = account[1]
|
||||||
first_conn = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbname+" user=first_cnx password=" + password)
|
host = account[2]
|
||||||
first_cur = first_conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
port = account[3]
|
||||||
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 + "')")
|
dbname = account[4]
|
||||||
res_ident = first_cur.fetchone()
|
cur = account[7]
|
||||||
mdp = base64.b64decode(str(res_ident[0])).decode('utf-8')
|
con = account[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 de la liste des schemas de la base de donnees
|
# Creation de la liste des schemas de la base de donnees
|
||||||
SQL = """WITH list_schema AS (
|
SQL = """WITH list_schema AS (
|
||||||
@@ -95,35 +94,34 @@ class Copie_Editor(QDialog, EDITOR_CLASS):
|
|||||||
|
|
||||||
list_brut = str(next(cur))
|
list_brut = str(next(cur))
|
||||||
|
|
||||||
list = list_brut [2:-3]
|
list = list_brut[2:-3]
|
||||||
listItems = list.split(",")
|
listItems = list.split(",")
|
||||||
|
|
||||||
con.close()
|
con.close()
|
||||||
|
|
||||||
self.schema.clear()
|
self.schema.clear()
|
||||||
self.schema.addItems(listItems)
|
self.schema.addItems(listItems)
|
||||||
self.schema.setCurrentIndex(-1) # Pour ne pas commencer la liste au premier schema
|
# Pour ne pas commencer la liste au premier schema
|
||||||
|
self.schema.setCurrentIndex(-1)
|
||||||
|
|
||||||
|
# Affiche le nom de la table source
|
||||||
self.table_source.setText(source_schema + "." + source_tablename) # Affiche le nom de la table source
|
self.table_source.setText(source_schema + "." + source_tablename)
|
||||||
# show the dialog
|
# show the dialog
|
||||||
self.show()
|
self.show()
|
||||||
# Run the dialog event loop
|
# Run the dialog event loop
|
||||||
result = self.exec_()
|
result = self.exec()
|
||||||
# See if OK was pressed
|
# See if OK was pressed
|
||||||
if result:
|
if result:
|
||||||
#******************************debut script*********************************
|
# ******************************debut script*********************************
|
||||||
|
account = login_base("account")
|
||||||
|
user = account[0]
|
||||||
|
mdp = account[1]
|
||||||
|
host = account[2]
|
||||||
|
port = account[3]
|
||||||
|
dbname = account[4]
|
||||||
|
cur = account[7]
|
||||||
|
con = account[8]
|
||||||
|
|
||||||
|
|
||||||
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()
|
|
||||||
# Récupération de la couche active
|
# Récupération de la couche active
|
||||||
layer = self.iface.activeLayer()
|
layer = self.iface.activeLayer()
|
||||||
|
|
||||||
@@ -136,29 +134,28 @@ class Copie_Editor(QDialog, EDITOR_CLASS):
|
|||||||
# tablename
|
# tablename
|
||||||
source_tablename = [s for s in list_sources if "table" in s][0].split('"')[3]
|
source_tablename = [s for s in list_sources if "table" in s][0].split('"')[3]
|
||||||
|
|
||||||
if self.schema.currentIndex() == -1 :
|
if self.schema.currentIndex() == - 1:
|
||||||
QMessageBox.warning(None, "Oups :", "Veuillez choisir un dossier de destination.")
|
QMessageBox.warning(None, "Oups :", "Veuillez choisir un dossier de destination.")
|
||||||
return
|
return
|
||||||
|
|
||||||
schema = self.schema.currentText()
|
schema = self.schema.currentText()
|
||||||
|
|
||||||
if self.table_destination.text() == '' :
|
if self.table_destination.text() == '':
|
||||||
QMessageBox.warning(None, "Oups :", "Veuillez choisir un nom de destination.")
|
QMessageBox.warning(None, "Oups :", "Veuillez choisir un nom de destination.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.annee.text() == 'aaaa' or self.annee.text() == '':
|
if self.annee.text() == 'aaaa' or self.annee.text() == '':
|
||||||
tablename = schema + "_" + self.table_destination.text().lower()
|
tablename = schema + "_" + self.table_destination.text().lower()
|
||||||
else :
|
else:
|
||||||
tablename = schema + "_" + self.table_destination.text().lower() + "_" + self.annee.text()
|
tablename = schema + "_" + self.table_destination.text().lower() + "_" + self.annee.text()
|
||||||
|
|
||||||
tablename_qgis = tablename[1:] # Permet d'enlever le "_", ajouter a la premiere etape, dans qgis
|
tablename_qgis = tablename[1:] # Permet d'enlever le "_", ajouter a la premiere etape, dans qgis
|
||||||
|
|
||||||
if self.table_vide.isChecked() == 1 :
|
if self.table_vide.isChecked() == 1:
|
||||||
SQL_table = "CREATE TABLE " + schema + "." + tablename + " AS SELECT * FROM " + source_schema + "." + source_tablename + " LIMIT 0;"
|
SQL_table = "CREATE TABLE " + schema + "." + tablename + " AS SELECT * FROM " + source_schema + "." + source_tablename + " LIMIT 0;"
|
||||||
else :
|
else:
|
||||||
SQL_table = "CREATE TABLE " + schema + "." + tablename + " AS SELECT * FROM " + source_schema + "." + source_tablename
|
SQL_table = "CREATE TABLE " + schema + "." + tablename + " AS SELECT * FROM " + source_schema + "." + source_tablename
|
||||||
|
|
||||||
|
|
||||||
SQL_pkey = "ALTER TABLE " + schema + "." + tablename + " ADD CONSTRAINT " + tablename + "_pkey" + " PRIMARY KEY (gid)"
|
SQL_pkey = "ALTER TABLE " + schema + "." + tablename + " ADD CONSTRAINT " + tablename + "_pkey" + " PRIMARY KEY (gid)"
|
||||||
SQL_sequence_01 = "CREATE SEQUENCE " + schema + "." + tablename + "_gid_seq" + " INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;"
|
SQL_sequence_01 = "CREATE SEQUENCE " + schema + "." + tablename + "_gid_seq" + " INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;"
|
||||||
SQL_sequence_02 = "ALTER TABLE " + schema + "." + tablename + " ALTER COLUMN gid SET DEFAULT nextval(\'" + schema + "." + tablename + "_gid_seq\'::regclass);"
|
SQL_sequence_02 = "ALTER TABLE " + schema + "." + tablename + " ALTER COLUMN gid SET DEFAULT nextval(\'" + schema + "." + tablename + "_gid_seq\'::regclass);"
|
||||||
@@ -178,31 +175,38 @@ class Copie_Editor(QDialog, EDITOR_CLASS):
|
|||||||
cur.execute(SQL_sequence_03)
|
cur.execute(SQL_sequence_03)
|
||||||
cur.execute(SQL_sequence_04)
|
cur.execute(SQL_sequence_04)
|
||||||
|
|
||||||
if layer.wkbType() == QgsWkbTypes.PointGeometry :
|
RETURNE = "SELECT pg_get_serial_sequence('" + schema + "." + tablename + "','gid')"
|
||||||
|
cur.execute(RETURNE)
|
||||||
|
sequence_name = cur.fetchone()[0]
|
||||||
|
print(sequence_name)
|
||||||
|
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 " + sequence_name + " TO grp_qgis;"
|
||||||
|
cur.execute(SQL_GRANT_TABLE)
|
||||||
|
|
||||||
|
if layer.wkbType() == QgsWkbTypes.PointGeometry:
|
||||||
cur.execute(SQL_trigger_coordonnees)
|
cur.execute(SQL_trigger_coordonnees)
|
||||||
|
|
||||||
if layer.wkbType() == QgsWkbTypes.LineGeometry :
|
if layer.wkbType() == QgsWkbTypes.LineGeometry:
|
||||||
cur.execute(SQL_trigger_length_m)
|
cur.execute(SQL_trigger_length_m)
|
||||||
cur.execute(SQL_trigger_length_km)
|
cur.execute(SQL_trigger_length_km)
|
||||||
|
|
||||||
if layer.wkbType() == QgsWkbTypes.PolygonGeometry :
|
if layer.wkbType() == QgsWkbTypes.PolygonGeometry:
|
||||||
cur.execute(SQL_trigger_area_m2)
|
cur.execute(SQL_trigger_area_m2)
|
||||||
cur.execute(SQL_trigger_area_ha)
|
cur.execute(SQL_trigger_area_ha)
|
||||||
|
|
||||||
con.commit()
|
con.commit()
|
||||||
|
|
||||||
### Affichage de la table
|
# Affichage de la table
|
||||||
uri = QgsDataSourceUri()
|
uri = QgsDataSourceUri()
|
||||||
# set host name, port, database name, username and password
|
# set host name, port, database name, username and password
|
||||||
uri.setConnection(host ,port ,dbname ,user ,mdp)
|
uri.setConnection(host, port, dbname, user, mdp)
|
||||||
# set database schema, table name, geometry column and optionaly subset (WHERE clause)
|
# set database schema, table name, geometry column and optionaly subset (WHERE clause)
|
||||||
uri.setDataSource(schema, tablename, geom)
|
uri.setDataSource(schema, tablename, "geom")
|
||||||
|
|
||||||
layer = self.iface.addVectorLayer(uri.uri(), tablename_qgis, "postgres")
|
layer = self.iface.addVectorLayer(uri.uri(), tablename_qgis, "postgres")
|
||||||
|
|
||||||
con.commit()
|
con.commit()
|
||||||
con.close()
|
con.close()
|
||||||
|
|
||||||
#self.iface.messageBar().pushMessage("Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\"." , level=QgsMessageBar.INFO, duration=10)
|
# self.iface.messageBar().pushMessage("Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\"." , level=QgsMessageBar.INFO, duration=10)
|
||||||
self.iface.messageBar().pushMessage("Bravo!", "Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\".", level=Qgis.Success, duration=5)
|
self.iface.messageBar().pushMessage("Bravo!", "Table \"" + source_schema + "." + source_tablename + u"\" copiée dans \"" + schema + "." + tablename + "\".", level=Qgis.Info, duration=5)
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -9,8 +9,9 @@
|
|||||||
[general]
|
[general]
|
||||||
name=CenRA_COPIE
|
name=CenRA_COPIE
|
||||||
qgisMinimumVersion=3.0
|
qgisMinimumVersion=3.0
|
||||||
|
supportsQt6=True
|
||||||
description=Permet la copie d'une table dans une base PostGis
|
description=Permet la copie d'une table dans une base PostGis
|
||||||
version=2
|
version=3.1
|
||||||
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
||||||
email=si_besoin@cen-rhonealpes.fr
|
email=si_besoin@cen-rhonealpes.fr
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ email=si_besoin@cen-rhonealpes.fr
|
|||||||
# Recommended items:
|
# Recommended items:
|
||||||
|
|
||||||
# Uncomment the following line and add your changelog:
|
# Uncomment the following line and add your changelog:
|
||||||
changelog=<h2>CenRa_COPIE:</h2></br><p><h3>22/10/2024 - Version 2:</h3>- Refonte du code.</p></br><p><h3>13/09/2024 - Version 1.5:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
|
changelog=<h2>CenRa_COPIE:</h2></br><p><h3>30/07/2025 - Version 3.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>11/04/2025 - Version 2.5: </h3> - Correctif de bug.</p></br><p><h3>09/04/2025 - Version 2.4: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.3: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 2.2: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 2.1: </h3> - ByPass du certif ssl ci erreur.</br></p><p><h3>22/10/2024 - Version 2:</h3>- Refonte du code.</p></br><p><h3>13/09/2024 - Version 1.5:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
|
||||||
|
|
||||||
# Tags are comma separated with spaces allowed
|
# Tags are comma separated with spaces allowed
|
||||||
tags=cenra, database, table
|
tags=cenra, database, table
|
||||||
@@ -28,7 +29,7 @@ repository=https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS
|
|||||||
homepage=https://plateformesig.cenra-outils.org/
|
homepage=https://plateformesig.cenra-outils.org/
|
||||||
|
|
||||||
category=Plugins
|
category=Plugins
|
||||||
icon=cenra.png
|
icon=icon.png
|
||||||
# experimental flag
|
# experimental flag
|
||||||
experimental=True
|
experimental=True
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
import configparser
|
import configparser
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import base64
|
# import base64
|
||||||
import psycopg2
|
# import psycopg2
|
||||||
import psycopg2.extras
|
# import psycopg2.extras
|
||||||
|
import os
|
||||||
from os.path import abspath, join, pardir, dirname
|
from os.path import abspath, join, pardir, dirname
|
||||||
|
|
||||||
from qgis.PyQt import uic
|
from qgis.PyQt import uic
|
||||||
@@ -89,7 +90,7 @@ def resources_path(*args):
|
|||||||
:return: Absolute path to the resources folder.
|
:return: Absolute path to the resources folder.
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
path = abspath(abspath(join(plugin_path(), "CenRa_Copie\\tools")))
|
path = abspath(abspath(join(plugin_path(), "CenRa_COPIE\\tools")))
|
||||||
for item in args:
|
for item in args:
|
||||||
path = abspath(join(path, item))
|
path = abspath(join(path, item))
|
||||||
return path
|
return path
|
||||||
@@ -107,77 +108,77 @@ def load_ui(*args):
|
|||||||
|
|
||||||
return ui_class
|
return ui_class
|
||||||
|
|
||||||
def login_base(take=None):
|
|
||||||
from CenRa_Metabase.resources.PythonSQL import host,port,dbname,password,os_user
|
|
||||||
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)
|
def pyperclip():
|
||||||
|
dst = dirname(dirname(__file__)) + "\\tools\\"
|
||||||
|
if os.access('N:/', os.R_OK):
|
||||||
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/PythonSQL.py'
|
||||||
|
try:
|
||||||
|
shutil.copy(src, dst)
|
||||||
|
except FileNotFoundError:
|
||||||
|
print('404')
|
||||||
|
except UnboundLocalError:
|
||||||
|
print('404')
|
||||||
|
|
||||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
|
||||||
first_conn.close()
|
|
||||||
|
|
||||||
if take:
|
def send_issues(url, titre, body, labels):
|
||||||
return cur,con
|
|
||||||
else:
|
|
||||||
return cur
|
|
||||||
def send_issues(url,titre,body,labels):
|
|
||||||
import requests
|
import requests
|
||||||
|
import urllib.request
|
||||||
import json
|
import json
|
||||||
import os
|
# import os
|
||||||
import qgis
|
# import qgis
|
||||||
|
|
||||||
usr = os.environ['USERNAME']
|
# usr = os.environ['USERNAME']
|
||||||
token = '9d0a4e0bea561710e0728f161f7edf4e5201e112'
|
token = '9d0a4e0bea561710e0728f161f7edf4e5201e112'
|
||||||
url=url+'?token='+token
|
url = url + '?token=' + token
|
||||||
|
|
||||||
headers = {'Authorization': 'token ' + token,'accept': 'application/json','Content-Type': 'application/json'}
|
|
||||||
|
|
||||||
|
headers = {'Authorization': 'token ' + token, 'accept': 'application/json', 'Content-Type': 'application/json'}
|
||||||
|
|
||||||
payload = {'title': titre, 'body': body, 'labels': labels}
|
payload = {'title': titre, 'body': body, 'labels': labels}
|
||||||
try:
|
try:
|
||||||
urllib.request.urlopen('https://google.com')
|
urllib.request.urlopen('https://google.com')
|
||||||
binar = True
|
binar = True
|
||||||
except:
|
except ValueError:
|
||||||
binar = False
|
binar = False
|
||||||
r = ''
|
r = ''
|
||||||
if binar:
|
if binar:
|
||||||
r = requests.post(url, data=json.dumps(payload), headers=headers)
|
r = requests.post(url, data=json.dumps(payload), headers=headers)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
def maj_verif(NAME):
|
def maj_verif(NAME):
|
||||||
import qgis
|
import qgis
|
||||||
import urllib.request
|
import urllib.request
|
||||||
iface = qgis.utils.iface
|
iface = qgis.utils.iface
|
||||||
from qgis.core import Qgis
|
from qgis.core import Qgis
|
||||||
|
|
||||||
url = qgis.utils.pluginMetadata(NAME,'repository')
|
# url = qgis.utils.pluginMetadata(NAME, 'repository')
|
||||||
#URL = url+'/raw/branch/main/plugins.xml'
|
# URL = url+'/raw/branch/main/plugins.xml'
|
||||||
URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/releases/plugins.xml'
|
URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/plugins.xml'
|
||||||
# print(URL)
|
# print(URL)
|
||||||
version = qgis.utils.pluginMetadata(NAME,'version')
|
version = qgis.utils.pluginMetadata(NAME, 'version')
|
||||||
len_version = len(version)
|
len_version = len(version)
|
||||||
try:
|
try:
|
||||||
urllib.request.urlopen('https://google.com')
|
urllib.request.urlopen('https://google.com')
|
||||||
binar = True
|
binar = True
|
||||||
except:
|
except urllib.error.URLError:
|
||||||
binar = False
|
binar = False
|
||||||
if binar:
|
if binar:
|
||||||
|
try:
|
||||||
version_web = str(urllib.request.urlopen(URL).read())
|
version_web = str(urllib.request.urlopen(URL).read())
|
||||||
plugin_num = version_web.find(NAME)
|
plugin_num = version_web.find(NAME)
|
||||||
valeur_version_web = version_web.find('<version>',plugin_num)+9
|
valeur_version_web = version_web.find('<version>', plugin_num) + 9
|
||||||
version_plugin = version_web[valeur_version_web:valeur_version_web+len_version]
|
version_plugin = version_web[valeur_version_web:valeur_version_web + len_version]
|
||||||
if version_plugin != version:
|
if version_plugin != version:
|
||||||
iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30)
|
iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30)
|
||||||
|
except urllib.error.URLError:
|
||||||
|
print("error gitea version ssl")
|
||||||
else:
|
else:
|
||||||
iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30)
|
iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30)
|
||||||
|
|
||||||
|
|
||||||
def devlog(NAME):
|
def devlog(NAME):
|
||||||
import qgis
|
import qgis
|
||||||
devmaj = '<head><style>* {margin:0; padding:0; }</style></head>'
|
devmaj = '<head><style>* {margin:0; padding:0; }</style></head>'
|
||||||
devmaj = devmaj+qgis.utils.pluginMetadata(NAME,'changelog')
|
devmaj = devmaj + qgis.utils.pluginMetadata(NAME, 'changelog')
|
||||||
return devmaj
|
return devmaj
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Metabase</string>
|
<string>Journal des modifications</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@@ -29,9 +29,6 @@
|
|||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@@ -41,7 +38,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>453</width>
|
<width>453</width>
|
||||||
<height>547</height>
|
<height>570</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
@@ -56,7 +53,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>DevLog</string>
|
<string>DevLog</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWebView" name="viewer" native="true">
|
<widget class="QTextBrowser" name="viewer">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
@@ -65,11 +62,6 @@
|
|||||||
<height>511</height>
|
<height>511</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="url" stdset="0">
|
|
||||||
<url>
|
|
||||||
<string>about:blank</string>
|
|
||||||
</url>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -78,19 +70,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::NoButton</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>QWebView</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header location="global">QtWebKitWidgets/QWebView</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
__copyright__ = "Copyright 2021, 3Liz"
|
||||||
|
__license__ = "GPL version 3"
|
||||||
|
__email__ = "info@3liz.org"
|
||||||
|
|
||||||
|
|
||||||
|
from qgis.core import QgsApplication
|
||||||
|
from qgis.PyQt.QtCore import QUrl, QSettings
|
||||||
|
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
||||||
|
from qgis.PyQt.QtWidgets import QAction
|
||||||
|
from qgis.utils import iface
|
||||||
|
import qgis
|
||||||
|
|
||||||
|
# include <QSettings>
|
||||||
|
from .about_form import AboutDialog
|
||||||
|
import os
|
||||||
|
from .tools.resources import (
|
||||||
|
pyperclip,
|
||||||
|
resources_path,
|
||||||
|
maj_verif,
|
||||||
|
)
|
||||||
|
pyperclip()
|
||||||
|
|
||||||
|
from .flux_editor import Flux_Editor
|
||||||
|
|
||||||
|
|
||||||
|
class PgFlux:
|
||||||
|
def __init__(self):
|
||||||
|
""" Constructor. """
|
||||||
|
self.action_editor = None
|
||||||
|
self.issues = None
|
||||||
|
self.provider = None
|
||||||
|
self.locator_filter = None
|
||||||
|
self.dock_action = None
|
||||||
|
self.help_action = None
|
||||||
|
plugin_dir = os.path.dirname(__file__)
|
||||||
|
end_find = plugin_dir.rfind('\\') + 1
|
||||||
|
global NAME
|
||||||
|
NAME = plugin_dir[end_find:]
|
||||||
|
maj_verif(NAME)
|
||||||
|
|
||||||
|
# Display About window on first use
|
||||||
|
version = qgis.utils.pluginMetadata('CenRa_FLUX', 'version')
|
||||||
|
s = QSettings()
|
||||||
|
versionUse = s.value("flux/version", 1, type=str)
|
||||||
|
if str(versionUse) != str(version):
|
||||||
|
s.setValue("flux/version", str(version))
|
||||||
|
print(versionUse, version)
|
||||||
|
self.open_about_dialog()
|
||||||
|
|
||||||
|
def initGui(self):
|
||||||
|
""" Build the plugin GUI. """
|
||||||
|
|
||||||
|
self.toolBar = iface.addToolBar("CenRa_Flux")
|
||||||
|
self.toolBar.setObjectName("CenRa_Flux")
|
||||||
|
|
||||||
|
icon = QIcon(resources_path('icons', 'icon.png'))
|
||||||
|
|
||||||
|
# Open the online help
|
||||||
|
self.help_action = QAction(icon, "CenRa_Flux", iface.mainWindow())
|
||||||
|
iface.pluginHelpMenu().addAction(self.help_action)
|
||||||
|
self.help_action.triggered.connect(self.open_help)
|
||||||
|
if not self.action_editor:
|
||||||
|
self.action_editor = Flux_Editor()
|
||||||
|
self.flux_editor = QAction(icon, 'SigCEN', None)
|
||||||
|
self.toolBar.addAction(self.flux_editor)
|
||||||
|
self.flux_editor.triggered.connect(self.open_editor)
|
||||||
|
self.flux_editor.setEnabled(False)
|
||||||
|
if os.access('N:/', os.R_OK):
|
||||||
|
self.flux_editor.setEnabled(True)
|
||||||
|
|
||||||
|
def open_about_dialog(self):
|
||||||
|
"""
|
||||||
|
About dialog
|
||||||
|
"""
|
||||||
|
dialog = AboutDialog(iface)
|
||||||
|
dialog.exec()
|
||||||
|
|
||||||
|
def open_help():
|
||||||
|
""" Open the online help. """
|
||||||
|
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
|
||||||
|
|
||||||
|
def open_editor(self):
|
||||||
|
self.action_editor.show()
|
||||||
|
self.action_editor.raise_()
|
||||||
|
|
||||||
|
def unload(self):
|
||||||
|
""" Unload the plugin. """
|
||||||
|
if self.action_editor:
|
||||||
|
iface.removePluginMenu('CenRa_Flux', self.flux_editor)
|
||||||
|
|
||||||
|
if self.provider:
|
||||||
|
QgsApplication.processingRegistry().removeProvider(self.provider)
|
||||||
|
del self.provider
|
||||||
|
|
||||||
|
if self.locator_filter:
|
||||||
|
iface.deregisterLocatorFilter(self.locator_filter)
|
||||||
|
del self.locator_filter
|
||||||
|
|
||||||
|
if self.help_action:
|
||||||
|
iface.pluginHelpMenu().removeAction(self.help_action)
|
||||||
|
del self.help_action
|
||||||
@@ -1,938 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
/***************************************************************************
|
|
||||||
FluxCEN
|
|
||||||
A QGIS plugin
|
|
||||||
Centralisation des flux WFS/WMS utilisés au CEN NA
|
|
||||||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
|
||||||
-------------------
|
|
||||||
begin : 2022-03-23
|
|
||||||
git sha : $Format:%H$
|
|
||||||
copyright : (C) 2022 by Romain MONTILLET
|
|
||||||
email : r.montillet@cen-na.org
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* *
|
|
||||||
* 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.QtCore import QSettings, QTranslator, QCoreApplication, Qt, QUrl
|
|
||||||
from qgis.PyQt.QtGui import *
|
|
||||||
from qgis.PyQt.QtWidgets import *
|
|
||||||
from PyQt5 import *
|
|
||||||
|
|
||||||
# Initialize Qt resources from file resources.py
|
|
||||||
from .resources import *
|
|
||||||
# Import the code for the dialog
|
|
||||||
from .FluxCEN_dialog import FluxCENDialog
|
|
||||||
import os.path, os, shutil
|
|
||||||
from qgis.core import *
|
|
||||||
from qgis.gui import *
|
|
||||||
from qgis.utils import *
|
|
||||||
from .forms.about_form import FluxAboutDialog
|
|
||||||
import qgis
|
|
||||||
import processing
|
|
||||||
import psycopg2
|
|
||||||
import psycopg2.extras
|
|
||||||
from PyQt5.QtXml import QDomDocument
|
|
||||||
import csv
|
|
||||||
import os
|
|
||||||
import io
|
|
||||||
import re
|
|
||||||
import random
|
|
||||||
# Deal with SSL
|
|
||||||
import ssl
|
|
||||||
import urllib
|
|
||||||
from urllib import request, parse
|
|
||||||
import socket
|
|
||||||
import json
|
|
||||||
import requests
|
|
||||||
import base64
|
|
||||||
|
|
||||||
ssl._create_default_https_context = ssl._create_unverified_context
|
|
||||||
from PyQt5 import QtGui
|
|
||||||
from .tools.resources import maj_verif
|
|
||||||
from .tools.PythonSQL import *
|
|
||||||
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)
|
|
||||||
#from .HubToTea import gitea
|
|
||||||
#gitea()
|
|
||||||
first_conn.close()
|
|
||||||
|
|
||||||
|
|
||||||
'''
|
|
||||||
# Vérifier la connexion à internet
|
|
||||||
try:
|
|
||||||
# Vérifier si l'utilisateur est connecté à internet en ouvrant une connexion avec un site web
|
|
||||||
host = socket.gethostbyname("www.google.com")
|
|
||||||
s = socket.create_connection((host, 80), 2)
|
|
||||||
s.close()
|
|
||||||
except socket.error:
|
|
||||||
# Afficher un message si l'utilisateur n'est pas connecté à internet
|
|
||||||
QMessageBox.warning(None, 'Avertissement',
|
|
||||||
'Vous n\'êtes actuellement pas connecté à internet. Veuillez vous connecter pour pouvoir utiliser FluxCEN !')
|
|
||||||
'''
|
|
||||||
|
|
||||||
class Flux:
|
|
||||||
def __init__(self, t, c, nc, l, u, p):
|
|
||||||
self.type = t
|
|
||||||
self.category = c
|
|
||||||
self.nom_commercial = nc
|
|
||||||
self.layer = l
|
|
||||||
self.url = u
|
|
||||||
self.parameters = p
|
|
||||||
maj_verif('CenRa_FLUX')
|
|
||||||
|
|
||||||
|
|
||||||
class Popup(QWidget):
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
super(Popup, self).__init__(parent)
|
|
||||||
|
|
||||||
self.plugin_dir = os.path.dirname(__file__)
|
|
||||||
|
|
||||||
self.text_edit = QTextBrowser()
|
|
||||||
fp = urllib.request.urlopen("https://raw.githubusercontent.com/CEN-Nouvelle-Aquitaine/fluxcen/main/info_changelog.html")
|
|
||||||
mybytes = fp.read()
|
|
||||||
html_changelog = mybytes.decode("utf8")
|
|
||||||
fp.close()
|
|
||||||
|
|
||||||
self.text_edit.setHtml(html_changelog)
|
|
||||||
self.text_edit.setFont(QtGui.QFont("Calibri",weight=QtGui.QFont.Bold))
|
|
||||||
self.text_edit.anchorClicked.connect(QtGui.QDesktopServices.openUrl)
|
|
||||||
self.text_edit.setOpenLinks(False)
|
|
||||||
|
|
||||||
self.text_edit.setWindowTitle("Nouveautés")
|
|
||||||
self.text_edit.setMinimumSize(600,450)
|
|
||||||
|
|
||||||
class FluxCEN:
|
|
||||||
"""QGIS Plugin Implementation."""
|
|
||||||
|
|
||||||
def __init__(self, iface):
|
|
||||||
"""Constructor.
|
|
||||||
|
|
||||||
:param iface: An interface instance that will be passed to this class
|
|
||||||
which provides the hook by which you can manipulate the QGIS
|
|
||||||
application at run time.
|
|
||||||
:type iface: QgsInterface
|
|
||||||
"""
|
|
||||||
# Save reference to the QGIS interface
|
|
||||||
self.iface = iface
|
|
||||||
# initialize plugin directory
|
|
||||||
self.plugin_dir = os.path.dirname(__file__)
|
|
||||||
# initialize locale
|
|
||||||
#print(QSettings().value('locale/userLocale'))
|
|
||||||
locale = QSettings().value('locale/userLocale')[0:2]
|
|
||||||
locale_path = os.path.join(
|
|
||||||
self.plugin_dir,
|
|
||||||
'i18n',
|
|
||||||
'FluxCEN_{}.qm'.format(locale))
|
|
||||||
version = qgis.utils.pluginMetadata('CenRa_FLUX','version')
|
|
||||||
# Display About window on first use
|
|
||||||
s = QSettings()
|
|
||||||
versionUse = s.value("flux/version", 1, type=str)
|
|
||||||
if str(versionUse) != str(version) :
|
|
||||||
s.setValue("flux/version", str(version))
|
|
||||||
self.open_about_dialog()
|
|
||||||
|
|
||||||
if os.path.exists(locale_path):
|
|
||||||
self.translator = QTranslator()
|
|
||||||
self.translator.load(locale_path)
|
|
||||||
QCoreApplication.installTranslator(self.translator)
|
|
||||||
|
|
||||||
# Declare instance attributes
|
|
||||||
self.actions = []
|
|
||||||
self.menu = self.tr(u'&FluxCEN')
|
|
||||||
self.dlg = FluxCENDialog()
|
|
||||||
self.plugin_path = os.path.dirname(__file__)
|
|
||||||
|
|
||||||
# Check if plugin was started the first time in current QGIS session
|
|
||||||
# Must be set in initGui() to survive plugin reloads
|
|
||||||
self.first_start = None
|
|
||||||
|
|
||||||
self.dlg.tableWidget.setSelectionBehavior(QTableWidget.SelectRows)
|
|
||||||
self.dlg.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
|
||||||
|
|
||||||
self.dlg.comboBox_2.addItem("SIG")
|
|
||||||
self.dlg.comboBox_2.addItem('REF')
|
|
||||||
# self.dlg.comboBox.addItem('07')
|
|
||||||
# self.dlg.comboBox.addItem('26')
|
|
||||||
# self.dlg.comboBox.addItem('42')
|
|
||||||
# self.dlg.comboBox.addItem('69')
|
|
||||||
# self.dlg.comboBox.addItem('form')
|
|
||||||
|
|
||||||
self.dlg.comboBox.currentIndexChanged.connect(self.initialisation_flux)
|
|
||||||
self.dlg.commandLinkButton.clicked.connect(self.selection_flux)
|
|
||||||
self.dlg.tableWidget.itemDoubleClicked.connect(self.selection_flux)
|
|
||||||
self.dlg.pushButton_2.clicked.connect(self.limite_flux)
|
|
||||||
self.dlg.commandLinkButton_2.clicked.connect(self.suppression_flux)
|
|
||||||
self.dlg.tableWidget_2.itemDoubleClicked.connect(self.suppression_flux)
|
|
||||||
self.dlg.comboBox_2.currentIndexChanged.connect(self.bd_source)
|
|
||||||
#self.dlg.commandLinkButton_3.clicked.connect(self.option_OSM)
|
|
||||||
#self.dlg.commandLinkButton_4.clicked.connect(self.option_google_maps)
|
|
||||||
|
|
||||||
#self.dlg.commandLinkButton_5.clicked.connect(self.popup)
|
|
||||||
# iface.mapCanvas().extentsChanged.connect(self.test5)
|
|
||||||
|
|
||||||
# url_open = urllib.request.urlopen("https://raw.githubusercontent.com/CEN-Rhone-Alpes/Plugin_QGIS/main/flux.csv")
|
|
||||||
# colonnes_flux = csv.DictReader(io.TextIOWrapper(url_open, encoding='utf8'), delimiter=';')
|
|
||||||
|
|
||||||
#mots_cles = [row["categorie"] for row in colonnes_flux if row["categorie"]]
|
|
||||||
#categories = list(set(mots_cles))
|
|
||||||
#categories.sort()
|
|
||||||
|
|
||||||
#self.dlg.comboBox.addItems(categories)
|
|
||||||
layout = QVBoxLayout()
|
|
||||||
self.dlg.lineEdit.textChanged.connect(self.filtre_dynamique)
|
|
||||||
layout.addWidget(self.dlg.lineEdit)
|
|
||||||
self.dlg.lineEdit.mousePressEvent = self._mousePressEvent
|
|
||||||
|
|
||||||
metadonnees_plugin = open(self.plugin_path + '/metadata.txt')
|
|
||||||
infos_metadonnees = metadonnees_plugin.readlines()
|
|
||||||
|
|
||||||
# derniere_version = urllib.request.urlopen("https://sig.dsi-cen.org/qgis/downloads/last_version_fluxcen.txt")
|
|
||||||
# num_last_version = derniere_version.readlines()[0].decode("utf-8")
|
|
||||||
|
|
||||||
# Connect the itemClicked signal to the open_url function
|
|
||||||
#self.dlg.tableWidget.itemClicked.connect(self.open_url)
|
|
||||||
|
|
||||||
# version_utilisateur = infos_metadonnees[8].splitlines()
|
|
||||||
|
|
||||||
# if infos_metadonnees[8].splitlines() == num_last_version.splitlines():
|
|
||||||
# iface.messageBar().pushMessage("Plugin à jour", "Votre version de FluxCEN %s est à jour !" %version_utilisateur, level=Qgis.Success, duration=5)
|
|
||||||
# else:
|
|
||||||
# iface.messageBar().pushMessage("Information :", "Une nouvelle version de FluxCEN est disponible, veuillez mettre à jour le plugin !", level=Qgis.Info, duration=120)
|
|
||||||
|
|
||||||
def open_about_dialog(self):
|
|
||||||
dialog = FluxAboutDialog(self.iface)
|
|
||||||
dialog.exec_()
|
|
||||||
|
|
||||||
def _mousePressEvent(self, event):
|
|
||||||
self.dlg.lineEdit.setText("")
|
|
||||||
self.dlg.lineEdit.mousePressEvent = None
|
|
||||||
|
|
||||||
# noinspection PyMethodMayBeStatic
|
|
||||||
def tr(self, message):
|
|
||||||
"""Get the translation for a string using Qt translation API.
|
|
||||||
|
|
||||||
We implement this ourselves since we do not inherit QObject.
|
|
||||||
|
|
||||||
:param message: String for translation.
|
|
||||||
:type message: str, QString
|
|
||||||
|
|
||||||
:returns: Translated version of message.
|
|
||||||
:rtype: QString
|
|
||||||
"""
|
|
||||||
# noinspection PyTypeChecker,PyArgumentList,PyCallByClass
|
|
||||||
return QCoreApplication.translate('FluxCEN', message)
|
|
||||||
|
|
||||||
|
|
||||||
def add_action(
|
|
||||||
self,
|
|
||||||
icon_path,
|
|
||||||
text,
|
|
||||||
callback,
|
|
||||||
dbtype=None,
|
|
||||||
enabled_flag=True,
|
|
||||||
add_to_menu=True,
|
|
||||||
add_to_toolbar=True,
|
|
||||||
status_tip=None,
|
|
||||||
whats_this=None,
|
|
||||||
parent=None):
|
|
||||||
"""Add a toolbar icon to the toolbar.
|
|
||||||
|
|
||||||
:param icon_path: Path to the icon for this action. Can be a resource
|
|
||||||
path (e.g. ':/plugins/foo/bar.png') or a normal file system path.
|
|
||||||
:type icon_path: str
|
|
||||||
|
|
||||||
:param text: Text that should be shown in menu items for this action.
|
|
||||||
:type text: str
|
|
||||||
|
|
||||||
:param callback: Function to be called when the action is triggered.
|
|
||||||
:type callback: function
|
|
||||||
|
|
||||||
:param enabled_flag: A flag indicating if the action should be enabled
|
|
||||||
by default. Defaults to True.
|
|
||||||
:type enabled_flag: bool
|
|
||||||
|
|
||||||
:param add_to_menu: Flag indicating whether the action should also
|
|
||||||
be added to the menu. Defaults to True.
|
|
||||||
:type add_to_menu: bool
|
|
||||||
|
|
||||||
:param add_to_toolbar: Flag indicating whether the action should also
|
|
||||||
be added to the toolbar. Defaults to True.
|
|
||||||
:type add_to_toolbar: bool
|
|
||||||
|
|
||||||
:param status_tip: Optional text to show in a popup when mouse pointer
|
|
||||||
hovers over the action.
|
|
||||||
:type status_tip: str
|
|
||||||
|
|
||||||
:param parent: Parent widget for the new action. Defaults None.
|
|
||||||
:type parent: QWidget
|
|
||||||
:param whats_this: Optional text to show in the status bar when the
|
|
||||||
mouse pointer hovers over the action.
|
|
||||||
|
|
||||||
:returns: The action that was created. Note that the action is also
|
|
||||||
added to self.actions list.
|
|
||||||
:rtype: QAction
|
|
||||||
"""
|
|
||||||
|
|
||||||
icon = QIcon(icon_path)
|
|
||||||
action = QAction(icon, text, parent)
|
|
||||||
action.triggered.connect(callback)
|
|
||||||
action.setEnabled(enabled_flag)
|
|
||||||
|
|
||||||
if status_tip is not None:
|
|
||||||
action.setStatusTip(status_tip)
|
|
||||||
|
|
||||||
if whats_this is not None:
|
|
||||||
action.setWhatsThis(whats_this)
|
|
||||||
|
|
||||||
if add_to_toolbar:
|
|
||||||
# Adds plugin icon to Plugins toolbar
|
|
||||||
#self.iface.addToolBarIcon(action)
|
|
||||||
self.toolBar.addAction(action)
|
|
||||||
|
|
||||||
if add_to_menu:
|
|
||||||
self.iface.addPluginToMenu(
|
|
||||||
self.menu,
|
|
||||||
action)
|
|
||||||
|
|
||||||
self.actions.append(action)
|
|
||||||
|
|
||||||
return action
|
|
||||||
|
|
||||||
def initGui(self):
|
|
||||||
self.toolBar = self.iface.addToolBar("FluxCEN")
|
|
||||||
self.toolBar.setObjectName("FluxCEN")
|
|
||||||
"""Create the menu entries and toolbar icons inside the QGIS GUI."""
|
|
||||||
icon_path = ':/plugins/CenRa_FLUX/reficon.png'
|
|
||||||
self.add_action(
|
|
||||||
icon_path,
|
|
||||||
text=self.tr(u'SigCEN'),
|
|
||||||
callback=self.bd_source,
|
|
||||||
dbtype='"+dbname+"',
|
|
||||||
parent=self.iface.mainWindow())
|
|
||||||
'''
|
|
||||||
icon_path_2 = ':/plugins/CenRa_FLUX/reficon.png'
|
|
||||||
self.add_action(
|
|
||||||
icon_path_2,
|
|
||||||
text=self.tr(u'RefCEN'),
|
|
||||||
callback=self.run_ref,
|
|
||||||
dbtype='ref_geo4269',
|
|
||||||
parent=self.iface.mainWindow())
|
|
||||||
'''
|
|
||||||
|
|
||||||
# will be set False in run()
|
|
||||||
self.first_start = False
|
|
||||||
|
|
||||||
def unload(self):
|
|
||||||
"""Removes the plugin menu item and icon from QGIS GUI."""
|
|
||||||
for action in self.actions:
|
|
||||||
self.iface.removePluginMenu(
|
|
||||||
self.tr(u'&SigCEN'),
|
|
||||||
action)
|
|
||||||
self.iface.removeToolBarIcon(action)
|
|
||||||
for action in self.actions:
|
|
||||||
self.iface.removePluginMenu(
|
|
||||||
self.tr(u'&RefCEN'),
|
|
||||||
action)
|
|
||||||
self.iface.removeToolBarIcon(action)
|
|
||||||
|
|
||||||
def bd_source(self):
|
|
||||||
self.dlg.activateWindow()
|
|
||||||
bd_origine=self.dlg.comboBox_2.currentText()
|
|
||||||
if bd_origine == 'REF':
|
|
||||||
self.run_ref()
|
|
||||||
if bd_origine == 'SIG':
|
|
||||||
self.run_sig()
|
|
||||||
|
|
||||||
def run_ref(self):
|
|
||||||
"""Run method that performs all the real work"""
|
|
||||||
while self.dlg.tableWidget_2.rowCount() > 0:
|
|
||||||
self.dlg.tableWidget_2.removeRow(self.dlg.tableWidget_2.rowCount()-1)
|
|
||||||
# print(self.dlg.tableWidget_2.rowCount())
|
|
||||||
global cur,con,dbtype
|
|
||||||
dbtype=refdb
|
|
||||||
con = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbtype+" user=" + user + " password=" + mdp)
|
|
||||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
|
||||||
self.initialisation_flux()
|
|
||||||
self.combobox_custom()
|
|
||||||
# Create the dialog with elements (after translation) and keep reference
|
|
||||||
# Only create GUI ONCE in callback, so that it will only load when the plugin is started
|
|
||||||
if self.first_start == True:
|
|
||||||
self.first_start = False
|
|
||||||
# show the dialog
|
|
||||||
self.dlg.show()
|
|
||||||
# Run the dialog event loop
|
|
||||||
result = self.dlg.exec_()
|
|
||||||
# See if OK was pressed
|
|
||||||
if result:
|
|
||||||
# Do something useful here - delete the line containing pass and
|
|
||||||
# substitute with your code.
|
|
||||||
pass
|
|
||||||
|
|
||||||
def run_sig(self):
|
|
||||||
"""Run method that performs all the real work"""
|
|
||||||
while self.dlg.tableWidget_2.rowCount() > 0:
|
|
||||||
self.dlg.tableWidget_2.removeRow(self.dlg.tableWidget_2.rowCount()-1)
|
|
||||||
global cur,con,dbtype
|
|
||||||
dbtype=sigdb
|
|
||||||
con = psycopg2.connect("host=" + host + " port=" + port + " dbname="+dbtype+" user=" + user + " password=" + mdp)
|
|
||||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
|
||||||
self.initialisation_flux()
|
|
||||||
self.combobox_custom()
|
|
||||||
# Create the dialog with elements (after translation) and keep reference
|
|
||||||
# Only create GUI ONCE in callback, so that it will only load when the plugin is started
|
|
||||||
if self.first_start == True:
|
|
||||||
self.first_start = False
|
|
||||||
# show the dialog
|
|
||||||
self.dlg.show()
|
|
||||||
# Run the dialog event loop
|
|
||||||
result = self.dlg.exec_()
|
|
||||||
# See if OK was pressed
|
|
||||||
if result:
|
|
||||||
# Do something useful here - delete the line containing pass and
|
|
||||||
# substitute with your code.
|
|
||||||
pass
|
|
||||||
|
|
||||||
def suppression_flux(self):
|
|
||||||
self.dlg.tableWidget_2.removeRow(self.dlg.tableWidget_2.currentRow())
|
|
||||||
'''
|
|
||||||
def option_OSM(self):
|
|
||||||
tms = 'type=xyz&url=https://tile.openstreetmap.org/{z}/{x}/{y}.png&zmax=19&zmin=0'
|
|
||||||
layer = QgsRasterLayer(tms, 'OSM', 'wms')
|
|
||||||
|
|
||||||
if not QgsProject.instance().mapLayersByName("OSM"):
|
|
||||||
QgsProject.instance().addMapLayer(layer)
|
|
||||||
else:
|
|
||||||
QMessageBox.question(iface.mainWindow(), u"Fond OSM déjà chargé !", "Le fond de carte OSM est déjà chargé", QMessageBox.Ok)
|
|
||||||
|
|
||||||
OSM_layer = QgsProject.instance().mapLayersByName("OSM")[0]
|
|
||||||
|
|
||||||
root = QgsProject.instance().layerTreeRoot()
|
|
||||||
|
|
||||||
# Move Layer
|
|
||||||
OSM_layer = root.findLayer(OSM_layer.id())
|
|
||||||
myClone = OSM_layer.clone()
|
|
||||||
parent = OSM_layer.parent()
|
|
||||||
parent.insertChildNode(-1, myClone)
|
|
||||||
parent.removeChildNode(OSM_layer)
|
|
||||||
|
|
||||||
|
|
||||||
def option_google_maps(self):
|
|
||||||
tms = 'type=xyz&zmin=0&zmax=20&url=https://mt1.google.com/vt/lyrs%3Ds%26x%3D{x}%26y%3D{y}%26z%3D{z}'
|
|
||||||
layer = QgsRasterLayer(tms, 'Google Satelitte', 'wms')
|
|
||||||
|
|
||||||
if not QgsProject.instance().mapLayersByName("Google Satelitte"):
|
|
||||||
QgsProject.instance().addMapLayer(layer)
|
|
||||||
else:
|
|
||||||
QMessageBox.question(iface.mainWindow(), u"Fond Google Sat' déjà chargé !", "Le fond de carte Google Satelitte est déjà chargé", QMessageBox.Ok)
|
|
||||||
|
|
||||||
google_layer = QgsProject.instance().mapLayersByName("Google Satelitte")[0]
|
|
||||||
|
|
||||||
root = QgsProject.instance().layerTreeRoot()
|
|
||||||
|
|
||||||
# Move Layer
|
|
||||||
google_layer = root.findLayer(google_layer.id())
|
|
||||||
myClone = google_layer.clone()
|
|
||||||
parent = google_layer.parent()
|
|
||||||
parent.insertChildNode(-1, myClone)
|
|
||||||
parent.removeChildNode(google_layer)
|
|
||||||
'''
|
|
||||||
|
|
||||||
def open_url(self, item):
|
|
||||||
url = item.data(Qt.UserRole)
|
|
||||||
#if url:
|
|
||||||
# Open the URL, you might use QDesktopServices.openUrl for this in a standalone PyQt application
|
|
||||||
# QDesktopServices.openUrl(QUrl(url))
|
|
||||||
|
|
||||||
def initialisation_flux(self):
|
|
||||||
'''
|
|
||||||
def csv_import(url):
|
|
||||||
url_open = urllib.request.urlopen(url)
|
|
||||||
csvfile = csv.reader(io.TextIOWrapper(url_open, encoding='utf8'), delimiter=';')
|
|
||||||
#on ne lit pas la première ligne correspondant aux noms des colonnes avec next()
|
|
||||||
next(csvfile)
|
|
||||||
return csvfile;
|
|
||||||
|
|
||||||
data = []
|
|
||||||
data2 = []
|
|
||||||
model = QStandardItemModel()
|
|
||||||
|
|
||||||
raw = csv_import(
|
|
||||||
"https://raw.githubusercontent.com/CEN-Rhone-Alpes/Plugin_QGIS/main/flux.csv")
|
|
||||||
for row in raw:
|
|
||||||
data.append(row)
|
|
||||||
data2.append(row)
|
|
||||||
data = [k for k in data if self.dlg.comboBox.currentText() in k]
|
|
||||||
data.sort()
|
|
||||||
data2.sort()
|
|
||||||
items = [
|
|
||||||
QStandardItem(field)
|
|
||||||
for field in row]
|
|
||||||
|
|
||||||
model.appendRow(items)
|
|
||||||
|
|
||||||
row=0
|
|
||||||
data=['a1','a2','a3']
|
|
||||||
data2=[['b1','c1','d1'],['b2','c2','d2'],['b3','c3','d3']]
|
|
||||||
if self.dlg.comboBox.currentText() == 'toutes les catégories':
|
|
||||||
# print(str(data2[0]))
|
|
||||||
# del data2[0]
|
|
||||||
# print(str(data2[0]))
|
|
||||||
nb_row = len(data2)
|
|
||||||
nb_col = len(data2[0])
|
|
||||||
print(data2[row][2])
|
|
||||||
self.dlg.tableWidget.setRowCount(nb_row)
|
|
||||||
self.dlg.tableWidget.setColumnCount(nb_col)
|
|
||||||
for row in range(nb_row):
|
|
||||||
for col in range(nb_col):
|
|
||||||
item = QTableWidgetItem(str(data2[row][col]))
|
|
||||||
# Access the value from the 6th column for the current row (style here)
|
|
||||||
value_from_2nd_column = str(data2[row][2])
|
|
||||||
# Set tooltip for each row
|
|
||||||
tooltip = f"Nom du flux: {value_from_2nd_column}"
|
|
||||||
item.setToolTip(tooltip)
|
|
||||||
|
|
||||||
# Check if the current column is the "Résumé des métadonnées" column
|
|
||||||
if col == 7:
|
|
||||||
# Set icon for the "Résumé des métadonnées" column
|
|
||||||
icon_path = self.plugin_path + '/info_metadata.png' # Replace 'path_to_your_icon.png' with the actual path to your icon
|
|
||||||
icon = QIcon(icon_path)
|
|
||||||
item.setIcon(icon)
|
|
||||||
# Store the URL in the item's data for later retrieval
|
|
||||||
url_from_6th_column = str(data2[row][7]) # Assuming the URL is in the next column
|
|
||||||
item.setData(Qt.UserRole, url_from_6th_column)'''
|
|
||||||
if dbtype == sigdb:
|
|
||||||
if self.dlg.comboBox.currentText() == 'toutes les catégories':
|
|
||||||
custom_list=schemaname_list
|
|
||||||
elif self.dlg.comboBox.currentText() == 'travaux':
|
|
||||||
custom_list="""(SELECT schemaname,tablename from pg_catalog.pg_tables
|
|
||||||
where schemaname like '"""+ str(self.dlg.comboBox.currentText()) +"""%' order by schemaname,tablename) UNION (SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews where schemaname like '"""+ str(self.dlg.comboBox.currentText()) +"""%' order by schemaname,tablename) order by schemaname,tablename;"""
|
|
||||||
else:
|
|
||||||
custom_list="""(SELECT schemaname,tablename from pg_catalog.pg_tables
|
|
||||||
where schemaname like '\_"""+ str(self.dlg.comboBox.currentText()) +"""%' order by schemaname,tablename) UNION (SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews where schemaname like '\_"""+ str(self.dlg.comboBox.currentText()) +"""%' order by schemaname,tablename) order by schemaname,tablename;"""
|
|
||||||
else:
|
|
||||||
if self.dlg.comboBox.currentText() == 'toutes les catégories':
|
|
||||||
custom_list=schemaname_list_ref
|
|
||||||
else:
|
|
||||||
custom_list="""SELECT schemaname,tablename from pg_catalog.pg_tables
|
|
||||||
where schemaname like '"""+ str(self.dlg.comboBox.currentText()) +"""' order by schemaname,tablename;"""
|
|
||||||
cur.execute(custom_list)
|
|
||||||
list_schema = cur.fetchall()
|
|
||||||
|
|
||||||
self.dlg.tableWidget.setRowCount(len(list_schema))
|
|
||||||
self.dlg.tableWidget.setColumnCount(3)
|
|
||||||
i=0
|
|
||||||
for value in list_schema:
|
|
||||||
if dbtype == sigdb:
|
|
||||||
type_val = str(value[0])[1:3]
|
|
||||||
schema_name=str(value[0])[4:]
|
|
||||||
table_name=str(value[1])
|
|
||||||
else:
|
|
||||||
type_val = ''
|
|
||||||
schema_name=str(value[0])
|
|
||||||
table_name=str(value[1])
|
|
||||||
if type_val == 'fo':
|
|
||||||
type_val=str(value[0])[1:5]
|
|
||||||
schema_name=str(value[0])[6:]
|
|
||||||
table_name=str(value[1])
|
|
||||||
elif type_val == 'ra':
|
|
||||||
type_val='travaux'
|
|
||||||
schema_name=str(value[0])
|
|
||||||
table_name=str(value[1])
|
|
||||||
elif type_val != '00' and type_val != '01' and type_val != '07' and type_val != '26' and type_val != '42' and type_val != '69' and type_val != 'ra':
|
|
||||||
type_val='agregation'
|
|
||||||
schema_name=str(value[0])
|
|
||||||
table_name=str(value[1])
|
|
||||||
|
|
||||||
item = QTableWidgetItem(type_val)
|
|
||||||
self.dlg.tableWidget.setItem(i,0,item)
|
|
||||||
item = QTableWidgetItem(schema_name)
|
|
||||||
self.dlg.tableWidget.setItem(i,1,item)
|
|
||||||
item = QTableWidgetItem(table_name)
|
|
||||||
self.dlg.tableWidget.setItem(i,2,item)
|
|
||||||
i=i+1
|
|
||||||
self.dlg.tableWidget.setColumnWidth(0, 20)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(1, 300)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(2, 300)
|
|
||||||
self.dlg.tableWidget.setHorizontalHeaderLabels(["Code","Schema","Table"])
|
|
||||||
'''
|
|
||||||
else:
|
|
||||||
nb_row = len(data)
|
|
||||||
nb_col = len(data[0])
|
|
||||||
self.dlg.tableWidget.setRowCount(nb_row)
|
|
||||||
self.dlg.tableWidget.setColumnCount(nb_col)
|
|
||||||
for row in range(nb_row):
|
|
||||||
for col in range(nb_col):
|
|
||||||
item = QTableWidgetItem(str(data[row][col]))
|
|
||||||
# Access the value from the 6th column for the current row (style here)
|
|
||||||
value_from_2nd_column = str(data[row][1])
|
|
||||||
# Set tooltip for each row
|
|
||||||
tooltip = f"Nom du flux: {value_from_2nd_column}"
|
|
||||||
item.setToolTip(tooltip)
|
|
||||||
|
|
||||||
# Check if the current column is the "Résumé des métadonnées" column
|
|
||||||
if col == 7:
|
|
||||||
# Set icon for the "Résumé des métadonnées" column
|
|
||||||
icon_path = self.plugin_path + '/metadata.png' # Replace 'path_to_your_icon.png' with the actual path to your icon
|
|
||||||
icon = QIcon(icon_path)
|
|
||||||
item.setIcon(icon)
|
|
||||||
# Store the URL in the item's data for later retrieval
|
|
||||||
url_from_6th_column = str(data2[row][7]) # Assuming the URL is in the next column
|
|
||||||
item.setData(Qt.UserRole, url_from_6th_column)
|
|
||||||
|
|
||||||
self.dlg.tableWidget.setItem(row, col, item)
|
|
||||||
|
|
||||||
self.dlg.tableWidget.setHorizontalHeaderLabels(["Service", "Catégorie", "Flux", "Nom technique", "Url d'accès", "Source", "Style", "Infos"])
|
|
||||||
|
|
||||||
self.dlg.tableWidget.setColumnWidth(0, 76)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(1, 0)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(2, 610)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(3, 0)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(4, 0)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(5, 88)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(6, 0)
|
|
||||||
self.dlg.tableWidget.setColumnWidth(7, 30)
|
|
||||||
|
|
||||||
self.dlg.tableWidget.selectRow(0)
|
|
||||||
'''
|
|
||||||
def selection_flux(self):
|
|
||||||
selected_row = 0
|
|
||||||
selected_items = self.dlg.tableWidget.selectedItems()
|
|
||||||
|
|
||||||
# Assuming you want to compare items in the first column for uniqueness
|
|
||||||
new_item_text = selected_items[2].text()
|
|
||||||
|
|
||||||
if not self.item_already_exists(new_item_text):
|
|
||||||
self.dlg.tableWidget_2.insertRow(selected_row)
|
|
||||||
|
|
||||||
for column in range(self.dlg.tableWidget.columnCount()):
|
|
||||||
cloned_item = selected_items[column].clone()
|
|
||||||
self.dlg.tableWidget_2.setHorizontalHeaderLabels(["Code","Schema", "Table"])
|
|
||||||
self.dlg.tableWidget_2.setColumnCount(3)
|
|
||||||
self.dlg.tableWidget_2.setItem(selected_row, column, cloned_item)
|
|
||||||
|
|
||||||
self.dlg.tableWidget_2.setColumnWidth(0, 50)
|
|
||||||
self.dlg.tableWidget_2.setColumnWidth(1, 300)
|
|
||||||
self.dlg.tableWidget_2.setColumnWidth(2, 300)
|
|
||||||
|
|
||||||
|
|
||||||
def item_already_exists(self, new_item_text):
|
|
||||||
# Assuming you want to compare items in the first column for uniqueness
|
|
||||||
existing_items = self.dlg.tableWidget_2.findItems(new_item_text, QtCore.Qt.MatchExactly)
|
|
||||||
|
|
||||||
# Check if there are any existing items with the same text in the first column
|
|
||||||
return len(existing_items) > 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def limite_flux(self):
|
|
||||||
|
|
||||||
if self.dlg.tableWidget_2.rowCount() > 3:
|
|
||||||
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(
|
|
||||||
self.dlg.tableWidget_2.rowCount()) + " flux sélectionnés ? (risque de plantage de QGIS)",
|
|
||||||
QMessageBox.Yes | QMessageBox.No)
|
|
||||||
if self.QMBquestion == QMessageBox.Yes:
|
|
||||||
self.chargement_flux()
|
|
||||||
|
|
||||||
if self.QMBquestion == QMessageBox.No:
|
|
||||||
print("Annulation du chargement des couches")
|
|
||||||
|
|
||||||
if self.dlg.tableWidget_2.rowCount() <= 3:
|
|
||||||
self.chargement_flux()
|
|
||||||
|
|
||||||
def chargement_flux(self):
|
|
||||||
|
|
||||||
managerAU = QgsApplication.authManager()
|
|
||||||
k = managerAU.availableAuthMethodConfigs().keys()
|
|
||||||
|
|
||||||
def REQUEST(type):
|
|
||||||
switcher = {
|
|
||||||
'WFS': "GetFeature",
|
|
||||||
'WMS': "GetMap",
|
|
||||||
'WMS+Vecteur': "GetMap",
|
|
||||||
'WMS+Raster': "GetMap",
|
|
||||||
'WMTS': "GetMap"
|
|
||||||
}
|
|
||||||
return switcher.get(type, "nothing")
|
|
||||||
|
|
||||||
|
|
||||||
def displayOnWindows(type, uri, name):
|
|
||||||
'''
|
|
||||||
if type == 'WFS':
|
|
||||||
vlayer = QgsVectorLayer(uri, name, "WFS")
|
|
||||||
# vlayer.setScaleBasedVisibility(True)
|
|
||||||
QgsProject.instance().addMapLayer(vlayer)
|
|
||||||
|
|
||||||
layers = QgsProject.instance().mapLayers() # dictionary
|
|
||||||
|
|
||||||
# rowCount() This property holds the number of rows in the table
|
|
||||||
for row in range(self.dlg.tableWidget_2.rowCount()):
|
|
||||||
# item(row, 0) Returns the item for the given row and column if one has been set; otherwise returns nullptr.
|
|
||||||
_item = self.dlg.tableWidget_2.item(row, 2).text()
|
|
||||||
_legend = self.dlg.tableWidget_2.item(row, 6).text()
|
|
||||||
# print(_item)
|
|
||||||
# print(_legend)
|
|
||||||
|
|
||||||
for layer in layers.values():
|
|
||||||
if layer.name() == _item:
|
|
||||||
if len(_legend) > 1:
|
|
||||||
styles_url = 'https://raw.githubusercontent.com/CEN-Nouvelle-Aquitaine/fluxcen/main/styles_couches/' + _legend + '.qml'
|
|
||||||
|
|
||||||
fp = urllib.request.urlopen(styles_url)
|
|
||||||
mybytes = fp.read()
|
|
||||||
|
|
||||||
document = QDomDocument()
|
|
||||||
document.setContent(mybytes)
|
|
||||||
|
|
||||||
res = layer.importNamedStyle(document)
|
|
||||||
layer.triggerRepaint()
|
|
||||||
|
|
||||||
else:
|
|
||||||
print("Pas de style à charger pour cette couche")
|
|
||||||
|
|
||||||
elif type == 'WMS' or type == 'WMS Raster' or type == 'WMS Vecteur' or type == 'WMTS':
|
|
||||||
rlayer = QgsRasterLayer(uri, name, "WMS")
|
|
||||||
QgsProject.instance().addMapLayer(rlayer)
|
|
||||||
else:
|
|
||||||
print("Unknown datatype !")
|
|
||||||
'''
|
|
||||||
p = []
|
|
||||||
|
|
||||||
for row in range(0, self.dlg.tableWidget_2.rowCount()):
|
|
||||||
## supression de la partie de l'url après le point d'interrogation
|
|
||||||
if dbtype == sigdb:
|
|
||||||
code = self.dlg.tableWidget_2.item(row,0).text()
|
|
||||||
schema = '_'+code+'_'+self.dlg.tableWidget_2.item(row,1).text()
|
|
||||||
if code == 'travaux' or code == 'agregation':
|
|
||||||
schema = self.dlg.tableWidget_2.item(row,1).text()
|
|
||||||
table = self.dlg.tableWidget_2.item(row,2).text()#.split("?", 1)[0]
|
|
||||||
if dbtype == refdb:
|
|
||||||
# code = self.dlg.tableWidget_2.item(row,0).text()
|
|
||||||
schema = self.dlg.tableWidget_2.item(row,1).text()
|
|
||||||
table = self.dlg.tableWidget_2.item(row,2).text()#.split("?", 1)[0]
|
|
||||||
uri = QgsDataSourceUri()
|
|
||||||
uri.setConnection(host ,port ,dbtype ,user ,mdp)
|
|
||||||
|
|
||||||
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
|
|
||||||
|
|
||||||
uri.setDataSource(schema, table, "geom")
|
|
||||||
uri.setKeyColumn('gid')
|
|
||||||
|
|
||||||
# Chargement de la couche PostGIS
|
|
||||||
geom_type ='SELECT right(st_geometrytype(geom),-3) as a FROM '+schema+'.'+table+' GROUP BY a'
|
|
||||||
cur.execute(geom_type)
|
|
||||||
list_typegeom = cur.fetchall()
|
|
||||||
print(len(list_typegeom))
|
|
||||||
if len(list_typegeom) > 1:
|
|
||||||
for typegeom in list_typegeom:
|
|
||||||
if typegeom[0] == 'MultiPolygon':
|
|
||||||
uri.setWkbType(QgsWkbTypes.MultiPolygon)
|
|
||||||
elif typegeom[0] == 'MultiLineString':
|
|
||||||
uri.setWkbType(QgsWkbTypes.MultiLineString)
|
|
||||||
elif typegeom[0] == 'Point':
|
|
||||||
uri.setWkbType(QgsWkbTypes.Point)
|
|
||||||
if typegeom[0] == 'Polygon':
|
|
||||||
uri.setWkbType(QgsWkbTypes.Polygon)
|
|
||||||
elif typegeom[0] == 'LineString':
|
|
||||||
uri.setWkbType(QgsWkbTypes.LineString)
|
|
||||||
elif typegeom[0] == 'MultiPoint':
|
|
||||||
uri.setWkbType(QgsWkbTypes.MultiPoint)
|
|
||||||
if (typegeom[0] != None and typegeom[0] != 'Polygon'):
|
|
||||||
uri.setSrid('2154')
|
|
||||||
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
|
||||||
# Ajout de la couche au canevas QGIS
|
|
||||||
QgsProject.instance().addMapLayer(layer)
|
|
||||||
else:
|
|
||||||
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
|
||||||
# Ajout de la couche au canevas QGIS
|
|
||||||
QgsProject.instance().addMapLayer(layer)
|
|
||||||
'''
|
|
||||||
try:
|
|
||||||
service = re.search('SERVICE=(.+?)&VERSION', self.dlg.tableWidget_2.item(row,4).text()).group(1)
|
|
||||||
except:
|
|
||||||
service = '1.0.0'
|
|
||||||
try:
|
|
||||||
version = re.search('VERSION=(.+?)&REQUEST', self.dlg.tableWidget_2.item(row,4).text()).group(1)
|
|
||||||
except:
|
|
||||||
version = '1.0.0'
|
|
||||||
|
|
||||||
if self.dlg.tableWidget_2.item(row,0).text() == 'WMS' or self.dlg.tableWidget_2.item(row,0).text() == 'WMS Vecteur' or self.dlg.tableWidget_2.item(row,0).text() == 'WMS Raster':
|
|
||||||
a = Flux(
|
|
||||||
self.dlg.tableWidget_2.item(row,0).text(),
|
|
||||||
self.dlg.tableWidget_2.item(row,1).text(),
|
|
||||||
self.dlg.tableWidget_2.item(row,2).text(),
|
|
||||||
self.dlg.tableWidget_2.item(row,3).text(),
|
|
||||||
"url="+url,
|
|
||||||
{
|
|
||||||
'service': self.dlg.tableWidget_2.item(row,0).text(),
|
|
||||||
'version': version,
|
|
||||||
'crs': "EPSG:2154",
|
|
||||||
'format' : "image/png",
|
|
||||||
'layers': self.dlg.tableWidget_2.item(row,3).text()+"&styles"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
p.append(a)
|
|
||||||
|
|
||||||
uri = p[row].url + '&' + urllib.parse.unquote(urllib.parse.urlencode(p[row].parameters))
|
|
||||||
# print(uri)
|
|
||||||
if not QgsProject.instance().mapLayersByName(p[row].nom_commercial):
|
|
||||||
displayOnWindows(p[row].type, uri, p[row].nom_commercial)
|
|
||||||
else:
|
|
||||||
print("Couche "+p[row].nom_commercial+" déjà chargée")
|
|
||||||
|
|
||||||
|
|
||||||
elif self.dlg.tableWidget_2.item(row,0).text() == 'WFS':
|
|
||||||
|
|
||||||
a = Flux(
|
|
||||||
self.dlg.tableWidget_2.item(row, 0).text(),
|
|
||||||
self.dlg.tableWidget_2.item(row, 1).text(),
|
|
||||||
self.dlg.tableWidget_2.item(row, 2).text(),
|
|
||||||
self.dlg.tableWidget_2.item(row, 3).text(),
|
|
||||||
url,
|
|
||||||
{
|
|
||||||
'VERSION': version,
|
|
||||||
'TYPENAME': self.dlg.tableWidget_2.item(row, 3).text(),
|
|
||||||
'request': "GetFeature",
|
|
||||||
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
p.append(a)
|
|
||||||
|
|
||||||
uri = p[row].url + '?' + urllib.parse.unquote(urllib.parse.urlencode(p[row].parameters))
|
|
||||||
|
|
||||||
try:
|
|
||||||
response = requests.get(uri)
|
|
||||||
|
|
||||||
if response.status_code == 401:
|
|
||||||
print("Statut de réponse: 401")
|
|
||||||
|
|
||||||
if len(list(k)) == 0:
|
|
||||||
QMessageBox.question(iface.mainWindow(), u"Attention", "Veuillez ajouter une entrée de configuration d'authentification dans QGIS pour accéder aux flux CEN-NA sécurisés par un mot de passe (Flux 'FoncierCEN')", QMessageBox.Ok)
|
|
||||||
else:
|
|
||||||
# Add 'authcfg' to the parameters dictionary
|
|
||||||
p[row].parameters['authcfg'] = list(k)[0]
|
|
||||||
|
|
||||||
# Update the URI with the modified parameters
|
|
||||||
uri = p[row].url + '?' + urllib.parse.unquote(urllib.parse.urlencode(p[row].parameters))
|
|
||||||
|
|
||||||
# Make the request again with the updated URI
|
|
||||||
response = requests.get(uri)
|
|
||||||
elif response.status_code == 200:
|
|
||||||
print("Statut de réponse: 200.")
|
|
||||||
else:
|
|
||||||
print(f"Statut de réponse: {response.status_code}")
|
|
||||||
|
|
||||||
except requests.exceptions.RequestException as e:
|
|
||||||
print(f"problème de requete: {e}")
|
|
||||||
|
|
||||||
|
|
||||||
if not QgsProject.instance().mapLayersByName(p[row].nom_commercial):
|
|
||||||
displayOnWindows(p[row].type, uri, p[row].nom_commercial)
|
|
||||||
else:
|
|
||||||
print("Couche "+p[row].nom_commercial+" déjà chargée")
|
|
||||||
|
|
||||||
|
|
||||||
elif self.dlg.tableWidget_2.item(row, 0).text() == 'PostGIS':
|
|
||||||
|
|
||||||
# Connexion à la base de données PostGIS
|
|
||||||
uri = QgsDataSourceUri()
|
|
||||||
uri.setConnection("sandbox.cen-nouvelle-aquitaine.dev", "5432", "piezo", "", "")
|
|
||||||
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
|
|
||||||
uri.setDataSource("collaboratif", self.dlg.tableWidget_2.item(row, 3).text(), "geom")
|
|
||||||
# Chargement de la couche PostGIS
|
|
||||||
layer = QgsVectorLayer(uri.uri(), self.dlg.tableWidget_2.item(row, 2).text(), "postgres")
|
|
||||||
|
|
||||||
# Ajout de la couche au canevas QGIS
|
|
||||||
QgsProject.instance().addMapLayer(layer)
|
|
||||||
|
|
||||||
else:
|
|
||||||
print("Les flux WMTS et autres ne sont pas encore gérés par le plugin")
|
|
||||||
'''
|
|
||||||
def combobox_custom(self):
|
|
||||||
if dbtype == sigdb:
|
|
||||||
self.dlg.comboBox.clear()
|
|
||||||
self.dlg.comboBox.addItem("toutes les catégories")
|
|
||||||
self.dlg.comboBox.addItem('00')
|
|
||||||
self.dlg.comboBox.addItem('01')
|
|
||||||
self.dlg.comboBox.addItem('07')
|
|
||||||
self.dlg.comboBox.addItem('26')
|
|
||||||
self.dlg.comboBox.addItem('42')
|
|
||||||
self.dlg.comboBox.addItem('69')
|
|
||||||
self.dlg.comboBox.addItem('agregation')
|
|
||||||
self.dlg.comboBox.addItem('travaux')
|
|
||||||
self.dlg.comboBox.addItem('form')
|
|
||||||
if dbtype == refdb:
|
|
||||||
custom_list=schemaname_distinct
|
|
||||||
cur.execute(custom_list)
|
|
||||||
list_schema = cur.fetchall()
|
|
||||||
self.dlg.comboBox.clear()
|
|
||||||
self.dlg.comboBox.addItem("toutes les catégories")
|
|
||||||
for baxval in list_schema:
|
|
||||||
self.dlg.comboBox.addItem(baxval[0])
|
|
||||||
def filtre_dynamique(self, filter_text):
|
|
||||||
|
|
||||||
for i in range(self.dlg.tableWidget.rowCount()):
|
|
||||||
for j in range(self.dlg.tableWidget.columnCount()):
|
|
||||||
item = self.dlg.tableWidget.item(i, j)
|
|
||||||
match = filter_text.lower() not in item.text().lower()
|
|
||||||
self.dlg.tableWidget.setRowHidden(i, match)
|
|
||||||
if not match:
|
|
||||||
break
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def popup(self):
|
|
||||||
|
|
||||||
self.dialog = Popup() # +++ - self
|
|
||||||
self.dialog.text_edit.show()
|
|
||||||
|
|
||||||
# from owslib.wfs import WebFeatureService
|
|
||||||
# import csv
|
|
||||||
|
|
||||||
# wfs = WebFeatureService(url='https://opendata.cen-nouvelle-aquitaine.org/geoserver/agriculture/wfs')
|
|
||||||
# agriculture = list(wfs.contents)
|
|
||||||
# with open('C:/Users/Romain/Desktop/test.csv', "a+", encoding="ISO-8859-1", newline='') as f:
|
|
||||||
# writer = csv.writer(f)
|
|
||||||
# for row in agriculture:
|
|
||||||
# writer.writerow(row.split())
|
|
||||||
#
|
|
||||||
# from owslib.wms import WebMapService
|
|
||||||
# wms = WebMapService('https://opendata.cen-nouvelle-aquitaine.org/geoserver/fond_carto/wms')
|
|
||||||
# fonds_carto = list(wms.contents)
|
|
||||||
# with open('C:/Users/Romain/Desktop/test.csv', "a+", encoding="ISO-8859-1", newline='') as f:
|
|
||||||
# writer = csv.writer(f)
|
|
||||||
# for row in fonds_carto:
|
|
||||||
# writer.writerow(row.split())
|
|
||||||
#
|
|
||||||
# import csv
|
|
||||||
#
|
|
||||||
# fluxWMS = ['AGG_TMM', '16-014_Brandes_de_Soyaux_2020-05', '17IMERIS_Bois-Charles_Vallée-du-Larry_2022_01', '17IMERIS_Grand-Champ_2022-01', '19PTOR_MNS_filtre_futurs_travaux_2021-10_L93', '19PTOR_MNS_filtre_travaux_realises_2021-10_L93', '19PTOR_ortho_2021-10_L93', '23CELI_marais_du_chancelier_2022_03_24', '23CLAM_Rocher_de_Clamouzat_2020-11', '23DIAB_lande_du_pont_du_diable_nord_2021-10_L93', '23DIAB_lande_du_pont_du_diable_sud_2021-10_L93', '23LAND_RNN_etang_des_landes_2020-08_L93', '33_Lagune-108-2021-08', '79BLVI_Blanchère-de-Viennay_2021-10', '79VGAT_Vallée-du-Gâteau_Pressigny_2020-02', '79VGAT_Vallée-du-Gâteau_Pressigny_2021-10', '86-001_TMM_CA-CD_2020-07', '86-500_Clain-sud_Etang-du-Pin', '86_AT_Chalandray_2021-10', '87CREN_siege_saint_gence_2021-09', '87GRLA_grandes_landes_2021-09-24', '87SANA_sanadie_2021-09-24', 'a_16_030_Prairies_de_Vouharte_2019_09', 'a_17_474_Estauaire_de_la_Gironde_Les_Pr_s_de_la_Rouille_2019_08', 'a_17_474_Estauaire_de_la_Gironde_Moulin_Rompu_2019_08', 'a_17_474_Estuaire_de_la_Gironde_Zone_Humide_de_la_Motte_Ronde_2021_04', 'a_17_IMERIS_Carriere_du_Planton_2021_08_12', 'a_17_LGV_Ragouillis_2021_08_12', 'a_33_Lagune_058_2021_08', 'a_33_Lagune_070_2021_08', 'a_33_Lagune_094_2021_08', 'a_33_Lagune_162_2021_08', 'a_33_Lagune_165_2021_08', 'a_33_Lagunes_207_208_209_2021_08', 'a_79_001_Clussais_la_Pommeraie_2020_11', 'a_79_008_Landes_de_L_Hopiteau_2019_09', 'a_79_020_Bessines_1_avant_travaux_2019_10', 'a_79_020_Bessines_2_pendant_travaux_2019_11', 'a_79_020_Bessines_3_apres_travaux_2020_12', 'a_79_044_Carriere_des_Landes_2020_09', 'a_79_AT_Vernoux_en_Gatine_2020_09', 'a_79_Sources_de_la_Sevre_Niortaise_Pierre_levee_2020_09', 'a_86_001_TMM_AA_2020_06', 'a_86_001_TMM_AB_2020_06', 'a_86_001_TMM_AC_2020_06', 'a_86_001_TMM_AD_2020_06', 'a_86_001_TMM_AE_2020_06', 'a_86_001_TMM_AF_2020_06', 'a_86_001_TMM_AG_2020_07', 'a_86_001_TMM_BA_2020_06', 'a_86_001_TMM_BB_2020_06', 'a_86_001_TMM_BC_2020_06', 'a_86_001_TMM_BD_2020_06', 'a_86_001_TMM_BE_2020_07', 'a_86_001_TMM_BF_2021_06', 'a_86_001_TMM_CB_2020_07', 'a_86_001_TMM_CC_2020_07', 'a_86_001_TMM_CC_2021_06', 'a_86_001_TMM_CD_2021_06', 'a_86_001_TMM_CE_2020_07', 'a_86_001_TMM_CF_2020_09', 'a_86_001_TMM_DA_2020_07', 'a_86_001_TMM_DB_2020_09', 'a_86_001_TMM_DC_2021_06', 'a_86_001_TMM_EA_2020_06', 'a_86_001_TMM_EB_2020_06', 'a_86_001_TMM_EC_2020_06', 'a_86_001_TMM_FA_2020_06', 'a_86_001_TMM_FB_2020_07', 'a_86_001_TMM_FC_2020_07', 'a_86_001_TMM_FC_2021_06', 'a_86_001_TMM_HA_2020_09', 'a_86_001_TMM_IA_2020_06', 'a_86_001_TMM_IB_2020_06', 'a_86_001_TMM_IC_2020_06', 'a_86_001_TMM_JA_2020_07', 'a_86_001_TMM_JB_2020_07', 'a_86_001_TMM_JC_2020_07', 'a_86_001_TMM_JE_2020_07', 'a_86_001_TMM_KA_2020_07', 'a_86_001_TMM_KB_2020_07', 'a_86_003_Falunieres_de_Moulin_Pochas_2019_09', 'a_86_006_Landes_et_pelouses_de_Lussac_Sillars_2019_08', 'a_86_011_Landes_de_Sainte_Marie_2019_09', 'a_86_025_Marais_des_Ragouillis_2020_11', 'a_86_025_Marais_des_Ragouillis_2021_02', 'a_86_026_Etangs_Baro_2019_09', 'a_86_029_Vallee_de_la_Longere_2019_09', 'a_86_037_Tourbiere_des_Regeasses_2021_06', 'a_86_038_Vallees_de_la_Vienne_et_du_Clain_Persac_2019_09', 'a_86_038_Vallees_de_la_Vienne_et_du_Clain_Persac_2020_12', 'a_86_052_Fontaine_le_Comte_nord_2020_11', 'a_86_052_Fontaine_le_Comte_sud_2020_11', 'a_86_054_Vallee_de_la_Vonne_2020_11', 'a_86_058_Carriere_de_Puy_Herve_2021_02_09', 'a_86_058_Carriere_de_Puy_Herve_2021_02_25', 'a_86_060_Bocage_de_la_Geoffronniere_2020_11', 'a_86_Le_Cormier_2021_05']
|
|
||||||
#
|
|
||||||
# with open('C:/Users/Romain/Desktop/test.csv', "a+", encoding="ISO-8859-1", newline='') as f:
|
|
||||||
# writer = csv.writer(f)
|
|
||||||
# for row in fluxWMS:
|
|
||||||
# writer.writerow(row.split())
|
|
||||||
|
|
||||||
#### Récupération des métadonnées des couches quand disponibles:
|
|
||||||
|
|
||||||
# from owslib.wms import WebMapService
|
|
||||||
# wms = WebMapService('http://geoservices.brgm.fr/geologie?service=WMS+Raster', version='1.1.1')
|
|
||||||
# print(list(wms.contents))
|
|
||||||
#
|
|
||||||
# print(wms['IDPR'].abstract)
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
/***************************************************************************
|
|
||||||
FluxCENDialog
|
|
||||||
A QGIS plugin
|
|
||||||
Flux IGN etc etc
|
|
||||||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
|
||||||
-------------------
|
|
||||||
begin : 2022-04-04
|
|
||||||
git sha : $Format:%H$
|
|
||||||
copyright : (C) 2022 by Romain Montillet
|
|
||||||
email : r.montillet@cen-na.org
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
|
||||||
* *
|
|
||||||
* 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. *
|
|
||||||
* *
|
|
||||||
***************************************************************************/
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
from qgis.PyQt import uic
|
|
||||||
from qgis.PyQt import QtWidgets
|
|
||||||
|
|
||||||
# This loads your .ui file so that PyQt can populate your plugin with the elements from Qt Designer
|
|
||||||
FORM_CLASS, _ = uic.loadUiType(os.path.join(
|
|
||||||
os.path.dirname(__file__), 'FluxCEN_dialog_base.ui'))
|
|
||||||
|
|
||||||
|
|
||||||
class FluxCENDialog(QtWidgets.QDialog, FORM_CLASS):
|
|
||||||
def __init__(self, parent=None):
|
|
||||||
"""Constructor."""
|
|
||||||
super(FluxCENDialog, self).__init__(parent)
|
|
||||||
# Set up the user interface from Designer through FORM_CLASS.
|
|
||||||
# After self.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)
|
|
||||||
@@ -1,247 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'FluxCEN_dialog_base.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt5 UI code generator 5.15.7
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'FluxCEN_dialog_base.ui'
|
|
||||||
#
|
|
||||||
# Created by: PyQt5 UI code generator 5.15.4
|
|
||||||
#
|
|
||||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
|
||||||
# run again. Do not edit this file unless you know what you are doing.
|
|
||||||
import resources
|
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Dialog(object):
|
|
||||||
def setupUi(self, Dialog):
|
|
||||||
Dialog.setObjectName("Dialog")
|
|
||||||
Dialog.setEnabled(True)
|
|
||||||
Dialog.resize(910, 800)
|
|
||||||
Dialog.setMinimumSize(QtCore.QSize(910, 800))
|
|
||||||
Dialog.setMaximumSize(QtCore.QSize(910, 800))
|
|
||||||
self.comboBox = QtWidgets.QComboBox(Dialog)
|
|
||||||
self.comboBox.setGeometry(QtCore.QRect(260, 130, 171, 22))
|
|
||||||
self.comboBox.setEditable(False)
|
|
||||||
self.comboBox.setCurrentText("")
|
|
||||||
self.comboBox.setObjectName("comboBox")
|
|
||||||
self.comboBox_2 = QtWidgets.QComboBox(Dialog)
|
|
||||||
self.comboBox_2.setGeometry(QtCore.QRect(370, 80, 171, 22))
|
|
||||||
self.comboBox_2.setEditable(False)
|
|
||||||
self.comboBox_2.setCurrentText("")
|
|
||||||
self.comboBox_2.setObjectName("comboBox_2")
|
|
||||||
self.label_3 = QtWidgets.QLabel(Dialog)
|
|
||||||
self.label_3.setGeometry(QtCore.QRect(50, 20, 271, 91))
|
|
||||||
self.label_3.setText("")
|
|
||||||
self.label_3.setPixmap(QtGui.QPixmap(":/plugins/CenRa_FLUX/logo.png"))
|
|
||||||
self.label_3.setScaledContents(True)
|
|
||||||
self.label_3.setObjectName("label_3")
|
|
||||||
self.pushButton_2 = QtWidgets.QPushButton(Dialog)
|
|
||||||
self.pushButton_2.setGeometry(QtCore.QRect(370, 750, 171, 23))
|
|
||||||
self.pushButton_2.setObjectName("pushButton_2")
|
|
||||||
self.tableWidget = QtWidgets.QTableWidget(Dialog)
|
|
||||||
self.tableWidget.setEnabled(True)
|
|
||||||
self.tableWidget.setGeometry(QtCore.QRect(30, 170, 850, 281))
|
|
||||||
self.tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
|
|
||||||
self.tableWidget.setObjectName("tableWidget")
|
|
||||||
self.tableWidget.setColumnCount(0)
|
|
||||||
self.tableWidget.setRowCount(0)
|
|
||||||
self.tableWidget_2 = QtWidgets.QTableWidget(Dialog)
|
|
||||||
self.tableWidget_2.setGeometry(QtCore.QRect(30, 550, 850, 181))
|
|
||||||
self.tableWidget_2.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
|
|
||||||
self.tableWidget_2.setObjectName("tableWidget_2")
|
|
||||||
self.tableWidget_2.setColumnCount(0)
|
|
||||||
self.tableWidget_2.setRowCount(0)
|
|
||||||
self.commandLinkButton = QtWidgets.QCommandLinkButton(Dialog)
|
|
||||||
self.commandLinkButton.setGeometry(QtCore.QRect(400, 470, 61, 61))
|
|
||||||
self.commandLinkButton.setText("")
|
|
||||||
icon = QtGui.QIcon()
|
|
||||||
icon.addPixmap(QtGui.QPixmap(":/plugins/CenRa_FLUX/arrow-bottom.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.commandLinkButton.setIcon(icon)
|
|
||||||
self.commandLinkButton.setIconSize(QtCore.QSize(50, 40))
|
|
||||||
self.commandLinkButton.setObjectName("commandLinkButton")
|
|
||||||
self.commandLinkButton_2 = QtWidgets.QCommandLinkButton(Dialog)
|
|
||||||
self.commandLinkButton_2.setGeometry(QtCore.QRect(460, 470, 61, 61))
|
|
||||||
self.commandLinkButton_2.setText("")
|
|
||||||
icon1 = QtGui.QIcon()
|
|
||||||
icon1.addPixmap(QtGui.QPixmap(":/plugins/CenRa_FLUX/arrow-up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.commandLinkButton_2.setIcon(icon1)
|
|
||||||
self.commandLinkButton_2.setIconSize(QtCore.QSize(50, 40))
|
|
||||||
self.commandLinkButton_2.setObjectName("commandLinkButton_2")
|
|
||||||
self.lineEdit = QtWidgets.QLineEdit(Dialog)
|
|
||||||
self.lineEdit.setEnabled(True)
|
|
||||||
self.lineEdit.setGeometry(QtCore.QRect(480, 130, 171, 21))
|
|
||||||
self.lineEdit.setAlignment(QtCore.Qt.AlignCenter)
|
|
||||||
self.lineEdit.setReadOnly(False)
|
|
||||||
self.lineEdit.setClearButtonEnabled(True)
|
|
||||||
self.lineEdit.setObjectName("lineEdit")
|
|
||||||
self.label = QtWidgets.QLabel(Dialog)
|
|
||||||
self.label.setGeometry(QtCore.QRect(40, 150, 161, 16))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Calibri")
|
|
||||||
font.setPointSize(10)
|
|
||||||
font.setItalic(False)
|
|
||||||
self.label.setFont(font)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.label_2 = QtWidgets.QLabel(Dialog)
|
|
||||||
self.label_2.setGeometry(QtCore.QRect(30, 530, 171, 16))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Calibri")
|
|
||||||
font.setPointSize(10)
|
|
||||||
font.setItalic(False)
|
|
||||||
self.label_2.setFont(font)
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
|
|
||||||
self.retranslateUi(Dialog)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, Dialog):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
Dialog.setWindowTitle(_translate("Dialog", "SIG CEN-RA"))
|
|
||||||
self.pushButton_2.setText(_translate("Dialog", "Charger les couches"))
|
|
||||||
self.tableWidget.setSortingEnabled(True)
|
|
||||||
self.lineEdit.setText(_translate("Dialog", "Recherche par mots-clés"))
|
|
||||||
self.label.setText(_translate("Dialog", "Liste des flux disponibles :"))
|
|
||||||
self.label_2.setText(_translate("Dialog", "Flux sélectionné(s) à charger :"))
|
|
||||||
|
|
||||||
'''
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Dialog(object):
|
|
||||||
def setupUi(self, Dialog):
|
|
||||||
Dialog.setObjectName("Dialog")
|
|
||||||
Dialog.setEnabled(True)
|
|
||||||
Dialog.resize(910, 800)
|
|
||||||
Dialog.setMinimumSize(QtCore.QSize(910, 800))
|
|
||||||
Dialog.setMaximumSize(QtCore.QSize(910, 800))
|
|
||||||
self.comboBox = QtWidgets.QComboBox(Dialog)
|
|
||||||
self.comboBox.setGeometry(QtCore.QRect(260, 130, 171, 22))
|
|
||||||
self.comboBox.setEditable(False)
|
|
||||||
self.comboBox.setCurrentText("")
|
|
||||||
self.comboBox.setObjectName("comboBox")
|
|
||||||
self.label_3 = QtWidgets.QLabel(Dialog)
|
|
||||||
self.label_3.setGeometry(QtCore.QRect(350, 20, 221, 71))
|
|
||||||
self.label_3.setText("")
|
|
||||||
self.label_3.setPixmap(QtGui.QPixmap(":/plugins/FluxCEN/logo.png"))
|
|
||||||
self.label_3.setScaledContents(True)
|
|
||||||
self.label_3.setObjectName("label_3")
|
|
||||||
self.pushButton_2 = QtWidgets.QPushButton(Dialog)
|
|
||||||
self.pushButton_2.setGeometry(QtCore.QRect(370, 750, 171, 23))
|
|
||||||
self.pushButton_2.setObjectName("pushButton_2")
|
|
||||||
self.tableWidget = QtWidgets.QTableWidget(Dialog)
|
|
||||||
self.tableWidget.setEnabled(True)
|
|
||||||
self.tableWidget.setGeometry(QtCore.QRect(30, 170, 850, 281))
|
|
||||||
self.tableWidget.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
|
|
||||||
self.tableWidget.setObjectName("tableWidget")
|
|
||||||
self.tableWidget.setColumnCount(0)
|
|
||||||
self.tableWidget.setRowCount(0)
|
|
||||||
self.tableWidget_2 = QtWidgets.QTableWidget(Dialog)
|
|
||||||
self.tableWidget_2.setGeometry(QtCore.QRect(30, 550, 850, 181))
|
|
||||||
self.tableWidget_2.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
|
|
||||||
self.tableWidget_2.setObjectName("tableWidget_2")
|
|
||||||
self.tableWidget_2.setColumnCount(0)
|
|
||||||
self.tableWidget_2.setRowCount(0)
|
|
||||||
self.commandLinkButton = QtWidgets.QCommandLinkButton(Dialog)
|
|
||||||
self.commandLinkButton.setGeometry(QtCore.QRect(400, 470, 61, 61))
|
|
||||||
self.commandLinkButton.setText("")
|
|
||||||
icon = QtGui.QIcon()
|
|
||||||
icon.addPixmap(QtGui.QPixmap(":/plugins/FluxCEN/arrow-bottom.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.commandLinkButton.setIcon(icon)
|
|
||||||
self.commandLinkButton.setIconSize(QtCore.QSize(50, 40))
|
|
||||||
self.commandLinkButton.setObjectName("commandLinkButton")
|
|
||||||
self.commandLinkButton_2 = QtWidgets.QCommandLinkButton(Dialog)
|
|
||||||
self.commandLinkButton_2.setGeometry(QtCore.QRect(460, 470, 61, 61))
|
|
||||||
self.commandLinkButton_2.setText("")
|
|
||||||
icon1 = QtGui.QIcon()
|
|
||||||
icon1.addPixmap(QtGui.QPixmap(":/plugins/FluxCEN/arrow-up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.commandLinkButton_2.setIcon(icon1)
|
|
||||||
self.commandLinkButton_2.setIconSize(QtCore.QSize(50, 40))
|
|
||||||
self.commandLinkButton_2.setObjectName("commandLinkButton_2")
|
|
||||||
self.lineEdit = QtWidgets.QLineEdit(Dialog)
|
|
||||||
self.lineEdit.setEnabled(True)
|
|
||||||
self.lineEdit.setGeometry(QtCore.QRect(480, 130, 171, 21))
|
|
||||||
self.lineEdit.setAlignment(QtCore.Qt.AlignCenter)
|
|
||||||
self.lineEdit.setReadOnly(False)
|
|
||||||
self.lineEdit.setClearButtonEnabled(True)
|
|
||||||
self.lineEdit.setObjectName("lineEdit")
|
|
||||||
self.commandLinkButton_3 = QtWidgets.QCommandLinkButton(Dialog)
|
|
||||||
self.commandLinkButton_3.setGeometry(QtCore.QRect(690, 20, 201, 41))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Segoe UI")
|
|
||||||
font.setPointSize(9)
|
|
||||||
self.commandLinkButton_3.setFont(font)
|
|
||||||
icon2 = QtGui.QIcon()
|
|
||||||
icon2.addPixmap(QtGui.QPixmap(":/plugins/FluxCEN/globe.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.commandLinkButton_3.setIcon(icon2)
|
|
||||||
self.commandLinkButton_3.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.commandLinkButton_3.setObjectName("commandLinkButton_3")
|
|
||||||
self.label = QtWidgets.QLabel(Dialog)
|
|
||||||
self.label.setGeometry(QtCore.QRect(40, 150, 161, 16))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Calibri")
|
|
||||||
font.setPointSize(10)
|
|
||||||
font.setItalic(False)
|
|
||||||
self.label.setFont(font)
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
self.label_2 = QtWidgets.QLabel(Dialog)
|
|
||||||
self.label_2.setGeometry(QtCore.QRect(30, 530, 171, 16))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Calibri")
|
|
||||||
font.setPointSize(10)
|
|
||||||
font.setItalic(False)
|
|
||||||
self.label_2.setFont(font)
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
self.commandLinkButton_4 = QtWidgets.QCommandLinkButton(Dialog)
|
|
||||||
self.commandLinkButton_4.setGeometry(QtCore.QRect(690, 60, 201, 41))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Segoe UI")
|
|
||||||
font.setPointSize(9)
|
|
||||||
self.commandLinkButton_4.setFont(font)
|
|
||||||
icon3 = QtGui.QIcon()
|
|
||||||
icon3.addPixmap(QtGui.QPixmap(":/plugins/FluxCEN/orthos.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.commandLinkButton_4.setIcon(icon3)
|
|
||||||
self.commandLinkButton_4.setIconSize(QtCore.QSize(20, 20))
|
|
||||||
self.commandLinkButton_4.setObjectName("commandLinkButton_4")
|
|
||||||
self.commandLinkButton_5 = QtWidgets.QCommandLinkButton(Dialog)
|
|
||||||
self.commandLinkButton_5.setGeometry(QtCore.QRect(860, 750, 41, 41))
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Segoe UI")
|
|
||||||
font.setPointSize(9)
|
|
||||||
self.commandLinkButton_5.setFont(font)
|
|
||||||
self.commandLinkButton_5.setText("")
|
|
||||||
icon4 = QtGui.QIcon()
|
|
||||||
icon4.addPixmap(QtGui.QPixmap(":/plugins/FluxCEN/info.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
||||||
self.commandLinkButton_5.setIcon(icon4)
|
|
||||||
self.commandLinkButton_5.setIconSize(QtCore.QSize(25, 25))
|
|
||||||
self.commandLinkButton_5.setObjectName("commandLinkButton_5")
|
|
||||||
|
|
||||||
self.retranslateUi(Dialog)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, Dialog):
|
|
||||||
_translate = QtCore.QCoreApplication.translate
|
|
||||||
Dialog.setWindowTitle(_translate("Dialog", "FluxCEN"))
|
|
||||||
self.pushButton_2.setText(_translate("Dialog", "Charger les couches"))
|
|
||||||
self.tableWidget.setSortingEnabled(True)
|
|
||||||
self.lineEdit.setText(_translate("Dialog", "Recherche par mots-clés"))
|
|
||||||
self.commandLinkButton_3.setText(_translate("Dialog", " Ajouter fond de carte OSM"))
|
|
||||||
self.label.setText(_translate("Dialog", "Liste des flux disponibles :"))
|
|
||||||
self.label_2.setText(_translate("Dialog", "Flux sélectionné(s) à charger :"))
|
|
||||||
self.commandLinkButton_4.setText(_translate("Dialog", "Ajouter Ortho (Google sat\')"))
|
|
||||||
|
|
||||||
'''
|
|
||||||
if __name__ == "__main__":
|
|
||||||
import sys
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
Dialog = QtWidgets.QDialog()
|
|
||||||
ui = Ui_Dialog()
|
|
||||||
ui.setupUi(Dialog)
|
|
||||||
Dialog.show()
|
|
||||||
sys.exit(app.exec_())
|
|
||||||
@@ -1,674 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
|
||||||
or can get the source code. And you must show them these terms so they
|
|
||||||
know their rights.
|
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
|
||||||
that there is no warranty for this free software. For both users' and
|
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
|
||||||
changed, so that their problems will not be attributed erroneously to
|
|
||||||
authors of previous versions.
|
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the special requirements of the GNU Affero General Public License,
|
|
||||||
section 13, concerning interaction through a network will apply to the
|
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
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 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
|
||||||
notice like this when it starts in an interactive mode:
|
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
||||||
@@ -1,244 +0,0 @@
|
|||||||
#/***************************************************************************
|
|
||||||
# FluxCEN
|
|
||||||
#
|
|
||||||
# Flux IGN etc etc
|
|
||||||
# -------------------
|
|
||||||
# begin : 2022-04-04
|
|
||||||
# git sha : $Format:%H$
|
|
||||||
# copyright : (C) 2022 by Romain Montillet
|
|
||||||
# email : r.montillet@cen-na.org
|
|
||||||
# ***************************************************************************/
|
|
||||||
#
|
|
||||||
#/***************************************************************************
|
|
||||||
# * *
|
|
||||||
# * 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. *
|
|
||||||
# * *
|
|
||||||
# ***************************************************************************/
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# Edit the following to match your sources lists
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
|
|
||||||
#Add iso code for any locales you want to support here (space separated)
|
|
||||||
# default is no locales
|
|
||||||
# LOCALES = af
|
|
||||||
LOCALES =
|
|
||||||
|
|
||||||
# If locales are enabled, set the name of the lrelease binary on your system. If
|
|
||||||
# you have trouble compiling the translations, you may have to specify the full path to
|
|
||||||
# lrelease
|
|
||||||
#LRELEASE = lrelease
|
|
||||||
#LRELEASE = lrelease-qt4
|
|
||||||
|
|
||||||
|
|
||||||
# translation
|
|
||||||
SOURCES = \
|
|
||||||
__init__.py \
|
|
||||||
FluxCEN.py FluxCEN_dialog.py
|
|
||||||
|
|
||||||
PLUGINNAME = FluxCEN
|
|
||||||
|
|
||||||
PY_FILES = \
|
|
||||||
__init__.py \
|
|
||||||
FluxCEN.py FluxCEN_dialog.py
|
|
||||||
|
|
||||||
UI_FILES = FluxCEN_dialog_base.ui
|
|
||||||
|
|
||||||
EXTRAS = metadata.txt icon.png
|
|
||||||
|
|
||||||
EXTRA_DIRS =
|
|
||||||
|
|
||||||
COMPILED_RESOURCE_FILES = resources.py
|
|
||||||
|
|
||||||
PEP8EXCLUDE=pydev,resources.py,conf.py,third_party,ui
|
|
||||||
|
|
||||||
# QGISDIR points to the location where your plugin should be installed.
|
|
||||||
# This varies by platform, relative to your HOME directory:
|
|
||||||
# * Linux:
|
|
||||||
# .local/share/QGIS/QGIS3/profiles/default/python/plugins/
|
|
||||||
# * Mac OS X:
|
|
||||||
# Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
|
|
||||||
# * Windows:
|
|
||||||
# AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins'
|
|
||||||
|
|
||||||
QGISDIR=C:\Users\Romain\AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# Normally you would not need to edit below here
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
HELP = help/build/html
|
|
||||||
|
|
||||||
PLUGIN_UPLOAD = $(c)/plugin_upload.py
|
|
||||||
|
|
||||||
RESOURCE_SRC=$(shell grep '^ *<file' resources.qrc | sed 's@</file>@@g;s/.*>//g' | tr '\n' ' ')
|
|
||||||
|
|
||||||
.PHONY: default
|
|
||||||
default:
|
|
||||||
@echo While you can use make to build and deploy your plugin, pb_tool
|
|
||||||
@echo is a much better solution.
|
|
||||||
@echo A Python script, pb_tool provides platform independent management of
|
|
||||||
@echo your plugins and runs anywhere.
|
|
||||||
@echo You can install pb_tool using: pip install pb_tool
|
|
||||||
@echo See https://g-sherman.github.io/plugin_build_tool/ for info.
|
|
||||||
|
|
||||||
compile: $(COMPILED_RESOURCE_FILES)
|
|
||||||
|
|
||||||
%.py : %.qrc $(RESOURCES_SRC)
|
|
||||||
pyrcc5 -o $*.py $<
|
|
||||||
|
|
||||||
%.qm : %.ts
|
|
||||||
$(LRELEASE) $<
|
|
||||||
|
|
||||||
test: compile transcompile
|
|
||||||
@echo
|
|
||||||
@echo "----------------------"
|
|
||||||
@echo "Regression Test Suite"
|
|
||||||
@echo "----------------------"
|
|
||||||
|
|
||||||
@# Preceding dash means that make will continue in case of errors
|
|
||||||
@-export PYTHONPATH=`pwd`:$(PYTHONPATH); \
|
|
||||||
export QGIS_DEBUG=0; \
|
|
||||||
export QGIS_LOG_FILE=/dev/null; \
|
|
||||||
nosetests -v --with-id --with-coverage --cover-package=. \
|
|
||||||
3>&1 1>&2 2>&3 3>&- || true
|
|
||||||
@echo "----------------------"
|
|
||||||
@echo "If you get a 'no module named qgis.core error, try sourcing"
|
|
||||||
@echo "the helper script we have provided first then run make test."
|
|
||||||
@echo "e.g. source run-env-linux.sh <path to qgis install>; make test"
|
|
||||||
@echo "----------------------"
|
|
||||||
|
|
||||||
deploy: compile doc transcompile
|
|
||||||
@echo
|
|
||||||
@echo "------------------------------------------"
|
|
||||||
@echo "Deploying plugin to your .qgis2 directory."
|
|
||||||
@echo "------------------------------------------"
|
|
||||||
# The deploy target only works on unix like operating system where
|
|
||||||
# the Python plugin directory is located at:
|
|
||||||
# $HOME/$(QGISDIR)/python/plugins
|
|
||||||
mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
|
||||||
cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
|
||||||
cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
|
||||||
cp -vf $(COMPILED_RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
|
||||||
cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
|
||||||
cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
|
||||||
cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help
|
|
||||||
# Copy extra directories if any
|
|
||||||
(foreach EXTRA_DIR,(EXTRA_DIRS), cp -R (EXTRA_DIR) (HOME)/(QGISDIR)/python/plugins/(PLUGINNAME)/;)
|
|
||||||
|
|
||||||
|
|
||||||
# The dclean target removes compiled python files from plugin directory
|
|
||||||
# also deletes any .git entry
|
|
||||||
dclean:
|
|
||||||
@echo
|
|
||||||
@echo "-----------------------------------"
|
|
||||||
@echo "Removing any compiled python files."
|
|
||||||
@echo "-----------------------------------"
|
|
||||||
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete
|
|
||||||
find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} \;
|
|
||||||
|
|
||||||
|
|
||||||
derase:
|
|
||||||
@echo
|
|
||||||
@echo "-------------------------"
|
|
||||||
@echo "Removing deployed plugin."
|
|
||||||
@echo "-------------------------"
|
|
||||||
rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
|
|
||||||
|
|
||||||
zip: deploy dclean
|
|
||||||
@echo
|
|
||||||
@echo "---------------------------"
|
|
||||||
@echo "Creating plugin zip bundle."
|
|
||||||
@echo "---------------------------"
|
|
||||||
# The zip target deploys the plugin and creates a zip file with the deployed
|
|
||||||
# content. You can then upload the zip file on http://plugins.qgis.org
|
|
||||||
rm -f $(PLUGINNAME).zip
|
|
||||||
cd $(HOME)/$(QGISDIR)/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME)
|
|
||||||
|
|
||||||
package: compile
|
|
||||||
# Create a zip package of the plugin named $(PLUGINNAME).zip.
|
|
||||||
# This requires use of git (your plugin development directory must be a
|
|
||||||
# git repository).
|
|
||||||
# To use, pass a valid commit or tag as follows:
|
|
||||||
# make package VERSION=Version_0.3.2
|
|
||||||
@echo
|
|
||||||
@echo "------------------------------------"
|
|
||||||
@echo "Exporting plugin to zip package. "
|
|
||||||
@echo "------------------------------------"
|
|
||||||
rm -f $(PLUGINNAME).zip
|
|
||||||
git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION)
|
|
||||||
echo "Created package: $(PLUGINNAME).zip"
|
|
||||||
|
|
||||||
upload: zip
|
|
||||||
@echo
|
|
||||||
@echo "-------------------------------------"
|
|
||||||
@echo "Uploading plugin to QGIS Plugin repo."
|
|
||||||
@echo "-------------------------------------"
|
|
||||||
$(PLUGIN_UPLOAD) $(PLUGINNAME).zip
|
|
||||||
|
|
||||||
transup:
|
|
||||||
@echo
|
|
||||||
@echo "------------------------------------------------"
|
|
||||||
@echo "Updating translation files with any new strings."
|
|
||||||
@echo "------------------------------------------------"
|
|
||||||
@chmod +x scripts/update-strings.sh
|
|
||||||
@scripts/update-strings.sh $(LOCALES)
|
|
||||||
|
|
||||||
transcompile:
|
|
||||||
@echo
|
|
||||||
@echo "----------------------------------------"
|
|
||||||
@echo "Compiled translation files to .qm files."
|
|
||||||
@echo "----------------------------------------"
|
|
||||||
@chmod +x scripts/compile-strings.sh
|
|
||||||
@scripts/compile-strings.sh $(LRELEASE) $(LOCALES)
|
|
||||||
|
|
||||||
transclean:
|
|
||||||
@echo
|
|
||||||
@echo "------------------------------------"
|
|
||||||
@echo "Removing compiled translation files."
|
|
||||||
@echo "------------------------------------"
|
|
||||||
rm -f i18n/*.qm
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo
|
|
||||||
@echo "------------------------------------"
|
|
||||||
@echo "Removing uic and rcc generated files"
|
|
||||||
@echo "------------------------------------"
|
|
||||||
rm $(COMPILED_UI_FILES) $(COMPILED_RESOURCE_FILES)
|
|
||||||
|
|
||||||
doc:
|
|
||||||
@echo
|
|
||||||
@echo "------------------------------------"
|
|
||||||
@echo "Building documentation using sphinx."
|
|
||||||
@echo "------------------------------------"
|
|
||||||
cd help; make html
|
|
||||||
|
|
||||||
pylint:
|
|
||||||
@echo
|
|
||||||
@echo "-----------------"
|
|
||||||
@echo "Pylint violations"
|
|
||||||
@echo "-----------------"
|
|
||||||
@pylint --reports=n --rcfile=pylintrc . || true
|
|
||||||
@echo
|
|
||||||
@echo "----------------------"
|
|
||||||
@echo "If you get a 'no module named qgis.core' error, try sourcing"
|
|
||||||
@echo "the helper script we have provided first then run make pylint."
|
|
||||||
@echo "e.g. source run-env-linux.sh <path to qgis install>; make pylint"
|
|
||||||
@echo "----------------------"
|
|
||||||
|
|
||||||
|
|
||||||
# Run pep8 style checking
|
|
||||||
#http://pypi.python.org/pypi/pep8
|
|
||||||
pep8:
|
|
||||||
@echo
|
|
||||||
@echo "-----------"
|
|
||||||
@echo "PEP8 issues"
|
|
||||||
@echo "-----------"
|
|
||||||
@pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude $(PEP8EXCLUDE) . || true
|
|
||||||
@echo "-----------"
|
|
||||||
@echo "Ignored in PEP8 check:"
|
|
||||||
@echo $(PEP8EXCLUDE)
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<html>
|
|
||||||
<body>
|
|
||||||
<h3>Plugin Builder Results</h3>
|
|
||||||
|
|
||||||
Congratulations! You just built a plugin for QGIS!<br/><br />
|
|
||||||
|
|
||||||
<div id='help' style='font-size:.9em;'>
|
|
||||||
Your plugin <b>FluxCEN</b> was created in:<br>
|
|
||||||
<b>C:\Users\Romain\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\fluxcen</b>
|
|
||||||
<p>
|
|
||||||
Your QGIS plugin directory is located at:<br>
|
|
||||||
<b>C:/Users/Romain/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins</b>
|
|
||||||
<p>
|
|
||||||
<h3>What's Next</h3>
|
|
||||||
<ol>
|
|
||||||
<li>If resources.py is not present in your plugin directory, compile the resources file using pyrcc5 (simply use <b>pb_tool</b> or <b>make</b> if you have automake)
|
|
||||||
<li>Optionally, test the generated sources using <b>make test</b> (or run tests from your IDE)
|
|
||||||
<li>Copy the entire directory containing your new plugin to the QGIS plugin directory (see Notes below)
|
|
||||||
<li>Test the plugin by enabling it in the QGIS plugin manager
|
|
||||||
<li>Customize it by editing the implementation file <b>FluxCEN.py</b>
|
|
||||||
<li>Create your own custom icon, replacing the default <b>icon.png</b>
|
|
||||||
<li>Modify your user interface by opening <b>FluxCEN_dialog_base.ui</b> in Qt Designer
|
|
||||||
</ol>
|
|
||||||
Notes:
|
|
||||||
<ul>
|
|
||||||
<li>You can use <b>pb_tool</b> to compile, deploy, and manage your plugin. Tweak the <i>pb_tool.cfg</i> file included with your plugin as you add files. Install <b>pb_tool</b> using
|
|
||||||
<i>pip</i> or <i>easy_install</i>. See <b>http://loc8.cc/pb_tool</b> for more information.
|
|
||||||
<li>You can also use the <b>Makefile</b> to compile and deploy when you
|
|
||||||
make changes. This requires GNU make (gmake). The Makefile is ready to use, however you
|
|
||||||
will have to edit it to add addional Python source files, dialogs, and translations.
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div style='font-size:.9em;'>
|
|
||||||
<p>
|
|
||||||
For information on writing PyQGIS code, see <b>http://loc8.cc/pyqgis_resources</b> for a list of resources.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
©2011-2019 GeoApt LLC - geoapt.com
|
|
||||||
</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,60 +1,6 @@
|
|||||||
# <p align="center">FluxCEN</p>
|
|
||||||
|
|
||||||
<img align="left" src=https://raw.githubusercontent.com/CEN-Nouvelle-Aquitaine/fluxcen/main/icon.png width="220"/>
|
> [Point de départ de création du plugin](https://github.com/CEN-Nouvelle-Aquitaine/MapCEN)
|
||||||
<br>
|
|
||||||
<br>
|
Le plugin QGIS CenRa_FLUX permet d'accéder rapidement à un large éventail de données organisés dans PostGIS par catégories et interrogeables sous forme de mots-clés.
|
||||||
<br>
|
|
||||||
Le plugin QGIS FluxCEN permet d'accéder rapidement à un large éventail de flux WFS/WMS organisés par catégories et interrogeables sous forme de mots-clés.
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
Il évite ainsi d'avoir à gérer dans QGIS une multitude de connexions.
|
Il évite ainsi d'avoir à gérer dans QGIS une multitude de connexions.
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
## 🧐 Features
|
|
||||||
- Sélection rapide des ressources par autocomplétion
|
|
||||||
- Regroupement des flux au sein de catégories
|
|
||||||
- Gestion des styles par défaut à l'ouverture dans QGIS pour les données WFS
|
|
||||||
- Centralisation et gestion des flux simplifiée dans un fichier .csv
|
|
||||||
- Code et ressources attachées gérées directement via le git
|
|
||||||
- Prise en charge des flux Geoserver et Mapserver
|
|
||||||
- Lien direct vers la fiche de métadonnées de la ressource
|
|
||||||
|
|
||||||
## Composition du fichier .csv
|
|
||||||
|
|
||||||
* service : type de service utilisé (WFS ou WMS)
|
|
||||||
* categorie : categorie de la couche pour affichage et recherche dans le plugin
|
|
||||||
* Nom_couche_plugin : nom de la couche qui s'affichera dans le plugin
|
|
||||||
* nom_technique : nom technique de la couche utilisé sur le serveur source (caché dans le plugin)
|
|
||||||
* url : URL du serveur pour accéder à la couche
|
|
||||||
* source : Source de la donnée
|
|
||||||
* style : nom du fichier de style pour affichage à l'ouverture dans QGIS
|
|
||||||
* metadonnees : URL d'accès à la fiche de métadonnées liée à la resource
|
|
||||||
|
|
||||||
Exemple pour accéder à la BD ORTHO® :
|
|
||||||
|
|
||||||
| service | categorie | Nom_couche_plugin | nom_technique | url | source | style |
|
|
||||||
| -------- | -------- | -------- | -------- | -------- |-------- | -------- |
|
|
||||||
| WMS Raster| Fonds cartos | BD ORTHO® | HR.ORTHOIMAGERY.ORTHOPHOTOS |https://wxs.ign.fr/ortho/geoportail/r/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities| IGN | |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Style des couches
|
|
||||||
|
|
||||||
Le dossier *styles_couches* stocke les styles QGIS au format .qml afin d'appliquer par défaut ce style à l'ouverture de la couche dans QGIS. L'ajout d'un style dans ce dossier nécessite de reporter le nom du fichier .qml dans le champ "style" du csv.
|
|
||||||
|
|
||||||
|
|
||||||
## Accès aux données protégées
|
|
||||||
|
|
||||||
Si l'accès à la majorité des ressources reste public, certaines peuvent être protégées par un mot de passe (données métier confidentielles par exemple).
|
|
||||||
|
|
||||||
Cette authentification est gérée via le serveur cartographique qui génère les flux.
|
|
||||||
Pour y accéder, il faut créer en amont une authentification dans QGIS. L'ouverture des données protégées se fera alors à partir de la première authentification enregistrée dans QGIS (pas de gestion multi-authentification pour le moment)
|
|
||||||
|
|
||||||
## Interface du plugin:
|
|
||||||
|
|
||||||
<img align="center" src=https://raw.githubusercontent.com/CEN-Nouvelle-Aquitaine/fluxcen/main/fluxcen_interface.PNG width="600"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
Plugin Builder Results
|
|
||||||
|
|
||||||
Your plugin FluxCEN was created in:
|
|
||||||
C:\Users\Romain\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\fluxcen
|
|
||||||
|
|
||||||
Your QGIS plugin directory is located at:
|
|
||||||
C:/Users/Romain/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins
|
|
||||||
|
|
||||||
What's Next:
|
|
||||||
|
|
||||||
* Copy the entire directory containing your new plugin to the QGIS plugin
|
|
||||||
directory
|
|
||||||
|
|
||||||
* Compile the resources file using pyrcc5
|
|
||||||
|
|
||||||
* Run the tests (``make test``)
|
|
||||||
|
|
||||||
* Test the plugin by enabling it in the QGIS plugin manager
|
|
||||||
|
|
||||||
* Customize it by editing the implementation file: ``FluxCEN.py``
|
|
||||||
|
|
||||||
* Create your own custom icon, replacing the default icon.png
|
|
||||||
|
|
||||||
* Modify your user interface by opening FluxCEN_dialog_base.ui in Qt Designer
|
|
||||||
|
|
||||||
* You can use the Makefile to compile your Ui and resource files when
|
|
||||||
you make changes. This requires GNU make (gmake)
|
|
||||||
|
|
||||||
For more information, see the PyQGIS Developer Cookbook at:
|
|
||||||
http://www.qgis.org/pyqgis-cookbook/index.html
|
|
||||||
|
|
||||||
(C) 2011-2018 GeoApt LLC - geoapt.com
|
|
||||||
@@ -1,36 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
|
||||||
/***************************************************************************
|
|
||||||
FluxCEN
|
|
||||||
A QGIS plugin
|
|
||||||
Flux IGN etc etc
|
|
||||||
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
|
||||||
-------------------
|
|
||||||
begin : 2022-04-04
|
|
||||||
copyright : (C) 2022 by Romain Montillet
|
|
||||||
email : r.montillet@cen-na.org
|
|
||||||
git sha : $Format:%H$
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
/***************************************************************************
|
def classFactory(iface):
|
||||||
* *
|
_ = iface
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
from CenRa_FLUX.CenRa_Flux import PgFlux
|
||||||
* it under the terms of the GNU General Public License as published by *
|
return PgFlux()
|
||||||
* the Free Software Foundation; either version 2 of the License, or *
|
|
||||||
* (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
***************************************************************************/
|
|
||||||
This script initializes the plugin, making it known to QGIS.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
# noinspection PyPep8Naming
|
|
||||||
def classFactory(iface): # pylint: disable=invalid-name
|
|
||||||
"""Load FluxCEN class from file FluxCEN.
|
|
||||||
|
|
||||||
:param iface: A QGIS interface instance.
|
|
||||||
:type iface: QgsInterface
|
|
||||||
"""
|
|
||||||
#
|
|
||||||
from .FluxCEN import FluxCEN
|
|
||||||
return FluxCEN(iface)
|
|
||||||
|
|||||||
@@ -3,21 +3,21 @@ import os.path
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from qgis.PyQt import uic
|
from qgis.PyQt import uic
|
||||||
from qgis.PyQt.QtGui import QPixmap
|
# from qgis.PyQt.QtGui import QPixmap
|
||||||
from qgis.PyQt.QtWidgets import QDialog
|
from qgis.PyQt.QtWidgets import QDialog
|
||||||
|
|
||||||
from ..tools.resources import devlog
|
from .tools.resources import devlog
|
||||||
|
|
||||||
ABOUT_FORM_CLASS, _ = uic.loadUiType(
|
ABOUT_FORM_CLASS, _ = uic.loadUiType(
|
||||||
os.path.join(
|
os.path.join(
|
||||||
str(Path(__file__).resolve().parent.parent),
|
str(Path(__file__).resolve().parent),
|
||||||
'forms',
|
'tools/ui',
|
||||||
'flux_about_form.ui'
|
'CenRa_about_form.ui'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class FluxAboutDialog(QDialog, ABOUT_FORM_CLASS):
|
class AboutDialog(QDialog, ABOUT_FORM_CLASS):
|
||||||
|
|
||||||
""" About - Let the user display the about dialog. """
|
""" About - Let the user display the about dialog. """
|
||||||
|
|
||||||
@@ -0,0 +1,619 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
# Import the PyQt and QGIS libraries
|
||||||
|
# from builtins import next
|
||||||
|
from builtins import str
|
||||||
|
# from builtins import object
|
||||||
|
|
||||||
|
from qgis.PyQt import QtCore, QtGui
|
||||||
|
from qgis.PyQt.QtCore import QSettings
|
||||||
|
from qgis.PyQt import QtWidgets
|
||||||
|
# from qgis.PyQt.QtWidgets import QDialog
|
||||||
|
from qgis.PyQt.QtGui import QIcon
|
||||||
|
|
||||||
|
# from qgis.PyQt.QtCore import *
|
||||||
|
|
||||||
|
# from qgis.core import QgsCoordinateReferenceSystem, QgsCoordinateTransform, QgsProject, QgsSettings
|
||||||
|
from qgis.core import QgsDataSourceUri, QgsCoordinateReferenceSystem, QgsCoordinateTransform, QgsProject, QgsSettings, QgsApplication, QgsVectorLayer, QgsRasterLayer, QgsWkbTypes
|
||||||
|
from qgis.PyQt.QtWidgets import (
|
||||||
|
QDialog,
|
||||||
|
# QAction,
|
||||||
|
# QDockWidget,
|
||||||
|
# QFileDialog,
|
||||||
|
# QInputDialog,
|
||||||
|
# QMenu,
|
||||||
|
# QToolButton,
|
||||||
|
# QTableWidget,
|
||||||
|
QTableWidgetItem,
|
||||||
|
QMessageBox,
|
||||||
|
QVBoxLayout,
|
||||||
|
)
|
||||||
|
from .tools.SQLRequet import schemaname_list, schemaname_list_ref, schemaname_distinct
|
||||||
|
from .tools.resources import (
|
||||||
|
load_ui,
|
||||||
|
resources_path,
|
||||||
|
# send_issues,
|
||||||
|
)
|
||||||
|
try:
|
||||||
|
from .tools.PythonSQL import login_base
|
||||||
|
except NameError:
|
||||||
|
print('Pas de fichier PythonSQL')
|
||||||
|
|
||||||
|
|
||||||
|
# from .issues import CenRa_Issues
|
||||||
|
|
||||||
|
# from ast import literal_eval
|
||||||
|
from qgis.utils import iface
|
||||||
|
# import os.path
|
||||||
|
# import os
|
||||||
|
# import webbrowser
|
||||||
|
import psycopg2
|
||||||
|
import psycopg2.extras
|
||||||
|
# import base64
|
||||||
|
|
||||||
|
global DeBUG
|
||||||
|
DeBUG = 0
|
||||||
|
|
||||||
|
itemIconRaster = QTableWidgetItem()
|
||||||
|
icon = QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap(resources_path('icons', 'mIconRaster.svg')), QIcon.Mode(0), QIcon.State(1))
|
||||||
|
itemIconRaster.setIcon(icon)
|
||||||
|
|
||||||
|
itemIconVecteur = QTableWidgetItem()
|
||||||
|
icon = QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap(resources_path('icons', 'mIconVecteur.svg')), QIcon.Mode(0), QIcon.State(1))
|
||||||
|
itemIconVecteur.setIcon(icon)
|
||||||
|
|
||||||
|
try:
|
||||||
|
account = login_base('account')
|
||||||
|
user = account[0]
|
||||||
|
mdp = account[1]
|
||||||
|
host = account[2]
|
||||||
|
port = account[3]
|
||||||
|
dbname = account[4]
|
||||||
|
sigdb = account[5]
|
||||||
|
refdb = account[6]
|
||||||
|
|
||||||
|
except NameError:
|
||||||
|
print('Fails to login DB for account')
|
||||||
|
|
||||||
|
EDITOR_CLASS = load_ui('CenRa_Flux_base.ui')
|
||||||
|
|
||||||
|
targetCrs = QgsCoordinateReferenceSystem('EPSG:4326')
|
||||||
|
layerCrs = QgsCoordinateReferenceSystem('EPSG:2154')
|
||||||
|
TranformCRS = QgsCoordinateTransform(layerCrs, targetCrs, QgsProject.instance())
|
||||||
|
|
||||||
|
|
||||||
|
class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
_ = parent
|
||||||
|
super().__init__()
|
||||||
|
self.setupUi(self)
|
||||||
|
self.settings = QgsSettings()
|
||||||
|
self.s = QSettings()
|
||||||
|
self.setWindowIcon(QtGui.QIcon(resources_path('icons', 'icon.png')))
|
||||||
|
self.first_start = None
|
||||||
|
self.iface = iface
|
||||||
|
self.label_3.setPixmap(QtGui.QPixmap(resources_path('ui', 'logo.png')))
|
||||||
|
self.commandLinkButton.setIcon(QtGui.QIcon(resources_path('ui', 'arrow-bottom.png')))
|
||||||
|
self.commandLinkButton_2.setIcon(QtGui.QIcon(resources_path('ui', 'arrow-up.png')))
|
||||||
|
|
||||||
|
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger(0))
|
||||||
|
self.toolButton.setIcon(QtGui.QIcon(resources_path('ui', 'find.png')))
|
||||||
|
self.comboBox_2.addItem("SIG")
|
||||||
|
self.comboBox_2.addItem('REF')
|
||||||
|
self.comboBox.currentIndexChanged.connect(self.initialisation_flux)
|
||||||
|
self.commandLinkButton.clicked.connect(self.selection_flux)
|
||||||
|
self.tableWidget.itemDoubleClicked.connect(self.selection_flux)
|
||||||
|
self.pushButton_2.clicked.connect(self.limite_flux)
|
||||||
|
self.commandLinkButton_2.clicked.connect(self.suppression_flux)
|
||||||
|
self.tableWidget_2.itemDoubleClicked.connect(self.suppression_flux)
|
||||||
|
self.comboBox_2.currentIndexChanged.connect(self.bd_source)
|
||||||
|
self.checkBox.hide()
|
||||||
|
# self.checkBox.stateChanged.connect(self.modeCarte)
|
||||||
|
self.toolButton.clicked.connect(self.getCanevas)
|
||||||
|
layout = QVBoxLayout()
|
||||||
|
self.lineEdit.textChanged.connect(self.filtre_dynamique)
|
||||||
|
# self.viewer.textChanged.connect(self.NewTitle)
|
||||||
|
layout.addWidget(self.lineEdit)
|
||||||
|
self.viewer.hide()
|
||||||
|
self.DeBUG.addItem('')
|
||||||
|
self.DeBUG.addItem('Dev')
|
||||||
|
self.DeBUG.addItem('01')
|
||||||
|
self.DeBUG.addItem('0726')
|
||||||
|
self.DeBUG.addItem('4269')
|
||||||
|
|
||||||
|
self.DeBUG.currentIndexChanged.connect(self.SwitchDEBUG)
|
||||||
|
self.DeBUG.hide()
|
||||||
|
|
||||||
|
def raise_(self):
|
||||||
|
"""Run method that performs all the real work"""
|
||||||
|
self.bd_source()
|
||||||
|
|
||||||
|
def SwitchDEBUG(self):
|
||||||
|
try:
|
||||||
|
global user, mdp, host, port, dbname, sigdb, refdb
|
||||||
|
account = login_base(self.DeBUG.currentText())
|
||||||
|
user = account[0]
|
||||||
|
mdp = account[1]
|
||||||
|
host = account[2]
|
||||||
|
port = account[3]
|
||||||
|
dbname = account[4]
|
||||||
|
sigdb = account[5]
|
||||||
|
refdb = account[6]
|
||||||
|
self.bd_source()
|
||||||
|
|
||||||
|
except NameError:
|
||||||
|
print('Fails to switch DB for account')
|
||||||
|
|
||||||
|
def ModeDeBUG(self):
|
||||||
|
self.DeBUG.show()
|
||||||
|
|
||||||
|
def mousePressEvent(self, event):
|
||||||
|
global DeBUG
|
||||||
|
if 330 <= event.pos().x() <= 560 and 5 <= event.pos().y() <= 75:
|
||||||
|
DeBUG = DeBUG + 1
|
||||||
|
if DeBUG == 3:
|
||||||
|
DeBUG = 0
|
||||||
|
self.ModeDeBUG()
|
||||||
|
else:
|
||||||
|
DeBUG = 0
|
||||||
|
self.DeBUG.hide()
|
||||||
|
|
||||||
|
"""
|
||||||
|
def NewTitle(self):
|
||||||
|
if self.viewer.title() != '':
|
||||||
|
Tsplit = ((self.viewer.title()).split('.'))
|
||||||
|
print(Tsplit[0], Tsplit[1])
|
||||||
|
self.openPostGIS(Tsplit[0], Tsplit[1])
|
||||||
|
"""
|
||||||
|
|
||||||
|
def bd_source(self):
|
||||||
|
self.activateWindow()
|
||||||
|
bd_origine = self.comboBox_2.currentText()
|
||||||
|
if bd_origine == 'REF':
|
||||||
|
self.run_ref()
|
||||||
|
if bd_origine == 'SIG':
|
||||||
|
self.run_sig()
|
||||||
|
|
||||||
|
def run_ref(self):
|
||||||
|
"""Run method that performs all the real work"""
|
||||||
|
while self.tableWidget_2.rowCount() > 0:
|
||||||
|
self.tableWidget_2.removeRow(self.tableWidget_2.rowCount() - 1)
|
||||||
|
# print(self.tableWidget_2.rowCount())
|
||||||
|
global cur, con, dbtype
|
||||||
|
dbtype = refdb
|
||||||
|
con = psycopg2.connect("host=" + host + " port=" + port + " dbname=" + dbtype + " user=" + user + " password=" + mdp)
|
||||||
|
cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
|
||||||
|
self.initialisation_flux()
|
||||||
|
self.combobox_custom()
|
||||||
|
# Create the dialog with elements (after translation) and keep reference
|
||||||
|
# Only create GUI ONCE in callback, so that it will only load when the plugin is started
|
||||||
|
if self.first_start is True:
|
||||||
|
self.first_start = False
|
||||||
|
# show the dialog
|
||||||
|
self.show()
|
||||||
|
# Run the dialog event loop
|
||||||
|
result = self.exec()
|
||||||
|
# See if OK was pressed
|
||||||
|
if result:
|
||||||
|
# Do something useful here - delete the line containing pass and
|
||||||
|
# substitute with your code.
|
||||||
|
pass
|
||||||
|
|
||||||
|
def run_sig(self):
|
||||||
|
"""Run method that performs all the real work"""
|
||||||
|
while self.tableWidget_2.rowCount() > 0:
|
||||||
|
self.tableWidget_2.removeRow(self.tableWidget_2.rowCount() - 1)
|
||||||
|
global cur, con, dbtype
|
||||||
|
dbtype = sigdb
|
||||||
|
con = psycopg2.connect("host=" + host + " port=" + port + " dbname=" + dbtype + " user=" + user + " password=" + mdp)
|
||||||
|
cur = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
|
||||||
|
self.initialisation_flux()
|
||||||
|
self.combobox_custom()
|
||||||
|
# Create the dialog with elements (after translation) and keep reference
|
||||||
|
# Only create GUI ONCE in callback, so that it will only load when the plugin is started
|
||||||
|
if self.first_start is True:
|
||||||
|
self.first_start = False
|
||||||
|
# show the dialog
|
||||||
|
self.show()
|
||||||
|
# Run the dialog event loop
|
||||||
|
result = self.exec()
|
||||||
|
# See if OK was pressed
|
||||||
|
if result:
|
||||||
|
# Do something useful here - delete the line containing pass and
|
||||||
|
# substitute with your code.
|
||||||
|
pass
|
||||||
|
|
||||||
|
def suppression_flux(self):
|
||||||
|
self.tableWidget_2.removeRow(self.tableWidget_2.currentRow())
|
||||||
|
|
||||||
|
def initialisation_flux(self):
|
||||||
|
print('run_time')
|
||||||
|
if dbtype == sigdb:
|
||||||
|
# self.toolButton.setEnabled(1)
|
||||||
|
if self.comboBox.currentText() == 'toutes les catégories':
|
||||||
|
custom_list = schemaname_list
|
||||||
|
elif self.comboBox.currentText() == 'travaux':
|
||||||
|
custom_list = """(SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||||
|
where schemaname like '""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) UNION (SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews where schemaname like '""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) order by schemaname,tablename;"""
|
||||||
|
else:
|
||||||
|
custom_list = """(SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||||
|
where schemaname like '\\_""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) UNION (SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews where schemaname like '\\_""" + str(self.comboBox.currentText()) + """%' order by schemaname,tablename) order by schemaname,tablename;"""
|
||||||
|
else:
|
||||||
|
if self.comboBox.currentText() == 'toutes les catégories':
|
||||||
|
custom_list = schemaname_list_ref
|
||||||
|
else:
|
||||||
|
custom_list = """SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||||
|
where schemaname like '""" + str(self.comboBox.currentText()) + """' order by schemaname,tablename;"""
|
||||||
|
cur.execute(custom_list)
|
||||||
|
list_schema = cur.fetchall()
|
||||||
|
|
||||||
|
SQLcountRaster = """SELECT schemaname,viewname FROM pg_catalog.pg_views
|
||||||
|
WHERE schemaname LIKE 'public' AND viewname LIKE 'raster_columns';"""
|
||||||
|
cur.execute(SQLcountRaster)
|
||||||
|
RasterIF = len(cur.fetchall())
|
||||||
|
|
||||||
|
if RasterIF == 1:
|
||||||
|
SQLloadRaster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """
|
||||||
|
cur.execute(SQLloadRaster)
|
||||||
|
list_raster = cur.fetchall()
|
||||||
|
RasterList = []
|
||||||
|
for rasterFind in list_raster:
|
||||||
|
RasterList.append(rasterFind[0])
|
||||||
|
else:
|
||||||
|
RasterList = []
|
||||||
|
|
||||||
|
SQLprojects = """SELECT schemaname, tablename FROM pg_catalog.pg_tables WHERE tablename LIKE 'qgis_projects'"""
|
||||||
|
cur.execute(SQLprojects)
|
||||||
|
list_projects = cur.fetchall()
|
||||||
|
list_projects_qgis = []
|
||||||
|
if len(list_projects) <= 1:
|
||||||
|
for ProjectName in list_projects:
|
||||||
|
SQLProjectsQgis = """SELECT name, metadata, content FROM """ + '"' + ProjectName[0] + '"."' + ProjectName[1] + '"'
|
||||||
|
cur.execute(SQLProjectsQgis)
|
||||||
|
list_projects_qgis.append(cur.fetchall())
|
||||||
|
|
||||||
|
self.tableWidget.setRowCount(len(list_schema))
|
||||||
|
self.tableWidget.setColumnCount(4)
|
||||||
|
i = 0
|
||||||
|
for value in list_schema:
|
||||||
|
if dbtype == sigdb:
|
||||||
|
type_val = str(value[0])[1:3]
|
||||||
|
schema_name = str(value[0])[4:]
|
||||||
|
table_name = str(value[1][len(value[0]) + 1:])
|
||||||
|
if value[0] == value[1][:len(value[0])]:
|
||||||
|
table_name = str(value[1][len(value[0]) + 1:])
|
||||||
|
else:
|
||||||
|
table_name = str(value[1])
|
||||||
|
else:
|
||||||
|
type_val = ''
|
||||||
|
schema_name = str(value[0])
|
||||||
|
table_name = str(value[1])
|
||||||
|
if type_val == 'fo':
|
||||||
|
type_val = str(value[0])[1:5]
|
||||||
|
schema_name = str(value[0])[6:]
|
||||||
|
if value[0] == value[1][:len(value[0])]:
|
||||||
|
table_name = str(value[1][len(value[0]) + 1:])
|
||||||
|
else:
|
||||||
|
table_name = str(value[1])
|
||||||
|
elif type_val == 'ra':
|
||||||
|
type_val = 'travaux'
|
||||||
|
schema_name = str(value[0])
|
||||||
|
table_name = str(value[1])
|
||||||
|
elif type_val != '00' and type_val != '01' and type_val != '07' and type_val != '26' and type_val != '42' and type_val != '69' and type_val != 'ra':
|
||||||
|
type_val = 'agregation'
|
||||||
|
schema_name = str(value[0])
|
||||||
|
table_name = str(value[1])
|
||||||
|
|
||||||
|
if (str(value[0]) + '.' + str(value[1])) in RasterList:
|
||||||
|
SVG = 'mIconRaster.svg'
|
||||||
|
else:
|
||||||
|
SVG = 'mIconVecteur.svg'
|
||||||
|
|
||||||
|
itemIcon = QTableWidgetItem()
|
||||||
|
icon = QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap(resources_path('icons', SVG)), QIcon.Mode(0), QIcon.State(1))
|
||||||
|
itemIcon.setIcon(icon)
|
||||||
|
|
||||||
|
self.tableWidget.setItem(i, 0, itemIcon)
|
||||||
|
item = QTableWidgetItem(type_val)
|
||||||
|
self.tableWidget.setItem(i, 1, item)
|
||||||
|
item = QTableWidgetItem(schema_name)
|
||||||
|
self.tableWidget.setItem(i, 2, item)
|
||||||
|
item = QTableWidgetItem(table_name)
|
||||||
|
self.tableWidget.setItem(i, 3, item)
|
||||||
|
i = i + 1
|
||||||
|
|
||||||
|
SQLprojects = """SELECT schemaname, tablename FROM pg_catalog.pg_tables WHERE tablename LIKE 'qgis_projects'"""
|
||||||
|
cur.execute(SQLprojects)
|
||||||
|
list_projects = cur.fetchall()
|
||||||
|
list_projects_qgis = []
|
||||||
|
if len(list_projects) <= 1:
|
||||||
|
for ProjectName in list_projects:
|
||||||
|
SQLProjectsQgis = """SELECT name, metadata, content FROM """ + '"' + ProjectName[0] + '"."' + ProjectName[1] + '"'
|
||||||
|
cur.execute(SQLProjectsQgis)
|
||||||
|
list_projects_qgis = cur.fetchall()
|
||||||
|
for Project in list_projects_qgis:
|
||||||
|
self.tableWidget.setRowCount(i + 1)
|
||||||
|
itemIcon = QTableWidgetItem()
|
||||||
|
icon = QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap(resources_path('icons', 'mIconQgis.svg')), QIcon.Mode(0), QIcon.State(1))
|
||||||
|
itemIcon.setIcon(icon)
|
||||||
|
self.tableWidget.setItem(i, 0, itemIcon)
|
||||||
|
|
||||||
|
item = QTableWidgetItem('QGIS')
|
||||||
|
self.tableWidget.setItem(i, 1, item)
|
||||||
|
|
||||||
|
item = QTableWidgetItem('projet')
|
||||||
|
self.tableWidget.setItem(i, 2, item)
|
||||||
|
|
||||||
|
item = QTableWidgetItem(Project[0])
|
||||||
|
self.tableWidget.setItem(i, 3, item)
|
||||||
|
|
||||||
|
i = i + 1
|
||||||
|
|
||||||
|
self.tableWidget.setColumnWidth(0, 20)
|
||||||
|
self.tableWidget.setColumnWidth(1, 70)
|
||||||
|
self.tableWidget.setColumnWidth(2, 300)
|
||||||
|
self.tableWidget.setColumnWidth(3, 300)
|
||||||
|
self.tableWidget.setHorizontalHeaderLabels(["Type", "Code", "Schema", "Table"])
|
||||||
|
|
||||||
|
def selection_flux(self):
|
||||||
|
selected_row = 0
|
||||||
|
selected_items = self.tableWidget.selectedItems()
|
||||||
|
|
||||||
|
# Assuming you want to compare items in the first column for uniqueness
|
||||||
|
# svgTake = (selected_items[2].tableWidget().cellWidget(0,0))
|
||||||
|
new_item_text = selected_items[3].text()
|
||||||
|
|
||||||
|
if not self.item_already_exists(new_item_text):
|
||||||
|
self.tableWidget_2.insertRow(selected_row)
|
||||||
|
|
||||||
|
for column in range(self.tableWidget.columnCount()):
|
||||||
|
cloned_item = selected_items[column].clone()
|
||||||
|
self.tableWidget_2.setHorizontalHeaderLabels(["Type", "Code", "Schema", "Table"])
|
||||||
|
self.tableWidget_2.setColumnCount(4)
|
||||||
|
self.tableWidget_2.setItem(selected_row, column, cloned_item)
|
||||||
|
|
||||||
|
self.tableWidget_2.setColumnWidth(0, 20)
|
||||||
|
self.tableWidget_2.setColumnWidth(1, 70)
|
||||||
|
self.tableWidget_2.setColumnWidth(2, 300)
|
||||||
|
self.tableWidget_2.setColumnWidth(3, 300)
|
||||||
|
|
||||||
|
def item_already_exists(self, new_item_text):
|
||||||
|
# Assuming you want to compare items in the first column for uniqueness
|
||||||
|
existing_items = self.tableWidget_2.findItems(new_item_text, QtCore.Qt.MatchFlag(0))
|
||||||
|
# Check if there are any existing items with the same text in the first column
|
||||||
|
return len(existing_items) > 0
|
||||||
|
|
||||||
|
def limite_flux(self):
|
||||||
|
|
||||||
|
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é à 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.StandardButton(0x00004000) | QMessageBox.StandardButton(0x00010000))
|
||||||
|
if self.QMBquestion == QMessageBox.StandardButton(0x00004000):
|
||||||
|
self.chargement_flux()
|
||||||
|
|
||||||
|
if self.QMBquestion == QMessageBox.StandardButton(0x00001000):
|
||||||
|
print("Annulation du chargement des couches")
|
||||||
|
|
||||||
|
if self.tableWidget_2.rowCount() <= 5:
|
||||||
|
self.chargement_flux()
|
||||||
|
|
||||||
|
"""
|
||||||
|
def openPostGIS(self, schema, table):
|
||||||
|
uri = QgsDataSourceUri()
|
||||||
|
uri.setConnection(host, port, sigdb, user, mdp)
|
||||||
|
|
||||||
|
if (schema + '.' + table) in LRasterList:
|
||||||
|
uri.setDataSource(schema, table, "rast")
|
||||||
|
uri.setKeyColumn('rid')
|
||||||
|
uri.setSrid('2154')
|
||||||
|
layer = QgsRasterLayer(uri.uri(), table, "postgresraster")
|
||||||
|
else:
|
||||||
|
uri.setDataSource(schema, table, "geom")
|
||||||
|
uri.setKeyColumn('gid')
|
||||||
|
uri.setSrid('2154')
|
||||||
|
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
||||||
|
# Ajout de la couche au canevas QGIS
|
||||||
|
QgsProject.instance().addMapLayer(layer)
|
||||||
|
"""
|
||||||
|
|
||||||
|
def chargement_flux(self):
|
||||||
|
managerAU = QgsApplication.authManager()
|
||||||
|
managerAU.availableAuthMethodConfigs().keys()
|
||||||
|
|
||||||
|
def REQUEST(type):
|
||||||
|
switcher = {
|
||||||
|
'WFS': "GetFeature",
|
||||||
|
'WMS': "GetMap",
|
||||||
|
'WMS+Vecteur': "GetMap",
|
||||||
|
'WMS+Raster': "GetMap",
|
||||||
|
'WMTS': "GetMap"
|
||||||
|
}
|
||||||
|
return switcher.get(type, "nothing")
|
||||||
|
|
||||||
|
# def displayOnWindows(type, uri, name):
|
||||||
|
# p = []
|
||||||
|
|
||||||
|
SQLloadRaster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """
|
||||||
|
cur.execute(SQLloadRaster)
|
||||||
|
list_raster = cur.fetchall()
|
||||||
|
RasterList = []
|
||||||
|
for rasterFind in list_raster:
|
||||||
|
RasterList.append(rasterFind[0])
|
||||||
|
|
||||||
|
for row in range(0, self.tableWidget_2.rowCount()):
|
||||||
|
color_rgba = 855030089
|
||||||
|
if self.tableWidget_2.item(row, 1).background().color().rgba() != color_rgba:
|
||||||
|
# supression de la partie de l'url après le point d'interrogation
|
||||||
|
if dbtype == sigdb:
|
||||||
|
code = self.tableWidget_2.item(row, 1).text()
|
||||||
|
schema = '_' + code + '_' + self.tableWidget_2.item(row, 2).text()
|
||||||
|
if code == 'travaux' or code == 'agregation':
|
||||||
|
schema = self.tableWidget_2.item(row, 2).text()
|
||||||
|
table = self.tableWidget_2.item(row, 3).text()
|
||||||
|
else:
|
||||||
|
table = self.tableWidget_2.item(row, 3).text()
|
||||||
|
table = schema + '_' + table
|
||||||
|
elif dbtype == refdb:
|
||||||
|
# code = self.tableWidget_2.item(row,1).text()
|
||||||
|
schema = self.tableWidget_2.item(row, 2).text()
|
||||||
|
table = self.tableWidget_2.item(row, 3).text()
|
||||||
|
# .split("?", 1)[0]
|
||||||
|
uri = QgsDataSourceUri()
|
||||||
|
uri.setConnection(host, port, dbtype, user, mdp)
|
||||||
|
|
||||||
|
# nom du schéma à remplacer: "hydrographie" à supprimer et mettre "couches_collaboratives" lorsqu'on aura regroupé les couches à modifier dans un même schéma
|
||||||
|
if (schema + '.' + table) in RasterList:
|
||||||
|
uri.setDataSource(schema, table, "rast")
|
||||||
|
uri.setKeyColumn('rid')
|
||||||
|
uri.setSrid('2154')
|
||||||
|
layer = QgsRasterLayer(uri.uri(), table, "postgresraster")
|
||||||
|
QgsProject.instance().addMapLayer(layer)
|
||||||
|
elif code == 'QGIS':
|
||||||
|
schema = '_' + self.tableWidget_2.item(row, 2).text()
|
||||||
|
table = self.tableWidget_2.item(row, 3).text()
|
||||||
|
uri_project = 'postgresql://' + user + ':' + mdp + '@' + host + ':' + port + '?sslmode=disable&dbname=' + dbtype + "&schema=" + schema + '&project=' + table
|
||||||
|
QgsProject.instance().read(uri_project)
|
||||||
|
else:
|
||||||
|
uri.setDataSource(schema, table, "geom")
|
||||||
|
uri.setKeyColumn('gid')
|
||||||
|
|
||||||
|
# Chargement de la couche PostGIS
|
||||||
|
geom_type = 'SELECT right(st_geometrytype(geom),-3) as a FROM ' + schema + '.' + table + ' GROUP BY a'
|
||||||
|
cur.execute(geom_type)
|
||||||
|
list_typegeom = cur.fetchall()
|
||||||
|
if len(list_typegeom) > 1:
|
||||||
|
for typegeom in list_typegeom:
|
||||||
|
if typegeom[0] == 'MultiPolygon':
|
||||||
|
uri.setWkbType(QgsWkbTypes.MultiPolygon)
|
||||||
|
elif typegeom[0] == 'MultiLineString':
|
||||||
|
uri.setWkbType(QgsWkbTypes.MultiLineString)
|
||||||
|
elif typegeom[0] == 'Point':
|
||||||
|
uri.setWkbType(QgsWkbTypes.Point)
|
||||||
|
if typegeom[0] == 'Polygon':
|
||||||
|
uri.setWkbType(QgsWkbTypes.Polygon)
|
||||||
|
elif typegeom[0] == 'LineString':
|
||||||
|
uri.setWkbType(QgsWkbTypes.LineString)
|
||||||
|
elif typegeom[0] == 'MultiPoint':
|
||||||
|
uri.setWkbType(QgsWkbTypes.MultiPoint)
|
||||||
|
if (typegeom[0] is not None and typegeom[0] != 'Polygon'):
|
||||||
|
uri.setSrid('2154')
|
||||||
|
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
||||||
|
# Ajout de la couche au canevas QGIS
|
||||||
|
QgsProject.instance().addMapLayer(layer)
|
||||||
|
else:
|
||||||
|
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
||||||
|
# Ajout de la couche au canevas QGIS
|
||||||
|
QgsProject.instance().addMapLayer(layer)
|
||||||
|
else:
|
||||||
|
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !", "La couche «" + str(self.tableWidget_2.item(row, 1).text()) + ' ' + str(self.tableWidget_2.item(row, 2).text()) + "» ne ce trouve pas dans cette BD !", QMessageBox.StandardButton(0x00004000))
|
||||||
|
|
||||||
|
def combobox_custom(self):
|
||||||
|
if dbtype == sigdb:
|
||||||
|
self.toolButton.setEnabled(1)
|
||||||
|
self.comboBox.clear()
|
||||||
|
self.comboBox.addItem("toutes les catégories")
|
||||||
|
self.comboBox.addItem('00')
|
||||||
|
self.comboBox.addItem('01')
|
||||||
|
self.comboBox.addItem('07')
|
||||||
|
self.comboBox.addItem('26')
|
||||||
|
self.comboBox.addItem('42')
|
||||||
|
self.comboBox.addItem('69')
|
||||||
|
self.comboBox.addItem('agregation')
|
||||||
|
self.comboBox.addItem('travaux')
|
||||||
|
self.comboBox.addItem('form')
|
||||||
|
if dbtype == refdb:
|
||||||
|
self.toolButton.setEnabled(0)
|
||||||
|
custom_list = schemaname_distinct
|
||||||
|
cur.execute(custom_list)
|
||||||
|
list_schema = cur.fetchall()
|
||||||
|
self.comboBox.clear()
|
||||||
|
self.comboBox.addItem("toutes les catégories")
|
||||||
|
for baxval in list_schema:
|
||||||
|
self.comboBox.addItem(baxval[0])
|
||||||
|
|
||||||
|
def filtre_dynamique(self, filter_text):
|
||||||
|
if filter_text.find(' ') >= 0:
|
||||||
|
filter_text = filter_text.replace(" ", "_")
|
||||||
|
for i in range(self.tableWidget.rowCount()):
|
||||||
|
for j in range(self.tableWidget.columnCount()):
|
||||||
|
item = self.tableWidget.item(i, j)
|
||||||
|
match = filter_text.lower() not in item.text().lower()
|
||||||
|
self.tableWidget.setRowHidden(i, match)
|
||||||
|
if not match:
|
||||||
|
break
|
||||||
|
|
||||||
|
def getCanevas(self):
|
||||||
|
poly = iface.mapCanvas().extent()
|
||||||
|
geom = (str(poly.xMinimum()) + ',' + str(poly.yMinimum()) + ',' + str(poly.xMaximum()) + ',' + str(poly.yMaximum()))
|
||||||
|
|
||||||
|
SQL_GEOM_CONTOUR = """SELECT DISTINCT tschema,tname FROM "_agregation_ra"."_agreg_contour" WHERE st_intersects(geom,ST_MakeEnvelope(""" + geom + ",2154)) ORDER BY tname"
|
||||||
|
SQL_GEOM_HABITAT = """SELECT DISTINCT tschema,tname FROM "_agregation_ra"."_agreg_habitat" WHERE st_intersects(geom,ST_MakeEnvelope(""" + geom + ",2154)) ORDER BY tname"
|
||||||
|
SQL_GEOM_EU_HABITAT = """SELECT DISTINCT tschema,tname FROM "_agregation_ra"."_agreg_eu_habitat" WHERE st_intersects(geom,ST_MakeEnvelope(""" + geom + ",2154)) ORDER BY tname"
|
||||||
|
SQL_GEOM_TRAVAUX_PREVUS_LIGNE = """SELECT DISTINCT tschema,tname FROM "_agregation_ra"."_agreg_travaux_prevus_ligne" WHERE st_intersects(geom,ST_MakeEnvelope(""" + geom + ",2154)) ORDER BY tname"
|
||||||
|
SQL_GEOM_TRAVAUX_PREVUS_POINT = """SELECT DISTINCT tschema,tname FROM "_agregation_ra"."_agreg_travaux_prevus_point" WHERE st_intersects(geom,ST_MakeEnvelope(""" + geom + ",2154)) ORDER BY tname"
|
||||||
|
SQL_GEOM_TRAVAUX_PREVUS_POLY = """SELECT DISTINCT tschema,tname FROM "_agregation_ra"."_agreg_travaux_prevus_poly" WHERE st_intersects(geom,ST_MakeEnvelope(""" + geom + ",2154)) ORDER BY tname"
|
||||||
|
|
||||||
|
cur.execute(SQL_GEOM_CONTOUR)
|
||||||
|
TableContour = cur.fetchall()
|
||||||
|
cur.execute(SQL_GEOM_HABITAT)
|
||||||
|
TableHabitat = cur.fetchall()
|
||||||
|
cur.execute(SQL_GEOM_EU_HABITAT)
|
||||||
|
TableEuHabitat = cur.fetchall()
|
||||||
|
cur.execute(SQL_GEOM_TRAVAUX_PREVUS_LIGNE)
|
||||||
|
TableTravauxLigne = cur.fetchall()
|
||||||
|
cur.execute(SQL_GEOM_TRAVAUX_PREVUS_POINT)
|
||||||
|
TableTravauxPoint = cur.fetchall()
|
||||||
|
cur.execute(SQL_GEOM_TRAVAUX_PREVUS_POLY)
|
||||||
|
TableTravauxPoly = cur.fetchall()
|
||||||
|
|
||||||
|
TableHaveGeom = sorted(TableContour + TableHabitat + TableEuHabitat + TableTravauxLigne + TableTravauxPoint + TableTravauxPoly)
|
||||||
|
row_count = 0
|
||||||
|
self.tableWidget.setRowCount(0)
|
||||||
|
for e in TableHaveGeom:
|
||||||
|
cur.execute("""SELECT DISTINCT count(*) FROM pg_catalog.pg_tables WHERE schemaname LIKE '""" + e[0] + """' AND tablename LIKE '""" + e[1] + """';""")
|
||||||
|
TableSomme = cur.fetchall()[0][0]
|
||||||
|
|
||||||
|
if e[0][1:3] != 'fo':
|
||||||
|
DepName = QTableWidgetItem(e[0][1:3])
|
||||||
|
SchemaName = QTableWidgetItem(e[0][4:])
|
||||||
|
else:
|
||||||
|
DepName = QTableWidgetItem('form')
|
||||||
|
SchemaName = QTableWidgetItem(e[0][6:])
|
||||||
|
TableName = QTableWidgetItem(e[1][len(e[0]) + 1:])
|
||||||
|
self.tableWidget.insertRow(row_count)
|
||||||
|
|
||||||
|
itemIcon = QTableWidgetItem()
|
||||||
|
icon = QIcon()
|
||||||
|
icon.addPixmap(QtGui.QPixmap(resources_path('icons', 'mIconVecteur.svg')), QIcon.Mode(0), QIcon.State(1))
|
||||||
|
itemIcon.setIcon(icon)
|
||||||
|
|
||||||
|
self.tableWidget.setItem(row_count, 0, itemIcon)
|
||||||
|
self.tableWidget.setItem(row_count, 1, DepName)
|
||||||
|
self.tableWidget.setItem(row_count, 2, SchemaName)
|
||||||
|
self.tableWidget.setItem(row_count, 3, TableName)
|
||||||
|
if TableSomme == 0:
|
||||||
|
for j in range(self.tableWidget.columnCount()):
|
||||||
|
self.tableWidget.item(row_count, j).setBackground(QtGui.QColor(246, 185, 73, 50))
|
||||||
|
self.tableWidget.item(row_count, j).setToolTip('Couche dans une autre BD !')
|
||||||
|
row_count = row_count + 1
|
||||||
|
if self.lineEdit.text() != 'Recherche par mots-clés':
|
||||||
|
self.filtre_dynamique(self.lineEdit.text())
|
||||||
|
|
||||||
|
def SwitchGeom(self, vargeom):
|
||||||
|
new_object = '['
|
||||||
|
obj = vargeom['coordinates'][0][0]
|
||||||
|
for obj_X in obj:
|
||||||
|
new_object = new_object + '[' + str(obj_X[1]) + ',' + str(obj_X[0]) + '],'
|
||||||
|
new_object = new_object[:-1] + ']'
|
||||||
|
return (new_object)
|
||||||
|
|
||||||
|
# def popup(self):
|
||||||
|
# self.dialog = Popup() # +++ - self
|
||||||
|
# self.dialog.text_edit.show()
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
# Makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
|
||||||
SPHINXOPTS =
|
|
||||||
SPHINXBUILD = sphinx-build
|
|
||||||
PAPER =
|
|
||||||
BUILDDIR = build
|
|
||||||
|
|
||||||
# Internal variables.
|
|
||||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
|
||||||
PAPEROPT_letter = -D latex_paper_size=letter
|
|
||||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
|
||||||
|
|
||||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "Please use \`make <target>' where <target> is one of"
|
|
||||||
@echo " html to make standalone HTML files"
|
|
||||||
@echo " dirhtml to make HTML files named index.html in directories"
|
|
||||||
@echo " singlehtml to make a single large HTML file"
|
|
||||||
@echo " pickle to make pickle files"
|
|
||||||
@echo " json to make JSON files"
|
|
||||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
|
||||||
@echo " qthelp to make HTML files and a qthelp project"
|
|
||||||
@echo " devhelp to make HTML files and a Devhelp project"
|
|
||||||
@echo " epub to make an epub"
|
|
||||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
|
||||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
|
||||||
@echo " text to make text files"
|
|
||||||
@echo " man to make manual pages"
|
|
||||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
|
||||||
@echo " linkcheck to check all external links for integrity"
|
|
||||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-rm -rf $(BUILDDIR)/*
|
|
||||||
|
|
||||||
html:
|
|
||||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
|
||||||
|
|
||||||
dirhtml:
|
|
||||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
|
||||||
|
|
||||||
singlehtml:
|
|
||||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
|
||||||
|
|
||||||
pickle:
|
|
||||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can process the pickle files."
|
|
||||||
|
|
||||||
json:
|
|
||||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can process the JSON files."
|
|
||||||
|
|
||||||
htmlhelp:
|
|
||||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
|
||||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
|
||||||
|
|
||||||
qthelp:
|
|
||||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
|
||||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
|
||||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/template_class.qhcp"
|
|
||||||
@echo "To view the help file:"
|
|
||||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/template_class.qhc"
|
|
||||||
|
|
||||||
devhelp:
|
|
||||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
|
||||||
@echo
|
|
||||||
@echo "Build finished."
|
|
||||||
@echo "To view the help file:"
|
|
||||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/template_class"
|
|
||||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/template_class"
|
|
||||||
@echo "# devhelp"
|
|
||||||
|
|
||||||
epub:
|
|
||||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
|
||||||
|
|
||||||
latex:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
|
||||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
|
||||||
"(use \`make latexpdf' here to do that automatically)."
|
|
||||||
|
|
||||||
latexpdf:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo "Running LaTeX files through pdflatex..."
|
|
||||||
make -C $(BUILDDIR)/latex all-pdf
|
|
||||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
||||||
|
|
||||||
text:
|
|
||||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
|
||||||
|
|
||||||
man:
|
|
||||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
|
||||||
|
|
||||||
changes:
|
|
||||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
|
||||||
@echo
|
|
||||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
|
||||||
|
|
||||||
linkcheck:
|
|
||||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
|
||||||
@echo
|
|
||||||
@echo "Link check complete; look for any errors in the above output " \
|
|
||||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
|
||||||
|
|
||||||
doctest:
|
|
||||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
|
||||||
@echo "Testing of doctests in the sources finished, look at the " \
|
|
||||||
"results in $(BUILDDIR)/doctest/output.txt."
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
REM Command file for Sphinx documentation
|
|
||||||
|
|
||||||
if "%SPHINXBUILD%" == "" (
|
|
||||||
set SPHINXBUILD=sphinx-build
|
|
||||||
)
|
|
||||||
set BUILDDIR=build
|
|
||||||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
|
|
||||||
if NOT "%PAPER%" == "" (
|
|
||||||
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "" goto help
|
|
||||||
|
|
||||||
if "%1" == "help" (
|
|
||||||
:help
|
|
||||||
echo.Please use `make ^<target^>` where ^<target^> is one of
|
|
||||||
echo. html to make standalone HTML files
|
|
||||||
echo. dirhtml to make HTML files named index.html in directories
|
|
||||||
echo. singlehtml to make a single large HTML file
|
|
||||||
echo. pickle to make pickle files
|
|
||||||
echo. json to make JSON files
|
|
||||||
echo. htmlhelp to make HTML files and a HTML help project
|
|
||||||
echo. qthelp to make HTML files and a qthelp project
|
|
||||||
echo. devhelp to make HTML files and a Devhelp project
|
|
||||||
echo. epub to make an epub
|
|
||||||
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
|
||||||
echo. text to make text files
|
|
||||||
echo. man to make manual pages
|
|
||||||
echo. changes to make an overview over all changed/added/deprecated items
|
|
||||||
echo. linkcheck to check all external links for integrity
|
|
||||||
echo. doctest to run all doctests embedded in the documentation if enabled
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "clean" (
|
|
||||||
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
|
||||||
del /q /s %BUILDDIR%\*
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "html" (
|
|
||||||
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "dirhtml" (
|
|
||||||
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "singlehtml" (
|
|
||||||
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "pickle" (
|
|
||||||
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can process the pickle files.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "json" (
|
|
||||||
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can process the JSON files.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "htmlhelp" (
|
|
||||||
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can run HTML Help Workshop with the ^
|
|
||||||
.hhp project file in %BUILDDIR%/htmlhelp.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "qthelp" (
|
|
||||||
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
|
||||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
|
||||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\template_class.qhcp
|
|
||||||
echo.To view the help file:
|
|
||||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\template_class.ghc
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "devhelp" (
|
|
||||||
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
|
||||||
echo.
|
|
||||||
echo.Build finished.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "epub" (
|
|
||||||
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "latex" (
|
|
||||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
|
||||||
echo.
|
|
||||||
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "text" (
|
|
||||||
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The text files are in %BUILDDIR%/text.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "man" (
|
|
||||||
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "changes" (
|
|
||||||
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
|
||||||
echo.
|
|
||||||
echo.The overview file is in %BUILDDIR%/changes.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "linkcheck" (
|
|
||||||
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
|
||||||
echo.
|
|
||||||
echo.Link check complete; look for any errors in the above output ^
|
|
||||||
or in %BUILDDIR%/linkcheck/output.txt.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "doctest" (
|
|
||||||
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
|
||||||
echo.
|
|
||||||
echo.Testing of doctests in the sources finished, look at the ^
|
|
||||||
results in %BUILDDIR%/doctest/output.txt.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
:end
|
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# FluxCEN documentation build configuration file, created by
|
|
||||||
# sphinx-quickstart on Sun Feb 12 17:11:03 2012.
|
|
||||||
#
|
|
||||||
# This file is execfile()d with the current directory set to its containing dir.
|
|
||||||
#
|
|
||||||
# Note that not all possible configuration values are present in this
|
|
||||||
# autogenerated file.
|
|
||||||
#
|
|
||||||
# All configuration values have a default; values that are commented out
|
|
||||||
# serve to show the default.
|
|
||||||
|
|
||||||
import sys, os
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
||||||
#sys.path.insert(0, os.path.abspath('.'))
|
|
||||||
|
|
||||||
# -- General configuration -----------------------------------------------------
|
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
|
||||||
#needs_sphinx = '1.0'
|
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
|
||||||
extensions = ['sphinx.ext.todo', 'sphinx.ext.imgmath', 'sphinx.ext.viewcode']
|
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
|
||||||
templates_path = ['_templates']
|
|
||||||
|
|
||||||
# The suffix of source filenames.
|
|
||||||
source_suffix = '.rst'
|
|
||||||
|
|
||||||
# The encoding of source files.
|
|
||||||
#source_encoding = 'utf-8-sig'
|
|
||||||
|
|
||||||
# The master toctree document.
|
|
||||||
master_doc = 'index'
|
|
||||||
|
|
||||||
# General information about the project.
|
|
||||||
project = u'FluxCEN'
|
|
||||||
copyright = u'2013, Romain Montillet'
|
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
|
||||||
# |version| and |release|, also used in various other places throughout the
|
|
||||||
# built documents.
|
|
||||||
#
|
|
||||||
# The short X.Y version.
|
|
||||||
version = '0.1'
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
|
||||||
release = '0.1'
|
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
||||||
# for a list of supported languages.
|
|
||||||
#language = None
|
|
||||||
|
|
||||||
# There are two options for replacing |today|: either, you set today to some
|
|
||||||
# non-false value, then it is used:
|
|
||||||
#today = ''
|
|
||||||
# Else, today_fmt is used as the format for a strftime call.
|
|
||||||
#today_fmt = '%B %d, %Y'
|
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
|
||||||
# directories to ignore when looking for source files.
|
|
||||||
exclude_patterns = []
|
|
||||||
|
|
||||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
|
||||||
#default_role = None
|
|
||||||
|
|
||||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
||||||
#add_function_parentheses = True
|
|
||||||
|
|
||||||
# If true, the current module name will be prepended to all description
|
|
||||||
# unit titles (such as .. function::).
|
|
||||||
#add_TemplateModuleNames = True
|
|
||||||
|
|
||||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
|
||||||
# output. They are ignored by default.
|
|
||||||
#show_authors = False
|
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
|
||||||
pygments_style = 'sphinx'
|
|
||||||
|
|
||||||
# A list of ignored prefixes for module index sorting.
|
|
||||||
#modindex_common_prefix = []
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output ---------------------------------------------------
|
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
||||||
# a list of builtin themes.
|
|
||||||
html_theme = 'default'
|
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
|
||||||
# further. For a list of options available for each theme, see the
|
|
||||||
# documentation.
|
|
||||||
#html_theme_options = {}
|
|
||||||
|
|
||||||
# Add any paths that contain custom themes here, relative to this directory.
|
|
||||||
#html_theme_path = []
|
|
||||||
|
|
||||||
# The name for this set of Sphinx documents. If None, it defaults to
|
|
||||||
# "<project> v<release> documentation".
|
|
||||||
#html_title = None
|
|
||||||
|
|
||||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
|
||||||
#html_short_title = None
|
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top
|
|
||||||
# of the sidebar.
|
|
||||||
#html_logo = None
|
|
||||||
|
|
||||||
# The name of an image file (within the static path) to use as favicon of the
|
|
||||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
|
||||||
# pixels large.
|
|
||||||
#html_favicon = None
|
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
||||||
html_static_path = ['_static']
|
|
||||||
|
|
||||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
|
||||||
# using the given strftime format.
|
|
||||||
#html_last_updated_fmt = '%b %d, %Y'
|
|
||||||
|
|
||||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
|
||||||
# typographically correct entities.
|
|
||||||
#html_use_smartypants = True
|
|
||||||
|
|
||||||
# Custom sidebar templates, maps document names to template names.
|
|
||||||
#html_sidebars = {}
|
|
||||||
|
|
||||||
# Additional templates that should be rendered to pages, maps page names to
|
|
||||||
# template names.
|
|
||||||
#html_additional_pages = {}
|
|
||||||
|
|
||||||
# If false, no module index is generated.
|
|
||||||
#html_domain_indices = True
|
|
||||||
|
|
||||||
# If false, no index is generated.
|
|
||||||
#html_use_index = True
|
|
||||||
|
|
||||||
# If true, the index is split into individual pages for each letter.
|
|
||||||
#html_split_index = False
|
|
||||||
|
|
||||||
# If true, links to the reST sources are added to the pages.
|
|
||||||
#html_show_sourcelink = True
|
|
||||||
|
|
||||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
|
||||||
#html_show_sphinx = True
|
|
||||||
|
|
||||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
|
||||||
#html_show_copyright = True
|
|
||||||
|
|
||||||
# If true, an OpenSearch description file will be output, and all pages will
|
|
||||||
# contain a <link> tag referring to it. The value of this option must be the
|
|
||||||
# base URL from which the finished HTML is served.
|
|
||||||
#html_use_opensearch = ''
|
|
||||||
|
|
||||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
|
||||||
#html_file_suffix = None
|
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
|
||||||
htmlhelp_basename = 'TemplateClassdoc'
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output --------------------------------------------------
|
|
||||||
|
|
||||||
# The paper size ('letter' or 'a4').
|
|
||||||
#latex_paper_size = 'letter'
|
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
|
||||||
#latex_font_size = '10pt'
|
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
|
||||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
|
||||||
latex_documents = [
|
|
||||||
('index', 'FluxCEN.tex', u'FluxCEN Documentation',
|
|
||||||
u'Romain Montillet', 'manual'),
|
|
||||||
]
|
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
|
||||||
# the title page.
|
|
||||||
#latex_logo = None
|
|
||||||
|
|
||||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
|
||||||
# not chapters.
|
|
||||||
#latex_use_parts = False
|
|
||||||
|
|
||||||
# If true, show page references after internal links.
|
|
||||||
#latex_show_pagerefs = False
|
|
||||||
|
|
||||||
# If true, show URL addresses after external links.
|
|
||||||
#latex_show_urls = False
|
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
|
||||||
#latex_preamble = ''
|
|
||||||
|
|
||||||
# Documents to append as an appendix to all manuals.
|
|
||||||
#latex_appendices = []
|
|
||||||
|
|
||||||
# If false, no module index is generated.
|
|
||||||
#latex_domain_indices = True
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for manual page output --------------------------------------------
|
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
|
||||||
# (source start file, name, description, authors, manual section).
|
|
||||||
man_pages = [
|
|
||||||
('index', 'TemplateClass', u'FluxCEN Documentation',
|
|
||||||
[u'Romain Montillet'], 1)
|
|
||||||
]
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
.. FluxCEN documentation master file, created by
|
|
||||||
sphinx-quickstart on Sun Feb 12 17:11:03 2012.
|
|
||||||
You can adapt this file completely to your liking, but it should at least
|
|
||||||
contain the root `toctree` directive.
|
|
||||||
|
|
||||||
Welcome to FluxCEN's documentation!
|
|
||||||
============================================
|
|
||||||
|
|
||||||
Contents:
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
Indices and tables
|
|
||||||
==================
|
|
||||||
|
|
||||||
* :ref:`genindex`
|
|
||||||
* :ref:`modindex`
|
|
||||||
* :ref:`search`
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE TS><TS version="2.0" language="af" sourcelanguage="en">
|
|
||||||
<context>
|
|
||||||
<name>@default</name>
|
|
||||||
<message>
|
|
||||||
<location filename="test_translations.py" line="48"/>
|
|
||||||
<source>Good morning</source>
|
|
||||||
<translation>Goeie more</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
||||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,70 @@
|
|||||||
|
import os
|
||||||
|
# from qgis.gui import *
|
||||||
|
|
||||||
|
from qgis.core import QgsSettings
|
||||||
|
from qgis.PyQt.QtWidgets import QDialog
|
||||||
|
from qgis.utils import iface
|
||||||
|
|
||||||
|
|
||||||
|
from .tools.resources import (
|
||||||
|
load_ui,
|
||||||
|
send_issues,
|
||||||
|
)
|
||||||
|
plugin_dir = os.path.dirname(__file__)
|
||||||
|
end_find = plugin_dir.rfind('\\') + 1
|
||||||
|
|
||||||
|
NAME = plugin_dir[end_find:]
|
||||||
|
|
||||||
|
EDITOR_CLASS = load_ui('CenRa_IssuesSend.ui')
|
||||||
|
|
||||||
|
|
||||||
|
class CenRa_Issues(QDialog, EDITOR_CLASS):
|
||||||
|
def __init__(self, parent=None):
|
||||||
|
_ = parent
|
||||||
|
super().__init__()
|
||||||
|
self.setupUi(self)
|
||||||
|
self.settings = QgsSettings()
|
||||||
|
|
||||||
|
# place connect here
|
||||||
|
self.annuler_button.clicked.connect(self.close)
|
||||||
|
self.ok_button.clicked.connect(self.run_sendissues)
|
||||||
|
|
||||||
|
def run_sendissues(self):
|
||||||
|
text_titre = self.titre_line.text()
|
||||||
|
text_message = self.messages_plain.toPlainText()
|
||||||
|
statu_bug = self.check_bug.isChecked()
|
||||||
|
statu_aide = self.check_aide.isChecked()
|
||||||
|
statu_question = self.check_question.isChecked()
|
||||||
|
statu_amelioration = self.check_amelioration.isChecked()
|
||||||
|
statu_autre = self.check_autre.isChecked()
|
||||||
|
|
||||||
|
statu = []
|
||||||
|
if statu_bug is True:
|
||||||
|
statu = statu + [1]
|
||||||
|
if statu_aide is True:
|
||||||
|
statu = statu + [3]
|
||||||
|
if statu_question is True:
|
||||||
|
statu = statu + [5]
|
||||||
|
if statu_amelioration is True:
|
||||||
|
statu = statu + [2]
|
||||||
|
if statu_autre is True:
|
||||||
|
statu = statu + [6]
|
||||||
|
|
||||||
|
if len(statu) >= 1:
|
||||||
|
import qgis
|
||||||
|
url = qgis.utils.pluginMetadata(NAME, 'tracker')
|
||||||
|
print(text_message)
|
||||||
|
send_info = send_issues(url, text_titre, text_message, statu)
|
||||||
|
code = send_info.status_code
|
||||||
|
print(code)
|
||||||
|
else:
|
||||||
|
code = 423
|
||||||
|
if code == 201:
|
||||||
|
iface.messageBar().pushMessage("Envoyer :", "Votre messages à bien été envoyer.", level=0, duration=20)
|
||||||
|
self.close()
|
||||||
|
elif code == 422:
|
||||||
|
iface.messageBar().pushMessage("Erreur :", "Erreur dans le contenu du messages.", level=2, duration=20)
|
||||||
|
elif code == 423:
|
||||||
|
iface.messageBar().pushMessage("Erreur :", "Pas de sujet sélectionné.", level=2, duration=20)
|
||||||
|
elif code == 404:
|
||||||
|
iface.messageBar().pushMessage("Missing :", "Le serveur de messagerie est injoignable.", level=1, duration=20)
|
||||||
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 218 KiB |
@@ -5,8 +5,9 @@
|
|||||||
[general]
|
[general]
|
||||||
name=CenRa_FLUX
|
name=CenRa_FLUX
|
||||||
qgisMinimumVersion=3.0
|
qgisMinimumVersion=3.0
|
||||||
|
supportsQt6=True
|
||||||
description=Permet d'ouvrire une table dans la base PostGis
|
description=Permet d'ouvrire une table dans la base PostGis
|
||||||
version=1.14
|
version=3.7
|
||||||
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
||||||
email=si_besoin@cen-rhonealpes.fr
|
email=si_besoin@cen-rhonealpes.fr
|
||||||
|
|
||||||
@@ -18,7 +19,6 @@ email=si_besoin@cen-rhonealpes.fr
|
|||||||
|
|
||||||
hasProcessingProvider=no
|
hasProcessingProvider=no
|
||||||
# Uncomment the following line and add your changelog:
|
# Uncomment the following line and add your changelog:
|
||||||
# changelog= correctif de sécurité: envoi du certificat d'authentification seulement pour les couches fonciercen et drone / intégration des styles RPG geoportail / modification des noms de couches pour plus de clarté
|
|
||||||
|
|
||||||
# Tags are comma separated with spaces allowed
|
# Tags are comma separated with spaces allowed
|
||||||
tags=cenra, postgis, database
|
tags=cenra, postgis, database
|
||||||
@@ -28,11 +28,11 @@ homepage=https://plateformesig.cenra-outils.org/
|
|||||||
tracker=https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS
|
tracker=https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS
|
||||||
|
|
||||||
category=Plugins
|
category=Plugins
|
||||||
icon=cenra.png
|
icon=icon.png
|
||||||
# experimental flag
|
# experimental flag
|
||||||
experimental=False
|
experimental=False
|
||||||
|
|
||||||
changelog=<h1>CenRA_FLUX:</h1></br><p><h3>03/10/2024 - Version 1.14:</h3> - Remonte la fênetre dans la pille.</br></p><p><h3>13/09/2024 - Version 1.13:</h3>- MAJ sur le lien du changelog</br>- Bug-fix: Ouvre MultiPolygone et Polygon séparément.</p></br><p><h3>10/09/2024 - Version 1.11:</h3>- Ouverture de table contenant plusieurs géométries.</p></br><p><h3>26/08/2024 - Version 1.10:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
|
changelog=<h2>CenRa_FLUX:</h2></br><p><h3>05/09/2025 - Version 3.7: </h3> - Ouverture de projet QGIS contenue dans la base de donnees.</p></br><p><h3>30/07/2025 - Version 3.6: </h3> - Correctife de bug.</p></br><p><h3>29/07/2025 - Version 3.5: </h3> - Bug fix sur les donnee raster.</p></br><p><h3>23/07/2025 - Version 3.4: </h3> - Ouverture raster dans la base SIG.</p></br><p><h3>23/07/2025 - Version 3.3: </h3> - Optimisation des chargement.</p></br><p><h3>22/07/2025 - Version 3.2: </h3> - Visualisation des format raster et vecteur dans REF.</p></br><p><h3>21/07/2025 - Version 3.1: </h3> - Bug fix pour l'ouverture de plus de 5 couches.</p></br><p><h3>19/05/2025 - Version 3.0: </h3> - Compatible PyQt5 et PyQt6.</p></br><p><h3>09/04/2025 - Version 2.9: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 2.8: </h3> - Optimisation pour le TT.</p></br><p><h3>07/04/2025 - Version 2.7: </h3> - mode debug.</p></br><p><h3>03/04/2025 - Version 2.6: </h3> - Mise a jour de securite.</p></br><p><h3>20/03/2025 - Version 2.5: </h3> - Visualisation distincte des couches ne se trouvant pas dans l'antenne.</p></br><p><h3>13/02/2025 - Version 2.4: </h3> - Ajoute redimensionnement et déplacement mollette.</p></br><p><h3>05/02/2025 - Version 2.3: </h3> - Bouton de visualisation des couches se trouvent uniquement dans le canva de la carte.</p></br><p><h3>07/01/2025 - Version 2.2: </h3> - ByPass du certif ssl ci erreur.</p></br><p><h3>22/10/2024 - Version 2.1:</h3> - Correctif de bug.</br> - Evolution de la limit de 3 à 5. </br></p></br><p><h3>22/10/2024 - Version 2.0:</h3> - Reformatage du code.</br></p></br><p><h3>03/10/2024 - Version 1.14:</h3> - Remonte la fênetre dans la pille.</br></p><p><h3>13/09/2024 - Version 1.13:</h3>- MAJ sur le lien du changelog</br>- Bug-fix: Ouvre MultiPolygone et Polygon séparément.</p></br><p><h3>10/09/2024 - Version 1.11:</h3>- Ouverture de table contenant plusieurs géométries.</p></br><p><h3>26/08/2024 - Version 1.10:</h3>- Ajoute d'un changelog et vérification de mise à jour.</p>
|
||||||
|
|
||||||
# deprecated flag (applies to the whole plugin, not just a single version)
|
# deprecated flag (applies to the whole plugin, not just a single version)
|
||||||
deprecated=False
|
deprecated=False
|
||||||
@@ -45,4 +45,3 @@ deprecated=False
|
|||||||
|
|
||||||
# If the plugin can run on QGIS Server.
|
# If the plugin can run on QGIS Server.
|
||||||
server=False
|
server=False
|
||||||
|
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
height: 100vh;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image-container {
|
|
||||||
margin-right: 20px; /* Adjust as needed */
|
|
||||||
height: 300px; /* Set the desired fixed height */
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
font-size: 24px;
|
|
||||||
color: black;
|
|
||||||
text-align: right;
|
|
||||||
position: absolute;
|
|
||||||
top: 72%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
max-height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<title>No Metadata</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="content">
|
|
||||||
<div class="image-container">
|
|
||||||
<img src="https://raw.githubusercontent.com/CEN-Nouvelle-Aquitaine/fluxcen/main/confused_travolta.gif" alt="Another Image">
|
|
||||||
</div>
|
|
||||||
<div class="image-container">
|
|
||||||
<img src="https://raw.githubusercontent.com/CEN-Nouvelle-Aquitaine/fluxcen/main/metadata.png" alt="Metadata Image">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p>Pas de métadonnées encore associées à cette ressource ! Revenez plus tard 😎</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
#/***************************************************************************
|
|
||||||
# FluxCEN
|
|
||||||
#
|
|
||||||
# Configuration file for plugin builder tool (pb_tool)
|
|
||||||
# Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
|
|
||||||
# -------------------
|
|
||||||
# begin : 2022-04-04
|
|
||||||
# copyright : (C) 2022 by Romain Montillet
|
|
||||||
# email : r.montillet@cen-na.org
|
|
||||||
# ***************************************************************************/
|
|
||||||
#
|
|
||||||
#/***************************************************************************
|
|
||||||
# * *
|
|
||||||
# * 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. *
|
|
||||||
# * *
|
|
||||||
# ***************************************************************************/
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# You can install pb_tool using:
|
|
||||||
# pip install http://geoapt.net/files/pb_tool.zip
|
|
||||||
#
|
|
||||||
# Consider doing your development (and install of pb_tool) in a virtualenv.
|
|
||||||
#
|
|
||||||
# For details on setting up and using pb_tool, see:
|
|
||||||
# http://g-sherman.github.io/plugin_build_tool/
|
|
||||||
#
|
|
||||||
# Issues and pull requests here:
|
|
||||||
# https://github.com/g-sherman/plugin_build_tool:
|
|
||||||
#
|
|
||||||
# Sane defaults for your plugin generated by the Plugin Builder are
|
|
||||||
# already set below.
|
|
||||||
#
|
|
||||||
# As you add Python source files and UI files to your plugin, add
|
|
||||||
# them to the appropriate [files] section below.
|
|
||||||
|
|
||||||
[plugin]
|
|
||||||
# Name of the plugin. This is the name of the directory that will
|
|
||||||
# be created in .qgis2/python/plugins
|
|
||||||
name: FluxCEN
|
|
||||||
|
|
||||||
# Full path to where you want your plugin directory copied. If empty,
|
|
||||||
# the QGIS default path will be used. Don't include the plugin name in
|
|
||||||
# the path.
|
|
||||||
plugin_path:
|
|
||||||
|
|
||||||
[files]
|
|
||||||
# Python files that should be deployed with the plugin
|
|
||||||
python_files: __init__.py FluxCEN.py FluxCEN_dialog.py
|
|
||||||
|
|
||||||
# The main dialog file that is loaded (not compiled)
|
|
||||||
main_dialog: FluxCEN_dialog_base.ui
|
|
||||||
|
|
||||||
# Other ui files for dialogs you create (these will be compiled)
|
|
||||||
compiled_ui_files:
|
|
||||||
|
|
||||||
# Resource file(s) that will be compiled
|
|
||||||
resource_files: resources.qrc
|
|
||||||
|
|
||||||
# Other files required for the plugin
|
|
||||||
extras: metadata.txt icon.png
|
|
||||||
|
|
||||||
# Other directories to be deployed with the plugin.
|
|
||||||
# These must be subdirectories under the plugin directory
|
|
||||||
extra_dirs:
|
|
||||||
|
|
||||||
# ISO code(s) for any locales (translations), separated by spaces.
|
|
||||||
# Corresponding .ts files must exist in the i18n directory
|
|
||||||
locales:
|
|
||||||
|
|
||||||
[help]
|
|
||||||
# the built help directory that should be deployed with the plugin
|
|
||||||
dir: help/build/html
|
|
||||||
# the name of the directory to target in the deployed plugin
|
|
||||||
target: help
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# coding=utf-8
|
|
||||||
"""This script uploads a plugin package to the plugin repository.
|
|
||||||
Authors: A. Pasotti, V. Picavet
|
|
||||||
git sha : $TemplateVCSFormat
|
|
||||||
"""
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import getpass
|
|
||||||
import xmlrpc.client
|
|
||||||
from optparse import OptionParser
|
|
||||||
|
|
||||||
standard_library.install_aliases()
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
PROTOCOL = 'https'
|
|
||||||
SERVER = 'plugins.qgis.org'
|
|
||||||
PORT = '443'
|
|
||||||
ENDPOINT = '/plugins/RPC2/'
|
|
||||||
VERBOSE = False
|
|
||||||
|
|
||||||
|
|
||||||
def main(parameters, arguments):
|
|
||||||
"""Main entry point.
|
|
||||||
|
|
||||||
:param parameters: Command line parameters.
|
|
||||||
:param arguments: Command line arguments.
|
|
||||||
"""
|
|
||||||
address = "{protocol}://{username}:{password}@{server}:{port}{endpoint}".format(
|
|
||||||
protocol=PROTOCOL,
|
|
||||||
username=parameters.username,
|
|
||||||
password=parameters.password,
|
|
||||||
server=parameters.server,
|
|
||||||
port=parameters.port,
|
|
||||||
endpoint=ENDPOINT)
|
|
||||||
print("Connecting to: %s" % hide_password(address))
|
|
||||||
|
|
||||||
server = xmlrpc.client.ServerProxy(address, verbose=VERBOSE)
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open(arguments[0], 'rb') as handle:
|
|
||||||
plugin_id, version_id = server.plugin.upload(
|
|
||||||
xmlrpc.client.Binary(handle.read()))
|
|
||||||
print("Plugin ID: %s" % plugin_id)
|
|
||||||
print("Version ID: %s" % version_id)
|
|
||||||
except xmlrpc.client.ProtocolError as err:
|
|
||||||
print("A protocol error occurred")
|
|
||||||
print("URL: %s" % hide_password(err.url, 0))
|
|
||||||
print("HTTP/HTTPS headers: %s" % err.headers)
|
|
||||||
print("Error code: %d" % err.errcode)
|
|
||||||
print("Error message: %s" % err.errmsg)
|
|
||||||
except xmlrpc.client.Fault as err:
|
|
||||||
print("A fault occurred")
|
|
||||||
print("Fault code: %d" % err.faultCode)
|
|
||||||
print("Fault string: %s" % err.faultString)
|
|
||||||
|
|
||||||
|
|
||||||
def hide_password(url, start=6):
|
|
||||||
"""Returns the http url with password part replaced with '*'.
|
|
||||||
|
|
||||||
:param url: URL to upload the plugin to.
|
|
||||||
:type url: str
|
|
||||||
|
|
||||||
:param start: Position of start of password.
|
|
||||||
:type start: int
|
|
||||||
"""
|
|
||||||
start_position = url.find(':', start) + 1
|
|
||||||
end_position = url.find('@')
|
|
||||||
return "%s%s%s" % (
|
|
||||||
url[:start_position],
|
|
||||||
'*' * (end_position - start_position),
|
|
||||||
url[end_position:])
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = OptionParser(usage="%prog [options] plugin.zip")
|
|
||||||
parser.add_option(
|
|
||||||
"-w", "--password", dest="password",
|
|
||||||
help="Password for plugin site", metavar="******")
|
|
||||||
parser.add_option(
|
|
||||||
"-u", "--username", dest="username",
|
|
||||||
help="Username of plugin site", metavar="user")
|
|
||||||
parser.add_option(
|
|
||||||
"-p", "--port", dest="port",
|
|
||||||
help="Server port to connect to", metavar="80")
|
|
||||||
parser.add_option(
|
|
||||||
"-s", "--server", dest="server",
|
|
||||||
help="Specify server name", metavar="plugins.qgis.org")
|
|
||||||
options, args = parser.parse_args()
|
|
||||||
if len(args) != 1:
|
|
||||||
print("Please specify zip file.\n")
|
|
||||||
parser.print_help()
|
|
||||||
sys.exit(1)
|
|
||||||
if not options.server:
|
|
||||||
options.server = SERVER
|
|
||||||
if not options.port:
|
|
||||||
options.port = PORT
|
|
||||||
if not options.username:
|
|
||||||
# interactive mode
|
|
||||||
username = getpass.getuser()
|
|
||||||
print("Please enter user name [%s] :" % username, end=' ')
|
|
||||||
|
|
||||||
res = input()
|
|
||||||
if res != "":
|
|
||||||
options.username = res
|
|
||||||
else:
|
|
||||||
options.username = username
|
|
||||||
if not options.password:
|
|
||||||
# interactive mode
|
|
||||||
options.password = getpass.getpass()
|
|
||||||
main(options, args)
|
|
||||||
@@ -1,281 +0,0 @@
|
|||||||
[MASTER]
|
|
||||||
|
|
||||||
# Specify a configuration file.
|
|
||||||
#rcfile=
|
|
||||||
|
|
||||||
# Python code to execute, usually for sys.path manipulation such as
|
|
||||||
# pygtk.require().
|
|
||||||
#init-hook=
|
|
||||||
|
|
||||||
# Profiled execution.
|
|
||||||
profile=no
|
|
||||||
|
|
||||||
# Add files or directories to the blacklist. They should be base names, not
|
|
||||||
# paths.
|
|
||||||
ignore=CVS
|
|
||||||
|
|
||||||
# Pickle collected data for later comparisons.
|
|
||||||
persistent=yes
|
|
||||||
|
|
||||||
# List of plugins (as comma separated values of python modules names) to load,
|
|
||||||
# usually to register additional checkers.
|
|
||||||
load-plugins=
|
|
||||||
|
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
|
||||||
|
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
|
||||||
# either give multiple identifier separated by comma (,) or put this option
|
|
||||||
# multiple time. See also the "--disable" option for examples.
|
|
||||||
#enable=
|
|
||||||
|
|
||||||
# Disable the message, report, category or checker with the given id(s). You
|
|
||||||
# can either give multiple identifiers separated by comma (,) or put this
|
|
||||||
# option multiple times (only on the command line, not in the configuration
|
|
||||||
# file where it should appear only once).You can also use "--disable=all" to
|
|
||||||
# disable everything first and then reenable specific checks. For example, if
|
|
||||||
# you want to run only the similarities checker, you can use "--disable=all
|
|
||||||
# --enable=similarities". If you want to run only the classes checker, but have
|
|
||||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
|
||||||
# --disable=W"
|
|
||||||
# see http://stackoverflow.com/questions/21487025/pylint-locally-defined-disables-still-give-warnings-how-to-suppress-them
|
|
||||||
disable=locally-disabled,C0103
|
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
|
||||||
|
|
||||||
# Set the output format. Available formats are text, parseable, colorized, msvs
|
|
||||||
# (visual studio) and html. You can also give a reporter class, eg
|
|
||||||
# mypackage.mymodule.MyReporterClass.
|
|
||||||
output-format=text
|
|
||||||
|
|
||||||
# Put messages in a separate file for each module / package specified on the
|
|
||||||
# command line instead of printing them on stdout. Reports (if any) will be
|
|
||||||
# written in a file name "pylint_global.[txt|html]".
|
|
||||||
files-output=no
|
|
||||||
|
|
||||||
# Tells whether to display a full report or only the messages
|
|
||||||
reports=yes
|
|
||||||
|
|
||||||
# Python expression which should return a note less than 10 (10 is the highest
|
|
||||||
# note). You have access to the variables errors warning, statement which
|
|
||||||
# respectively contain the number of errors / warnings messages and the total
|
|
||||||
# number of statements analyzed. This is used by the global evaluation report
|
|
||||||
# (RP0004).
|
|
||||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
|
||||||
|
|
||||||
# Add a comment according to your evaluation note. This is used by the global
|
|
||||||
# evaluation report (RP0004).
|
|
||||||
comment=no
|
|
||||||
|
|
||||||
# Template used to display messages. This is a python new-style format string
|
|
||||||
# used to format the message information. See doc for all details
|
|
||||||
#msg-template=
|
|
||||||
|
|
||||||
|
|
||||||
[BASIC]
|
|
||||||
|
|
||||||
# Required attributes for module, separated by a comma
|
|
||||||
required-attributes=
|
|
||||||
|
|
||||||
# List of builtins function names that should not be used, separated by a comma
|
|
||||||
bad-functions=map,filter,apply,input
|
|
||||||
|
|
||||||
# Regular expression which should only match correct module names
|
|
||||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct module level names
|
|
||||||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct class names
|
|
||||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct function names
|
|
||||||
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct method names
|
|
||||||
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct instance attribute names
|
|
||||||
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct argument names
|
|
||||||
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct variable names
|
|
||||||
variable-rgx=[a-z_][a-z0-9_]{2,30}$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct attribute names in class
|
|
||||||
# bodies
|
|
||||||
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct list comprehension /
|
|
||||||
# generator expression variable names
|
|
||||||
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
|
||||||
|
|
||||||
# Good variable names which should always be accepted, separated by a comma
|
|
||||||
good-names=i,j,k,ex,Run,_
|
|
||||||
|
|
||||||
# Bad variable names which should always be refused, separated by a comma
|
|
||||||
bad-names=foo,bar,baz,toto,tutu,tata
|
|
||||||
|
|
||||||
# Regular expression which should only match function or class names that do
|
|
||||||
# not require a docstring.
|
|
||||||
no-docstring-rgx=__.*__
|
|
||||||
|
|
||||||
# Minimum line length for functions/classes that require docstrings, shorter
|
|
||||||
# ones are exempt.
|
|
||||||
docstring-min-length=-1
|
|
||||||
|
|
||||||
|
|
||||||
[MISCELLANEOUS]
|
|
||||||
|
|
||||||
# List of note tags to take in consideration, separated by a comma.
|
|
||||||
notes=FIXME,XXX,TODO
|
|
||||||
|
|
||||||
|
|
||||||
[TYPECHECK]
|
|
||||||
|
|
||||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
|
||||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
|
||||||
ignore-mixin-members=yes
|
|
||||||
|
|
||||||
# List of classes names for which member attributes should not be checked
|
|
||||||
# (useful for classes with attributes dynamically set).
|
|
||||||
ignored-classes=SQLObject
|
|
||||||
|
|
||||||
# When zope mode is activated, add a predefined set of Zope acquired attributes
|
|
||||||
# to generated-members.
|
|
||||||
zope=no
|
|
||||||
|
|
||||||
# List of members which are set dynamically and missed by pylint inference
|
|
||||||
# system, and so shouldn't trigger E0201 when accessed. Python regular
|
|
||||||
# expressions are accepted.
|
|
||||||
generated-members=REQUEST,acl_users,aq_parent
|
|
||||||
|
|
||||||
|
|
||||||
[VARIABLES]
|
|
||||||
|
|
||||||
# Tells whether we should check for unused import in __init__ files.
|
|
||||||
init-import=no
|
|
||||||
|
|
||||||
# A regular expression matching the beginning of the name of dummy variables
|
|
||||||
# (i.e. not used).
|
|
||||||
dummy-variables-rgx=_$|dummy
|
|
||||||
|
|
||||||
# List of additional names supposed to be defined in builtins. Remember that
|
|
||||||
# you should avoid to define new builtins when possible.
|
|
||||||
additional-builtins=
|
|
||||||
|
|
||||||
|
|
||||||
[FORMAT]
|
|
||||||
|
|
||||||
# Maximum number of characters on a single line.
|
|
||||||
max-line-length=80
|
|
||||||
|
|
||||||
# Regexp for a line that is allowed to be longer than the limit.
|
|
||||||
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
|
|
||||||
|
|
||||||
# Allow the body of an if to be on the same line as the test if there is no
|
|
||||||
# else.
|
|
||||||
single-line-if-stmt=no
|
|
||||||
|
|
||||||
# List of optional constructs for which whitespace checking is disabled
|
|
||||||
no-space-check=trailing-comma,dict-separator
|
|
||||||
|
|
||||||
# Maximum number of lines in a module
|
|
||||||
max-module-lines=1000
|
|
||||||
|
|
||||||
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
|
||||||
# tab).
|
|
||||||
indent-string=' '
|
|
||||||
|
|
||||||
|
|
||||||
[SIMILARITIES]
|
|
||||||
|
|
||||||
# Minimum lines number of a similarity.
|
|
||||||
min-similarity-lines=4
|
|
||||||
|
|
||||||
# Ignore comments when computing similarities.
|
|
||||||
ignore-comments=yes
|
|
||||||
|
|
||||||
# Ignore docstrings when computing similarities.
|
|
||||||
ignore-docstrings=yes
|
|
||||||
|
|
||||||
# Ignore imports when computing similarities.
|
|
||||||
ignore-imports=no
|
|
||||||
|
|
||||||
|
|
||||||
[IMPORTS]
|
|
||||||
|
|
||||||
# Deprecated modules which should not be used, separated by a comma
|
|
||||||
deprecated-modules=regsub,TERMIOS,Bastion,rexec
|
|
||||||
|
|
||||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
|
||||||
# given file (report RP0402 must not be disabled)
|
|
||||||
import-graph=
|
|
||||||
|
|
||||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
ext-import-graph=
|
|
||||||
|
|
||||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
|
||||||
# not be disabled)
|
|
||||||
int-import-graph=
|
|
||||||
|
|
||||||
|
|
||||||
[DESIGN]
|
|
||||||
|
|
||||||
# Maximum number of arguments for function / method
|
|
||||||
max-args=5
|
|
||||||
|
|
||||||
# Argument names that match this expression will be ignored. Default to name
|
|
||||||
# with leading underscore
|
|
||||||
ignored-argument-names=_.*
|
|
||||||
|
|
||||||
# Maximum number of locals for function / method body
|
|
||||||
max-locals=15
|
|
||||||
|
|
||||||
# Maximum number of return / yield for function / method body
|
|
||||||
max-returns=6
|
|
||||||
|
|
||||||
# Maximum number of branch for function / method body
|
|
||||||
max-branches=12
|
|
||||||
|
|
||||||
# Maximum number of statements in function / method body
|
|
||||||
max-statements=50
|
|
||||||
|
|
||||||
# Maximum number of parents for a class (see R0901).
|
|
||||||
max-parents=7
|
|
||||||
|
|
||||||
# Maximum number of attributes for a class (see R0902).
|
|
||||||
max-attributes=7
|
|
||||||
|
|
||||||
# Minimum number of public methods for a class (see R0903).
|
|
||||||
min-public-methods=2
|
|
||||||
|
|
||||||
# Maximum number of public methods for a class (see R0904).
|
|
||||||
max-public-methods=20
|
|
||||||
|
|
||||||
|
|
||||||
[CLASSES]
|
|
||||||
|
|
||||||
# List of interface methods to ignore, separated by a comma. This is used for
|
|
||||||
# instance to not check methods defines in Zope's Interface base class.
|
|
||||||
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
|
|
||||||
|
|
||||||
# List of method names used to declare (i.e. assign) instance attributes.
|
|
||||||
defining-attr-methods=__init__,__new__,setUp
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a class method.
|
|
||||||
valid-classmethod-first-arg=cls
|
|
||||||
|
|
||||||
# List of valid names for the first argument in a metaclass class method.
|
|
||||||
valid-metaclass-classmethod-first-arg=mcs
|
|
||||||
|
|
||||||
|
|
||||||
[EXCEPTIONS]
|
|
||||||
|
|
||||||
# Exceptions that will emit a warning when being caught. Defaults to
|
|
||||||
# "Exception"
|
|
||||||
overgeneral-exceptions=Exception
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<RCC>
|
|
||||||
<qresource prefix="/plugins/CenRa_FLUX" >
|
|
||||||
<file>reficon.png</file>
|
|
||||||
<file>arrow-up.png</file>
|
|
||||||
<file>arrow-bottom.png</file>
|
|
||||||
<file>logo.png</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
LRELEASE=$1
|
|
||||||
LOCALES=$2
|
|
||||||
|
|
||||||
|
|
||||||
for LOCALE in ${LOCALES}
|
|
||||||
do
|
|
||||||
echo "Processing: ${LOCALE}.ts"
|
|
||||||
# Note we don't use pylupdate with qt .pro file approach as it is flakey
|
|
||||||
# about what is made available.
|
|
||||||
$LRELEASE i18n/${LOCALE}.ts
|
|
||||||
done
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
QGIS_PREFIX_PATH=/usr/local/qgis-2.0
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
QGIS_PREFIX_PATH=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ${QGIS_PREFIX_PATH}
|
|
||||||
|
|
||||||
|
|
||||||
export QGIS_PREFIX_PATH=${QGIS_PREFIX_PATH}
|
|
||||||
export QGIS_PATH=${QGIS_PREFIX_PATH}
|
|
||||||
export LD_LIBRARY_PATH=${QGIS_PREFIX_PATH}/lib
|
|
||||||
export PYTHONPATH=${QGIS_PREFIX_PATH}/share/qgis/python:${QGIS_PREFIX_PATH}/share/qgis/python/plugins:${PYTHONPATH}
|
|
||||||
|
|
||||||
echo "QGIS PATH: $QGIS_PREFIX_PATH"
|
|
||||||
export QGIS_DEBUG=0
|
|
||||||
export QGIS_LOG_FILE=/tmp/inasafe/realtime/logs/qgis.log
|
|
||||||
|
|
||||||
export PATH=${QGIS_PREFIX_PATH}/bin:$PATH
|
|
||||||
|
|
||||||
echo "This script is intended to be sourced to set up your shell to"
|
|
||||||
echo "use a QGIS 2.0 built in $QGIS_PREFIX_PATH"
|
|
||||||
echo
|
|
||||||
echo "To use it do:"
|
|
||||||
echo "source $BASH_SOURCE /your/optional/install/path"
|
|
||||||
echo
|
|
||||||
echo "Then use the make file supplied here e.g. make guitest"
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
LOCALES=$*
|
|
||||||
|
|
||||||
# Get newest .py files so we don't update strings unnecessarily
|
|
||||||
|
|
||||||
CHANGED_FILES=0
|
|
||||||
PYTHON_FILES=`find . -regex ".*\(ui\|py\)$" -type f`
|
|
||||||
for PYTHON_FILE in $PYTHON_FILES
|
|
||||||
do
|
|
||||||
CHANGED=$(stat -c %Y $PYTHON_FILE)
|
|
||||||
if [ ${CHANGED} -gt ${CHANGED_FILES} ]
|
|
||||||
then
|
|
||||||
CHANGED_FILES=${CHANGED}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Qt translation stuff
|
|
||||||
# for .ts file
|
|
||||||
UPDATE=false
|
|
||||||
for LOCALE in ${LOCALES}
|
|
||||||
do
|
|
||||||
TRANSLATION_FILE="i18n/$LOCALE.ts"
|
|
||||||
if [ ! -f ${TRANSLATION_FILE} ]
|
|
||||||
then
|
|
||||||
# Force translation string collection as we have a new language file
|
|
||||||
touch ${TRANSLATION_FILE}
|
|
||||||
UPDATE=true
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
MODIFICATION_TIME=$(stat -c %Y ${TRANSLATION_FILE})
|
|
||||||
if [ ${CHANGED_FILES} -gt ${MODIFICATION_TIME} ]
|
|
||||||
then
|
|
||||||
# Force translation string collection as a .py file has been updated
|
|
||||||
UPDATE=true
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ${UPDATE} == true ]
|
|
||||||
# retrieve all python files
|
|
||||||
then
|
|
||||||
echo ${PYTHON_FILES}
|
|
||||||
# update .ts
|
|
||||||
echo "Please provide translations by editing the translation files below:"
|
|
||||||
for LOCALE in ${LOCALES}
|
|
||||||
do
|
|
||||||
echo "i18n/"${LOCALE}".ts"
|
|
||||||
# Note we don't use pylupdate with qt .pro file approach as it is flakey
|
|
||||||
# about what is made available.
|
|
||||||
pylupdate4 -noobsolete ${PYTHON_FILES} -ts i18n/${LOCALE}.ts
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "No need to edit any translation files (.ts) because no python files"
|
|
||||||
echo "has been updated since the last update translation. "
|
|
||||||
fi
|
|
||||||
@@ -1,895 +0,0 @@
|
|||||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
|
||||||
<qgis simplifyDrawingHints="1" version="3.16.7-Hannover" styleCategories="AllStyleCategories" simplifyLocal="1" labelsEnabled="0" simplifyMaxScale="1" simplifyDrawingTol="1" maxScale="0" minScale="100000000" simplifyAlgorithm="0" readOnly="0" hasScaleBasedVisibilityFlag="0">
|
|
||||||
<flags>
|
|
||||||
<Identifiable>1</Identifiable>
|
|
||||||
<Removable>1</Removable>
|
|
||||||
<Searchable>1</Searchable>
|
|
||||||
</flags>
|
|
||||||
<temporal startField="" endField="last_dateevenement" durationUnit="min" mode="0" accumulate="0" endExpression="" durationField="" fixedDuration="0" enabled="0" startExpression="">
|
|
||||||
<fixedRange>
|
|
||||||
<start></start>
|
|
||||||
<end></end>
|
|
||||||
</fixedRange>
|
|
||||||
</temporal>
|
|
||||||
<renderer-v2 attr="type_mfu" type="categorizedSymbol" forceraster="0" symbollevels="0" enableorderby="0">
|
|
||||||
<categories>
|
|
||||||
<category symbol="0" label="Achat finalisé (Acquisition)" render="true" value="Achat finalisé (Acquisition)"/>
|
|
||||||
<category symbol="1" label="Bail emphytéotique "classique"" render="true" value="Bail emphytéotique "classique""/>
|
|
||||||
<category symbol="2" label="Bail emphytéotique administratif" render="true" value="Bail emphytéotique administratif"/>
|
|
||||||
<category symbol="3" label="Bail civil" render="true" value="Bail civil"/>
|
|
||||||
<category symbol="4" label="Convention d'usage / convention de gestion" render="true" value="Convention d'usage / convention de gestion"/>
|
|
||||||
<category symbol="5" label="Convention de gestion entre le CEN et le Fonds de dotation / la Fondation des CEN" render="true" value="Convention de gestion entre le CEN et le Fonds de dotation / la Fondation des CEN"/>
|
|
||||||
<category symbol="6" label="Convention de gestion sur terrains militaires" render="true" value="Convention de gestion sur terrains militaires"/>
|
|
||||||
<category symbol="7" label="Convention de gestion avec le Conservatoire du littoral" render="true" value="Convention de gestion avec le Conservatoire du littoral"/>
|
|
||||||
<category symbol="8" label="Convention d'occupation précaire" render="true" value="Convention d'occupation précaire"/>
|
|
||||||
<category symbol="9" label="Contrat ORE" render="true" value="Contrat ORE"/>
|
|
||||||
<category symbol="10" label="Prêt à usage / commodat" render="true" value="Prêt à usage / commodat"/>
|
|
||||||
<category symbol="11" label="" render="false" value=""/>
|
|
||||||
</categories>
|
|
||||||
<symbols>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="0">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="50,235,64,179"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.3"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="1">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="248,215,83,179"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.3"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="10">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="180,238,244,179"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="11">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="40,161,78,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="2">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="237,156,50,179"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.3"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="3">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="44,238,138,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="4">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="0,204,255,179"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.3"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="5">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="231,138,232,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="6">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="176,201,163,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="7">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="35,137,225,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="8">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="255,250,177,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="9">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="28,161,99,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
</symbols>
|
|
||||||
<source-symbol>
|
|
||||||
<symbol alpha="1" type="fill" clip_to_extent="1" force_rhr="0" name="0">
|
|
||||||
<layer pass="0" locked="0" class="SimpleFill" enabled="1">
|
|
||||||
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="color" v="231,138,232,255"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0.26"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="style" v="solid"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
</source-symbol>
|
|
||||||
<rotation/>
|
|
||||||
<sizescale/>
|
|
||||||
</renderer-v2>
|
|
||||||
<customproperties>
|
|
||||||
<property key="dualview/previewExpressions" value=""nom""/>
|
|
||||||
<property key="embeddedWidgets/count" value="0"/>
|
|
||||||
<property key="variableNames"/>
|
|
||||||
<property key="variableValues"/>
|
|
||||||
</customproperties>
|
|
||||||
<blendMode>0</blendMode>
|
|
||||||
<featureBlendMode>0</featureBlendMode>
|
|
||||||
<layerOpacity>1</layerOpacity>
|
|
||||||
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Histogram">
|
|
||||||
<DiagramCategory barWidth="5" direction="1" diagramOrientation="Up" backgroundAlpha="255" maxScaleDenominator="1e+08" height="15" penWidth="0" enabled="0" penAlpha="255" sizeScale="3x:0,0,0,0,0,0" minimumSize="0" backgroundColor="#ffffff" scaleBasedVisibility="0" spacingUnit="MM" lineSizeType="MM" opacity="1" scaleDependency="Area" showAxis="0" labelPlacementMethod="XHeight" rotationOffset="270" lineSizeScale="3x:0,0,0,0,0,0" sizeType="MM" minScaleDenominator="0" spacing="0" penColor="#000000" width="15" spacingUnitScale="3x:0,0,0,0,0,0">
|
|
||||||
<fontProperties style="" description="MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0"/>
|
|
||||||
<attribute field="" label="" color="#000000"/>
|
|
||||||
<axisSymbol>
|
|
||||||
<symbol alpha="1" type="line" clip_to_extent="1" force_rhr="0" name="">
|
|
||||||
<layer pass="0" locked="0" class="SimpleLine" enabled="1">
|
|
||||||
<prop k="align_dash_pattern" v="0"/>
|
|
||||||
<prop k="capstyle" v="square"/>
|
|
||||||
<prop k="customdash" v="5;2"/>
|
|
||||||
<prop k="customdash_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="customdash_unit" v="MM"/>
|
|
||||||
<prop k="dash_pattern_offset" v="0"/>
|
|
||||||
<prop k="dash_pattern_offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="dash_pattern_offset_unit" v="MM"/>
|
|
||||||
<prop k="draw_inside_polygon" v="0"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="line_color" v="35,35,35,255"/>
|
|
||||||
<prop k="line_style" v="solid"/>
|
|
||||||
<prop k="line_width" v="0.26"/>
|
|
||||||
<prop k="line_width_unit" v="MM"/>
|
|
||||||
<prop k="offset" v="0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="ring_filter" v="0"/>
|
|
||||||
<prop k="tweak_dash_pattern_on_corners" v="0"/>
|
|
||||||
<prop k="use_custom_dash" v="0"/>
|
|
||||||
<prop k="width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
</axisSymbol>
|
|
||||||
</DiagramCategory>
|
|
||||||
</SingleCategoryDiagramRenderer>
|
|
||||||
<DiagramLayerSettings dist="0" linePlacementFlags="18" showAll="1" obstacle="0" placement="1" priority="0" zIndex="0">
|
|
||||||
<properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</properties>
|
|
||||||
</DiagramLayerSettings>
|
|
||||||
<geometryOptions geometryPrecision="0" removeDuplicateNodes="0">
|
|
||||||
<activeChecks/>
|
|
||||||
<checkConfiguration type="Map">
|
|
||||||
<Option type="Map" name="QgsGeometryGapCheck">
|
|
||||||
<Option value="0" type="double" name="allowedGapsBuffer"/>
|
|
||||||
<Option value="false" type="bool" name="allowedGapsEnabled"/>
|
|
||||||
<Option value="" type="QString" name="allowedGapsLayer"/>
|
|
||||||
</Option>
|
|
||||||
</checkConfiguration>
|
|
||||||
</geometryOptions>
|
|
||||||
<legend type="default-vector"/>
|
|
||||||
<referencedLayers/>
|
|
||||||
<fieldConfiguration>
|
|
||||||
<field configurationFlags="None" name="idparcelle">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="departement">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="insee_commune">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="insee_commune_ref">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="nom_commmune">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="section">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="numero">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="contenance">
|
|
||||||
<editWidget type="Range">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="libinteret">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="categorie_mfu">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="type_mfu">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="date_debut_mfu">
|
|
||||||
<editWidget type="DateTime">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="codesite">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="nom_site">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="date_debut_convention">
|
|
||||||
<editWidget type="DateTime">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="date_fin_convention">
|
|
||||||
<editWidget type="DateTime">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="reconductibilite_convention">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="idaire">
|
|
||||||
<editWidget type="Range">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="lib_aire">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="libdossier">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="libhabitat">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="last_idevenement">
|
|
||||||
<editWidget type="Range">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="last_libevenement">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="last_dateevenement">
|
|
||||||
<editWidget type="DateTime">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="utilisateur">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="millesime_cadastre">
|
|
||||||
<editWidget type="DateTime">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="source_cadastre">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="parcelle_partie">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="parcelle_mc">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="parcelle_bnd">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
</fieldConfiguration>
|
|
||||||
<aliases>
|
|
||||||
<alias field="idparcelle" index="0" name=""/>
|
|
||||||
<alias field="departement" index="1" name=""/>
|
|
||||||
<alias field="insee_commune" index="2" name=""/>
|
|
||||||
<alias field="insee_commune_ref" index="3" name=""/>
|
|
||||||
<alias field="nom_commmune" index="4" name=""/>
|
|
||||||
<alias field="section" index="5" name=""/>
|
|
||||||
<alias field="numero" index="6" name=""/>
|
|
||||||
<alias field="contenance" index="7" name=""/>
|
|
||||||
<alias field="libinteret" index="8" name=""/>
|
|
||||||
<alias field="categorie_mfu" index="9" name=""/>
|
|
||||||
<alias field="type_mfu" index="10" name=""/>
|
|
||||||
<alias field="date_debut_mfu" index="11" name=""/>
|
|
||||||
<alias field="codesite" index="12" name=""/>
|
|
||||||
<alias field="nom_site" index="13" name=""/>
|
|
||||||
<alias field="date_debut_convention" index="14" name=""/>
|
|
||||||
<alias field="date_fin_convention" index="15" name=""/>
|
|
||||||
<alias field="reconductibilite_convention" index="16" name=""/>
|
|
||||||
<alias field="idaire" index="17" name=""/>
|
|
||||||
<alias field="lib_aire" index="18" name=""/>
|
|
||||||
<alias field="libdossier" index="19" name=""/>
|
|
||||||
<alias field="libhabitat" index="20" name=""/>
|
|
||||||
<alias field="last_idevenement" index="21" name=""/>
|
|
||||||
<alias field="last_libevenement" index="22" name=""/>
|
|
||||||
<alias field="last_dateevenement" index="23" name=""/>
|
|
||||||
<alias field="utilisateur" index="24" name=""/>
|
|
||||||
<alias field="millesime_cadastre" index="25" name=""/>
|
|
||||||
<alias field="source_cadastre" index="26" name=""/>
|
|
||||||
<alias field="parcelle_partie" index="27" name=""/>
|
|
||||||
<alias field="parcelle_mc" index="28" name=""/>
|
|
||||||
<alias field="parcelle_bnd" index="29" name=""/>
|
|
||||||
</aliases>
|
|
||||||
<defaults>
|
|
||||||
<default field="idparcelle" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="departement" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="insee_commune" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="insee_commune_ref" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="nom_commmune" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="section" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="numero" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="contenance" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="libinteret" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="categorie_mfu" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="type_mfu" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="date_debut_mfu" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="codesite" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="nom_site" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="date_debut_convention" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="date_fin_convention" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="reconductibilite_convention" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="idaire" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="lib_aire" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="libdossier" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="libhabitat" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="last_idevenement" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="last_libevenement" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="last_dateevenement" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="utilisateur" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="millesime_cadastre" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="source_cadastre" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="parcelle_partie" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="parcelle_mc" expression="" applyOnUpdate="0"/>
|
|
||||||
<default field="parcelle_bnd" expression="" applyOnUpdate="0"/>
|
|
||||||
</defaults>
|
|
||||||
<constraints>
|
|
||||||
<constraint field="idparcelle" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="departement" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="insee_commune" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="insee_commune_ref" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="nom_commmune" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="section" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="numero" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="contenance" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="libinteret" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="categorie_mfu" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="type_mfu" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="date_debut_mfu" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="codesite" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="nom_site" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="date_debut_convention" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="date_fin_convention" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="reconductibilite_convention" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="idaire" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="lib_aire" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="libdossier" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="libhabitat" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="last_idevenement" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="last_libevenement" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="last_dateevenement" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="utilisateur" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="millesime_cadastre" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="source_cadastre" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="parcelle_partie" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="parcelle_mc" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
<constraint field="parcelle_bnd" constraints="0" notnull_strength="0" unique_strength="0" exp_strength="0"/>
|
|
||||||
</constraints>
|
|
||||||
<constraintExpressions>
|
|
||||||
<constraint field="idparcelle" exp="" desc=""/>
|
|
||||||
<constraint field="departement" exp="" desc=""/>
|
|
||||||
<constraint field="insee_commune" exp="" desc=""/>
|
|
||||||
<constraint field="insee_commune_ref" exp="" desc=""/>
|
|
||||||
<constraint field="nom_commmune" exp="" desc=""/>
|
|
||||||
<constraint field="section" exp="" desc=""/>
|
|
||||||
<constraint field="numero" exp="" desc=""/>
|
|
||||||
<constraint field="contenance" exp="" desc=""/>
|
|
||||||
<constraint field="libinteret" exp="" desc=""/>
|
|
||||||
<constraint field="categorie_mfu" exp="" desc=""/>
|
|
||||||
<constraint field="type_mfu" exp="" desc=""/>
|
|
||||||
<constraint field="date_debut_mfu" exp="" desc=""/>
|
|
||||||
<constraint field="codesite" exp="" desc=""/>
|
|
||||||
<constraint field="nom_site" exp="" desc=""/>
|
|
||||||
<constraint field="date_debut_convention" exp="" desc=""/>
|
|
||||||
<constraint field="date_fin_convention" exp="" desc=""/>
|
|
||||||
<constraint field="reconductibilite_convention" exp="" desc=""/>
|
|
||||||
<constraint field="idaire" exp="" desc=""/>
|
|
||||||
<constraint field="lib_aire" exp="" desc=""/>
|
|
||||||
<constraint field="libdossier" exp="" desc=""/>
|
|
||||||
<constraint field="libhabitat" exp="" desc=""/>
|
|
||||||
<constraint field="last_idevenement" exp="" desc=""/>
|
|
||||||
<constraint field="last_libevenement" exp="" desc=""/>
|
|
||||||
<constraint field="last_dateevenement" exp="" desc=""/>
|
|
||||||
<constraint field="utilisateur" exp="" desc=""/>
|
|
||||||
<constraint field="millesime_cadastre" exp="" desc=""/>
|
|
||||||
<constraint field="source_cadastre" exp="" desc=""/>
|
|
||||||
<constraint field="parcelle_partie" exp="" desc=""/>
|
|
||||||
<constraint field="parcelle_mc" exp="" desc=""/>
|
|
||||||
<constraint field="parcelle_bnd" exp="" desc=""/>
|
|
||||||
</constraintExpressions>
|
|
||||||
<expressionfields/>
|
|
||||||
<attributeactions>
|
|
||||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
|
||||||
</attributeactions>
|
|
||||||
<attributetableconfig actionWidgetStyle="dropDown" sortExpression=""date_debut"" sortOrder="1">
|
|
||||||
<columns>
|
|
||||||
<column hidden="0" type="field" width="-1" name="idparcelle"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="section"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="numero"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="contenance"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="libinteret"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="type_mfu"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="utilisateur"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="idaire"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="libdossier"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="libhabitat"/>
|
|
||||||
<column hidden="1" type="actions" width="-1"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="departement"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="insee_commune"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="insee_commune_ref"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="nom_commmune"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="categorie_mfu"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="date_debut_mfu"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="codesite"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="nom_site"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="date_debut_convention"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="date_fin_convention"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="reconductibilite_convention"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="lib_aire"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="last_idevenement"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="last_libevenement"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="last_dateevenement"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="millesime_cadastre"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="source_cadastre"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="parcelle_partie"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="parcelle_mc"/>
|
|
||||||
<column hidden="0" type="field" width="-1" name="parcelle_bnd"/>
|
|
||||||
</columns>
|
|
||||||
</attributetableconfig>
|
|
||||||
<conditionalstyles>
|
|
||||||
<rowstyles/>
|
|
||||||
<fieldstyles/>
|
|
||||||
</conditionalstyles>
|
|
||||||
<storedexpressions/>
|
|
||||||
<editform tolerant="1"></editform>
|
|
||||||
<editforminit/>
|
|
||||||
<editforminitcodesource>0</editforminitcodesource>
|
|
||||||
<editforminitfilepath></editforminitfilepath>
|
|
||||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
Les formulaires QGIS peuvent avoir une fonction Python qui sera appelée à l'ouverture du formulaire.
|
|
||||||
|
|
||||||
Utilisez cette fonction pour ajouter plus de fonctionnalités à vos formulaires.
|
|
||||||
|
|
||||||
Entrez le nom de la fonction dans le champ "Fonction d'initialisation Python".
|
|
||||||
Voici un exemple à suivre:
|
|
||||||
"""
|
|
||||||
from qgis.PyQt.QtWidgets import QWidget
|
|
||||||
|
|
||||||
def my_form_open(dialog, layer, feature):
|
|
||||||
geom = feature.geometry()
|
|
||||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
|
||||||
|
|
||||||
]]></editforminitcode>
|
|
||||||
<featformsuppress>0</featformsuppress>
|
|
||||||
<editorlayout>generatedlayout</editorlayout>
|
|
||||||
<editable>
|
|
||||||
<field editable="1" name="categorie_mfu"/>
|
|
||||||
<field editable="1" name="codesite"/>
|
|
||||||
<field editable="1" name="commune"/>
|
|
||||||
<field editable="1" name="commune_ref"/>
|
|
||||||
<field editable="1" name="contenance"/>
|
|
||||||
<field editable="1" name="date_debut"/>
|
|
||||||
<field editable="1" name="date_debut_convention"/>
|
|
||||||
<field editable="1" name="date_debut_mfu"/>
|
|
||||||
<field editable="1" name="date_fin"/>
|
|
||||||
<field editable="1" name="date_fin_convention"/>
|
|
||||||
<field editable="1" name="date_saisie"/>
|
|
||||||
<field editable="1" name="dateevenement"/>
|
|
||||||
<field editable="1" name="departement"/>
|
|
||||||
<field editable="1" name="gid"/>
|
|
||||||
<field editable="1" name="id_type_mfu"/>
|
|
||||||
<field editable="1" name="idaire"/>
|
|
||||||
<field editable="1" name="idcategorie"/>
|
|
||||||
<field editable="1" name="idparcelle"/>
|
|
||||||
<field editable="1" name="insee_commune"/>
|
|
||||||
<field editable="1" name="insee_commune_ref"/>
|
|
||||||
<field editable="1" name="last_dateevenement"/>
|
|
||||||
<field editable="1" name="last_idevenement"/>
|
|
||||||
<field editable="1" name="last_libevenement"/>
|
|
||||||
<field editable="1" name="lib_aire"/>
|
|
||||||
<field editable="1" name="libaire"/>
|
|
||||||
<field editable="1" name="libcategorie"/>
|
|
||||||
<field editable="1" name="libdossier"/>
|
|
||||||
<field editable="1" name="libevenement"/>
|
|
||||||
<field editable="1" name="libhabitat"/>
|
|
||||||
<field editable="1" name="libinteret"/>
|
|
||||||
<field editable="1" name="millesime_cadastre"/>
|
|
||||||
<field editable="1" name="nom"/>
|
|
||||||
<field editable="1" name="nom_commmune"/>
|
|
||||||
<field editable="1" name="nom_site"/>
|
|
||||||
<field editable="1" name="numero"/>
|
|
||||||
<field editable="1" name="parcelle_bnd"/>
|
|
||||||
<field editable="1" name="parcelle_mc"/>
|
|
||||||
<field editable="1" name="parcelle_partie"/>
|
|
||||||
<field editable="1" name="reconductibilite"/>
|
|
||||||
<field editable="1" name="reconductibilite_convention"/>
|
|
||||||
<field editable="1" name="section"/>
|
|
||||||
<field editable="1" name="source_cadastre"/>
|
|
||||||
<field editable="1" name="type_mfu"/>
|
|
||||||
<field editable="1" name="utilisateur"/>
|
|
||||||
</editable>
|
|
||||||
<labelOnTop>
|
|
||||||
<field labelOnTop="0" name="categorie_mfu"/>
|
|
||||||
<field labelOnTop="0" name="codesite"/>
|
|
||||||
<field labelOnTop="0" name="commune"/>
|
|
||||||
<field labelOnTop="0" name="commune_ref"/>
|
|
||||||
<field labelOnTop="0" name="contenance"/>
|
|
||||||
<field labelOnTop="0" name="date_debut"/>
|
|
||||||
<field labelOnTop="0" name="date_debut_convention"/>
|
|
||||||
<field labelOnTop="0" name="date_debut_mfu"/>
|
|
||||||
<field labelOnTop="0" name="date_fin"/>
|
|
||||||
<field labelOnTop="0" name="date_fin_convention"/>
|
|
||||||
<field labelOnTop="0" name="date_saisie"/>
|
|
||||||
<field labelOnTop="0" name="dateevenement"/>
|
|
||||||
<field labelOnTop="0" name="departement"/>
|
|
||||||
<field labelOnTop="0" name="gid"/>
|
|
||||||
<field labelOnTop="0" name="id_type_mfu"/>
|
|
||||||
<field labelOnTop="0" name="idaire"/>
|
|
||||||
<field labelOnTop="0" name="idcategorie"/>
|
|
||||||
<field labelOnTop="0" name="idparcelle"/>
|
|
||||||
<field labelOnTop="0" name="insee_commune"/>
|
|
||||||
<field labelOnTop="0" name="insee_commune_ref"/>
|
|
||||||
<field labelOnTop="0" name="last_dateevenement"/>
|
|
||||||
<field labelOnTop="0" name="last_idevenement"/>
|
|
||||||
<field labelOnTop="0" name="last_libevenement"/>
|
|
||||||
<field labelOnTop="0" name="lib_aire"/>
|
|
||||||
<field labelOnTop="0" name="libaire"/>
|
|
||||||
<field labelOnTop="0" name="libcategorie"/>
|
|
||||||
<field labelOnTop="0" name="libdossier"/>
|
|
||||||
<field labelOnTop="0" name="libevenement"/>
|
|
||||||
<field labelOnTop="0" name="libhabitat"/>
|
|
||||||
<field labelOnTop="0" name="libinteret"/>
|
|
||||||
<field labelOnTop="0" name="millesime_cadastre"/>
|
|
||||||
<field labelOnTop="0" name="nom"/>
|
|
||||||
<field labelOnTop="0" name="nom_commmune"/>
|
|
||||||
<field labelOnTop="0" name="nom_site"/>
|
|
||||||
<field labelOnTop="0" name="numero"/>
|
|
||||||
<field labelOnTop="0" name="parcelle_bnd"/>
|
|
||||||
<field labelOnTop="0" name="parcelle_mc"/>
|
|
||||||
<field labelOnTop="0" name="parcelle_partie"/>
|
|
||||||
<field labelOnTop="0" name="reconductibilite"/>
|
|
||||||
<field labelOnTop="0" name="reconductibilite_convention"/>
|
|
||||||
<field labelOnTop="0" name="section"/>
|
|
||||||
<field labelOnTop="0" name="source_cadastre"/>
|
|
||||||
<field labelOnTop="0" name="type_mfu"/>
|
|
||||||
<field labelOnTop="0" name="utilisateur"/>
|
|
||||||
</labelOnTop>
|
|
||||||
<dataDefinedFieldProperties/>
|
|
||||||
<widgets/>
|
|
||||||
<previewExpression>"nom"</previewExpression>
|
|
||||||
<mapTip></mapTip>
|
|
||||||
<layerGeometryType>2</layerGeometryType>
|
|
||||||
</qgis>
|
|
||||||
@@ -1,482 +0,0 @@
|
|||||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
|
||||||
<qgis minScale="100000000" version="3.22.5-Białowieża" simplifyLocal="1" readOnly="0" labelsEnabled="0" simplifyAlgorithm="0" maxScale="0" simplifyMaxScale="1" hasScaleBasedVisibilityFlag="0" simplifyDrawingHints="0" styleCategories="AllStyleCategories" symbologyReferenceScale="-1" simplifyDrawingTol="1">
|
|
||||||
<flags>
|
|
||||||
<Identifiable>1</Identifiable>
|
|
||||||
<Removable>1</Removable>
|
|
||||||
<Searchable>1</Searchable>
|
|
||||||
<Private>0</Private>
|
|
||||||
</flags>
|
|
||||||
<temporal endExpression="" limitMode="0" durationField="profondeur" durationUnit="min" accumulate="0" fixedDuration="0" enabled="0" endField="" startField="date_installation" mode="0" startExpression="">
|
|
||||||
<fixedRange>
|
|
||||||
<start></start>
|
|
||||||
<end></end>
|
|
||||||
</fixedRange>
|
|
||||||
</temporal>
|
|
||||||
<renderer-v2 forceraster="0" referencescale="-1" symbollevels="0" enableorderby="0" type="singleSymbol">
|
|
||||||
<symbols>
|
|
||||||
<symbol clip_to_extent="1" alpha="1" force_rhr="0" type="marker" name="0">
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
<layer class="SimpleMarker" pass="0" enabled="1" locked="0">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="0" type="QString" name="angle"/>
|
|
||||||
<Option value="square" type="QString" name="cap_style"/>
|
|
||||||
<Option value="164,113,88,255" type="QString" name="color"/>
|
|
||||||
<Option value="1" type="QString" name="horizontal_anchor_point"/>
|
|
||||||
<Option value="bevel" type="QString" name="joinstyle"/>
|
|
||||||
<Option value="circle" type="QString" name="name"/>
|
|
||||||
<Option value="0,0" type="QString" name="offset"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="offset_unit"/>
|
|
||||||
<Option value="35,35,35,255" type="QString" name="outline_color"/>
|
|
||||||
<Option value="solid" type="QString" name="outline_style"/>
|
|
||||||
<Option value="0" type="QString" name="outline_width"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="outline_width_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="outline_width_unit"/>
|
|
||||||
<Option value="diameter" type="QString" name="scale_method"/>
|
|
||||||
<Option value="2" type="QString" name="size"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="size_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="size_unit"/>
|
|
||||||
<Option value="1" type="QString" name="vertical_anchor_point"/>
|
|
||||||
</Option>
|
|
||||||
<prop k="angle" v="0"/>
|
|
||||||
<prop k="cap_style" v="square"/>
|
|
||||||
<prop k="color" v="164,113,88,255"/>
|
|
||||||
<prop k="horizontal_anchor_point" v="1"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="name" v="circle"/>
|
|
||||||
<prop k="offset" v="0,0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="outline_color" v="35,35,35,255"/>
|
|
||||||
<prop k="outline_style" v="solid"/>
|
|
||||||
<prop k="outline_width" v="0"/>
|
|
||||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="outline_width_unit" v="MM"/>
|
|
||||||
<prop k="scale_method" v="diameter"/>
|
|
||||||
<prop k="size" v="2"/>
|
|
||||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="size_unit" v="MM"/>
|
|
||||||
<prop k="vertical_anchor_point" v="1"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
</symbols>
|
|
||||||
<rotation/>
|
|
||||||
<sizescale/>
|
|
||||||
</renderer-v2>
|
|
||||||
<customproperties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="List" name="dualview/previewExpressions">
|
|
||||||
<Option value=""id_cen"" type="QString"/>
|
|
||||||
</Option>
|
|
||||||
<Option value="0" type="int" name="embeddedWidgets/count"/>
|
|
||||||
<Option name="variableNames"/>
|
|
||||||
<Option name="variableValues"/>
|
|
||||||
</Option>
|
|
||||||
</customproperties>
|
|
||||||
<blendMode>0</blendMode>
|
|
||||||
<featureBlendMode>0</featureBlendMode>
|
|
||||||
<layerOpacity>1</layerOpacity>
|
|
||||||
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Histogram">
|
|
||||||
<DiagramCategory width="15" showAxis="1" minScaleDenominator="0" rotationOffset="270" backgroundColor="#ffffff" minimumSize="0" scaleBasedVisibility="0" barWidth="5" backgroundAlpha="255" sizeScale="3x:0,0,0,0,0,0" lineSizeType="MM" penColor="#000000" opacity="1" diagramOrientation="Up" direction="0" lineSizeScale="3x:0,0,0,0,0,0" scaleDependency="Area" spacing="5" maxScaleDenominator="1e+08" spacingUnit="MM" labelPlacementMethod="XHeight" penWidth="0" spacingUnitScale="3x:0,0,0,0,0,0" penAlpha="255" enabled="0" sizeType="MM" height="15">
|
|
||||||
<fontProperties style="" description="MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0"/>
|
|
||||||
<attribute field="" label="" color="#000000"/>
|
|
||||||
<axisSymbol>
|
|
||||||
<symbol clip_to_extent="1" alpha="1" force_rhr="0" type="line" name="">
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
<layer class="SimpleLine" pass="0" enabled="1" locked="0">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="0" type="QString" name="align_dash_pattern"/>
|
|
||||||
<Option value="square" type="QString" name="capstyle"/>
|
|
||||||
<Option value="5;2" type="QString" name="customdash"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="customdash_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="customdash_unit"/>
|
|
||||||
<Option value="0" type="QString" name="dash_pattern_offset"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="dash_pattern_offset_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="dash_pattern_offset_unit"/>
|
|
||||||
<Option value="0" type="QString" name="draw_inside_polygon"/>
|
|
||||||
<Option value="bevel" type="QString" name="joinstyle"/>
|
|
||||||
<Option value="35,35,35,255" type="QString" name="line_color"/>
|
|
||||||
<Option value="solid" type="QString" name="line_style"/>
|
|
||||||
<Option value="0.26" type="QString" name="line_width"/>
|
|
||||||
<Option value="MM" type="QString" name="line_width_unit"/>
|
|
||||||
<Option value="0" type="QString" name="offset"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="offset_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="offset_unit"/>
|
|
||||||
<Option value="0" type="QString" name="ring_filter"/>
|
|
||||||
<Option value="0" type="QString" name="trim_distance_end"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_end_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="trim_distance_end_unit"/>
|
|
||||||
<Option value="0" type="QString" name="trim_distance_start"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="trim_distance_start_map_unit_scale"/>
|
|
||||||
<Option value="MM" type="QString" name="trim_distance_start_unit"/>
|
|
||||||
<Option value="0" type="QString" name="tweak_dash_pattern_on_corners"/>
|
|
||||||
<Option value="0" type="QString" name="use_custom_dash"/>
|
|
||||||
<Option value="3x:0,0,0,0,0,0" type="QString" name="width_map_unit_scale"/>
|
|
||||||
</Option>
|
|
||||||
<prop k="align_dash_pattern" v="0"/>
|
|
||||||
<prop k="capstyle" v="square"/>
|
|
||||||
<prop k="customdash" v="5;2"/>
|
|
||||||
<prop k="customdash_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="customdash_unit" v="MM"/>
|
|
||||||
<prop k="dash_pattern_offset" v="0"/>
|
|
||||||
<prop k="dash_pattern_offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="dash_pattern_offset_unit" v="MM"/>
|
|
||||||
<prop k="draw_inside_polygon" v="0"/>
|
|
||||||
<prop k="joinstyle" v="bevel"/>
|
|
||||||
<prop k="line_color" v="35,35,35,255"/>
|
|
||||||
<prop k="line_style" v="solid"/>
|
|
||||||
<prop k="line_width" v="0.26"/>
|
|
||||||
<prop k="line_width_unit" v="MM"/>
|
|
||||||
<prop k="offset" v="0"/>
|
|
||||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="offset_unit" v="MM"/>
|
|
||||||
<prop k="ring_filter" v="0"/>
|
|
||||||
<prop k="trim_distance_end" v="0"/>
|
|
||||||
<prop k="trim_distance_end_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="trim_distance_end_unit" v="MM"/>
|
|
||||||
<prop k="trim_distance_start" v="0"/>
|
|
||||||
<prop k="trim_distance_start_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<prop k="trim_distance_start_unit" v="MM"/>
|
|
||||||
<prop k="tweak_dash_pattern_on_corners" v="0"/>
|
|
||||||
<prop k="use_custom_dash" v="0"/>
|
|
||||||
<prop k="width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
</axisSymbol>
|
|
||||||
</DiagramCategory>
|
|
||||||
</SingleCategoryDiagramRenderer>
|
|
||||||
<DiagramLayerSettings dist="0" showAll="1" obstacle="0" zIndex="0" linePlacementFlags="18" priority="0" placement="0">
|
|
||||||
<properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="" type="QString" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option value="collection" type="QString" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</properties>
|
|
||||||
</DiagramLayerSettings>
|
|
||||||
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
|
|
||||||
<activeChecks/>
|
|
||||||
<checkConfiguration/>
|
|
||||||
</geometryOptions>
|
|
||||||
<legend showLabelLegend="0" type="default-vector"/>
|
|
||||||
<referencedLayers/>
|
|
||||||
<fieldConfiguration>
|
|
||||||
<field configurationFlags="None" name="id_cen">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="commune">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="dept">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="date_installation">
|
|
||||||
<editWidget type="DateTime">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="true" type="bool" name="allow_null"/>
|
|
||||||
<Option value="true" type="bool" name="calendar_popup"/>
|
|
||||||
<Option value="dd/MM/yyyy" type="QString" name="display_format"/>
|
|
||||||
<Option value="dd/MM/yyyy" type="QString" name="field_format"/>
|
|
||||||
<Option value="false" type="bool" name="field_iso_format"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="modele_sonde">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="logiciel">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="frequence_sauvegarde">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="ligero">
|
|
||||||
<editWidget type="ValueMap">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="List" name="map">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="oui" type="QString" name="oui"/>
|
|
||||||
</Option>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="non" type="QString" name="non"/>
|
|
||||||
</Option>
|
|
||||||
</Option>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="profondeur">
|
|
||||||
<editWidget type="Range">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="true" type="bool" name="AllowNull"/>
|
|
||||||
<Option value="100" type="double" name="Max"/>
|
|
||||||
<Option value="0" type="double" name="Min"/>
|
|
||||||
<Option value="0" type="int" name="Precision"/>
|
|
||||||
<Option value="10" type="double" name="Step"/>
|
|
||||||
<Option value="SpinBox" type="QString" name="Style"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="contexte">
|
|
||||||
<editWidget type="ValueMap">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="List" name="map">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="Tourbière boisée" type="QString" name="Tourbière boisée"/>
|
|
||||||
</Option>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="Autres" type="QString" name="Autres"/>
|
|
||||||
</Option>
|
|
||||||
</Option>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="salarie_referent">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="commentaires">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option value="false" type="bool" name="IsMultiline"/>
|
|
||||||
<Option value="false" type="bool" name="UseHtml"/>
|
|
||||||
</Option>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
</fieldConfiguration>
|
|
||||||
<aliases>
|
|
||||||
<alias field="id_cen" index="0" name=""/>
|
|
||||||
<alias field="commune" index="1" name=""/>
|
|
||||||
<alias field="dept" index="2" name=""/>
|
|
||||||
<alias field="date_installation" index="3" name=""/>
|
|
||||||
<alias field="modele_sonde" index="4" name=""/>
|
|
||||||
<alias field="logiciel" index="5" name=""/>
|
|
||||||
<alias field="frequence_sauvegarde" index="6" name=""/>
|
|
||||||
<alias field="ligero" index="7" name=""/>
|
|
||||||
<alias field="profondeur" index="8" name=""/>
|
|
||||||
<alias field="contexte" index="9" name=""/>
|
|
||||||
<alias field="salarie_referent" index="10" name=""/>
|
|
||||||
<alias field="commentaires" index="11" name=""/>
|
|
||||||
</aliases>
|
|
||||||
<defaults>
|
|
||||||
<default field="id_cen" applyOnUpdate="1" expression="concat(substr(maximum("id_cen"),0,-1), format_number(substr(maximum("id_cen"),7,8),0)+1)"/>
|
|
||||||
<default field="commune" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="dept" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="date_installation" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="modele_sonde" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="logiciel" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="frequence_sauvegarde" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="ligero" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="profondeur" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="contexte" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="salarie_referent" applyOnUpdate="0" expression=""/>
|
|
||||||
<default field="commentaires" applyOnUpdate="0" expression=""/>
|
|
||||||
</defaults>
|
|
||||||
<constraints>
|
|
||||||
<constraint field="id_cen" exp_strength="0" notnull_strength="1" constraints="3" unique_strength="1"/>
|
|
||||||
<constraint field="commune" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="dept" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="date_installation" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="modele_sonde" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="logiciel" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="frequence_sauvegarde" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="ligero" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="profondeur" exp_strength="0" notnull_strength="1" constraints="1" unique_strength="0"/>
|
|
||||||
<constraint field="contexte" exp_strength="0" notnull_strength="1" constraints="1" unique_strength="0"/>
|
|
||||||
<constraint field="salarie_referent" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
<constraint field="commentaires" exp_strength="0" notnull_strength="0" constraints="0" unique_strength="0"/>
|
|
||||||
</constraints>
|
|
||||||
<constraintExpressions>
|
|
||||||
<constraint field="id_cen" exp="" desc=""/>
|
|
||||||
<constraint field="commune" exp="" desc=""/>
|
|
||||||
<constraint field="dept" exp="" desc=""/>
|
|
||||||
<constraint field="date_installation" exp="" desc=""/>
|
|
||||||
<constraint field="modele_sonde" exp="" desc=""/>
|
|
||||||
<constraint field="logiciel" exp="" desc=""/>
|
|
||||||
<constraint field="frequence_sauvegarde" exp="" desc=""/>
|
|
||||||
<constraint field="ligero" exp="" desc=""/>
|
|
||||||
<constraint field="profondeur" exp="" desc=""/>
|
|
||||||
<constraint field="contexte" exp="" desc=""/>
|
|
||||||
<constraint field="salarie_referent" exp="" desc=""/>
|
|
||||||
<constraint field="commentaires" exp="" desc=""/>
|
|
||||||
</constraintExpressions>
|
|
||||||
<expressionfields/>
|
|
||||||
<attributeactions>
|
|
||||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
|
||||||
</attributeactions>
|
|
||||||
<attributetableconfig sortExpression="" actionWidgetStyle="dropDown" sortOrder="0">
|
|
||||||
<columns>
|
|
||||||
<column hidden="0" width="-1" type="field" name="id_cen"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="commune"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="dept"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="date_installation"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="modele_sonde"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="logiciel"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="frequence_sauvegarde"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="ligero"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="profondeur"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="contexte"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="salarie_referent"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="commentaires"/>
|
|
||||||
<column hidden="1" width="-1" type="actions"/>
|
|
||||||
</columns>
|
|
||||||
</attributetableconfig>
|
|
||||||
<conditionalstyles>
|
|
||||||
<rowstyles/>
|
|
||||||
<fieldstyles/>
|
|
||||||
</conditionalstyles>
|
|
||||||
<storedexpressions/>
|
|
||||||
<editform tolerant="1"></editform>
|
|
||||||
<editforminit/>
|
|
||||||
<editforminitcodesource>0</editforminitcodesource>
|
|
||||||
<editforminitfilepath></editforminitfilepath>
|
|
||||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
QGIS forms can have a Python function that is called when the form is
|
|
||||||
opened.
|
|
||||||
|
|
||||||
Use this function to add extra logic to your forms.
|
|
||||||
|
|
||||||
Enter the name of the function in the "Python Init function"
|
|
||||||
field.
|
|
||||||
An example follows:
|
|
||||||
"""
|
|
||||||
from qgis.PyQt.QtWidgets import QWidget
|
|
||||||
|
|
||||||
def my_form_open(dialog, layer, feature):
|
|
||||||
geom = feature.geometry()
|
|
||||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
|
||||||
]]></editforminitcode>
|
|
||||||
<featformsuppress>0</featformsuppress>
|
|
||||||
<editorlayout>generatedlayout</editorlayout>
|
|
||||||
<editable>
|
|
||||||
<field editable="1" name="commentaires"/>
|
|
||||||
<field editable="1" name="commune"/>
|
|
||||||
<field editable="1" name="contexte"/>
|
|
||||||
<field editable="1" name="date_installation"/>
|
|
||||||
<field editable="1" name="dept"/>
|
|
||||||
<field editable="1" name="frequence_sauvegarde"/>
|
|
||||||
<field editable="0" name="id_cen"/>
|
|
||||||
<field editable="1" name="ligero"/>
|
|
||||||
<field editable="1" name="logiciel"/>
|
|
||||||
<field editable="1" name="modele_sonde"/>
|
|
||||||
<field editable="1" name="profondeur"/>
|
|
||||||
<field editable="1" name="salarie_referent"/>
|
|
||||||
</editable>
|
|
||||||
<labelOnTop>
|
|
||||||
<field labelOnTop="0" name="commentaires"/>
|
|
||||||
<field labelOnTop="0" name="commune"/>
|
|
||||||
<field labelOnTop="0" name="contexte"/>
|
|
||||||
<field labelOnTop="0" name="date_installation"/>
|
|
||||||
<field labelOnTop="0" name="dept"/>
|
|
||||||
<field labelOnTop="0" name="frequence_sauvegarde"/>
|
|
||||||
<field labelOnTop="0" name="id_cen"/>
|
|
||||||
<field labelOnTop="0" name="ligero"/>
|
|
||||||
<field labelOnTop="0" name="logiciel"/>
|
|
||||||
<field labelOnTop="0" name="modele_sonde"/>
|
|
||||||
<field labelOnTop="0" name="profondeur"/>
|
|
||||||
<field labelOnTop="0" name="salarie_referent"/>
|
|
||||||
</labelOnTop>
|
|
||||||
<reuseLastValue>
|
|
||||||
<field reuseLastValue="0" name="commentaires"/>
|
|
||||||
<field reuseLastValue="0" name="commune"/>
|
|
||||||
<field reuseLastValue="0" name="contexte"/>
|
|
||||||
<field reuseLastValue="0" name="date_installation"/>
|
|
||||||
<field reuseLastValue="0" name="dept"/>
|
|
||||||
<field reuseLastValue="0" name="frequence_sauvegarde"/>
|
|
||||||
<field reuseLastValue="0" name="id_cen"/>
|
|
||||||
<field reuseLastValue="0" name="ligero"/>
|
|
||||||
<field reuseLastValue="0" name="logiciel"/>
|
|
||||||
<field reuseLastValue="0" name="modele_sonde"/>
|
|
||||||
<field reuseLastValue="0" name="profondeur"/>
|
|
||||||
<field reuseLastValue="0" name="salarie_referent"/>
|
|
||||||
</reuseLastValue>
|
|
||||||
<dataDefinedFieldProperties/>
|
|
||||||
<widgets/>
|
|
||||||
<previewExpression>"id_cen"</previewExpression>
|
|
||||||
<mapTip></mapTip>
|
|
||||||
<layerGeometryType>0</layerGeometryType>
|
|
||||||
</qgis>
|
|
||||||
@@ -1,579 +0,0 @@
|
|||||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
|
||||||
<qgis labelsEnabled="0" hasScaleBasedVisibilityFlag="0" simplifyAlgorithm="0" version="3.22.9-Białowieża" simplifyDrawingTol="1" simplifyMaxScale="1" minScale="100000000" readOnly="0" simplifyDrawingHints="1" simplifyLocal="1" maxScale="0" styleCategories="AllStyleCategories" symbologyReferenceScale="-1">
|
|
||||||
<flags>
|
|
||||||
<Identifiable>1</Identifiable>
|
|
||||||
<Removable>1</Removable>
|
|
||||||
<Searchable>1</Searchable>
|
|
||||||
<Private>0</Private>
|
|
||||||
</flags>
|
|
||||||
<temporal fixedDuration="0" accumulate="0" startExpression="" durationField="" limitMode="0" startField="" enabled="0" endField="" durationUnit="min" endExpression="" mode="0">
|
|
||||||
<fixedRange>
|
|
||||||
<start></start>
|
|
||||||
<end></end>
|
|
||||||
</fixedRange>
|
|
||||||
</temporal>
|
|
||||||
<renderer-v2 symbollevels="0" forceraster="0" referencescale="-1" enableorderby="0" type="RuleRenderer">
|
|
||||||
<rules key="{928b307f-dbff-493f-b4c5-ac8d6da66bc4}">
|
|
||||||
<rule symbol="0" label="Zone bâtie et autre habitat artificiel" filter="nom_simplifie_hab = 'Zone bâtie et autre habitat artificiel'" key="{7ccc6fa5-4ed7-491d-b6b6-d3490840c433}"/>
|
|
||||||
</rules>
|
|
||||||
<symbols>
|
|
||||||
<symbol force_rhr="0" alpha="1" clip_to_extent="1" type="fill" name="0">
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="QString" value="" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option type="QString" value="collection" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
<layer pass="0" class="SimpleFill" enabled="1" locked="0">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="border_width_map_unit_scale"/>
|
|
||||||
<Option type="QString" value="97,97,97,255" name="color"/>
|
|
||||||
<Option type="QString" value="bevel" name="joinstyle"/>
|
|
||||||
<Option type="QString" value="0,0" name="offset"/>
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="offset_map_unit_scale"/>
|
|
||||||
<Option type="QString" value="Pixel" name="offset_unit"/>
|
|
||||||
<Option type="QString" value="0,0,0,255" name="outline_color"/>
|
|
||||||
<Option type="QString" value="no" name="outline_style"/>
|
|
||||||
<Option type="QString" value="1" name="outline_width"/>
|
|
||||||
<Option type="QString" value="Pixel" name="outline_width_unit"/>
|
|
||||||
<Option type="QString" value="solid" name="style"/>
|
|
||||||
</Option>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="border_width_map_unit_scale"/>
|
|
||||||
<prop v="97,97,97,255" k="color"/>
|
|
||||||
<prop v="bevel" k="joinstyle"/>
|
|
||||||
<prop v="0,0" k="offset"/>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
|
||||||
<prop v="Pixel" k="offset_unit"/>
|
|
||||||
<prop v="0,0,0,255" k="outline_color"/>
|
|
||||||
<prop v="no" k="outline_style"/>
|
|
||||||
<prop v="1" k="outline_width"/>
|
|
||||||
<prop v="Pixel" k="outline_width_unit"/>
|
|
||||||
<prop v="solid" k="style"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="QString" value="" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option type="QString" value="collection" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
</symbols>
|
|
||||||
</renderer-v2>
|
|
||||||
<customproperties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="int" value="0" name="embeddedWidgets/count"/>
|
|
||||||
<Option name="variableNames"/>
|
|
||||||
<Option name="variableValues"/>
|
|
||||||
</Option>
|
|
||||||
</customproperties>
|
|
||||||
<blendMode>0</blendMode>
|
|
||||||
<featureBlendMode>0</featureBlendMode>
|
|
||||||
<layerOpacity>1</layerOpacity>
|
|
||||||
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Histogram">
|
|
||||||
<DiagramCategory penAlpha="255" lineSizeType="MM" backgroundColor="#ffffff" sizeType="MM" enabled="0" barWidth="5" penColor="#000000" rotationOffset="270" maxScaleDenominator="1e+08" direction="0" width="15" sizeScale="3x:0,0,0,0,0,0" lineSizeScale="3x:0,0,0,0,0,0" minimumSize="0" spacingUnitScale="3x:0,0,0,0,0,0" spacing="5" scaleBasedVisibility="0" labelPlacementMethod="XHeight" scaleDependency="Area" diagramOrientation="Up" opacity="1" showAxis="1" minScaleDenominator="0" backgroundAlpha="255" spacingUnit="MM" height="15" penWidth="0">
|
|
||||||
<fontProperties style="" description="Noto Sans,9,-1,5,50,0,0,0,0,0"/>
|
|
||||||
<axisSymbol>
|
|
||||||
<symbol force_rhr="0" alpha="1" clip_to_extent="1" type="line" name="">
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="QString" value="" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option type="QString" value="collection" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
<layer pass="0" class="SimpleLine" enabled="1" locked="0">
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="QString" value="0" name="align_dash_pattern"/>
|
|
||||||
<Option type="QString" value="square" name="capstyle"/>
|
|
||||||
<Option type="QString" value="5;2" name="customdash"/>
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="customdash_map_unit_scale"/>
|
|
||||||
<Option type="QString" value="MM" name="customdash_unit"/>
|
|
||||||
<Option type="QString" value="0" name="dash_pattern_offset"/>
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="dash_pattern_offset_map_unit_scale"/>
|
|
||||||
<Option type="QString" value="MM" name="dash_pattern_offset_unit"/>
|
|
||||||
<Option type="QString" value="0" name="draw_inside_polygon"/>
|
|
||||||
<Option type="QString" value="bevel" name="joinstyle"/>
|
|
||||||
<Option type="QString" value="35,35,35,255" name="line_color"/>
|
|
||||||
<Option type="QString" value="solid" name="line_style"/>
|
|
||||||
<Option type="QString" value="0.26" name="line_width"/>
|
|
||||||
<Option type="QString" value="MM" name="line_width_unit"/>
|
|
||||||
<Option type="QString" value="0" name="offset"/>
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="offset_map_unit_scale"/>
|
|
||||||
<Option type="QString" value="MM" name="offset_unit"/>
|
|
||||||
<Option type="QString" value="0" name="ring_filter"/>
|
|
||||||
<Option type="QString" value="0" name="trim_distance_end"/>
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="trim_distance_end_map_unit_scale"/>
|
|
||||||
<Option type="QString" value="MM" name="trim_distance_end_unit"/>
|
|
||||||
<Option type="QString" value="0" name="trim_distance_start"/>
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="trim_distance_start_map_unit_scale"/>
|
|
||||||
<Option type="QString" value="MM" name="trim_distance_start_unit"/>
|
|
||||||
<Option type="QString" value="0" name="tweak_dash_pattern_on_corners"/>
|
|
||||||
<Option type="QString" value="0" name="use_custom_dash"/>
|
|
||||||
<Option type="QString" value="3x:0,0,0,0,0,0" name="width_map_unit_scale"/>
|
|
||||||
</Option>
|
|
||||||
<prop v="0" k="align_dash_pattern"/>
|
|
||||||
<prop v="square" k="capstyle"/>
|
|
||||||
<prop v="5;2" k="customdash"/>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
|
|
||||||
<prop v="MM" k="customdash_unit"/>
|
|
||||||
<prop v="0" k="dash_pattern_offset"/>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="dash_pattern_offset_map_unit_scale"/>
|
|
||||||
<prop v="MM" k="dash_pattern_offset_unit"/>
|
|
||||||
<prop v="0" k="draw_inside_polygon"/>
|
|
||||||
<prop v="bevel" k="joinstyle"/>
|
|
||||||
<prop v="35,35,35,255" k="line_color"/>
|
|
||||||
<prop v="solid" k="line_style"/>
|
|
||||||
<prop v="0.26" k="line_width"/>
|
|
||||||
<prop v="MM" k="line_width_unit"/>
|
|
||||||
<prop v="0" k="offset"/>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
|
|
||||||
<prop v="MM" k="offset_unit"/>
|
|
||||||
<prop v="0" k="ring_filter"/>
|
|
||||||
<prop v="0" k="trim_distance_end"/>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="trim_distance_end_map_unit_scale"/>
|
|
||||||
<prop v="MM" k="trim_distance_end_unit"/>
|
|
||||||
<prop v="0" k="trim_distance_start"/>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="trim_distance_start_map_unit_scale"/>
|
|
||||||
<prop v="MM" k="trim_distance_start_unit"/>
|
|
||||||
<prop v="0" k="tweak_dash_pattern_on_corners"/>
|
|
||||||
<prop v="0" k="use_custom_dash"/>
|
|
||||||
<prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
|
|
||||||
<data_defined_properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="QString" value="" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option type="QString" value="collection" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</data_defined_properties>
|
|
||||||
</layer>
|
|
||||||
</symbol>
|
|
||||||
</axisSymbol>
|
|
||||||
</DiagramCategory>
|
|
||||||
</SingleCategoryDiagramRenderer>
|
|
||||||
<DiagramLayerSettings priority="0" zIndex="0" linePlacementFlags="18" placement="1" showAll="1" dist="0" obstacle="0">
|
|
||||||
<properties>
|
|
||||||
<Option type="Map">
|
|
||||||
<Option type="QString" value="" name="name"/>
|
|
||||||
<Option name="properties"/>
|
|
||||||
<Option type="QString" value="collection" name="type"/>
|
|
||||||
</Option>
|
|
||||||
</properties>
|
|
||||||
</DiagramLayerSettings>
|
|
||||||
<geometryOptions geometryPrecision="0" removeDuplicateNodes="0">
|
|
||||||
<activeChecks/>
|
|
||||||
<checkConfiguration type="Map">
|
|
||||||
<Option type="Map" name="QgsGeometryGapCheck">
|
|
||||||
<Option type="double" value="0" name="allowedGapsBuffer"/>
|
|
||||||
<Option type="bool" value="false" name="allowedGapsEnabled"/>
|
|
||||||
<Option type="QString" value="" name="allowedGapsLayer"/>
|
|
||||||
</Option>
|
|
||||||
</checkConfiguration>
|
|
||||||
</geometryOptions>
|
|
||||||
<legend showLabelLegend="0" type="default-vector"/>
|
|
||||||
<referencedLayers/>
|
|
||||||
<fieldConfiguration>
|
|
||||||
<field configurationFlags="None" name="id_polygone_carhab">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="code_hab_carhab">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="nom_complet_hab">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="nom_simplifie_hab">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="code_biotope">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="littoralite">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="etage_de_vegetation">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="ombroclimat">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="continentalite">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="variante_bioclimatique">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="acidite_edaphique">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="humidite_edaphique">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="enneigement">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="code_physio">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="nom_physio">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="physio_source">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="occupation">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="milieu">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="surface">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="cd_hab">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="id_sinp_evenement">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="id_sinp_habitat">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
<field configurationFlags="None" name="fid">
|
|
||||||
<editWidget type="TextEdit">
|
|
||||||
<config>
|
|
||||||
<Option/>
|
|
||||||
</config>
|
|
||||||
</editWidget>
|
|
||||||
</field>
|
|
||||||
</fieldConfiguration>
|
|
||||||
<aliases>
|
|
||||||
<alias index="0" field="id_polygone_carhab" name=""/>
|
|
||||||
<alias index="1" field="code_hab_carhab" name=""/>
|
|
||||||
<alias index="2" field="nom_complet_hab" name=""/>
|
|
||||||
<alias index="3" field="nom_simplifie_hab" name=""/>
|
|
||||||
<alias index="4" field="code_biotope" name=""/>
|
|
||||||
<alias index="5" field="littoralite" name=""/>
|
|
||||||
<alias index="6" field="etage_de_vegetation" name=""/>
|
|
||||||
<alias index="7" field="ombroclimat" name=""/>
|
|
||||||
<alias index="8" field="continentalite" name=""/>
|
|
||||||
<alias index="9" field="variante_bioclimatique" name=""/>
|
|
||||||
<alias index="10" field="acidite_edaphique" name=""/>
|
|
||||||
<alias index="11" field="humidite_edaphique" name=""/>
|
|
||||||
<alias index="12" field="enneigement" name=""/>
|
|
||||||
<alias index="13" field="code_physio" name=""/>
|
|
||||||
<alias index="14" field="nom_physio" name=""/>
|
|
||||||
<alias index="15" field="physio_source" name=""/>
|
|
||||||
<alias index="16" field="occupation" name=""/>
|
|
||||||
<alias index="17" field="milieu" name=""/>
|
|
||||||
<alias index="18" field="surface" name=""/>
|
|
||||||
<alias index="19" field="cd_hab" name=""/>
|
|
||||||
<alias index="20" field="id_sinp_evenement" name=""/>
|
|
||||||
<alias index="21" field="id_sinp_habitat" name=""/>
|
|
||||||
<alias index="22" field="fid" name=""/>
|
|
||||||
</aliases>
|
|
||||||
<defaults>
|
|
||||||
<default expression="" field="id_polygone_carhab" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="code_hab_carhab" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="nom_complet_hab" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="nom_simplifie_hab" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="code_biotope" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="littoralite" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="etage_de_vegetation" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="ombroclimat" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="continentalite" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="variante_bioclimatique" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="acidite_edaphique" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="humidite_edaphique" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="enneigement" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="code_physio" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="nom_physio" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="physio_source" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="occupation" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="milieu" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="surface" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="cd_hab" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="id_sinp_evenement" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="id_sinp_habitat" applyOnUpdate="0"/>
|
|
||||||
<default expression="" field="fid" applyOnUpdate="0"/>
|
|
||||||
</defaults>
|
|
||||||
<constraints>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="id_polygone_carhab" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="code_hab_carhab" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="nom_complet_hab" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="nom_simplifie_hab" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="code_biotope" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="littoralite" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="etage_de_vegetation" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="ombroclimat" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="continentalite" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="variante_bioclimatique" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="acidite_edaphique" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="humidite_edaphique" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="enneigement" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="code_physio" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="nom_physio" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="physio_source" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="occupation" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="milieu" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="surface" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="cd_hab" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="id_sinp_evenement" exp_strength="0"/>
|
|
||||||
<constraint constraints="0" notnull_strength="0" unique_strength="0" field="id_sinp_habitat" exp_strength="0"/>
|
|
||||||
<constraint constraints="3" notnull_strength="1" unique_strength="1" field="fid" exp_strength="0"/>
|
|
||||||
</constraints>
|
|
||||||
<constraintExpressions>
|
|
||||||
<constraint field="id_polygone_carhab" desc="" exp=""/>
|
|
||||||
<constraint field="code_hab_carhab" desc="" exp=""/>
|
|
||||||
<constraint field="nom_complet_hab" desc="" exp=""/>
|
|
||||||
<constraint field="nom_simplifie_hab" desc="" exp=""/>
|
|
||||||
<constraint field="code_biotope" desc="" exp=""/>
|
|
||||||
<constraint field="littoralite" desc="" exp=""/>
|
|
||||||
<constraint field="etage_de_vegetation" desc="" exp=""/>
|
|
||||||
<constraint field="ombroclimat" desc="" exp=""/>
|
|
||||||
<constraint field="continentalite" desc="" exp=""/>
|
|
||||||
<constraint field="variante_bioclimatique" desc="" exp=""/>
|
|
||||||
<constraint field="acidite_edaphique" desc="" exp=""/>
|
|
||||||
<constraint field="humidite_edaphique" desc="" exp=""/>
|
|
||||||
<constraint field="enneigement" desc="" exp=""/>
|
|
||||||
<constraint field="code_physio" desc="" exp=""/>
|
|
||||||
<constraint field="nom_physio" desc="" exp=""/>
|
|
||||||
<constraint field="physio_source" desc="" exp=""/>
|
|
||||||
<constraint field="occupation" desc="" exp=""/>
|
|
||||||
<constraint field="milieu" desc="" exp=""/>
|
|
||||||
<constraint field="surface" desc="" exp=""/>
|
|
||||||
<constraint field="cd_hab" desc="" exp=""/>
|
|
||||||
<constraint field="id_sinp_evenement" desc="" exp=""/>
|
|
||||||
<constraint field="id_sinp_habitat" desc="" exp=""/>
|
|
||||||
<constraint field="fid" desc="" exp=""/>
|
|
||||||
</constraintExpressions>
|
|
||||||
<expressionfields/>
|
|
||||||
<attributeactions>
|
|
||||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
|
||||||
</attributeactions>
|
|
||||||
<attributetableconfig sortExpression="" actionWidgetStyle="dropDown" sortOrder="0">
|
|
||||||
<columns>
|
|
||||||
<column hidden="0" width="-1" type="field" name="id_polygone_carhab"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="code_hab_carhab"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="nom_complet_hab"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="nom_simplifie_hab"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="code_biotope"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="littoralite"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="etage_de_vegetation"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="ombroclimat"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="continentalite"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="variante_bioclimatique"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="acidite_edaphique"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="humidite_edaphique"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="enneigement"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="code_physio"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="nom_physio"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="physio_source"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="occupation"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="milieu"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="surface"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="cd_hab"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="id_sinp_evenement"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="id_sinp_habitat"/>
|
|
||||||
<column hidden="0" width="-1" type="field" name="fid"/>
|
|
||||||
<column hidden="1" width="-1" type="actions"/>
|
|
||||||
</columns>
|
|
||||||
</attributetableconfig>
|
|
||||||
<conditionalstyles>
|
|
||||||
<rowstyles/>
|
|
||||||
<fieldstyles/>
|
|
||||||
</conditionalstyles>
|
|
||||||
<storedexpressions/>
|
|
||||||
<editform tolerant="1"></editform>
|
|
||||||
<editforminit/>
|
|
||||||
<editforminitcodesource>0</editforminitcodesource>
|
|
||||||
<editforminitfilepath></editforminitfilepath>
|
|
||||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
Les formulaires QGIS peuvent avoir une fonction Python qui est appelée lorsque le formulaire est
|
|
||||||
ouvert.
|
|
||||||
|
|
||||||
Utilisez cette fonction pour ajouter une logique supplémentaire à vos formulaires.
|
|
||||||
|
|
||||||
Entrez le nom de la fonction dans le champ
|
|
||||||
"Fonction d'initialisation Python".
|
|
||||||
Voici un exemple:
|
|
||||||
"""
|
|
||||||
from qgis.PyQt.QtWidgets import QWidget
|
|
||||||
|
|
||||||
def my_form_open(dialog, layer, feature):
|
|
||||||
geom = feature.geometry()
|
|
||||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
|
||||||
]]></editforminitcode>
|
|
||||||
<featformsuppress>0</featformsuppress>
|
|
||||||
<editorlayout>generatedlayout</editorlayout>
|
|
||||||
<editable>
|
|
||||||
<field editable="1" name="acidite_edaphique"/>
|
|
||||||
<field editable="1" name="cd_hab"/>
|
|
||||||
<field editable="1" name="code_biotope"/>
|
|
||||||
<field editable="1" name="code_hab_carhab"/>
|
|
||||||
<field editable="1" name="code_physio"/>
|
|
||||||
<field editable="1" name="continentalite"/>
|
|
||||||
<field editable="1" name="enneigement"/>
|
|
||||||
<field editable="1" name="etage_de_vegetation"/>
|
|
||||||
<field editable="1" name="fid"/>
|
|
||||||
<field editable="1" name="humidite_edaphique"/>
|
|
||||||
<field editable="1" name="id_polygone_carhab"/>
|
|
||||||
<field editable="1" name="id_sinp_evenement"/>
|
|
||||||
<field editable="1" name="id_sinp_habitat"/>
|
|
||||||
<field editable="1" name="littoralite"/>
|
|
||||||
<field editable="1" name="milieu"/>
|
|
||||||
<field editable="1" name="nom_complet_hab"/>
|
|
||||||
<field editable="1" name="nom_physio"/>
|
|
||||||
<field editable="1" name="nom_simplifie_hab"/>
|
|
||||||
<field editable="1" name="occupation"/>
|
|
||||||
<field editable="1" name="ombroclimat"/>
|
|
||||||
<field editable="1" name="physio_source"/>
|
|
||||||
<field editable="1" name="surface"/>
|
|
||||||
<field editable="1" name="variante_bioclimatique"/>
|
|
||||||
</editable>
|
|
||||||
<labelOnTop>
|
|
||||||
<field labelOnTop="0" name="acidite_edaphique"/>
|
|
||||||
<field labelOnTop="0" name="cd_hab"/>
|
|
||||||
<field labelOnTop="0" name="code_biotope"/>
|
|
||||||
<field labelOnTop="0" name="code_hab_carhab"/>
|
|
||||||
<field labelOnTop="0" name="code_physio"/>
|
|
||||||
<field labelOnTop="0" name="continentalite"/>
|
|
||||||
<field labelOnTop="0" name="enneigement"/>
|
|
||||||
<field labelOnTop="0" name="etage_de_vegetation"/>
|
|
||||||
<field labelOnTop="0" name="fid"/>
|
|
||||||
<field labelOnTop="0" name="humidite_edaphique"/>
|
|
||||||
<field labelOnTop="0" name="id_polygone_carhab"/>
|
|
||||||
<field labelOnTop="0" name="id_sinp_evenement"/>
|
|
||||||
<field labelOnTop="0" name="id_sinp_habitat"/>
|
|
||||||
<field labelOnTop="0" name="littoralite"/>
|
|
||||||
<field labelOnTop="0" name="milieu"/>
|
|
||||||
<field labelOnTop="0" name="nom_complet_hab"/>
|
|
||||||
<field labelOnTop="0" name="nom_physio"/>
|
|
||||||
<field labelOnTop="0" name="nom_simplifie_hab"/>
|
|
||||||
<field labelOnTop="0" name="occupation"/>
|
|
||||||
<field labelOnTop="0" name="ombroclimat"/>
|
|
||||||
<field labelOnTop="0" name="physio_source"/>
|
|
||||||
<field labelOnTop="0" name="surface"/>
|
|
||||||
<field labelOnTop="0" name="variante_bioclimatique"/>
|
|
||||||
</labelOnTop>
|
|
||||||
<reuseLastValue>
|
|
||||||
<field reuseLastValue="0" name="acidite_edaphique"/>
|
|
||||||
<field reuseLastValue="0" name="cd_hab"/>
|
|
||||||
<field reuseLastValue="0" name="code_biotope"/>
|
|
||||||
<field reuseLastValue="0" name="code_hab_carhab"/>
|
|
||||||
<field reuseLastValue="0" name="code_physio"/>
|
|
||||||
<field reuseLastValue="0" name="continentalite"/>
|
|
||||||
<field reuseLastValue="0" name="enneigement"/>
|
|
||||||
<field reuseLastValue="0" name="etage_de_vegetation"/>
|
|
||||||
<field reuseLastValue="0" name="fid"/>
|
|
||||||
<field reuseLastValue="0" name="humidite_edaphique"/>
|
|
||||||
<field reuseLastValue="0" name="id_polygone_carhab"/>
|
|
||||||
<field reuseLastValue="0" name="id_sinp_evenement"/>
|
|
||||||
<field reuseLastValue="0" name="id_sinp_habitat"/>
|
|
||||||
<field reuseLastValue="0" name="littoralite"/>
|
|
||||||
<field reuseLastValue="0" name="milieu"/>
|
|
||||||
<field reuseLastValue="0" name="nom_complet_hab"/>
|
|
||||||
<field reuseLastValue="0" name="nom_physio"/>
|
|
||||||
<field reuseLastValue="0" name="nom_simplifie_hab"/>
|
|
||||||
<field reuseLastValue="0" name="occupation"/>
|
|
||||||
<field reuseLastValue="0" name="ombroclimat"/>
|
|
||||||
<field reuseLastValue="0" name="physio_source"/>
|
|
||||||
<field reuseLastValue="0" name="surface"/>
|
|
||||||
<field reuseLastValue="0" name="variante_bioclimatique"/>
|
|
||||||
</reuseLastValue>
|
|
||||||
<dataDefinedFieldProperties/>
|
|
||||||
<widgets/>
|
|
||||||
<previewExpression>"nom_complet_hab"</previewExpression>
|
|
||||||
<mapTip></mapTip>
|
|
||||||
<layerGeometryType>2</layerGeometryType>
|
|
||||||
</qgis>
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
from qgis.core import QgsApplication
|
from qgis.core import QgsApplication
|
||||||
|
|
||||||
|
|
||||||
def gitea():
|
def gitea():
|
||||||
file_url = QgsApplication.qgisSettingsDirPath()+'QGIS/QGIS3.ini'
|
file_url = QgsApplication.qgisSettingsDirPath() + 'QGIS/QGIS3.ini'
|
||||||
recherche_1 = 'plugin_repositories\\github\\url=https://github.com/CEN-Rhone-Alpes/Plugin_QGIS/releases/latest/download/plugins.xml'
|
recherche_1 = 'plugin_repositories\\github\\url=https://github.com/CEN-Rhone-Alpes/Plugin_QGIS/releases/latest/download/plugins.xml'
|
||||||
replace_1 = 'plugin_repositories\\gitea\\url=https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/plugins.xml'
|
replace_1 = 'plugin_repositories\\gitea\\url=https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/plugins.xml'
|
||||||
|
|
||||||
|
|||||||
@@ -1,185 +0,0 @@
|
|||||||
import sys
|
|
||||||
import socket
|
|
||||||
import os
|
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
|
||||||
print(IPAddr)
|
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
|
||||||
host = "100.100.100.11"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig4269"
|
|
||||||
sigdb="sig4269"
|
|
||||||
refdb="ref_geo4269"
|
|
||||||
password = "McVities"
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
host = "192.168.0.201"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig01"
|
|
||||||
sigdb="sig01"
|
|
||||||
refdb="ref_geo01"
|
|
||||||
password = "McVities"
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
host = "192.168.1.201"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig0726"
|
|
||||||
sigdb="sig0726"
|
|
||||||
refdb="ref_geo0726"
|
|
||||||
password = "McVities"
|
|
||||||
if sys.platform == 'linux':
|
|
||||||
os_user = os.environ['USER']
|
|
||||||
else:
|
|
||||||
os_user = os.environ['USERNAME']
|
|
||||||
if os_user == 'STAGE':
|
|
||||||
os_user='stage'
|
|
||||||
if os_user == 'Administrateur':
|
|
||||||
os_user = 'stage'
|
|
||||||
|
|
||||||
schemaname_distinct="""SELECT DISTINCT schemaname from pg_catalog.pg_tables
|
|
||||||
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
|
|
||||||
order by schemaname;"""
|
|
||||||
schemaname_list_ref="""SELECT schemaname,tablename from pg_catalog.pg_tables
|
|
||||||
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
|
|
||||||
order by schemaname,tablename;"""
|
|
||||||
schemaname_list="""(SELECT schemaname,tablename from pg_catalog.pg_tables
|
|
||||||
where schemaname like 'trav%' or schemaname like '\_ag%' or schemaname like '\_00%' or schemaname like '\_01%' or schemaname like '\_07%' or schemaname like '\_26%' or schemaname like '\_form%' or schemaname like '\_42%' or schemaname like '\_69%' order by schemaname,tablename)
|
|
||||||
UNION
|
|
||||||
(SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews order by schemaname,tablename) order by schemaname,tablename;"""
|
|
||||||
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))"""
|
|
||||||
champ_travaux_prevus_multilinestring="""(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, longueur_m double precision, longueur_km double precision, date_creation date, date_maj date, geom geometry(MultiLineString,2154))"""
|
|
||||||
champ_travaux_prevus_point = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, x_wgs84 double precision, y_wgs84 double precision, date_creation date, date_maj date, geom geometry(Point,2154))"""
|
|
||||||
|
|
||||||
champ_viergePolygone = """(gid serial NOT NULL, commentaire text, surface_m2 double precision, surface_ha double precision, geom geometry(MultiPolygon,2154))"""
|
|
||||||
champ_viergeLigne = """(gid serial NOT NULL, commentaire text, longueur_m double precision, longueur_km double precision, geom geometry(MultiLineString,2154))"""
|
|
||||||
champ_viergePoint = """(gid serial NOT NULL, commentaire text, x_wgs84 double precision, y_wgs84 double precision, geom geometry(Point,2154))"""
|
|
||||||
|
|
||||||
champ_habitat = """(gid serial NOT NULL, cd_cb_01 text, lb_cb97_fr_01 text, occupation_01 integer, cd_cb_02 text, lb_cb97_fr_02 text, occupation_02 integer, cd_cb_03 text, lb_cb97_fr_03 text, occupation_03 integer, milieu_code text, milieu_libelle text, surface_m2 double precision, surface_ha double precision, commentaire text, date_creation date, date_maj date, geom geometry(MultiPolygon,2154))"""
|
|
||||||
|
|
||||||
champ_contour="""(gid serial NOT NULL, date_creation date, date_maj date, utilisateur character varying, dept character(2), nom character varying, surface_m2 double precision, surface_ha double precision, type_site character varying, type_milieu character varying, date_premier_pg integer, date_debut_pg integer, date_fin_pg integer, referent character varying, gestion_deleguee character varying, terrain_militaire character(3), ens character(3), zh character(3), adapt_pmr character(3), inform character(3), guide character(3), ouverture_public character(3), obs character(3), anim character(3), n2000_anim character(3), contrat_n2000_conseil character(3), n2000_op character(3), contrat_n2000_benef character(3), contrat_agri character(3), bc_habitat integer, bc_amphibien integer, bc_coleoptere integer, bc_crustace integer, bc_mammifere integer, bc_chiroptere integer, bc_mollusque integer, bc_odonate integer, bc_oiseau integer, bc_orthoptere integer, bc_poisson integer, bc_reptile integer, bc_rhopalocere integer, bc_heterocere integer, bc_autre_invertebre integer, bc_flore integer, bc_bryophyte integer, bc_champignon integer, suiv_analyse_sol character(3), suiv_piezo character(3), suiv_climat character(3), suiv_topo character(3), suiv_habitat character(3), suiv_amphibien character(3), suiv_coleoptere character(3), suiv_crustace character(3), suiv_mammifere character(3), suiv_chiroptere character(3), suiv_mollusque character(3), suiv_odonate character(3), suiv_oiseau character(3), suiv_orthoptere character(3), suiv_poisson character(3), suiv_reptile character(3), suiv_rhopalocere character(3), suiv_heterocere character(3), suiv_autre_invertebre character(3), suiv_flore character(3), suiv_bryophyte character(3), suiv_champignon character(3), suiv_analyse_eau character(3), suiv_phenologie character(3), suiv_frequentation character(3), suiv_paysager character(3), suiv_autre character(3), commentaire text, geom geometry(MultiPolygon,2154))
|
|
||||||
"""
|
|
||||||
|
|
||||||
champ_vegethab_point = """(
|
|
||||||
gid serial NOT NULL ,
|
|
||||||
cd_eu_01 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_01 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_1 bigint,
|
|
||||||
cd_eu_02 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_02 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_2 bigint,
|
|
||||||
cd_eu_03 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_03 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_3 bigint,
|
|
||||||
milieu_cod character varying(254) COLLATE pg_catalog."default",
|
|
||||||
milieu_lib character varying(254) COLLATE pg_catalog."default",
|
|
||||||
surface_m2 numeric,
|
|
||||||
surface_ha numeric,
|
|
||||||
commentair character varying(254) COLLATE pg_catalog."default",
|
|
||||||
date_creat date,
|
|
||||||
date_maj date,
|
|
||||||
num_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
type_unite character varying(254) COLLATE pg_catalog."default",
|
|
||||||
dynamique character varying(254) COLLATE pg_catalog."default",
|
|
||||||
gestio_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
degrad_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
eta_conser character varying(254) COLLATE pg_catalog."default",
|
|
||||||
clas_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
alli_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
syntaxon character varying(254) COLLATE pg_catalog."default",
|
|
||||||
n2000 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_aura character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_cbna character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_cbnmc character varying(254) COLLATE pg_catalog."default",
|
|
||||||
vege_enjeu character varying(254) COLLATE pg_catalog."default",
|
|
||||||
num_photo character varying(254) COLLATE pg_catalog."default",
|
|
||||||
nature_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
date_sais date,
|
|
||||||
s_al_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
alli_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
salli_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
class_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
geom geometry(Point,2154)
|
|
||||||
)
|
|
||||||
"""
|
|
||||||
champ_vegethab_multilinestring = """(
|
|
||||||
gid serial NOT NULL ,
|
|
||||||
cd_eu_01 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_01 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_1 bigint,
|
|
||||||
cd_eu_02 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_02 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_2 bigint,
|
|
||||||
cd_eu_03 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_03 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_3 bigint,
|
|
||||||
milieu_cod character varying(254) COLLATE pg_catalog."default",
|
|
||||||
milieu_lib character varying(254) COLLATE pg_catalog."default",
|
|
||||||
surface_m2 numeric,
|
|
||||||
surface_ha numeric,
|
|
||||||
commentair character varying(254) COLLATE pg_catalog."default",
|
|
||||||
date_creat date,
|
|
||||||
date_maj date,
|
|
||||||
num_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
type_unite character varying(254) COLLATE pg_catalog."default",
|
|
||||||
dynamique character varying(254) COLLATE pg_catalog."default",
|
|
||||||
gestio_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
degrad_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
eta_conser character varying(254) COLLATE pg_catalog."default",
|
|
||||||
clas_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
alli_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
syntaxon character varying(254) COLLATE pg_catalog."default",
|
|
||||||
n2000 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_aura character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_cbna character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_cbnmc character varying(254) COLLATE pg_catalog."default",
|
|
||||||
vege_enjeu character varying(254) COLLATE pg_catalog."default",
|
|
||||||
num_photo character varying(254) COLLATE pg_catalog."default",
|
|
||||||
nature_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
date_sais date,
|
|
||||||
s_al_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
alli_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
salli_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
class_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
geom geometry(MultiLineString,2154)
|
|
||||||
)
|
|
||||||
"""
|
|
||||||
champ_vegethab_multipolygon = """(
|
|
||||||
gid serial NOT NULL ,
|
|
||||||
cd_eu_01 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_01 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_1 bigint,
|
|
||||||
cd_eu_02 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_02 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_2 bigint,
|
|
||||||
cd_eu_03 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lb_eu_03 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
occupati_3 bigint,
|
|
||||||
milieu_cod character varying(254) COLLATE pg_catalog."default",
|
|
||||||
milieu_lib character varying(254) COLLATE pg_catalog."default",
|
|
||||||
surface_m2 numeric,
|
|
||||||
surface_ha numeric,
|
|
||||||
commentair character varying(254) COLLATE pg_catalog."default",
|
|
||||||
date_creat date,
|
|
||||||
date_maj date,
|
|
||||||
num_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
type_unite character varying(254) COLLATE pg_catalog."default",
|
|
||||||
dynamique character varying(254) COLLATE pg_catalog."default",
|
|
||||||
gestio_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
degrad_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
eta_conser character varying(254) COLLATE pg_catalog."default",
|
|
||||||
clas_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
alli_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
syntaxon character varying(254) COLLATE pg_catalog."default",
|
|
||||||
n2000 character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_aura character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_cbna character varying(254) COLLATE pg_catalog."default",
|
|
||||||
lrr_cbnmc character varying(254) COLLATE pg_catalog."default",
|
|
||||||
vege_enjeu character varying(254) COLLATE pg_catalog."default",
|
|
||||||
num_photo character varying(254) COLLATE pg_catalog."default",
|
|
||||||
nature_obs character varying(254) COLLATE pg_catalog."default",
|
|
||||||
date_sais date,
|
|
||||||
s_al_phyto character varying(254) COLLATE pg_catalog."default",
|
|
||||||
alli_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
salli_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
class_name character varying(254) COLLATE pg_catalog."default",
|
|
||||||
geom geometry(MultiPolygon,2154)
|
|
||||||
)
|
|
||||||
"""
|
|
||||||
@@ -1,38 +1,17 @@
|
|||||||
import sys
|
|
||||||
import socket
|
|
||||||
import os
|
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
|
||||||
host = "100.100.100.11"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig4269"
|
|
||||||
sigdb="sig4269"
|
|
||||||
refdb="ref_geo4269"
|
|
||||||
password = "McVities"
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
host = "192.168.0.201"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig01"
|
|
||||||
sigdb="sig01"
|
|
||||||
refdb="ref_geo01"
|
|
||||||
password = "McVities"
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
host = "192.168.1.201"
|
|
||||||
port = "5432"
|
|
||||||
dbname = "sig0726"
|
|
||||||
sigdb="sig0726"
|
|
||||||
refdb="ref_geo0726"
|
|
||||||
password = "McVities"
|
|
||||||
if sys.platform == 'linux':
|
|
||||||
os_user = os.environ['USER']
|
|
||||||
else:
|
|
||||||
os_user = os.environ['USERNAME']
|
|
||||||
if os_user == 'STAGE':
|
|
||||||
os_user='stage'
|
|
||||||
|
|
||||||
|
schemaname_distinct = """SELECT DISTINCT schemaname from pg_catalog.pg_tables
|
||||||
|
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
|
||||||
|
order by schemaname;"""
|
||||||
|
schemaname_list_ref = """SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||||
|
WHERE schemaname NOT LIKE '_archives' AND schemaname NOT LIKE 'topology' AND schemaname NOT LIKE 'information_schema' AND schemaname NOT LIKE 'pg_catalog' and schemaname NOT LIKE 'public' AND schemaname NOT LIKE '_trier'
|
||||||
|
order by schemaname,tablename;"""
|
||||||
|
schemaname_list = """(SELECT schemaname,tablename from pg_catalog.pg_tables
|
||||||
|
where schemaname like 'trav%' or schemaname like '\\_ag%' or schemaname like '\\_00%' or schemaname like '\\_01%' or schemaname like '\\_07%' or schemaname like '\\_26%' or schemaname like '\\_form%' or schemaname like '\\_42%' or schemaname like '\\_69%' order by schemaname,tablename)
|
||||||
|
UNION
|
||||||
|
(SELECT schemaname,matviewname AS tablename FROM pg_catalog.pg_matviews order by schemaname,tablename) order by schemaname,tablename;"""
|
||||||
geom = "geom"
|
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))"""
|
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))"""
|
||||||
champ_travaux_prevus_multilinestring="""(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, longueur_m double precision, longueur_km double precision, date_creation date, date_maj date, geom geometry(MultiLineString,2154))"""
|
champ_travaux_prevus_multilinestring = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, longueur_m double precision, longueur_km double precision, date_creation date, date_maj date, geom geometry(MultiLineString,2154))"""
|
||||||
champ_travaux_prevus_point = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, x_wgs84 double precision, y_wgs84 double precision, date_creation date, date_maj date, geom geometry(Point,2154))"""
|
champ_travaux_prevus_point = """(gid serial NOT NULL, groupe_gestion text, gestion_lib text, id_gestion text, datedebut date, datefin date, commentaire text, x_wgs84 double precision, y_wgs84 double precision, date_creation date, date_maj date, geom geometry(Point,2154))"""
|
||||||
|
|
||||||
champ_viergePolygone = """(gid serial NOT NULL, commentaire text, surface_m2 double precision, surface_ha double precision, geom geometry(MultiPolygon,2154))"""
|
champ_viergePolygone = """(gid serial NOT NULL, commentaire text, surface_m2 double precision, surface_ha double precision, geom geometry(MultiPolygon,2154))"""
|
||||||
@@ -41,7 +20,7 @@ champ_viergePoint = """(gid serial NOT NULL, commentaire text, x_wgs84 double pr
|
|||||||
|
|
||||||
champ_habitat = """(gid serial NOT NULL, cd_cb_01 text, lb_cb97_fr_01 text, occupation_01 integer, cd_cb_02 text, lb_cb97_fr_02 text, occupation_02 integer, cd_cb_03 text, lb_cb97_fr_03 text, occupation_03 integer, milieu_code text, milieu_libelle text, surface_m2 double precision, surface_ha double precision, commentaire text, date_creation date, date_maj date, geom geometry(MultiPolygon,2154))"""
|
champ_habitat = """(gid serial NOT NULL, cd_cb_01 text, lb_cb97_fr_01 text, occupation_01 integer, cd_cb_02 text, lb_cb97_fr_02 text, occupation_02 integer, cd_cb_03 text, lb_cb97_fr_03 text, occupation_03 integer, milieu_code text, milieu_libelle text, surface_m2 double precision, surface_ha double precision, commentaire text, date_creation date, date_maj date, geom geometry(MultiPolygon,2154))"""
|
||||||
|
|
||||||
champ_contour="""(gid serial NOT NULL, date_creation date, date_maj date, utilisateur character varying, dept character(2), nom character varying, surface_m2 double precision, surface_ha double precision, type_site character varying, type_milieu character varying, date_premier_pg integer, date_debut_pg integer, date_fin_pg integer, referent character varying, gestion_deleguee character varying, terrain_militaire character(3), ens character(3), zh character(3), adapt_pmr character(3), inform character(3), guide character(3), ouverture_public character(3), obs character(3), anim character(3), n2000_anim character(3), contrat_n2000_conseil character(3), n2000_op character(3), contrat_n2000_benef character(3), contrat_agri character(3), bc_habitat integer, bc_amphibien integer, bc_coleoptere integer, bc_crustace integer, bc_mammifere integer, bc_chiroptere integer, bc_mollusque integer, bc_odonate integer, bc_oiseau integer, bc_orthoptere integer, bc_poisson integer, bc_reptile integer, bc_rhopalocere integer, bc_heterocere integer, bc_autre_invertebre integer, bc_flore integer, bc_bryophyte integer, bc_champignon integer, suiv_analyse_sol character(3), suiv_piezo character(3), suiv_climat character(3), suiv_topo character(3), suiv_habitat character(3), suiv_amphibien character(3), suiv_coleoptere character(3), suiv_crustace character(3), suiv_mammifere character(3), suiv_chiroptere character(3), suiv_mollusque character(3), suiv_odonate character(3), suiv_oiseau character(3), suiv_orthoptere character(3), suiv_poisson character(3), suiv_reptile character(3), suiv_rhopalocere character(3), suiv_heterocere character(3), suiv_autre_invertebre character(3), suiv_flore character(3), suiv_bryophyte character(3), suiv_champignon character(3), suiv_analyse_eau character(3), suiv_phenologie character(3), suiv_frequentation character(3), suiv_paysager character(3), suiv_autre character(3), commentaire text, geom geometry(MultiPolygon,2154))
|
champ_contour = """(gid serial NOT NULL, date_creation date, date_maj date, utilisateur character varying, dept character(2), nom character varying, surface_m2 double precision, surface_ha double precision, type_site character varying, type_milieu character varying, date_premier_pg integer, date_debut_pg integer, date_fin_pg integer, referent character varying, gestion_deleguee character varying, terrain_militaire character(3), ens character(3), zh character(3), adapt_pmr character(3), inform character(3), guide character(3), ouverture_public character(3), obs character(3), anim character(3), n2000_anim character(3), contrat_n2000_conseil character(3), n2000_op character(3), contrat_n2000_benef character(3), contrat_agri character(3), bc_habitat integer, bc_amphibien integer, bc_coleoptere integer, bc_crustace integer, bc_mammifere integer, bc_chiroptere integer, bc_mollusque integer, bc_odonate integer, bc_oiseau integer, bc_orthoptere integer, bc_poisson integer, bc_reptile integer, bc_rhopalocere integer, bc_heterocere integer, bc_autre_invertebre integer, bc_flore integer, bc_bryophyte integer, bc_champignon integer, suiv_analyse_sol character(3), suiv_piezo character(3), suiv_climat character(3), suiv_topo character(3), suiv_habitat character(3), suiv_amphibien character(3), suiv_coleoptere character(3), suiv_crustace character(3), suiv_mammifere character(3), suiv_chiroptere character(3), suiv_mollusque character(3), suiv_odonate character(3), suiv_oiseau character(3), suiv_orthoptere character(3), suiv_poisson character(3), suiv_reptile character(3), suiv_rhopalocere character(3), suiv_heterocere character(3), suiv_autre_invertebre character(3), suiv_flore character(3), suiv_bryophyte character(3), suiv_champignon character(3), suiv_analyse_eau character(3), suiv_phenologie character(3), suiv_frequentation character(3), suiv_paysager character(3), suiv_autre character(3), commentaire text, geom geometry(MultiPolygon,2154))
|
||||||
"""
|
"""
|
||||||
|
|
||||||
champ_vegethab_point = """(
|
champ_vegethab_point = """(
|
||||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="128px" height="128px" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
|
||||||
|
<polygon fill="#EE7913" points="68.613,69.625 86.891,69.625 71.697,54.625 52.613,54.625 52.613,72.746 68.613,88.548 "/>
|
||||||
|
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="402.5244" y1="-220.8706" x2="400.6479" y2="-97.5023" gradientTransform="matrix(1 0 0 -1 -300.5195 -92.5547)">
|
||||||
|
<stop offset="0" style="stop-color:#589632"/>
|
||||||
|
<stop offset="1" style="stop-color:#93B023"/>
|
||||||
|
</linearGradient>
|
||||||
|
<polygon fill="url(#SVGID_1_)" points="126.613,109.057 94.488,77.625 76.613,77.625 76.613,96.033 107.143,126.625
|
||||||
|
126.613,126.625 "/>
|
||||||
|
<polygon fill="#F0E64A" points="76.613,77.625 94.488,77.625 86.891,69.625 68.613,69.625 68.613,88.548 76.613,96.033 "/>
|
||||||
|
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="365.4619" y1="-221.1455" x2="363.5923" y2="-98.227" gradientTransform="matrix(1 0 0 -1 -300.5195 -92.5547)">
|
||||||
|
<stop offset="0" style="stop-color:#589632"/>
|
||||||
|
<stop offset="1" style="stop-color:#93B023"/>
|
||||||
|
</linearGradient>
|
||||||
|
<path fill="url(#SVGID_2_)" d="M68.923,101.552c-1.165,0.242-1.769,0.157-4.685,0.157c-20.866,0-38.612-17.158-38.612-39.406
|
||||||
|
c0-22.248,17.551-39.027,38.612-39.027s37.833,16.78,37.833,39.027c0,3.619-0.451,7.099-1.284,10.398L120.1,92.012
|
||||||
|
c4.979-8.726,7.765-18.869,7.765-29.857c0-34.289-27.363-59.963-64.016-59.963C27.363,2.191,0,27.696,0,62.154
|
||||||
|
c0,34.625,27.363,60.638,63.848,60.638c9.417,0,16.069-1.469,23.042-3.761L68.923,101.552z"/>
|
||||||
|
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="53.083,54.625 71.697,54.625 126.613,109.057
|
||||||
|
126.613,126.625 "/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,230 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
id="svg5692"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.3.1 r9886"
|
||||||
|
sodipodi:docname="mActionAddRasterLayer.svg"
|
||||||
|
inkscape:export-filename="/home/denis/Desktop/oracle.png"
|
||||||
|
inkscape:export-xdpi="67.5"
|
||||||
|
inkscape:export-ydpi="67.5">
|
||||||
|
<title
|
||||||
|
id="title2829">GIS icon theme 0.2</title>
|
||||||
|
<defs
|
||||||
|
id="defs5694">
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 16 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="32 : 16 : 1"
|
||||||
|
inkscape:persp3d-origin="16 : 10.666667 : 1"
|
||||||
|
id="perspective3486" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective3496"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective3600"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective7871"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective8710"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective9811"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective4762"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="22.539029"
|
||||||
|
inkscape:cx="0.66325675"
|
||||||
|
inkscape:cy="15.235866"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
borderlayer="false"
|
||||||
|
inkscape:window-width="1855"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
inkscape:snap-object-midpoints="false"
|
||||||
|
inkscape:snap-grids="true"
|
||||||
|
inkscape:object-paths="false">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid5700"
|
||||||
|
empspacing="5"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="true"
|
||||||
|
dotted="true"
|
||||||
|
originx="2.5px"
|
||||||
|
originy="2.5px" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5697">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title>GIS icon theme 0.2</dc:title>
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Robert Szczepanek</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:rights>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Robert Szczepanek</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:rights>
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>GIS icons</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
<dc:coverage>GIS icons</dc:coverage>
|
||||||
|
<dc:description>http://robert.szczepanek.pl/</dc:description>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="Layer"
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(0,-8)">
|
||||||
|
<rect
|
||||||
|
style="fill:#6e97c4;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||||
|
id="rect6419"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="7.9999986"
|
||||||
|
y="7.9999995" />
|
||||||
|
<rect
|
||||||
|
style="fill:#2b3b4d;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
|
||||||
|
id="rect6419-6"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="16.000002"
|
||||||
|
y="7.9999995" />
|
||||||
|
<rect
|
||||||
|
style="fill:#2b3b4d;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
|
||||||
|
id="rect6419-6-9"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="7.9999986"
|
||||||
|
y="16"
|
||||||
|
inkscape:transform-center-x="-3.9999992"
|
||||||
|
inkscape:transform-center-y="-5.3333316" />
|
||||||
|
<rect
|
||||||
|
style="fill:#6d97c4;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
|
||||||
|
id="rect6419-0"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="16.000002"
|
||||||
|
y="16" />
|
||||||
|
<rect
|
||||||
|
style="fill:#2d3e4d;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
|
||||||
|
id="rect6419-6-7"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="-4.7683716e-07"
|
||||||
|
y="7.9999995" />
|
||||||
|
<rect
|
||||||
|
style="fill:#6d97c4;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
|
||||||
|
id="rect6419-3"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="-4.7683716e-07"
|
||||||
|
y="16" />
|
||||||
|
<rect
|
||||||
|
style="fill:#6d97c4;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
|
||||||
|
id="rect6419-5"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="7.9999986"
|
||||||
|
y="24.000002" />
|
||||||
|
<rect
|
||||||
|
style="fill:#2b3b4d;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
|
||||||
|
id="rect6419-6-6"
|
||||||
|
width="7.999999"
|
||||||
|
height="7.999999"
|
||||||
|
x="-4.7683716e-07"
|
||||||
|
y="24.000002" />
|
||||||
|
<rect
|
||||||
|
style="fill:none;stroke:none"
|
||||||
|
id="rect6554"
|
||||||
|
width="23.999998"
|
||||||
|
height="23.999998"
|
||||||
|
x="-4.7683716e-07"
|
||||||
|
y="7.9999995" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.2 KiB |
@@ -0,0 +1,312 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
id="svg5692"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.3.1 r9886"
|
||||||
|
sodipodi:docname="mActionAddWfsLayer.svg"
|
||||||
|
inkscape:export-filename="/media/home1/robert/svn/graphics/trunk/toolbar-icons/32x32/layer-vector.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<title
|
||||||
|
id="title2829">GIS icon theme 0.2</title>
|
||||||
|
<defs
|
||||||
|
id="defs5694">
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 16 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="32 : 16 : 1"
|
||||||
|
inkscape:persp3d-origin="16 : 10.666667 : 1"
|
||||||
|
id="perspective3486" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective3496"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective3600"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective7871"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective8710"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective9811"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective4762"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
id="perspective4762-4" />
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
id="perspective9811-2" />
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
id="perspective8710-0" />
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
id="perspective7871-7" />
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
id="perspective3600-9" />
|
||||||
|
<inkscape:perspective
|
||||||
|
sodipodi:type="inkscape:persp3d"
|
||||||
|
inkscape:vp_x="0 : 0.5 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_z="1 : 0.5 : 1"
|
||||||
|
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||||
|
id="perspective3496-4" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective3486-0"
|
||||||
|
inkscape:persp3d-origin="16 : 10.666667 : 1"
|
||||||
|
inkscape:vp_z="32 : 16 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 16 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
<inkscape:perspective
|
||||||
|
id="perspective3952"
|
||||||
|
inkscape:persp3d-origin="12 : 8 : 1"
|
||||||
|
inkscape:vp_z="24 : 12 : 1"
|
||||||
|
inkscape:vp_y="0 : 1000 : 0"
|
||||||
|
inkscape:vp_x="0 : 12 : 1"
|
||||||
|
sodipodi:type="inkscape:persp3d" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="16"
|
||||||
|
inkscape:cx="-0.094554179"
|
||||||
|
inkscape:cy="17.125349"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
borderlayer="false"
|
||||||
|
inkscape:window-width="1855"
|
||||||
|
inkscape:window-height="1056"
|
||||||
|
inkscape:window-x="65"
|
||||||
|
inkscape:window-y="24"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
inkscape:snap-object-midpoints="true"
|
||||||
|
inkscape:snap-grids="false"
|
||||||
|
inkscape:object-paths="false"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:object-nodes="true">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid5700"
|
||||||
|
empspacing="5"
|
||||||
|
visible="true"
|
||||||
|
enabled="true"
|
||||||
|
snapvisiblegridlinesonly="true"
|
||||||
|
dotted="true"
|
||||||
|
originx="2.5px"
|
||||||
|
originy="2.5px" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5697">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title>GIS icon theme 0.2</dc:title>
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Robert Szczepanek</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:rights>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Robert Szczepanek</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:rights>
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>GIS icons</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
<dc:coverage>GIS icons</dc:coverage>
|
||||||
|
<dc:description>http://robert.szczepanek.pl/</dc:description>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License
|
||||||
|
rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||||
|
<cc:permits
|
||||||
|
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||||
|
<cc:requires
|
||||||
|
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="Layer"
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(0,-8)">
|
||||||
|
<g
|
||||||
|
id="g3028"
|
||||||
|
transform="matrix(0.75161647,0,0,0.75161647,-0.02586348,9.4769448)">
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3775"
|
||||||
|
d="m 16.000001,1.0775438 c 9.467477,4.6992805 8.114981,22.3215822 0,25.8460432"
|
||||||
|
style="fill:none;stroke:#749fcf;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3773"
|
||||||
|
d="m 1.1225356,14.000566 29.7549294,0"
|
||||||
|
style="fill:none;stroke:#749fcf;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3773-1"
|
||||||
|
d="m 2.9484075,6.9340877 c 7.5739815,1.0094969 18.3939565,1.0094969 25.9679385,0"
|
||||||
|
style="fill:none;stroke:#749fcf;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3773-4"
|
||||||
|
d="m 2.9484075,21.067042 c 7.5739815,-1.009496 18.3939565,-1.009496 25.9679385,0"
|
||||||
|
style="fill:none;stroke:#749fcf;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path3777"
|
||||||
|
d="m 16.000001,1.0775438 c -8.1149812,3.5244605 -9.467478,21.1467632 0,25.8460432"
|
||||||
|
style="fill:none;stroke:#749fcf;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||||
|
<path
|
||||||
|
transform="matrix(1.2562074,0,0,1.0871977,22.465232,-1.0129089)"
|
||||||
|
d="m 6.9656949,13.809332 c 0,6.713955 -5.4228716,12.15669 -12.1123228,12.15669 -6.6894511,0 -12.1123231,-5.442735 -12.1123231,-12.15669 0,-6.7139549 5.422872,-12.1566907 12.1123231,-12.1566907 6.6894512,0 12.1123228,5.4427358 12.1123228,12.1566907 z"
|
||||||
|
sodipodi:ry="12.156691"
|
||||||
|
sodipodi:rx="12.112323"
|
||||||
|
sodipodi:cy="13.809332"
|
||||||
|
sodipodi:cx="-5.1466279"
|
||||||
|
id="path3003"
|
||||||
|
style="fill:none;stroke:#5488c4;stroke-width:1.28353083;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccc"
|
||||||
|
id="path2960"
|
||||||
|
d="M 7.3400991,7.2779254 13.185401,22.026434 19.613856,7.4154701 24.89957,7.3945152"
|
||||||
|
style="color:#000000;fill:none;stroke:#172739;stroke-width:1.29794168;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
transform="matrix(1.5475161,0,0,1.6212881,1.923793,-12.988176)"
|
||||||
|
d="m 4.5,12.5 c 0,0.552285 -0.4477153,1 -1,1 -0.5522847,0 -1,-0.447715 -1,-1 0,-0.552285 0.4477153,-1 1,-1 0.5522847,0 1,0.447715 1,1 z"
|
||||||
|
sodipodi:ry="1"
|
||||||
|
sodipodi:rx="1"
|
||||||
|
sodipodi:cy="12.5"
|
||||||
|
sodipodi:cx="3.5"
|
||||||
|
id="path2958"
|
||||||
|
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#172739;stroke-width:0.94698602;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<path
|
||||||
|
transform="matrix(1.5839392,0,0,1.6212881,7.641614,1.7603321)"
|
||||||
|
d="m 4.5,12.5 c 0,0.552285 -0.4477153,1 -1,1 -0.5522847,0 -1,-0.447715 -1,-1 0,-0.552285 0.4477153,-1 1,-1 0.5522847,0 1,0.447715 1,1 z"
|
||||||
|
sodipodi:ry="1"
|
||||||
|
sodipodi:rx="1"
|
||||||
|
sodipodi:cy="12.5"
|
||||||
|
sodipodi:cx="3.5"
|
||||||
|
id="path2958-0"
|
||||||
|
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#172739;stroke-width:0.93603462;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<path
|
||||||
|
transform="matrix(1.5475161,0,0,1.6212881,14.034218,-12.884972)"
|
||||||
|
d="m 4.5,12.5 c 0,0.552285 -0.4477153,1 -1,1 -0.5522847,0 -1,-0.447715 -1,-1 0,-0.552285 0.4477153,-1 1,-1 0.5522847,0 1,0.447715 1,1 z"
|
||||||
|
sodipodi:ry="1"
|
||||||
|
sodipodi:rx="1"
|
||||||
|
sodipodi:cy="12.5"
|
||||||
|
sodipodi:cx="3.5"
|
||||||
|
id="path2958-9"
|
||||||
|
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#172739;stroke-width:0.94698602;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
<path
|
||||||
|
transform="matrix(1.5475161,0,0,1.6212881,19.483264,-12.871586)"
|
||||||
|
d="m 4.5,12.5 c 0,0.552285 -0.4477153,1 -1,1 -0.5522847,0 -1,-0.447715 -1,-1 0,-0.552285 0.4477153,-1 1,-1 0.5522847,0 1,0.447715 1,1 z"
|
||||||
|
sodipodi:ry="1"
|
||||||
|
sodipodi:rx="1"
|
||||||
|
sodipodi:cy="12.5"
|
||||||
|
sodipodi:cx="3.5"
|
||||||
|
id="path2958-6"
|
||||||
|
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#172739;stroke-width:0.94698602;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||||
|
sodipodi:type="arc" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 13 KiB |
@@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
import shutil
|
import shutil
|
||||||
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import base64
|
|
||||||
import psycopg2
|
|
||||||
import psycopg2.extras
|
|
||||||
from os.path import abspath, join, pardir, dirname
|
from os.path import abspath, join, pardir, dirname
|
||||||
|
|
||||||
from qgis.PyQt import uic
|
from qgis.PyQt import uic
|
||||||
@@ -80,6 +78,16 @@ def plugin_test_data_path(*args, copy=False):
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
def pyperclip():
|
||||||
|
dst = dirname(dirname(__file__)) + "\\tools\\"
|
||||||
|
if os.access('N:/', os.R_OK):
|
||||||
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/PythonSQL.py'
|
||||||
|
try:
|
||||||
|
shutil.copy(src, dst)
|
||||||
|
except NameError:
|
||||||
|
print('404')
|
||||||
|
|
||||||
|
|
||||||
def resources_path(*args):
|
def resources_path(*args):
|
||||||
"""Get the path to our resources folder.
|
"""Get the path to our resources folder.
|
||||||
|
|
||||||
@@ -89,7 +97,7 @@ def resources_path(*args):
|
|||||||
:return: Absolute path to the resources folder.
|
:return: Absolute path to the resources folder.
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
path = abspath(abspath(join(plugin_path(), "CenRa_Metabase\\tools")))
|
path = abspath(abspath(join(plugin_path(), "CenRa_FLUX\\tools")))
|
||||||
for item in args:
|
for item in args:
|
||||||
path = abspath(join(path, item))
|
path = abspath(join(path, item))
|
||||||
return path
|
return path
|
||||||
@@ -107,77 +115,64 @@ def load_ui(*args):
|
|||||||
|
|
||||||
return ui_class
|
return ui_class
|
||||||
|
|
||||||
def login_base(take=None):
|
|
||||||
from .tools.PythonSQL import host,port,dbname,password,os_user
|
|
||||||
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)
|
def send_issues(url, titre, body, labels):
|
||||||
|
|
||||||
cur = con.cursor(cursor_factory = psycopg2.extras.DictCursor)
|
|
||||||
first_conn.close()
|
|
||||||
|
|
||||||
if take:
|
|
||||||
return cur,con
|
|
||||||
else:
|
|
||||||
return cur
|
|
||||||
def send_issues(url,titre,body,labels):
|
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
import os
|
# import os
|
||||||
import qgis
|
# import qgis
|
||||||
|
|
||||||
usr = os.environ['USERNAME']
|
# usr = os.environ['USERNAME']
|
||||||
token = '9d0a4e0bea561710e0728f161f7edf4e5201e112'
|
token = '9d0a4e0bea561710e0728f161f7edf4e5201e112'
|
||||||
url=url+'?token='+token
|
url = url + '?token=' + token
|
||||||
|
|
||||||
headers = {'Authorization': 'token ' + token,'accept': 'application/json','Content-Type': 'application/json'}
|
|
||||||
|
|
||||||
|
headers = {'Authorization': 'token ' + token, 'accept': 'application/json', 'Content-Type': 'application/json'}
|
||||||
|
|
||||||
payload = {'title': titre, 'body': body, 'labels': labels}
|
payload = {'title': titre, 'body': body, 'labels': labels}
|
||||||
try:
|
try:
|
||||||
urllib.request.urlopen('https://google.com')
|
urllib.request.urlopen('https://google.com')
|
||||||
binar = True
|
binar = True
|
||||||
except:
|
except NameError:
|
||||||
binar = False
|
binar = False
|
||||||
r = ''
|
r = ''
|
||||||
if binar:
|
if binar:
|
||||||
r = requests.post(url, data=json.dumps(payload), headers=headers)
|
r = requests.post(url, data=json.dumps(payload), headers=headers)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
def maj_verif(NAME):
|
def maj_verif(NAME):
|
||||||
import qgis
|
import qgis
|
||||||
import urllib.request
|
import urllib.request
|
||||||
iface = qgis.utils.iface
|
iface = qgis.utils.iface
|
||||||
from qgis.core import Qgis
|
from qgis.core import Qgis
|
||||||
|
|
||||||
url = qgis.utils.pluginMetadata(NAME,'repository')
|
# url = qgis.utils.pluginMetadata(NAME, 'repository')
|
||||||
#URL = url+'/raw/branch/main/plugins.xml'
|
# URL = url+'/raw/branch/main/plugins.xml'
|
||||||
URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/releases/plugins.xml'
|
URL = 'https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/plugins.xml'
|
||||||
# print(URL)
|
# print(URL)
|
||||||
version = qgis.utils.pluginMetadata(NAME,'version')
|
version = qgis.utils.pluginMetadata(NAME, 'version')
|
||||||
len_version = len(version)
|
len_version = len(version)
|
||||||
try:
|
try:
|
||||||
urllib.request.urlopen('https://google.com')
|
urllib.request.urlopen('https://google.com')
|
||||||
binar = True
|
binar = True
|
||||||
except:
|
except NameError:
|
||||||
binar = False
|
binar = False
|
||||||
if binar:
|
if binar:
|
||||||
|
try:
|
||||||
version_web = str(urllib.request.urlopen(URL).read())
|
version_web = str(urllib.request.urlopen(URL).read())
|
||||||
plugin_num = version_web.find(NAME)
|
plugin_num = version_web.find(NAME)
|
||||||
valeur_version_web = version_web.find('<version>',plugin_num)+9
|
valeur_version_web = version_web.find('<version>', plugin_num) + 9
|
||||||
version_plugin = version_web[valeur_version_web:valeur_version_web+len_version]
|
version_plugin = version_web[valeur_version_web: valeur_version_web + len_version]
|
||||||
if version_plugin != version:
|
if version_plugin != version:
|
||||||
iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30)
|
iface.messageBar().pushMessage("MAJ :", "Des mise à jour de plugin sont disponibles.", level=Qgis.Info, duration=30)
|
||||||
|
except NameError:
|
||||||
|
print("error gitea version ssl")
|
||||||
else:
|
else:
|
||||||
iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30)
|
iface.messageBar().pushMessage("WiFi :", "Pas de connection à internet.", level=Qgis.Warning, duration=30)
|
||||||
|
|
||||||
|
|
||||||
def devlog(NAME):
|
def devlog(NAME):
|
||||||
import qgis
|
import qgis
|
||||||
devmaj = '<head><style>* {margin:0; padding:0; }</style></head>'
|
devmaj = '<head><style>* {margin:0; padding:0; }</style></head>'
|
||||||
devmaj = devmaj+qgis.utils.pluginMetadata(NAME,'changelog')
|
devmaj = devmaj + qgis.utils.pluginMetadata(NAME, 'changelog')
|
||||||
return devmaj
|
return devmaj
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>Dialog</class>
|
<class>Dialog</class>
|
||||||
<resources>
|
|
||||||
</resources>
|
|
||||||
<widget class="QDialog" name="Dialog">
|
<widget class="QDialog" name="Dialog">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -65,8 +63,8 @@
|
|||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>350</x>
|
<x>345</x>
|
||||||
<y>20</y>
|
<y>10</y>
|
||||||
<width>221</width>
|
<width>221</width>
|
||||||
<height>71</height>
|
<height>71</height>
|
||||||
</rect>
|
</rect>
|
||||||
@@ -75,7 +73,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap resource="resources.qrc">:/plugins/CenRa_FLUX/logo.jpg</pixmap>
|
<pixmap>:/plugins/CenRa_FLUX/logo.jpg</pixmap>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -139,7 +137,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="resources.qrc">
|
<iconset>
|
||||||
<normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</iconset>
|
<normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
@@ -162,7 +160,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="resources.qrc">
|
<iconset>
|
||||||
<normaloff>:/plugins/CenRa_FLUX/arrow-up.png</normaloff>:/plugins/CenRa_FLUX/arrow-up.png</iconset>
|
<normaloff>:/plugins/CenRa_FLUX/arrow-up.png</normaloff>:/plugins/CenRa_FLUX/arrow-up.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
@@ -237,6 +235,18 @@
|
|||||||
<string>Flux sélectionné(s) à charger :</string>
|
<string>Flux sélectionné(s) à charger :</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<zorder>label_3</zorder>
|
||||||
|
<zorder>comboBox</zorder>
|
||||||
|
<zorder>comboBox_2</zorder>
|
||||||
|
<zorder>pushButton_2</zorder>
|
||||||
|
<zorder>tableWidget</zorder>
|
||||||
|
<zorder>tableWidget_2</zorder>
|
||||||
|
<zorder>commandLinkButton</zorder>
|
||||||
|
<zorder>commandLinkButton_2</zorder>
|
||||||
|
<zorder>lineEdit</zorder>
|
||||||
|
<zorder>label</zorder>
|
||||||
|
<zorder>label_2</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
@@ -0,0 +1,396 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Dialog</class>
|
||||||
|
<widget class="QDialog" name="Dialog">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>890</width>
|
||||||
|
<height>810</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>600</width>
|
||||||
|
<height>400</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>890</width>
|
||||||
|
<height>810</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>SIG CEN-RA</string>
|
||||||
|
</property>
|
||||||
|
<property name="sizeGripEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetMaximumSize</enum>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>890</width>
|
||||||
|
<height>810</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="inputMethodHints">
|
||||||
|
<set>Qt::ImhNoEditMenu|Qt::ImhNoTextHandles</set>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="midLineWidth">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>890</width>
|
||||||
|
<height>810</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>890</width>
|
||||||
|
<height>810</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<widget class="QCommandLinkButton" name="commandLinkButton_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>450</x>
|
||||||
|
<y>470</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>:/plugins/CenRa_FLUX/arrow-up.png</normaloff>:/plugins/CenRa_FLUX/arrow-up.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>360</x>
|
||||||
|
<y>750</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Charger les couches</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>161</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Calibri</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Liste des flux disponibles :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QTableWidget" name="tableWidget_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>550</y>
|
||||||
|
<width>851</width>
|
||||||
|
<height>181</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="inputMethodHints">
|
||||||
|
<set>Qt::ImhNoEditMenu|Qt::ImhNoTextHandles</set>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::SingleSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>250</x>
|
||||||
|
<y>130</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="editable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="currentText">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>470</x>
|
||||||
|
<y>130</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Recherche par mots-clés</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="clearButtonEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QToolButton" name="toolButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>660</x>
|
||||||
|
<y>130</y>
|
||||||
|
<width>21</width>
|
||||||
|
<height>21</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QTableWidget" name="tableWidget">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>170</y>
|
||||||
|
<width>850</width>
|
||||||
|
<height>281</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked</set>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::SingleSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>530</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>16</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Calibri</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Flux sélectionné(s) à charger :</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>335</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>221</width>
|
||||||
|
<height>71</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap>:/plugins/CenRa_FLUX/logo.jpg</pixmap>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="comboBox_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>360</x>
|
||||||
|
<y>80</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="editable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="currentText">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCommandLinkButton" name="commandLinkButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>390</x>
|
||||||
|
<y>470</y>
|
||||||
|
<width>61</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>830</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>70</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="DeBUG">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>71</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="editable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="currentText">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QTextBrowser" name="viewer">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>731</width>
|
||||||
|
<height>731</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgba(255, 255, 255,0.50);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>SICEN</string>
|
<string>Journal des modifications</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@@ -29,9 +29,6 @@
|
|||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@@ -41,7 +38,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>453</width>
|
<width>453</width>
|
||||||
<height>547</height>
|
<height>570</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
@@ -56,7 +53,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>DevLog</string>
|
<string>DevLog</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWebView" name="viewer" native="true">
|
<widget class="QTextBrowser" name="viewer">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
@@ -65,11 +62,6 @@
|
|||||||
<height>511</height>
|
<height>511</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="url" stdset="0">
|
|
||||||
<url>
|
|
||||||
<string>about:blank</string>
|
|
||||||
</url>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -78,19 +70,12 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::NoButton</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>QWebView</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header location="global">QtWebKitWidgets/QWebView</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 56 KiB |
@@ -4,14 +4,13 @@ __email__ = "info@3liz.org"
|
|||||||
|
|
||||||
|
|
||||||
from qgis.core import QgsApplication
|
from qgis.core import QgsApplication
|
||||||
from qgis.PyQt.QtCore import QCoreApplication, Qt, QTranslator, QUrl
|
from qgis.PyQt.QtCore import Qt, QUrl, QSettings
|
||||||
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
||||||
from qgis.PyQt.QtWidgets import QAction, QMessageBox
|
from qgis.PyQt.QtWidgets import QAction
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
import qgis
|
import qgis
|
||||||
|
|
||||||
|
# include <QSettings>
|
||||||
#include <QSettings>
|
|
||||||
'''
|
'''
|
||||||
from pg_metadata.connection_manager import (
|
from pg_metadata.connection_manager import (
|
||||||
store_connections,
|
store_connections,
|
||||||
@@ -24,18 +23,18 @@ from pg_metadata.processing.provider import PgMetadataProvider
|
|||||||
from pg_metadata.qgis_plugin_tools.tools.custom_logging import setup_logger
|
from pg_metadata.qgis_plugin_tools.tools.custom_logging import setup_logger
|
||||||
'''
|
'''
|
||||||
import os
|
import os
|
||||||
|
from .about_form import MetabaseAboutDialog
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
plugin_path,
|
# plugin_path,
|
||||||
|
pyperclip,
|
||||||
resources_path,
|
resources_path,
|
||||||
maj_verif,
|
maj_verif,
|
||||||
)
|
)
|
||||||
|
pyperclip()
|
||||||
from .dock import CenRa_Metabase
|
from .dock import CenRa_Metabase
|
||||||
from .editor import Metabase_Editor
|
from .editor import Metabase_Editor
|
||||||
from .about_form import MetabaseAboutDialog
|
|
||||||
#from CenRa_Metabase.issues import CenRa_Issues
|
|
||||||
|
|
||||||
from PyQt5.QtCore import *
|
|
||||||
|
|
||||||
|
# from CenRa_Metabase.issues import CenRa_Issues
|
||||||
|
|
||||||
|
|
||||||
class PgMetadata:
|
class PgMetadata:
|
||||||
@@ -49,42 +48,42 @@ class PgMetadata:
|
|||||||
self.dock_action = None
|
self.dock_action = None
|
||||||
self.help_action = None
|
self.help_action = None
|
||||||
plugin_dir = os.path.dirname(__file__)
|
plugin_dir = os.path.dirname(__file__)
|
||||||
end_find = plugin_dir.rfind('\\')+1
|
end_find = plugin_dir.rfind('\\') + 1
|
||||||
global NAME
|
global NAME
|
||||||
NAME = plugin_dir[end_find:]
|
NAME = plugin_dir[end_find:]
|
||||||
maj_verif(NAME)
|
maj_verif(NAME)
|
||||||
|
|
||||||
# Display About window on first use
|
# Display About window on first use
|
||||||
version = qgis.utils.pluginMetadata('CenRa_METABASE','version')
|
version = qgis.utils.pluginMetadata('CenRa_METABASE', 'version')
|
||||||
s = QSettings()
|
s = QSettings()
|
||||||
versionUse = s.value("metadata/version", 1, type=str)
|
versionUse = s.value("metadata/version", 1, type=str)
|
||||||
if str(versionUse) != str(version) :
|
if str(versionUse) != str(version):
|
||||||
s.setValue("metadata/version", str(version))
|
s.setValue("metadata/version", str(version))
|
||||||
print(versionUse,version)
|
print(versionUse, version)
|
||||||
self.open_about_dialog()
|
self.open_about_dialog()
|
||||||
# setup_logger('pg_metadata')
|
# setup_logger('pg_metadata')
|
||||||
|
|
||||||
#locale, file_path = setup_translation(
|
# locale, file_path = setup_translation(
|
||||||
# folder=plugin_path("i18n"), file_pattern="CenRa_Metabase_{}.qm")
|
# folder=plugin_path("i18n"), file_pattern="CenRa_Metabase_{}.qm")
|
||||||
#if file_path:
|
# if file_path:
|
||||||
# self.translator = QTranslator()
|
# self.translator = QTranslator()
|
||||||
# self.translator.load(file_path)
|
# self.translator.load(file_path)
|
||||||
# noinspection PyCallByClass,PyArgumentList
|
# noinspection PyCallByClass,PyArgumentList
|
||||||
# QCoreApplication.installTranslator(self.translator)
|
# QCoreApplication.installTranslator(self.translator)
|
||||||
|
|
||||||
# noinspection PyPep8Naming
|
# noinspection PyPep8Naming
|
||||||
#def initProcessing(self):
|
# def initProcessing(self):
|
||||||
#""" Add the QGIS Processing provider. """
|
# """ Add the QGIS Processing provider. """
|
||||||
#if not self.provider:
|
# if not self.provider:
|
||||||
#self.provider = PgMetadataProvider()
|
# self.provider = PgMetadataProvider()
|
||||||
#QgsApplication.processingRegistry().addProvider(self.provider)
|
# QgsApplication.processingRegistry().addProvider(self.provider)
|
||||||
|
|
||||||
# noinspection PyPep8Naming
|
# noinspection PyPep8Naming
|
||||||
def initGui(self):
|
def initGui(self):
|
||||||
""" Build the plugin GUI. """
|
""" Build the plugin GUI. """
|
||||||
#self.initProcessing()
|
# self.initProcessing()
|
||||||
|
|
||||||
#self.check_invalid_connection_names()
|
# self.check_invalid_connection_names()
|
||||||
|
|
||||||
self.toolBar = iface.addToolBar("CenRa_Metabase")
|
self.toolBar = iface.addToolBar("CenRa_Metabase")
|
||||||
self.toolBar.setObjectName("CenRa_Metabase")
|
self.toolBar.setObjectName("CenRa_Metabase")
|
||||||
@@ -99,14 +98,13 @@ class PgMetadata:
|
|||||||
if not self.editor:
|
if not self.editor:
|
||||||
self.editor = Metabase_Editor()
|
self.editor = Metabase_Editor()
|
||||||
|
|
||||||
|
self.editor_action = QAction(icon2, 'CenRa_Metabase', None)
|
||||||
self.editor_action = QAction(icon2, 'CenRa_Metabase',None)
|
|
||||||
self.toolBar.addAction(self.editor_action)
|
self.toolBar.addAction(self.editor_action)
|
||||||
self.editor_action.triggered.connect(self.open_editor)
|
self.editor_action.triggered.connect(self.open_editor)
|
||||||
|
|
||||||
if not self.dock:
|
if not self.dock:
|
||||||
self.dock = CenRa_Metabase()
|
self.dock = CenRa_Metabase()
|
||||||
iface.addDockWidget(Qt.RightDockWidgetArea, self.dock)
|
iface.addDockWidget(Qt.DockWidgetArea(0x2), self.dock)
|
||||||
|
|
||||||
# Open/close the dock from plugin menu
|
# Open/close the dock from plugin menu
|
||||||
self.dock_action = QAction(icon, 'CenRa_Metabase', iface.mainWindow())
|
self.dock_action = QAction(icon, 'CenRa_Metabase', iface.mainWindow())
|
||||||
@@ -157,7 +155,8 @@ class PgMetadata:
|
|||||||
About dialog
|
About dialog
|
||||||
"""
|
"""
|
||||||
dialog = MetabaseAboutDialog(iface)
|
dialog = MetabaseAboutDialog(iface)
|
||||||
dialog.exec_()
|
dialog.exec()
|
||||||
|
|
||||||
def open_help():
|
def open_help():
|
||||||
""" Open the online help. """
|
""" Open the online help. """
|
||||||
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
|
QDesktopServices.openUrl(QUrl('https://plateformesig.cenra-outils.org/'))
|
||||||
@@ -177,11 +176,9 @@ class PgMetadata:
|
|||||||
|
|
||||||
def unload(self):
|
def unload(self):
|
||||||
""" Unload the plugin. """
|
""" Unload the plugin. """
|
||||||
if self.editor:
|
# if self.editor:
|
||||||
iface.removePluginMenu('CenRa_Metabase',self.editor_action)
|
# iface.removePluginMenu('CenRa_Metabase',self.editor_action)
|
||||||
#self.editor.removeToolBarIcon(self.editor_action)
|
# self.editor.removeToolBarIcon(self.editor_action)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if self.dock:
|
if self.dock:
|
||||||
iface.removeDockWidget(self.dock)
|
iface.removeDockWidget(self.dock)
|
||||||
@@ -195,14 +192,14 @@ class PgMetadata:
|
|||||||
iface.deregisterLocatorFilter(self.locator_filter)
|
iface.deregisterLocatorFilter(self.locator_filter)
|
||||||
del self.locator_filter
|
del self.locator_filter
|
||||||
|
|
||||||
if self.dock_action:
|
|
||||||
iface.pluginMenu().removeAction(self.dock_action)
|
|
||||||
del self.dock_action
|
|
||||||
|
|
||||||
if self.help_action:
|
if self.help_action:
|
||||||
iface.pluginHelpMenu().removeAction(self.help_action)
|
iface.pluginHelpMenu().removeAction(self.help_action)
|
||||||
del self.help_action
|
del self.help_action
|
||||||
|
|
||||||
|
if self.dock_action:
|
||||||
|
iface.pluginMenu().removeAction(self.dock_action)
|
||||||
|
del self.dock_action
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def run_tests(pattern='test_*.py', package=None):
|
def run_tests(pattern='test_*.py', package=None):
|
||||||
"""Run the test inside QGIS."""
|
"""Run the test inside QGIS."""
|
||||||
@@ -3,7 +3,7 @@ import os.path
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from qgis.PyQt import uic
|
from qgis.PyQt import uic
|
||||||
from qgis.PyQt.QtGui import QPixmap
|
# from qgis.PyQt.QtGui import QPixmap
|
||||||
from qgis.PyQt.QtWidgets import QDialog
|
from qgis.PyQt.QtWidgets import QDialog
|
||||||
|
|
||||||
from .tools.resources import devlog
|
from .tools.resources import devlog
|
||||||
@@ -12,7 +12,7 @@ ABOUT_FORM_CLASS, _ = uic.loadUiType(
|
|||||||
os.path.join(
|
os.path.join(
|
||||||
str(Path(__file__).resolve().parent),
|
str(Path(__file__).resolve().parent),
|
||||||
'tools/ui',
|
'tools/ui',
|
||||||
'CenRa_Metabase_about_form.ui'
|
'CenRa_about_form.ui'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -14,44 +14,31 @@ from pathlib import Path
|
|||||||
from xml.dom.minidom import parseString
|
from xml.dom.minidom import parseString
|
||||||
|
|
||||||
from qgis.core import (
|
from qgis.core import (
|
||||||
NULL,
|
|
||||||
QgsApplication,
|
QgsApplication,
|
||||||
QgsDataSourceUri,
|
|
||||||
QgsProject,
|
|
||||||
QgsProviderConnectionException,
|
|
||||||
QgsProviderRegistry,
|
QgsProviderRegistry,
|
||||||
QgsRasterLayer,
|
|
||||||
QgsSettings,
|
QgsSettings,
|
||||||
QgsVectorLayer,
|
|
||||||
)
|
)
|
||||||
from qgis.PyQt.QtCore import QLocale, QUrl
|
from qgis.PyQt.QtCore import QLocale, QUrl
|
||||||
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
||||||
from qgis.PyQt.QtPrintSupport import QPrinter
|
from qgis.PyQt.QtPrintSupport import QPrinter
|
||||||
from qgis.PyQt.QtWebKitWidgets import QWebPage
|
# from qgis.PyQt.QtWebKitWidgets import QWebPage
|
||||||
from qgis.PyQt.QtWidgets import (
|
from qgis.PyQt.QtWidgets import (
|
||||||
QDialog,
|
|
||||||
QAction,
|
QAction,
|
||||||
QDockWidget,
|
QDockWidget,
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
QInputDialog,
|
|
||||||
QMenu,
|
QMenu,
|
||||||
QToolButton,
|
QToolButton,
|
||||||
)
|
)
|
||||||
from qgis.gui import *
|
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
'''
|
import qgis
|
||||||
from pg_metadata.connection_manager import (
|
|
||||||
check_pgmetadata_is_installed,
|
|
||||||
connections_list,
|
|
||||||
settings_connections_names,
|
|
||||||
)
|
|
||||||
'''
|
|
||||||
|
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
load_ui,
|
load_ui,
|
||||||
resources_path,
|
resources_path,
|
||||||
login_base,
|
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
|
from .tools.PythonSQL import login_base
|
||||||
|
except ValueError:
|
||||||
|
print('Pas de fichier PythonSQL')
|
||||||
|
|
||||||
DOCK_CLASS = load_ui('CenRa_Metabase_dockwidget_base.ui')
|
DOCK_CLASS = load_ui('CenRa_Metabase_dockwidget_base.ui')
|
||||||
LOGGER = logging.getLogger('CenRa_Metabase')
|
LOGGER = logging.getLogger('CenRa_Metabase')
|
||||||
@@ -80,8 +67,8 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
|||||||
self.current_datasource_uri = None
|
self.current_datasource_uri = None
|
||||||
self.current_connection = None
|
self.current_connection = None
|
||||||
|
|
||||||
self.viewer.page().setLinkDelegationPolicy(QWebPage.DelegateAllLinks)
|
# self.viewer.page().setLinkDelegationPolicy(QWebPage.DelegateAllLinks)
|
||||||
self.viewer.page().linkClicked.connect(self.open_link)
|
# self.viewer.page().linkClicked.connect(self.open_link)
|
||||||
|
|
||||||
# Help button
|
# Help button
|
||||||
self.external_help.setText('')
|
self.external_help.setText('')
|
||||||
@@ -90,14 +77,14 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
|||||||
|
|
||||||
# Flat table button
|
# Flat table button
|
||||||
self.flatten_dataset_table.setText('')
|
self.flatten_dataset_table.setText('')
|
||||||
#self.flatten_dataset_table.setToolTip(tr("Add the catalog table"))
|
# self.flatten_dataset_table.setToolTip(tr("Add the catalog table"))
|
||||||
self.flatten_dataset_table.setIcon(QgsApplication.getThemeIcon("/mActionAddHtml.svg"))
|
self.flatten_dataset_table.setIcon(QgsApplication.getThemeIcon("/mActionAddHtml.svg"))
|
||||||
#self.flatten_dataset_table.clicked.connect(self.add_flatten_dataset_table)
|
# self.flatten_dataset_table.clicked.connect(self.add_flatten_dataset_table)
|
||||||
|
|
||||||
# Settings menu
|
# Settings menu
|
||||||
self.config.setAutoRaise(True)
|
self.config.setAutoRaise(True)
|
||||||
#self.config.setToolTip(tr("Settings"))
|
# self.config.setToolTip(tr("Settings"))
|
||||||
self.config.setPopupMode(QToolButton.InstantPopup)
|
self.config.setPopupMode(QToolButton.ToolButtonPopupMode(2))
|
||||||
self.config.setIcon(QgsApplication.getThemeIcon("/mActionOptions.svg"))
|
self.config.setIcon(QgsApplication.getThemeIcon("/mActionOptions.svg"))
|
||||||
|
|
||||||
self.auto_open_dock_action = QAction(
|
self.auto_open_dock_action = QAction(
|
||||||
@@ -114,8 +101,8 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
|||||||
|
|
||||||
# Setting PDF/HTML menu
|
# Setting PDF/HTML menu
|
||||||
self.save_button.setAutoRaise(True)
|
self.save_button.setAutoRaise(True)
|
||||||
#self.save_button.setToolTip(tr("Save metadata"))
|
# self.save_button.setToolTip(tr("Save metadata"))
|
||||||
self.save_button.setPopupMode(QToolButton.InstantPopup)
|
self.save_button.setPopupMode(QToolButton.ToolButtonPopupMode(2))
|
||||||
self.save_button.setIcon(QIcon(QgsApplication.iconPath('mActionFileSave.svg')))
|
self.save_button.setIcon(QIcon(QgsApplication.iconPath('mActionFileSave.svg')))
|
||||||
|
|
||||||
self.save_as_pdf = QAction(
|
self.save_as_pdf = QAction(
|
||||||
@@ -142,15 +129,21 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
|||||||
self.metadata = QgsProviderRegistry.instance().providerMetadata('postgres')
|
self.metadata = QgsProviderRegistry.instance().providerMetadata('postgres')
|
||||||
|
|
||||||
# Display message in the dock
|
# Display message in the dock
|
||||||
#if not settings_connections_names():
|
# if not settings_connections_names():
|
||||||
#self.default_html_content_not_installed()
|
# self.default_html_content_not_installed()
|
||||||
#else:
|
# else:
|
||||||
self.default_html_content_not_pg_layer()
|
self.default_html_content_not_pg_layer()
|
||||||
|
|
||||||
iface.layerTreeView().currentLayerChanged.connect(self.layer_changed)
|
iface.layerTreeView().currentLayerChanged.connect(self.layer_changed)
|
||||||
|
try:
|
||||||
|
login_base()
|
||||||
|
iface.layerTreeView().currentLayerChanged.connect(self.layer_changed)
|
||||||
|
except ValueError:
|
||||||
|
# qgis.utils.plugins['CenRa_METABASE'].initGui()
|
||||||
|
qgis.utils.plugins['CenRa_METABASE'].unload()
|
||||||
|
# self.default_html_content_not_pg_layer()
|
||||||
|
|
||||||
if iface.activeLayer():
|
if iface.activeLayer():
|
||||||
layer=iface.activeLayer()
|
layer = iface.activeLayer()
|
||||||
iface.layerTreeView().setCurrentLayer(None)
|
iface.layerTreeView().setCurrentLayer(None)
|
||||||
iface.layerTreeView().setCurrentLayer(layer)
|
iface.layerTreeView().setCurrentLayer(layer)
|
||||||
|
|
||||||
@@ -181,8 +174,8 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
|||||||
|
|
||||||
if output_format == OutputFormats.PDF:
|
if output_format == OutputFormats.PDF:
|
||||||
printer = QPrinter()
|
printer = QPrinter()
|
||||||
printer.setOutputFormat(QPrinter.PdfFormat)
|
printer.setOutputFormat(QPrinter.OutputFormat(1))
|
||||||
printer.setPageMargins(20, 20, 20, 20, QPrinter.Millimeter)
|
# printer.setPageMargins(20,20,20,20,QPrinter.Unit(0))
|
||||||
printer.setOutputFileName(output_file_path)
|
printer.setOutputFileName(output_file_path)
|
||||||
self.viewer.print(printer)
|
self.viewer.print(printer)
|
||||||
iface.messageBar().pushSuccess(
|
iface.messageBar().pushSuccess(
|
||||||
@@ -192,7 +185,7 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
|||||||
"<a href=\"{}\">{}</a>").format(parent_folder, output_file_path)
|
"<a href=\"{}\">{}</a>").format(parent_folder, output_file_path)
|
||||||
)
|
)
|
||||||
|
|
||||||
elif output_format in [OutputFormats.HTML,OutputFormats.DCAT]:
|
elif output_format in [OutputFormats.HTML, OutputFormats.DCAT]:
|
||||||
if output_format == OutputFormats.HTML:
|
if output_format == OutputFormats.HTML:
|
||||||
data_str = self.viewer.page().currentFrame().toHtml()
|
data_str = self.viewer.page().currentFrame().toHtml()
|
||||||
else:
|
else:
|
||||||
@@ -221,43 +214,15 @@ class CenRa_Metabase(QDockWidget, DOCK_CLASS):
|
|||||||
def save_auto_open_dock(self):
|
def save_auto_open_dock(self):
|
||||||
""" Save settings about the dock. """
|
""" Save settings about the dock. """
|
||||||
self.settings.setValue("pgmetadata/auto_open_dock", self.auto_open_dock_action.isChecked())
|
self.settings.setValue("pgmetadata/auto_open_dock", self.auto_open_dock_action.isChecked())
|
||||||
def sql_to_xml(self,dataall):
|
|
||||||
distribution=''
|
def sql_to_xml(self, dataall):
|
||||||
|
distribution = ''
|
||||||
for y in dataall[1]:
|
for y in dataall[1]:
|
||||||
distribution = distribution + (
|
distribution = distribution + ('<dcat:distribution>' + '<dcat:Distribution>' + '<dct:title>{data}</dct:title>'.format(data=y[0]) + '<dcat:downloadURL>{data}</dcat:downloadURL>'.format(data=y[1]) + '<dcat:mediaType>{data}</dcat:mediaType>'.format(data=y[2]) + '<dct:format>{data}</dct:format>'.format(data=y[3]) + '<dct:bytesize>{data}</dct:bytesize>'.format(data=y[4]) + '</dcat:Distribution>' + '</dcat:distribution>')
|
||||||
'<dcat:distribution>'+
|
publisher = ''
|
||||||
'<dcat:Distribution>'+
|
|
||||||
'<dct:title>{data}</dct:title>'.format(data=y[0])+
|
|
||||||
'<dcat:downloadURL>{data}</dcat:downloadURL>'.format(data=y[1])+
|
|
||||||
'<dcat:mediaType>{data}</dcat:mediaType>'.format(data=y[2])+
|
|
||||||
'<dct:format>{data}</dct:format>'.format(data=y[3])+
|
|
||||||
'<dct:bytesize>{data}</dct:bytesize>'.format(data=y[4])+
|
|
||||||
'</dcat:Distribution>'+
|
|
||||||
'</dcat:distribution>')
|
|
||||||
publisher=''
|
|
||||||
for z in dataall[2]:
|
for z in dataall[2]:
|
||||||
publisher = publisher + (
|
publisher = publisher + ('<dct:publisher>' + '<foaf:Organization>' + '<foaf:name>{data}</foaf:name>'.format(data=z[1]) + '<foaf:mbox>{data}</foaf:mbox>'.format(data=z[3]) + '</foaf:Organization>' + '</dct:publisher>')
|
||||||
'<dct:publisher>'+
|
data_str = [[dataall[0][26], '<dct:identifier>{data}</dct:identifier>'.format(data=dataall[0][1]) + '<dct:title>{data}</dct:title>'.format(data=dataall[0][4]) + '<dct:description>{data}</dct:description>'.format(data=dataall[0][5]) + '<dct:language>{data}</dct:language>'.format(data=dataall[0][26]) + '<dct:spatial>{data}</dct:spatial>'.format(data=dataall[0][28]) + '<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">{data}</dct:created>'.format(data=dataall[0][20]) + '<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">{data}</dct:issued>'.format(data=dataall[0][11]) + '<dct:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">{data}</dct:modified>'.format(data=dataall[0][21]) + '<dct:license>{data}</dct:license>'.format(data=dataall[0][13]) + distribution + publisher + '<dcat:theme>{data}</dcat:theme>'.format(data=", ".join(str(x) for x in dataall[0][24])) + '<dcat:keyword>{data}</dcat:keyword>'.format(data=", ".join(str(x) for x in dataall[0][6])) + '<dct:accrualPeriodicity>{data}</dct:accrualPeriodicity>'.format(data=dataall[0][12])]]
|
||||||
'<foaf:Organization>'+
|
|
||||||
'<foaf:name>{data}</foaf:name>'.format(data=z[1])+
|
|
||||||
'<foaf:mbox>{data}</foaf:mbox>'.format(data=z[3])+
|
|
||||||
'</foaf:Organization>'+
|
|
||||||
'</dct:publisher>')
|
|
||||||
data_str = [[dataall[0][26],
|
|
||||||
'<dct:identifier>{data}</dct:identifier>'.format(data=dataall[0][1])+
|
|
||||||
'<dct:title>{data}</dct:title>'.format(data=dataall[0][4])+
|
|
||||||
'<dct:description>{data}</dct:description>'.format(data=dataall[0][5])+
|
|
||||||
'<dct:language>{data}</dct:language>'.format(data=dataall[0][26])+
|
|
||||||
'<dct:spatial>{data}</dct:spatial>'.format(data=dataall[0][28])+
|
|
||||||
'<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">{data}</dct:created>'.format(data=dataall[0][20])+
|
|
||||||
'<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">{data}</dct:issued>'.format(data=dataall[0][11])+
|
|
||||||
'<dct:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">{data}</dct:modified>'.format(data=dataall[0][21])+
|
|
||||||
'<dct:license>{data}</dct:license>'.format(data=dataall[0][13])+
|
|
||||||
distribution+
|
|
||||||
publisher+
|
|
||||||
'<dcat:theme>{data}</dcat:theme>'.format(data=", ".join(str(x) for x in dataall[0][24]))+
|
|
||||||
'<dcat:keyword>{data}</dcat:keyword>'.format(data=", ".join(str(x) for x in dataall[0][6]))+
|
|
||||||
'<dct:accrualPeriodicity>{data}</dct:accrualPeriodicity>'.format(data=dataall[0][12])]]
|
|
||||||
|
|
||||||
return data_str
|
return data_str
|
||||||
|
|
||||||
@@ -267,7 +232,7 @@ publisher+
|
|||||||
locale = QgsSettings().value("locale/userLocale", QLocale().name())
|
locale = QgsSettings().value("locale/userLocale", QLocale().name())
|
||||||
locale = locale.split('_')[0].lower()
|
locale = locale.split('_')[0].lower()
|
||||||
|
|
||||||
if output_format == [OutputFormats.HTML,OutputFormats.DCAT]:
|
if output_format == [OutputFormats.HTML, OutputFormats.DCAT]:
|
||||||
sql = (
|
sql = (
|
||||||
"SELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}', '{locale}');"
|
"SELECT pgmetadata.get_dataset_item_html_content('{schema}', '{table}', '{locale}');"
|
||||||
).format(schema=uri.schema(), table=uri.table(), locale=locale)
|
).format(schema=uri.schema(), table=uri.table(), locale=locale)
|
||||||
@@ -282,7 +247,6 @@ publisher+
|
|||||||
self.current_connection = None
|
self.current_connection = None
|
||||||
self.ce_trouve_dans_psql(layer)
|
self.ce_trouve_dans_psql(layer)
|
||||||
|
|
||||||
|
|
||||||
def add_flatten_dataset_table(self):
|
def add_flatten_dataset_table(self):
|
||||||
""" Add a flatten dataset table with all links and contacts. """
|
""" Add a flatten dataset table with all links and contacts. """
|
||||||
'''
|
'''
|
||||||
@@ -327,17 +291,17 @@ publisher+
|
|||||||
|
|
||||||
def set_html_content(self, title=None, body=None):
|
def set_html_content(self, title=None, body=None):
|
||||||
""" Set the content in the dock. """
|
""" Set the content in the dock. """
|
||||||
#link_logo=resources_path('icons', 'CEN_RA.png')
|
# ink_logo=resources_path('icons', 'CEN_RA.png')
|
||||||
css_file = resources_path('css', 'dock.css')
|
css_file = resources_path('css', 'dock.css')
|
||||||
with open(css_file, 'r', encoding='utf8') as f:
|
with open(css_file, 'r', encoding='utf8') as f:
|
||||||
css = f.read()
|
css = f.read()
|
||||||
|
|
||||||
html = '<html><head>'
|
html = '<html><head>'
|
||||||
#html += '<script src="http://ignf.github.io/geoportal-sdk/latest/dist/2d/GpSDK2D.js" defer ></script>'
|
# html += '<script src="http://ignf.github.io/geoportal-sdk/latest/dist/2d/GpSDK2D.js" defer ></script>'
|
||||||
html += '<style>{css}</style></head><body>'.format(css=css)
|
html += '<style>{css}</style></head><body>'.format(css=css)
|
||||||
#html += '<link rel="stylesheet" href="http://ignf.github.io/geoportal-sdk/latest/dist/2d/GpSDK2D.css" >'
|
# html += '<link rel="stylesheet" href="http://ignf.github.io/geoportal-sdk/latest/dist/2d/GpSDK2D.css" >'
|
||||||
#html += '<script src="file:///C:/Users/tlaveille/Desktop/maps.js" defer></script>'
|
# html += '<script src="file:///C:/Users/tlaveille/Desktop/maps.js" defer></script>'
|
||||||
#html += '<noscript>Your browser does not support JavaScript!</noscript>'
|
# html += '<noscript>Your browser does not support JavaScript!</noscript>'
|
||||||
if title:
|
if title:
|
||||||
html += '<h2>{title} <img class=logo src=https://i2.wp.com/www.cen-rhonealpes.fr/wp-content/uploads/2013/04/cen-rhonealpes-couleurs1.jpg?w=340&ssl=1></h2>'.format(title=title)
|
html += '<h2>{title} <img class=logo src=https://i2.wp.com/www.cen-rhonealpes.fr/wp-content/uploads/2013/04/cen-rhonealpes-couleurs1.jpg?w=340&ssl=1></h2>'.format(title=title)
|
||||||
if body:
|
if body:
|
||||||
@@ -346,16 +310,16 @@ publisher+
|
|||||||
html += '</body></html>'
|
html += '</body></html>'
|
||||||
|
|
||||||
# It must be a file, even if it does not exist on the file system.
|
# It must be a file, even if it does not exist on the file system.
|
||||||
base_url = QUrl.fromLocalFile(resources_path('images', 'must_be_a_file.png'))
|
# base_url = QUrl.fromLocalFile(resources_path('images', 'must_be_a_file.png'))
|
||||||
self.viewer.setHtml(html, base_url)
|
self.viewer.setHtml(html)
|
||||||
|
|
||||||
def ce_trouve_dans_psql(self,layer):
|
def ce_trouve_dans_psql(self, layer):
|
||||||
try:
|
try:
|
||||||
uri = layer.dataProvider().uri()
|
uri = layer.dataProvider().uri()
|
||||||
except:
|
except AttributeError:
|
||||||
self.default_html_content_not_pg_layer()
|
self.default_html_content_not_pg_layer()
|
||||||
self.save_button.setEnabled(False)
|
self.save_button.setEnabled(False)
|
||||||
uri=''
|
uri = ''
|
||||||
if uri != '':
|
if uri != '':
|
||||||
if not uri.table():
|
if not uri.table():
|
||||||
layertype = layer.providerType().lower()
|
layertype = layer.providerType().lower()
|
||||||
@@ -366,23 +330,23 @@ publisher+
|
|||||||
self.save_button.setEnabled(False)
|
self.save_button.setEnabled(False)
|
||||||
else:
|
else:
|
||||||
data_count = self.sql_check(uri)
|
data_count = self.sql_check(uri)
|
||||||
#print(data_count)
|
# print(data_count)
|
||||||
if data_count == 0:
|
if data_count == 0:
|
||||||
self.default_html_content_not_metadata()
|
self.default_html_content_not_metadata()
|
||||||
self.save_button.setEnabled(False)
|
self.save_button.setEnabled(False)
|
||||||
else:
|
else:
|
||||||
self.build_html_content(layer,uri)
|
self.build_html_content(layer, uri)
|
||||||
self.save_button.setEnabled(True)
|
self.save_button.setEnabled(True)
|
||||||
|
|
||||||
def build_html_content(self,layer,uri):
|
def build_html_content(self, layer, uri):
|
||||||
body = ''
|
body = ''
|
||||||
|
|
||||||
dataall=self.sql_info(uri)
|
dataall = self.sql_info(uri)
|
||||||
data=dataall[0]
|
data = dataall[0]
|
||||||
data_url=dataall[1]
|
data_url = dataall[1]
|
||||||
data_contact=dataall[2]
|
data_contact = dataall[2]
|
||||||
#print(len(data_url))
|
# print(len(data_url))
|
||||||
data_collonne=[field.name() for field in layer.dataProvider().fields()]
|
# data_collonne = [field.name() for field in layer.dataProvider().fields()]
|
||||||
|
|
||||||
body += '<div><h3>Identification</h3><table class="table table-condensed">'
|
body += '<div><h3>Identification</h3><table class="table table-condensed">'
|
||||||
body += '<tr><th>Titre</th><td>{data[4]}</td></tr>'.format(data=data)
|
body += '<tr><th>Titre</th><td>{data[4]}</td></tr>'.format(data=data)
|
||||||
@@ -405,7 +369,7 @@ publisher+
|
|||||||
body += '<tr><th>Emprise</th><td>{data[28]}</td></tr>'.format(data=data)
|
body += '<tr><th>Emprise</th><td>{data[28]}</td></tr>'.format(data=data)
|
||||||
body += '</table></div>'
|
body += '</table></div>'
|
||||||
|
|
||||||
#body += '<div id="map"></div>'
|
# body += '<div id="map"></div>'
|
||||||
|
|
||||||
body += '<div><h3>Publication</h3><table class="table table-condensed">'
|
body += '<div><h3>Publication</h3><table class="table table-condensed">'
|
||||||
body += '<tr><th>Date</th><td>{data[11]}</td></tr>'.format(data=data)
|
body += '<tr><th>Date</th><td>{data[11]}</td></tr>'.format(data=data)
|
||||||
@@ -444,45 +408,46 @@ publisher+
|
|||||||
self.set_html_content(
|
self.set_html_content(
|
||||||
layer.name(), body)
|
layer.name(), body)
|
||||||
|
|
||||||
def set_html_to_wms(self,layer):
|
def set_html_to_wms(self, layer):
|
||||||
self.set_html_content(
|
self.set_html_content(
|
||||||
'CenRa Metadata',(layer.htmlMetadata()))
|
'CenRa Metadata', (layer.htmlMetadata()))
|
||||||
|
|
||||||
def default_html_content_not_pg_layer(self):
|
def default_html_content_not_pg_layer(self):
|
||||||
""" When it's not a PostgreSQL layer. """
|
""" When it's not a PostgreSQL layer. """
|
||||||
self.set_html_content(
|
self.set_html_content(
|
||||||
'CenRa Metadata', ('Vous devez cliquer sur une couche dans la légende qui est stockée dans PostgreSQL.'))
|
'CenRa Metadata', ('Vous devez cliquer sur une couche dans la légende qui est stockée dans PostgreSQL.'))
|
||||||
|
|
||||||
def default_html_content_not_metadata(self):
|
def default_html_content_not_metadata(self):
|
||||||
self.set_html_content(
|
self.set_html_content(
|
||||||
'CenRa Metadata', ('La couche ne contien pas de métadonnée.'))
|
'CenRa Metadata', ('La couche ne contien pas de métadonnée.'))
|
||||||
|
|
||||||
def sql_check(self,uri):
|
def sql_check(self, uri):
|
||||||
cur=login_base()
|
cur = login_base()
|
||||||
table = uri.table()
|
table = uri.table()
|
||||||
schema = uri.schema()
|
schema = uri.schema()
|
||||||
|
|
||||||
sql_count = """SELECT count(uid) FROM metadata.dataset
|
sql_count = """SELECT count(uid) FROM metadata.dataset
|
||||||
WHERE schema_name LIKE '"""+schema+"""' AND table_name LIKE '"""+table+"""';"""
|
WHERE schema_name LIKE '""" + schema + """' AND table_name LIKE '""" + table + """';"""
|
||||||
|
|
||||||
cur.execute(sql_count)
|
cur.execute(sql_count)
|
||||||
data_count = cur.fetchall()
|
data_count = cur.fetchall()
|
||||||
cur.close()
|
cur.close()
|
||||||
return data_count[0][0]
|
return data_count[0][0]
|
||||||
|
|
||||||
def sql_info(self,uri):
|
def sql_info(self, uri):
|
||||||
cur=login_base()
|
cur = login_base()
|
||||||
table = uri.table()
|
table = uri.table()
|
||||||
schema = uri.schema()
|
schema = uri.schema()
|
||||||
#[s for s in iface.activeLayer().source().split(" ") if "dbname" in s][0].split("'")[1]
|
# [s for s in iface.activeLayer().source().split(" ") if "dbname" in s][0].split("'")[1]
|
||||||
sql_find = """SELECT *,right(left(st_astext(geom,2),-2),-9) FROM metadata.dataset
|
sql_find = """SELECT *,right(left(st_astext(geom,2),-2),-9) FROM metadata.dataset
|
||||||
WHERE schema_name LIKE '"""+schema+"""' AND table_name LIKE '"""+table+"""';"""
|
WHERE schema_name LIKE '""" + schema + """' AND table_name LIKE '""" + table + """';"""
|
||||||
cur.execute(sql_find)
|
cur.execute(sql_find)
|
||||||
data_general = cur.fetchall()
|
data_general = cur.fetchall()
|
||||||
sql_findurl = """SELECT type,url,mime,format,taille FROM metadata.dataurl WHERE schema_name LIKE '"""+schema+"""' AND table_name LIKE '"""+table+"""';"""
|
sql_findurl = """SELECT type,url,mime,format,taille FROM metadata.dataurl WHERE schema_name LIKE '""" + schema + """' AND table_name LIKE '""" + table + """';"""
|
||||||
cur.execute(sql_findurl)
|
cur.execute(sql_findurl)
|
||||||
data_url = cur.fetchall()
|
data_url = cur.fetchall()
|
||||||
sql_findcontact = """SELECT role,nom,organisation,email,telephone FROM metadata.datacontact WHERE schema_name LIKE '"""+schema+"""' AND table_name LIKE '"""+table+"""';"""
|
sql_findcontact = """SELECT role,nom,organisation,email,telephone FROM metadata.datacontact WHERE schema_name LIKE '""" + schema + """' AND table_name LIKE '""" + table + """';"""
|
||||||
cur.execute(sql_findcontact)
|
cur.execute(sql_findcontact)
|
||||||
data_contact = cur.fetchall()
|
data_contact = cur.fetchall()
|
||||||
cur.close()
|
cur.close()
|
||||||
return data_general[0],data_url,data_contact
|
return data_general[0], data_url, data_contact
|
||||||
|
|
||||||
@@ -1,62 +1,54 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from collections import namedtuple
|
# from collections import namedtuple
|
||||||
from enum import Enum
|
# from enum import Enum
|
||||||
from functools import partial
|
# from functools import partial
|
||||||
from pathlib import Path
|
# from pathlib import Path
|
||||||
from xml.dom.minidom import parseString
|
# from xml.dom.minidom import parseString
|
||||||
from qgis.gui import *
|
# from qgis.gui import *
|
||||||
from qgis.core import (
|
from qgis.core import (
|
||||||
NULL,
|
|
||||||
QgsApplication,
|
QgsApplication,
|
||||||
QgsDataSourceUri,
|
|
||||||
QgsProject,
|
|
||||||
QgsProviderConnectionException,
|
|
||||||
QgsProviderRegistry,
|
|
||||||
QgsRasterLayer,
|
|
||||||
QgsSettings,
|
QgsSettings,
|
||||||
QgsVectorLayer,
|
|
||||||
QgsGeometry,
|
QgsGeometry,
|
||||||
QgsWkbTypes,
|
QgsWkbTypes,
|
||||||
|
Qgis,
|
||||||
)
|
)
|
||||||
from PyQt5 import QtGui
|
from qgis.PyQt import QtGui, QtCore
|
||||||
from qgis.PyQt.QtCore import QLocale, QUrl, QDateTime
|
from qgis.PyQt.QtGui import QIcon
|
||||||
from qgis.PyQt.QtGui import QDesktopServices, QIcon
|
# from qgis.PyQt.QtPrintSupport import QPrinter
|
||||||
from qgis.PyQt.QtPrintSupport import QPrinter
|
# from qgis.PyQt.QtWebKitWidgets import QWebPage
|
||||||
from qgis.PyQt.QtWebKitWidgets import QWebPage
|
import psycopg2
|
||||||
from qgis.PyQt.QtWidgets import (
|
from qgis.PyQt.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QAction,
|
|
||||||
QDockWidget,
|
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
QInputDialog,
|
|
||||||
QMenu,
|
|
||||||
QToolButton,
|
|
||||||
QTableWidget,
|
|
||||||
QTableWidgetItem,
|
QTableWidgetItem,
|
||||||
)
|
)
|
||||||
from qgis.utils import iface
|
from qgis.utils import iface
|
||||||
|
|
||||||
|
try:
|
||||||
|
from .tools.PythonSQL import login_base
|
||||||
|
except ValueError:
|
||||||
|
print('Pas de fichier PythonSQL')
|
||||||
|
|
||||||
from .tools.resources import (
|
from .tools.resources import (
|
||||||
load_ui,
|
load_ui,
|
||||||
resources_path,
|
resources_path,
|
||||||
login_base,
|
# send_issues,
|
||||||
send_issues,
|
|
||||||
)
|
)
|
||||||
from .issues import CenRa_Issues
|
# from .issues import CenRa_Issues
|
||||||
|
|
||||||
EDITOR_CLASS = load_ui('CenRa_Metabase_editorwidget_base.ui')
|
EDITOR_CLASS = load_ui('CenRa_Metabase_editorwidget_base.ui')
|
||||||
LOGGER = logging.getLogger('CenRa_Metabase')
|
LOGGEr = logging.getLogger('CenRa_Metabase')
|
||||||
|
|
||||||
|
|
||||||
class Metabase_Editor(QDialog, EDITOR_CLASS):
|
class Metabase_Editor(QDialog, EDITOR_CLASS):
|
||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
_ = parent
|
_ = parent
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.settings = QgsSettings()
|
self.settings = QgsSettings()
|
||||||
self.setWindowIcon(QtGui.QIcon(resources_path('icons','icon.png')))
|
self.setWindowIcon(QtGui.QIcon(resources_path('icons', 'icon.png')))
|
||||||
self.import_xml.setAutoRaise(True)
|
self.import_xml.setAutoRaise(True)
|
||||||
self.import_xml.setText('')
|
self.import_xml.setText('')
|
||||||
self.import_xml.setIcon(QIcon(QgsApplication.iconPath('mActionAddHtml.svg')))
|
self.import_xml.setIcon(QIcon(QgsApplication.iconPath('mActionAddHtml.svg')))
|
||||||
@@ -64,7 +56,13 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.issues_app.setAutoRaise(True)
|
self.issues_app.setAutoRaise(True)
|
||||||
self.issues_app.setText('')
|
self.issues_app.setText('')
|
||||||
self.issues_app.setIcon(QIcon(QgsApplication.iconPath('mIconInfo.svg')))
|
self.issues_app.setIcon(QIcon(QgsApplication.iconPath('mIconInfo.svg')))
|
||||||
self.issues_app.clicked.connect(self.issues_open)
|
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_select_view.itemDoubleClicked.connect(self.add_categories_view)
|
||||||
self.categories_view.itemDoubleClicked.connect(self.deleter_categories_view)
|
self.categories_view.itemDoubleClicked.connect(self.deleter_categories_view)
|
||||||
self.themes_select_view.itemDoubleClicked.connect(self.add_themes_view)
|
self.themes_select_view.itemDoubleClicked.connect(self.add_themes_view)
|
||||||
@@ -78,6 +76,21 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.delete_lien_button.clicked.connect(self.delete_lien)
|
self.delete_lien_button.clicked.connect(self.delete_lien)
|
||||||
self.delete_contact_button.clicked.connect(self.delete_contact)
|
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):
|
def add_metadata(self):
|
||||||
table_name = layer.dataProvider().uri().table()
|
table_name = layer.dataProvider().uri().table()
|
||||||
schema_name = layer.dataProvider().uri().schema()
|
schema_name = layer.dataProvider().uri().schema()
|
||||||
@@ -93,19 +106,19 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
array_categories = '{'
|
array_categories = '{'
|
||||||
while row_count_categories >= row:
|
while row_count_categories >= row:
|
||||||
if row_count_categories != row:
|
if row_count_categories != row:
|
||||||
array_categories += (self.categories_view.item(row-1,0).text())+','
|
array_categories += (self.categories_view.item(row - 1, 0).text()) + ', '
|
||||||
else:
|
else:
|
||||||
array_categories += (self.categories_view.item(row-1,0).text())
|
array_categories += (self.categories_view.item(row - 1, 0).text())
|
||||||
row = row+1
|
row = row + 1
|
||||||
array_categories += '}'
|
array_categories += '}'
|
||||||
row = 1
|
row = 1
|
||||||
array_themes = '{'
|
array_themes = '{'
|
||||||
while row_count_themes >= row:
|
while row_count_themes >= row:
|
||||||
if row_count_themes != row:
|
if row_count_themes != row:
|
||||||
array_themes += (self.themes_view.item(row-1,0).text())+','
|
array_themes += (self.themes_view.item(row - 1, 0).text()) + ', '
|
||||||
else:
|
else:
|
||||||
array_themes += (self.themes_view.item(row-1,0).text())
|
array_themes += (self.themes_view.item(row - 1, 0).text())
|
||||||
row = row+1
|
row = row + 1
|
||||||
array_themes += '}'
|
array_themes += '}'
|
||||||
|
|
||||||
text_date_creation = str(self.date_creation_date.date().toPyDate())
|
text_date_creation = str(self.date_creation_date.date().toPyDate())
|
||||||
@@ -138,65 +151,65 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
array_link = ''
|
array_link = ''
|
||||||
while row_count_link >= row:
|
while row_count_link >= row:
|
||||||
if row_count_link != row:
|
if row_count_link != row:
|
||||||
array_link += "('"+ table_name +"','"+ schema_name +"','"+ (self.table_lien.item(row-1,1).text()) +"','"+ (self.table_lien.item(row-1,2).text()) +"','"+ (self.table_lien.item(row-1,3).text()) +"','"+ (self.table_lien.item(row-1,4).text()) +"','"+ (self.table_lien.item(row-1,5).text()) +"')"+','
|
array_link += "('" + table_name + "', '" + schema_name + "', '" + (self.table_lien.item(row - 1,1).text()) + "', '" + (self.table_lien.item(row - 1,2).text()) + "', '" + (self.table_lien.item(row - 1,3).text()) + "', '" + (self.table_lien.item(row - 1,4).text()) + "', '" + (self.table_lien.item(row - 1,5).text()) + "')" + ', '
|
||||||
else:
|
else:
|
||||||
array_link += "('"+ table_name +"','"+ schema_name +"','"+ (self.table_lien.item(row-1,1).text()) +"','"+ (self.table_lien.item(row-1,2).text()) +"','"+ (self.table_lien.item(row-1,3).text()) +"','"+ (self.table_lien.item(row-1,4).text()) +"','"+ (self.table_lien.item(row-1,5).text()) +"')"
|
array_link += "('" + table_name + "', '" + schema_name + "', '" + (self.table_lien.item(row - 1,1).text()) + "', '" + (self.table_lien.item(row - 1,2).text()) + "', '" + (self.table_lien.item(row - 1,3).text()) + "', '" + (self.table_lien.item(row - 1,4).text()) + "', '" + (self.table_lien.item(row - 1,5).text()) + "')"
|
||||||
row = row+1
|
row = row + 1
|
||||||
|
|
||||||
row_count_contact = self.table_contact.rowCount()
|
row_count_contact = self.table_contact.rowCount()
|
||||||
row = 1
|
row = 1
|
||||||
array_contact = ''
|
array_contact = ''
|
||||||
while row_count_contact >= row:
|
while row_count_contact >= row:
|
||||||
if row_count_contact != row:
|
if row_count_contact != row:
|
||||||
array_contact += "('"+ table_name +"','"+ schema_name +"','"+ (self.table_contact.item(row-1,1).text()) +"','"+ (self.table_contact.item(row-1,2).text()) +"','"+ (self.table_contact.item(row-1,3).text()) +"','"+ (self.table_contact.item(row-1,4).text()) +"','"+ (self.table_contact.item(row-1,5).text()) +"')"+','
|
array_contact += "('" + table_name + "', '" + schema_name + "', '" + (self.table_contact.item(row - 1,1).text()) + "', '" + (self.table_contact.item(row - 1,2).text()) + "', '" + (self.table_contact.item(row - 1,3).text()) + "', '" + (self.table_contact.item(row - 1,4).text()) + "', '" + (self.table_contact.item(row - 1,5).text()) + "')" + ', '
|
||||||
else:
|
else:
|
||||||
array_contact += "('"+ table_name +"','"+ schema_name +"','"+ (self.table_contact.item(row-1,1).text()) +"','"+ (self.table_contact.item(row-1,2).text()) +"','"+ (self.table_contact.item(row-1,3).text()) +"','"+ (self.table_contact.item(row-1,4).text()) +"','"+ (self.table_contact.item(row-1,5).text()) +"')"
|
array_contact += "('" + table_name + "', '" + schema_name + "', '" + (self.table_contact.item(row - 1,1).text()) + "', '" + (self.table_contact.item(row - 1,2).text()) + "', '" + (self.table_contact.item(row - 1,3).text()) + "', '" + (self.table_contact.item(row - 1,4).text()) + "', '" + (self.table_contact.item(row - 1,5).text()) + "')"
|
||||||
row = row+1
|
row = row + 1
|
||||||
'''
|
'''
|
||||||
|
|
||||||
exist=self.status_metadata(layer)
|
exist = self.status_metadata(layer)
|
||||||
cur_con=login_base(take=True)
|
cur_con = login_base(take=True)
|
||||||
cur=cur_con[0]
|
cur = cur_con[0]
|
||||||
con=cur_con[1]
|
con = cur_con[1]
|
||||||
list_champs_sql = ''
|
list_champs_sql = ''
|
||||||
values_sql_add = ''
|
values_sql_add = ''
|
||||||
if exist:
|
if exist:
|
||||||
SQL_uid = """SELECT uid from metadata.dataset where table_name like '"""+table_name+"""' and schema_name like '"""+schema_name+"""';"""
|
SQL_uid = """SELECT uid from metadata.dataset where table_name like '""" + table_name + """' and schema_name like '""" + schema_name + """';"""
|
||||||
cur.execute(SQL_uid)
|
cur.execute(SQL_uid)
|
||||||
text_uid = (cur.fetchall())[0][0]
|
text_uid = (cur.fetchall())[0][0]
|
||||||
|
|
||||||
SQL_delete = """DELETE from metadata.dataset where table_name like '"""+table_name+"""' and schema_name like '"""+schema_name+"""';"""
|
SQL_delete = """DELETE from metadata.dataset where table_name like '""" + table_name + """' and schema_name like '""" + schema_name + """';"""
|
||||||
cur.execute(SQL_delete)
|
cur.execute(SQL_delete)
|
||||||
values_sql_add += "'"+text_uid+"',"
|
values_sql_add += "'" + text_uid + "',"
|
||||||
|
|
||||||
list_champs_sql+='uid,'
|
list_champs_sql += 'uid,'
|
||||||
global uid_delete_list_link,uid_delete_list_contact
|
global uid_delete_list_link, uid_delete_list_contact
|
||||||
if len(uid_delete_list_link) >= 35:
|
if len(uid_delete_list_link) >= 35:
|
||||||
SQL_delete_link = """DELETE FROM metadata.dataurl WHERE uid IN ("""+ uid_delete_list_link[:-1] +""");"""
|
SQL_delete_link = """DELETE FROM metadata.dataurl WHERE uid IN (""" + uid_delete_list_link[:- 1] + """);"""
|
||||||
cur.execute(SQL_delete_link)
|
cur.execute(SQL_delete_link)
|
||||||
uid_delete_list_link = ''
|
uid_delete_list_link = ''
|
||||||
if len(uid_delete_list_contact) >= 35:
|
if len(uid_delete_list_contact) >= 35:
|
||||||
SQL_delete_contact = """DELETE FROM metadata.datacontact WHERE uid IN ("""+ uid_delete_list_contact[:-1] +""");"""
|
SQL_delete_contact = """DELETE FROM metadata.datacontact WHERE uid IN (""" + uid_delete_list_contact[:- 1] + """);"""
|
||||||
cur.execute(SQL_delete_contact)
|
cur.execute(SQL_delete_contact)
|
||||||
uid_delete_list_contact=''
|
uid_delete_list_contact = ''
|
||||||
|
|
||||||
list_champs_sql += 'table_name,schema_name,title,abstract,keywords,data_last_update,langue,categories,themes,creation_date,update_date,encode,geom,spatial_extent,feature_count,geometry_type,projection_name,projection_authid,spatial_level,minimum_optimal_scale,maximum_optimal_scale,publication_date,publication_frequency,confidentiality,license,license_attribution'
|
list_champs_sql += 'table_name, schema_name, title, abstract, keywords, data_last_update, langue, categories, themes, creation_date, update_date, encode, geom, spatial_extent, feature_count, geometry_type, projection_name, projection_authid, spatial_level, minimum_optimal_scale, maximum_optimal_scale, publication_date, publication_frequency, confidentiality, license, license_attribution'
|
||||||
values_sql_add += "'"+table_name+"','"+schema_name+"','"+text_titre+"','"+text_description+"','"+text_mots_cles+"','"+text_date_maj+"','"+text_langue+"','"+array_categories+"','"+array_themes+"','"+text_date_creation+"','"+text_date_modification+"','"+text_encode+"','"+text_extend+"','"+text_extend+"','"+int_nbr_entites+"','"+text_geomtype+"','"+text_crsname+"','"+text_crscode+"','"+text_niveau+"',"+text_echelle_min+","+text_echelle_max+",'"+text_date_publication+"','"+text_frequence+"','"+text_restriction+"','"+text_licence+"','"+text_licence_attrib+"'"
|
values_sql_add += "'" + table_name + "', '" + schema_name + "', '" + text_titre + "', '" + text_description + "', '" + text_mots_cles + "', '" + text_date_maj + "', '" + text_langue + "', '" + array_categories + "', '" + array_themes + "', '" + text_date_creation + "', '" + text_date_modification + "', '" + text_encode + "', '" + text_extend + "', '" + text_extend + "', '" + int_nbr_entites + "', '" + text_geomtype + "', '" + text_crsname + "', '" + text_crscode + "', '" + text_niveau + "'," + text_echelle_min + "," + text_echelle_max + ",'" + text_date_publication + "', '" + text_frequence + "', '" + text_restriction + "', '" + text_licence + "', '" + text_licence_attrib + "'"
|
||||||
|
|
||||||
SQL_add = """INSERT INTO metadata.dataset ("""+list_champs_sql+""") VALUES ("""+values_sql_add+""");"""
|
SQL_add = """INSERT INTO metadata.dataset (""" + list_champs_sql + """) VALUES (""" + values_sql_add + """);"""
|
||||||
|
|
||||||
cur.execute(SQL_add)
|
cur.execute(SQL_add)
|
||||||
|
|
||||||
global array_link,array_contact
|
global array_link, array_contact
|
||||||
if len(array_link) >= 25:
|
if len(array_link) >= 25:
|
||||||
array_link=array_link[:-1]
|
array_link = array_link[:- 1]
|
||||||
SQL_add_link = """INSERT INTO metadata.dataurl (table_name,schema_name,type,url,mime,format,taille) VALUES """+array_link+""";"""
|
SQL_add_link = """INSERT INTO metadata.dataurl (table_name, schema_name, type, url, mime, format, taille) VALUES """ + array_link + """;"""
|
||||||
cur.execute(SQL_add_link)
|
cur.execute(SQL_add_link)
|
||||||
array_link = ''
|
array_link = ''
|
||||||
|
|
||||||
if len(array_contact) >= 25:
|
if len(array_contact) >= 25:
|
||||||
array_contact=array_contact[0:-1]
|
array_contact = array_contact[0:- 1]
|
||||||
SQL_add_contact = """INSERT INTO metadata.datacontact (table_name,schema_name,role,nom,organisation,email,telephone) VALUES """+array_contact+""";"""
|
SQL_add_contact = """INSERT INTO metadata.datacontact (table_name, schema_name, role, nom, organisation, email, telephone) VALUES """ + array_contact + """;"""
|
||||||
cur.execute(SQL_add_contact)
|
cur.execute(SQL_add_contact)
|
||||||
array_contact = ''
|
array_contact = ''
|
||||||
|
|
||||||
@@ -211,28 +224,28 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
global layer
|
global layer
|
||||||
layer = iface.activeLayer()
|
layer = iface.activeLayer()
|
||||||
global uid_delete_list_link,uid_delete_list_contact,array_link,array_contact
|
global uid_delete_list_link, uid_delete_list_contact, array_link, array_contact
|
||||||
uid_delete_list_link=''
|
uid_delete_list_link = ''
|
||||||
uid_delete_list_contact=''
|
uid_delete_list_contact = ''
|
||||||
array_link = ''
|
array_link = ''
|
||||||
array_contact = ''
|
array_contact = ''
|
||||||
|
|
||||||
is_ok=self.is_in_psql(layer)
|
is_ok = self.is_in_psql(layer)
|
||||||
if is_ok:
|
if is_ok:
|
||||||
exist=self.status_metadata(layer)
|
exist = self.status_metadata(layer)
|
||||||
if exist:
|
if exist:
|
||||||
self.reload_data(layer)
|
self.reload_data(layer)
|
||||||
else:
|
else:
|
||||||
self.new_data(layer)
|
self.new_data(layer)
|
||||||
else:
|
else:
|
||||||
self.close()
|
self.close()
|
||||||
iface.messageBar().pushMessage("Information :", "Cette couche n'est pas stockée dans PostgreSQL", level=Qgis.Warning, duration=30)
|
iface.messageBar().pushMessage("Information:", "Cette couche n'est pas stockée dans PostgreSQL", level=Qgis.Warning, duration=30)
|
||||||
|
|
||||||
def is_in_psql(self,layer):
|
def is_in_psql(self, layer):
|
||||||
try:
|
try:
|
||||||
uri = layer.dataProvider().uri()
|
uri = layer.dataProvider().uri()
|
||||||
except:
|
except AttributeError:
|
||||||
uri=''
|
uri = ''
|
||||||
return False
|
return False
|
||||||
if uri != '':
|
if uri != '':
|
||||||
if not uri.table():
|
if not uri.table():
|
||||||
@@ -240,13 +253,13 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def status_metadata(self,layer):
|
def status_metadata(self, layer):
|
||||||
uri = layer.dataProvider().uri()
|
uri = layer.dataProvider().uri()
|
||||||
table = uri.table()
|
table = uri.table()
|
||||||
schema = uri.schema()
|
schema = uri.schema()
|
||||||
|
|
||||||
cur=login_base()
|
cur = login_base()
|
||||||
count_sql = """ SELECT count(uid) FROM metadata.dataset WHERE table_name LIKE '"""+table+"""' AND schema_name LIKE '"""+schema+"""';"""
|
count_sql = """ SELECT count(uid) FROM metadata.dataset WHERE table_name LIKE '""" + table + """' AND schema_name LIKE '""" + schema + """';"""
|
||||||
|
|
||||||
cur.execute(count_sql)
|
cur.execute(count_sql)
|
||||||
data_count = (cur.fetchall())[0][0]
|
data_count = (cur.fetchall())[0][0]
|
||||||
@@ -256,17 +269,17 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
return False
|
return False
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
def new_data(self,layer):
|
def new_data(self, layer):
|
||||||
#print(layer.name(),'is new data')
|
# print(layer.name(),'is new data')
|
||||||
reloader=False
|
reloader = False
|
||||||
self.interface_view(layer,reloader)
|
self.interface_view(layer, reloader)
|
||||||
|
|
||||||
def reload_data(self,layer):
|
def reload_data(self, layer):
|
||||||
#print(layer.name(),'reload data')
|
# print(layer.name(),'reload data')
|
||||||
reloader=True
|
reloader = True
|
||||||
self.interface_view(layer,reloader)
|
self.interface_view(layer, reloader)
|
||||||
|
|
||||||
def interface_view(self,layer,reloader):
|
def interface_view(self, layer, reloader):
|
||||||
|
|
||||||
self.description_text.setText(None)
|
self.description_text.setText(None)
|
||||||
self.mots_cles_text.setText(None)
|
self.mots_cles_text.setText(None)
|
||||||
@@ -285,27 +298,26 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.licence_attrib_box.clear()
|
self.licence_attrib_box.clear()
|
||||||
self.restriction_box.clear()
|
self.restriction_box.clear()
|
||||||
|
|
||||||
all_list=self.fletch_ref()
|
all_list = self.fletch_ref()
|
||||||
|
|
||||||
categories_list=all_list[0]
|
categories_list = all_list[0]
|
||||||
themes_list=all_list[1]
|
themes_list = all_list[1]
|
||||||
langue_list=all_list[2]
|
langue_list = all_list[2]
|
||||||
encodage_list=all_list[3]
|
encodage_list = all_list[3]
|
||||||
frequency_list=all_list[4]
|
frequency_list = all_list[4]
|
||||||
confidentiality_list=all_list[5]
|
confidentiality_list = all_list[5]
|
||||||
license_list=all_list[6]
|
license_list = all_list[6]
|
||||||
type_list=all_list[7]
|
type_list = all_list[7]
|
||||||
mime_list=all_list[8]
|
mime_list = all_list[8]
|
||||||
format_list=all_list[9]
|
format_list = all_list[9]
|
||||||
role_list=all_list[10]
|
role_list = all_list[10]
|
||||||
organisation_list=all_list[11]
|
organisation_list = all_list[11]
|
||||||
|
|
||||||
|
# langue_box
|
||||||
#langue_box
|
|
||||||
self.langue_box.clear()
|
self.langue_box.clear()
|
||||||
self.langue_box.addItem('')
|
self.langue_box.addItem('')
|
||||||
#self.langue_box.addItem('Fr')
|
# self.langue_box.addItem('Fr')
|
||||||
#self.langue_box.addItem('En')
|
# self.langue_box.addItem('En')
|
||||||
for langue_list_data in langue_list:
|
for langue_list_data in langue_list:
|
||||||
self.langue_box.addItem(langue_list_data[0])
|
self.langue_box.addItem(langue_list_data[0])
|
||||||
|
|
||||||
@@ -315,46 +327,46 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.table_ligne.setText(layer.dataProvider().uri().table())
|
self.table_ligne.setText(layer.dataProvider().uri().table())
|
||||||
self.schema_ligne.setText(layer.dataProvider().uri().schema())
|
self.schema_ligne.setText(layer.dataProvider().uri().schema())
|
||||||
|
|
||||||
#categories_select_view
|
# categories_select_view
|
||||||
self.categories_select_view.setColumnCount(1)
|
self.categories_select_view.setColumnCount(1)
|
||||||
self.categories_select_view.setColumnWidth(0, 230)
|
self.categories_select_view.setColumnWidth(0, 230)
|
||||||
self.categories_select_view.setHorizontalHeaderLabels(['List des categories'])
|
self.categories_select_view.setHorizontalHeaderLabels(['List des categories'])
|
||||||
#categories_view
|
# categories_view
|
||||||
self.categories_view.setRowCount(0)
|
self.categories_view.setRowCount(0)
|
||||||
self.categories_view.setColumnCount(1)
|
self.categories_view.setColumnCount(1)
|
||||||
self.categories_view.setColumnWidth(0, 230)
|
self.categories_view.setColumnWidth(0, 230)
|
||||||
self.categories_view.setHorizontalHeaderLabels(['Categories'])
|
self.categories_view.setHorizontalHeaderLabels(['Categories'])
|
||||||
|
|
||||||
#themes_select_view
|
# themes_select_view
|
||||||
self.themes_select_view.setColumnCount(1)
|
self.themes_select_view.setColumnCount(1)
|
||||||
self.themes_select_view.setColumnWidth(0, 230)
|
self.themes_select_view.setColumnWidth(0, 230)
|
||||||
self.themes_select_view.setHorizontalHeaderLabels(['List des thèmes'])
|
self.themes_select_view.setHorizontalHeaderLabels(['List des thèmes'])
|
||||||
#themes_view
|
# themes_view
|
||||||
self.themes_view.setRowCount(0)
|
self.themes_view.setRowCount(0)
|
||||||
self.themes_view.setColumnCount(1)
|
self.themes_view.setColumnCount(1)
|
||||||
self.themes_view.setColumnWidth(0, 230)
|
self.themes_view.setColumnWidth(0, 230)
|
||||||
self.themes_view.setHorizontalHeaderLabels(['Thèmes'])
|
self.themes_view.setHorizontalHeaderLabels(['Thèmes'])
|
||||||
|
|
||||||
#lien_view
|
# lien_view
|
||||||
self.table_lien.setRowCount(0)
|
self.table_lien.setRowCount(0)
|
||||||
self.table_lien.setColumnCount(6)
|
self.table_lien.setColumnCount(6)
|
||||||
self.table_lien.setColumnWidth(0, 0)
|
self.table_lien.setColumnWidth(0, 0)
|
||||||
self.table_lien.setHorizontalHeaderLabels(['','Type','URL','MIME','Format','Taille'])
|
self.table_lien.setHorizontalHeaderLabels(['', 'Type', 'URL', 'MIME', 'Format', 'Taille'])
|
||||||
|
|
||||||
#contact_view
|
# contact_view
|
||||||
self.table_contact.setRowCount(0)
|
self.table_contact.setRowCount(0)
|
||||||
self.table_contact.setColumnCount(6)
|
self.table_contact.setColumnCount(6)
|
||||||
self.table_contact.setColumnWidth(0, 0)
|
self.table_contact.setColumnWidth(0, 0)
|
||||||
self.table_contact.setHorizontalHeaderLabels(['','Rôle','Nom','Organisation','Email','Telephone'])
|
self.table_contact.setHorizontalHeaderLabels(['', 'Rôle', 'Nom', 'Organisation', 'Email', 'Telephone'])
|
||||||
|
|
||||||
#print(self.date_maj_date.date().toPyDate())
|
# print(self.date_maj_date.date().toPyDate())
|
||||||
vector_extend = layer.extent()
|
vector_extend = layer.extent()
|
||||||
polygone_extend = QgsGeometry.fromRect(vector_extend).asWkt()
|
polygone_extend = QgsGeometry.fromRect(vector_extend).asWkt()
|
||||||
self.extend_plaintext.setPlainText(str(polygone_extend))
|
self.extend_plaintext.setPlainText(str(polygone_extend))
|
||||||
|
|
||||||
qgstype = str(layer.type())[10:]
|
qgstype = str(layer.type())[10:]
|
||||||
|
|
||||||
if qgstype != 'Raster' :
|
if qgstype != 'Raster':
|
||||||
count_layers = str(layer.featureCount())
|
count_layers = str(layer.featureCount())
|
||||||
geomtype = QgsWkbTypes.displayString(layer.wkbType())
|
geomtype = QgsWkbTypes.displayString(layer.wkbType())
|
||||||
elif qgstype == 'Raster':
|
elif qgstype == 'Raster':
|
||||||
@@ -363,13 +375,11 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
|
|
||||||
self.nbr_layers.setPlainText(count_layers)
|
self.nbr_layers.setPlainText(count_layers)
|
||||||
self.typegeom_plaintext.setPlainText(geomtype)
|
self.typegeom_plaintext.setPlainText(geomtype)
|
||||||
|
|
||||||
crs_name = str(layer.crs().description())
|
crs_name = str(layer.crs().description())
|
||||||
self.crsname_plaintext.setPlainText(crs_name)
|
self.crsname_plaintext.setPlainText(crs_name)
|
||||||
crs_code = str(layer.crs().authid())
|
crs_code = str(layer.crs().authid())
|
||||||
self.crscode_plaintext.setPlainText(crs_code)
|
self.crscode_plaintext.setPlainText(crs_code)
|
||||||
|
|
||||||
|
|
||||||
self.frequence_box.addItem('')
|
self.frequence_box.addItem('')
|
||||||
self.restriction_box.addItem('')
|
self.restriction_box.addItem('')
|
||||||
self.licence_box.addItem('')
|
self.licence_box.addItem('')
|
||||||
@@ -405,12 +415,12 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.organisation_box.addItem(organisation_list_data[0])
|
self.organisation_box.addItem(organisation_list_data[0])
|
||||||
|
|
||||||
if reloader:
|
if reloader:
|
||||||
sql_dataload=self.sql_info(layer.dataProvider().uri())
|
sql_dataload = self.sql_info(layer.dataProvider().uri())
|
||||||
sql_contactlink=self.sql_infoother(layer.dataProvider().uri())
|
sql_contactlink = self.sql_infoother(layer.dataProvider().uri())
|
||||||
sql_datalink=sql_contactlink[0]
|
sql_datalink = sql_contactlink[0]
|
||||||
sql_datacontact=sql_contactlink[1]
|
sql_datacontact = sql_contactlink[1]
|
||||||
|
|
||||||
#print(sql_dataload)
|
# print(sql_dataload)
|
||||||
self.titre_line.setText(sql_dataload[4])
|
self.titre_line.setText(sql_dataload[4])
|
||||||
self.date_maj_date.setDateTime(sql_dataload[23])
|
self.date_maj_date.setDateTime(sql_dataload[23])
|
||||||
self.date_publication_date.setDateTime(sql_dataload[11])
|
self.date_publication_date.setDateTime(sql_dataload[11])
|
||||||
@@ -421,38 +431,38 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.uuid_ligne.setText(sql_dataload[1])
|
self.uuid_ligne.setText(sql_dataload[1])
|
||||||
|
|
||||||
self.categories_view.setRowCount(len(sql_dataload[6]))
|
self.categories_view.setRowCount(len(sql_dataload[6]))
|
||||||
i=0
|
i = 0
|
||||||
for categorie_data in sql_dataload[6]:
|
for categorie_data in sql_dataload[6]:
|
||||||
self.categories_view.setItem(i,0,QTableWidgetItem(categorie_data))
|
self.categories_view.setItem(i, 0, QTableWidgetItem(categorie_data))
|
||||||
i=i+1
|
i = i + 1
|
||||||
self.themes_view.setRowCount(len(sql_dataload[24]))
|
self.themes_view.setRowCount(len(sql_dataload[24]))
|
||||||
i=0
|
i = 0
|
||||||
for themes_data in sql_dataload[24]:
|
for themes_data in sql_dataload[24]:
|
||||||
self.themes_view.setItem(i,0,QTableWidgetItem(themes_data))
|
self.themes_view.setItem(i, 0, QTableWidgetItem(themes_data))
|
||||||
i=i+1
|
i = i + 1
|
||||||
|
|
||||||
self.categories_select_view.setRowCount(len(categories_list)-len(sql_dataload[6]))
|
self.categories_select_view.setRowCount(len(categories_list) - len(sql_dataload[6]))
|
||||||
self.themes_select_view.setRowCount(len(themes_list)-len(sql_dataload[24]))
|
self.themes_select_view.setRowCount(len(themes_list) - len(sql_dataload[24]))
|
||||||
i=0
|
i = 0
|
||||||
for categorie_select_data in categories_list:
|
for categorie_select_data in categories_list:
|
||||||
try:
|
try:
|
||||||
in_index = sql_dataload[6].index(categorie_select_data[0])
|
in_index = sql_dataload[6].index(categorie_select_data[0])
|
||||||
in_index=False
|
in_index = False
|
||||||
except:
|
except ValueError:
|
||||||
in_index=True
|
in_index = True
|
||||||
if in_index:
|
if in_index:
|
||||||
self.categories_select_view.setItem(i,0,QTableWidgetItem(categorie_select_data[0]))
|
self.categories_select_view.setItem(i, 0, QTableWidgetItem(categorie_select_data[0]))
|
||||||
i=i+1
|
i = i + 1
|
||||||
i=0
|
i = 0
|
||||||
for themes_select_data in themes_list:
|
for themes_select_data in themes_list:
|
||||||
try:
|
try:
|
||||||
in_index = sql_dataload[24].index(themes_select_data[0])
|
in_index = sql_dataload[24].index(themes_select_data[0])
|
||||||
in_index=False
|
in_index = False
|
||||||
except:
|
except ValueError:
|
||||||
in_index=True
|
in_index = True
|
||||||
if in_index:
|
if in_index:
|
||||||
self.themes_select_view.setItem(i,0,QTableWidgetItem(themes_select_data[0]))
|
self.themes_select_view.setItem(i, 0, QTableWidgetItem(themes_select_data[0]))
|
||||||
i=i+1
|
i = i + 1
|
||||||
|
|
||||||
array_encodage_box = [self.encodage_box.itemText(i) for i in range(self.encodage_box.count())]
|
array_encodage_box = [self.encodage_box.itemText(i) for i in range(self.encodage_box.count())]
|
||||||
self.encodage_box.setCurrentIndex(array_encodage_box.index(sql_dataload[27]))
|
self.encodage_box.setCurrentIndex(array_encodage_box.index(sql_dataload[27]))
|
||||||
@@ -481,35 +491,35 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
array_licence_attrib_box = [self.licence_attrib_box.itemText(i) for i in range(self.licence_attrib_box.count())]
|
array_licence_attrib_box = [self.licence_attrib_box.itemText(i) for i in range(self.licence_attrib_box.count())]
|
||||||
self.licence_attrib_box.setCurrentIndex(array_licence_attrib_box.index(sql_dataload[25]))
|
self.licence_attrib_box.setCurrentIndex(array_licence_attrib_box.index(sql_dataload[25]))
|
||||||
|
|
||||||
c=0
|
c = 0
|
||||||
#self.table_lien.setRowCount(len(sql_datalink))
|
# self.table_lien.setRowCount(len(sql_datalink))
|
||||||
for lien_data in sql_datalink:
|
for lien_data in sql_datalink:
|
||||||
self.table_lien.insertRow(c)
|
self.table_lien.insertRow(c)
|
||||||
self.table_lien.setItem(c,0,QTableWidgetItem(lien_data[1]))
|
self.table_lien.setItem(c, 0, QTableWidgetItem(lien_data[1]))
|
||||||
self.table_lien.setItem(c,1,QTableWidgetItem(lien_data[4]))
|
self.table_lien.setItem(c, 1, QTableWidgetItem(lien_data[4]))
|
||||||
self.table_lien.setItem(c,2,QTableWidgetItem(lien_data[5]))
|
self.table_lien.setItem(c, 2, QTableWidgetItem(lien_data[5]))
|
||||||
self.table_lien.setItem(c,3,QTableWidgetItem(lien_data[6]))
|
self.table_lien.setItem(c, 3, QTableWidgetItem(lien_data[6]))
|
||||||
self.table_lien.setItem(c,4,QTableWidgetItem(lien_data[7]))
|
self.table_lien.setItem(c, 4, QTableWidgetItem(lien_data[7]))
|
||||||
self.table_lien.setItem(c,5,QTableWidgetItem(lien_data[8]))
|
self.table_lien.setItem(c, 5, QTableWidgetItem(lien_data[8]))
|
||||||
c=c+1
|
c = c + 1
|
||||||
c=0
|
c = 0
|
||||||
#self.table_contact.setRowCount(len(sql_datacontact))
|
# self.table_contact.setRowCount(len(sql_datacontact))
|
||||||
for contact_data in sql_datacontact:
|
for contact_data in sql_datacontact:
|
||||||
self.table_contact.insertRow(c)
|
self.table_contact.insertRow(c)
|
||||||
self.table_contact.setItem(c,0,QTableWidgetItem(contact_data[1]))
|
self.table_contact.setItem(c, 0, QTableWidgetItem(contact_data[1]))
|
||||||
self.table_contact.setItem(c,1,QTableWidgetItem(contact_data[4]))
|
self.table_contact.setItem(c, 1, QTableWidgetItem(contact_data[4]))
|
||||||
self.table_contact.setItem(c,2,QTableWidgetItem(contact_data[5]))
|
self.table_contact.setItem(c, 2, QTableWidgetItem(contact_data[5]))
|
||||||
self.table_contact.setItem(c,3,QTableWidgetItem(contact_data[6]))
|
self.table_contact.setItem(c, 3, QTableWidgetItem(contact_data[6]))
|
||||||
self.table_contact.setItem(c,4,QTableWidgetItem(contact_data[7]))
|
self.table_contact.setItem(c, 4, QTableWidgetItem(contact_data[7]))
|
||||||
self.table_contact.setItem(c,5,QTableWidgetItem(contact_data[8]))
|
self.table_contact.setItem(c, 5, QTableWidgetItem(contact_data[8]))
|
||||||
c=c+1
|
c = c + 1
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
#titre_line
|
# titre_line
|
||||||
self.titre_line.setText(layer.name())
|
self.titre_line.setText(layer.name())
|
||||||
self.langue_box.setCurrentIndex(1)
|
self.langue_box.setCurrentIndex(1)
|
||||||
#date_maj_date
|
# date_maj_date
|
||||||
now = QtCore.QDateTime.currentDateTime()
|
now = QtCore.QDateTime.currentDateTime()
|
||||||
self.date_maj_date.setDateTime(now)
|
self.date_maj_date.setDateTime(now)
|
||||||
self.date_creation_date.setDateTime(now)
|
self.date_creation_date.setDateTime(now)
|
||||||
@@ -517,87 +527,89 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.date_publication_date.setDateTime(now)
|
self.date_publication_date.setDateTime(now)
|
||||||
self.categories_select_view.setRowCount(len(categories_list))
|
self.categories_select_view.setRowCount(len(categories_list))
|
||||||
self.themes_select_view.setRowCount(len(themes_list))
|
self.themes_select_view.setRowCount(len(themes_list))
|
||||||
i=0
|
i = 0
|
||||||
for categorie_select_data in categories_list:
|
for categorie_select_data in categories_list:
|
||||||
self.categories_select_view.setItem(i,0,QTableWidgetItem(categorie_select_data[0]))
|
self.categories_select_view.setItem(i, 0, QTableWidgetItem(categorie_select_data[0]))
|
||||||
i=i+1
|
i = i + 1
|
||||||
i=0
|
i = 0
|
||||||
for themes_select_data in themes_list:
|
for themes_select_data in themes_list:
|
||||||
self.themes_select_view.setItem(i,0,QTableWidgetItem(themes_select_data[0]))
|
self.themes_select_view.setItem(i, 0, QTableWidgetItem(themes_select_data[0]))
|
||||||
i=i+1
|
i = i + 1
|
||||||
|
|
||||||
#print(self.langue_box.currentText())
|
# print(self.langue_box.currentText())
|
||||||
|
|
||||||
def sql_info(self,uri):
|
def sql_info(self, uri):
|
||||||
cur=login_base()
|
cur = login_base()
|
||||||
table = uri.table()
|
table = uri.table()
|
||||||
schema = uri.schema()
|
schema = uri.schema()
|
||||||
#[s for s in iface.activeLayer().source().split(" ") if "dbname" in s][0].split("'")[1]
|
# [s for s in iface.activeLayer().source().split(" ") if "dbname" in s][0].split("'")[1]
|
||||||
sql_find = """SELECT *,right(left(st_astext(geom,2),-2),-9) FROM metadata.dataset
|
sql_find = """SELECT *, right(left(st_astext(geom,2),-2),-9) FROM metadata.dataset
|
||||||
WHERE schema_name LIKE '"""+schema+"""' AND table_name LIKE '"""+table+"""';"""
|
WHERE schema_name LIKE '""" + schema + """' AND table_name LIKE '""" + table + """';"""
|
||||||
cur.execute(sql_find)
|
cur.execute(sql_find)
|
||||||
data_general = cur.fetchall()
|
data_general = cur.fetchall()
|
||||||
cur.close()
|
cur.close()
|
||||||
return data_general[0]
|
return data_general[0]
|
||||||
|
|
||||||
def sql_infoother(self,uri):
|
def sql_infoother(self, uri):
|
||||||
cur=login_base()
|
cur = login_base()
|
||||||
table = uri.table()
|
table = uri.table()
|
||||||
schema = uri.schema()
|
schema = uri.schema()
|
||||||
|
|
||||||
sql_findlink = """SELECT * FROM metadata.dataurl
|
sql_findlink = """SELECT * FROM metadata.dataurl
|
||||||
WHERE schema_name LIKE '"""+schema+"""' AND table_name LIKE '"""+table+"""';"""
|
WHERE schema_name LIKE '""" + schema + """' AND table_name LIKE '""" + table + """';"""
|
||||||
cur.execute(sql_findlink)
|
cur.execute(sql_findlink)
|
||||||
data_link = cur.fetchall()
|
data_link = cur.fetchall()
|
||||||
|
|
||||||
sql_findcontact = """SELECT * FROM metadata.datacontact
|
sql_findcontact = """SELECT * FROM metadata.datacontact
|
||||||
WHERE schema_name LIKE '"""+schema+"""' AND table_name LIKE '"""+table+"""';"""
|
WHERE schema_name LIKE '""" + schema + """' AND table_name LIKE '""" + table + """';"""
|
||||||
cur.execute(sql_findcontact)
|
cur.execute(sql_findcontact)
|
||||||
data_contact = cur.fetchall()
|
data_contact = cur.fetchall()
|
||||||
|
|
||||||
cur.close()
|
cur.close()
|
||||||
return data_link,data_contact
|
return data_link, data_contact
|
||||||
|
|
||||||
def add_categories_view(self):
|
def add_categories_view(self):
|
||||||
values_add_categories = self.categories_select_view.selectedItems()[0].text()
|
values_add_categories = self.categories_select_view.selectedItems()[0].text()
|
||||||
self.categories_select_view.removeRow(self.categories_select_view.currentRow())
|
self.categories_select_view.removeRow(self.categories_select_view.currentRow())
|
||||||
self.categories_view.insertRow(0)
|
self.categories_view.insertRow(0)
|
||||||
self.categories_view.setItem(0,0,QTableWidgetItem(values_add_categories))
|
self.categories_view.setItem(0, 0, QTableWidgetItem(values_add_categories))
|
||||||
|
|
||||||
def deleter_categories_view(self):
|
def deleter_categories_view(self):
|
||||||
values_deleter_categories = self.categories_view.selectedItems()[0].text()
|
values_deleter_categories = self.categories_view.selectedItems()[0].text()
|
||||||
self.categories_view.removeRow(self.categories_view.currentRow())
|
self.categories_view.removeRow(self.categories_view.currentRow())
|
||||||
self.categories_select_view.insertRow(0)
|
self.categories_select_view.insertRow(0)
|
||||||
self.categories_select_view.setItem(0,0,QTableWidgetItem(values_deleter_categories))
|
self.categories_select_view.setItem(0, 0, QTableWidgetItem(values_deleter_categories))
|
||||||
|
|
||||||
def add_themes_view(self):
|
def add_themes_view(self):
|
||||||
values_add_themes = self.themes_select_view.selectedItems()[0].text()
|
values_add_themes = self.themes_select_view.selectedItems()[0].text()
|
||||||
self.themes_select_view.removeRow(self.themes_select_view.currentRow())
|
self.themes_select_view.removeRow(self.themes_select_view.currentRow())
|
||||||
self.themes_view.insertRow(0)
|
self.themes_view.insertRow(0)
|
||||||
self.themes_view.setItem(0,0,QTableWidgetItem(values_add_themes))
|
self.themes_view.setItem(0, 0, QTableWidgetItem(values_add_themes))
|
||||||
|
|
||||||
def deleter_themes_view(self):
|
def deleter_themes_view(self):
|
||||||
values_deleter_themes = self.themes_view.selectedItems()[0].text()
|
values_deleter_themes = self.themes_view.selectedItems()[0].text()
|
||||||
self.themes_view.removeRow(self.themes_view.currentRow())
|
self.themes_view.removeRow(self.themes_view.currentRow())
|
||||||
self.themes_select_view.insertRow(0)
|
self.themes_select_view.insertRow(0)
|
||||||
self.themes_select_view.setItem(0,0,QTableWidgetItem(values_deleter_themes))
|
self.themes_select_view.setItem(0, 0, QTableWidgetItem(values_deleter_themes))
|
||||||
|
|
||||||
def add_lien(self):
|
def add_lien(self):
|
||||||
cur=login_base()
|
cur = login_base()
|
||||||
maxrow=self.table_lien.rowCount()
|
maxrow = self.table_lien.rowCount()
|
||||||
self.table_lien.insertRow(maxrow)
|
self.table_lien.insertRow(maxrow)
|
||||||
|
|
||||||
table = layer.dataProvider().uri().table()
|
table = layer.dataProvider().uri().table()
|
||||||
schema = layer.dataProvider().uri().schema()
|
schema = layer.dataProvider().uri().schema()
|
||||||
|
|
||||||
if self.taille_line.text() == '':
|
if self.taille_line.text() == '':
|
||||||
sql_sizefile = """SELECT pg_size_pretty(pg_total_relation_size('"""+schema+'.'+table+"""'));"""
|
sql_sizefile = """SELECT pg_size_pretty(pg_total_relation_size('""" + schema + '.' + table + """'));"""
|
||||||
try:
|
try:
|
||||||
cur.execute(sql_sizefile)
|
cur.execute(sql_sizefile)
|
||||||
boolean = True
|
boolean = True
|
||||||
|
|
||||||
except:
|
except psycopg2.errors.UndefinedTable:
|
||||||
boolean = False
|
boolean = False
|
||||||
|
|
||||||
if boolean == True:
|
if boolean is True:
|
||||||
size_file = (cur.fetchall())[0][0]
|
size_file = (cur.fetchall())[0][0]
|
||||||
else:
|
else:
|
||||||
size_file = ''
|
size_file = ''
|
||||||
@@ -605,148 +617,159 @@ class Metabase_Editor(QDialog, EDITOR_CLASS):
|
|||||||
else:
|
else:
|
||||||
size_file = self.taille_line.text()
|
size_file = self.taille_line.text()
|
||||||
|
|
||||||
self.table_lien.setItem(maxrow,0,QTableWidgetItem('new_value'))
|
self.table_lien.setItem(maxrow, 0, QTableWidgetItem('new_value'))
|
||||||
self.table_lien.setItem(maxrow,1,QTableWidgetItem(self.type_box.currentText()))
|
self.table_lien.setItem(maxrow, 1, QTableWidgetItem(self.type_box.currentText()))
|
||||||
self.table_lien.setItem(maxrow,2,QTableWidgetItem(self.url_line.text()))
|
self.table_lien.setItem(maxrow, 2, QTableWidgetItem(self.url_line.text()))
|
||||||
self.table_lien.setItem(maxrow,3,QTableWidgetItem(self.mime_box.currentText()))
|
self.table_lien.setItem(maxrow, 3, QTableWidgetItem(self.mime_box.currentText()))
|
||||||
self.table_lien.setItem(maxrow,4,QTableWidgetItem(self.format_box.currentText()))
|
self.table_lien.setItem(maxrow, 4, QTableWidgetItem(self.format_box.currentText()))
|
||||||
self.table_lien.setItem(maxrow,5,QTableWidgetItem(str(size_file)))
|
self.table_lien.setItem(maxrow, 5, QTableWidgetItem(str(size_file)))
|
||||||
|
|
||||||
global array_link
|
global array_link
|
||||||
array_link += "('"+ table +"','"+ schema +"','"+ self.type_box.currentText() +"','"+ self.url_line.text() +"','"+ self.mime_box.currentText() +"','"+ self.format_box.currentText() +"','"+ size_file +"'),"
|
array_link += "('" + table + "', '" + schema + "', '" + self.type_box.currentText() + "', '" + self.url_line.text() + "', '" + self.mime_box.currentText() + "', '" + self.format_box.currentText() + "', '" + size_file + "'),"
|
||||||
|
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
def add_contact(self):
|
def add_contact(self):
|
||||||
maxrow=self.table_contact.rowCount()
|
maxrow = self.table_contact.rowCount()
|
||||||
self.table_contact.insertRow(maxrow)
|
self.table_contact.insertRow(maxrow)
|
||||||
|
|
||||||
self.table_contact.setItem(maxrow,0,QTableWidgetItem('new_value'))
|
self.table_contact.setItem(maxrow, 0, QTableWidgetItem('new_value'))
|
||||||
self.table_contact.setItem(maxrow,1,QTableWidgetItem(self.role_box.currentText()))
|
self.table_contact.setItem(maxrow, 1, QTableWidgetItem(self.role_box.currentText()))
|
||||||
self.table_contact.setItem(maxrow,2,QTableWidgetItem(self.nom_line.text()))
|
self.table_contact.setItem(maxrow, 2, QTableWidgetItem(self.nom_line.text()))
|
||||||
self.table_contact.setItem(maxrow,3,QTableWidgetItem(self.organisation_box.currentText()))
|
self.table_contact.setItem(maxrow, 3, QTableWidgetItem(self.organisation_box.currentText()))
|
||||||
self.table_contact.setItem(maxrow,4,QTableWidgetItem(self.email_line.text()))
|
self.table_contact.setItem(maxrow, 4, QTableWidgetItem(self.email_line.text()))
|
||||||
self.table_contact.setItem(maxrow,5,QTableWidgetItem(self.telephone_line.text()))
|
self.table_contact.setItem(maxrow, 5, QTableWidgetItem(self.telephone_line.text()))
|
||||||
|
|
||||||
table = layer.dataProvider().uri().table()
|
table = layer.dataProvider().uri().table()
|
||||||
schema = layer.dataProvider().uri().schema()
|
schema = layer.dataProvider().uri().schema()
|
||||||
|
|
||||||
global array_contact
|
global array_contact
|
||||||
array_contact += "('"+ table +"','"+ schema +"','"+ self.role_box.currentText() +"','"+ self.nom_line.text() +"','"+ self.organisation_box.currentText() +"','"+ self.email_line.text() +"','"+ self.telephone_line.text() +"'),"
|
array_contact += "('" + table + "', '" + schema + "', '" + self.role_box.currentText() + "', '" + self.nom_line.text() + "', '" + self.organisation_box.currentText() + "', '" + self.email_line.text() + "', '" + self.telephone_line.text() + "'),"
|
||||||
|
|
||||||
def delete_lien(self):
|
def delete_lien(self):
|
||||||
|
fin = ''
|
||||||
global uid_delete_list_link,array_link
|
global uid_delete_list_link, array_link
|
||||||
lien_uid = self.table_lien.item(self.table_lien.currentRow(),0).text()
|
try:
|
||||||
|
lien_uid = self.table_lien.item(self.table_lien.currentRow(), 0).text()
|
||||||
|
except AttributeError:
|
||||||
|
lien_uid = True
|
||||||
self.table_lien.removeRow(self.table_lien.currentRow())
|
self.table_lien.removeRow(self.table_lien.currentRow())
|
||||||
if lien_uid == 'new_value':
|
if lien_uid == 'new_value':
|
||||||
position = self.table_lien.currentRow()
|
position = self.table_lien.currentRow()
|
||||||
if position < 0:
|
if position < 0:
|
||||||
position=position+1
|
position = position + 1
|
||||||
run_x = 0
|
run_x = 0
|
||||||
while position >= run_x:
|
while position >= run_x:
|
||||||
#print(position,run_x)
|
# print(position, run_x)
|
||||||
if run_x == 0:
|
if run_x == 0:
|
||||||
debut = array_link.find("(")
|
debut = array_link.find("(")
|
||||||
else:
|
else:
|
||||||
debut = array_link.find("(",fin+1)
|
debut = array_link.find("(", fin + 1)
|
||||||
fin = array_link.find(")",debut)
|
fin = array_link.find(")", debut)
|
||||||
#print(debut,fin)
|
# print(debut, fin)
|
||||||
if run_x == 50:
|
if run_x == 50:
|
||||||
break
|
break
|
||||||
run_x+=1
|
run_x += 1
|
||||||
#print(array_link[fin+1:])
|
# print(array_link[fin + 1:])
|
||||||
if debut <= 0:
|
if debut <= 0:
|
||||||
debut = 1
|
debut = 1
|
||||||
fin+= 1
|
fin += 1
|
||||||
array_link = array_link[:debut-1]+array_link[fin+1:]
|
array_link = array_link[:debut - 1] + array_link[fin + 1:]
|
||||||
#print('a:',array_link)
|
# print('a:', array_link)
|
||||||
|
elif lien_uid is True:
|
||||||
|
print('Pas de ligne "Lien"')
|
||||||
else:
|
else:
|
||||||
uid_delete_list_link += "'"+lien_uid+"',"
|
uid_delete_list_link += "'" + lien_uid + "',"
|
||||||
|
|
||||||
def delete_contact(self):
|
def delete_contact(self):
|
||||||
global uid_delete_list_contact,array_contact
|
fin = ''
|
||||||
contact_uid = self.table_contact.item(self.table_contact.currentRow(),0).text()
|
global uid_delete_list_contact, array_contact
|
||||||
|
try:
|
||||||
|
contact_uid = self.table_contact.item(self.table_contact.currentRow(), 0).text()
|
||||||
|
except AttributeError:
|
||||||
|
contact_uid = True
|
||||||
self.table_contact.removeRow(self.table_contact.currentRow())
|
self.table_contact.removeRow(self.table_contact.currentRow())
|
||||||
if contact_uid == 'new_value':
|
if contact_uid == 'new_value':
|
||||||
position = self.table_contact.currentRow()
|
position = self.table_contact.currentRow()
|
||||||
if position < 0:
|
if position < 0:
|
||||||
position=position+1
|
position = position + 1
|
||||||
#print('p:',position)
|
# print('p:', position)
|
||||||
run_x = 0
|
run_x = 0
|
||||||
while position >= run_x:
|
while position >= run_x:
|
||||||
if run_x == 0:
|
if run_x == 0:
|
||||||
debut = array_contact.find("(")
|
debut = array_contact.find("(")
|
||||||
else:
|
else:
|
||||||
debut = array_contact.find("(",fin+1)
|
debut = array_contact.find("(", fin + 1)
|
||||||
fin = array_contact.find(")",debut)
|
fin = array_contact.find(")", debut)
|
||||||
#print(debut,fin)
|
# print(debut, fin)
|
||||||
if run_x == 50:
|
if run_x == 50:
|
||||||
break
|
break
|
||||||
run_x+=1
|
run_x += 1
|
||||||
#print(array_contact[fin+1:])
|
# print(array_contact[fin + 1:])
|
||||||
if debut <= 0:
|
if debut <= 0:
|
||||||
debut = 1
|
debut = 1
|
||||||
fin+= 1
|
fin += 1
|
||||||
array_contact = array_contact[:debut-1]+array_contact[fin+1:]
|
array_contact = array_contact[:debut - 1] + array_contact[fin + 1:]
|
||||||
#print('a:',array_contact)
|
# print('a:', array_contact)
|
||||||
|
elif contact_uid is True:
|
||||||
|
print('Pas de ligne "Contact"')
|
||||||
else:
|
else:
|
||||||
uid_delete_list_contact += "'"+contact_uid+"',"
|
uid_delete_list_contact += "'" + contact_uid + "',"
|
||||||
|
|
||||||
|
|
||||||
def fletch_ref(self):
|
def fletch_ref(self):
|
||||||
cur=login_base()
|
cur = login_base()
|
||||||
|
|
||||||
SQL_categories="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.categories' ORDER BY code,item_order;"""
|
SQL_categories = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.categories' ORDER BY code, item_order;"""
|
||||||
SQL_themes="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.themes' ORDER BY label_fr;"""
|
SQL_themes = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.themes' ORDER BY label_fr;"""
|
||||||
SQL_langue="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.langue';"""
|
SQL_langue = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.langue';"""
|
||||||
SQL_encodage="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.encodage';"""
|
SQL_encodage = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.encodage';"""
|
||||||
SQL_frequency="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.publication_frequency' ORDER BY label_fr;"""
|
SQL_frequency = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.publication_frequency' ORDER BY label_fr;"""
|
||||||
SQL_confidentiality="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.confidentiality' ORDER BY label_fr;"""
|
SQL_confidentiality = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.confidentiality' ORDER BY label_fr;"""
|
||||||
SQL_license="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.license' ORDER BY label_fr;"""
|
SQL_license = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'dataset.license' ORDER BY label_fr;"""
|
||||||
SQL_type="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'link.type' ORDER BY label_fr;"""
|
SQL_type = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'link.type' ORDER BY label_fr;"""
|
||||||
SQL_mime="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'link.mime' ORDER BY label_fr;"""
|
SQL_mime = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'link.mime' ORDER BY label_fr;"""
|
||||||
SQL_format="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'link.format' ORDER BY label_fr;"""
|
SQL_format = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'link.format' ORDER BY label_fr;"""
|
||||||
SQL_role="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'contact.contact_role' ORDER BY label_fr;"""
|
SQL_role = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'contact.contact_role' ORDER BY label_fr;"""
|
||||||
SQL_organisation="""SELECT label_fr FROM metadata.glossary WHERE field LIKE 'contact.organisation' ORDER BY label_fr;"""
|
SQL_organisation = """SELECT label_fr FROM metadata.glossary WHERE field LIKE 'contact.organisation' ORDER BY label_fr;"""
|
||||||
|
|
||||||
cur.execute(SQL_categories)
|
cur.execute(SQL_categories)
|
||||||
categories_list=cur.fetchall()
|
categories_list = cur.fetchall()
|
||||||
cur.execute(SQL_themes)
|
cur.execute(SQL_themes)
|
||||||
themes_list=cur.fetchall()
|
themes_list = cur.fetchall()
|
||||||
cur.execute(SQL_langue)
|
cur.execute(SQL_langue)
|
||||||
langue_list=cur.fetchall()
|
langue_list = cur.fetchall()
|
||||||
cur.execute(SQL_encodage)
|
cur.execute(SQL_encodage)
|
||||||
encodage_list=cur.fetchall()
|
encodage_list = cur.fetchall()
|
||||||
|
|
||||||
cur.execute(SQL_frequency)
|
cur.execute(SQL_frequency)
|
||||||
frequency_list=cur.fetchall()
|
frequency_list = cur.fetchall()
|
||||||
cur.execute(SQL_confidentiality)
|
cur.execute(SQL_confidentiality)
|
||||||
confidentiality_list=cur.fetchall()
|
confidentiality_list = cur.fetchall()
|
||||||
cur.execute(SQL_license)
|
cur.execute(SQL_license)
|
||||||
license_list=cur.fetchall()
|
license_list = cur.fetchall()
|
||||||
|
|
||||||
cur.execute(SQL_type)
|
cur.execute(SQL_type)
|
||||||
type_list=cur.fetchall()
|
type_list = cur.fetchall()
|
||||||
cur.execute(SQL_mime)
|
cur.execute(SQL_mime)
|
||||||
mime_list=cur.fetchall()
|
mime_list = cur.fetchall()
|
||||||
cur.execute(SQL_format)
|
cur.execute(SQL_format)
|
||||||
format_list=cur.fetchall()
|
format_list = cur.fetchall()
|
||||||
cur.execute(SQL_role)
|
cur.execute(SQL_role)
|
||||||
role_list=cur.fetchall()
|
role_list = cur.fetchall()
|
||||||
cur.execute(SQL_organisation)
|
cur.execute(SQL_organisation)
|
||||||
organisation_list=cur.fetchall()
|
organisation_list = cur.fetchall()
|
||||||
|
|
||||||
return categories_list,themes_list,langue_list,encodage_list,frequency_list,confidentiality_list,license_list,type_list,mime_list,format_list,role_list,organisation_list
|
return categories_list, themes_list, langue_list, encodage_list, frequency_list, confidentiality_list, license_list, type_list, mime_list, format_list, role_list, organisation_list
|
||||||
|
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
def py_import_xml(self):
|
def py_import_xml(self):
|
||||||
folder = QFileDialog.getOpenFileName()
|
folder = QFileDialog.getOpenFileName()
|
||||||
if folder:
|
if folder:
|
||||||
folder=folder[0]
|
folder = folder[0]
|
||||||
if folder[len(folder)-4:] == '.xml' :
|
if folder[len(folder) - 4:] == '.xml':
|
||||||
print('is .xml')
|
print('is .xml')
|
||||||
def issues_open(self):
|
|
||||||
self.issues = CenRa_Issues()
|
# def issues_open(self):
|
||||||
self.issues.show()
|
# self.issues = CenRa_Issues()
|
||||||
|
# self.issues.show()
|
||||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -5,8 +5,9 @@
|
|||||||
[general]
|
[general]
|
||||||
name=CenRa_Metabase
|
name=CenRa_Metabase
|
||||||
qgisMinimumVersion=3.0
|
qgisMinimumVersion=3.0
|
||||||
|
supportsQt6=True
|
||||||
description=CenRa_METABASE
|
description=CenRa_METABASE
|
||||||
version=1.3
|
version=0.3.1
|
||||||
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
|
||||||
email=si_besoin@cen-rhonealpes.fr
|
email=si_besoin@cen-rhonealpes.fr
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ tracker=https://gitea.cenra-outils.org/api/v1/repos/CEN-RA/Plugin_QGIS/issues
|
|||||||
|
|
||||||
hasProcessingProvider=no
|
hasProcessingProvider=no
|
||||||
# Uncomment the following line and add your changelog:
|
# Uncomment the following line and add your changelog:
|
||||||
changelog=<h2>CenRa_Metabase:</h2></br><p><h3>08/10/2024 - Version 1.3: </h3> - Lecture de métadonnée des flux WMS/WFS.</p></br><p><h3>07/10/2024 - Version 1.2: </h3> - Correctif de bug.</p></br><p><h3>03/10/2024 - Version 1.1: </h3> - Remonte la fênetre dans la pille.</p></br><p><h3>26/08/2024 - Version 1.0: </h3> - Lancement du plugin CenRa_Metabase </p></br>
|
changelog=<h2>CenRa_METABASE:</h2></br><p><h3>30/07/2025 - Version 0.3.1: </h3> - Correctife de bug.</p></br><p><h3>19/05/2025 - Version 0.3.0: </h3> - Compatible PyQt5 et PyQt6</p></br><p><h3>09/04/2025 - Version 0.2.3: </h3> - Correctif bug en TT.</p></br><p><h3>09/04/2025 - Version 0.2.2: </h3> - Optimisation pour le TT.</p></br><p><h3>03/04/2025 - Version 0.2.1: </h3> - Mise a jour de securite.</p></br><p><h3>07/01/2025 - Version 0.2.0: </h3> - Deployment sur serveur SIG.</p></br><p><h3>07/01/2025 - Version 0.1.6: </h3> - ByPass du certif ssl ci erreur</p></br><p><h3>19/12/2024 - Version 0.1.5: </h3> - Fix les problem de lenteur qu'en la base est down.</p></br><p><h3>12/12/2024 - Version 0.1.4: </h3> - Crash Fix .</p></br><p><h3>08/10/2024 - Version 0.1.3: </h3> - Lecture de métadonnée des flux WMS/WFS.</p></br><p><h3>07/10/2024 - Version 0.1.2: </h3> - Correctif de bug.</p></br><p><h3>03/10/2024 - Version 0.1.1: </h3> - Remonte la fênetre dans la pille.</p></br><p><h3>26/08/2024 - Version 0.1.0: </h3> - Lancement du plugin CenRa_Metabase </p>
|
||||||
|
|
||||||
# Tags are comma separated with spaces allowed
|
# Tags are comma separated with spaces allowed
|
||||||
tags=python
|
tags=python
|
||||||