UI de Flux auto scale

This commit is contained in:
Tom LAVEILLE 2025-02-13 13:59:26 +01:00
parent e2e062ed12
commit 1a17bb7d7c
4 changed files with 317 additions and 240 deletions

View File

@ -6,7 +6,7 @@
name=CenRa_FLUX name=CenRa_FLUX
qgisMinimumVersion=3.0 qgisMinimumVersion=3.0
description=Permet d'ouvrire une table dans la base PostGis description=Permet d'ouvrire une table dans la base PostGis
version=2.3 version=2.4
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
@ -32,7 +32,7 @@ icon=icon.png
# experimental flag # experimental flag
experimental=False experimental=False
changelog=<h1>CenRA_FLUX:</h1></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> changelog=<h1>CenRA_FLUX:</h1></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

View File

@ -9,148 +9,95 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>910</width> <width>890</width>
<height>800</height> <height>810</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>910</width> <width>600</width>
<height>800</height> <height>400</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>910</width> <width>890</width>
<height>800</height> <height>810</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>SIG CEN-RA</string> <string>SIG CEN-RA</string>
</property> </property>
<widget class="QComboBox" name="comboBox"> <property name="sizeGripEnabled">
<property name="geometry">
<rect>
<x>260</x>
<y>130</y>
<width>171</width>
<height>22</height>
</rect>
</property>
<property name="editable">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="currentText"> <layout class="QGridLayout" name="gridLayout">
<string notr="true"/> <property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property> </property>
</widget> <property name="leftMargin">
<widget class="QComboBox" name="comboBox_2"> <number>0</number>
<property name="geometry">
<rect>
<x>370</x>
<y>80</y>
<width>171</width>
<height>22</height>
</rect>
</property> </property>
<property name="editable"> <property name="topMargin">
<bool>false</bool> <number>0</number>
</property> </property>
<property name="currentText"> <property name="rightMargin">
<string notr="true"/> <number>0</number>
</property> </property>
</widget> <property name="bottomMargin">
<widget class="QLabel" name="label_3"> <number>0</number>
<property name="geometry">
<rect>
<x>345</x>
<y>10</y>
<width>221</width>
<height>71</height>
</rect>
</property> </property>
<property name="text"> <property name="spacing">
<string/> <number>0</number>
</property> </property>
<property name="pixmap"> <item row="0" column="0">
<pixmap>:/plugins/CenRa_FLUX/logo.jpg</pixmap> <widget class="QScrollArea" name="scrollArea">
</property> <property name="maximumSize">
<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>
<normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</normaloff>:/plugins/CenRa_FLUX/arrow-bottom.png</iconset>
</property>
<property name="iconSize">
<size> <size>
<width>50</width> <width>890</width>
<height>40</height> <height>810</height>
</size>
</property>
<property name="inputMethodHints">
<set>Qt::ImhNoEditMenu</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> </size>
</property> </property>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton_2"> <widget class="QCommandLinkButton" name="commandLinkButton_2">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>460</x> <x>450</x>
<y>470</y> <y>470</y>
<width>61</width> <width>61</width>
<height>61</height> <height>61</height>
@ -170,13 +117,75 @@
</size> </size>
</property> </property>
</widget> </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="selectionMode">
<enum>QAbstractItemView::SingleSelection</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"> <widget class="QLineEdit" name="lineEdit">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>480</x> <x>470</x>
<y>130</y> <y>130</y>
<width>171</width> <width>171</width>
<height>21</height> <height>21</height>
@ -195,30 +204,48 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label"> <widget class="QToolButton" name="toolButton">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>40</x> <x>660</x>
<y>150</y> <y>130</y>
<width>161</width> <width>21</width>
<height>16</height> <height>21</height>
</rect> </rect>
</property> </property>
<property name="font">
<font>
<family>Calibri</family>
<pointsize>10</pointsize>
<italic>false</italic>
</font>
</property>
<property name="text"> <property name="text">
<string>Liste des flux disponibles :</string> <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="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>20</x>
<y>530</y> <y>530</y>
<width>171</width> <width>171</width>
<height>16</height> <height>16</height>
@ -235,31 +262,74 @@
<string>Flux sélectionné(s) à charger :</string> <string>Flux sélectionné(s) à charger :</string>
</property> </property>
</widget> </widget>
<widget class="QToolButton" name="toolButton"> <widget class="QLabel" name="label_3">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>670</x> <x>335</x>
<y>130</y> <y>10</y>
<width>21</width> <width>221</width>
<height>21</height> <height>71</height>
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="pixmap">
<pixmap>:/plugins/CenRa_FLUX/logo.jpg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget> </widget>
<zorder>label_3</zorder> <widget class="QComboBox" name="comboBox_2">
<zorder>comboBox</zorder> <property name="geometry">
<zorder>comboBox_2</zorder> <rect>
<zorder>pushButton_2</zorder> <x>360</x>
<zorder>tableWidget</zorder> <y>80</y>
<zorder>tableWidget_2</zorder> <width>171</width>
<zorder>commandLinkButton</zorder> <height>22</height>
<zorder>commandLinkButton_2</zorder> </rect>
<zorder>lineEdit</zorder> </property>
<zorder>label</zorder> <property name="sizePolicy">
<zorder>label_2</zorder> <sizepolicy hsizetype="Ignored" vsizetype="Ignored">
<zorder>toolButton</zorder> <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>
</widget>
</item>
</layout>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections/>

