From 9fa098960b89897ec46de16ea986d5ad469903a2 Mon Sep 17 00:00:00 2001 From: royqh1979 Date: Thu, 2 Sep 2021 20:12:16 +0800 Subject: [PATCH] - menu item for close / close all / maximize editor --- RedPandaIDE/RedPandaIDE_zh_CN.qm | Bin 54631 -> 55222 bytes RedPandaIDE/RedPandaIDE_zh_CN.ts | 475 +++++++++++++++++-------------- RedPandaIDE/mainwindow.cpp | 43 ++- RedPandaIDE/mainwindow.h | 12 +- RedPandaIDE/mainwindow.ui | 15 + 5 files changed, 319 insertions(+), 226 deletions(-) diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.qm b/RedPandaIDE/RedPandaIDE_zh_CN.qm index 9ee9e1ebc38fafb5cee74677a3091e06cb5acbba..5b2e2ddcdbbe68edc5d839773af043f9514bbdb2 100644 GIT binary patch delta 3873 zcmZvfdt6Ov+sA*cz1BYO-IUr08&Q#&jF&vbID|pYjS=OT4kAhliT32!!ARXog+h^Y zDXEkiXYV`?W0)Bk!@LiZmzm*-!868V-k;f@kI(zZ^GAJmYp?rW*Y&%8*LANR98euE zQ*E}6js;`^B%LO=kPpZlV5O1FC3}%u$th$WnMCH3I{{??P?bPV0E&LkinQ920)Wv& zxl0`BPZj_H(}6`1OUtp{+5XK$GRRH0?0+TNQDK5aY24HmJt5!N45;%Ve>)jC z)*?DOER`DG7h4@X-H%p4`EUeq^dBS>iE4n-#{+Qq6Uq>ZQ57KWI#~Qx%TQv9fcYs< zGRlCpTcG5f13qYN=LUB>i@$bA5qcT1LG7B-*QOQ*e80WhdC|D`H zRD+~7CK0K!y6>5f;FH(vfuqFc= z@)+B8Besn+192rNjN8C6EWyEret^wOJW*K#_5$brI1Ko%#FYnDAniNc_-F~xs~c_> zO=IWGWW#l62|B%R-=BBb}V#0F?BX8p3GmUiYLg$1sZSkELsu zrUL6$imQsnw!KJtex5;?5~WxBnDK~CD!Gi^myxA%JVAj^<*ItF=5?=$st>fR16RkU5_MB2*Pp6$R|`QB9wb0-Ug^W<+F> z9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H1atMzotV-E=96dp@$}1b(b>v;FRwH3<|y-{+ZzDW1oP9J^L*EzY|)kUp+t2S zV6S_?QWbHRx&#M^Y7MyzJ7N3F0TO{)Pi{twr}j_|O9)u$AwC(qFAdUZce` zp1N4I#d>{eJgwWs`p3gv4Bt}g-}~F~gsHPWo!piIxybrFnv1@5hja5uJ2A@E$ywK` uJkgo6(nli_vrNtrS;cOm+nV@)FT|ZSJ)FbVzNB?FZJcR#j@te~(EkDbDM{u4 diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.ts b/RedPandaIDE/RedPandaIDE_zh_CN.ts index 9dd29a42..f9344658 100644 --- a/RedPandaIDE/RedPandaIDE_zh_CN.ts +++ b/RedPandaIDE/RedPandaIDE_zh_CN.ts @@ -532,61 +532,61 @@ Are you really want to continue? 失败 - - - - - - - + + + + + + + Error 错误 - + File %1 is not writable! 无法写入文件"%1" - + Save As 另存为 - + The text to be copied exceeds count limit! 要复制的内容超过了行数限制! - + The text to be copied exceeds character limit! 要复制的内容超过了字符数限制! - + The text to be cut exceeds count limit! 要剪切的内容超过了行数限制! - + The text to be cut exceeds character limit! 要剪切的内容超过了字符数限制! - - - + + + Ctrl+click for more info Ctrl+单击以获取更多信息 - - + + Symbol '%1' not found! 未找到符号'%1'! - + Readonly 只读 @@ -1908,7 +1908,7 @@ Are you really want to continue? - + Issues 编译器 @@ -1923,18 +1923,18 @@ Are you really want to continue? 文件 - + Tools 工具 - - + + Run 运行 - + Edit 编辑 @@ -1965,8 +1965,8 @@ Are you really want to continue? - - + + Debug 调试 @@ -1997,7 +1997,7 @@ Are you really want to continue? - + Search 查找 @@ -2023,418 +2023,465 @@ Are you really want to continue? + Close 关闭 - + Execute 执行 - + Code 代码 - - + Window + 窗口 + + + + + + toolBar 工具栏 - + toolBar_2 工具栏2 - + New 新建 - + Ctrl+N Ctrl+N - + Open... 打开... - + Ctrl+O Ctrl+O - + Save 保存 - + Ctrl+S Ctrl+S - + Save As... 另存为... - + Save As 另存为 - + Save All 全部保存 - + Ctrl+Shift+S Ctrl+Shift+S - + Options 选项 - - - - - - + + + + + + Compile 编译 - + F9 F9 - + F10 F10 - + Undo 恢复 - + Ctrl+Z Ctrl+Z - + Redo 重做 - + Ctrl+Y Ctrl+Y - + Cut 剪切 - + Ctrl+X Ctrl+X - + Copy 复制 - + Ctrl+C Ctrl+C - + Paste 粘贴 - + Ctrl+V Ctrl+V - + Select All 选择全部 - + Ctrl+A Ctrl+A - + Indent 缩进 - + UnIndent 取消缩进 - + Toggle Comment 切换注释 - + Ctrl+/ Ctrl+/ - + Collapse All 全部收起 - + Uncollapse All 全部展开 - + Encode in ANSI 使用ANSI编码 - + Encode in UTF-8 使用UTF-8编码 - + Auto Detect 自动检测 - + Convert to ANSI 转换为ANSI编码 - + Convert to UTF-8 转换为UTF-8编码 - - + + Compile & Run 编译运行 - + F11 F11 - - + + Rebuild All 全部重编译 - + F12 F12 - + Stop Execution 停止执行 - + F6 F6 - + F5 F5 - + Step Over 单步跳过 - + F7 F7 - + Step Into 单步进入 - + F8 F8 - + Step Out 单步跳出 - + Ctrl+F8 Ctrl+F8 - + Run To Cursor 执行到光标处 - + Ctrl+F5 Ctrl+F5 - + Continue 继续执行 - + F4 F4 - + Add Watch... 添加监视 - + View CPU Window... 打开CPU信息窗口... - + Exit 退出 - + Find... 查找... - + Ctrl+F Ctrl+F - + Find in Files... 在文件中查找... - + Ctrl+Shift+F Ctrl+Shift+F - + Replace... 替换 - + Ctrl+R Ctrl+R - + Find Next 查找下一个 - + F3 F3 - + Find Previous 查找前一个 - + Shift+F3 Shift+F3 - + Remove Watch 删除监视 - + Remove All 清除全部监视 - + Modify Watch... 修改监视值 - + Reformat Code 对代码重新排版 - + + Ctrl+Shift+A + Ctrl+Shift+A + + + + Go back + 前一次编辑位置 + + + + Ctrl+Alt+Left + Ctrl+Alt+Left + + + + Forward + 后一次编辑位置 + + + + Ctrl+Alt+Right + Ctrl+Alt+Right + + + + Ctrl+W + Ctrl+W + + + + Close All + 全部关闭 + + + + Ctrl+Shift+W + Ctrl+Shift+W + + + File Encoding 文件编码 - + Recent Files 文件历史 - - + + Debugging 正在调试 - - + + Running 正在运行 - - + + Compiling 正在编译 @@ -2443,172 +2490,172 @@ Are you really want to continue? 行:%1 列:%2 已选择:%3 总行数:%4 总长度:%5 - + Line:%1 Col:%2 Selected:%3 Lines:%4 Length:%5 行:%1 列:%2 已选择:%3 总行数:%4 总长度:%5 - + Read Only 只读 - + Insert 插入 - + Overwrite 覆写 - - + + Confirm 确认 - - - + + + Source file is not compiled. 源文件尚未编译。 - - + + Compile now? 现在编译? - - + + Source file is more recent than executable. 源文件比可执行程序新。 - + Recompile now? 重新编译? - + No compiler set 无编译器设置 - + No compiler set is configured. 没有配置编译器设置。 - + Can't start debugging. 无法启动调试器 - + Enable debugging 启用调试参数 - + You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.<BR /><BR />Do you want to correct this now? 当前编译设置中未启用调试选项(-g3),或启用了信息剥除选项(-s)<br /><br/>是否纠正这一问题? - + Recompile? 重新编译? - + %1 files autosaved 已自动保存%1个文件 - - - - - - - - + + + + + + + + Error 错误 - + File '%1' was changed. 磁盘文件'%1'已被修改。 - + Reload its content from disk? 是否重新读取它的内容? - + File '%1' was removed. 磁盘文件'%1'已被删除。 - + Keep it open? 是否保持它在小熊猫C++中打开的编辑窗口? - + Open 打开 - + Compile Failed 编译失败 - + Run Failed 运行失败 - - + + Confirm Convertion 确认转换 - - + + The editing file will be saved using %1 encoding. <br />This operation can't be reverted. <br />Are you sure to continue? 当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗? - + New Watch Expression 新监视表达式 - + Enter Watch Expression (it is recommended to use 'this->' for class members): 输入监视表达式 - + Parsing file %1 of %2: "%3" (%1/%2)正在解析文件"%3" - - + + Done parsing %1 files in %2 seconds 完成%1个文件的解析,用时%2秒 - + (%1 files per second) (每秒%1个文件) @@ -2680,216 +2727,216 @@ Are you really want to continue? 无法写入配置文件夹"%1" - - - - + + + + The following %1 directories don't exist: 下列%1文件夹不存在: - - + + binary 二进制 - + No %1 directories have been specified. 未指定%1文件夹 - + C include C包含 - - + + C++ include C++包含 - - - - + + + + Cannot find the %1 "%2" 无法找到%1程序"%2" - + C options C语言选项 - + Support all ANSI standard C programs (-ansi) 支持所有ANSI标准C程序(-ansi) - + Do not recognize asm,inline or typeof as a keyword (-fno-asm) 不支持将asm、inline和typeof作为关键字(-fno-asm) - + Imitate traditional C preprocessors (-traditional-cpp) 模仿传统C预处理器行为(-traditional-cpp) - + Code Generation 代码生成 - + Optimize for the following machine (-march) 生成特定机器的专用指令(-march) - + Optimize less, while maintaining full compatibility (-tune) 完整兼容特定机器,较少优化(-tune) - + Enable use of specific instructions (-mx) 启用特定指令集(-mx) - + Optimization level (-Ox) 优化级别(-Ox) - + Compile with the following pointer size (-mx) 使用下列指针大小编译(-mx) - + Language standard (-std) 语言标准(-std) - + Generate debugging information (-g3) 生成调试信息(-g3) - + Generate profiling info for analysis (-pg) 生成性能分析信息(-pg) - + Warnings 代码警告 - + Inhibit all warning messages (-w) 忽略所有警告信息(-w) - + Show most warnings (-Wall) 启用常见问题警告(-Wall) - + Show some more warnings (-Wextra) 启用更多问题警告(-Wextra) - + Check ISO C/C++/C++0x conformance (-pedantic) 检查ISO C/C++/C++0x语法一致性(-pedantic) - + Only check the code for syntax errors (-fsyntax-only) 只进行语法检查(不编译)(-fsyntax-only) - + Make all warnings into errors (-Werror) 将警告作为错误处理(-Werror) - + Abort compilation on first error (-Wfatal-errors) 遇到第一个错误后立即中止编译(-Wfatal-errors) - + Linker 链接器 - + Link an Objective C program (-lobjc) - + Do not use standard system libraries (-nostdlib) 不使用标准库和系统启动文件(-nostdlib) - + Do not create a console window (-mwindows) 不产生控制台窗口(-mwindows) - + Strip executable (-s) 剥除附加信息(-s) - + Link libraries statically (-static) 链接Ojbective C程序(-lobjc) - + Output 输出 - + Put comments in generated assembly code (-fverbose-asm) 在生成的汇编代码中加入注释(-fverbose-asm) - + Use pipes instead of temporary files during compilation (-pipe) 编译时使用管道而不是临时文件(-pipe) - + Do not assemble, compile and generate the assemble code (-S) 只生成汇编代码(-S) - - + + Confirm 确认 - + The following problems were found during validation of compiler set "%1": 在验证编译器设置"%1"时遇到了下列问题: - + Compiler set not configuared. 未配置编译器设置。 - + Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? 您需要小熊猫C++在下列位置搜索编译器吗:<br />%1<br />%2 diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 1c736b48..acacc2b4 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -37,7 +37,8 @@ MainWindow::MainWindow(QWidget *parent) mOpenClosingBottomPanel(false), mOpenClosingLeftPanel(false), mCheckSyntaxInBack(false), - mClosing(false) + mClosing(false), + mSystemTurnedOff(false) { ui->setupUi(this); // status bar @@ -210,6 +211,9 @@ void MainWindow::updateEditorActions() //code ui->actionReformat_Code->setEnabled(false); + + ui->actionClose->setEnabled(false); + ui->actionClose_All->setEnabled(false); } else { ui->actionAuto_Detect->setEnabled(true); ui->actionEncode_in_ANSI->setEnabled(true); @@ -241,6 +245,9 @@ void MainWindow::updateEditorActions() //code ui->actionReformat_Code->setEnabled(true); + ui->actionClose->setEnabled(true); + ui->actionClose_All->setEnabled(true); + updateCompileActions(); } @@ -1082,6 +1089,17 @@ void MainWindow::buildContextMenus() ui->watchView->addAction(ui->actionModify_Watch); } +void MainWindow::maximizeEditor() +{ + if (mLeftPanelOpenned || mBottomPanelOpenned) { + openCloseBottomPanel(false); + openCloseLeftPanel(false); + } else { + openCloseBottomPanel(true); + openCloseLeftPanel(true); + } +} + void MainWindow::onAutoSaveTimeout() { if (!pSettings->editor().enableAutoSave()) @@ -2050,13 +2068,7 @@ void MainWindow::on_splitterMessages_splitterMoved(int, int) void MainWindow::on_EditorTabsLeft_tabBarDoubleClicked(int index) { - if (mLeftPanelOpenned || mBottomPanelOpenned ) { - openCloseBottomPanel(false); - openCloseLeftPanel(false); - } else { - openCloseBottomPanel(true); - openCloseLeftPanel(true); - } + maximizeEditor(); } @@ -2067,5 +2079,20 @@ void MainWindow::on_actionClose_triggered() if (e) { mEditorList->closeEditor(e); } + mClosing = false; +} + + +void MainWindow::on_actionClose_All_triggered() +{ + mClosing = true; + mEditorList->closeAll(mSystemTurnedOff); + mClosing = false; +} + + +void MainWindow::on_actionMaximize_Editor_triggered() +{ + maximizeEditor(); } diff --git a/RedPandaIDE/mainwindow.h b/RedPandaIDE/mainwindow.h index 78fe26b4..a63108fb 100644 --- a/RedPandaIDE/mainwindow.h +++ b/RedPandaIDE/mainwindow.h @@ -119,11 +119,9 @@ public slots: void onEndParsing(int total, int updateView); void onEvalValueReady(const QString& value); -protected: +private: void openFiles(const QStringList& files); void openFile(const QString& filename); - -private: CompileTarget getCompileTarget(); bool debugInferiorhasBreakpoint(); void setupActions(); @@ -132,6 +130,7 @@ private: void prepareDebugger(); void doAutoSave(Editor *e); void buildContextMenus(); + void maximizeEditor(); private slots: void onAutoSaveTimeout(); @@ -255,6 +254,10 @@ private slots: void on_actionClose_triggered(); + void on_actionClose_All_triggered(); + + void on_actionMaximize_Editor_triggered(); + private: Ui::MainWindow *ui; EditorList *mEditorList; @@ -296,7 +299,8 @@ private: CaretList mCaretList; - bool mClosing = false; + bool mClosing; + bool mSystemTurnedOff; // QWidget interface diff --git a/RedPandaIDE/mainwindow.ui b/RedPandaIDE/mainwindow.ui index 84ce1264..b3433fcc 100644 --- a/RedPandaIDE/mainwindow.ui +++ b/RedPandaIDE/mainwindow.ui @@ -841,6 +841,8 @@ Window + + @@ -1461,6 +1463,19 @@ Ctrl+Shift+W + + + + :/icons/images/newlook24/030-dos.png + + + + Maximize Editor + + + Ctrl+F11 + +