视图的注册
This commit is contained in:
parent
ec0519c950
commit
576b5bfe67
|
@ -6,12 +6,19 @@ using namespace Components;
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace DataModel;
|
using namespace DataModel;
|
||||||
|
|
||||||
DocumentsManager::DocumentsManager(Project::ProjectManager *project) : pjtins(project), present_ui(nullptr) {}
|
DocumentsManager::DocumentsManager(Project::ProjectManager *project) : pjtins(project), present_ui(nullptr) { registViewPlugins(); }
|
||||||
|
|
||||||
void DocumentsManager::setPresent(Components::PresentHost *container) { present_ui = container; }
|
void DocumentsManager::setPresent(Components::PresentHost *container) { present_ui = container; }
|
||||||
|
|
||||||
Project::ProjectManager *DocumentsManager::projectManager() const { return pjtins; }
|
Project::ProjectManager *DocumentsManager::projectManager() const { return pjtins; }
|
||||||
|
|
||||||
|
#include "srcedit_defaulttext.h"
|
||||||
|
#include "srcedit_storyboard.h"
|
||||||
|
void DocumentsManager::registViewPlugins() {
|
||||||
|
registPresentType(new DefaultTextEditFactory);
|
||||||
|
registPresentType(new StorySourceEditFactory);
|
||||||
|
}
|
||||||
|
|
||||||
QList<QString> DocumentsManager::fileTypes() const {
|
QList<QString> DocumentsManager::fileTypes() const {
|
||||||
QList<QString> all_types;
|
QList<QString> all_types;
|
||||||
for (auto &it : factory_map.keys())
|
for (auto &it : factory_map.keys())
|
||||||
|
|
|
@ -73,6 +73,8 @@ namespace DataModel {
|
||||||
*/
|
*/
|
||||||
Project::ProjectManager *projectManager() const;
|
Project::ProjectManager *projectManager() const;
|
||||||
|
|
||||||
|
void registViewPlugins();
|
||||||
|
|
||||||
// ==========================================================
|
// ==========================================================
|
||||||
/**
|
/**
|
||||||
* @brief 注册插件类型
|
* @brief 注册插件类型
|
||||||
|
|
Loading…
Reference in New Issue