* show name and size of the compiled file

This commit is contained in:
royqh1979@gmail.com 2021-04-21 23:06:55 +08:00
parent 807cd1502e
commit db39094d8d
8 changed files with 859 additions and 32 deletions

View File

@ -1,6 +1,222 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>Compiler</name>
<message>
<location filename="compiler/compiler.cpp" line="28"/>
<source>Compile Result:</source>
<translation></translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="30"/>
<source>- Errors: %1</source>
<translation>- : %1</translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="31"/>
<source>- Warnings: %1</source>
<translation>- : %1</translation>
</message>
<message>
<location filename="compiler/compiler.cpp" line="32"/>
<source>- Time Elasped: %1 secs</source>
<translation>- : %1 </translation>
</message>
</context>
<context>
<name>CompilerSetDirectoriesWidget</name>
<message>
<location filename="settingsdialog/compilersetdirectorieswidget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetdirectorieswidget.ui" line="29"/>
<location filename="settingsdialog/compilersetdirectorieswidget.ui" line="32"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetdirectorieswidget.ui" line="47"/>
<location filename="settingsdialog/compilersetdirectorieswidget.ui" line="50"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetdirectorieswidget.ui" line="65"/>
<location filename="settingsdialog/compilersetdirectorieswidget.ui" line="68"/>
<source>Remove Invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetdirectorieswidget.cpp" line="52"/>
<source>Choose Folder</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CompilerSetOptionWidget</name>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="14"/>
<source>Form</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="20"/>
<source>Compiler set to config</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="35"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="47"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="59"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="71"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="83"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="242"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="257"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="315"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="330"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="345"/>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="360"/>
<source>...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="105"/>
<source>General</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="111"/>
<source>Add the following arguments when calling the compiler</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="121"/>
<source>Add the following arguments when calling the linker</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="131"/>
<source>Add Charset arguments when calling the compiler</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="139"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="165"/>
<source>Directories</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="194"/>
<source>Programs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="206"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="222"/>
<source>Resource Compilerwindres)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="232"/>
<source>C++ Compiler(g++)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="239"/>
<source>Choose C++ Compiler</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="254"/>
<source>Choose C Compiler</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="272"/>
<source>C Compiler(gcc)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="279"/>
<source>Debugger(gdb)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="286"/>
<source>Profiler(gprof)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="293"/>
<source>make</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="312"/>
<source>Choose make</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="327"/>
<source>Choose Debugger</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="342"/>
<source>Choose Resource Compiler</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.ui" line="357"/>
<source>Choose Profiler</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="212"/>
<source>Confirm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="213"/>
<source>Red Panda C++ will clear current compiler list and search for compilers in the following locations:
&apos;%1&apos;
&apos;%2&apos;
Are you really want to continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="226"/>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="242"/>
<source>Compiler Set Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="226"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="235"/>
<source>Compiler Set Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="242"/>
<source>New name</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Editor</name>
<message>
@ -9,38 +225,82 @@
<translation></translation>
</message>
<message>
<location filename="editor.cpp" line="127"/>
<location filename="editor.cpp" line="130"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="editor.cpp" line="128"/>
<location filename="editor.cpp" line="131"/>
<source>Can&apos;t Open File %1:%2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="editor.cpp" line="182"/>
<location filename="editor.cpp" line="185"/>
<source>Failed to Save file %1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="editor.cpp" line="186"/>
<location filename="editor.cpp" line="189"/>
<source>Failed to Open file %1: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="editor.cpp" line="197"/>
<location filename="editor.cpp" line="206"/>
<location filename="editor.cpp" line="232"/>
<location filename="editor.cpp" line="200"/>
<location filename="editor.cpp" line="209"/>
<location filename="editor.cpp" line="235"/>
<source>Fail</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="editor.cpp" line="221"/>
<location filename="editor.cpp" line="224"/>
<source>Save As</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FileCompiler</name>
<message>
<location filename="compiler/filecompiler.cpp" line="25"/>
<source>Compiling single file...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="compiler/filecompiler.cpp" line="27"/>
<source>- Filename: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="compiler/filecompiler.cpp" line="28"/>
<source>- Compiler Set Name: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="compiler/filecompiler.cpp" line="40"/>
<source>Can&apos;t delete the old executable file &quot;%1&quot;.
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="compiler/filecompiler.cpp" line="62"/>
<source>Can&apos;t the compiler for file %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="compiler/filecompiler.cpp" line="68"/>
<source>Processing %1 source file:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="compiler/filecompiler.cpp" line="70"/>
<source>%1 Compiler: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="compiler/filecompiler.cpp" line="71"/>
<source>Command: %1 %2</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
@ -50,83 +310,200 @@
</message>
<message>
<location filename="mainwindow.ui" line="77"/>
<location filename="mainwindow.ui" line="165"/>
<source>Tab 1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="82"/>
<location filename="mainwindow.ui" line="170"/>
<source>Tab 2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="189"/>
<location filename="mainwindow.ui" line="165"/>
<source>Compiler Output</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="214"/>
<source>File</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="203"/>
<location filename="mainwindow.ui" line="225"/>
<source>Tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="231"/>
<location filename="mainwindow.ui" line="389"/>
<location filename="mainwindow.ui" line="392"/>
<source>Run</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="238"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="259"/>
<location filename="mainwindow.ui" line="285"/>
<source>toolBar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="223"/>
<location filename="mainwindow.ui" line="274"/>
<source>toolBar_2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="303"/>
<source>New</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="226"/>
<location filename="mainwindow.ui" line="306"/>
<source>Ctrl+N</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="236"/>
<location filename="mainwindow.ui" line="316"/>
<source>Open...</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="239"/>
<location filename="mainwindow.ui" line="319"/>
<source>Ctrl+O</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="249"/>
<location filename="mainwindow.ui" line="329"/>
<source>Save</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="252"/>
<location filename="mainwindow.ui" line="332"/>
<source>Ctrl+S</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="262"/>
<location filename="mainwindow.ui" line="342"/>
<source>Save As...</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.ui" line="265"/>
<location filename="mainwindow.ui" line="345"/>
<source>Save As</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="275"/>
<location filename="mainwindow.ui" line="355"/>
<source>Save All</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="278"/>
<location filename="mainwindow.ui" line="358"/>
<source>Ctrl+Shift+S</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="51"/>
<location filename="mainwindow.ui" line="363"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="373"/>
<location filename="mainwindow.ui" line="376"/>
<source>Compile</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="379"/>
<source>F9</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="395"/>
<source>F10</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="405"/>
<source>Undo</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="408"/>
<source>Ctrl+Z</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="418"/>
<source>Redo</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="421"/>
<source>Ctrl+Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="431"/>
<source>Cut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="434"/>
<source>Ctrl+X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="444"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="447"/>
<source>Ctrl+C</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="457"/>
<source>Paste</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="460"/>
<source>Ctrl+V</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="465"/>
<source>Select All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="468"/>
<source>Ctrl+A</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="478"/>
<source>Indent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="488"/>
<source>UnIndent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="64"/>
<source>Line: %1 Col: %2 Lines: %3 Chars: %4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="99"/>
<location filename="mainwindow.cpp" line="129"/>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
@ -134,12 +511,12 @@
<context>
<name>QObject</name>
<message>
<location filename="editorlist.cpp" line="76"/>
<location filename="editorlist.cpp" line="71"/>
<source>Save</source>
<translation></translation>
</message>
<message>
<location filename="editorlist.cpp" line="77"/>
<location filename="editorlist.cpp" line="72"/>
<source>Save changes to %1?</source>
<translation type="unfinished"></translation>
</message>
@ -148,7 +525,7 @@
<translation type="vanished">&quot;%s&quot;</translation>
</message>
<message>
<location filename="editor.cpp" line="198"/>
<location filename="editor.cpp" line="201"/>
<source>File %s is not writable!</source>
<translation type="unfinished"></translation>
</message>
@ -177,5 +554,257 @@
<source>All files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="31"/>
<location filename="main.cpp" line="38"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="32"/>
<source>Can&apos;t create configuration folder %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cpp" line="39"/>
<source>Can&apos;t write to configuration file %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="697"/>
<source>C options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="703"/>
<source>Code Generation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="19"/>
<source>Binaries</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="21"/>
<source>Libraries</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="23"/>
<source>C Includes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="25"/>
<source>C++ Includes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="77"/>
<source>No</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/compilersetoptionwidget.cpp" line="78"/>
<source>Yes</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Settings::CompilerSet</name>
<message>
<location filename="settings.cpp" line="698"/>
<source>Support all ANSI standard C programs (-ansi)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="699"/>
<source>Do not recognize asm,inline or typeof as a keyword (-fno-asm)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="700"/>
<source>Imitate traditional C preprocessors (-traditional-cpp)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="732"/>
<source>Optimize for the following machine (-march)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="733"/>
<source>Optimize less, while maintaining full compatibility (-tune)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="753"/>
<source>Enable use of specific instructions (-mx)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="764"/>
<source>Optimization level (-Ox)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="771"/>
<source>Compile with the following pointer size (-mx)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="794"/>
<source>Language standard (-std)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="795"/>
<source>Generate debugging information (-g3)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="796"/>
<source>Generate profiling info for analysis (-pg)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="799"/>
<source>Warnings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="800"/>
<source>Inhibit all warning messages (-w)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="801"/>
<source>Show most warnings (-Wall)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="802"/>
<source>Show some more warnings (-Wextra)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="803"/>
<source>Check ISO C/C++/C++0x conformance (-pedantic)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="804"/>
<source>Only check the code for syntax errors (-fsyntax-only)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="805"/>
<source>Make all warnings into errors (-Werror)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="806"/>
<source>Abort compilation on first error (-Wfatal-errors)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="809"/>
<source>Linker</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="810"/>
<source>Link an Objective C program (-lobjc)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="811"/>
<source>Do not use standard system libraries (-nostdlib)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="812"/>
<source>Do not create a console window (-mwindows)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="813"/>
<source>Strip executable (-s)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="814"/>
<source>Link libraries statically (-static)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="817"/>
<source>Output</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="818"/>
<source>-fverbose-asm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="819"/>
<source>Use pipes instead of temporary files during compilation (-pipe)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settings.cpp" line="820"/>
<source>Do not assemble, compile and generate the assemble code (-S)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<location filename="settingsdialog/settingsdialog.ui" line="14"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.ui" line="92"/>
<source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.ui" line="156"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.ui" line="163"/>
<source>Apply</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.ui" line="170"/>
<source>Cancle</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="20"/>
<source>Compiler Set</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="20"/>
<source>Compiler</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="99"/>
<source>Save Changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="100"/>
<source>There are changes in the settings, do you want to save them before swtich to other page?</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -29,7 +29,12 @@ void Compiler::run()
log("------------------");
log(tr("- Errors: %1").arg(0));
log(tr("- Warnings: %1").arg(0));
log(tr("- Time Elasped: %1 secs").arg(timer.elapsed() / 1000.0));
if (!mOutputFile.isEmpty()) {
log(tr("- Output Filename: %1").arg(mOutputFile));
QLocale locale = QLocale::system();
log(tr("- Output Size: %1").arg(locale.formattedDataSize(QFileInfo(mOutputFile).size())));
}
log(tr("- Compilation Time: %1 secs").arg(timer.elapsed() / 1000.0));
}
this->deleteLater();
emit compileFinished();

