diff --git a/CenRa_FLUX/FluxCEN_dialog.py b/CenRa_FLUX/FluxCEN_dialog.py new file mode 100644 index 00000000..46654106 --- /dev/null +++ b/CenRa_FLUX/FluxCEN_dialog.py @@ -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., 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) diff --git a/CenRa_FLUX/FluxCEN_dialog_base.py b/CenRa_FLUX/FluxCEN_dialog_base.py new file mode 100644 index 00000000..eb2a6f8a --- /dev/null +++ b/CenRa_FLUX/FluxCEN_dialog_base.py @@ -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_()) diff --git a/CenRa_FLUX/FluxCEN_dialog_base.ui b/CenRa_FLUX/FluxCEN_dialog_base.ui new file mode 100644 index 00000000..1e5a380a --- /dev/null +++ b/CenRa_FLUX/FluxCEN_dialog_base.ui @@ -0,0 +1,242 @@ + + + Dialog + + + + + true + + + + 0 + 0 + 910 + 800 + + + + + 910 + 800 + + + + + 910 + 800 + + + + SIG CEN-RA + + + + + 260 + 130 + 171 + 22 + + + + false + + + + + + + + + 370 + 80 + 171 + 22 + + + + false + + + + + + + + + 350 + 20 + 221 + 71 + + + + + + + :/plugins/CenRa_FLUX/logo.jpg + + + true + + + + + + 370 + 750 + 171 + 23 + + + + Charger les couches + + + + + true + + + + 30 + 170 + 850 + 281 + + + + QAbstractItemView::SingleSelection + + + true + + + + + + 30 + 550 + 850 + 181 + + + + QAbstractItemView::SingleSelection + + + + + + 400 + 470 + 61 + 61 + + + + + + + + :/plugins/CenRa_FLUX/arrow-bottom.png:/plugins/CenRa_FLUX/arrow-bottom.png + + + + 50 + 40 + + + + + + + 460 + 470 + 61 + 61 + + + + + + + + :/plugins/CenRa_FLUX/arrow-up.png:/plugins/CenRa_FLUX/arrow-up.png + + + + 50 + 40 + + + + + + true + + + + 480 + 130 + 171 + 21 + + + + Recherche par mots-clés + + + Qt::AlignCenter + + + false + + + true + + + + + + 40 + 150 + 161 + 16 + + + + + Calibri + 10 + false + + + + Liste des flux disponibles : + + + + + + 30 + 530 + 171 + 16 + + + + + Calibri + 10 + false + + + + Flux sélectionné(s) à charger : + + + + + diff --git a/CenRa_FLUX/info_metadata.png b/CenRa_FLUX/info_metadata.png new file mode 100644 index 00000000..6f51443a Binary files /dev/null and b/CenRa_FLUX/info_metadata.png differ diff --git a/CenRa_FLUX/metadata.txt b/CenRa_FLUX/metadata.txt new file mode 100644 index 00000000..c68c89df --- /dev/null +++ b/CenRa_FLUX/metadata.txt @@ -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 +