Skip to content

Commit ecf1f8d

Browse files
committed
support print
1 parent 6884e1f commit ecf1f8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+808
-729
lines changed

README_zh_CN.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,53 @@
55

66
一个舒适的笔记平台!
77

8-
更多信息,请访问 [VNote 主页](https://tamlok.gitee.io/vnote) 或者[由 Gitee 托管的主页](https://tamlok.gitee.io/vnote)
8+
更多信息,请访问[VNote主页](https://vnotex.github.io/vnote)或者[由Gitee托管的主页](https://tamlok.gitee.io/vnote)
99

1010
![VNote](pics/vnote.png)
1111

1212
## 简介
13-
**VNote** 是一个专注于 Markdown 的基于 Qt 的开源免费的笔记应用。VNote 希望能提供一个拥有完美编辑体验的舒适的笔记平台
13+
**VNote**是一个专注于Markdown的基于Qt的开源免费的笔记应用。VNote希望能提供一个拥有完美编辑体验的舒适的笔记平台
1414

15-
VNote 不是一个简单的 Markdown 编辑器。通过提供强大的笔记管理,VNote 使得使用 Markdown 记笔记更轻松简单。将来,VNote 会支持更多的文档格式
15+
VNote不是一个简单的Markdown编辑器。通过提供强大的笔记管理,VNote使得使用Markdown记笔记更轻松简单。将来,VNote会支持更多的文档格式
1616

17-
得益于 Qt,VNote 当前可以高效地运行在 **Linux****Windows** ,以及 **macOS** 平台上。
17+
得益于Qt,VNote当前可以高效地运行在**Linux****Windows**,以及**macOS**平台上。
1818

1919
![主界面](pics/main.png)
2020

2121
## 下载
22-
基于 `master` 分支的 [持续构建版本发布](https://github.com/vnotex/vnote/releases/tag/continuous-build)
22+
基于`master`分支的[持续构建版本发布](https://github.com/vnotex/vnote/releases/tag/continuous-build)
2323

24-
最新的 [稳定版本发布](https://github.com/vnotex/vnote/releases/latest)其他下载选项:
24+
最新的[稳定版本发布](https://github.com/vnotex/vnote/releases/latest)其他下载选项:
2525

2626
* [天翼云盘](https://cloud.189.cn/t/Av67NvmEJVBv)
27-
* [百度云盘](https://pan.baidu.com/s/1Fou1flmBsQUQ8Qs9V_M6Aw) 提取码 `note`
27+
* [百度云盘](https://pan.baidu.com/s/1Fou1flmBsQUQ8Qs9V_M6Aw) 提取码`note`
2828

2929
## 支持
30-
* [GitHub Issues](https://github.com/vnotex/vnote/issues)
31-
* 邮件: `tamlokveer at gmail.com`
32-
* [Slack](https://join.slack.com/t/vnote/shared_invite/enQtNDg2MzY0NDg3NzI4LTVhMzBlOTY0YzVhMmQyMTFmZDdhY2M3MDQxYTBjOTA2Y2IxOGRiZjg2NzdhMjkzYmUyY2VkMWJlZTNhMTQyODU)
33-
* [Telegram](https://t.me/vnotex)
34-
* 微信公众号: vnotex
30+
* [GitHub Issues](https://github.com/vnotex/vnote/issues)
31+
* 邮件:`tamlokveer at gmail.com`
32+
* [Slack](https://join.slack.com/t/vnote/shared_invite/enQtNDg2MzY0NDg3NzI4LTVhMzBlOTY0YzVhMmQyMTFmZDdhY2M3MDQxYTBjOTA2Y2IxOGRiZjg2NzdhMjkzYmUyY2VkMWJlZTNhMTQyODU)
33+
* [Telegram](https://t.me/vnotex)
34+
* 微信公众号:`vnotex`
3535

3636
## 捐赠
37-
有很多方式可以帮助 VNote 的开发
37+
有很多方式可以帮助VNote的开发
3838

39-
* 持续关注 VNote 并反馈问题以帮助改进;
40-
* 推荐 VNote 给朋友,口碑传播
41-
* 参与 VNote 的开发,发起 [拉取请求](https://github.com/vnotex/vnote/pulls) 一起改进 VNote;
42-
* 如果 VNote 真的好用,可以考虑捐赠
39+
* 持续关注VNote并反馈问题以帮助改进。
40+
* 推荐VNote给朋友,口碑传播
41+
* 参与VNote的开发,发起[拉取请求](https://github.com/vnotex/vnote/pulls)一起改进VNote。
42+
* 如果VNote真的好用,可以考虑捐赠
4343

44-
**PayPal**: [PayPal.Me/vnotemd](https://www.paypal.me/vnotemd)
44+
**PayPal**[PayPal.Me/vnotemd](https://www.paypal.me/vnotemd)
4545

46-
**支付宝**: `[email protected]`
46+
**支付宝**`[email protected]`
4747

4848
<img src="pics/alipay.png" width="256px" height="256px" />
4949

5050
**微信**
5151

5252
<img src="pics/wechat_pay.png" width="256px" height="256px" />
5353

54-
感谢这些 [捐赠用户](https://github.com/vnotex/vnote/wiki/Donate-List)
54+
感谢这些[捐赠用户](https://github.com/vnotex/vnote/wiki/Donate-List)
5555

5656
## 许可
57-
VNote 遵循 [GNU LGPLv3](https://opensource.org/licenses/LGPL-3.0) 许可。VNote 项目的代码可以自由给 VNoteX 项目使用
57+
VNote遵循[GNU LGPLv3](https://opensource.org/licenses/LGPL-3.0)许可。VNote项目的代码可以自由给VNoteX项目使用

src/core/coreconfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void CoreConfig::init(const QJsonObject &p_app,
4545

4646
m_toolBarIconSize = READINT(QStringLiteral("toolbar_icon_size"));
4747
if (m_toolBarIconSize <= 0) {
48-
m_toolBarIconSize = 16;
48+
m_toolBarIconSize = 18;
4949
}
5050

5151
m_docksTabBarIconSize = READINT(QStringLiteral("docks_tabbar_icon_size"));

src/core/coreconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace vnotex
127127
QString m_shortcuts[Shortcut::MaxShortcut];
128128

129129
// Icon size of MainWindow tool bar.
130-
int m_toolBarIconSize = 16;
130+
int m_toolBarIconSize = 18;
131131

132132
// Icon size of MainWindow QDockWidgets tab bar.
133133
int m_docksTabBarIconSize = 20;

src/core/editorconfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ namespace vnotex
6060
ApplySnippet,
6161
Tag,
6262
Debug,
63+
Print,
6364
MaxShortcut
6465
};
6566
Q_ENUM(Shortcut)

src/core/notebook/notebookdatabaseaccess.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,20 @@ bool NotebookDatabaseAccess::addNode(Node *p_node, bool p_ignoreId)
194194
return true;
195195
}
196196

197+
bool NotebookDatabaseAccess::addNodeRecursively(Node *p_node, bool p_ignoreId)
198+
{
199+
if (!p_node) {
200+
return false;
201+
}
202+
203+
auto paNode = p_node->getParent();
204+
if (paNode && !addNodeRecursively(paNode, p_ignoreId)) {
205+
return false;
206+
}
207+
208+
return addNode(p_node, p_ignoreId);
209+
}
210+
197211
QSharedPointer<NotebookDatabaseAccess::NodeRecord> NotebookDatabaseAccess::queryNode(ID p_id)
198212
{
199213
auto db = getDatabase();

src/core/notebook/notebookdatabaseaccess.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ namespace vnotex
4949
public:
5050
bool addNode(Node *p_node, bool p_ignoreId);
5151

52+
bool addNodeRecursively(Node *p_node, bool p_ignoreId);
53+
5254
// Whether there is a record with the same ID in DB and has the same path.
5355
bool existsNode(const Node *p_node);
5456

src/core/notebook/notebooktagmgr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ bool NotebookTagMgr::updateNodeTags(Node *p_node)
187187
auto db = m_notebook->getDatabaseAccess();
188188

189189
// Make sure the node exists in DB.
190-
if (!db->addNode(p_node, false)) {
191-
qWarning() << "failed to add node to DB" << p_node->fetchPath() << p_node->getId();
190+
if (!db->addNodeRecursively(p_node, false)) {
191+
qWarning() << "failed to add node to DB" << p_node->fetchPath() << p_node->getId() << (p_node->getParent() ? p_node->getParent()->getId() : -1);
192192
return false;
193193
}
194194

src/data/core/core.qrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<file>icons/inplace_preview_editor.svg</file>
2727
<file>icons/image_host_editor.svg</file>
2828
<file>icons/settings_menu.svg</file>
29-
<file>icons/whatsthis.svg</file>
3029
<file>icons/help_menu.svg</file>
3130
<file>icons/import_menu.svg</file>
3231
<file>icons/export_menu.svg</file>
@@ -79,6 +78,7 @@
7978
<file>icons/close.svg</file>
8079
<file>icons/delete.svg</file>
8180
<file>icons/debug_editor.svg</file>
81+
<file>icons/print_editor.svg</file>
8282
<file>icons/stay_on_top.svg</file>
8383
<file>icons/outline_editor.svg</file>
8484
<file>icons/find_replace_editor.svg</file>
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 10 deletions
Loading

0 commit comments

Comments
 (0)