mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 22:39:53 +08:00
19 KiB
19 KiB
工程结构
结构解析
/
├── scripts 本地小脚本 更新版本所用
├── .github github CI/CD 流程编排,issues 模板
├── .gitmodules github 规范的 modules 依赖文件
│
├── libs 引用的外部库
│ ├── QHotkey 跨平台的全局热键
│ ├── vtextedit VNote 自己开源的编辑器
│ └── libs.pro 外部库的工程索引文件
│
├── src VNote 源码文件夹
│ ├── core 核心源码
│ │ ├── *** 其他核心文件
│ │ ├── versioncontroller 版本管理
│ │ ├── buffer 缓存模块
│ │ ├── notebook 笔记本
│ │ ├── notebookbackend 笔记本后台
│ │ └── notebookconfigmgr 笔记本配置管理
│ ├── data VNote 工程数据
│ │ ├── core 运行所需要的默认配置
│ │ └── extra 额外的资源文件
│ ├── export 导出模块
│ ├── imagehost 图床模块
│ ├── search 搜索模块
│ ├── snippet 片段模块
│ ├── task 任务模块
│ ├── unitedentry TODO 不知道这里是干什么的
│ ├── utils 工具模块
│ └── widgets 窗体
│ ├── *** 其他窗体文件
│ ├── dialogs 对话框
│ ├── editors 编辑器
│ └── framelessmainwindow 无边框的窗口
├── pics README所需的图片
│
├── main.cpp 程序主入口
├── COPYING.LESSER 开源协议
├── README.md
├── README_zh_CN.md
├── build
├── changes.md
├── tests 测试
└── vnote.pro Qt 工程文件
源码模块简单介绍
libs
依赖的外部库,以 gitmodules 的形式管理,会将一些开源库 fork 到我们自己的仓库中,方便依赖和后续开发。主要也是担心库会莫名其妙消失。
[submodule "libs/vtextedit"]
path = libs/vtextedit
url = https://github.com/vnotex/vtextedit.git
[submodule "libs/QHotkey"]
path = libs/QHotkey
url = https://github.com/vnotex/QHotkey.git
更新方式可以使用如下命令:
git submodule update --init --recursive
src/core
核心代码文件夹,主要包含以下 功能性
内容:
其他在 src/core
根目录下的文件
名称 | 解释 |
---|---|
buffermgr | |
clipboarddata | |
configmgr | |
coreconfig | |
editorconfig | |
externalfile | |
file | |
global | |
historyitem | |
historymgr | |
htmltemplatehelper | |
logger | |
mainconfig | |
markdowneditorconfig | |
notebookmgr | |
quickaccesshelper | |
sessionconfig | |
singleinstanceguard | |
templatemgr | |
texteditorconfig | |
theme | |
thememgr | |
vnotex | |
widgetconfig |
文件夹 buffer
缓冲区,就是已经打开的笔记
名称 | 解释 |
---|---|
buffer | |
bufferprovider | |
filebufferprovider | |
filetypehelper | |
markdownbuffer | |
markdownbufferfactory | |
nodebufferprovider | |
textbuffer | |
textbufferfactory |
文件夹 notebook
笔记的索引、笔记索引的嵌入式数据库操作、标签、参数、外部文件
名称 | 解释 |
---|---|
bundlenotebook | |
bundlenotebookfactory | |
externalnode | |
node | |
nodeparameters | |
notebook | |
notebookdatabaseaccess | |
notebookparameters | |
notebooktagmgr | |
tag | |
vxnode | |
vxnodefile |
文件夹 notebookbackend
TODO 笔记后端(工厂方法)
名称 | 解释 |
---|---|
inotebookbackend | |
localnotebookbackend | |
localnotebookbackendfactory |
文件夹 notebookconfigmgr
TODO 笔记索引配置管理
名称 | 解释 |
---|---|
bundlenotebookconfigmgr | |
inotebookconfigmgr | |
notebookconfig | |
vxnodeconfig | |
vxnotebookconfigmgr | |
vxnotebookconfigmgrfactory |
文件夹 versioncontroller
TODO 笔记版本管理(未开发)
名称 | 解释 |
---|---|
dummyversioncontroller | |
dummyversioncontrollerfactory | |
versioncontrollerserver |
src/data
资源文件夹,主要包含 核心资源
和 额外资源
,因为是资源文件,所有会有对应的 .qrc 工程资源文件
可以理解为在打包时需要哪些资源文件:
core 核心资源
名称 | 解释 |
---|---|
icons | 默认的图标文件 |
logo | 各尺寸的logo、启动标示图、最小化图标 |
translations | 多语言,目前支持了中文、英文、日文,用 qt 的 languist 先制作好 ts 文件,再生成 qm 文件,其他地方使用 tr("***") 来调用 |
core.qrc | 工程资源文件,可以理解为打包的时候会将哪些文件打包进去,同时在增删一些文件的时候,也需要调整这里 |
Info.plist | TODO不知道干嘛 |
vnote.desktop | 桌面快捷方式 |
vnote.json | 默认配置 |
extra 额外资源
名称 | 解释 |
---|---|
dicts | 语法检查的字典 |
docs | 文档 |
syntax-highlighting | 语法检测的规则文件 |
tasks | 任务功能,目前内置了 git 简单操作 |
themes | 主题 |
web | TODO 不知道 |
export
导出模块,目前支持 HTML
、PDF
、Markdown
、自定义
。
名称 | 解释 |
---|---|
exportdata | 导出数据转换 |
exporter | 导出器,将对应的数据导出生成其相应格式的文件 |
webviewexporter | TODO 不知道干嘛 |
imagehost
图床模块,目前是支持了 本地
、gitee
、github
。
名称 | 解释 |
---|---|
giteeimagehost | 码云图床 |
githubimagehost | github图床 |
imagehost | 图床 |
imagehostmgr | 图床管理、增删、改名 |
imagehostutils | 图床工具类 |
repoimagehost | TODO 不知道 |
search
搜索模块
名称 | 解释 |
---|---|
filesearchengine | 文件搜索引擎 |
searchdata | 搜索条件的转换,把界面上的搜索条件转换成可以进行实际搜索的条件 |
searcher | 搜索者,干活开始搜索 |
searchhelper | 搜索帮助,提供搜索反馈,比如无效关键词等等 |
searchresultitem | 搜索结果,这位置列表那里显示出来的那些 |
searchtoken | 搜索令牌、全文检索、正则匹配 |
snippet
片段模块
名称 | 解释 |
---|---|
dynamicsnippet | 动态片段 TODO 没懂为什么叫动态片段 |
snippet | 片段、目前只支持了文本片段 |
snippetmgr | 片段管理器、增删改查 |
task
任务模块
名称 | 解释 |
---|---|
shellexecution | 脚本执行器,默认为 win:PowerShell 、其他为:/bin/bash |
task | 任务、实现了与外部程序的交互 |
taskmgr | 任务管理器、任务刷新、加载 |
taskvariablemgr | 任务变量管理器 |
unitedentry
统一入口模块
名称 | 解释 |
---|---|
entrypopup | 统一入口的弹出框 |
entrywidgetfactory | 窗口工厂类 |
findunitedentry | 统一入口查找 |
helpunitedentry | 统一入口帮助 |
iunitedentry | TODO 不知道 |
unitedentry | TODO 不知道 |
unitedentryalias | 统一入口别名 |
unitedentryhelper | TODO 没懂与上面的help的区别 |
unitedentrymgr | 统一入口管理器 |
utils
工具模块
名称 | 解释 |
---|---|
asyncworker | 异步工作 TODO 不知道 |
callbackpool | 回调池 |
clipboardutils | 剪切板工具 |
contentmediautils | 媒介内容工具、主要还是对图片的操作 |
docsutils | 文档工具,TODO 内部文档所用 |
fileutils | 文件工具,读写文件 |
htmlutils | html工具,解析html辅助所用 |
iconutils | icon工具,icon文件获取、单色渲染 |
imageutils | 图片工具,猜测图片格式与后缀 TODO 但是没明白 |
pathutils | 路径工具,文件、文件夹路径管理、相对路径管理 |
printutils | TODO什么打印呢 |
processutils | 内部程序工具、辅助缓冲、导出、预览、搜索、绘图等 |
urldragdroputils | Url拖拽工具,TODO不知道是哪里拖拽 |
utils | 其他工具 |
webutils | 网页工具 |
widgetutils | 窗体工具 |
widget
窗体模块
名称 | 解释 |
---|---|
attachmentdragdropareaindicator | TODO 不知道 |
attachmentpopup | 附件弹出框 |
biaction | TODO bi动作 |
buttonpopup | 按钮弹出框 |
combobox | 解决间距的下拉菜单 |
consoleviewer | 控制台预览 |
dockwidgethelper | 左侧导航坞窗体帮助 |
dragdropareaindicator | TODO 拖拽区域指示 |
editreaddiscardaction | TODO 读写丢弃动作 |
filesystemviewer | 文件系统观察者 |
findandreplacewidget | 查找和替换窗体 |
floatingwidget | 浮动窗体 |
fullscreentoggleaction | 全屏切换 |
historypanel | 历史记录面板 |
itemproxystyle | TODO 不知道 |
labelwithbuttonswidget | 标签按钮小部件 |
lineedit | TODO 什么线条编辑 |
lineeditdelegate | TODO 线条委托 |
lineeditwithsnippet | |
listwidget | |
locationinputwithbrowsebutton | |
locationlist | |
mainwindow | |
markdownviewwindow | |
messageboxhelper | |
navigationmode | |
navigationmodemgr | |
notebookexplorer | |
notebookexplorersession | |
notebooknodeexplorer | |
notebookselector | |
outlinepopup | |
outlineprovider | |
outlineviewer | |
propertydefs | |
quickselector | |
searchinfoprovider | |
searchpanel | |
simplesegmenthighlighter | |
snippetpanel | |
statusbarhelper | |
styleditemdelegate | |
systemtrayhelper | |
tagexplorer | |
tagpopup | |
tagviewer | |
textviewwindow | |
titlebar | |
titletoolbar | |
toolbarhelper | |
toolbox | |
treeview | |
treewidget | |
treewidgetitem | |
viewarea | |
viewareasession | |
viewsplit | |
viewwindow | |
viewwindowsession | |
viewwindowtoolbarhelper | |
webpage | |
webviewer | |
widgetsfactory | |
windowspanel | |
windowsprovider | |
wordcountpopup |
dialogs 对话框
名称 | 解释 |
---|---|
deleteconfirmdialog | |
dialog | |
exportdialog | |
filepropertiesdialog | |
folderfilesfilterwidget | |
folderpropertiesdialog | |
imageinsertdialog | |
importfolderdialog | |
importfolderutils | |
importlegacynotebookdialog | |
importnotebookdialog | |
legacynotebookutils | |
levellabelwithupbutton | |
linkinsertdialog | |
managenotebooksdialog | |
newfolderdialog | |
newnotebookdialog | |
newnotebookfromfolderdialog | |
newnotedialog | |
newsnippetdialog | |
newtagdialog | |
nodeinfowidget | |
notebookinfowidget | |
notepropertiesdialog | |
renametagdialog | |
scrolldialog | |
selectdialog | |
selectionitemwidget | |
snippetinfowidget | |
snippetpropertiesdialog | |
sortdialog | |
tableinsertdialog | |
updater | |
viewtagsdialog |
editors 编辑器
名称 | 解释 |
---|---|
editormarkdownvieweradapter | |
graphhelper | |
graphvizhelper | |
markdowneditor | |
markdowntable | |
markdowntablehelper | |
markdownviewer | |
markdownvieweradapter | |
plantumlhelper | |
previewhelper | |
statuswidget | |
texteditor |
framelessmainwindow 无边框窗口
名称 | 解释 |
---|---|
framelessmainwindow | |
framelessmainwindowlinux | 针对linux |
framelessmainwindowwin | 针对win |
模块关系图
TODO