重构HighLight特性接口
This commit is contained in:
parent
23360f15ea
commit
0bd15fc7a8
|
@ -38,7 +38,7 @@ SOURCES += \
|
|||
storyconceptspresent.cpp \
|
||||
storyunitspresent.cpp \
|
||||
tools.cpp \
|
||||
visiableprojectcontroller.cpp \
|
||||
vcontrol_project.cpp \
|
||||
xapplication.cpp
|
||||
|
||||
HEADERS += \
|
||||
|
@ -62,7 +62,7 @@ HEADERS += \
|
|||
storyconceptspresent.h \
|
||||
storyunitspresent.h \
|
||||
tools.h \
|
||||
visiableprojectcontroller.h \
|
||||
vcontrol_project.h \
|
||||
xapplication.h
|
||||
|
||||
TRANSLATIONS += \
|
||||
|
@ -95,3 +95,6 @@ else:unix: LIBS += -L$$OUT_PWD/../libParse/ -llibParse
|
|||
|
||||
INCLUDEPATH += $$PWD/../libParse
|
||||
DEPENDPATH += $$PWD/../libParse
|
||||
|
||||
DISTFILES += \
|
||||
design.md
|
||||
|
|
|
@ -43,14 +43,14 @@ AppCore::AppCore(MainWindow *win, QObject *parent)
|
|||
|
||||
}
|
||||
|
||||
void AppCore::registerHighlightType(Enhancement::HighlightDemand *base_type)
|
||||
void AppCore::registerHighlightType(Enhancement::HighlightFeature *base_type)
|
||||
{
|
||||
render_types << base_type;
|
||||
}
|
||||
|
||||
bool AppCore::isHighlightDemand(void *ins) const
|
||||
{
|
||||
return render_types.contains((Enhancement::HighlightDemand*)ins);
|
||||
return render_types.contains((Enhancement::HighlightFeature*)ins);
|
||||
}
|
||||
|
||||
void AppCore::save()
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
class MainWindow;
|
||||
|
||||
namespace Enhancement {
|
||||
class HighlightDemand;
|
||||
class HighlightFeature;
|
||||
}
|
||||
|
||||
namespace MakeTools {
|
||||
|
@ -51,7 +51,7 @@ namespace Core {
|
|||
AppCore(MainWindow *win, QObject *parent = nullptr);
|
||||
virtual ~AppCore() = default;
|
||||
|
||||
void registerHighlightType(Enhancement::HighlightDemand *base_type);
|
||||
void registerHighlightType(Enhancement::HighlightFeature *base_type);
|
||||
bool isHighlightDemand(void* ins) const;
|
||||
|
||||
/**
|
||||
|
@ -81,7 +81,7 @@ namespace Core {
|
|||
Config::Configration *const global_config;
|
||||
Project::ProjectManager * current_project;
|
||||
QList<MakeTools::ContentPresent*> present_types;
|
||||
QList<Enhancement::HighlightDemand*> render_types;
|
||||
QList<Enhancement::HighlightFeature*> render_types;
|
||||
|
||||
|
||||
MakeTools::StoryTool *const makes_core;
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# WordsIDE设计思路
|
||||
|
||||
## 简化软件架构,强化测试体验
|
||||
1. 界面、控制、模型相互分离:
|
||||
* 界面UI:操作生成控制命令,图形化显示数据,响应数据模型内容
|
||||
* 提供控制台:控制台输入命令等价界面操作
|
||||
* 控制核心:解析控制命令,操作数据模型,提供控制命令记录功能,输出控制命令执行脚本
|
||||
* 数据模型:实现数据抽象与表达,数据载入与输出
|
||||
* 控制命令集:各种控制命令的文本序列化和反序列化
|
|
@ -10,10 +10,10 @@ namespace Core {
|
|||
}
|
||||
|
||||
namespace Enhancement {
|
||||
class HighlightDemand
|
||||
class HighlightFeature
|
||||
{
|
||||
public:
|
||||
virtual ~HighlightDemand() = default;
|
||||
virtual ~HighlightFeature() = default;
|
||||
|
||||
virtual void contexBinding(Core::AppCore *app, Parse::Result::DocCore *core) = 0;
|
||||
virtual void renderRepeat() const = 0;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "messagepresent.h"
|
||||
#include "storychainspresent.h"
|
||||
#include "storyunitspresent.h"
|
||||
#include "visiableprojectcontroller.h"
|
||||
#include "vcontrol_project.h"
|
||||
#include "ContentPresent.h"
|
||||
#include "storyboardspresent.h"
|
||||
#include "storyconceptspresent.h"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
namespace Components {
|
||||
|
||||
class StoryboardSourceEdit : public Presents::ModeView,
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightDemand
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightFeature
|
||||
{
|
||||
public:
|
||||
StoryboardSourceEdit();
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Components {
|
|||
/**
|
||||
* @brief Storychain婧愮爜缂栬緫鍣 */
|
||||
class StorychainSourceEdit : public Presents::ModeView,
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightDemand
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightFeature
|
||||
{
|
||||
public:
|
||||
StorychainSourceEdit();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
namespace Components {
|
||||
|
||||
class StoryconceptSourceEdit : public Presents::ModeView,
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightDemand
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightFeature
|
||||
{
|
||||
public:
|
||||
StoryconceptSourceEdit();
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
namespace Components {
|
||||
|
||||
class StoryunitSourceEdit : public MakeTools::ContentPresent,
|
||||
public Presents::ModeView, public Enhancement::HighlightDemand
|
||||
public Presents::ModeView, public Enhancement::HighlightFeature
|
||||
{
|
||||
public:
|
||||
StoryunitSourceEdit();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace Components {
|
||||
class StoryvolumeSourceEdit : public Presents::ModeView,
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightDemand
|
||||
public MakeTools::ContentPresent, public Enhancement::HighlightFeature
|
||||
{
|
||||
public:
|
||||
StoryvolumeSourceEdit();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "visiableprojectcontroller.h"
|
||||
#include "vcontrol_project.h"
|
||||
|
||||
#include <QInputDialog>
|
||||
#include <QMenu>
|
Loading…
Reference in New Issue