feat: 恢复代码高亮和命令行执行功能;
This commit is contained in:
parent
80466531a2
commit
b51af3cd71
|
@ -19,10 +19,6 @@
|
||||||
#include <QTextCursor>
|
#include <QTextCursor>
|
||||||
#include <QTextDocumentFragment>
|
#include <QTextDocumentFragment>
|
||||||
|
|
||||||
#define STDIN_FILENO 0 /* Standard input. */
|
|
||||||
#define STDOUT_FILENO 1 /* Standard output. */
|
|
||||||
#define STDERR_FILENO 2 /* Standard error output. */
|
|
||||||
|
|
||||||
QConsoleWidget::QConsoleWidget(QWidget *parent)
|
QConsoleWidget::QConsoleWidget(QWidget *parent)
|
||||||
: WingCodeEdit(parent), mode_(Output) {
|
: WingCodeEdit(parent), mode_(Output) {
|
||||||
|
|
||||||
|
@ -93,15 +89,12 @@ void QConsoleWidget::handleReturnKey() {
|
||||||
if (!code.isEmpty())
|
if (!code.isEmpty())
|
||||||
history_.add(code);
|
history_.add(code);
|
||||||
|
|
||||||
// append the newline char and
|
|
||||||
// send signal / update iodevice
|
// send signal / update iodevice
|
||||||
code += "\n";
|
|
||||||
if (iodevice_->isOpen())
|
if (iodevice_->isOpen())
|
||||||
iodevice_->consoleWidgetInput(code);
|
iodevice_->consoleWidgetInput(code);
|
||||||
else {
|
|
||||||
emit consoleCommand(code);
|
emit consoleCommand(code);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void QConsoleWidget::handleTabKey() {
|
void QConsoleWidget::handleTabKey() {
|
||||||
QTextCursor tc = this->textCursor();
|
QTextCursor tc = this->textCursor();
|
||||||
|
@ -446,9 +439,4 @@ QTextStream &inputMode(QTextStream &s) {
|
||||||
d->widget()->setMode(QConsoleWidget::Input);
|
d->widget()->setMode(QConsoleWidget::Input);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
QTextStream &outChannel(QTextStream &s) {
|
QTextStream &outChannel(QTextStream &s) { return s; }
|
||||||
QConsoleIODevice *d = qobject_cast<QConsoleIODevice *>(s.device());
|
|
||||||
if (d)
|
|
||||||
d->setCurrentWriteChannel(STDOUT_FILENO);
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
|
@ -173,9 +173,13 @@ set(DIALOG_SRC
|
||||||
src/dialog/historydeldialog.ui
|
src/dialog/historydeldialog.ui
|
||||||
src/dialog/crashreport.h
|
src/dialog/crashreport.h
|
||||||
src/dialog/crashreport.cpp
|
src/dialog/crashreport.cpp
|
||||||
src/dialog/crashreport.ui)
|
src/dialog/crashreport.ui
|
||||||
|
src/dialog/showtextdialog.cpp
|
||||||
|
src/dialog/aboutsoftwaredialog.h)
|
||||||
|
|
||||||
set(CONTROL_SRC
|
set(CONTROL_SRC
|
||||||
|
src/control/codeedit.h
|
||||||
|
src/control/codeedit.cpp
|
||||||
src/control/editorview.h
|
src/control/editorview.h
|
||||||
src/control/editorview.cpp
|
src/control/editorview.cpp
|
||||||
src/control/toast.h
|
src/control/toast.h
|
||||||
|
@ -275,7 +279,8 @@ set(CLASS_SRC
|
||||||
src/class/pluginsystem.h
|
src/class/pluginsystem.h
|
||||||
src/class/pluginsystem.cpp
|
src/class/pluginsystem.cpp
|
||||||
src/class/inspectqtloghelper.h
|
src/class/inspectqtloghelper.h
|
||||||
src/class/inspectqtloghelper.cpp)
|
src/class/inspectqtloghelper.cpp
|
||||||
|
src/class/codeinfotip.h)
|
||||||
|
|
||||||
set(INTERNAL_PLG_SRC
|
set(INTERNAL_PLG_SRC
|
||||||
src/class/wingangelapi.h src/class/wingangelapi.cpp
|
src/class/wingangelapi.h src/class/wingangelapi.cpp
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
|
@ -74,25 +74,25 @@
|
||||||
<context>
|
<context>
|
||||||
<name>AppManager</name>
|
<name>AppManager</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="73"/>
|
<location filename="../../src/class/appmanager.cpp" line="75"/>
|
||||||
<source>GenericCallNotFullySupported</source>
|
<source>GenericCallNotFullySupported</source>
|
||||||
<translation>该软件脚本系统不完全支持通用调用,故软件将会退出。</translation>
|
<translation>该软件脚本系统不完全支持通用调用,故软件将会退出。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="89"/>
|
<location filename="../../src/class/appmanager.cpp" line="95"/>
|
||||||
<source>SetupClang</source>
|
<source>SetupClang</source>
|
||||||
<translation>启动 Clang 服务</translation>
|
<translation>启动 Clang 服务</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="120"/>
|
<location filename="../../src/class/appmanager.cpp" line="126"/>
|
||||||
<source>OpeningFiles</source>
|
<source>OpeningFiles</source>
|
||||||
<translation>打开文件</translation>
|
<translation>打开文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="163"/>
|
<location filename="../../src/class/appmanager.cpp" line="169"/>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="173"/>
|
<location filename="../../src/class/appmanager.cpp" line="179"/>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="189"/>
|
<location filename="../../src/class/appmanager.cpp" line="195"/>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="205"/>
|
<location filename="../../src/class/appmanager.cpp" line="211"/>
|
||||||
<source>AlreadyOpened</source>
|
<source>AlreadyOpened</source>
|
||||||
<translation>文件已被打开</translation>
|
<translation>文件已被打开</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4361,32 +4361,32 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ScriptingConsole</name>
|
<name>ScriptingConsole</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="96"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="100"/>
|
||||||
<source>Scripting console for WingHexExplorer</source>
|
<source>Scripting console for WingHexExplorer</source>
|
||||||
<translation>羽云十六进制编辑器脚本控制台</translation>
|
<translation>羽云十六进制编辑器脚本控制台</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="99"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="102"/>
|
||||||
<source>>>>> Powered by AngelScript <<<<</source>
|
<source>>>>> Powered by AngelScript <<<<</source>
|
||||||
<translation>>>>> 由 AngelScript 引擎提供支持 <<<<</translation>
|
<translation>>>>> 由 AngelScript 引擎提供支持 <<<<</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="58"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="61"/>
|
||||||
<source>[Info]</source>
|
<source>[Info]</source>
|
||||||
<translation>【信息】</translation>
|
<translation>【信息】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="66"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="69"/>
|
||||||
<source>[Warn]</source>
|
<source>[Warn]</source>
|
||||||
<translation>【警告】</translation>
|
<translation>【警告】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="74"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="77"/>
|
||||||
<source>[Error]</source>
|
<source>[Error]</source>
|
||||||
<translation>【错误】</translation>
|
<translation>【错误】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="174"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="177"/>
|
||||||
<source>[Console]</source>
|
<source>[Console]</source>
|
||||||
<translation>【控制台】</translation>
|
<translation>【控制台】</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4404,401 +4404,401 @@
|
||||||
<translation>因权限无法打开脚本</translation>
|
<translation>因权限无法打开脚本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="272"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="274"/>
|
||||||
<source>File</source>
|
<source>File</source>
|
||||||
<translation>文件</translation>
|
<translation>文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="273"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="275"/>
|
||||||
<source>Edit</source>
|
<source>Edit</source>
|
||||||
<translation>编辑</translation>
|
<translation>编辑</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="275"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="277"/>
|
||||||
<source>Debugger</source>
|
<source>Debugger</source>
|
||||||
<translation>调试器</translation>
|
<translation>调试器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="277"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="279"/>
|
||||||
<source>Setting</source>
|
<source>Setting</source>
|
||||||
<translation>设置</translation>
|
<translation>设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="278"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="280"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation>关于</translation>
|
<translation>关于</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="294"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="296"/>
|
||||||
<source>InvalidSourceFile</source>
|
<source>InvalidSourceFile</source>
|
||||||
<translation>非法代码文件</translation>
|
<translation>非法代码文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="303"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="305"/>
|
||||||
<source>Basic</source>
|
<source>Basic</source>
|
||||||
<translation>基础</translation>
|
<translation>基础</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="304"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="306"/>
|
||||||
<source>New</source>
|
<source>New</source>
|
||||||
<translation>新建</translation>
|
<translation>新建</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="307"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="309"/>
|
||||||
<source>OpenF</source>
|
<source>OpenF</source>
|
||||||
<translation>打开文件</translation>
|
<translation>打开文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="310"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="312"/>
|
||||||
<source>RecentFiles</source>
|
<source>RecentFiles</source>
|
||||||
<translation>最近打开</translation>
|
<translation>最近打开</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="314"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="316"/>
|
||||||
<source>Reload</source>
|
<source>Reload</source>
|
||||||
<translation>重新加载</translation>
|
<translation>重新加载</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="319"/>
|
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="321"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="321"/>
|
||||||
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="323"/>
|
||||||
<source>Save</source>
|
<source>Save</source>
|
||||||
<translation>保存</translation>
|
<translation>保存</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="326"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="328"/>
|
||||||
<source>SaveAs</source>
|
<source>SaveAs</source>
|
||||||
<translation>另存为</translation>
|
<translation>另存为</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="338"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="340"/>
|
||||||
<source>General</source>
|
<source>General</source>
|
||||||
<translation>基本</translation>
|
<translation>基本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="340"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="342"/>
|
||||||
<source>Undo</source>
|
<source>Undo</source>
|
||||||
<translation>撤销</translation>
|
<translation>撤销</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="345"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="347"/>
|
||||||
<source>Redo</source>
|
<source>Redo</source>
|
||||||
<translation>恢复</translation>
|
<translation>恢复</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="351"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="353"/>
|
||||||
<source>Cut</source>
|
<source>Cut</source>
|
||||||
<translation>剪切</translation>
|
<translation>剪切</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="355"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="357"/>
|
||||||
<source>Copy</source>
|
<source>Copy</source>
|
||||||
<translation>复制</translation>
|
<translation>复制</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="360"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="362"/>
|
||||||
<source>Paste</source>
|
<source>Paste</source>
|
||||||
<translation>粘贴</translation>
|
<translation>粘贴</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="364"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="366"/>
|
||||||
<source>Delete</source>
|
<source>Delete</source>
|
||||||
<translation>删除</translation>
|
<translation>删除</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="370"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="372"/>
|
||||||
<source>Lookup</source>
|
<source>Lookup</source>
|
||||||
<translation>查询</translation>
|
<translation>查询</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="371"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="373"/>
|
||||||
<source>Find</source>
|
<source>Find</source>
|
||||||
<translation>查找</translation>
|
<translation>查找</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="375"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="377"/>
|
||||||
<source>Replace</source>
|
<source>Replace</source>
|
||||||
<translation>替换</translation>
|
<translation>替换</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="380"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="382"/>
|
||||||
<source>Goto</source>
|
<source>Goto</source>
|
||||||
<translation>跳转</translation>
|
<translation>跳转</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="387"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="389"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="520"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="522"/>
|
||||||
<source>Format</source>
|
<source>Format</source>
|
||||||
<translation>代码样式</translation>
|
<translation>代码样式</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="388"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="390"/>
|
||||||
<source>CodeFormat</source>
|
<source>CodeFormat</source>
|
||||||
<translation>代码格式化</translation>
|
<translation>代码格式化</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="397"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="399"/>
|
||||||
<source>Window</source>
|
<source>Window</source>
|
||||||
<translation>窗体</translation>
|
<translation>窗体</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="400"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="402"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="515"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="517"/>
|
||||||
<source>Editor</source>
|
<source>Editor</source>
|
||||||
<translation>编辑器</translation>
|
<translation>编辑器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="404"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="406"/>
|
||||||
<source>Tools</source>
|
<source>Tools</source>
|
||||||
<translation>工具</translation>
|
<translation>工具</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="409"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="411"/>
|
||||||
<source>Layout</source>
|
<source>Layout</source>
|
||||||
<translation>布局</translation>
|
<translation>布局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="410"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="412"/>
|
||||||
<source>Fullscreen</source>
|
<source>Fullscreen</source>
|
||||||
<translation>全屏</translation>
|
<translation>全屏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="412"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="414"/>
|
||||||
<source>RestoreLayout</source>
|
<source>RestoreLayout</source>
|
||||||
<translation>恢复默认布局</translation>
|
<translation>恢复默认布局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="477"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="479"/>
|
||||||
<source>BreakPoint</source>
|
<source>BreakPoint</source>
|
||||||
<translation>断点</translation>
|
<translation>断点</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="479"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="481"/>
|
||||||
<source>ToggleBreakPoint</source>
|
<source>ToggleBreakPoint</source>
|
||||||
<translation>切换断点</translation>
|
<translation>切换断点</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="482"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="484"/>
|
||||||
<source>AddBreakPoint</source>
|
<source>AddBreakPoint</source>
|
||||||
<translation>添加断点</translation>
|
<translation>添加断点</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="513"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="515"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation>设置</translation>
|
<translation>设置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="518"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="520"/>
|
||||||
<source>ClangFormat</source>
|
<source>ClangFormat</source>
|
||||||
<translation>Clang Format</translation>
|
<translation>Clang Format</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="553"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="555"/>
|
||||||
<source>Local</source>
|
<source>Local</source>
|
||||||
<translation>本地</translation>
|
<translation>本地</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="559"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="561"/>
|
||||||
<source>Global</source>
|
<source>Global</source>
|
||||||
<translation>全局</translation>
|
<translation>全局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="562"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="564"/>
|
||||||
<source>Variables</source>
|
<source>Variables</source>
|
||||||
<translation>变量</translation>
|
<translation>变量</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="573"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="575"/>
|
||||||
<source>ConsoleOutput</source>
|
<source>ConsoleOutput</source>
|
||||||
<translation>输出</translation>
|
<translation>输出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="587"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="589"/>
|
||||||
<source>StackTrace</source>
|
<source>StackTrace</source>
|
||||||
<translation>栈跟踪</translation>
|
<translation>栈跟踪</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="598"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="600"/>
|
||||||
<source>Symbol</source>
|
<source>Symbol</source>
|
||||||
<translation>符号</translation>
|
<translation>符号</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="684"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="686"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="929"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="926"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1107"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1104"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1143"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1140"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1163"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1160"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1191"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>错误</translation>
|
<translation>错误</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="685"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="687"/>
|
||||||
<source>Too much opened files</source>
|
<source>Too much opened files</source>
|
||||||
<translation>打开的文件过多,无法继续操作!</translation>
|
<translation>打开的文件过多,无法继续操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="709"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="711"/>
|
||||||
<source>ConfirmSave</source>
|
<source>ConfirmSave</source>
|
||||||
<translation>正在关闭未保存的脚本文件,你确定保存吗?</translation>
|
<translation>正在关闭未保存的脚本文件,你确定保存吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="745"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="747"/>
|
||||||
<source>ScriptSaveFailedClose</source>
|
<source>ScriptSaveFailedClose</source>
|
||||||
<translation>脚本保存失败,你仍确认关闭吗?</translation>
|
<translation>脚本保存失败,你仍确认关闭吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="890"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="887"/>
|
||||||
<source>Debuging...</source>
|
<source>Debuging...</source>
|
||||||
<translation>调试中...</translation>
|
<translation>调试中...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="893"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="890"/>
|
||||||
<source>Running...</source>
|
<source>Running...</source>
|
||||||
<translation>运行中...</translation>
|
<translation>运行中...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1081"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1078"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1122"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1119"/>
|
||||||
<source>ChooseFile</source>
|
<source>ChooseFile</source>
|
||||||
<translation>选择文件</translation>
|
<translation>选择文件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="929"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="926"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1107"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1104"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1163"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1160"/>
|
||||||
<source>FilePermission</source>
|
<source>FilePermission</source>
|
||||||
<translation>因文件权限无法继续!</translation>
|
<translation>因文件权限无法继续!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1141"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1138"/>
|
||||||
<source>ReloadSuccessfully</source>
|
<source>ReloadSuccessfully</source>
|
||||||
<translation>文件重新加载成功!</translation>
|
<translation>文件重新加载成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1143"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1140"/>
|
||||||
<source>ReloadUnSuccessfully</source>
|
<source>ReloadUnSuccessfully</source>
|
||||||
<translation>文件重新加载失败!</translation>
|
<translation>文件重新加载失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1180"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1177"/>
|
||||||
<source>ChooseSaveFile</source>
|
<source>ChooseSaveFile</source>
|
||||||
<translation>请选择保存文件路径:</translation>
|
<translation>请选择保存文件路径:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1161"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1158"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1189"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1186"/>
|
||||||
<source>SaveSuccessfully</source>
|
<source>SaveSuccessfully</source>
|
||||||
<translation>保存成功!</translation>
|
<translation>保存成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1191"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
|
||||||
<source>SaveUnSuccessfully</source>
|
<source>SaveUnSuccessfully</source>
|
||||||
<translation>保存失败!</translation>
|
<translation>保存失败!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1267"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1264"/>
|
||||||
<source>FormatCodeFailed</source>
|
<source>FormatCodeFailed</source>
|
||||||
<translation>代码格式化失败</translation>
|
<translation>代码格式化失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1316"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1313"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1334"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1331"/>
|
||||||
<source>CannotSave2RunScript</source>
|
<source>CannotSave2RunScript</source>
|
||||||
<translation>无法保存,故无法继续运行脚本。</translation>
|
<translation>无法保存,故无法继续运行脚本。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="731"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="733"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1394"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1391"/>
|
||||||
<source>ScriptStillRunning</source>
|
<source>ScriptStillRunning</source>
|
||||||
<translation>脚本仍在运行,你确定要退出吗?</translation>
|
<translation>脚本仍在运行,你确定要退出吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="245"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="247"/>
|
||||||
<source>ConfirmScriptSave</source>
|
<source>ConfirmScriptSave</source>
|
||||||
<translation>你尝试关闭程序,但仍存在未保存的脚本文件,你确定保存这些更改吗?</translation>
|
<translation>你尝试关闭程序,但仍存在未保存的脚本文件,你确定保存这些更改吗?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="274"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="276"/>
|
||||||
<source>View</source>
|
<source>View</source>
|
||||||
<translation>视图</translation>
|
<translation>视图</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="423"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="425"/>
|
||||||
<source>Debug</source>
|
<source>Debug</source>
|
||||||
<translation>调试</translation>
|
<translation>调试</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="425"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="427"/>
|
||||||
<source>Run</source>
|
<source>Run</source>
|
||||||
<translation>运行</translation>
|
<translation>运行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="431"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="433"/>
|
||||||
<source>RunWithDbg</source>
|
<source>RunWithDbg</source>
|
||||||
<translation>调试运行</translation>
|
<translation>调试运行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="438"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="440"/>
|
||||||
<source>Pause</source>
|
<source>Pause</source>
|
||||||
<translation>暂停</translation>
|
<translation>暂停</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="442"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="444"/>
|
||||||
<source>Continue</source>
|
<source>Continue</source>
|
||||||
<translation>继续</translation>
|
<translation>继续</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="449"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="451"/>
|
||||||
<source>Stop</source>
|
<source>Stop</source>
|
||||||
<translation>停止</translation>
|
<translation>停止</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="454"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="456"/>
|
||||||
<source>Restart</source>
|
<source>Restart</source>
|
||||||
<translation>重启</translation>
|
<translation>重启</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="458"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="460"/>
|
||||||
<source>StepInto</source>
|
<source>StepInto</source>
|
||||||
<translation>单步步入</translation>
|
<translation>单步步入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="463"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="465"/>
|
||||||
<source>StepOver</source>
|
<source>StepOver</source>
|
||||||
<translation>单步步过</translation>
|
<translation>单步步过</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="468"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="470"/>
|
||||||
<source>StepOut</source>
|
<source>StepOut</source>
|
||||||
<translation>单步跳出</translation>
|
<translation>单步跳出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="485"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="487"/>
|
||||||
<source>RemoveBreakPoint</source>
|
<source>RemoveBreakPoint</source>
|
||||||
<translation>删除断点</translation>
|
<translation>删除断点</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="526"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="528"/>
|
||||||
<source>Info</source>
|
<source>Info</source>
|
||||||
<translation>信息</translation>
|
<translation>信息</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="528"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="530"/>
|
||||||
<source>Software</source>
|
<source>Software</source>
|
||||||
<translation>软件</translation>
|
<translation>软件</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="531"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="533"/>
|
||||||
<source>Sponsor</source>
|
<source>Sponsor</source>
|
||||||
<translation>赞助</translation>
|
<translation>赞助</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="534"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="536"/>
|
||||||
<source>Wiki</source>
|
<source>Wiki</source>
|
||||||
<translation>网页 Wiki</translation>
|
<translation>网页 Wiki</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="537"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="539"/>
|
||||||
<source>AboutQT</source>
|
<source>AboutQT</source>
|
||||||
<translation>关于 QT</translation>
|
<translation>关于 QT</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4842,6 +4842,64 @@
|
||||||
<translation>在启动 Windows 资源管理器的路径中找不到 explorer.exe。</translation>
|
<translation>在启动 Windows 资源管理器的路径中找不到 explorer.exe。</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShowTextDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="62"/>
|
||||||
|
<source>TextBroswer</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="93"/>
|
||||||
|
<source>TooHugeFile</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="110"/>
|
||||||
|
<source>Edit</source>
|
||||||
|
<translation type="unfinished">编辑</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="111"/>
|
||||||
|
<source>View</source>
|
||||||
|
<translation type="unfinished">视图</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="117"/>
|
||||||
|
<source>General</source>
|
||||||
|
<translation type="unfinished">基本</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="119"/>
|
||||||
|
<source>Copy</source>
|
||||||
|
<translation type="unfinished">复制</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="123"/>
|
||||||
|
<source>Find</source>
|
||||||
|
<translation type="unfinished">查找</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="127"/>
|
||||||
|
<source>Goto</source>
|
||||||
|
<translation type="unfinished">跳转</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="132"/>
|
||||||
|
<source>Encoding</source>
|
||||||
|
<translation type="unfinished">编码</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="143"/>
|
||||||
|
<source>Display</source>
|
||||||
|
<translation type="unfinished">显示</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="151"/>
|
||||||
|
<source>CopyToClipBoard</source>
|
||||||
|
<translation type="unfinished">数据已拷贝到粘贴板</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SkinManager</name>
|
<name>SkinManager</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -74,25 +74,25 @@
|
||||||
<context>
|
<context>
|
||||||
<name>AppManager</name>
|
<name>AppManager</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="73"/>
|
<location filename="../../src/class/appmanager.cpp" line="75"/>
|
||||||
<source>GenericCallNotFullySupported</source>
|
<source>GenericCallNotFullySupported</source>
|
||||||
<translation>該軟體腳本系統不完全支持通用調用,故軟體將會退出。</translation>
|
<translation>該軟體腳本系統不完全支持通用調用,故軟體將會退出。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="89"/>
|
<location filename="../../src/class/appmanager.cpp" line="95"/>
|
||||||
<source>SetupClang</source>
|
<source>SetupClang</source>
|
||||||
<translation>啟動 Clang 服務</translation>
|
<translation>啟動 Clang 服務</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="120"/>
|
<location filename="../../src/class/appmanager.cpp" line="126"/>
|
||||||
<source>OpeningFiles</source>
|
<source>OpeningFiles</source>
|
||||||
<translation>打開檔</translation>
|
<translation>打開檔</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="163"/>
|
<location filename="../../src/class/appmanager.cpp" line="169"/>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="173"/>
|
<location filename="../../src/class/appmanager.cpp" line="179"/>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="189"/>
|
<location filename="../../src/class/appmanager.cpp" line="195"/>
|
||||||
<location filename="../../src/class/appmanager.cpp" line="205"/>
|
<location filename="../../src/class/appmanager.cpp" line="211"/>
|
||||||
<source>AlreadyOpened</source>
|
<source>AlreadyOpened</source>
|
||||||
<translation>檔已被打開</translation>
|
<translation>檔已被打開</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4361,32 +4361,32 @@
|
||||||
<context>
|
<context>
|
||||||
<name>ScriptingConsole</name>
|
<name>ScriptingConsole</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="96"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="100"/>
|
||||||
<source>Scripting console for WingHexExplorer</source>
|
<source>Scripting console for WingHexExplorer</source>
|
||||||
<translation>羽雲十六進制編輯器腳本控制臺</translation>
|
<translation>羽雲十六進制編輯器腳本控制臺</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="99"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="102"/>
|
||||||
<source>>>>> Powered by AngelScript <<<<</source>
|
<source>>>>> Powered by AngelScript <<<<</source>
|
||||||
<translation>>>>> 由 AngelScript 引擎提供支持 <<<<</translation>
|
<translation>>>>> 由 AngelScript 引擎提供支持 <<<<</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="58"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="61"/>
|
||||||
<source>[Info]</source>
|
<source>[Info]</source>
|
||||||
<translation>【資訊】</translation>
|
<translation>【資訊】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="66"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="69"/>
|
||||||
<source>[Warn]</source>
|
<source>[Warn]</source>
|
||||||
<translation>【警告】</translation>
|
<translation>【警告】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="74"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="77"/>
|
||||||
<source>[Error]</source>
|
<source>[Error]</source>
|
||||||
<translation>【錯誤】</translation>
|
<translation>【錯誤】</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/control/scriptingconsole.cpp" line="174"/>
|
<location filename="../../src/control/scriptingconsole.cpp" line="177"/>
|
||||||
<source>[Console]</source>
|
<source>[Console]</source>
|
||||||
<translation>【控制臺】</translation>
|
<translation>【控制臺】</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4404,401 +4404,401 @@
|
||||||
<translation>因許可權無法打開腳本</translation>
|
<translation>因許可權無法打開腳本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="272"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="274"/>
|
||||||
<source>File</source>
|
<source>File</source>
|
||||||
<translation>檔</translation>
|
<translation>檔</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="273"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="275"/>
|
||||||
<source>Edit</source>
|
<source>Edit</source>
|
||||||
<translation>編輯</translation>
|
<translation>編輯</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="275"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="277"/>
|
||||||
<source>Debugger</source>
|
<source>Debugger</source>
|
||||||
<translation>調試器</translation>
|
<translation>調試器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="277"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="279"/>
|
||||||
<source>Setting</source>
|
<source>Setting</source>
|
||||||
<translation>設置</translation>
|
<translation>設置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="278"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="280"/>
|
||||||
<source>About</source>
|
<source>About</source>
|
||||||
<translation>關於</translation>
|
<translation>關於</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="294"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="296"/>
|
||||||
<source>InvalidSourceFile</source>
|
<source>InvalidSourceFile</source>
|
||||||
<translation>非法代碼檔</translation>
|
<translation>非法代碼檔</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="303"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="305"/>
|
||||||
<source>Basic</source>
|
<source>Basic</source>
|
||||||
<translation>基礎</translation>
|
<translation>基礎</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="304"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="306"/>
|
||||||
<source>New</source>
|
<source>New</source>
|
||||||
<translation>新建</translation>
|
<translation>新建</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="307"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="309"/>
|
||||||
<source>OpenF</source>
|
<source>OpenF</source>
|
||||||
<translation>打開檔</translation>
|
<translation>打開檔</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="310"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="312"/>
|
||||||
<source>RecentFiles</source>
|
<source>RecentFiles</source>
|
||||||
<translation>最近打開</translation>
|
<translation>最近打開</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="314"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="316"/>
|
||||||
<source>Reload</source>
|
<source>Reload</source>
|
||||||
<translation>重新加載</translation>
|
<translation>重新加載</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="319"/>
|
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="321"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="321"/>
|
||||||
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="323"/>
|
||||||
<source>Save</source>
|
<source>Save</source>
|
||||||
<translation>保存</translation>
|
<translation>保存</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="326"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="328"/>
|
||||||
<source>SaveAs</source>
|
<source>SaveAs</source>
|
||||||
<translation>另存為</translation>
|
<translation>另存為</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="338"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="340"/>
|
||||||
<source>General</source>
|
<source>General</source>
|
||||||
<translation>基本</translation>
|
<translation>基本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="340"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="342"/>
|
||||||
<source>Undo</source>
|
<source>Undo</source>
|
||||||
<translation>撤銷</translation>
|
<translation>撤銷</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="345"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="347"/>
|
||||||
<source>Redo</source>
|
<source>Redo</source>
|
||||||
<translation>恢復</translation>
|
<translation>恢復</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="351"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="353"/>
|
||||||
<source>Cut</source>
|
<source>Cut</source>
|
||||||
<translation>剪切</translation>
|
<translation>剪切</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="355"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="357"/>
|
||||||
<source>Copy</source>
|
<source>Copy</source>
|
||||||
<translation>複製</translation>
|
<translation>複製</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="360"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="362"/>
|
||||||
<source>Paste</source>
|
<source>Paste</source>
|
||||||
<translation>粘貼</translation>
|
<translation>粘貼</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="364"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="366"/>
|
||||||
<source>Delete</source>
|
<source>Delete</source>
|
||||||
<translation>刪除</translation>
|
<translation>刪除</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="370"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="372"/>
|
||||||
<source>Lookup</source>
|
<source>Lookup</source>
|
||||||
<translation>查詢</translation>
|
<translation>查詢</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="371"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="373"/>
|
||||||
<source>Find</source>
|
<source>Find</source>
|
||||||
<translation>查找</translation>
|
<translation>查找</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="375"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="377"/>
|
||||||
<source>Replace</source>
|
<source>Replace</source>
|
||||||
<translation>替換</translation>
|
<translation>替換</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="380"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="382"/>
|
||||||
<source>Goto</source>
|
<source>Goto</source>
|
||||||
<translation>跳轉</translation>
|
<translation>跳轉</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="387"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="389"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="520"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="522"/>
|
||||||
<source>Format</source>
|
<source>Format</source>
|
||||||
<translation>代碼樣式</translation>
|
<translation>代碼樣式</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="388"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="390"/>
|
||||||
<source>CodeFormat</source>
|
<source>CodeFormat</source>
|
||||||
<translation>代碼格式化</translation>
|
<translation>代碼格式化</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="397"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="399"/>
|
||||||
<source>Window</source>
|
<source>Window</source>
|
||||||
<translation>窗體</translation>
|
<translation>窗體</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="400"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="402"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="515"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="517"/>
|
||||||
<source>Editor</source>
|
<source>Editor</source>
|
||||||
<translation>編輯器</translation>
|
<translation>編輯器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="404"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="406"/>
|
||||||
<source>Tools</source>
|
<source>Tools</source>
|
||||||
<translation>工具</translation>
|
<translation>工具</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="409"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="411"/>
|
||||||
<source>Layout</source>
|
<source>Layout</source>
|
||||||
<translation>佈局</translation>
|
<translation>佈局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="410"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="412"/>
|
||||||
<source>Fullscreen</source>
|
<source>Fullscreen</source>
|
||||||
<translation>全屏</translation>
|
<translation>全屏</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="412"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="414"/>
|
||||||
<source>RestoreLayout</source>
|
<source>RestoreLayout</source>
|
||||||
<translation>恢復默認佈局</translation>
|
<translation>恢復默認佈局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="477"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="479"/>
|
||||||
<source>BreakPoint</source>
|
<source>BreakPoint</source>
|
||||||
<translation>中斷點</translation>
|
<translation>中斷點</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="479"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="481"/>
|
||||||
<source>ToggleBreakPoint</source>
|
<source>ToggleBreakPoint</source>
|
||||||
<translation>切換中斷點</translation>
|
<translation>切換中斷點</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="482"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="484"/>
|
||||||
<source>AddBreakPoint</source>
|
<source>AddBreakPoint</source>
|
||||||
<translation>添加中斷點</translation>
|
<translation>添加中斷點</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="513"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="515"/>
|
||||||
<source>Settings</source>
|
<source>Settings</source>
|
||||||
<translation>設置</translation>
|
<translation>設置</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="518"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="520"/>
|
||||||
<source>ClangFormat</source>
|
<source>ClangFormat</source>
|
||||||
<translation>Clang Format</translation>
|
<translation>Clang Format</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="553"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="555"/>
|
||||||
<source>Local</source>
|
<source>Local</source>
|
||||||
<translation>本地</translation>
|
<translation>本地</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="559"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="561"/>
|
||||||
<source>Global</source>
|
<source>Global</source>
|
||||||
<translation>全局</translation>
|
<translation>全局</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="562"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="564"/>
|
||||||
<source>Variables</source>
|
<source>Variables</source>
|
||||||
<translation>變數</translation>
|
<translation>變數</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="573"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="575"/>
|
||||||
<source>ConsoleOutput</source>
|
<source>ConsoleOutput</source>
|
||||||
<translation>輸出</translation>
|
<translation>輸出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="587"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="589"/>
|
||||||
<source>StackTrace</source>
|
<source>StackTrace</source>
|
||||||
<translation>棧跟蹤</translation>
|
<translation>棧跟蹤</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="598"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="600"/>
|
||||||
<source>Symbol</source>
|
<source>Symbol</source>
|
||||||
<translation>符號</translation>
|
<translation>符號</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="684"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="686"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="929"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="926"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1107"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1104"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1143"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1140"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1163"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1160"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1191"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
|
||||||
<source>Error</source>
|
<source>Error</source>
|
||||||
<translation>錯誤</translation>
|
<translation>錯誤</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="685"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="687"/>
|
||||||
<source>Too much opened files</source>
|
<source>Too much opened files</source>
|
||||||
<translation>打開的檔過多,無法繼續操作!</translation>
|
<translation>打開的檔過多,無法繼續操作!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="709"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="711"/>
|
||||||
<source>ConfirmSave</source>
|
<source>ConfirmSave</source>
|
||||||
<translation>正在關閉未保存的腳本檔,你確定保存嗎?</translation>
|
<translation>正在關閉未保存的腳本檔,你確定保存嗎?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="745"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="747"/>
|
||||||
<source>ScriptSaveFailedClose</source>
|
<source>ScriptSaveFailedClose</source>
|
||||||
<translation>腳本保存失敗,你仍確認關閉嗎?</translation>
|
<translation>腳本保存失敗,你仍確認關閉嗎?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="890"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="887"/>
|
||||||
<source>Debuging...</source>
|
<source>Debuging...</source>
|
||||||
<translation>調試中...</translation>
|
<translation>調試中...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="893"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="890"/>
|
||||||
<source>Running...</source>
|
<source>Running...</source>
|
||||||
<translation>運行中...</translation>
|
<translation>運行中...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1081"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1078"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1122"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1119"/>
|
||||||
<source>ChooseFile</source>
|
<source>ChooseFile</source>
|
||||||
<translation>選擇檔</translation>
|
<translation>選擇檔</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="929"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="926"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1107"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1104"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1163"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1160"/>
|
||||||
<source>FilePermission</source>
|
<source>FilePermission</source>
|
||||||
<translation>因檔許可權無法繼續!</translation>
|
<translation>因檔許可權無法繼續!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1141"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1138"/>
|
||||||
<source>ReloadSuccessfully</source>
|
<source>ReloadSuccessfully</source>
|
||||||
<translation>檔重新加載成功!</translation>
|
<translation>檔重新加載成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1143"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1140"/>
|
||||||
<source>ReloadUnSuccessfully</source>
|
<source>ReloadUnSuccessfully</source>
|
||||||
<translation>檔重新加載失敗!</translation>
|
<translation>檔重新加載失敗!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1180"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1177"/>
|
||||||
<source>ChooseSaveFile</source>
|
<source>ChooseSaveFile</source>
|
||||||
<translation>請選擇保存檔路徑:</translation>
|
<translation>請選擇保存檔路徑:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1161"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1158"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1189"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1186"/>
|
||||||
<source>SaveSuccessfully</source>
|
<source>SaveSuccessfully</source>
|
||||||
<translation>保存成功!</translation>
|
<translation>保存成功!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1191"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1188"/>
|
||||||
<source>SaveUnSuccessfully</source>
|
<source>SaveUnSuccessfully</source>
|
||||||
<translation>保存失敗!</translation>
|
<translation>保存失敗!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1267"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1264"/>
|
||||||
<source>FormatCodeFailed</source>
|
<source>FormatCodeFailed</source>
|
||||||
<translation>代碼格式化失敗</translation>
|
<translation>代碼格式化失敗</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1316"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1313"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1334"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1331"/>
|
||||||
<source>CannotSave2RunScript</source>
|
<source>CannotSave2RunScript</source>
|
||||||
<translation>無法保存,故無法繼續運行腳本。</translation>
|
<translation>無法保存,故無法繼續運行腳本。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="731"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="733"/>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="1394"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="1391"/>
|
||||||
<source>ScriptStillRunning</source>
|
<source>ScriptStillRunning</source>
|
||||||
<translation>腳本仍在運行,你確定要退出嗎?</translation>
|
<translation>腳本仍在運行,你確定要退出嗎?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="245"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="247"/>
|
||||||
<source>ConfirmScriptSave</source>
|
<source>ConfirmScriptSave</source>
|
||||||
<translation>你嘗試關閉程式,但仍存在未保存的腳本檔,你確定保存這些更改嗎?</translation>
|
<translation>你嘗試關閉程式,但仍存在未保存的腳本檔,你確定保存這些更改嗎?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="274"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="276"/>
|
||||||
<source>View</source>
|
<source>View</source>
|
||||||
<translation>視圖</translation>
|
<translation>視圖</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="423"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="425"/>
|
||||||
<source>Debug</source>
|
<source>Debug</source>
|
||||||
<translation>調試</translation>
|
<translation>調試</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="425"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="427"/>
|
||||||
<source>Run</source>
|
<source>Run</source>
|
||||||
<translation>運行</translation>
|
<translation>運行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="431"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="433"/>
|
||||||
<source>RunWithDbg</source>
|
<source>RunWithDbg</source>
|
||||||
<translation>調試運行</translation>
|
<translation>調試運行</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="438"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="440"/>
|
||||||
<source>Pause</source>
|
<source>Pause</source>
|
||||||
<translation>暫停</translation>
|
<translation>暫停</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="442"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="444"/>
|
||||||
<source>Continue</source>
|
<source>Continue</source>
|
||||||
<translation>繼續</translation>
|
<translation>繼續</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="449"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="451"/>
|
||||||
<source>Stop</source>
|
<source>Stop</source>
|
||||||
<translation>停止</translation>
|
<translation>停止</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="454"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="456"/>
|
||||||
<source>Restart</source>
|
<source>Restart</source>
|
||||||
<translation>重啟</translation>
|
<translation>重啟</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="458"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="460"/>
|
||||||
<source>StepInto</source>
|
<source>StepInto</source>
|
||||||
<translation>單步步入</translation>
|
<translation>單步步入</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="463"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="465"/>
|
||||||
<source>StepOver</source>
|
<source>StepOver</source>
|
||||||
<translation>單步步過</translation>
|
<translation>單步步過</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="468"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="470"/>
|
||||||
<source>StepOut</source>
|
<source>StepOut</source>
|
||||||
<translation>單步跳出</translation>
|
<translation>單步跳出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="485"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="487"/>
|
||||||
<source>RemoveBreakPoint</source>
|
<source>RemoveBreakPoint</source>
|
||||||
<translation>刪除中斷點</translation>
|
<translation>刪除中斷點</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="526"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="528"/>
|
||||||
<source>Info</source>
|
<source>Info</source>
|
||||||
<translation>資訊</translation>
|
<translation>資訊</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="528"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="530"/>
|
||||||
<source>Software</source>
|
<source>Software</source>
|
||||||
<translation>軟體</translation>
|
<translation>軟體</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="531"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="533"/>
|
||||||
<source>Sponsor</source>
|
<source>Sponsor</source>
|
||||||
<translation>贊助</translation>
|
<translation>贊助</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="534"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="536"/>
|
||||||
<source>Wiki</source>
|
<source>Wiki</source>
|
||||||
<translation>網頁 Wiki</translation>
|
<translation>網頁 Wiki</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/dialog/scriptingdialog.cpp" line="537"/>
|
<location filename="../../src/dialog/scriptingdialog.cpp" line="539"/>
|
||||||
<source>AboutQT</source>
|
<source>AboutQT</source>
|
||||||
<translation>關於 QT</translation>
|
<translation>關於 QT</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -4842,6 +4842,64 @@
|
||||||
<translation>在啟動 Windows 資源管理器的路徑中找不到 explorer.exe。</translation>
|
<translation>在啟動 Windows 資源管理器的路徑中找不到 explorer.exe。</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShowTextDialog</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="62"/>
|
||||||
|
<source>TextBroswer</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="93"/>
|
||||||
|
<source>TooHugeFile</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="110"/>
|
||||||
|
<source>Edit</source>
|
||||||
|
<translation type="unfinished">編輯</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="111"/>
|
||||||
|
<source>View</source>
|
||||||
|
<translation type="unfinished">視圖</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="117"/>
|
||||||
|
<source>General</source>
|
||||||
|
<translation type="unfinished">基本</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="119"/>
|
||||||
|
<source>Copy</source>
|
||||||
|
<translation type="unfinished">複製</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="123"/>
|
||||||
|
<source>Find</source>
|
||||||
|
<translation type="unfinished">查找</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="127"/>
|
||||||
|
<source>Goto</source>
|
||||||
|
<translation type="unfinished">跳轉</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="132"/>
|
||||||
|
<source>Encoding</source>
|
||||||
|
<translation type="unfinished">編碼</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="143"/>
|
||||||
|
<source>Display</source>
|
||||||
|
<translation type="unfinished">顯示</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/dialog/showtextdialog.cpp" line="151"/>
|
||||||
|
<source>CopyToClipBoard</source>
|
||||||
|
<translation type="unfinished">數據已拷貝到粘貼板</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SkinManager</name>
|
<name>SkinManager</name>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -106,6 +106,7 @@
|
||||||
<file>images/unover.png</file>
|
<file>images/unover.png</file>
|
||||||
<file>images/unsaved.png</file>
|
<file>images/unsaved.png</file>
|
||||||
<file>images/update.png</file>
|
<file>images/update.png</file>
|
||||||
|
<file>images/viewtxt.png</file>
|
||||||
<file>images/wiki.png</file>
|
<file>images/wiki.png</file>
|
||||||
<file>images/win.png</file>
|
<file>images/win.png</file>
|
||||||
<file>images/workspace.png</file>
|
<file>images/workspace.png</file>
|
||||||
|
@ -151,5 +152,7 @@
|
||||||
<file>images/completion/CVunion.png</file>
|
<file>images/completion/CVunion.png</file>
|
||||||
<file>images/completion/classnew.png</file>
|
<file>images/completion/classnew.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/WingScript/Angelscript"/>
|
<qresource prefix="/WingScript/Angelscript/syntax">
|
||||||
|
<file alias="angelscript.xml">src/angelscript.xml</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -0,0 +1,164 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE language>
|
||||||
|
<language name="AngelScript" section="Sources" version="19" kateversion="5.79" extensions="*.as;*.angelscript" indenter="cstyle" style="C++"
|
||||||
|
author="wingsummer" license="GPL" priority="99" >
|
||||||
|
<highlighting>
|
||||||
|
<list name="keywords">
|
||||||
|
<item>abstract</item>
|
||||||
|
<item>and</item>
|
||||||
|
<item>break</item>
|
||||||
|
<item>case</item>
|
||||||
|
<item>cast</item>
|
||||||
|
<item>catch</item>
|
||||||
|
<item>class</item>
|
||||||
|
<item>const</item>
|
||||||
|
<item>continue</item>
|
||||||
|
<item>default</item>
|
||||||
|
<item>delete</item>
|
||||||
|
<item>do</item>
|
||||||
|
<item>else</item>
|
||||||
|
<item>enum</item>
|
||||||
|
<item>explicit</item>
|
||||||
|
<item>external</item>
|
||||||
|
<item>false</item>
|
||||||
|
<item>final</item>
|
||||||
|
<item>float</item>
|
||||||
|
<item>for</item>
|
||||||
|
<item>from</item>
|
||||||
|
<item>funcdef</item>
|
||||||
|
<item>function</item>
|
||||||
|
<item>get</item>
|
||||||
|
<item>if</item>
|
||||||
|
<item>import</item>
|
||||||
|
<item>in</item>
|
||||||
|
<item>inout</item>
|
||||||
|
<item>interface</item>
|
||||||
|
<item>is</item>
|
||||||
|
<item>mixin</item>
|
||||||
|
<item>namespace</item>
|
||||||
|
<item>not</item>
|
||||||
|
<item>null</item>
|
||||||
|
<item>or</item>
|
||||||
|
<item>out</item>
|
||||||
|
<item>override</item>
|
||||||
|
<item>private</item>
|
||||||
|
<item>property</item>
|
||||||
|
<item>protected</item>
|
||||||
|
<item>return</item>
|
||||||
|
<item>set</item>
|
||||||
|
<item>shared</item>
|
||||||
|
<item>super</item>
|
||||||
|
<item>switch</item>
|
||||||
|
<item>this</item>
|
||||||
|
<item>true</item>
|
||||||
|
<item>try</item>
|
||||||
|
<item>typedef</item>
|
||||||
|
<item>while</item>
|
||||||
|
<item>xor</item>
|
||||||
|
</list>
|
||||||
|
<list name="types">
|
||||||
|
<item>void</item>
|
||||||
|
<item>bool</item>
|
||||||
|
<item>uint</item>
|
||||||
|
<item>uint8</item>
|
||||||
|
<item>uint16</item>
|
||||||
|
<item>uint32</item>
|
||||||
|
<item>uint64</item>
|
||||||
|
<item>int</item>
|
||||||
|
<item>double</item>
|
||||||
|
<item>int8</item>
|
||||||
|
<item>int16</item>
|
||||||
|
<item>int32</item>
|
||||||
|
<item>int64</item>
|
||||||
|
<item>auto</item>
|
||||||
|
</list>
|
||||||
|
<contexts>
|
||||||
|
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
|
||||||
|
<keyword attribute="Keyword" context="#stay" String="keywords"/>
|
||||||
|
<keyword attribute="Data Type" context="#stay" String="types" />
|
||||||
|
<Float attribute="Float" context="Float Suffixes"/>
|
||||||
|
<HlCOct attribute="Octal" context="#stay"/>
|
||||||
|
<HlCHex attribute="Hex" context="#stay"/>
|
||||||
|
<Int attribute="Decimal" context="Int Suffixes"/>
|
||||||
|
<HlCChar attribute="Char" context="#stay"/>
|
||||||
|
<StringDetect attribute="Text Block" context="TextBlock" String="""""/>
|
||||||
|
<DetectChar attribute="String" context="String" char="""/>
|
||||||
|
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true"/>
|
||||||
|
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
|
||||||
|
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="block1"/>
|
||||||
|
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="block1"/>
|
||||||
|
<RegExpr attribute="Data Type" context="#stay" String="\bauto(?=\s+\w+)"/>
|
||||||
|
<RegExpr attribute="Keyword" context="#stay" String="\b(?=\s+(?:class|interface|void)|(?=\s+(?:return|break))|(?:set|get)(?=\s*[;{])|(?=\s*::\s*\w+))"/>
|
||||||
|
<RegExpr attribute="Function" context="#stay" String="\b[_\w][_\w\d]*(?=[\s]*[(])" />
|
||||||
|
<DetectChar attribute="Symbol" context="Member" char="."/>
|
||||||
|
<AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/*<=>?[]|~^;"/>
|
||||||
|
<DetectChar attribute="Macro" context="Macro" char="#"/>
|
||||||
|
</context>
|
||||||
|
<context name="Float Suffixes" attribute="Float" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
<AnyChar String="dDfFmM" attribute="Float" context="#pop"/>
|
||||||
|
</context>
|
||||||
|
<context name="Int Suffixes" attribute="Decimal" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
<StringDetect attribute="Decimal" context="#pop" String="UL" insensitive="true"/>
|
||||||
|
<StringDetect attribute="Decimal" context="#pop" String="LU" insensitive="true"/>
|
||||||
|
<AnyChar attribute="Decimal" context="#pop" String="ULul"/>
|
||||||
|
</context>
|
||||||
|
<context attribute="String" lineEndContext="#pop" name="String">
|
||||||
|
<DetectChar context="StringEscapedChar" char="\" lookAhead="1"/>
|
||||||
|
<DetectChar attribute="String" context="#pop" char="""/>
|
||||||
|
</context>
|
||||||
|
<context attribute="String" lineEndContext="#pop" name="StringEscapedChar">
|
||||||
|
<HlCStringChar attribute="String Char" context="#pop"/>
|
||||||
|
<RegExpr attribute="String Char" context="#pop" String="\\u+[0-9a-fA-F]{4}"/>
|
||||||
|
<RegExpr attribute="Error" context="#pop" String="\\(u+[0-9a-fA-F]*|.)?"/>
|
||||||
|
</context>
|
||||||
|
<context attribute="Text Block" lineEndContext="#stay" name="TextBlock">
|
||||||
|
<DetectChar context="StringEscapedChar" char="\" lookAhead="1"/>
|
||||||
|
<StringDetect attribute="Text Block" context="#pop" String="""""/>
|
||||||
|
</context>
|
||||||
|
<context attribute="Normal Text" lineEndContext="#pop" name="Member" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
<RegExpr attribute="Function" context="#pop" String="\b[_\w][_\w\d]*(?=[\s]*)" />
|
||||||
|
</context>
|
||||||
|
<context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
|
||||||
|
<IncludeRules context="##Comments"/>
|
||||||
|
</context>
|
||||||
|
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
|
||||||
|
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="BlockComment"/>
|
||||||
|
<IncludeRules context="##Comments"/>
|
||||||
|
</context>
|
||||||
|
<context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||||
|
<IncludeRules context="##Doxygen" />
|
||||||
|
<Detect2Chars attribute="Comment" context="#pop!Commentar 1" char="/" char1="/" />
|
||||||
|
<Detect2Chars attribute="Comment" context="#pop!Commentar 2" char="/" char1="*" beginRegion="BlockComment" />
|
||||||
|
</context>
|
||||||
|
<context attribute="Decimal" lineEndContext="#pop" name="Decimal"/>
|
||||||
|
<context attribute="Macro" lineEndContext="#pop" name="Macro">
|
||||||
|
<Detect2Chars attribute="Comment" context="LineComment" char="/" char1="/"/>
|
||||||
|
<Detect2Chars attribute="Comment" context="BlockComment" char="/" char1="*" beginRegion="Comment"/>
|
||||||
|
</context>
|
||||||
|
</contexts>
|
||||||
|
<itemDatas>
|
||||||
|
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||||
|
<itemData name="Keyword" defStyleNum="dsKeyword"/>
|
||||||
|
<itemData name="Function" defStyleNum="dsFunction"/>
|
||||||
|
<itemData name="Data Type" defStyleNum="dsDataType"/>
|
||||||
|
<itemData name="Decimal" defStyleNum="dsDecVal"/>
|
||||||
|
<itemData name="Octal" defStyleNum="dsBaseN"/>
|
||||||
|
<itemData name="Hex" defStyleNum="dsBaseN"/>
|
||||||
|
<itemData name="Float" defStyleNum="dsFloat"/>
|
||||||
|
<itemData name="Char" defStyleNum="dsChar"/>
|
||||||
|
<itemData name="String" defStyleNum="dsString"/>
|
||||||
|
<itemData name="Text Block" defStyleNum="dsString"/>
|
||||||
|
<itemData name="String Char" defStyleNum="dsSpecialChar"/>
|
||||||
|
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||||
|
<itemData name="Symbol" defStyleNum="dsOperator"/>
|
||||||
|
<itemData name="Macro" defStyleNum="dsPreprocessor"/>
|
||||||
|
</itemDatas>
|
||||||
|
</highlighting>
|
||||||
|
<general>
|
||||||
|
<comments>
|
||||||
|
<comment name="singleLine" start="//" position="afterwhitespace"/>
|
||||||
|
<comment name="multiLine" start="/*" end="*/" region="BlockComment" />
|
||||||
|
</comments>
|
||||||
|
<keywords casesensitive="1" />
|
||||||
|
</general>
|
||||||
|
</language>
|
|
@ -29,8 +29,8 @@ QString AngelObjString::stringToString(void *obj, asDebugger *dbg) {
|
||||||
Q_UNUSED(dbg);
|
Q_UNUSED(dbg);
|
||||||
|
|
||||||
// We know the received object is a string
|
// We know the received object is a string
|
||||||
QString *val = reinterpret_cast<QString *>(obj);
|
QString val = *reinterpret_cast<QString *>(obj);
|
||||||
return *val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AngelObjString::arrayToString(void *obj, asDebugger *dbg) {
|
QString AngelObjString::arrayToString(void *obj, asDebugger *dbg) {
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include "wingmessagebox.h"
|
#include "wingmessagebox.h"
|
||||||
|
|
||||||
|
#include <KSyntaxHighlighting/Repository>
|
||||||
|
|
||||||
AppManager *AppManager::_instance = nullptr;
|
AppManager *AppManager::_instance = nullptr;
|
||||||
|
|
||||||
AppManager::AppManager(int &argc, char *argv[])
|
AppManager::AppManager(int &argc, char *argv[])
|
||||||
|
@ -81,6 +83,10 @@ AppManager::AppManager(int &argc, char *argv[])
|
||||||
|
|
||||||
SkinManager::instance();
|
SkinManager::instance();
|
||||||
|
|
||||||
|
// add angelscript highlight support
|
||||||
|
auto &repo = WingCodeEdit::syntaxRepo();
|
||||||
|
repo.addCustomSearchPath(QStringLiteral(":/WingScript/Angelscript"));
|
||||||
|
|
||||||
auto dontSplash = set.dontUseSplash();
|
auto dontSplash = set.dontUseSplash();
|
||||||
|
|
||||||
SplashDialog *splash = nullptr;
|
SplashDialog *splash = nullptr;
|
||||||
|
|
|
@ -36,15 +36,12 @@ AsCompletion::AsCompletion(asIScriptEngine *engine, WingCodeEdit *p)
|
||||||
: WingCompleter(p), parser(engine), _engine(engine) {
|
: WingCompleter(p), parser(engine), _engine(engine) {
|
||||||
Q_ASSERT(engine);
|
Q_ASSERT(engine);
|
||||||
|
|
||||||
// addTrigger(*DOT_TRIGGER);
|
setTriggerList({*DOT_TRIGGER, *DBL_COLON_TRIGGER,
|
||||||
// addTrigger(*DBL_COLON_TRIGGER);
|
// unleash the power of call tips
|
||||||
|
*LEFT_PARE_TRIGGER,
|
||||||
// // unleash the power of call tips
|
// clear the tips
|
||||||
// addTrigger(*LEFT_PARE_TRIGGER);
|
*SEMI_COLON_TRIGGER});
|
||||||
// // clear the tips
|
setTriggerAmount(3);
|
||||||
// addTrigger(*SEMI_COLON_TRIGGER);
|
|
||||||
|
|
||||||
// setTrigWordLen(3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AsCompletion::~AsCompletion() {}
|
AsCompletion::~AsCompletion() {}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*==============================================================================
|
||||||
|
** Copyright (C) 2024-2027 WingSummer
|
||||||
|
**
|
||||||
|
** This program is free software: you can redistribute it and/or modify it under
|
||||||
|
** the terms of the GNU Affero General Public License as published by the Free
|
||||||
|
** Software Foundation, version 3.
|
||||||
|
**
|
||||||
|
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||||
|
** details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU Affero General Public License
|
||||||
|
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
** =============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CODEINFOTIP_H
|
||||||
|
#define CODEINFOTIP_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
class CodeInfoTip {
|
||||||
|
public:
|
||||||
|
enum class Type { Class, Function, Enum, Variable };
|
||||||
|
|
||||||
|
public:
|
||||||
|
QString name;
|
||||||
|
Type type;
|
||||||
|
QString nameSpace;
|
||||||
|
|
||||||
|
QString args; // only function use
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CODEINFOTIP_H
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*==============================================================================
|
||||||
|
** Copyright (C) 2024-2027 WingSummer
|
||||||
|
**
|
||||||
|
** This program is free software: you can redistribute it and/or modify it under
|
||||||
|
** the terms of the GNU Affero General Public License as published by the Free
|
||||||
|
** Software Foundation, version 3.
|
||||||
|
**
|
||||||
|
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||||
|
** details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU Affero General Public License
|
||||||
|
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
** =============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "codeedit.h"
|
||||||
|
|
||||||
|
CodeEdit::CodeEdit(QWidget *parent) : WingCodeEdit(parent) {}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*==============================================================================
|
||||||
|
** Copyright (C) 2024-2027 WingSummer
|
||||||
|
**
|
||||||
|
** This program is free software: you can redistribute it and/or modify it under
|
||||||
|
** the terms of the GNU Affero General Public License as published by the Free
|
||||||
|
** Software Foundation, version 3.
|
||||||
|
**
|
||||||
|
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||||
|
** details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU Affero General Public License
|
||||||
|
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
** =============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CODEEDIT_H
|
||||||
|
#define CODEEDIT_H
|
||||||
|
|
||||||
|
#include "WingCodeEdit/wingcodeedit.h"
|
||||||
|
|
||||||
|
class CodeEdit : public WingCodeEdit {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit CodeEdit(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void contentModified(bool b);
|
||||||
|
|
||||||
|
private:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CODEEDIT_H
|
|
@ -27,6 +27,7 @@
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
|
#include <KSyntaxHighlighting/Definition>
|
||||||
#include <KSyntaxHighlighting/Repository>
|
#include <KSyntaxHighlighting/Repository>
|
||||||
#include <KSyntaxHighlighting/Theme>
|
#include <KSyntaxHighlighting/Theme>
|
||||||
|
|
||||||
|
@ -42,7 +43,7 @@ ScriptEditor::ScriptEditor(QWidget *parent)
|
||||||
this->setFocusPolicy(Qt::StrongFocus);
|
this->setFocusPolicy(Qt::StrongFocus);
|
||||||
this->setObjectName(QStringLiteral("ScriptEditor"));
|
this->setObjectName(QStringLiteral("ScriptEditor"));
|
||||||
|
|
||||||
m_editor = new WingCodeEdit(this);
|
m_editor = new CodeEdit(this);
|
||||||
m_editor->setAutoIndent(true);
|
m_editor->setAutoIndent(true);
|
||||||
m_editor->setMatchBraces(true);
|
m_editor->setMatchBraces(true);
|
||||||
m_editor->setShowLongLineEdge(true);
|
m_editor->setShowLongLineEdge(true);
|
||||||
|
@ -64,6 +65,9 @@ ScriptEditor::ScriptEditor(QWidget *parent)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_editor->setSyntax(
|
||||||
|
m_editor->syntaxRepo().definitionForName("AngelScript"));
|
||||||
|
|
||||||
connect(m_editor, &WingCodeEdit::symbolMarkLineMarginClicked, this,
|
connect(m_editor, &WingCodeEdit::symbolMarkLineMarginClicked, this,
|
||||||
&ScriptEditor::onToggleMark);
|
&ScriptEditor::onToggleMark);
|
||||||
|
|
||||||
|
@ -154,7 +158,7 @@ void ScriptEditor::processTitle() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WingCodeEdit *ScriptEditor::editor() const { return m_editor; }
|
CodeEdit *ScriptEditor::editor() const { return m_editor; }
|
||||||
|
|
||||||
bool ScriptEditor::formatCode() {
|
bool ScriptEditor::formatCode() {
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#define SCRIPTEDITOR_H
|
#define SCRIPTEDITOR_H
|
||||||
|
|
||||||
#include "Qt-Advanced-Docking-System/src/DockWidget.h"
|
#include "Qt-Advanced-Docking-System/src/DockWidget.h"
|
||||||
#include "wingcodeedit.h"
|
#include "control/codeedit.h"
|
||||||
|
|
||||||
class ScriptEditor : public ads::CDockWidget {
|
class ScriptEditor : public ads::CDockWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -30,7 +30,7 @@ public:
|
||||||
|
|
||||||
QString fileName() const;
|
QString fileName() const;
|
||||||
|
|
||||||
WingCodeEdit *editor() const;
|
CodeEdit *editor() const;
|
||||||
|
|
||||||
bool formatCode();
|
bool formatCode();
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ private:
|
||||||
void processTitle();
|
void processTitle();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WingCodeEdit *m_editor = nullptr;
|
CodeEdit *m_editor = nullptr;
|
||||||
QString m_fileName;
|
QString m_fileName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,16 @@
|
||||||
#include "class/scriptconsolemachine.h"
|
#include "class/scriptconsolemachine.h"
|
||||||
#include "qregularexpression.h"
|
#include "qregularexpression.h"
|
||||||
|
|
||||||
|
#include <KSyntaxHighlighting/Definition>
|
||||||
|
#include <KSyntaxHighlighting/Repository>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QTextObject>
|
#include <QTextObject>
|
||||||
|
|
||||||
ScriptingConsole::ScriptingConsole(QWidget *parent) : QConsoleWidget(parent) {
|
ScriptingConsole::ScriptingConsole(QWidget *parent) : QConsoleWidget(parent) {
|
||||||
_warnCharFmt.setForeground(QColorConstants::Svg::gold);
|
setSyntax(syntaxRepo().definitionForName("AngelScript"));
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptingConsole::~ScriptingConsole() {}
|
ScriptingConsole::~ScriptingConsole() {}
|
||||||
|
@ -93,11 +96,11 @@ void ScriptingConsole::init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptingConsole::initOutput() {
|
void ScriptingConsole::initOutput() {
|
||||||
|
_s << QStringLiteral(R"(""")") << Qt::endl;
|
||||||
write(tr("Scripting console for WingHexExplorer"));
|
write(tr("Scripting console for WingHexExplorer"));
|
||||||
|
|
||||||
_s << Qt::endl;
|
_s << Qt::endl;
|
||||||
write(tr(">>>> Powered by AngelScript <<<<"));
|
write(tr(">>>> Powered by AngelScript <<<<"));
|
||||||
_s << Qt::endl << Qt::endl;
|
_s << Qt::endl << QStringLiteral(R"(""")") << Qt::endl;
|
||||||
appendCommandPrompt();
|
appendCommandPrompt();
|
||||||
setMode(Input);
|
setMode(Input);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,6 @@ private:
|
||||||
QMutex _queueLocker;
|
QMutex _queueLocker;
|
||||||
bool _waitforRead = false;
|
bool _waitforRead = false;
|
||||||
|
|
||||||
QTextCharFormat _warnCharFmt;
|
|
||||||
std::function<QString(void)> _getInputFn;
|
std::function<QString(void)> _getInputFn;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -177,30 +177,32 @@ void ScriptingDialog::initConsole() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto bpMark = QStringLiteral("bp");
|
||||||
|
const auto curSym = QStringLiteral("cur");
|
||||||
|
const auto hitCur = QStringLiteral("curbp");
|
||||||
|
|
||||||
// remove the last mark
|
// remove the last mark
|
||||||
if (!_lastCurLine.first.isEmpty() && _lastCurLine.second >= 0) {
|
if (!_lastCurLine.first.isEmpty() && _lastCurLine.second >= 0) {
|
||||||
// auto lastCur = QCodeEdit::managed(_lastCurLine.first);
|
auto lastCur = findEditorView(_lastCurLine.first);
|
||||||
// auto doc = lastCur->document();
|
auto e = lastCur->editor();
|
||||||
// auto line = doc->line(_lastCurLine.second - 1);
|
auto symID = e->symbolMark(_lastCurLine.second);
|
||||||
// if (line.hasMark(curMark)) {
|
|
||||||
// line.removeMark(curMark);
|
if (symID == curSym) {
|
||||||
// } else if (line.hasMark(curHitMark)) {
|
e->removeSymbolMark(_lastCurLine.second);
|
||||||
// line.removeMark(curHitMark);
|
} else if (symID == hitCur) {
|
||||||
// line.addMark(bpMark);
|
e->addSymbolMark(_lastCurLine.second, bpMark);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto editor = e->editor();
|
auto editor = e->editor();
|
||||||
|
|
||||||
// add the new mark
|
// add the new mark
|
||||||
// auto doc = editor->document();
|
auto symID = editor->symbolMark(lineNr);
|
||||||
// auto line = doc->line(lineNr - 1);
|
if (symID == bpMark) {
|
||||||
// if (line.hasMark(bpMark)) {
|
editor->addSymbolMark(lineNr, hitCur);
|
||||||
// line.removeMark(bpMark);
|
} else {
|
||||||
// line.addMark(curHitMark);
|
editor->addSymbolMark(lineNr, curSym);
|
||||||
// } else {
|
}
|
||||||
// line.addMark(curMark);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// editor->ensureVisible(lineNr - 1);
|
// editor->ensureVisible(lineNr - 1);
|
||||||
|
|
||||||
|
@ -812,44 +814,39 @@ void ScriptingDialog::swapEditor(ScriptEditor *old, ScriptEditor *cur) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old != nullptr) {
|
if (old != nullptr) {
|
||||||
// auto editor = old->editor();
|
auto editor = old->editor();
|
||||||
// editor->disconnect(SIGNAL(copyAvailable(bool)));
|
editor->disconnect(SIGNAL(copyAvailable(bool)));
|
||||||
// editor->disconnect(SIGNAL(contentModified(bool)));
|
editor->disconnect(SIGNAL(contentModified(bool)));
|
||||||
// editor->disconnect(SIGNAL(undoAvailable(bool)));
|
editor->disconnect(SIGNAL(undoAvailable(bool)));
|
||||||
// editor->disconnect(SIGNAL(redoAvailable(bool)));
|
editor->disconnect(SIGNAL(redoAvailable(bool)));
|
||||||
// editor->disconnect(SIGNAL(zoomed()));
|
editor->disconnect(SIGNAL(copyAvailable(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// auto editor = cur->editor();
|
auto editor = cur->editor();
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::UNDO_ACTION)
|
m_Tbtneditors.value(ToolButtonIndex::UNDO_ACTION)
|
||||||
// ->setEnabled(editor->canUndo());
|
->setEnabled(editor->document()->isUndoAvailable());
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::REDO_ACTION)
|
m_Tbtneditors.value(ToolButtonIndex::REDO_ACTION)
|
||||||
// ->setEnabled(editor->canRedo());
|
->setEnabled(editor->document()->isRedoAvailable());
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::SAVE_ACTION)
|
m_Tbtneditors.value(ToolButtonIndex::SAVE_ACTION)
|
||||||
// ->setEnabled(Utilities::fileCanWrite(editor->fileName()) &&
|
->setEnabled(Utilities::fileCanWrite(cur->fileName()) &&
|
||||||
// editor->isContentModified());
|
editor->document()->isModified());
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::COPY_ACTION)
|
m_Tbtneditors.value(ToolButtonIndex::COPY_ACTION)
|
||||||
// ->setEnabled(editor->cursor().hasSelection());
|
->setEnabled(editor->textCursor().hasSelection());
|
||||||
|
|
||||||
// connect(editor, &QEditor::copyAvailable,
|
connect(editor, &CodeEdit::copyAvailable,
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::COPY_ACTION),
|
m_Tbtneditors.value(ToolButtonIndex::COPY_ACTION),
|
||||||
// &QToolButton::setEnabled);
|
&QToolButton::setEnabled);
|
||||||
// connect(editor, &QEditor::contentModified, this, [=] {
|
connect(editor, &CodeEdit::contentModified, this, [=] {
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::SAVE_ACTION)
|
m_Tbtneditors.value(ToolButtonIndex::SAVE_ACTION)
|
||||||
// ->setEnabled(Utilities::fileCanWrite(editor->fileName()) &&
|
->setEnabled(Utilities::fileCanWrite(cur->fileName()) &&
|
||||||
// editor->isContentModified());
|
editor->document()->isModified());
|
||||||
// });
|
});
|
||||||
// connect(editor, &QEditor::undoAvailable,
|
connect(editor, &CodeEdit::undoAvailable,
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::UNDO_ACTION),
|
m_Tbtneditors.value(ToolButtonIndex::UNDO_ACTION),
|
||||||
// &QToolButton::setEnabled);
|
&QToolButton::setEnabled);
|
||||||
// connect(editor, &QEditor::redoAvailable,
|
connect(editor, &CodeEdit::redoAvailable,
|
||||||
// m_Tbtneditors.value(ToolButtonIndex::REDO_ACTION),
|
m_Tbtneditors.value(ToolButtonIndex::REDO_ACTION),
|
||||||
// &QToolButton::setEnabled);
|
&QToolButton::setEnabled);
|
||||||
// connect(editor, &QEditor::zoomed, this, [=] {
|
|
||||||
// Toast::toast(this, NAMEICONRES(QStringLiteral("scale")),
|
|
||||||
// QString::number(editor->scaleRate() * 100) +
|
|
||||||
// QStringLiteral("%"));
|
|
||||||
// });
|
|
||||||
|
|
||||||
m_curEditor = cur;
|
m_curEditor = cur;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,170 @@
|
||||||
|
/*==============================================================================
|
||||||
|
** Copyright (C) 2024-2027 WingSummer
|
||||||
|
**
|
||||||
|
** This program is free software: you can redistribute it and/or modify it under
|
||||||
|
** the terms of the GNU Affero General Public License as published by the Free
|
||||||
|
** Software Foundation, version 3.
|
||||||
|
**
|
||||||
|
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||||
|
** details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU Affero General Public License
|
||||||
|
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
** =============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "showtextdialog.h"
|
||||||
|
|
||||||
|
#include "class/qkeysequences.h"
|
||||||
|
#include "class/wingmessagebox.h"
|
||||||
|
#include "control/codeedit.h"
|
||||||
|
#include "control/toast.h"
|
||||||
|
#include "dialog/encodingdialog.h"
|
||||||
|
|
||||||
|
#include <QThread>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
|
constexpr auto EMPTY_FUNC = [] {};
|
||||||
|
|
||||||
|
ShowTextDialog::ShowTextDialog(QWidget *parent) : FramelessDialogBase(parent) {
|
||||||
|
this->setUpdatesEnabled(false);
|
||||||
|
|
||||||
|
// build up UI
|
||||||
|
buildUpRibbonBar();
|
||||||
|
|
||||||
|
auto cw = new QWidget(this);
|
||||||
|
cw->setSizePolicy(
|
||||||
|
QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
|
||||||
|
auto layout = new QVBoxLayout(cw);
|
||||||
|
layout->setContentsMargins(1, 0, 1, 0);
|
||||||
|
layout->setSpacing(0);
|
||||||
|
layout->addWidget(q_check_ptr(m_ribbon));
|
||||||
|
|
||||||
|
m_edit = new WingCodeEdit(this);
|
||||||
|
// auto editor = m_edit->editor();
|
||||||
|
// editor->setCodec(QStringLiteral("ASCII"));
|
||||||
|
// connect(editor, &QEditor::needLoading, this,
|
||||||
|
// [this]() { load(m_last.buffer, m_last.offset, m_last.size); });
|
||||||
|
|
||||||
|
m_edit->setReadOnly(true);
|
||||||
|
m_edit->setAcceptDrops(false);
|
||||||
|
m_edit->setUndoRedoEnabled(false);
|
||||||
|
// m_edit->createSimpleBasicContextMenu(true, true);
|
||||||
|
layout->addWidget(m_edit);
|
||||||
|
|
||||||
|
m_status = new QStatusBar(this);
|
||||||
|
layout->addWidget(m_status);
|
||||||
|
buildUpContent(cw);
|
||||||
|
|
||||||
|
// ok, preparing for starting...
|
||||||
|
this->setWindowTitle(tr("TextBroswer"));
|
||||||
|
this->setWindowIcon(ICONRES(QStringLiteral("viewtxt")));
|
||||||
|
this->setMinimumSize(800, 600);
|
||||||
|
|
||||||
|
this->setUpdatesEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
ShowTextDialog::~ShowTextDialog() {}
|
||||||
|
|
||||||
|
void ShowTextDialog::load(QHexBuffer *buffer, const QString encoding,
|
||||||
|
qsizetype offset, qsizetype size) {
|
||||||
|
// auto editor = m_edit->editor();
|
||||||
|
// editor->blockSignals(true);
|
||||||
|
// editor->setCodec(encoding);
|
||||||
|
// load(buffer, offset, size);
|
||||||
|
// editor->blockSignals(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTextDialog::load(QHexBuffer *buffer, qsizetype offset,
|
||||||
|
qsizetype size) {
|
||||||
|
if (buffer == nullptr || offset < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_canceled = false;
|
||||||
|
|
||||||
|
if (size < 0) {
|
||||||
|
size = buffer->length();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size >= std::numeric_limits<decltype(size)>::max()) {
|
||||||
|
WingMessageBox::critical(this, this->windowTitle(), tr("TooHugeFile"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// auto editor = m_edit->editor();
|
||||||
|
// editor->setUpdatesEnabled(false);
|
||||||
|
|
||||||
|
// auto doc = editor->document();
|
||||||
|
// auto orign = offset;
|
||||||
|
|
||||||
|
// editor->setUpdatesEnabled(true);
|
||||||
|
// m_status->showMessage(editor->codecName());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTextDialog::buildUpRibbonBar() {
|
||||||
|
m_ribbon = new Ribbon(this);
|
||||||
|
m_ribbon->setAcceptDrops(false);
|
||||||
|
buildEditPage(m_ribbon->addTab(tr("Edit")));
|
||||||
|
buildViewPage(m_ribbon->addTab(tr("View")));
|
||||||
|
}
|
||||||
|
|
||||||
|
RibbonTabContent *ShowTextDialog::buildEditPage(RibbonTabContent *tab) {
|
||||||
|
auto shortcuts = QKeySequences::instance();
|
||||||
|
{
|
||||||
|
auto pannel = tab->addGroup(tr("General"));
|
||||||
|
|
||||||
|
auto a = addPannelAction(pannel, QStringLiteral("copy"), tr("Copy"),
|
||||||
|
&ShowTextDialog::on_copyfile);
|
||||||
|
setPannelActionToolTip(a, QKeySequence::Copy);
|
||||||
|
|
||||||
|
a = addPannelAction(pannel, QStringLiteral("find"), tr("Find"),
|
||||||
|
&ShowTextDialog::on_findfile);
|
||||||
|
setPannelActionToolTip(a, QKeySequence::Find);
|
||||||
|
|
||||||
|
a = addPannelAction(pannel, QStringLiteral("jmp"), tr("Goto"),
|
||||||
|
&ShowTextDialog::on_gotoline);
|
||||||
|
setPannelActionToolTip(a,
|
||||||
|
shortcuts.keySequence(QKeySequences::Key::GOTO));
|
||||||
|
|
||||||
|
addPannelAction(pannel, QStringLiteral("encoding"), tr("Encoding"),
|
||||||
|
&ShowTextDialog::on_encoding,
|
||||||
|
shortcuts.keySequence(QKeySequences::Key::ENCODING));
|
||||||
|
}
|
||||||
|
|
||||||
|
return tab;
|
||||||
|
}
|
||||||
|
|
||||||
|
RibbonTabContent *ShowTextDialog::buildViewPage(RibbonTabContent *tab) {
|
||||||
|
auto shortcuts = QKeySequences::instance();
|
||||||
|
|
||||||
|
auto pannel = tab->addGroup(tr("Display"));
|
||||||
|
|
||||||
|
return tab;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTextDialog::on_copyfile() {
|
||||||
|
// m_edit->editor()->copy();
|
||||||
|
Toast::toast(this, NAMEICONRES(QStringLiteral("copy")),
|
||||||
|
tr("CopyToClipBoard"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTextDialog::on_findfile() {
|
||||||
|
// m_edit->editor()->find();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTextDialog::on_gotoline() {
|
||||||
|
// m_edit->editor()->gotoLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTextDialog::on_encoding() {
|
||||||
|
EncodingDialog d;
|
||||||
|
if (d.exec()) {
|
||||||
|
auto res = d.getResult();
|
||||||
|
// m_edit->editor()->setCodec(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTextDialog::on_cancel() { m_canceled = true; }
|
|
@ -0,0 +1,135 @@
|
||||||
|
/*==============================================================================
|
||||||
|
** Copyright (C) 2024-2027 WingSummer
|
||||||
|
**
|
||||||
|
** This program is free software: you can redistribute it and/or modify it under
|
||||||
|
** the terms of the GNU Affero General Public License as published by the Free
|
||||||
|
** Software Foundation, version 3.
|
||||||
|
**
|
||||||
|
** This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
** FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||||
|
** details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU Affero General Public License
|
||||||
|
** along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
** =============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SHOWTEXTDIALOG_H
|
||||||
|
#define SHOWTEXTDIALOG_H
|
||||||
|
|
||||||
|
#include "QHexView/document/buffer/qhexbuffer.h"
|
||||||
|
|
||||||
|
#include "QWingRibbon/ribbon.h"
|
||||||
|
#include "QWingRibbon/ribbonbuttongroup.h"
|
||||||
|
#include "QWingRibbon/ribbontabcontent.h"
|
||||||
|
#include "framelessdialogbase.h"
|
||||||
|
#include "utilities.h"
|
||||||
|
#include "WingCodeEdit/wingcodeedit.h"
|
||||||
|
|
||||||
|
#include <QShortcut>
|
||||||
|
#include <QStatusBar>
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
|
class ShowTextDialog : public FramelessDialogBase {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit ShowTextDialog(QWidget *parent = nullptr);
|
||||||
|
virtual ~ShowTextDialog();
|
||||||
|
|
||||||
|
public:
|
||||||
|
void load(QHexBuffer *buffer, const QString encoding, qsizetype offset = 0,
|
||||||
|
qsizetype size = -1);
|
||||||
|
void load(QHexBuffer *buffer, qsizetype offset = 0, qsizetype size = -1);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void buildUpRibbonBar();
|
||||||
|
|
||||||
|
RibbonTabContent *buildEditPage(RibbonTabContent *tab);
|
||||||
|
RibbonTabContent *buildViewPage(RibbonTabContent *tab);
|
||||||
|
|
||||||
|
private:
|
||||||
|
template <typename Func>
|
||||||
|
inline QToolButton *
|
||||||
|
addPannelAction(RibbonButtonGroup *pannel, const QString &iconName,
|
||||||
|
const QString &title, Func &&slot,
|
||||||
|
const QKeySequence &shortcut = QKeySequence(),
|
||||||
|
QMenu *menu = nullptr) {
|
||||||
|
return addPannelAction(pannel, ICONRES(iconName), title, slot, shortcut,
|
||||||
|
menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename Func>
|
||||||
|
inline QToolButton *
|
||||||
|
addPannelAction(RibbonButtonGroup *pannel, const QIcon &icon,
|
||||||
|
const QString &title, Func &&slot,
|
||||||
|
const QKeySequence &shortcut = QKeySequence(),
|
||||||
|
QMenu *menu = nullptr) {
|
||||||
|
Q_ASSERT(pannel);
|
||||||
|
auto a = new QToolButton(pannel);
|
||||||
|
a->setText(title);
|
||||||
|
a->setIcon(icon);
|
||||||
|
setPannelActionToolTip(a, shortcut);
|
||||||
|
|
||||||
|
if (!shortcut.isEmpty()) {
|
||||||
|
auto shortCut = new QShortcut(shortcut, this);
|
||||||
|
shortCut->setContext(Qt::WindowShortcut);
|
||||||
|
connect(shortCut, &QShortcut::activated, a, &QToolButton::click);
|
||||||
|
}
|
||||||
|
|
||||||
|
a->setMenu(menu);
|
||||||
|
if (menu) {
|
||||||
|
a->setPopupMode(QToolButton::InstantPopup);
|
||||||
|
}
|
||||||
|
connect(a, &QToolButton::clicked, this, slot);
|
||||||
|
pannel->addButton(a);
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename Func>
|
||||||
|
inline QAction *newAction(const QString &title, Func &&slot,
|
||||||
|
const QKeySequence &shortcut = QKeySequence()) {
|
||||||
|
auto a = new QAction;
|
||||||
|
a->setText(title);
|
||||||
|
a->setShortcutVisibleInContextMenu(true);
|
||||||
|
a->setShortcut(shortcut);
|
||||||
|
connect(a, &QAction::triggered, this, slot);
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void
|
||||||
|
setPannelActionToolTip(QToolButton *action,
|
||||||
|
const QKeySequence &shortcut = QKeySequence()) {
|
||||||
|
Q_ASSERT(action);
|
||||||
|
auto title = action->text();
|
||||||
|
action->setToolTip(
|
||||||
|
shortcut.isEmpty()
|
||||||
|
? QStringLiteral("<p align=\"center\">%1</p>").arg(title)
|
||||||
|
: QStringLiteral(
|
||||||
|
"<p align=\"center\">%1</p><p align=\"center\">%2</p>")
|
||||||
|
.arg(title, shortcut.toString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_copyfile();
|
||||||
|
void on_findfile();
|
||||||
|
void on_gotoline();
|
||||||
|
void on_encoding();
|
||||||
|
|
||||||
|
void on_cancel();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ribbon *m_ribbon = nullptr;
|
||||||
|
WingCodeEdit *m_edit = nullptr;
|
||||||
|
bool m_canceled = false;
|
||||||
|
|
||||||
|
QStatusBar *m_status = nullptr;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
QHexBuffer *buffer = nullptr;
|
||||||
|
qsizetype offset = 0;
|
||||||
|
qsizetype size = -1;
|
||||||
|
} m_last;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SHOWTEXTDIALOG_H
|
Loading…
Reference in New Issue