Bunch of renames to reduce confusion.
This commit is contained in:
parent
cbb2f897aa
commit
be2ffd7ef9
15 changed files with 184 additions and 184 deletions
|
|
@ -2,8 +2,8 @@
|
|||
#define PLUGIN_SUPPORTPLUGINMODULE_H
|
||||
|
||||
#include "ModuleActionParameters.h"
|
||||
#include "MenuAction.h"
|
||||
#include "LWidgetAction.h"
|
||||
#include "StaticAction.h"
|
||||
#include "LContextAction.h"
|
||||
#include "PluginRegister.h"
|
||||
#include <QObject>
|
||||
#include <functional>
|
||||
|
|
@ -16,8 +16,8 @@ class IPluginContentWidgetContext;
|
|||
class PluginModule: public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
using MenuActionList = std::vector<MenuAction>;
|
||||
using LWidgetActionList = std::vector<LWidgetAction>;
|
||||
using StaticActionList = std::vector<StaticAction>;
|
||||
using ContextActionList = std::vector<LContextAction>;
|
||||
using ModuleAction = std::function<void(IPluginContentWidgetContext*, const ModuleActionParameters &)>;
|
||||
using ModuleActionMap = std::map<QString, ModuleAction>;
|
||||
|
||||
|
|
@ -32,8 +32,8 @@ public:
|
|||
void setDisplayCategory(QString category);
|
||||
|
||||
/// registers an action that should always be accessible from the menu
|
||||
void registerMenuAction(MenuAction action);
|
||||
const MenuActionList& menuActions() const;
|
||||
void registerStaticAction(StaticAction action);
|
||||
const StaticActionList& staticActions() const;
|
||||
|
||||
/// "API" action that other modules can trigger by name without being linked to
|
||||
/// this module. Allows for loose coupling.
|
||||
|
|
@ -43,11 +43,11 @@ public:
|
|||
/// When the action is not found nullptr is returned.
|
||||
const ModuleAction* findModuleAction(const QString &module_action) const;
|
||||
|
||||
void registerWidgetAction(const LWidgetAction &action)
|
||||
void registerContextAction(const LContextAction &action)
|
||||
{
|
||||
m_widgetActions.push_back(action);
|
||||
}
|
||||
const LWidgetActionList& widgetActions() const { return m_widgetActions; }
|
||||
const ContextActionList& contextActions() const { return m_widgetActions; }
|
||||
private:
|
||||
/// Name shown to end users
|
||||
QString m_name;
|
||||
|
|
@ -55,9 +55,9 @@ private:
|
|||
QString m_ident;
|
||||
QString m_displayCategory;
|
||||
|
||||
MenuActionList m_menuActions;
|
||||
StaticActionList m_menuActions;
|
||||
ModuleActionMap m_moduleActions;
|
||||
LWidgetActionList m_widgetActions;
|
||||
ContextActionList m_widgetActions;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue