<div dir="ltr">Hey Even,<div><br></div><div>I think this solution is fine. The other option I thought of in the past was to have some kind of signal on the provider that gets passed up and connected at a higher level.  </div><div>Using QgsMessageLog is a good idea as it's generic and can be used by everyone.</div><div><br></div><div>Regards,</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 10, 2016 at 11:25 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le dimanche 10 avril 2016 15:21:14, Luigi Pirelli a écrit :<br>
> a provider does not need necessarily an iface where to send GUI<br>
> messages (e.g pyqgis scripts).... IMHO is one reason.<br>
<br>
</span>Yes I know. Hence my proposal. The provider would continue using the message<br>
log interface, so with its current behaviour still preserved, but with an<br>
extra hint when the message is also aimed at being prominently displayed, if<br>
possible. In the case qgis_app is started it would listen for that and<br>
redirect the message to the message bar too.<br>
<br>
><br>
> regards<br>
> Luigi Pirelli<br>
><br>
> ***************************************************************************<br>
> *********************** * Boundless QGIS Support/Development: lpirelli AT<br>
<div class="HOEnZb"><div class="h5">> boundlessgeo DOT com * LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" rel="noreferrer" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br>
> * Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" rel="noreferrer" target="_blank">http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br>
> * GitHub: <a href="https://github.com/luipir" rel="noreferrer" target="_blank">https://github.com/luipir</a><br>
> * Mastering QGIS:<br>
> <a href="https://www.packtpub.com/application-development/mastering-qgis" rel="noreferrer" target="_blank">https://www.packtpub.com/application-development/mastering-qgis</a><br>
> ***************************************************************************<br>
> ***********************<br>
><br>
> On 10 April 2016 at 15:12, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br>
> > Hi,<br>
> ><br>
> > For the WFS provider, I'd like some messages, like a partial feature<br>
> > download, to be emitted in a more prominent way than just in the message<br>
> > log. The MessageBar would be appropriate for that, but from what I can<br>
> > see, it is not currently possible for a provider to use it. A search in<br>
> > src/providers shows that the same need was at least encountered once in<br>
> > the GRASS provider but the code is commented out as the provider doesn't<br>
> > link against qgis_app.<br>
> ><br>
> > So unless there's a good reason for a provider not to be able to use the<br>
> > message bar, I was thinking to the following mechanism to implement it :<br>
> > - QgsMessageLog would be extended to have 2 extra arguments bool<br>
> > displayInMessagerBar = false, int duration = 0 in logMessage() /<br>
> > messageReceived()<br>
> > - QgisApp would connect on messageReceived() and when the boolean is set,<br>
> > it would push the message to the main message bar.<br>
> ><br>
> > Any thoughts ?<br>
> ><br>
> > Even<br>
> ><br>
> > --<br>
> > Spatialys - Geospatial professional services<br>
> > <a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
> > _______________________________________________<br>
> > Qgis-developer mailing list<br>
> > <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> > List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> > Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div></div></blockquote></div><br></div>