[Qgis-developer] Using app MessageBar from providers ?

Luigi Pirelli luipir at gmail.com
Sun Apr 10 06:21:14 PDT 2016


a provider does not need necessarily an iface where to send GUI
messages (e.g pyqgis scripts).... IMHO is one reason.

regards
Luigi Pirelli

**************************************************************************************************
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
**************************************************************************************************


On 10 April 2016 at 15:12, Even Rouault <even.rouault at spatialys.com> wrote:
> Hi,
>
> For the WFS provider, I'd like some messages, like a partial feature download,
> to be emitted in a more prominent way than just in the message log. The
> MessageBar would be appropriate for that, but from what I can see, it is not
> currently possible for a provider to use it. A search in src/providers shows
> that the same need was at least encountered once in the GRASS provider but the
> code is commented out as the provider doesn't link against qgis_app.
>
> So unless there's a good reason for a provider not to be able to use the
> message bar, I was thinking to the following mechanism to implement it :
> - QgsMessageLog would be extended to have 2 extra arguments bool
> displayInMessagerBar = false, int duration = 0 in logMessage() /
> messageReceived()
> - QgisApp would connect on messageReceived() and when the boolean is set, it
> would push the message to the main message bar.
>
> Any thoughts ?
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list