From dc807f527cc9c2ef386efb9577deb3de9184b0fb Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Sat, 25 Sep 2021 21:34:10 +0800 Subject: [PATCH] - function tips done --- NEWS.md | 1 + RedPandaIDE/RedPandaIDE_zh_CN.qm | Bin 75625 -> 78175 bytes RedPandaIDE/RedPandaIDE_zh_CN.ts | 1056 ++++++++++------- RedPandaIDE/editor.cpp | 67 +- RedPandaIDE/mainwindow.ui | 10 +- RedPandaIDE/parser/cpptokenizer.cpp | 1 - RedPandaIDE/qsynedit/Types.cpp | 3 +- RedPandaIDE/widgets/functiontooltipwidget.cpp | 30 +- RedPandaIDE/widgets/functiontooltipwidget.h | 2 +- 9 files changed, 682 insertions(+), 488 deletions(-) diff --git a/NEWS.md b/NEWS.md index 47091fad..a8173f59 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,5 @@ Version 0.2 + - enhancement: function tips - enhancement: project support - enhancement: paint color editor use system palette's disabled group color - fix: add watch not work when there's no editor openned; diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.qm b/RedPandaIDE/RedPandaIDE_zh_CN.qm index 89a5daae3f34cf2f88e221c79b2da59451495b4b..ccf431de0ca65e2d973fe92778a21fc1bb92cb96 100644 GIT binary patch delta 9289 zcmaJ`bzBsC_dc^bvpKsfNT^&D14ZRxqE|#LKt)7FEKquZ^->ZldSzAY0A(fZKnzS& z#6U&G4z6(x#Kyqx_V+BKy!XEG`@_$}%+8$e$>*FiK03?Zyu&W2udjcLh&2$UeFiQf zGFSuCfv&&|;AmhbFcp{u+yTr6UIlI^dJqqMMfCU%5ob#DqzAAI(ZG4t$gnoR0l0q> z=u1@ZAW>U2k*rQNE?i=w-~557_ZlMkJ)*wdp-M6kV$wDOdjc;IxsN28v`@gK5a1D_ z`L~HY9Ejqc6ZMBG3B8ECj}a~2O*EpIXzgGk-??~CN#uW+=-mle)D*`~CN?*hXnI3p z*CtYXn)#gAy)4lJTVl@v(?$||9(phG0=f`=s!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f z#NE@C@WBB({k$@~aqg=#+xQR%Tck4&fg`5b>zX%SpOYu(TBsM`<$GsctNpQf@o+}h zwaE#Tnw8FGG}bM;s&ll-!MN~QH~u*`9$=w!{|#f)>LA^$yEXV?RiSQf_7!C26`kJ| zY;N_RZM^QAuM(n`sQd1Y1zT>>O9m|Pq)y+q6`m{N z^d0uW@L3gl>$@=Y?ijswDSoG0s~=nwj6uam?~v#TPnPP(ez^=WnV_H0eFf3j?)sUA z*c-TcpVa%Th2?|R>K9g^M#o0zSDbJr^6=NMt#L)0^wn=;@Z928`W@|7p$%M?nKMD= zw}JZTDqDEwlzz8r8LkvI`rTb%;NemFy>Vc{XMMc!01RxVKe!2MzT%-iVF*H-ou)S= zorfCDTB*-k`vikUoc>G?SQh(K<_8D;xo&wxQCIcFVMhGmgZ|OX1@MHO{?)+scqcVi zU-bm)7n-8~Set;WinIR9F$)x-x4v%r<d`=)cc_M~0ypDb%CkL*l3P@!UA(6EYru zBOT3Kf9aDkWn!E*!)9)((&(_t+!*B@VyvI%mT}3aPv4CG`|Q|^^n){mj14JW)fu}p zHz_j4WO;BIqt6}Jn$M^h|NA`s|67cNr2zqcwzC%-b7M^{ BacktraceModel - + Function 函数 - + Filename 文件名 - + Line @@ -45,17 +45,17 @@ BreakpointModel - + Filename 文件名 - + Line - + Condition 条件 @@ -92,7 +92,7 @@ ColorEdit - + NONE 无颜色 @@ -221,28 +221,28 @@ CompilerManager - - - - + + + + No compiler set 无编译器设置 - - - - + + + + No compiler set is configured. 没有配置编译器设置。 - - - - + + + + Can't start debugging. 无法启动调试器 @@ -573,28 +573,28 @@ Are you really want to continue? 找不到调试器程序"%1" - - + + Execute to evaluate 执行以求值 - + Not found in current context 不在当前语境中 - + Compile 编译 - + Source file is more recent than executable. 源文件比程序文件新。 - + Recompile? 重新编译? @@ -618,10 +618,10 @@ Are you really want to continue? - - - - + + + + Error 错误 @@ -636,50 +636,50 @@ Are you really want to continue? 另存为 - + 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'! - + Break point condition 断点条件 - + Enter the condition of the breakpoint: 输入当前断点的生效条件: - + Readonly 只读 @@ -952,32 +952,37 @@ Are you really want to continue? 下划线 - + + Rainbow parenthesis + 彩虹括号 + + + Duplicate... 复制... - + Rename... 重命名... - + Restore to Default 删除自定义修改 - + Import Scheme... 导入配色... - + Export... 导出... - + Delete... 删除... @@ -987,55 +992,55 @@ Are you really want to continue? 背景色 - - - - - - - - + + + + + + + + Error 错误 - + Open 打开 - - + + Color Scheme Files (*.scheme) 配色方案文件 (*.scheme) - + '%1' is not a valid name for color scheme file. '%1'不是合法的配色方案文件名。 - + New scheme name 新方案名 - + '%1' is not a valid scheme name! '%1'不是合法的配色方案名! - + Save 保存 - + Confirm Delete Scheme 确认删除方案 - + Scheme '%1' will be deleted!<br />Do you really want to continue? 配色方案'%1'将会被删除!<br />您确认要继续吗? @@ -1230,7 +1235,7 @@ Are you really want to continue? 自动覆写匹配的符号 - + Remove symbol pairs when delete chars 在删除字符时自动删除配对的符号 @@ -1258,6 +1263,44 @@ Are you really want to continue? 在文件函数变化时检查 + + EditorTooltipsWidget + + + Form + 表单 + + + + Show function tips + 显示函数参数提示 + + + + Enable mouse hover tooltips + 启用鼠标悬停提示 + + + + Show syntax issue tooltips + 显示语法错误信息 + + + + Show full header filename tooltips + 显示头文件路径信息 + + + + Show identifier definition tooltips + 显示标识符定义信息 + + + + Show expression value tooltips when debugging + 调试时显示表达式的值 + + EnvironmentAppearenceWidget @@ -1345,6 +1388,31 @@ Are you really want to continue? Minimize IDE when running programs 在运行程序时自动最小化IDE + + + Parameters to pass to your program + 运行程序的命令行参数 + + + + Redirect input to the following file: + 将程序的标准输入重定向到下面的文件 + + + + Note: Debugger doesn't support this feature. + 注意:由于gdb的bug,调试时不支持该功能 + + + + Choose input file + 选择输入文件 + + + + All files (*.*) + 所有文件 (*.*) + FileCompiler @@ -2106,40 +2174,40 @@ Are you really want to continue? 小熊猫C++ - - + + Issues 编译器 - + Compile Log 编译日志 - + File 文件 - + Tools 工具 - - + + Run 运行 - + Edit 编辑 - + Project 项目 @@ -2149,12 +2217,12 @@ Are you really want to continue? 监视 - + Structure 结构 - + Files 文件 @@ -2163,95 +2231,92 @@ Are you really want to continue? 资源 - - - + + + + Debug 调试 - + Evaluate: 求值 - + Debug Console 调试主控台 - + Call Stack 调用栈 - + Breakpoints 断点 - + Locals 本地变量 - - + + Search 查找 - + History: 历史: - + Search Again 重新查找 - + Replace with: 替换为: - + Replace 替换 - + Close 关闭 - + Execute 运行 - + + Code 代码 - + Window 窗口 - - - - toolBar - 工具栏 + 工具栏 - toolBar_2 - 工具栏2 + 工具栏2 @@ -2259,542 +2324,553 @@ Are you really want to continue? 新建 - + 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 单步进入 - - + + Main + 主工具栏 + + + + Compiler Set + 编译器配置集 + + + + New Source File 新建源代码文件 - + 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 - + Maximize Editor 最大化编辑器 - + Ctrl+F11 Ctrl+F11 - + Next 下一窗口 - + Ctrl+Tab Ctrl+Tab - + Previous 前一窗口 - + Ctrl+Shift+Tab Ctrl+Shift+Tab - + Toggle breakpoint 切换断点 - + Ctrl+F4 Ctrl+F4 - - + + Clear all breakpoints 删除所有断点 - + Breakpoint property... 设置断点条件... - + Goto Declaration 跳转到声明处 - + Goto Definition 跳转到定义处 - + Find references 查找符号的引用 - + Open containing folder 打开所在的文件夹 - + Ctrl+B Ctrl+B - + Open a terminal here 打开命令行窗口 - + File Properties... 文件属性... - + Close Project 关闭项目 - + Project options 项目属性 - + New Project... 新建项目... - + New File 新建项目文件 - + Add to project... 添加到项目... - + Remove from project 从项目删除 - + View Makefile 查看Makefile - + Clean 清理构建文件 - + Open Folder in Explorer 在浏览器中打开 - + Open In Terminal 在终端中打开 @@ -2809,32 +2885,32 @@ Are you really want to continue? 文件历史 - - - - - - + + + + + + Debugging 正在调试 - - - - - - + + + + + + Running 正在运行 - - - - - - + + + + + + Compiling 正在编译 @@ -2843,255 +2919,292 @@ 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 覆写 - + Close project 关闭项目 - + Are you sure you want to close %1? 你确定要关闭'%1'吗? - - + + 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/>是否纠正这一问题? - + + Project not built + 项目尚未构建 + + + + Project hasn't been built. Build it now? + 项目尚未构建。是否构建? + + + + Host applcation missing + 宿主程序不存在 + + + + DLL project needs a host application to run. + 动态链接库(DLL)需要一个宿主程序来运行。 + + + + But it's missing. + 但它不存在。 + + + + Host application not exists + 宿主程序不存在 + + + + Host application file '%1' doesn't exist. + 宿主程序'%1'不存在。 + + + Recompile? 重新编译? - + Copy all 全部复制 - + Clear 清除 - + Remove this search 清除这次搜索 - + Clear all searches 删除所有搜索 - + Breakpoint condition... 断点条件... - + Break point condition 断点条件 - + Enter the condition of the breakpoint: 输入当前断点的生效条件: - + Remove all breakpoints 清除所有断点 - + Rename File 重命名文件 - - + + Add Folder 添加文件夹 - + New folder 新文件夹 - + Folder name: 文件夹: - + Rename Folder 重命名 - + Remove Folder 删除文件夹 - + %1 files autosaved 已自动保存%1个文件 - + Save project 保存项目 - + The project '%1' has modifications. 项目'%1'有改动。 - + Do you want to save it? 需要保存吗? - + Do you really want to clear all breakpoints in this file? 您真的要清除该文件的所有断点吗? - + New project 新建项目 - + Close %1 and start new project? 关闭'%1'以打开新项目? - + Folder not exist 文件夹不存在 - + Folder '%1' doesn't exist. Create it now? 文件夹'%1'不存在。是否创建? - + Can't create folder 无法创建文件夹 - + Failed to create folder '%1'. 创建文件夹'%1'失败。 - + Save new project as - + Red panda Dev-C++ project file (*.dev) 小熊猫Dev-C++项目文件 (*.dev) - + New project fail 新建项目失败 - + Can't assign project template 无法使用模板创建项目 - + Add to project 添加到项目 - - - - - - - - + + + + + + + + Error 错误 @@ -3101,75 +3214,75 @@ Are you really want to continue? 项目历史 - + 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个文件) @@ -3226,87 +3339,87 @@ Are you really want to continue? Project - + File Not Found 未找到文件 - + Project file '%1' can't be found! 找不到项目文件'%1'! - + untitled 无标题 - + Can't save file 无法保存文件 - + Can't save file '%1' 无法保存文件'%1'. - + File Exists 文件已存在 - + File '%1' is already in the project 文件'%1'已在项目中 - + Project Updated 项目已升级 - + Your project was succesfully updated to a newer file format! 已成功将项目升级到新的格式 - + If something has gone wrong, we kept a backup-file: '%1'... 旧项目文件备份在'%1'。 - + Settings need update 设置需要更新 - + The compiler settings format of Dev-C++ has changed. Dev-C++的编译器设置格式已发生改变。 - + Please update your settings at Project >> Project Options >> Compiler and save your project. 请在项目 >> 项目属性 >> 编译器设置中修改您的设置并保存您的项目 - + Compiler not found 未找到编译器 - + The compiler set you have selected for this project, no longer exists. 您为该项目设置的编译器不存在。 - + It will be substituted by the global compiler set. 它将会被全局编译器设置代替。 - + Developed using the Red Panda Dev-C++ IDE 使用小熊猫Dev-C++编辑器开发 @@ -3430,6 +3543,29 @@ Are you really want to continue? 自定义设置(仅对本项目生效) + + ProjectDLLHostWidget + + + Form + 表单 + + + + Host application for DLL: + DLL文件的宿主程序: + + + + Choose host application + 选择宿主程序 + + + + All files (*.*) + 所有文件 (*.*) + + ProjectDirectoriesWidget @@ -3631,6 +3767,11 @@ Are you really want to continue? Information about using a custom make file 关于自定义Makefile + + + Include the following files into the makefile: + 在Makefile中包含下列文件: + Custom makefile @@ -3645,24 +3786,24 @@ Are you really want to continue? ProjectModel - + File exists 文件已存在 - + File '%1' already exists. Delete it now? 文件'%1'已存在。是否删除? - - + + Remove failed 删除失败 - - + + Failed to remove file '%1' 无法删除文件'%1' @@ -3956,175 +4097,175 @@ Are you really want to continue? 无法载入自动链接设置 - - - - + + + + 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) - + Profile 性能分析 - + 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) 链接Objective-C程序 (-lobjc) - + Do not use standard system libraries (-nostdlib) 不使用标准库和系统启动文件(-nostdlib) - + Do not create a console window (-mwindows) 不产生控制台窗口(-mwindows) - + Strip executable (-s) 剥除附加信息(-s) @@ -4133,43 +4274,43 @@ Are you really want to continue? 链接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 @@ -4488,17 +4629,17 @@ Are you really want to continue? 缺省 - + Untitled 无标题 - + constructor 构造函数 - + destructor 析构函数 @@ -4518,17 +4659,17 @@ Are you really want to continue? RegisterModel - + Register 寄存器 - + Value(Hex) 值(HEX) - + Value(Dec) 值(DEC) @@ -4861,164 +5002,176 @@ Are you really want to continue? 取消 - + Appearence 外观 - + Environment 环境 - - + + Compiler Set 编译器配置集 - - + + Compiler 编译器 - + Auto Link 自动链接 - - - - - + + + + + General 通用 - - - - - - - - - + + + + + + + + + + Editor 编辑器 - + Font 字体 - + Copy & Export 复制/导出 - + Color 配色 - + Code Completion 代码补全 - + Symbol Completion 符号补全 - + Auto Syntax Checking 自动语法检查 - + + Tooltips + 信息提示 + + + Auto save 自动保存 - + Misc 杂项 - + Program Runner 程序运行 - + Debugger 调试器 - + Code Formatter 代码排版 - - - - - - - - - + + + + + + + + + + Project 项目 - + Files 文件 - + Custom Compile options 自定义编译选项 - + Directories 文件夹 - + Precompiled Header 预编译头文件 - + Makefile Makefile - + Output 输出 - + + DLL host + DLL宿主 + + + Version info 版本信息 - + Save Changes 保存修改 - + There are changes in the settings, do you want to save them before swtich to other page? 本页中有尚未保存的设置修改,是否保存后再切换到其他页? @@ -5069,8 +5222,8 @@ Are you really want to continue? SynEdit + - The highlighter seems to be in an infinite loop 高亮处理进入了死循环 @@ -5078,16 +5231,29 @@ Are you really want to continue? SynEditStringList - + Can't open file '%1' for read! 无法读取文件'%1'! - + Can't open file '%1' for save! 无法写入文件'%2'! + + WatchModel + + + Expression + 表达式 + + + + Value + + + editorgeneralwidget diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index ef94dbdc..e038ddae 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -464,6 +464,7 @@ void Editor::focusOutEvent(QFocusEvent *event) pMainWindow->updateEditorActions(); pMainWindow->updateStatusbarForLineCol(); pMainWindow->updateForStatusbarModeInfo(); + pMainWindow->functionTip()->hide(); } void Editor::keyPressEvent(QKeyEvent *event) @@ -1784,6 +1785,7 @@ void Editor::showCompletion(bool autoComplete) }); mCompletionPopup->setParser(mParser); mCompletionPopup->setUseCppKeyword(mUseCppSyntax); + pMainWindow->functionTip()->hide(); mCompletionPopup->show(); // Scan the current function body @@ -1842,6 +1844,7 @@ void Editor::showHeaderCompletion(bool autoComplete) if (word.lastIndexOf('"')>0 || word.lastIndexOf('>')>0) return; + pMainWindow->functionTip()->hide(); mHeaderCompletionPopup->show(); mHeaderCompletionPopup->setSearchLocal(word.startsWith('"')); word.remove(0,1); @@ -2246,6 +2249,10 @@ QString Editor::getHintForFunction(const PStatement &statement, const PStatement void Editor::updateFunctionTip() { + if (pMainWindow->completionPopup()->isVisible()) { + pMainWindow->functionTip()->hide(); + return; + } BufferCoord caretPos = caretXY(); ContentsCoord curPos = fromBufferCoord(caretPos); ContentsCoord cursorPos = curPos; @@ -2257,6 +2264,7 @@ void Editor::updateFunctionTip() // Stopping characters... QChar ch = *curPos; if (ch == '\0' || ch == ';') { + pMainWindow->functionTip()->hide(); return; // Opening brace, increase count } @@ -2299,14 +2307,17 @@ void Editor::updateFunctionTip() curPos += 1; } + //qDebug()<<"first pass:"<functionTip()->hide(); return; } ContentsCoord FFunctionEnd = curPos; int paramPos = 0; + bool paramPosFounded = false; // We've stopped at the ending ), start walking backwards )*here* with nBraces = -1 for (int i=0;ifunctionTip()->hide(); return; + } if (prevCh == '/' && ch == '*' ) { curPos -= 1; break; @@ -2331,8 +2344,9 @@ void Editor::updateFunctionTip() break;; } else if (ch == ',') { if (nBraces == 0) { - if (curPos <= cursorPos) { + if (curPos <= cursorPos && !paramPosFounded) { paramPos = nCommas; + paramPosFounded = true; } nCommas++; } @@ -2341,10 +2355,13 @@ void Editor::updateFunctionTip() if (curPos.atStart()) break; } - paramPos = nCommas - paramPos; + if (paramPosFounded) + paramPos = nCommas - paramPos; + //qDebug()<<"second pass:"<functionTip()->hide(); return; } @@ -2362,22 +2379,31 @@ void Editor::updateFunctionTip() } ContentsCoord prevPos = curPos-1; - if (prevPos.atStart()) + if (prevPos.atStart()) { + pMainWindow->functionTip()->hide(); return; + } // Get the name of the function we're about to show BufferCoord FuncStartXY = prevPos.toBufferCoord(); QString token; PSynHighlighterAttribute HLAttr; if (!getHighlighterAttriAtRowCol(FuncStartXY,token,HLAttr)) { + pMainWindow->functionTip()->hide(); return; } - if (HLAttr->name()!=SYNS_AttrIdentifier) + if (HLAttr->name()!=SYNS_AttrIdentifier) { + pMainWindow->functionTip()->hide(); return; + } BufferCoord pWordBegin, pWordEnd; QString s = getWordAtPosition(this, FuncStartXY, pWordBegin,pWordEnd, WordPurpose::wpInformation); +// qDebug()<functionTip()->tipCount()<=0) { + pMainWindow->functionTip()->hide(); return; } + // Position it at the top of the next line + QPoint p = rowColumnToPixels(displayXY()); + p+=QPoint(0,textHeight()+2); + pMainWindow->functionTip()->move(mapToGlobal(p)); pMainWindow->functionTip()->setFunctioFullName(s); pMainWindow->functionTip()->guessFunction(nCommas); @@ -2410,32 +2441,6 @@ void Editor::updateFunctionTip() paramPos ); pMainWindow->functionTip()->show(); -//// // get the current token position in the text -//// // this is where the prototype name usually starts -//// FTokenPos := CurPos - Length(S); - -//// Search for the best possible overload match according to comma count -//if (shoFindBestMatchingToolTip in FOptions) then - -// // Only do so when the user didn't select his own -// if not FCustomSelIndex then -// S := FindClosestToolTip(S, nCommas); - -//// Select the current one -//if (FSelIndex < FToolTips.Count) then -// S := FToolTips.Strings[FSelIndex]; - -//// set the hint caption -//Caption := Trim(S); - -//// we use the LookupEditor to get the highlighter-attributes -//// from. check the DrawAdvanced method! -//FLookupEditor.Text := Caption; -//FLookupEditor.Highlighter := FEditor.Highlighter; - -//// get the index of the current argument (where the cursor is) -//FCurParamIndex := GetCommaIndex(P, FFunctionStart + 1, CaretPos - 1); -//RethinkCoordAndActivate; } void Editor::setInProject(bool newInProject) diff --git a/RedPandaIDE/mainwindow.ui b/RedPandaIDE/mainwindow.ui index 48ae4bcc..ae0ce024 100644 --- a/RedPandaIDE/mainwindow.ui +++ b/RedPandaIDE/mainwindow.ui @@ -926,7 +926,7 @@ - toolBar + Main @@ -947,7 +947,7 @@ - toolBar + Code TopToolBarArea @@ -962,7 +962,7 @@ - toolBar + Compile @@ -983,7 +983,7 @@ - toolBar + Debug @@ -1008,7 +1008,7 @@ - toolBar_2 + Compiler Set diff --git a/RedPandaIDE/parser/cpptokenizer.cpp b/RedPandaIDE/parser/cpptokenizer.cpp index 75957d04..ab556f3b 100644 --- a/RedPandaIDE/parser/cpptokenizer.cpp +++ b/RedPandaIDE/parser/cpptokenizer.cpp @@ -594,7 +594,6 @@ void CppTokenizer::advance() mCurrent++; break; case '\\': - if (isLineChar(*(mCurrent + 1))) skipSplitLine(); else diff --git a/RedPandaIDE/qsynedit/Types.cpp b/RedPandaIDE/qsynedit/Types.cpp index e6d91af9..19d93538 100644 --- a/RedPandaIDE/qsynedit/Types.cpp +++ b/RedPandaIDE/qsynedit/Types.cpp @@ -204,9 +204,10 @@ QChar ContentsCoord::operator*() const return QChar('\0'); } QString s = mEdit->lines()->getString(mLine-1); - if (mChar > s.length()+1 ) { + if (mChar >= s.length()+1 ) { return QChar('\n'); } + //qDebug()< +#include -FunctionTooltipWidget::FunctionTooltipWidget(QWidget *parent) : QWidget(parent) +FunctionTooltipWidget::FunctionTooltipWidget(QWidget *parent) : + QFrame(parent, Qt::ToolTip | Qt::WindowStaysOnTopHint | Qt::WindowDoesNotAcceptFocus) { - setWindowFlags(Qt::Popup); setFocusPolicy(Qt::NoFocus); mInfoLabel = new QLabel(this); mInfoLabel->setWordWrap(true); @@ -21,12 +22,17 @@ FunctionTooltipWidget::FunctionTooltipWidget(QWidget *parent) : QWidget(parent) mDownButton->setFixedSize(16, 16); mDownButton->setAutoRaise(true); - this->setLayout(new QHBoxLayout()); + layout()->setContentsMargins(0,0,0,0); + layout()->setSpacing(0); layout()->addWidget(mUpButton); layout()->addWidget(mTotalLabel); layout()->addWidget(mDownButton); layout()->addWidget(mInfoLabel); + connect(mUpButton,&QPushButton::clicked, + this,&FunctionTooltipWidget::previousTip); + connect(mDownButton,&QPushButton::clicked, + this,&FunctionTooltipWidget::nextTip); } void FunctionTooltipWidget::addTip(const QString &name, const QString& fullname, @@ -102,11 +108,23 @@ void FunctionTooltipWidget::updateTip() } text += "( "+displayList.join(", ") + ") "; } + if (mInfos.length()>1) { + mTotalLabel->setText(QString("%1/%2").arg(mInfoIndex+1).arg(mInfos.length())); + } + int width = mInfoLabel->fontMetrics().horizontalAdvance(text); + if (width > 400) { + mInfoLabel->setMinimumWidth(410); + } else { + mInfoLabel->setMinimumWidth(width); + } mInfoLabel->setText(text); } void FunctionTooltipWidget::guessFunction(int commas) { + if (mInfoIndex>=0 && mInfoIndexparams.count()>commas) + return; for (int i=0;iparams.count()>commas) { mInfoIndex = i; @@ -141,6 +159,8 @@ QStringList FunctionTooltipWidget::splitArgs(QString argStr) QString s = argStr.mid(paramStart,i-paramStart); s=s.trimmed(); if (!s.isEmpty()) { + if (s.endsWith(')')) + s.truncate(s.length()-1); result.append(s); } return result; @@ -164,6 +184,7 @@ int FunctionTooltipWidget::paramIndex() const void FunctionTooltipWidget::setParamIndex(int newParamIndex) { mParamIndex = newParamIndex; + updateTip(); } void FunctionTooltipWidget::closeEvent(QCloseEvent *) @@ -179,7 +200,8 @@ void FunctionTooltipWidget::showEvent(QShowEvent *) updateTip(); } -void FunctionTooltipWidget::hideEvent(QHideEvent *event) +void FunctionTooltipWidget::hideEvent(QHideEvent *) { mInfos.clear(); + mFunctioFullName = ""; } diff --git a/RedPandaIDE/widgets/functiontooltipwidget.h b/RedPandaIDE/widgets/functiontooltipwidget.h index 1c829352..d4d8f14f 100644 --- a/RedPandaIDE/widgets/functiontooltipwidget.h +++ b/RedPandaIDE/widgets/functiontooltipwidget.h @@ -14,7 +14,7 @@ struct FunctionInfo { using PFunctionInfo = std::shared_ptr; -class FunctionTooltipWidget : public QWidget +class FunctionTooltipWidget : public QFrame { Q_OBJECT public: