diff --git a/src/translations/vnote_zh_CN.qm b/src/translations/vnote_zh_CN.qm index 9ab1fa34..a19eae77 100644 Binary files a/src/translations/vnote_zh_CN.qm and b/src/translations/vnote_zh_CN.qm differ diff --git a/src/translations/vnote_zh_CN.ts b/src/translations/vnote_zh_CN.ts index 67a88074..09a44e5f 100644 --- a/src/translations/vnote_zh_CN.ts +++ b/src/translations/vnote_zh_CN.ts @@ -14,37 +14,37 @@ 插入链接 - + Found no match 没有找到匹配项 - + Found %1 %2 找到 %1 %2 - + matches 处匹配 - + match 处匹配 - + Replace %1 %2 替换了 %1 %2 - + occurences 处匹配 - + occurence 处匹配 @@ -72,17 +72,22 @@ QWebEnginePage - + + Save &Page + + + + &Back - + &Forward - + &Reload @@ -104,8 +109,8 @@ - - + + Warning 警告 @@ -127,7 +132,7 @@ - + Please check the attachments folder and maintain the configuration file manually. 请检查附件文件夹并手动维护配置文件。 @@ -218,13 +223,13 @@ - + Confirm Deleting Attachments 确认删除附件 - + Fail to delete attachments of note <span style="%1">%2</span>. 删除笔记 <span style="%1">%2</span> 的附件失败。 @@ -239,32 +244,32 @@ 对笔记 <span style="%1">%2</span> 的附件在配置文件中进行排序。 - + Name 名字 - + Fail to sort attachments of note <span style="%1">%2</span>. 对笔记 <span style="%1">%2</span> 的附件的排序失败。 - + Rename Attachment 重命名附件 - + Fail to rename attachment <span style="%1">%2</span>. 重命名附件 <span style="%1">%2</span> 失败。 - + VNote detects that these attachments of note <span style="%1">%2</span> are missing in disk. Would you like to remove them from the note? VNote无法在磁盘中找到笔记 <span style="%1">%2</span> 的这些附件。是否需要将这些附件从笔记中移除? - + Click "Cancel" to leave them untouched. 点击“取消”以终止操作。 @@ -280,65 +285,94 @@ VCart - + Clear 清空 - + Warning 警告 - + Are you sure to clear Cart? 确认清空小推车? - + &Open 打开 (&O) - + Open selected notes 打开选定笔记 - Locate To Folder - 定位所在文件夹 + 定位所在文件夹 - + + &Locate To Folder + 定位所在文件夹 (&L) + + + Locate the folder of current note 定位到当前笔记所在的文件夹 - + &Delete 删除 (&D) - + Delete selected items from Cart 从小推车中删除所选项 - + + &Sort + 排序 (&S) + + + + Sort items in Cart + 对小推车中的项目排序 + + + %1 %2 %1 %2 - + Items - + Item + + + Sort Cart + 排序小推车 + + + + Sort items in Cart. + 对小推车中的项目排序。 + + + + Name + 名字 + VConfirmDeletionDialog @@ -588,22 +622,22 @@ - - - - - - - - - - + + + + + + + + + + Warning 警告 - + Fail to open notebook <span style="%1">%2</span>. 打开笔记本 <span style="%1">%2</span> 失败。 @@ -613,73 +647,73 @@ 请检查该笔记本的根文件夹 <span style="%1">%2</span> 是否存在。 - + Fail to open folder <span style="%1">%2</span>. 打开文件夹 <span style="%1">%2</span> 失败。 - + Please check if directory <span style="%1">%2</span> exists. 请检查目录 <span style="%1">%2</span> 是否存在。 - + Create a subfolder in <span style="%1">%2</span>. 在文件夹 <span style="%1">%2</span> 中新建子文件夹。 - + Fail to create subfolder <span style="%1">%2</span>. 新建子文件夹 <span style="%1">%2</span> 失败。 - + Fail to create root folder <span style="%1">%2</span>. 新建根文件夹 <span style="%1">%2</span> 失败。 - + <span style="%1">WARNING</span>: VNote will delete the whole directory <span style="%2">%3</span>.Deleted files could be found in the recycle bin of this folder.<br>The operation is IRREVERSIBLE! <span style="%1">警告</span>:VNote会删除整个目录 <span style="%2">%3</span>。被删除的文件可以在该文件夹的回收站中找回。<br>该操作是不可逆的! - + %1 %2 pasted 粘贴了%1个%2 - + Sort Folders 排序文件夹 - + Sort folders in %1 <span style="%2">%3</span> in the configuration file. 对%1 <span style="%2">%3</span> 的文件夹在配置文件中进行排序。 - - + + notebook 笔记本 - + Name 名字 - + Created Time 创建时间 - + Fail to sort folders in %1 <span style="%2">%3</span>. 对%1 <span style="%2">%3</spacn> 的文件夹排序失败。 - + Create Folder 新建文件夹 @@ -699,118 +733,118 @@ 新建子文件夹 (&S) - + Create a root folder in notebook <span style="%1">%2</span>. 在笔记本 <span style="%1">%2</span> 中新建根文件夹。 - + Create Root Folder 新建根文件夹 - + Are you sure to delete folder <span style="%1">%2</span>? 确认删除文件夹 <span style="%1">%2</span>? - + Fail to delete folder <span style="%1">%2</span>.<br>Please check <span style="%1">%3</span> and manually delete it. 删除文件夹 <span style="%1">%2</span> 失败。<br>请检查 <span style="%1">%3</span> 并手动删除。 - + %1 %2 deleted 删除了%1个%2 - - - + + + folders 文件夹 - - - - - + + + + + folder 文件夹 - + Folder Information 文件夹信息 - + Fail to rename folder <span style="%1">%2</span>. 重命名文件夹 <span style="%1">%2</span> 失败。 - + Are you sure to reload folder <span style="%1">%2</span>? 确认重新加载文件夹 <span style="%1">%2</span>? - + Folder %1 reloaded from disk 文件夹 %1 已从磁盘中重新加载 - + Are you sure to reload notebook <span style="%1">%2</span>? 确认重新加载笔记本 <span style="%1">%2</span>? - + Notebook %1 reloaded from disk 笔记本 %1 已从磁盘中重新加载 - + Information 注意 - + VNote will close all the related notes before reload. VNote会在重新加载前关闭所有相关笔记。 - + Please check if path <span style="%1">%2</span> exists. 请检查路径 <span style="%1">%2</span> 是否存在。 - + %1 %2 %3 %3了%1个%2 - + cut 剪切 - + copied 复制 - + Fail to paste folder <span style="%1">%2</span>. 粘贴文件夹 <span style="%1">%2</span> 失败。 - + VNote could not find this folder in any notebook. VNote无法在任何笔记本中找到该文件夹。 - + Fail to copy folder <span style="%1">%2</span>. 复制文件夹 <span style="%1">%2</span> 失败。 @@ -833,67 +867,67 @@ 插入链接 - + Found no match 没有找到匹配项 - + Found %1 %2 找到 %1 %2 - + matches 处匹配 - + match 处匹配 - + Replace %1 %2 替换了 %1 %2 - + occurences 处匹配 - + occurence 处匹配 - + &Save Changes And Read 保存更改并阅读 (&S) - + Save changes and exit edit mode 保存对当前笔记的更改并退出编辑模式 - + &Discard Changes And Read 放弃更改并阅读 (&D) - + Discard changes and exit edit mode 放弃对当前笔记的更改并退出编辑模式 - + &Edit 编辑 (&E) - + Edit current note 编辑当前笔记 @@ -901,107 +935,107 @@ VEditArea - + ActivateTab1 激活标签页1 - + ActivateTab2 激活标签页2 - + ActivateTab3 激活标签页3 - + ActivateTab4 激活标签页4 - + ActivateTab5 激活标签页5 - + ActivateTab6 激活标签页6 - + ActivateTab7 激活标签页7 - + ActivateTab8 激活标签页8 - + ActivateTab9 激活标签页9 - + AlternateTab 轮换标签页 - + OpenedFileList 已打开笔记列表 - + ActivateSplitLeft 激活左分割 - + ActivateSplitRight 激活右分割 - + MoveTabSplitLeft 左移标签页一个分割窗口 - + MoveTabSplitRight 右移标签页一个分割窗口 - + ActivateNextTab 激活下一个标签页 - + ActivatePreviousTab 激活上一个标签页 - + VerticalSplit 垂直分割 - + RemoveSplit 移除分割 - + MagicWord 幻词 - + ApplySnippet 应用片段 @@ -1263,304 +1297,587 @@ VExportDialog - + Choose notes to export 选择需要导出的笔记 - + Choose target format to export as 选择导出的目标格式 - + Choose converter to render Markdown 选择渲染Markdown的渲染器 - + Choose rendering background color for Markdown 选择Markdown的渲染背景色 - + Choose rendering style for Markdown 选择Markdown的渲染样式 - + Choose rendering code block style for Markdown 选择Markdown的代码块渲染样式 - + + &Browse 浏览文件 (&B) - + Information 信息 - + Advanced Settings 高级设置 - + Output logs will be shown here 输出日志会显示在这里 - - + + Export 导出 - + Open Output Directory 打开输出目录 - + + Cancelling the export... + 正在取消导出... + + + Notes to export: 导出笔记: - + Target format: 目标格式: - + Markdown renderer: Markdown渲染器: - + Markdown rendering background: Markdown渲染背景色: - + Markdown rendering style: Markdown渲染样式: - + Markdown rendering code block style: Markdown代码块渲染样式: - + Output directory: 输出目录: - + Settings 设置 - + + Enable Table Of Contents + 启用目录 + + + + Add a table of contents to the document + 添加一个目录到文档中 + + + + Use wkhtmltopdf + 使用wkhtmltopdf + + + + Use wkhtmltopdf tool to generate PDF (wkhtmltopdf needed to be installed) + 使用wkhtmltopdf工具创建PDF(需要安装wkhtmltopdf) + + + + Download wkhtmltopdf + 下载wkhtmltopdf + + + + Tell VNote where to find wkhtmltopdf tool + 告诉VNote在哪里找到wkhtmltopdf工具 + + + + + + Empty to use the name of the first source file + 为空则使用第一个源文件的名字 + + + + Title of the generated PDF file + 创建的PDF文件的标题 + + + + Name of the generated PDF file + 创建的PDF文件的名字 + + + + Enable background + 启用背景 + + + + Enable background when printing + 打印渲染的时候启用背景 + + + + Append page number as footer + 添加页码作为页脚 + + + + Additional global options passed to wkhtmltopdf + 传给wkhtmltopdf的额外全局选项 + + + + Use " to enclose options containing spaces + 使用"来引用包含空格的选项 + + + Page layout: 页面布局: - + + wkhtmltopdf path: + wkhtmltopdf路径: + + + + Title: + 标题: + + + + + Output file name: + 输出文件名: + + + + Page number: + 页码: + + + + Additional options: + 其他参数: + + + Embed CSS styles 嵌入CSS样式 - + Embed CSS styles in HTML file 在HTML中嵌入CSS样式 - + Complete page 完整页面 - + Export the whole web page along with pictures which may not keep the HTML link structure of the original page 导出包括图片在内的整个网络页面(可能会更改原来页面的HTML链接结构) - + + MIME HTML + MIME HTML + + + + Export as a complete web page in MIME HTML format + 作为MIME HTML格式导出为一个完整网页 + + + + Process subfolders + 处理子文件夹 + + + + Process subfolders recursively + 递归处理子文件夹 + + + Current Note (%1) 当前笔记 (%1) + + + + %1 notes exported to %2. + 导出了 %1 个笔记为 %2。 + + + + Fail to export %1 notes in one PDF. + 导出 %1 个笔记为一个PDF失败。 + + + + Fail to export %1 notes in one. + 导出 %1 个笔记为一个文件失败。 + + + + Choose format of the input + 选择输入的格式 + + + + Without the preceding dot + 去掉前导点号(.) + + + + Suffix of the output file without the preceding dot + 输出文件的后缀名,不包括前导点号(.) + + + + <span><span style="font-weight:bold;">%0</span> for the input file; <span style="font-weight:bold;">%1</span> for the output file; <span style="font-weight:bold;">%2</span> for the rendering CSS style file; <span style="font-weight:bold;">%3</span> for the input file directory.</span> + <span><span style="font-weight:bold;">%0</span> 表示输入文件; <span style="font-weight:bold;">%1</span> 表示输出文件; <span style="font-weight:bold;">%2</span> 表示渲染的CSS样式文件; <span style="font-weight:bold;">%3</span> 表示输入文件所在目录。</span> + + + + Enable All In One + 启用多合一 + + + + Pass a list of input files to the custom command + 传递一个输入文件列表给自定义命令 + + + + + Separator to concatenate input files directories + 用于连接输入文件所在目录的分隔符 + + + + Name of the generated All-In-One file + 创建的多合一文件的名字 + + + + Custom command to be executed + 需要执行的自定义命令 + + + + Source format: + 源格式: + + + + Output suffix: + 输出后缀名: + + + + Input directories separator: + 输入文件所在目录分隔符: + Current Directory (%1) 当前文件夹 (%1) - + Current Folder (%1) 当前文件夹 (%1) - + Current Notebook (%1) 当前笔记本 (%1) - + Cart (%1) 小推车 (%1) - + + Markdown Markdown - + + HTML HTML - + PDF PDF - + + PDF (All In One) + PDF (多合一) + + + + Custom + 自定义 + + + Hoedown Hoedown - + Marked Marked - + Markdown-it Markdown-it - + Showdown Showdown - + System 默认 - + + Transparent + 透明 + + + + None + + + + + Left + 居左 + + + + Center + 居中 + + + + Right + 居右 + + + + Fail to start wkhtmltopdf. + 启动wkhtmltopdf失败。 + + + + wkhtmltopdf crashed. + wkhtmltopdf崩溃。 + + + + Use %1. + 使用%1。 + + + + wkhtmltopdf returned %1. + wkhtmltopdf返回%1。 + + + Export to %1. 导出到 %1 。 - + + Invalid configurations for custom export. + 非法的自定义导出配置。 + + + User cancelled the export. Aborted! 用户取消导出。终止! - + Warning 警告 - + Errors found during export. 导出过程中发生错误。 - + %1 notes exported. 导出了 %1 个笔记。 - + Select Output Directory To Export To 选择导出输出目录 - + + Executable (*.exe) + 可执行文件 (*.exe) + + + + Select wkhtmltopdf Executable + 选择wkhtmltopdf可执行文件 + + + Exporting note %1. 正在导出笔记 %1 。 - + Fail to open folder %1. 打开文件夹 %1 失败。 - - - - - + + + + + + + + Fail to create directory %1. 创建目录 %1 失败。 - + Fail to open notebook %1. 打开笔记本 %1 失败。 - + Fail to open file %1. 打开文件 %1 失败。 - + Skip exporting non-Markdown file %1 as Markdown. 跳过非Markdown文件 %1 。 - + Fail to copy the note file %1. 复制笔记文件 %1 失败。 - + Fail to copy images of note %1. 复制笔记的图片 %1 失败。 - + Fail to copy attachments folder %1 to %2. 复制附件文件夹 %1 到 %2 失败。 - - - + + + + Note %1 exported to %2. 笔记 %1 导出为 %2 。 - + Skip exporting non-Markdown file %1 as PDF. 跳过非Markdown文件 %1 。 - - + + + Fail to export note %1. 导出笔记 %1 失败。 - + Skip exporting non-Markdown file %1 as HTML. 跳过非Markdown文件 %1 。 - + + Skip exporting non-Markdown file %1. + 跳过非Markdown文件 %1 。 + + + Portrait 纵向 - + Landscape 横向 @@ -1623,6 +1940,31 @@ Exporting %1 正在导出 %1 + + + Fail to start wkhtmltopdf (%1). + 启动wkhtmltopdf失败 (%1)。 + + + + wkhtmltopdf crashed (%1). + wkhtmltopdf崩溃 (%1)。 + + + + Fail to start custom command (%1). + 启动自定义命令失败 (%1)。 + + + + Custom command crashed (%1). + 自定义命令崩溃 (%1)。 + + + + QProcess error %1. + QProcess错误 %1 。 + VFileInfoDialog @@ -2044,8 +2386,23 @@ + \1, \2 for back reference in regular expression + 使用\1,\2作为正则表达式中的向后引用 + + + + + &Advanced >>> + 高级 (&A) >>> + + + + B&asic <<< + 基本 (&A) <<< + + Enter text to replace with - 输入替换后的文本 + 输入替换后的文本 @@ -2063,9 +2420,8 @@ 全部替换 (&L) - &Advanced >> - 高级 (&A) >> + 高级 (&A) >> @@ -2243,17 +2599,17 @@ VInsertLinkDialog - + Absolute or relative path of the link 链接的绝对或相对路径 - + &Text: 文本 (&T): - + &URL: URL (&U): @@ -2261,7 +2617,7 @@ VMainWindow - + View 查看 @@ -2270,7 +2626,7 @@ 单列面板 (&S) - + Display only the notes list panel 仅显示笔记列表面板 @@ -2279,7 +2635,7 @@ 双列面板 (&T) - + Display both the folders and notes list panel 显示文件夹树和笔记列表面板 @@ -2288,27 +2644,27 @@ 紧凑模式 (&C) - + Integrate the folders and notes list panel in one column 将文件夹和笔记列表面板整合到一列 - + Expand the edit area 扩展内容编辑区域 - + Edit Toolbar 编辑工具栏 - + Heading Sequence 标题序列 - + Enable heading sequence in current note in edit mode 当前笔记在编辑模式中启用标题序列 @@ -2317,7 +2673,7 @@ 粗体 (Ctrl+B) - + Insert bold text or change selected text to bold 插入粗体或将所选文本加粗 @@ -2326,7 +2682,7 @@ 斜体 (Ctrl+I) - + Insert italic text or change selected text to italic 插入斜体或将所选文本改为斜体 @@ -2335,7 +2691,7 @@ 删除线 (Ctrl+D) - + Insert strikethrough text or change selected text to strikethroughed 插入删除线或在所选文本上添加删除线 @@ -2344,7 +2700,7 @@ 行内代码 (Ctrl+O) - + Insert inline-code text or change selected text to inline-coded 插入行内代码或将所选文本改为行内代码 @@ -2353,7 +2709,7 @@ 代码块 (Ctrl+M) - + Insert fenced code block text or wrap selected text into a fenced code block 插入代码块或将所选文本嵌入到一个代码块中 @@ -2362,7 +2718,7 @@ 插入链接 (Ctrl+L) - + Insert a link 插入一个链接 @@ -2371,7 +2727,7 @@ 插入图片 - + Insert an image from file or URL 从文件或URL插入图片 @@ -2380,7 +2736,7 @@ 打开或关闭编辑工具栏 - + Note 笔记 @@ -2393,7 +2749,7 @@ 笔记信息 (&I) - + View and edit current note's information 查看并编辑当前笔记的信息 @@ -2402,22 +2758,22 @@ 删除笔记 (&D) - + Delete current note 删除当前笔记 - + &Edit 编辑 (&E) - + Edit current note 编辑当前笔记 - + Discard changes and exit edit mode 放弃对当前笔记的更改并退出编辑模式 @@ -2430,197 +2786,202 @@ 保存更改并阅读 (Ctrl+T) - + Save changes and exit edit mode 保存对当前笔记的更改并退出编辑模式 - + Save 保存 - + + SearchDock + 搜索窗口 + + + Export 导出 - + Compact Mode 紧凑模式 - + Menu Bar 菜单栏 - + Toggle menu bar 打开或关闭菜单栏 - + Full Screen 全屏 - + Full Screen %1 全屏 %1 - + Toggle full screen 打开或关闭全屏 - + Flash Page %1 灵犀页 %1 - + Log In (Not Implemented Yet) 登录 (未实现) - + New Root Folder 新建根文件夹 - + New Note 新建笔记 - + New Note %1 新建笔记 %1 - + Note Info 笔记信息 - + Delete Note 删除笔记 - + Save %1 保存 %1 - + &Help 帮助 (&H) - + View &Log 查看日志 (&L) - + View VNote's debug log (%1) 查看VNote的调试日志 (%1) - + &Markdown Guide Markdown指南 (&M) - + A quick guide of Markdown syntax Markdown语法快速指南 - + &Documentation 文档 (&D) - + View VNote's documentation 查看VNote的文档 - + Do&nate 捐赠 (&N) - + Donate to VNote or view the donate list 捐赠给VNote或查看捐赠列表 - + Check For &Updates 检查更新 (&U) - + Check for updates of VNote 检查VNote的可用更新 - + Star VNote on &Github 支持VNote &Github项目 - + Give a star to VNote on Github project 在Github上给一个星星VNote项目 - + &Feedback 反馈 (&F) - + Open an issue on Github 在Github上反馈意见 - + About &Qt 关于Qt (&Q) - + &Markdown Markdown (&M) - + Constrain The Width Of Images 限制图片宽度 - + E&xport 导出 (&X) - + Export notes 导出笔记 - + Open Configuration Folder 打开配置文件夹 - + Open configuration folder of VNote 打开VNote的配置文件夹 @@ -2629,42 +2990,42 @@ 渲染引擎 (&C) - + Marked Marked - + Use Marked to convert Markdown to HTML (re-open current tabs to make it work) 使用Marked对Markdown进行HTML渲染(需要重新打开当前标签页) - + Hoedown Hoedown - + Use Hoedown to convert Markdown to HTML (re-open current tabs to make it work) 使用Hoedown对Markdown进行HTML渲染(需要重新打开当前标签页) - + Markdown-it Markdown-it - + Use Markdown-it to convert Markdown to HTML (re-open current tabs to make it work) 使用Markdown-it对Markdown进行HTML渲染(需要重新打开当前标签页) - + Showdown Showdown - + Use Showdown to convert Markdown to HTML (re-open current tabs to make it work) 使用Showdown对Markdown进行HTML渲染(需要重新打开当前标签页) @@ -2673,47 +3034,47 @@ 限制图片宽度 - + AttachmentList 附件列表 - + LocateCurrentFile 定位当前笔记 - + ExpandMode 扩展模式 - + OnePanelView 单列面板模式 - + DiscardAndRead 放弃更改并阅读 - + ToolsDock 工具窗口 - + CloseNote 关闭笔记 - + ShortcutsHelp 快捷键帮助 - + FlushLogFile 写入日志文件 @@ -2722,77 +3083,77 @@ 行内代码 (Ctrl+K) - + Constrain the width of images to the window in read mode (re-open current tabs to make it work) 阅读模式中根据窗口大小限制图片的宽度(需要重新打开当前标签页) - + Enable Image Caption 启用图片标题 - + Center the images and display the alt text as caption (re-open current tabs to make it work) 居中显示图片并将图片的替换文本显示为标题(需要重新打开当前标签页) - + &Mermaid Diagram Mermaid图表 (&M) - + Enable Mermaid for graph and diagram 启用Mermaid渲染图像图表 - + &Flowchart.js &Flowchart.js - + Enable Flowchart.js for flowchart diagram 启用Flowchart.js渲染流程图 - + Preview Images In Edit Mode 编辑模式预览图片 - + Constrain The Width Of Previewed Images 限制预览图片宽度 - + Constrain the width of previewed images to the edit window in edit mode 编辑模式中根据编辑窗口大小限制预览图片的宽度 - + &View 查看 (&V) - + &File 文件 (&F) - + &Open 打开 (&O) - + Open external file to edit 打开外部文件以编辑 - + Select External Files To Open 选择要打开的外部文件 @@ -2805,7 +3166,7 @@ 使用该CSS样式对Markdown的代码块进行渲染 - + Code Block Style 代码块样式 @@ -2814,47 +3175,47 @@ 打开样式文件夹以添加自定义Markdown代码块渲染CSS样式文件 - + CodeBlock 代码块 - + Display line number in code block in edit mode (for Markdown only) 编辑模式下只在代码块显示行号(仅支持Markdown) - + Set as the editor style (re-open current tabs to make it work) 设置为编辑器的样式(需要重新打开当前标签页) - + Show VNote 显示VNote - + Quit 退出VNote - + VNote VNote - + View and change settings for VNote 查看并更改VNote的配置 - + Note Toolbar 笔记工具栏 - + Attachments (drag files here to add attachments) 附件(拖动文件到此以添加附件) @@ -2867,17 +3228,17 @@ 查看VNote在Github上的维基 - + Display Line Number In Code Blocks 代码块显示行号 - + Enable line number in code blocks in read mode 阅读模式下启用代码块行号 - + Enable image preview in edit mode (re-open current tabs to make it work) 编辑模式预览图片(需要重新打开当前标签页) @@ -2890,13 +3251,13 @@ 查看并编辑VNote的配置文件(vnote.ini) - - + + Custom Shortcuts 自定义快捷键 - + Custom some standard shortcuts 自定义部分标准快捷键 @@ -2913,133 +3274,143 @@ 插入图片 (&I) - - + + Find/Replace 查找/替换 - + Open Find/Replace dialog to search in current note 打开查找/替换对话框以在当前笔记中查找 - + + Advanced Find + 高级查找 + + + + Advanced find within VNote + 在VNote中进行高级查找 + + + Find Next 查找下一个 - + Find next occurence 查找下一处出现 - + Find Previous 查找上一个 - + Find previous occurence 查找上一处出现 - + Replace 替换 - + Replace current occurence 替换当前出现 - + Replace && Find 替换并查找 - + Replace current occurence and find the next one 替换当前出现并查找下一个 - + Replace All 全部替换 - + Replace all occurences in current note 替换当前笔记中的所有出现 - + Highlight Searched Pattern 高亮查找模式 - + Highlight all occurences of searched pattern 高亮查找模式的所有出现 - + &Expand Tab 扩展Tab (&E) - + Expand entered Tab to spaces 将输入的Tab扩展为空格 - + Expand Tab to 2 spaces 扩展Tab为2个空格 - + Expand Tab to 4 spaces 扩展Tab为4个空格 - + Expand Tab to 8 spaces 扩展Tab为8个空格 - + Auto Indent 自动缩进 - + Indent automatically when inserting a new line 插入新行时自动缩进 - + Auto List 自动列表 - + Continue the list automatically when inserting a new line 插入新行时自动继续列表 - + Vim Mode Vim模式 - + Highlight Selected Words 高亮选定字词 - + Highlight all occurences of selected words 高亮选定字词的所有出现 @@ -3048,178 +3419,218 @@ 高亮行尾空白字符 - + Highlight all the spaces at the end of a line 高亮所有行尾空白字符 - + Snippets 片段 - + Cart 小推车 - + + Search + 搜索 + + + + Toggle the search dock widget + 打开或关闭搜索窗口 + + + Select Files To Create Notes 选择文件以创建笔记 - + Warning 警告 - + Fail to create notes for all the files. 无法从所有文件中创建笔记。 - + %1 %2 created from external files 从外部文件夹中创建了%1个%2 - + notes 笔记 - + note 笔记 - + <span style="font-weight: bold;">v%1</span> - + Please visit <a href="https://github.com/tamlok/vnote.git">Github</a> for more information. 请访问<a href="https://github.com/tamlok/vnote.git">Github</a>获取更多信息。 - + &Renderer 渲染器 (&R) - + Markdown-it Options Markdown-it选项 - + HTML HTML - + Enable HTML tags in source 启用文件中的HTML标签 - + Line Break 换行 - + Convert '\n' in paragraphs into line break 转换'\n'为换行 - + Linkify 自动链接 - + Convert URL-like text into links 转换URL模式的文本为链接 - + + Superscript + 上标 + + + + Enable superscript via ^^ + 启用^^表示上标 + + + + Subscript + 下标 + + + + Enable subscript via ~~ + 启用~~表示下标 + + + Use system's background color configuration for Markdown rendering 使用系统的背景色设置对Markdown进行渲染 - + + Transparent + 透明 + + + + Use a transparent background for Markdown rendering + 使用透明背景来渲染Markdown + + + Set as the background color for Markdown rendering 使用该背景色对Markdown进行渲染 - - - - - - + + + + + + Add Style 添加样式 - + Add custom style of read mode 添加阅读模式的自定义样式 - + Add custom style of code block in read mode 添加阅读模式的代码块的自定义样式 - + Add custom style of editor 添加编辑器的自定义样式 - + Headings 标题 - + Heading %1 标题%1 - + Heading %1 %2 标题%1 %2 - + Clear 清空标题 - + Clear %1 清空标题 %1 - + Theme 主题 - - + + Add Theme 添加主题 - + Add custom theme 添加自定义主题 - + Set as the theme of VNote (restart VNote to make it work) 设置为VNote的主题(重启VNote生效) @@ -3228,42 +3639,42 @@ 添加样式 (&A) - + Line Number 行号 - + None - + Do not display line number in edit mode 编辑模式下不显示行号 - + Absolute 绝对行号 - + Display absolute line number in edit mode 编辑模式下显示绝对行号 - + Relative 相对行号 - + Display line number relative to current cursor line in edit mode 编辑模式下显示相对于当前光标所在行的行号 - + Editor &Style 编辑器样式 (&S) @@ -3272,22 +3683,22 @@ 打开样式文件夹以添加自定义MDHL样式文件 - + Close VNote 关闭VNote - + Do you want to minimize VNote to system tray instead of quitting it when closing VNote? 关闭VNote时是否仅将VNote最小化到系统托盘? - + You could change the option in Settings later. 稍后可以进入设置改变该选项。 - + Print Note 打印笔记 @@ -3296,152 +3707,152 @@ 使用该样式设置编辑器 - + 2 Spaces 2个空格 - + Discard Changes And Read 放弃更改并阅读 - + Single Panel 单列面板 - + Two Panels 双列面板 - + Expand 扩展 - + Bold %1 粗体 %1 - + Italic %1 斜体 %1 - + Strikethrough %1 删除线 %1 - + Inline Code %1 行内代码 %1 - + Code Block %1 代码块 %1 - + Insert Link %1 插入链接 %1 - + Insert Image %1 插入图片 %1 - + Flash Page 灵犀页 - + Open the Flash Page to edit 打开灵犀页进行编辑 - + Edit %1 编辑 %1 - + Save Changes And Read %1 保存更改并阅读 %1 - + Edit 编辑 - + Save Changes And Read 保存更改并阅读 - + Save changes to current note 保存对当前笔记的更改 - + &Shortcuts Help 快捷键帮助 (&S) - + View information about shortcut keys 查看快捷键帮助信息 - + &About VNote 关于VNote (&A) - + View information about VNote 查看VNote的信息 - + View information about Qt 查看Qt的信息 - + Math&Jax Math&Jax - + Enable MathJax for math support in Markdown 启用MathJax渲染数学公式 - + Highlight Code Blocks In Edit Mode 编辑模式高亮代码块 - + Enable syntax highlight within code blocks in edit mode 编辑模式中启用代码块语法高亮 - + &New Notes From Files 从文件新建笔记 (&N) - + Create notes from external files in current folder by copy 通过拷贝外部文件在当前文件夹中新建笔记 @@ -3454,17 +3865,17 @@ 将当前笔记导出为PDF文件 - + &Print 打印 (&P) - + Print current note 打印当前笔记 - + &Settings 设置 (&S) @@ -3473,88 +3884,88 @@ 从文件中插入图片到当前笔记 - + 4 Spaces 4个空格 - + 8 Spaces 8个空格 - + Enable Vim mode for editing (re-open current tabs to make it work) 编辑时启用Vim模式(需要重新打开当前标签页) - + Smart Input Method In Vim Mode Vim模式智能输入法 - + Disable input method when leaving Insert mode in Vim mode Vim模式中,退出插入模式时禁用输入法 - + Highlight Cursor Line 高亮光标所在行 - + Highlight current cursor line 高亮当前光标所在行 - + Highlight Trailing Spaces 高亮行尾空白字符 - + Tab Stop Width Tab Stop宽度 - + Tools 工具 - + Outline 大纲 - + Toggle the tools dock widget 打开或关闭工具窗口 - + VNote is a Vim-inspired note-taking application for Markdown. VNote是一个受Vim启发而开发的专注于Markdown的笔记软件。 - + About VNote 关于VNote - + &Rendering Background 渲染背景 (&R) - - + + System 默认 - + Rendering &Style 渲染样式 (&S) @@ -3563,12 +3974,12 @@ 使用该CSS样式对Markdown进行渲染 - + Notebooks 笔记本 - + Folders 文件夹 @@ -3589,47 +4000,47 @@ 新建根文件夹 (&R) - + Create a root folder in current notebook 在当前笔记本中新建根文件夹 - + Create a note in current folder 在当前文件夹中新建笔记 - + &Quit 退出 (&Q) - + Quit VNote 退出VNote - + Set as the CSS style for Markdown rendering (re-open current tabs to make it work) 设置为Markdown渲染的CSS样式(需要重新打开当前标签页) - + Set as the code block CSS style for Markdown rendering (re-open current tabs to make it work) 设置为Markdown渲染的代码块CSS样式(需要重新打开当前标签页) - + &Background Color 背景颜色 (&B) - + Use system's background color configuration for editor 为编辑器使用系统的背景色设置 - + Set as the background color for editor 使用该背景色设置编辑器 @@ -3637,22 +4048,22 @@ VMarkdownTab - + Default mode to open a note 笔记默认打开模式 - + Read Mode 阅读模式 - + Edit Mode 编辑模式 - + Note open mode: 笔记打开模式: @@ -3661,57 +4072,57 @@ 标题序列 - + Enable auto sequence for all headings (in the form like 1.2.3.4.) 自动为所有标题添加序列(类似于1.2.3.4.) - + Disabled 关闭 - + Enabled 启用 - + Enabled for notes only 仅对内部笔记启用 - + Base level to start heading sequence 标题序列起始级别 - + 1 1 - + 2 2 - + 3 3 - + 4 4 - + 5 5 - + 6 6 @@ -3724,17 +4135,17 @@ 设置阅读模式下页面的缩放倍数 - + Specify the screen column in fenced code block which will be highlighted 指定编辑模式下代码块中的高亮列 - + Color column: 高亮列: - + Heading sequence: 标题序列: @@ -3820,201 +4231,268 @@ VMdEditor - + &Save Changes And Read 保存更改并阅读 (&S) - + Save changes and exit edit mode 保存对当前笔记的更改并退出编辑模式 - + &Discard Changes And Read 放弃更改并阅读 (&D) - + Discard changes and exit edit mode 放弃对当前笔记的更改并退出编辑模式 - + Following images seems not to be used in this note anymore. Please confirm the deletion of these images. 下列图片似乎已经不再在该笔记中被使用。请确认是否删除这些图片。 - + Deleted files could be found in the recycle bin of this note.<br>Click "Cancel" to leave them untouched. 被删除的文件可以在该笔记的回收站中找回。<br>点击“取消”以终止操作。 - + Confirm Cleaning Up Unused Images 确认清理未被使用的图片 - + + Insert From Clipboard 粘贴选项 - - Insert As Image - 作为图像插入 + + Insert From URL + 从URL中插入 - + + Insert From Image Data + 从图片数据中插入 + + + + + Insert As Image Link + 作为图片链接插入 + + + + Insert As Image + 作为图片插入 + + + Insert As Text 作为文本插入 - + Warning 警告 - + Fail to move unsaved inserted image %1 to %2. 移动未保存的插入图片 %1 到 %2 失败。 - + Please check it manually to avoid image loss. 请手动检查以免丢失图片。 - + Copy HTML As 复制HTML为 - + Copy selected content as HTML using rules specified by target %1 使用目标 %1 指定的规则将所选内容复制为HTML + + + Paste As Block &Quote + 粘贴为块引用 (&Q) + + + + Paste text from clipboard as block quote + 将剪切版中的文本作为块引用粘贴 + + + + Insert Image Link + 插入图片链接 + VMdTab - + Information 注意 - + Note <span style="%1">%2</span> has been modified. 笔记 <span style="%1">%2</span> 已经被更改。 - + Do you want to save your changes? 是否保存更改? - - - + + + Warning 警告 - + Could not modify a read-only note <span style="%1">%2</span>. 无法修改只读笔记 <span style="%1">%2</span>。 - + Please save your changes to other notes manually. 请手动保存更改到其他笔记。 - - + + Fail to save note. 保存笔记失败。 - + File <span style="%1">%2</span> being written has been removed. 将要写入的文件 <span style="%1">%2</span> 已经被移除。 - + Fail to write to disk when saving a note. Please try it again. 保存笔记时,写入文件失败。请稍后再试。 - + Snippet applied 片段已应用 - + Snippet %1 is not applicable 片段 %1 不适用 - + Snippets are not applicable 无法应用片段 - + No available snippets defined with shortcuts 当前没有定义带有快捷键的片段可用 - + Backup File Found 发现备份文件 - + Found backup file <span style="%1">%2</span> when opening note <span style="%1">%3</span>. 打开笔记 <span style="%1">%3</span> 时发现备份文件 <span style="%1">%2</span>。 - + VNote may crash while editing this note before.<br/>Please choose to recover from the backup file or delete it.<br/><br/>Note file last modified: <span style="%1">%2</span><br/>Backup file last modified: <span style="%1">%3</span><br/>Content comparison: <span style="%1">%4</span> VNote此前编辑该笔记时可能意外退出。<br/>请选择从该备份文件恢复或者删除该备份文件。<br/><br/>笔记文件上次修改时间: <span style="%1">%2</span><br/>备份文件上次修改时间: <span style="%1">%3</span><br/>内容比较: <span style="%1">%4</span> - + Identical 一致 - + Different 有区别 - + Recover From Backup File 从备份文件恢复 - + Discard Backup File 放弃备份文件 - + Cancel 取消 - + Quit 退出 - + Not an editor command: %1 不是一个编辑器命令:%1 + + + Page saved to %1 + 页面保存为 %1 + + + + Fail to save page to %1 + 保存页面为 %1 失败 + + + + Single HTML (*.html) + 仅HTML (*.html) + + + + Complete HTML (*.html) + 完整HTML (*.html) + + + + MIME HTML (*.mht) + MIME HTML (*.mht) + + + + Save Page + 保存页面 + + + + Saving page to %1 + 正在保存页面为 %1 + VMetaWordManager @@ -4396,43 +4874,43 @@ VNoteManagementTab - + Notes 笔记 - + External Files 外部文件 - - + + Custom image folder 自定义图片文件夹 - + Set the global name of the image folder to hold images of notes (restart VNote to make it work) 全局设置图片文件夹的名字以保存笔记的图片(重启VNote生效) - + Custom attachment folder 自定义附件文件夹 - + Set the global name of the attachment folder to hold attachments of notes (restart VNote to make it work) 全局设置附件文件夹的名字以保存笔记的附件(重启VNote生效) - + Name of the attachment folder 附件文件夹的名字 - + Set the path of the global image folder to hold images of external files (restart VNote to make it work). You could use both absolute or relative path here. If absolute path is used, VNote will not manage those images, so you need to clean up unused images manually. @@ -4441,8 +4919,8 @@ those images, so you need to clean up unused images manually. 这些图片,需要由用户手动清理不再使用的图片。 - - + + Name of the image folder 图片文件夹的名字 @@ -4713,34 +5191,345 @@ If absolute path is used, VNote will not manage those images.(empty to use globa + Flash current heading + 闪烁当前标题 + + + + Flash current heading on change + 当前标题发生改变时闪烁 + + + Swap file 交换文件 - + Automatically save changes to a swap file for backup 自动将更改保存到交换文件中以备份 - + Auto save 自动保存 - + Automatically save the note when editing 编辑时自动保存笔记 - + It's recommended to enable "Swap file" or "Auto save", not both 推荐启用“交换文件”或“自动保存”,但不推荐两者都启用 + + VSearchEngineWorker + + + Skip binary file %1. + 跳过二进制文件 %1 。 + + + + VSearchResultTree + + + &Open + 打开 (&O) + + + + Open selected notes + 打开选定笔记 + + + + &Locate To Folder + 定位所在文件夹 (&L) + + + + Locate the folder of current note + 定位到当前笔记所在的文件夹 + + + + Add To Cart + 添加到小推车 + + + + Add selected notes to Cart for further processing + 将所选笔记添加到小推车以进一步处理 + + + + %1 %2 added to Cart + %1个%2添加到小推车 + + + + notes + 笔记 + + + + note + 笔记 + + + + VSearcher + + + Search + 搜索 + + + + Clear Results + 清空结果 + + + + Advanced Settings + 高级设置 + + + + Console + 控制台 + + + + Keywords to search for + 需要搜索的关键词 + + + + Supports space, &&, and || + 支持空格,&& 和 || + + + + Scope to search + 搜索范围 + + + + Object to search + 搜索对象 + + + + Target to search + 搜索目标 + + + + Wildcard pattern to filter the files to be searched + 用于筛选将要被搜索的文件的通配符模式 + + + + Engine to execute the search + 执行搜索的引擎 + + + + &Case sensitive + 区分大小写 (&C) + + + + &Whole word only + 完整字词匹配 (&W) + + + + &Fuzzy search + 模糊搜索 (&F) + + + + Not available for content search + 对内容搜索无效 + + + + Re&gular expression + 正则表达式 (&G) + + + + File pattern: + 文件模式: + + + + Engine: + 引擎: + + + + Cancel + 取消 + + + + Cancelling the search... + 正在取消搜索... + + + + Output logs will be shown here + 输出日志会显示在这里 + + + + Keywords: + 关键词: + + + + Scope: + 范围: + + + + Object: + 对象: + + + + Target: + 目标: + + + + Current Note + 当前笔记 + + + + Opened Notes + 已打开笔记 + + + + Current Folder + 当前文件夹 + + + + Current Notebook + 当前笔记本 + + + + All Notebooks + 所有笔记本 + + + + Name + 名字 + + + + Content + 内容 + + + + Note + 笔记 + + + + Folder + 文件夹 + + + + Notebook + 笔记本 + + + + All + 所有 + + + + Internal + 内置 + + + + Search started. + 搜索开始。 + + + + Search current note %1. + 搜索当前笔记 %1 。 + + + + Search current folder %1. + 搜索当前文件夹 %1 。 + + + + Search current notebook %1. + 搜索当前笔记本 %1 。 + + + + Search is on going. + 搜索正在进行。 + + + + Search succeeded. + 搜索成功。 + + + + + Search failed. + 搜索失败。 + + + + + Warning + 警告 + + + + User cancelled the search. Aborted! + 用户取消搜索。终止! + + + + Errors found during search. + 搜索过程中发生错误。 + + + + %1 Items + %1 项 + + VSelectDialog - + Cancel 取消 @@ -5074,45 +5863,71 @@ If absolute path is used, VNote will not manage those images.(empty to use globa VTabIndicator - + The type of the file 文件类型 - + ReadOnly 只读 - + This file is read-only 文件为只读 - + Standalone 独立文件 - + This file is not managed by any notebook or folder 文件未被任何笔记本或文件夹管理 - + System 系统文件 - + This file is a system file 文件为系统文件 - + + + [W] + [词] + + + + Word Count Information + 字数信息 + + + <span><span style="font-weight:bold;">Line</span>: %1 - %2(%3%) <span style="font-weight:bold;">Col</span>: %4</span> <span><span style="font-weight:bold;">行</span>: %1 - %2(%3%) <span style="font-weight:bold;">列</span>: %4</span> + + + [%1]%2 + [%1]%2 + + + + C + + + + + W + + VTipsDialog @@ -5387,22 +6202,22 @@ Latest Version: v%2 编辑当前笔记 - + Copy As 复制为 - + Copy selected content using rules specified by target %1 使用目标 %1 指定的规则复制所选内容 - + Copy All As 复制全部为 - + Copy all content using rules specified by target %1 使用目标 %1 指定的规则复制全部内容 @@ -5423,4 +6238,40 @@ Latest Version: v%2 不带背景样式复制全部内容 + + VWordCountPanel + + + + Words + + + + + + Characters (no spaces) + 字 (不含空格) + + + + + Characters (with spaces) + 字 (含空格) + + + + Read + 阅读 + + + + Edit + 编辑 + + + + Word Count + 字数 + + diff --git a/src/vsearcher.cpp b/src/vsearcher.cpp index 63c693e6..b0c3fb1c 100644 --- a/src/vsearcher.cpp +++ b/src/vsearcher.cpp @@ -185,7 +185,7 @@ void VSearcher::setupUI() connect(m_cancelBtn, &QPushButton::clicked, this, [this]() { if (m_inSearch) { - appendLogLine(tr("Cancelling the export...")); + appendLogLine(tr("Cancelling the search...")); m_askedToStop = true; m_search.stop(); } diff --git a/src/vtabindicator.cpp b/src/vtabindicator.cpp index 2d0739fa..be7a6d05 100644 --- a/src/vtabindicator.cpp +++ b/src/vtabindicator.cpp @@ -7,104 +7,89 @@ #include "vbuttonwithwidget.h" #include "vwordcountinfo.h" -class VWordCountPanel : public QWidget +VWordCountPanel::VWordCountPanel(QWidget *p_parent) + : QWidget(p_parent) { -public: - VWordCountPanel(QWidget *p_parent) - : QWidget(p_parent) - { - m_wordLabel = new QLabel(); - m_wordLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - m_charWithoutSpacesLabel = new QLabel(); - m_charWithoutSpacesLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - m_charWithSpacesLabel = new QLabel(); - m_charWithSpacesLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_wordLabel = new QLabel(); + m_wordLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_charWithoutSpacesLabel = new QLabel(); + m_charWithoutSpacesLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_charWithSpacesLabel = new QLabel(); + m_charWithSpacesLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - QFormLayout *readLayout = new QFormLayout(); - readLayout->addRow(tr("Words"), m_wordLabel); - readLayout->addRow(tr("Characters (no spaces)"), m_charWithoutSpacesLabel); - readLayout->addRow(tr("Characters (with spaces)"), m_charWithSpacesLabel); - m_readBox = new QGroupBox(tr("Read")); - m_readBox->setLayout(readLayout); + QFormLayout *readLayout = new QFormLayout(); + readLayout->addRow(tr("Words"), m_wordLabel); + readLayout->addRow(tr("Characters (no spaces)"), m_charWithoutSpacesLabel); + readLayout->addRow(tr("Characters (with spaces)"), m_charWithSpacesLabel); + m_readBox = new QGroupBox(tr("Read")); + m_readBox->setLayout(readLayout); - m_wordEditLabel = new QLabel(); - m_wordEditLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - m_charWithoutSpacesEditLabel = new QLabel(); - m_charWithoutSpacesEditLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - m_charWithSpacesEditLabel = new QLabel(); - m_charWithSpacesEditLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_wordEditLabel = new QLabel(); + m_wordEditLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_charWithoutSpacesEditLabel = new QLabel(); + m_charWithoutSpacesEditLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_charWithSpacesEditLabel = new QLabel(); + m_charWithSpacesEditLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - QLabel *cwsLabel = new QLabel(tr("Characters (with spaces)")); - cwsLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); + QLabel *cwsLabel = new QLabel(tr("Characters (with spaces)")); + cwsLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - QFormLayout *editLayout = new QFormLayout(); - editLayout->addRow(tr("Words"), m_wordEditLabel); - editLayout->addRow(tr("Characters (no spaces)"), m_charWithoutSpacesEditLabel); - editLayout->addRow(cwsLabel, m_charWithSpacesEditLabel); - m_editBox = new QGroupBox(tr("Edit")); - m_editBox->setLayout(editLayout); + QFormLayout *editLayout = new QFormLayout(); + editLayout->addRow(tr("Words"), m_wordEditLabel); + editLayout->addRow(tr("Characters (no spaces)"), m_charWithoutSpacesEditLabel); + editLayout->addRow(cwsLabel, m_charWithSpacesEditLabel); + m_editBox = new QGroupBox(tr("Edit")); + m_editBox->setLayout(editLayout); - QLabel *titleLabel = new QLabel(tr("Word Count")); - titleLabel->setProperty("TitleLabel", true); - QVBoxLayout *mainLayout = new QVBoxLayout(); - mainLayout->addWidget(titleLabel); - mainLayout->addWidget(m_readBox); - mainLayout->addWidget(m_editBox); + QLabel *titleLabel = new QLabel(tr("Word Count")); + titleLabel->setProperty("TitleLabel", true); + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->addWidget(titleLabel); + mainLayout->addWidget(m_readBox); + mainLayout->addWidget(m_editBox); - setLayout(mainLayout); + setLayout(mainLayout); - setMinimumWidth(300); - } + setMinimumWidth(300); +} - void updateReadInfo(const VWordCountInfo &p_readInfo) - { - if (p_readInfo.isNull()) { - m_wordLabel->clear(); - m_charWithoutSpacesLabel->clear(); - m_charWithSpacesLabel->clear(); - } else { - m_wordLabel->setText(QString::number(p_readInfo.m_wordCount)); - m_charWithoutSpacesLabel->setText(QString::number(p_readInfo.m_charWithoutSpacesCount)); - m_charWithSpacesLabel->setText(QString::number(p_readInfo.m_charWithSpacesCount)); - } - } - - void updateEditInfo(const VWordCountInfo &p_editInfo) - { - if (p_editInfo.isNull()) { - m_wordEditLabel->clear(); - m_charWithoutSpacesEditLabel->clear(); - m_charWithSpacesEditLabel->clear(); - } else { - m_wordEditLabel->setText(QString::number(p_editInfo.m_wordCount)); - m_charWithoutSpacesEditLabel->setText(QString::number(p_editInfo.m_charWithoutSpacesCount)); - m_charWithSpacesEditLabel->setText(QString::number(p_editInfo.m_charWithSpacesCount)); - } - } - - void clear() - { +void VWordCountPanel::updateReadInfo(const VWordCountInfo &p_readInfo) +{ + if (p_readInfo.isNull()) { m_wordLabel->clear(); m_charWithoutSpacesLabel->clear(); m_charWithSpacesLabel->clear(); + } else { + m_wordLabel->setText(QString::number(p_readInfo.m_wordCount)); + m_charWithoutSpacesLabel->setText(QString::number(p_readInfo.m_charWithoutSpacesCount)); + m_charWithSpacesLabel->setText(QString::number(p_readInfo.m_charWithSpacesCount)); + } +} +void VWordCountPanel::updateEditInfo(const VWordCountInfo &p_editInfo) +{ + if (p_editInfo.isNull()) { m_wordEditLabel->clear(); m_charWithoutSpacesEditLabel->clear(); m_charWithSpacesEditLabel->clear(); + } else { + m_wordEditLabel->setText(QString::number(p_editInfo.m_wordCount)); + m_charWithoutSpacesEditLabel->setText(QString::number(p_editInfo.m_charWithoutSpacesCount)); + m_charWithSpacesEditLabel->setText(QString::number(p_editInfo.m_charWithSpacesCount)); } +} -private: - QLabel *m_wordLabel; - QLabel *m_charWithoutSpacesLabel; - QLabel *m_charWithSpacesLabel; +void VWordCountPanel::clear() +{ + m_wordLabel->clear(); + m_charWithoutSpacesLabel->clear(); + m_charWithSpacesLabel->clear(); - QLabel *m_wordEditLabel; - QLabel *m_charWithoutSpacesEditLabel; - QLabel *m_charWithSpacesEditLabel; + m_wordEditLabel->clear(); + m_charWithoutSpacesEditLabel->clear(); + m_charWithSpacesEditLabel->clear(); +} - QGroupBox *m_readBox; - QGroupBox *m_editBox; -}; VTabIndicator::VTabIndicator(QWidget *p_parent) : QWidget(p_parent), diff --git a/src/vtabindicator.h b/src/vtabindicator.h index 1adecea4..c12233e7 100644 --- a/src/vtabindicator.h +++ b/src/vtabindicator.h @@ -8,6 +8,33 @@ class QLabel; class VButtonWithWidget; class VEditTab; class VWordCountPanel; +class QGroupBox; + +class VWordCountPanel : public QWidget +{ + Q_OBJECT +public: + VWordCountPanel(QWidget *p_parent = nullptr); + + void updateReadInfo(const VWordCountInfo &p_readInfo); + + void updateEditInfo(const VWordCountInfo &p_editInfo); + + void clear(); + +private: + QLabel *m_wordLabel; + QLabel *m_charWithoutSpacesLabel; + QLabel *m_charWithSpacesLabel; + + QLabel *m_wordEditLabel; + QLabel *m_charWithoutSpacesEditLabel; + QLabel *m_charWithSpacesEditLabel; + + QGroupBox *m_readBox; + QGroupBox *m_editBox; +}; + class VTabIndicator : public QWidget {