diff --git a/python/plugins/MetaSearch/dialogs/maindialog.py b/python/plugins/MetaSearch/dialogs/maindialog.py index 7997141865d..c5ed12251ec 100644 --- a/python/plugins/MetaSearch/dialogs/maindialog.py +++ b/python/plugins/MetaSearch/dialogs/maindialog.py @@ -128,9 +128,9 @@ class MetaSearchDialog(QDialog, BASE_CLASS): self.btnNext.clicked.connect(self.navigate) self.btnLast.clicked.connect(self.navigate) - self.btnAddToWms.clicked.connect(self.add_to_ows) - self.btnAddToWfs.clicked.connect(self.add_to_ows) - self.btnAddToWcs.clicked.connect(self.add_to_ows) + self.mActionAddWms.triggered.connect(self.add_to_ows) + self.mActionAddWfs.triggered.connect(self.add_to_ows) + self.mActionAddWcs.triggered.connect(self.add_to_ows) self.btnShowXml.clicked.connect(self.show_xml) # settings @@ -614,13 +614,14 @@ class MetaSearchDialog(QDialog, BASE_CLASS): wcs_link_types]): if link_type in wmswmst_link_types: services['wms'] = link['url'] - self.btnAddToWms.setEnabled(True) + self.mActionAddWms.setEnabled(True) if link_type in wfs_link_types: services['wfs'] = link['url'] - self.btnAddToWfs.setEnabled(True) + self.mActionAddWfs.setEnabled(True) if link_type in wcs_link_types: services['wcs'] = link['url'] - self.btnAddToWcs.setEnabled(True) + self.mActionAddWcs.setEnabled(True) + self.tbAddData.setEnabled(True) set_item_data(item, 'link', json.dumps(services)) @@ -695,13 +696,13 @@ class MetaSearchDialog(QDialog, BASE_CLASS): caller = self.sender().objectName() # stype = human name,/Qgis/connections-%s,providername - if caller == 'btnAddToWms': + if caller == 'mActionAddWms': stype = ['OGC:WMS/OGC:WMTS', 'wms', 'wms'] data_url = item_data['wms'] - elif caller == 'btnAddToWfs': + elif caller == 'mActionAddWfs': stype = ['OGC:WFS', 'wfs', 'WFS'] data_url = item_data['wfs'] - elif caller == 'btnAddToWcs': + elif caller == 'mActionAddWcs': stype = ['OGC:WCS', 'wcs', 'wcs'] data_url = item_data['wcs'] @@ -834,9 +835,10 @@ class MetaSearchDialog(QDialog, BASE_CLASS): """Convenience function to disable WMS/WMTS|WFS|WCS buttons""" if services: - self.btnAddToWms.setEnabled(False) - self.btnAddToWfs.setEnabled(False) - self.btnAddToWcs.setEnabled(False) + self.tbAddData.setEnabled(False) + self.mActionAddWms.setEnabled(False) + self.mActionAddWfs.setEnabled(False) + self.mActionAddWcs.setEnabled(False) if xml: self.btnShowXml.setEnabled(False) diff --git a/python/plugins/MetaSearch/ui/maindialog.ui b/python/plugins/MetaSearch/ui/maindialog.ui index 122e764c6f8..f8469805572 100644 --- a/python/plugins/MetaSearch/ui/maindialog.ui +++ b/python/plugins/MetaSearch/ui/maindialog.ui @@ -6,10 +6,16 @@ 0 0 - 653 + 656 550 + + + 0 + 0 + + MetaSearch @@ -193,14 +199,41 @@ Results - + - + + + + << + + + + + + + View search results as XML + + + + + + + + 145 + 27 + + + + < + + + + Double click to see full record information @@ -238,66 +271,7 @@ - - - - - 145 - 27 - - - - < - - - - - - - View search results as XML - - - - - - - << - - - - - - - - 0 - 0 - - - - Add WMS/WMTS - - - - - - - - 0 - 0 - - - - - 145 - 27 - - - - Add WFS - - - - + @@ -310,20 +284,7 @@ - - - - - 0 - 0 - - - - Add WCS - - - - + @@ -336,17 +297,82 @@ + + + + + 0 + 0 + + + + + 145 + 27 + + + + + 145 + 27 + + + + Add Data + + + QToolButton::InstantPopup + + + Qt::ToolButtonTextOnly + + + false + + + Qt::NoArrow + + + + + :/images/themes/default/mActionAddWmsLayer.svg:/images/themes/default/mActionAddWmsLayer.svg + + + Add WMS/WMTS + + + + + + :/images/themes/default/mActionAddWfsLayer.svg:/images/themes/default/mActionAddWfsLayer.svg + + + Add WFS + + + + + + :/images/themes/default/mActionAddWcsLayer.svg:/images/themes/default/mActionAddWcsLayer.svg + + + Add WCS + + + + + + + treeRecords lblResults btnPrev btnFirst btnShowXml - btnAddToWms - btnAddToWfs btnLast - btnAddToWcs btnNext + tbAddData