Commit 2f7d45c2 authored by Commandre Benjamin's avatar Commandre Benjamin
Browse files

Using qt5 instead of qt4

1 merge request!1Develop
Showing with 171 additions and 159 deletions
+171 -159
.gitignore 0 → 100644
*.pyc
\ No newline at end of file
......@@ -31,8 +31,10 @@ __date__ = "Mars 2016"
"""
import os, sys, time
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from _collections import defaultdict
try :
......@@ -40,14 +42,16 @@ try :
except :
from osgeo import ogr
try:
_fromUtf8 = QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
# try:
# _fromUtf8 = QString.fromUtf8
# except AttributeError:
def _fromUtf8(s):
return s
import webbrowser
import lxml.etree as ET
import os.path
print os.path.abspath(ET.__file__)
from ui_A_propos_PHYMOBAT_window import Ui_About
from ui_Warming_study_area import Ui_Warming_study_area
......@@ -117,7 +121,8 @@ class PHYMOBAT(QMainWindow, Processing):
##########################################
# Main folder path
self.ui.lineEdit_principal_folder.clear()
self.connect(self.ui.pushButton_browser_principal_folder, SIGNAL('clicked()'), self.f_path_folder_dpt)
# self.connect(self.ui.pushButton_browser_principal_folder, SIGNAL('clicked()'), self.f_path_folder_dpt)
self.ui.pushButton_browser_principal_folder.clicked.connect(self.f_path_folder_dpt)
# Block other function if SpotWorldHeritage is chose
try :
......@@ -127,22 +132,27 @@ class PHYMOBAT(QMainWindow, Processing):
# VHRS image path
self.ui.lineEdit_VHRS.clear()
self.connect(self.ui.pushButton_browser_VHRS, SIGNAL('clicked()'), self.f_path_ortho)
# self.connect(self.ui.pushButton_browser_VHRS, SIGNAL('clicked()'), self.f_path_ortho)
self.ui.pushButton_browser_VHRS.clicked.connect(self.f_path_ortho)
# Study area shapefile path
self.ui.lineEdit_area_path.clear()
self.connect(self.ui.pushButton_browser_area_path, SIGNAL('clicked()'), self.f_path_area)
# self.connect(self.ui.pushButton_browser_area_path, SIGNAL('clicked()'), self.f_path_area)
self.ui.pushButton_browser_area_path.clicked.connect(self.f_path_area)
# Proxy
self.connect(self.ui.proxy, SIGNAL('clicked()'), self.f_proxy)
# self.connect(self.ui.proxy, SIGNAL('clicked()'), self.f_proxy)
self.ui.proxy.clicked.connect(self.f_proxy)
# Segmentation shapefile path
self.ui.lineEdit_segmentation.clear()
self.connect(self.ui.pushButton_browser_segmentation, SIGNAL('clicked()'), self.f_path_segm)
# self.connect(self.ui.pushButton_browser_segmentation, SIGNAL('clicked()'), self.f_path_segm)
self.ui.pushButton_browser_segmentation.clicked.connect(self.f_path_segm)
# MNT image path
self.ui.lineEdit_MNT.clear()
self.connect(self.ui.pushButton_browser_MNT, SIGNAL('clicked()'), self.f_path_mnt)
# self.connect(self.ui.pushButton_browser_MNT, SIGNAL('clicked()'), self.f_path_mnt)
self.ui.pushButton_browser_MNT.clicked.connect(self.f_path_mnt)
# Output classification shapefile path
self.ui.lineEdit_output.clear()
......
......@@ -23,13 +23,13 @@
# You should have received a copy of the GNU General Public License
# along with PHYMOBAT 1.2. If not, see <http://www.gnu.org/licenses/>.
from PyQt4 import QtCore, QtGui
from PyQt5 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
# try:
# _fromUtf8 = QtCore.QString.fromUtf8
# except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
......
This diff is collapsed.
......@@ -7,13 +7,13 @@
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
from PyQt5 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
# try:
# _fromUtf8 = QtCore.QString.fromUtf8
# except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
......
......@@ -23,13 +23,13 @@
# You should have received a copy of the GNU General Public License
# along with PHYMOBAT 1.2. If not, see <http://www.gnu.org/licenses/>.
from PyQt4 import QtCore, QtGui
from PyQt5 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
# try:
# _fromUtf8 = QtCore.QString.fromUtf8
# except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
......
......@@ -23,13 +23,13 @@
# You should have received a copy of the GNU General Public License
# along with PHYMOBAT 1.2. If not, see <http://www.gnu.org/licenses/>.
from PyQt4 import QtCore, QtGui
from PyQt5 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
# try:
# _fromUtf8 = QtCore.QString.fromUtf8
# except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment