[Qgis-developer] Using app MessageBar from providers ?
Even Rouault
even.rouault at spatialys.com
Sun Apr 10 06:25:13 PDT 2016
Le dimanche 10 avril 2016 15:21:14, Luigi Pirelli a écrit :
> a provider does not need necessarily an iface where to send GUI
> messages (e.g pyqgis scripts).... IMHO is one reason.
Yes I know. Hence my proposal. The provider would continue using the message
log interface, so with its current behaviour still preserved, but with an
extra hint when the message is also aimed at being prominently displayed, if
possible. In the case qgis_app is started it would listen for that and
redirect the message to the message bar too.
>
> 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
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the Qgis-developer
mailing list