|
31 | 31 | import os.path
|
32 | 32 | from urllib2 import build_opener, install_opener, ProxyHandler
|
33 | 33 |
|
34 |
| -from PyQt4.QtCore import QSettings, Qt, SIGNAL, SLOT |
35 |
| -from PyQt4.QtGui import (QApplication, QColor, QCursor, QDialog, |
36 |
| - QDialogButtonBox, QMessageBox, QTreeWidgetItem, |
37 |
| - QWidget) |
| 34 | +from PyQt.QtCore import QSettings, Qt |
| 35 | +from PyQt.QtWidgets import QApplication, QDialog, QDialogButtonBox, QMessageBox, QTreeWidgetItem, QWidget |
| 36 | +from PyQt.QtGui import QColor, QCursor |
38 | 37 |
|
39 | 38 | from qgis.core import (QgsApplication, QgsCoordinateReferenceSystem,
|
40 | 39 | QgsCoordinateTransform, QgsGeometry, QgsPoint,
|
@@ -730,25 +729,15 @@ def add_to_ows(self):
|
730 | 729 |
|
731 | 730 | # connect dialog signals to iface slots
|
732 | 731 | if service_type == 'OGC:WMS/OGC:WMTS':
|
733 |
| - ows_provider.connect( |
734 |
| - ows_provider, |
735 |
| - SIGNAL('addRasterLayer(QString, QString, QString)'), |
736 |
| - self.iface, SLOT('addRasterLayer(QString, QString, QString)')) |
| 732 | + ows_provider.addRasterLayer.connect(self.iface.addRasterLayer) |
737 | 733 | conn_cmb = ows_provider.findChild(QWidget, 'cmbConnections')
|
738 | 734 | connect = 'on_btnConnect_clicked'
|
739 | 735 | elif service_type == 'OGC:WFS':
|
740 |
| - ows_provider.connect( |
741 |
| - ows_provider, |
742 |
| - SIGNAL('addWfsLayer(QString, QString)'), |
743 |
| - self.iface.mainWindow(), |
744 |
| - SLOT('addWfsLayer(QString, QString)')) |
| 736 | + ows_provider.addWfsLayer.connect(self.iface.mainWindow().addWfsLayer) |
745 | 737 | conn_cmb = ows_provider.findChild(QWidget, 'cmbConnections')
|
746 | 738 | connect = 'connectToServer'
|
747 | 739 | elif service_type == 'OGC:WCS':
|
748 |
| - ows_provider.connect( |
749 |
| - ows_provider, |
750 |
| - SIGNAL('addRasterLayer(QString, QString, QString)'), |
751 |
| - self.iface, SLOT('addRasterLayer(QString, QString, QString)')) |
| 740 | + ows_provider.addRasterLayer.connect(self.iface.addRasterLayer) |
752 | 741 | conn_cmb = ows_provider.findChild(QWidget, 'mConnectionsComboBox')
|
753 | 742 | connect = 'on_mConnectButton_clicked'
|
754 | 743 | ows_provider.setModal(False)
|
|
0 commit comments