1 Star 0 Fork 1.5K

lineCodeJm / ndd

forked from 爬山虎 / ndd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
command.h 578 Bytes
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include <QString>
enum ChangeDire {
NONE_CHANGE=-1,
LEFT_CHANGE=0,
RIGHT_CHANGE,
BOTH_CHANGE,
};
class Command
{
public:
virtual ~Command() = default;
//获取当前命令的序号,同一个序号的,需要逐渐一起执行
virtual int getOperIndex() = 0;
virtual void undo() = 0;
virtual QString desc() = 0;
//获取左右是否变化的状态。
ChangeDire getChangeStatus() {
return m_changeStaus;
}
void setChangeStatus(ChangeDire c) {
m_changeStaus = c;
}
protected:
ChangeDire m_changeStaus;
};
C++
1
https://gitee.com/lineCodeJm/notepad--.git
git@gitee.com:lineCodeJm/notepad--.git
lineCodeJm
notepad--
ndd
master

搜索帮助