basically, what I'm trying to do is define an interface that a bunch of plugins should follow. Each plugin should implement a series of slots. If they fail to do so, they need to produce a compile-time error. Theoretically, I could do this by not inheritting the base class at all and implementing the slots in the individual plugins, but if a plugin fails to implement a slot, it will still compile and run with weird results.
Here's the structure of what I've got:
.
+------------------+ +--------------------------------+
| Plugin Interface | | Abstract base class with slots |
+------------------+ +--------------------------------+
| |
+------------------+ +------------------------------+
+------------------+ +------------------------------+
.
+------------------+ +--------------------------------+
| Plugin Interface | | Abstract base class with slots |
+------------------+ +--------------------------------+
| |
+------------------+ +------------------------------+
| Plugins (a,b...) |---------| QWidget/QGLWidget sub-class |
+------------------+ +------------------------------+
To copy to clipboard, switch view to plain text mode
The section on the right is a simplified version of my previous diagram. My plugin has a "has a" relationship with the QWidget / QGLWidget class, which it would return on request (effectively bypassing the plugin itself requiring QWidget, and theoretically allowing the QWidget to have abstract slots defined that all plugins should follow).
Bookmarks