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