Téléverser les fichiers vers "CenRa_FLUX"

This commit is contained in:
Tom LAVEILLE 2024-08-02 10:16:37 +02:00
parent 7c0188b9a5
commit b7cfeb2484
5 changed files with 579 additions and 0 deletions

View File

@ -0,0 +1,44 @@
# -*- 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)

View File

@ -0,0 +1,247 @@
# -*- 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_())

View File

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<resources>
</resources>
<widget class="QDialog" name="Dialog">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>910</width>
<height>800</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>910</width>
<height>800</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>910</width>
<height>800</height>
</size>
</property>
<property name="windowTitle">
<string>SIG CEN-RA</string>
</property>
<widget class="QComboBox" name="comboBox">
<property name="geometry">
<rect>
<x>260</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="QComboBox" name="comboBox_2">
<property name="geometry">
<rect>
<x>370</x>
<y>80</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="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>350</x>
<y>20</y>
<width>221</width>
<height>71</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="resources.qrc">:/plugins/CenRa_FLUX/logo.jpg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>370</x>
<y>750</y>
<width>171</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Charger les couches</string>
</property>
</widget>
<widget class="QTableWidget" name="tableWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>30</x>
<y>170</y>
<width>850</width>
<height>281</height>
</rect>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
<widget class="QTableWidget" name="tableWidget_2">
<property name="geometry">
<rect>
<x>30</x>
<y>550</y>
<width>850</width>
<height>181</height>
</rect>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton">
<property name="geometry">
<rect>
<x>400</x>
<y>470</y>
<width>61</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<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="QCommandLinkButton" name="commandLinkButton_2">
<property name="geometry">
<rect>
<x>460</x>
<y>470</y>
<width>61</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<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="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>480</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="QLabel" name="label">
<property name="geometry">
<rect>
<x>40</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="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>30</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>
<connections/>
</ui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

46
CenRa_FLUX/metadata.txt Normal file
View File

@ -0,0 +1,46 @@
# This file contains metadata for your plugin.
# This file should be included when you package your plugin.# Mandatory items:
[general]
name=CenRa_FLUX
qgisMinimumVersion=3.0
description=Permet d'ouvrire une table dans la base PostGis
version=1.9
author=Conservatoire d'Espaces Naturels de Rhône-Alpes
email=si_besoin@cen-rhonealpes.fr
#about=
# End of mandatory metadata
# Recommended items:
hasProcessingProvider=no
# 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=cenra, postgis, database
repository=https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS
homepage=https://plateformesig.cenra-outils.org/
tracker=https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS
category=Plugins
icon=cenra.png
# experimental flag
experimental=False
# deprecated flag (applies to the whole plugin, not just a single version)
deprecated=False
# Since QGIS 3.8, a comma separated list of plugins to be installed
# (or upgraded) can be specified.
# Check the documentation for more information.
# plugin_dependencies=
# If the plugin can run on QGIS Server.
server=False