Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c809c12c9f | ||
|
|
bc538524fb | ||
|
|
23f21a4c39 | ||
|
|
2b00cf9106 | ||
|
|
ad49b80b5a |
@@ -4,7 +4,7 @@ import configparser
|
|||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import base64
|
import base64
|
||||||
import socket
|
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
|
||||||
@@ -109,14 +109,9 @@ def load_ui(*args):
|
|||||||
return ui_class
|
return ui_class
|
||||||
|
|
||||||
def pyperclip():
|
def pyperclip():
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
dst = dirname(dirname(__file__))+"\\tools\\"
|
||||||
dst = abspath(abspath(join(plugin_path(), "CenRa_AUTOMAP\\tools\\")))
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/StyleLayer.py'
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\StyleLayer.py'
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\StyleLayer.py'
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\StyleLayer.py'
|
|
||||||
try:
|
try:
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
except:
|
except:
|
||||||
@@ -154,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)
|
||||||
|
|||||||
@@ -70,11 +70,7 @@ class PgCopie:
|
|||||||
self.copie_editor.triggered.connect(self.open_editor)
|
self.copie_editor.triggered.connect(self.open_editor)
|
||||||
self.copie_editor.setEnabled(False)
|
self.copie_editor.setEnabled(False)
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
IPAddr=socket.gethostbyname(socket.gethostname())
|
||||||
if IPAddr[0:11] == "100.100.100":
|
if os.access('N:/',os.R_OK):
|
||||||
self.copie_editor.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.0":
|
|
||||||
self.copie_editor.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.1":
|
|
||||||
self.copie_editor.setEnabled(True)
|
self.copie_editor.setEnabled(True)
|
||||||
|
|
||||||
def open_about_dialog(self):
|
def open_about_dialog(self):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import tempfile
|
|||||||
import base64
|
import base64
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import socket
|
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
|
||||||
@@ -90,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
|
||||||
@@ -109,14 +109,9 @@ def load_ui(*args):
|
|||||||
return ui_class
|
return ui_class
|
||||||
|
|
||||||
def pyperclip():
|
def pyperclip():
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
dst = dirname(dirname(__file__))+"\\tools\\"
|
||||||
dst = abspath(abspath(join(plugin_path(), "CenRa_Copie\\tools\\")))
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/PythonSQL.py'
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
try:
|
try:
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
except:
|
except:
|
||||||
@@ -154,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)
|
||||||
|
|||||||
@@ -70,12 +70,7 @@ class PgFlux:
|
|||||||
self.toolBar.addAction(self.flux_editor)
|
self.toolBar.addAction(self.flux_editor)
|
||||||
self.flux_editor.triggered.connect(self.open_editor)
|
self.flux_editor.triggered.connect(self.open_editor)
|
||||||
self.flux_editor.setEnabled(False)
|
self.flux_editor.setEnabled(False)
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100":
|
|
||||||
self.flux_editor.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.0":
|
|
||||||
self.flux_editor.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.1":
|
|
||||||
self.flux_editor.setEnabled(True)
|
self.flux_editor.setEnabled(True)
|
||||||
|
|
||||||
def open_about_dialog(self):
|
def open_about_dialog(self):
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ import psycopg2
|
|||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
|
global DeBUG
|
||||||
|
DeBUG = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
account = login_base('account')
|
account = login_base('account')
|
||||||
user = account[0]
|
user = account[0]
|
||||||
@@ -60,6 +63,8 @@ try:
|
|||||||
sigdb = account[5]
|
sigdb = account[5]
|
||||||
refdb = account[6]
|
refdb = account[6]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
print('')
|
print('')
|
||||||
EDITOR_CLASS = load_ui('CenRa_Flux_base.ui')
|
EDITOR_CLASS = load_ui('CenRa_Flux_base.ui')
|
||||||
@@ -211,6 +216,12 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
|||||||
self.viewer.titleChanged.connect(self.NewTitle)
|
self.viewer.titleChanged.connect(self.NewTitle)
|
||||||
layout.addWidget(self.lineEdit)
|
layout.addWidget(self.lineEdit)
|
||||||
self.viewer.hide()
|
self.viewer.hide()
|
||||||
|
self.DeBUG.addItem('')
|
||||||
|
self.DeBUG.addItem('01')
|
||||||
|
self.DeBUG.addItem('0726')
|
||||||
|
self.DeBUG.addItem('4269')
|
||||||
|
|
||||||
|
self.DeBUG.hide()
|
||||||
#self.lineEdit.mousePressEvent = self._mousePressEvent
|
#self.lineEdit.mousePressEvent = self._mousePressEvent
|
||||||
|
|
||||||
#metadonnees_plugin = open(self.plugin_path + '/metadata.txt')
|
#metadonnees_plugin = open(self.plugin_path + '/metadata.txt')
|
||||||
@@ -219,6 +230,19 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
|||||||
def raise_(self):
|
def raise_(self):
|
||||||
"""Run method that performs all the real work"""
|
"""Run method that performs all the real work"""
|
||||||
self.bd_source()
|
self.bd_source()
|
||||||
|
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):
|
def NewTitle(self):
|
||||||
if self.viewer.title() != '':
|
if self.viewer.title() != '':
|
||||||
|
|||||||
@@ -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.6
|
version=2.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
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ icon=icon.png
|
|||||||
# experimental flag
|
# experimental flag
|
||||||
experimental=False
|
experimental=False
|
||||||
|
|
||||||
changelog=<h2>CenRa_FLUX:</h2></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>
|
changelog=<h2>CenRa_FLUX:</h2></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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
import shutil
|
import shutil
|
||||||
import socket
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
from os.path import abspath, join, pardir, dirname
|
from os.path import abspath, join, pardir, dirname
|
||||||
|
|
||||||
@@ -78,14 +78,9 @@ def plugin_test_data_path(*args, copy=False):
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
def pyperclip():
|
def pyperclip():
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
dst = dirname(dirname(__file__))+"\\tools\\"
|
||||||
dst = abspath(abspath(join(plugin_path(), "CenRa_FLUX\\tools\\")))
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/PythonSQL.py'
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
try:
|
try:
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
except:
|
except:
|
||||||
@@ -149,7 +144,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)
|
||||||
|
|||||||
@@ -357,6 +357,43 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</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>
|
||||||
|
<zorder>viewer</zorder>
|
||||||
|
<zorder>commandLinkButton_2</zorder>
|
||||||
|
<zorder>pushButton_2</zorder>
|
||||||
|
<zorder>label</zorder>
|
||||||
|
<zorder>tableWidget_2</zorder>
|
||||||
|
<zorder>comboBox</zorder>
|
||||||
|
<zorder>lineEdit</zorder>
|
||||||
|
<zorder>toolButton</zorder>
|
||||||
|
<zorder>tableWidget</zorder>
|
||||||
|
<zorder>label_2</zorder>
|
||||||
|
<zorder>label_3</zorder>
|
||||||
|
<zorder>comboBox_2</zorder>
|
||||||
|
<zorder>commandLinkButton</zorder>
|
||||||
|
<zorder>checkBox</zorder>
|
||||||
|
<zorder>DeBUG</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import configparser
|
import configparser
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import socket
|
import os
|
||||||
from os.path import abspath, join, pardir, dirname
|
from os.path import abspath, join, pardir, dirname
|
||||||
from qgis.PyQt.QtWidgets import QApplication
|
from qgis.PyQt.QtWidgets import QApplication
|
||||||
from qgis.PyQt import uic
|
from qgis.PyQt import uic
|
||||||
@@ -93,14 +93,9 @@ def resources_path(*args):
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
def pyperclip():
|
def pyperclip():
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
dst = dirname(dirname(__file__))+"\\tools\\"
|
||||||
dst = abspath(abspath(join(plugin_path(), "CenRa_METABASE\\tools\\")))
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/PythonSQL.py'
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
try:
|
try:
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
except:
|
except:
|
||||||
@@ -150,7 +145,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)
|
||||||
|
|||||||
@@ -139,7 +139,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)
|
||||||
|
|||||||
@@ -80,11 +80,7 @@ class PgPostgis:
|
|||||||
self.postgis_creator.triggered.connect(self.open_creator)
|
self.postgis_creator.triggered.connect(self.open_creator)
|
||||||
|
|
||||||
self.postgis_creator.setEnabled(False)
|
self.postgis_creator.setEnabled(False)
|
||||||
if IPAddr[0:11] == "100.100.100":
|
if os.access('N:/',os.R_OK):
|
||||||
self.postgis_creator.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.0":
|
|
||||||
self.postgis_creator.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.1":
|
|
||||||
self.postgis_creator.setEnabled(True)
|
self.postgis_creator.setEnabled(True)
|
||||||
|
|
||||||
if not self.action_editor:
|
if not self.action_editor:
|
||||||
@@ -95,11 +91,7 @@ class PgPostgis:
|
|||||||
self.postgis_editor.triggered.connect(self.open_editor)
|
self.postgis_editor.triggered.connect(self.open_editor)
|
||||||
|
|
||||||
self.postgis_editor.setEnabled(False)
|
self.postgis_editor.setEnabled(False)
|
||||||
if IPAddr[0:11] == "100.100.100":
|
if os.access('N:/',os.R_OK):
|
||||||
self.postgis_editor.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.0":
|
|
||||||
self.postgis_editor.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.1":
|
|
||||||
self.postgis_editor.setEnabled(True)
|
self.postgis_editor.setEnabled(True)
|
||||||
|
|
||||||
if not self.action_rename:
|
if not self.action_rename:
|
||||||
@@ -119,11 +111,7 @@ class PgPostgis:
|
|||||||
self.postgis_rename.setVisible(0)
|
self.postgis_rename.setVisible(0)
|
||||||
|
|
||||||
self.postgis_rename.setEnabled(False)
|
self.postgis_rename.setEnabled(False)
|
||||||
if IPAddr[0:11] == "100.100.100":
|
if os.access('N:/',os.R_OK):
|
||||||
self.postgis_rename.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.0":
|
|
||||||
self.postgis_rename.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.1":
|
|
||||||
self.postgis_rename.setEnabled(True)
|
self.postgis_rename.setEnabled(True)
|
||||||
|
|
||||||
def open_about_dialog(self):
|
def open_about_dialog(self):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import tempfile
|
|||||||
import base64
|
import base64
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import socket
|
import os
|
||||||
from os.path import abspath, join, pardir, dirname
|
from os.path import abspath, join, pardir, dirname
|
||||||
from qgis.core import QgsDataSourceUri
|
from qgis.core import QgsDataSourceUri
|
||||||
from .SQLRequet import *
|
from .SQLRequet import *
|
||||||
@@ -110,14 +110,9 @@ def load_ui(*args):
|
|||||||
return ui_class
|
return ui_class
|
||||||
|
|
||||||
def pyperclip():
|
def pyperclip():
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
dst = dirname(dirname(__file__))+"\\tools\\"
|
||||||
dst = abspath(abspath(join(plugin_path(), "CenRa_POSTGIS\\tools\\")))
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/PythonSQL.py'
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
try:
|
try:
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
except:
|
except:
|
||||||
@@ -155,7 +150,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)
|
||||||
|
|||||||
@@ -104,12 +104,7 @@ class SICEN(object):
|
|||||||
QIcon(":/plugins/sicen/sicen.png"),
|
QIcon(":/plugins/sicen/sicen.png"),
|
||||||
u"Ouverture des données SICEN", self.iface.mainWindow())
|
u"Ouverture des données SICEN", self.iface.mainWindow())
|
||||||
self.action.setEnabled(False)
|
self.action.setEnabled(False)
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100":
|
|
||||||
self.action.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.0":
|
|
||||||
self.action.setEnabled(True)
|
|
||||||
elif IPAddr[0:9] == "192.168.1":
|
|
||||||
self.action.setEnabled(True)
|
self.action.setEnabled(True)
|
||||||
# connect the action to the run method
|
# connect the action to the run method
|
||||||
self.action.triggered.connect(self.ouverture)
|
self.action.triggered.connect(self.ouverture)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import configparser
|
import configparser
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import socket
|
import os
|
||||||
import base64
|
import base64
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
@@ -109,14 +109,9 @@ def load_ui(*args):
|
|||||||
return ui_class
|
return ui_class
|
||||||
|
|
||||||
def pyperclip():
|
def pyperclip():
|
||||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
dst = dirname(dirname(__file__))+"\\tools\\"
|
||||||
dst = abspath(abspath(join(plugin_path(), "CenRa_SICEN\\tools\\")))
|
if os.access('N:/',os.R_OK):
|
||||||
if IPAddr[0:11] == "100.100.100": #4269
|
src = 'N:/SI_Systeme d information/Z_QGIS/PLUGIN/PythonSQL.py'
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.0": #01
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
if IPAddr[0:9] == "192.168.1": #0726
|
|
||||||
src = '\\\\100.100.100.100\\nuage\\SI_Systeme d information\\Z_QGIS\\PLUGIN\\PythonSQL.py'
|
|
||||||
try:
|
try:
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
except:
|
except:
|
||||||
@@ -154,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)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Pour la création et le partage :heart:
|
|||||||
|Nom|Version|Statue|Date de création|
|
|Nom|Version|Statue|Date de création|
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|CenRa_AUTOMAP|1.2|Releases|2024-09-25|
|
|CenRa_AUTOMAP|1.2|Releases|2024-09-25|
|
||||||
|CenRa_COPIE|2.1|Releases|06-02-2024|
|
|CenRa_COPIE|2.2|Releases|06-02-2024|
|
||||||
|CenRa_FLUX|2.5|Releases|06-02-2024|
|
|CenRa_FLUX|2.5|Releases|06-02-2024|
|
||||||
|CenRa_METABASE|0.2.0|Alpha|12-09-2024|
|
|CenRa_METABASE|0.2.0|Alpha|12-09-2024|
|
||||||
|CenRa_PAGERENDER|0.1.5|Alpha|09-10-2024|
|
|CenRa_PAGERENDER|0.1.5|Alpha|09-10-2024|
|
||||||
|
|||||||
+3
-3
@@ -50,9 +50,9 @@
|
|||||||
<tags>cenra,sicen</tags>
|
<tags>cenra,sicen</tags>
|
||||||
</pyqgis_plugin>
|
</pyqgis_plugin>
|
||||||
|
|
||||||
<pyqgis_plugin name="CenRa_FLUX" version="2.6">
|
<pyqgis_plugin name="CenRa_FLUX" version="2.7">
|
||||||
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
|
<description>Depot pour les extensiont QGIS du CEN Rhone-Alpes, sur GitHub.</description>
|
||||||
<version>2.6</version>
|
<version>2.7</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>
|
||||||
@@ -61,7 +61,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-04-03</update_date>
|
<update_date>2025-04-07</update_date>
|
||||||
<experimental>False</experimental>
|
<experimental>False</experimental>
|
||||||
<deprecated>False</deprecated>
|
<deprecated>False</deprecated>
|
||||||
<tags>cenra,flux</tags>
|
<tags>cenra,flux</tags>
|
||||||
|
|||||||
Reference in New Issue
Block a user