Add plugin system

This commit is contained in:
2017-05-17 00:10:16 -05:00
parent db8ad57828
commit fb52ca6518
15 changed files with 368 additions and 65 deletions
+31
View File
@@ -0,0 +1,31 @@
/*
* Copyright 2016-2017 gtalent2@gmail.com
*
* 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "plugin.hpp"
namespace nostalgia {
namespace studio {
void Plugin::addNewWizard(QString name, std::function<QVector<QWizardPage*>()> make) {
m_newWizards.push_back({name, make});
}
void Plugin::addImportWizard(QString name, std::function<QVector<QWizardPage*>()> make) {
m_importWizards.push_back({name, make});
}
QVector<WizardMaker> Plugin::newWizards() {
return m_newWizards;
}
QVector<WizardMaker> Plugin::importWizards() {
return m_importWizards;
}
}
}