First tab at building a mechanism where tabpages can supply a list of actions that are added to the global main toolbar.

This commit is contained in:
eelke 2018-05-14 20:24:41 +02:00
parent c2d725ec6d
commit 3d516e6006
10 changed files with 130 additions and 26 deletions

27
pglab/PlgPage.h Normal file
View file

@ -0,0 +1,27 @@
#ifndef PGLPAGE_H
#define PGLPAGE_H
#include <QWidget>
#include <vector>
/// 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 PlgPage: public QWidget{
public:
using QWidget::QWidget;
/// Returns the toolbar buttons for this page
virtual std::vector<QAction*> getToolbarActions();
virtual bool canClose();
};
#endif // PGLPAGE_H