[nostalgia] Rename Studio Plugins to Modules, add support for builtin Studio modules, make existing modules builtin

This commit is contained in:
2020-12-17 19:29:24 -06:00
parent 6497b40e64
commit 7a837502a1
18 changed files with 105 additions and 72 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ add_library(
NostalgiaStudio SHARED
editor.cpp
wizard.cpp
plugin.cpp
module.cpp
project.cpp
)
@@ -26,7 +26,7 @@ install(
FILES
editor.hpp
wizard.hpp
plugin.hpp
module.hpp
project.hpp
${CMAKE_CURRENT_BINARY_DIR}/nostalgiastudio_export.h
DESTINATION
@@ -1,5 +1,5 @@
/*
* Copyright 2016 - 2019 gtalent2@gmail.com
* Copyright 2016 - 2020 gary@drinkingtea.net
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -7,23 +7,23 @@
*/
#include "context.hpp"
#include "plugin.hpp"
#include "module.hpp"
namespace nostalgia::studio {
QVector<WizardMaker> Plugin::newWizards(const Context*) {
QVector<WizardMaker> Module::newWizards(const Context*) {
return {};
}
QVector<WizardMaker> Plugin::importWizards(const Context*) {
QVector<WizardMaker> Module::importWizards(const Context*) {
return {};
}
QWidget *Plugin::makeEditor(QString, const Context*) {
QWidget *Module::makeEditor(QString, const Context*) {
return nullptr;
}
QVector<EditorMaker> Plugin::editors(const Context*) {
QVector<EditorMaker> Module::editors(const Context*) {
return {};
}
@@ -1,5 +1,5 @@
/*
* Copyright 2016 - 2019 gtalent2@gmail.com
* Copyright 2016 - 2020 gary@drinkingtea.net
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,10 +22,10 @@ struct EditorMaker {
std::function<class Editor*(QString)> make;
};
class Plugin {
class Module {
public:
virtual ~Plugin() = default;
virtual ~Module() = default;
virtual QVector<WizardMaker> newWizards(const class Context *ctx);
@@ -39,6 +39,6 @@ class Plugin {
}
#define PluginInterface_iid "net.drinkingtea.nostalgia.studio.Plugin"
#define PluginInterface_iid "net.drinkingtea.nostalgia.studio.Module"
Q_DECLARE_INTERFACE(nostalgia::studio::Plugin, PluginInterface_iid)
Q_DECLARE_INTERFACE(nostalgia::studio::Module, PluginInterface_iid)
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2016 - 2019 gtalent2@gmail.com
* Copyright 2016 - 2020 gary@drinkingtea.net
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -17,7 +17,7 @@
#include "context.hpp"
#include "project.hpp"
#include "plugin.hpp"
#include "module.hpp"
#include "wizard.hpp"
namespace nostalgia::studio {