View File

@ -46,6 +46,7 @@ protected:
bool mOnlyCheckSyntax;
QString mCompiler;
QString mArguments;
QString mOutputFile;
private:
bool mStop;

View File

@ -30,14 +30,14 @@ bool FileCompiler::prepareForCompile()
FileType fileType = getFileType(mFileName);
mArguments= QString(" \"%1\"").arg(mFileName);
if (!mOnlyCheckSyntax) {
QString outputFilename = getCompiledExecutableName(mFileName);
mArguments+=QString(" -o \"%1\"").arg(outputFilename);
mOutputFile = getCompiledExecutableName(mFileName);
mArguments+=QString(" -o \"%1\"").arg(mOutputFile);
//remove the old file it exists
QFile outputFile(outputFilename);
QFile outputFile(mOutputFile);
if (outputFile.exists()) {
if (!outputFile.remove()) {
error(tr("Can't delete the old executable file \"%1\".\n").arg(outputFilename));
error(tr("Can't delete the old executable file \"%1\".\n").arg(mOutputFile));
return false;
}
}

View File

@ -62,14 +62,17 @@ Editor::Editor(QWidget *parent, const QString& filename,
QsciLexerCPP *lexer = new QsciLexerCPP();
lexer->setHighlightEscapeSequences(true);
lexer->setFoldComments(true);
lexer->setDefaultFont(QFont("Consolas",12));
this->setLexer(lexer);
this->setAutoIndent(pSettings->editor().autoIndent());
this->setFolding(FoldStyle::BoxedTreeFoldStyle,3);
this->setTabWidth(4);
//行号显示区域
setMarginType(0, QsciScintilla::NumberMargin);
setMarginLineNumbers(0, true);
setMarginWidth(0,"10");
this->onLinesChanged();
//断点设置区域
setMarginType(1, QsciScintilla::SymbolMargin);
setMarginLineNumbers(1, false);

View File

@ -198,3 +198,67 @@ void MainWindow::on_actionRun_triggered()
mCompilerManager->run(exeName,"",QFileInfo(exeName).absolutePath());
}
}
void MainWindow::on_actionUndo_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->undo();
}
}
void MainWindow::on_actionRedo_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->redo();
}
}
void MainWindow::on_actionCut_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->cut();
}
}
void MainWindow::on_actionSelectAll_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->selectAll();
}
}
void MainWindow::on_actionCopy_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->copy();
}
}
void MainWindow::on_actionPaste_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->paste();
}
}
void MainWindow::on_actionIndent_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->indent();
}
}
void MainWindow::on_actionUnIndent_triggered()
{
Editor * editor = mEditorList->getEditor();
if (editor != NULL ) {
editor->unindent();
}
}

