Moved definition of widget instance actions to the module so other parts of the system can no about them.
The plugin system will create the Action objects and bind them to the specified slots of the specific widget instances.
This commit is contained in:
parent
d0c4dabe8b
commit
f4f2474a81
21 changed files with 418 additions and 204 deletions
|
|
@ -8,8 +8,10 @@
|
|||
#include "plugin_support/ModuleActionParameters.h"
|
||||
|
||||
class OpenDatabase;
|
||||
class PluginModule;
|
||||
class PluginContentWidget;
|
||||
|
||||
|
||||
/** This class serves to isolate the plugin from the actual construct in which it is
|
||||
* used.
|
||||
*
|
||||
|
|
@ -45,7 +47,8 @@ public:
|
|||
const ModuleActionParameters &action_params
|
||||
) = 0;
|
||||
|
||||
virtual void addContentWidget(PluginContentWidget *widget) = 0;
|
||||
virtual void addContentWidget(PluginModule *module, PluginContentWidget *widget) = 0;
|
||||
virtual void removeContentWidget(PluginContentWidget *widget) = 0;
|
||||
|
||||
/** Return a widget you can use as a parent
|
||||
*/
|
||||
|
|
@ -57,6 +60,7 @@ public:
|
|||
bool registerObject(std::shared_ptr<T> object);
|
||||
template<typename T>
|
||||
std::shared_ptr<T> getObject() const;
|
||||
|
||||
private:
|
||||
std::map<std::type_index, std::shared_ptr<void> > m_objectRegistry;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue