[Qgis-developer] Re: question about location of providerregistry and pluginregistry

Martin Dobias wonder.sk at gmail.com
Wed Feb 21 08:27:25 EST 2007


On 2/20/07, Marco Hugentobler <marco.hugentobler at karto.baug.ethz.ch> wrote:
>
> > Moreover plugins are connected also with gui library - they
> > might need to access map canvas etc.
>
> I agree with this. Maybe we should have GUI plugins and non-GUI plugins
> somewhen in future? But for the diagram plugin now, your suggestion below
> seems to be the best way.

This makes sense. Providers are also an example of non-gui (or 'core'
) plugins. That way, also core library should get some kind of plugin
registry, but it's important to differentiate between the two types of
plugins (first ones would depend only on core library, second ones on
both core and gui libs).

Now, when I'm thinking about this again, I see you were right - to
avoid bad design we probably can't avoid using registry of 'core'
plugins (it would be good to find a name for them) that would be
initialized the same way as providers are and once metadata are to be
read QGIS willl look at plugins registry that will provide read/write
and some other functions.

This opens the question how to modify plugin registry handling to work
well with core/gui plugins or core-only plugins, make no difference
between C++ and Python plugins etc.

Martin


>
> Thanks a lot,
> Marco
>
>
> > Martin
> >
> > On 2/19/07, Marco Hugentobler <marco.hugentobler at karto.baug.ethz.ch> wrote:
> > > Hi,
> > >
> > > In svn head, qgsproviderregistry.h is in core/ directory and
> > > qgspluginregistry.h in app/ directory. I wanted to ask what the reason
> > > for this is.
> > > Backgournd of my question is that I'm trying to restore the diagram
> > > overlay from project file. For this, QgsVectorLayer needs to have a
> > > pointer to the diagram plugin (in case it is loaded). From a pure
> > > technical point of view this is similar to QgsVectorLayer using
> > > QgsProviderRegistry to restore a data provider from project file. But
> > > because plugin registry is in app, vector layer is not allowed to use it,
> > > as code in core should not depend on code in app.
> > > Is it possible that QgsPluginRegistry could be in core? Or is there a
> > > more intelligent way of getting the plugin pointer?
> > >
> > > Thanks,
> > > Marco
>



More information about the Qgis-developer mailing list