Proof of concept for having the context actions statically defined in the module.

Needs work for correctly placing the items in menu and on toolbar.
Old system still needs to be removed left in place to keep app useable.
This commit is contained in:
eelke 2019-08-14 09:06:48 +02:00
parent 7f09d5fe07
commit 601d071d0f
21 changed files with 303 additions and 70 deletions

View file

@ -20,17 +20,19 @@ class PluginModule;
///
class PluginContentWidget: public QWidget{
public:
PluginContentWidget(IPluginContentWidgetContext *context, QWidget* parent = nullptr);
PluginContentWidget(IPluginContentWidgetContext *context, PluginModule *module, QWidget* parent = nullptr);
/// Returns the toolbar buttons for this page
virtual bool canClose();
virtual QList<QAction *> actions() { return QList<QAction*>(); }
virtual QList<QAction *> actions();
PluginModule *pluginModule();
IPluginContentWidgetContext *context();
protected:
IPluginContentWidgetContext *context() { return m_context; }
private:
IPluginContentWidgetContext *m_context;
IPluginContentWidgetContext *m_context = nullptr;
PluginModule *m_pluginModule = nullptr;
};
#endif // PGLPAGE_H