Fwd: Can extension check if some other extension is enabled?

05.02.10, 10:45, “Geoffrey Hutchison” :

On Feb 5, 2010, at 9:52 AM, Konstantin Tokarev wrote:

Right now, I’d have to think about accessing extensions or tools. We probably need to add API for that.

It would be great if one extension could get pointer to another. It will make possible data interchange between extensions without without bloating of Molecule and properties
Well, if you look in glwidget.cpp, you can see how to access the PluginManager::instance. So I guess my suggestion would be to add a new method to GLWidget to access the current PluginManager. You could then access extensions, tools, color maps, etc. from the PluginManager. The catch, of course, is that you can have an engine plugin loaded, but not enabled. We already have a clean API for engines though.

AFAIK, extension can access GLWidget only through performAction(QAction *action, GLWidget *widget). What can I do if I want to invoke other extension from dockWidget?


Regards,
Konstantin

On Tue, Feb 9, 2010 at 4:59 PM, Konstantin Tokarev annulen@yandex.ru wrote:

AFAIK, extension can access GLWidget only through performAction(QAction *action, GLWidget *widget). What can I do if I want to invoke other extension from dockWidget?

There’s always the static GLWidget::current()

http://avogadro.openmolecules.net/api/dev/classAvogadro_1_1GLWidget.html#9b5ae6f7def70956d4875ce2ce35401a

Dave

There’s always the static GLWidget::current()
http://avogadro.openmolecules.net/api/dev/classAvogadro_1_1GLWidget.html#9b5ae6f7def70956d4875ce2ce35401a

You can also save a pointer to the GLWidget as a member of your class – this is how most of the extensions currently handle it.

Cheers,
-Geoff