View File

@ -7,7 +7,7 @@ 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, QMessageBox from qgis.PyQt.QtWidgets import QAction, QMenu, QDialog, QMessageBox,QDialogButtonBox
from qgis.PyQt.QtGui import QIcon from qgis.PyQt.QtGui import QIcon
from PyQt5.QtCore import * from PyQt5.QtCore import *
from PyQt5.QtGui import * from PyQt5.QtGui import *
@ -64,7 +64,8 @@ class Postgis_Rename(QDialog, EDITOR_CLASS):
### Outil Ajout de nouvelles couche a un dossier ### Outil Ajout de nouvelles couche a un dossier
def raise_(self): def raise_(self):
self.activateWindow() self.activateWindow()
self.groupBox_2.hide() self.groupBox_3.hide()
self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
GET_ALL_SCHEMA = """SELECT DISTINCT table_schema FROM information_schema.tables WHERE table_schema LIKE '_form_%' OR table_schema LIKE '_01_%' OR table_schema LIKE '_07_%' OR table_schema LIKE '_26_%' OR table_schema LIKE '_42_%' OR table_schema LIKE '_69_%' ORDER BY table_schema;""" GET_ALL_SCHEMA = """SELECT DISTINCT table_schema FROM information_schema.tables WHERE table_schema LIKE '_form_%' OR table_schema LIKE '_01_%' OR table_schema LIKE '_07_%' OR table_schema LIKE '_26_%' OR table_schema LIKE '_42_%' OR table_schema LIKE '_69_%' ORDER BY table_schema;"""
cur.execute(GET_ALL_SCHEMA) cur.execute(GET_ALL_SCHEMA)
AllSchema = cur.fetchall() AllSchema = cur.fetchall()
@ -83,7 +84,13 @@ class Postgis_Rename(QDialog, EDITOR_CLASS):
def Test(self): def Test(self):
if self.schema.currentText() != '': if self.schema.currentText() != '':
allIsGood = 0
if allIsGood == 2:
self.groupBox_3.show()
self.loadValue() self.loadValue()
self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(True)
else: else:
self.old_name.setText('') self.old_name.setText('')

View File

@ -51,9 +51,9 @@
<tags>cenra,sicen</tags> <tags>cenra,sicen</tags>
</pyqgis_plugin> </pyqgis_plugin>
<pyqgis_plugin name="CenRa_FLUX" version="2.3"> <pyqgis_plugin name="CenRa_FLUX" version="2.4">
<description><![CDATA[Dépôt pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.]]></description> <description><![CDATA[Dépôt pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.]]></description>
<version>2.3</version> <version>2.4</version>
<qgis_minimum_version>3.16</qgis_minimum_version> <qgis_minimum_version>3.16</qgis_minimum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage> <homepage>https://plateformesig.cenra-outils.org/</homepage>
<file_name>CenRa_FLUX.zip</file_name> <file_name>CenRa_FLUX.zip</file_name>
@ -62,7 +62,7 @@
<download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_FLUX.zip</download_url> <download_url>https://gitea.cenra-outils.org/CEN-RA/Plugin_QGIS/releases/download/latest/CenRa_FLUX.zip</download_url>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by> <uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-02-06</create_date> <create_date>2024-02-06</create_date>
<update_date>2025-02-05</update_date> <update_date>2025-02-13</update_date>
<experimental>False</experimental> <experimental>False</experimental>
<deprecated>False</deprecated> <deprecated>False</deprecated>
<tags>cenra,flux</tags> <tags>cenra,flux</tags>