View File

@ -47,6 +47,22 @@ private slots:
void on_actionRun_triggered();
void on_actionUndo_triggered();
void on_actionRedo_triggered();
void on_actionCut_triggered();
void on_actionSelectAll_triggered();
void on_actionCopy_triggered();
void on_actionPaste_triggered();
void on_actionIndent_triggered();
void on_actionUnIndent_triggered();
public slots:
void onCompileLog(const QString& msg);

View File

@ -233,7 +233,23 @@
<addaction name="actionCompile"/>
<addaction name="actionRun"/>
</widget>
<widget class="QMenu" name="menuEdit">
<property name="title">
<string>Edit</string>
</property>
<addaction name="actionUndo"/>
<addaction name="actionRedo"/>
<addaction name="separator"/>
<addaction name="actionCut"/>
<addaction name="actionCopy"/>
<addaction name="actionPaste"/>
<addaction name="actionSelectAll"/>
<addaction name="separator"/>
<addaction name="actionIndent"/>
<addaction name="actionUnIndent"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menuRun"/>
<addaction name="menuTools"/>
</widget>
@ -379,6 +395,99 @@
<string>F10</string>
</property>
</action>
<action name="actionUndo">
<property name="icon">
<iconset>
<normalon>:/icons/images/newlook24/086-undo.png</normalon>
</iconset>
</property>
<property name="text">
<string>Undo</string>
</property>
<property name="shortcut">
<string>Ctrl+Z</string>
</property>
</action>
<action name="actionRedo">
<property name="icon">
<iconset>
<normalon>:/icons/images/newlook24/062-redo.png</normalon>
</iconset>
</property>
<property name="text">
<string>Redo</string>
</property>
<property name="shortcut">
<string>Ctrl+Y</string>
</property>
</action>
<action name="actionCut">
<property name="icon">
<iconset>
<normalon>:/icons/images/newlook24/019-cut.png</normalon>
</iconset>
</property>
<property name="text">
<string>Cut</string>
</property>
<property name="shortcut">
<string>Ctrl+X</string>
</property>
</action>
<action name="actionCopy">
<property name="icon">
<iconset>
<normalon>:/icons/images/newlook24/018-copy.png</normalon>
</iconset>
</property>
<property name="text">
<string>Copy</string>
</property>
<property name="shortcut">
<string>Ctrl+C</string>
</property>
</action>
<action name="actionPaste">
<property name="icon">
<iconset>
<normalon>:/icons/images/newlook24/057-paste.png</normalon>
</iconset>
</property>
<property name="text">
<string>Paste</string>
</property>
<property name="shortcut">
<string>Ctrl+V</string>
</property>
</action>
<action name="actionSelectAll">
<property name="text">
<string>Select All</string>
</property>
<property name="shortcut">
<string>Ctrl+A</string>
</property>
</action>
<action name="actionIndent">
<property name="icon">
<iconset>
<normalon>:/icons/images/newlook24/031-Edit-Indent.png</normalon>
</iconset>
</property>
<property name="text">
<string>Indent</string>
</property>
</action>
<action name="actionUnIndent">
<property name="icon">
<iconset>
<normalon>:/icons/images/newlook24/032-Edit-Unindent.png</normalon>
</iconset>
</property>
<property name="text">
<string>UnIndent</string>
</property>
</action>
</widget>
<resources/>
<connections/>