[Qt-interest] Question regarding plugins

André Somers andre at familiesomers.nl
Wed Oct 7 07:17:03 CEST 2009


Apart from plugins loading plugins, you can also create a layer in your
program that controls access from the plugins to the program's capabilities.
Just like you create a (pure) virtual class as an interface for your plugins
to implement, you can create such an interface for your main program to
implement and give your plugins access to that interface. This interface
could then supply information on capabilities, make it possible to call
methods, gain access to data in the main application, etc. A good place to
start would perhaps be the primer on how to make your application
scriptable. This is not so different from that idea.

André


-----Oorspronkelijk bericht-----
Van: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Namens Anatoly Burakov
Verzonden: dinsdag 6 oktober 2009 21:38
Aan: qt-interest at trolltech.com
Onderwerp: [Qt-interest] Question regarding plugins

Hi all

I'm not sure if this is a QT-specific question (more of a general
programming one). But, anyway.

I am going to build an application which is able to use plugins to
extend its functionality. Let's say it's a business application, and
let's say one of the plugins provides application with current currency
rates. How can other plugins see that information, given the initial
application should have no idea about currency rates?

I mean - a currency rate is just a variable. What i am asking for is to
be able to access this variable from within another plugin. Is it
possible? My guess is that this implies dependency of one plugin on
another, but i am not sure how can i get exactly that variable (and not
some newly generated via initializing function of a plugin). So, how can
i achieve that? Just general guidelines is all i need, i'll figure out
implementation on my own.

Thanks in advance
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest





More information about the Qt-interest-old mailing list