Context actions have become normal actions in the pluginwidget so the widget knows abot them and can easily do things like enable/disable.
36 lines
951 B
C++
36 lines
951 B
C++
#ifndef PGLPAGE_H
|
|
#define PGLPAGE_H
|
|
|
|
#include <QWidget>
|
|
#include <vector>
|
|
|
|
class IPluginContentWidgetContext;
|
|
class PluginModule;
|
|
|
|
/// Provides a pluggable system for toolbar buttons and menu actions
|
|
///
|
|
/// We will need several kind of actions
|
|
/// - create actions, these will create a new document or load from file , always available in menu
|
|
/// - save actions available when on tab
|
|
/// - edit actions
|
|
/// - custom menu?
|
|
///
|
|
/// Can we use same groupings for toolbars and menu's
|
|
/// How about additional toolbars?
|
|
///
|
|
class PluginContentWidget: public QWidget{
|
|
public:
|
|
PluginContentWidget(IPluginContentWidgetContext *context, QWidget* parent = nullptr);
|
|
/// Returns the toolbar buttons for this page
|
|
virtual bool canClose();
|
|
|
|
virtual QList<QAction *> actions() { return QList<QAction*>(); }
|
|
|
|
protected:
|
|
IPluginContentWidgetContext *context() { return m_context; }
|
|
|
|
private:
|
|
IPluginContentWidgetContext *m_context;
|
|
};
|
|
|
|
#endif // PGLPAGE_H
|