def uploadOsmData(self): """Function shows up the "Upload OSM data" dialog. After closing it, function calls the appropriate actions according to dialog's return code. """ if 'osm' not in QgsProviderRegistry.instance().providerList(): QMessageBox.critical(None, "Sorry", "You don't have OSM provider installed!") return # first check if there are some data; if not upload doesn't have sense if not self.dbm.currentKey: QMessageBox.information( QWidget(), QCoreApplication.translate("OsmPlugin", "OSM Upload"), QCoreApplication.translate( "OsmPlugin", "No OSM data are loaded/downloaded or no OSM layer is selected in Layers panel. \ Please change this situation first, because OSM Plugin doesn't know what to upload." )) return self.dlgUpload = OsmUploadDlg(self) self.dlgUpload.exec_()