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
qgisMinimumVersion=3.0
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
email=si_besoin@cen-rhonealpes.fr
@ -32,7 +32,7 @@ icon=icon.png
# experimental flag
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=False

View File

@ -9,257 +9,327 @@
<rect>
<x>0</x>
<y>0</y>
<width>910</width>
<height>800</height>
<width>890</width>
<height>810</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>910</width>
<height>800</height>
<width>600</width>
<height>400</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>910</width>
<height>800</height>
<width>890</width>
<height>810</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 name="sizeGripEnabled">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<property name="editable">
<bool>false</bool>
<property name="leftMargin">
<number>0</number>
</property>
<property name="currentText">
<string notr="true"/>
<property name="topMargin">
<number>0</number>
</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 name="rightMargin">
<number>0</number>
</property>
<property name="editable">
<bool>false</bool>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="currentText">
<string notr="true"/>
<property name="spacing">
<number>0</number>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>345</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="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>
<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>
<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 class="QToolButton" name="toolButton">
<property name="geometry">
<rect>
<x>670</x>
<y>130</y>
<width>21</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</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>
<zorder>toolButton</zorder>
<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</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="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">
<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="selectionMode">
<enum>QAbstractItemView::SingleSelection</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>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>

View File

@ -7,7 +7,7 @@ from builtins import str
from builtins import object
import qgis
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 PyQt5.QtCore import *
from PyQt5.QtGui import *
@ -64,7 +64,8 @@ class Postgis_Rename(QDialog, EDITOR_CLASS):
### Outil Ajout de nouvelles couche a un dossier
def raise_(self):
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;"""
cur.execute(GET_ALL_SCHEMA)
AllSchema = cur.fetchall()
@ -83,7 +84,13 @@ class Postgis_Rename(QDialog, EDITOR_CLASS):
def Test(self):
if self.schema.currentText() != '':
self.loadValue()
allIsGood = 0
if allIsGood == 2:
self.groupBox_3.show()
self.loadValue()
self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(True)
else:
self.old_name.setText('')

View File

@ -51,9 +51,9 @@
<tags>cenra,sicen</tags>
</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>
<version>2.3</version>
<version>2.4</version>
<qgis_minimum_version>3.16</qgis_minimum_version>
<homepage>https://plateformesig.cenra-outils.org/</homepage>
<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>
<uploaded_by>CEN-Rhone-Alpes</uploaded_by>
<create_date>2024-02-06</create_date>
<update_date>2025-02-05</update_date>
<update_date>2025-02-13</update_date>
<experimental>False</experimental>
<deprecated>False</deprecated>
<tags>cenra,flux</tags>