mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
metasearch: switch to pyqt wrappers
This commit is contained in:
parent
885d0ec993
commit
4dc6321914
@ -31,10 +31,9 @@ import json
|
||||
import os.path
|
||||
from urllib2 import build_opener, install_opener, ProxyHandler
|
||||
|
||||
from PyQt4.QtCore import QSettings, Qt, SIGNAL, SLOT
|
||||
from PyQt4.QtGui import (QApplication, QColor, QCursor, QDialog,
|
||||
QDialogButtonBox, QMessageBox, QTreeWidgetItem,
|
||||
QWidget)
|
||||
from PyQt.QtCore import QSettings, Qt
|
||||
from PyQt.QtWidgets import QApplication, QDialog, QDialogButtonBox, QMessageBox, QTreeWidgetItem, QWidget
|
||||
from PyQt.QtGui import QColor, QCursor
|
||||
|
||||
from qgis.core import (QgsApplication, QgsCoordinateReferenceSystem,
|
||||
QgsCoordinateTransform, QgsGeometry, QgsPoint,
|
||||
@ -730,25 +729,15 @@ class MetaSearchDialog(QDialog, BASE_CLASS):
|
||||
|
||||
# connect dialog signals to iface slots
|
||||
if service_type == 'OGC:WMS/OGC:WMTS':
|
||||
ows_provider.connect(
|
||||
ows_provider,
|
||||
SIGNAL('addRasterLayer(QString, QString, QString)'),
|
||||
self.iface, SLOT('addRasterLayer(QString, QString, QString)'))
|
||||
ows_provider.addRasterLayer.connect(self.iface.addRasterLayer)
|
||||
conn_cmb = ows_provider.findChild(QWidget, 'cmbConnections')
|
||||
connect = 'on_btnConnect_clicked'
|
||||
elif service_type == 'OGC:WFS':
|
||||
ows_provider.connect(
|
||||
ows_provider,
|
||||
SIGNAL('addWfsLayer(QString, QString)'),
|
||||
self.iface.mainWindow(),
|
||||
SLOT('addWfsLayer(QString, QString)'))
|
||||
ows_provider.addWfsLayer.connect(self.iface.mainWindow().addWfsLayer)
|
||||
conn_cmb = ows_provider.findChild(QWidget, 'cmbConnections')
|
||||
connect = 'connectToServer'
|
||||
elif service_type == 'OGC:WCS':
|
||||
ows_provider.connect(
|
||||
ows_provider,
|
||||
SIGNAL('addRasterLayer(QString, QString, QString)'),
|
||||
self.iface, SLOT('addRasterLayer(QString, QString, QString)'))
|
||||
ows_provider.addRasterLayer.connect(self.iface.addRasterLayer)
|
||||
conn_cmb = ows_provider.findChild(QWidget, 'mConnectionsComboBox')
|
||||
connect = 'on_mConnectButton_clicked'
|
||||
ows_provider.setModal(False)
|
||||
|
@ -29,9 +29,8 @@
|
||||
|
||||
import xml.etree.ElementTree as etree
|
||||
|
||||
from PyQt4.QtCore import QSettings
|
||||
from PyQt4.QtGui import (QDialog, QDialogButtonBox, QFileDialog,
|
||||
QListWidgetItem, QMessageBox)
|
||||
from PyQt.QtCore import QSettings
|
||||
from PyQt.QtWidgets import QDialog, QDialogButtonBox, QFileDialog, QListWidgetItem, QMessageBox
|
||||
|
||||
from MetaSearch.util import (get_connections_from_file, get_ui_class,
|
||||
prettify_xml)
|
||||
|
@ -27,8 +27,8 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
from PyQt4.QtCore import QSettings
|
||||
from PyQt4.QtGui import QDialog, QMessageBox
|
||||
from PyQt.QtCore import QSettings
|
||||
from PyQt.QtWidgets import QDialog, QMessageBox
|
||||
|
||||
from MetaSearch.util import get_ui_class
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
from PyQt4.QtGui import QDialog
|
||||
from PyQt.QtWidgets import QDialog
|
||||
|
||||
from MetaSearch.util import get_ui_class
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
from PyQt4.QtGui import QDialog
|
||||
from PyQt.QtWidgets import QDialog
|
||||
|
||||
from MetaSearch.util import get_ui_class
|
||||
|
||||
|
@ -214,7 +214,7 @@ def generate_csw_connections_file():
|
||||
try:
|
||||
csw = CatalogueServiceWeb(url)
|
||||
title = unicode(csw.identification.title)
|
||||
conn = etree.SubElement(conns, 'csw', name=title, url=url)
|
||||
etree.SubElement(conns, 'csw', name=title, url=url)
|
||||
except Exception as err:
|
||||
error('ERROR on CSW %s: %s', url, err)
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
||||
|
||||
import logging
|
||||
|
||||
from PyQt4.QtCore import QCoreApplication
|
||||
from PyQt4.QtGui import QAction, QIcon
|
||||
from PyQt.QtCore import QCoreApplication
|
||||
from PyQt.QtWidgets import QAction
|
||||
from PyQt.QtGui import QIcon
|
||||
|
||||
from MetaSearch.dialogs.maindialog import MetaSearchDialog
|
||||
from MetaSearch.util import get_help_url, open_url, StaticContext
|
||||
|
@ -40,9 +40,9 @@ from jinja2 import Environment, FileSystemLoader
|
||||
from pygments import highlight
|
||||
from pygments.lexers import XmlLexer
|
||||
from pygments.formatters import HtmlFormatter
|
||||
from PyQt4.QtCore import QSettings
|
||||
from PyQt4.QtGui import QMessageBox
|
||||
from PyQt4.uic import loadUiType
|
||||
from PyQt.QtCore import QSettings
|
||||
from PyQt.QtWidgets import QMessageBox
|
||||
from PyQt.uic import loadUiType
|
||||
|
||||
from qgis.core import QGis
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user