Template
forked from CEN-RA/Plugin_QGIS
Sécurity MAJ
This commit is contained in:
@@ -12,13 +12,15 @@ import qgis
|
||||
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
import socket
|
||||
import os
|
||||
from .tools.resources import (
|
||||
plugin_path,
|
||||
pyperclip,
|
||||
resources_path,
|
||||
maj_verif,
|
||||
)
|
||||
pyperclip()
|
||||
from .flux_editor import Flux_Editor
|
||||
from .about_form import AboutDialog
|
||||
|
||||
@@ -63,9 +65,18 @@ class PgFlux:
|
||||
if not self.action_editor:
|
||||
self.action_editor = Flux_Editor()
|
||||
|
||||
|
||||
self.flux_editor = QAction(icon, 'SigCEN',None)
|
||||
self.toolBar.addAction(self.flux_editor)
|
||||
self.flux_editor.triggered.connect(self.open_editor)
|
||||
self.flux_editor.setEnabled(False)
|
||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
||||
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)
|
||||
|
||||
def open_about_dialog(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user