diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.qm b/RedPandaIDE/RedPandaIDE_zh_CN.qm index 9ee9e1eb..5b2e2ddc 100644 Binary files a/RedPandaIDE/RedPandaIDE_zh_CN.qm and b/RedPandaIDE/RedPandaIDE_zh_CN.qm differ 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 + +