1、 学生毕业设计(论文)外文译文学生姓名: 学号 专业名称:软件工程译文标题(中英文):Qt Creator 白皮书(Qt Creator Whitepaper)译文出处:Qt network 指导教师审阅签名: 外文译文正文: Qt Creator白皮书Qt Creator是一个完整的集成开发环境(IDE) ,用于创建 Qt应用程序框架的应用。 Qt 是专为应用程序和用户界面,一次开发和部署跨多个桌面和移动操作系统。本文提供了一个推出的 Qt Creator和提供Qt开发人员在应用开发生命周期的特点。Qt Creator的简介Qt Creator的主要优点之一是它允许一个开发团队共享一个项目不
2、同的开发平台(微软 Windows的Mac OS X和 Linux)共同为开发和调试工具。Qt Creator的主要目标是满足 Qt开发人员正在寻找简单,易用性,生产力,可扩展性和开放的发展需要,而旨在降低进入新来乍到 Qt的屏障。 Qt Creator的主要功能,让开发商完成以下任务: 快速,轻松地开始使用 Qt应用开发项目向导,快速访问最近的项目和会议。 设计 Qt物件为基础的应用与集成的编辑器的用户界面,Qt Designer 中。 开发与应用的先进的 C + +代码编辑器,提供新的强大的功能完成的代码片段,重构代码,查看文件的轮廓(即,象征着一个文件层次)。 建立,运行和部署 Qt项目
3、,目标多个桌 面和移动平台,如微软 Windows,Mac OS X 中,Linux的,诺基亚的 MeeGo,和 Maemo。 GNU和 CDB使用 Qt类结构的认识,增加了图形用户界面的调试器的调试。 使用代码分析工具,以检查你的应用程序中的内存管理问题。 应用程序部署到移动设备的 MeeGo,为 Symbian和 Maemo设备创建应用程序安装包,可以在Ovi商店和其他渠道发布的。 轻松地访问信息集成的上下文敏感的 Qt帮助系统。Qt Creator是 Qt Quick的一部分,它允许设计人员和开发人员创造一种直观的,现代的外观,流畅的用户,正越来越多地用于手机,媒体播放器,机顶盒和其他便
4、携设备的接口。Qt Creator 的使设计师之间的合作和开发商。 设计师在可视化的环境中工作,而开发人员的工作,在一个全功能的 IDE和 Qt Creator支持往返迭代从设计,代码,测试,和背部的设计。支持的操作系统可用于 Microsoft Windows,Mac OS X 中,Linux 的 Qt Creator的安装包。 Qt Creator的,可以在其他平台上运行,但需要公开可用的源代码的编译。 从源代码建立和运行的 Qt Creator可能需要您的计算机上单独安装的 Qt。Qt Creator的工作当您启动的 Qt Creator,它会打开欢迎的模式,在那里你可以打开教程和示例项
5、目或启动项目向导来创建您自己的项目。Qt Creator的满足其设计目标简单,易于使用,和生产力,依靠模式的概念。 这些用户界面适应不2同的应用手头的开发任务。 开发人员可以使用的模式选择或键盘快捷键切换到 Qt Creator的模式。每种模式都有自己的看法,只显示需要执行一个给定的任务,只提供最相关的功能和功能有关的信息。因此,广大的 Qt Creator的窗口区域,一直致力于以实际应用的发展任务。创建项目为了能够建立和运行的应用程序,Qt Creator 的需要作为一个编译器将需要相同的信息。 该信息被指定在项目建设和运行设置。设立一个新的 Qt Creator项目通过向导的帮助,引导开发
6、商循序渐进的方式,通过项目创建过程中的步骤。 在第一步中,开发商从类别中选择项目类型:Qt 的 C + +项目,Qt Quick 的项目,或其他项目。接下来,开发人员可以选择一个项目的位置,并为它指定的设置。全新的 Qt GUI应用程序项目向导。Qt Creator的步骤已经完成时,自动生成所需的头文件,源文件,用户界面,描述和项目文件的项目,作为向导的定义。不但没有向导的帮助新用户快速建立和运行,也使更多的有经验的用户,以简化他们的工作流程,创造新的项目。方便的用户界面使得它更容易确保项目正确的配置和依赖性开始。用户界面设计Qt Creator的提供了一个完全集成的可视化编辑器,Qt 设计师
7、。 Qt Designer是从 Qt部件的图形用户界面设计和构建工具。 用户可以撰写和定制部件或对话和测试使用不同的风格和决议。Widgets和使用 Qt Designer创建的形式与程序代码无缝集成,使用 Qt的信号和槽机制,它可以让用户轻松地分配行为的图形元素。 在 Qt Designer中设置的所有属性,可以在代码中动态改变。 此外,如部件的推广和定制插件的功能,允许用户使用自己的小部件,使用 Qt Designer。Qt Designer是用于编辑用户界面文件。 它提出了一个直观的拖放式界面,组成新的用户界面的用户。 使用 Qt Designer设计的用户接口功能齐全,可以立即预览,以
8、确保设计为目的。 有没有必要重新编译整个项目来测试一个新的设计。 下图显示了集成的 Qt Designer中被用来编辑一个简单的形式。编码写作,编辑和导航的源代码是在应用程序开发的核心任务。 因此,在代码编辑器是 Qt Creator的关键部件之一。 在编辑模式下的代码编辑器,可以用来编写代码。代码编辑器提供了一个功能,可以帮助开发商保持可读性和编码风格: 语法高亮关键字,符号和 C + +文件中的宏。 此外,通用的突出支持其他类型的文件。 元素,属性,ID 和代码片断的代码完成。 这也是支持在当前项目的开发自己的类。 检查代码语法和编辑时标记错误(红色波浪下划线),使得它不需要使用汇编作为一
9、个简单的方式找到拼写错误和语法错误。 自动缩进源代码的布局。 折叠和展开的源代码(代码折叠)的功能的能力。 定位导航工具,以便快速访问文件,符号,层次结构,以及其他信息。 支持代码重构,以提高内部质量或您的应用程序,它的性能和可扩展性,代码的可读性和可维护性,以及简化代码结构。除了这些功能,代码编辑器中有其他有用的功能,例如: 打字时,突出窗口中的匹配字符串的增量搜索。 高级搜索允许你搜索从当前打开的项目或文件系统上的文件。 此外,您可以搜索符号,当你想重构代码。 行号和当前行高亮。 容易的注释和代码注释。 方法定义和函数声明之间的快速切换。 书签更容易在导航的代码。代码编辑器支持不同的键盘快
10、捷键,更快的编辑。 这是可能的工作,而无需使用鼠标,使开发人员能够保持他们的手在键盘上,工作更富有成效。3建立多目标Qt Creator的建设和运行桌面环境(在 Windows,Linux 和 Mac OS)和移动设备(诺基亚的MeeGo,Maemo 操作)的 Qt应用程序提供支持。Qt Creator的,允许开发人员指定每个开发平台的建立为独立设置和快速切换之间构建目标。 默认情况下,阴影生成用于继续建设,从源头分开的具体文件。 开发人员可以创建不同版本的项目文件,以保持平台相关的代码分开。 他们可以使用 qmake的范围,选择的文件处理根据 qmake的平台上运行。以及 qmake的,Qt
11、 的构建自己的工具提供支持,Qt Creator 的还带有支持的 CMake cmake.org,一种流行的替代。 CMake是一个跨平台的配置和构建工具的 Mac OS X,微软 Windows,Linux 和工具支持的其他平台上的本地编译器工具链。 然而,只支持建立在 Qt Creator的移动应用系统是 qmake。Qt Creator也支持通用的项目,其中开发人员使用不受支持的构建系统,或不想联想到与他们的项目建设系统。 在这样的情况下,Qt Creator 的工作作为一个代码编辑器,生成设置可以手动指定的项目。调试Qt Creator是整合与外部本地调试符号的 GNU调试器(GDB)
12、,微软控制台调试器(CDB)和内部的JavaScript调试器。 下图显示了 Qt的造物主在调试模式下面的代码编辑器的调试工具窗格。在调试模式下,开发人员可以执行常见的调试任务,包括以下内容: 中断程序执行。 通过程序的行由行或指令由指令步骤。 设置断点。 检查调用堆栈的内容。 审查和修改调试程序的寄存器和存储器内容。 检查和修改寄存器和存储器内容的局部和全局变量。 检查加载的共享库的列表。 创建调试程序的当前状态的快照,并重新审视它们。分析代码设备上的可用内存是有限的,你应该仔细地使用它。 Qt Creator 的集成内存泄漏检测和分析函数执行 Valgrind 的代码分析工具。 您必须下载
13、并安装 Valgrind 的工具,分别使用他们的 Qt Creator。QML 的事件探查器安装的 Qt Creator 的一部分。 它允许您配置您的 Qt 的快速应用。使用版本控制系统成立了项目建议的方式是使用一个版本控制系统。 只有项目源文件应存放。 构建系统的 Qt Creator生成的文件不应该被保存。 其他方法是可能的,但我们不推荐使用网络资源,例如。Qt Creator 的支持版本控制系统,融入工作环境的使用。 支持的系统包括巴扎,CVS,GIT 中,水银,Perforce 的,和 Subversion。配置很简单,位于一起的版本控制功能位于“ 工具”子菜单中的特定版本控制系统的通
14、用设置。每个系统的输出显示在版本控制输出窗格。 还提供了一些系统显示提交和管理信息库的用户界面元素。获得帮助不时,开发人员可能需要一定的阶级,功能,或其他部分的 Qt API 的进一步信息。 所有 Qt 文档和例子是通过 Qt 的帮助插件的 Qt Creator。要查看文档,用于帮助模式,在窗口的最重要的是致力于帮助文本。 虽然在编辑模式下工作的源代码,开发人员可以访问上下文敏感的帮助文本光标移动到 Qt 的类或函数,然后按 F1 键。 该文件将显示在面板上的代码编辑器的右侧,它也可以添加外部文件的 Qt Creator,补充或替换现有的文件。总结Qt Creator 的提供 Qt 应用程序创
15、建一个完整的开发环境。 它是一个轻量级的工具上的 Qt 开发,生产力和可用性的需求,严格重点。4主要特点是先进的 C + +代码编辑器和调试的图形用户界面的 C + +函数。 集成的 Qt Designer,Qt的帮助,并快速导航定位工具,使 Qt Creator 的 Qt 应用开发的理想环境。Qt Creator 的模式为中心的工作方式,帮助开发重点任务,通过介绍相关的用户界面功能,他们的手。支持跨平台,建立系统和版本控制软件,确保 Qt Creator 的,可以完全集成到开发团队的工作环境。此外,在与开发商密切合作,创造流畅的用户界面的 Qt 快速工具允许 UI 设计师加入我们的团队。外文
16、译文原文:Qt Creator WhitepaperQt Creator is a complete integrated development environment (IDE) for creating applications with the Qt application framework. Qt is designed for developing applications and user interfaces once and deploying them across several desktop and mobile operating systems. This pa
17、per provides an introduction to Qt Creator and the features it provides to Qt developers during the application development life-cycle.Introduction to Qt CreatorOne of the major advantages of Qt Creator is that it allows a team of developers to share a project across different development platforms
18、(Microsoft Windows, Mac OS X, and Linux) with a common tool for development and debugging.The main goal for Qt Creator is meeting the development needs of Qt developers who are looking for simplicity, usability, productivity, extendibility and openness, while aiming to lower the barrier of entry for
19、 newcomers to Qt. The key features of Qt Creator allow the developers to accomplish the following tasks: Get started with Qt application development quickly and easily with project wizards, and quickly access recent projects and sessions. Design Qt widget-based application user interface with the in
20、tegrated editor, Qt Designer. Develop applications with the advanced C+ code editor that provides new powerful features for completing code snippets, refactoring code, and viewing the outline of files (that is, the symbol hierarchy of a file). Build, run, and deploy Qt projects that target multiple
21、desktop and mobile platforms, such as Microsoft Windows, Mac OS X, Linux, Symbian, MeeGo, and Maemo. Debug with the GNU and CDB debuggers using a graphical user interface with increased awareness of Qt class structures. Use code analysis tools to check for memory management issues in your applicatio
22、ns. Deploy applications to mobile devices and create application installation packages for Symbian, MeeGo, and Maemo devices that can be published in the Ovi Store and other channels. Easily access information with the integrated context-sensitive Qt Help system. Qt Creator is part of Qt Quick, whic
23、h allows designers and developers to create the kind of intuitive, modern-looking, fluid user interfaces that are increasingly used on mobile phones, media players, set-top boxes and other portable devices. Qt Creator enables collaboration between designersand developers. Supported Operating Systems
24、Qt Creator installation packages are available for Microsoft Windows, Mac OS X, and Linux. Qt Creator can be run on other platforms, but that requires the compilation of the publicly available source code. Building and running Qt Creator from source code may require a separate installation of Qt on
25、your computer.Working with Qt CreatorWhen you start Qt Creator, it opens to the Welcome mode, where you can open tutorials and example projects or start the project wizard to create your own projects.5Qt Creator meets its design goals of simplicity, ease-of-use, and productivity by relying on the co
26、ncept of modes. These adapt the user interface to the different application development tasks at hand. Developers can use the mode selector or keyboard shortcuts to switch to a Qt Creator mode.Each mode has its own view that shows only the information required for performing a given task and provide
27、s only the most relevant features and functions related to it. As a result, the majority of the Qt Creator window area is always dedicated to actual application development tasks.Creating ProjectsTo be able to build and run applications, Qt Creator needs the same information as a compiler would need
28、. This information is specified in the project build and run settings.When the steps have been completed, Qt Creator automatically generates the project with required headers, source files, user interface descriptions and project files, as defined by the wizard.Not only does the wizard help new user
29、s get up and running quickly, it also enables more experienced users to streamline their workflow for the creation of new projects. The convenient user interface makes it easier to ensure that a project begins with the correct configuration and dependencies.Designing User InterfaceQt Creator provide
30、s a fully integrated visual editor, Qt Designer. Qt Designer is a tool for designing and building graphical user interfaces from Qt widgets. Users can compose and customize widgets or dialogs and test those using different styles and resolutions.Widgets and forms created with Qt Designer are integra
31、ted seamlessly with programmed code, using the Qt signals and slots mechanism, which lets users easily assign behavior to graphical elements. All properties set in Qt Designer can be changed dynamically within the code. Furthermore, features such as widget promotion and custom plugins allow users to
32、 use their own widgets with Qt Designer.Qt Designer is used for editing user interface files. It presents users with an intuitive drag-and-drop interface for composing new user interfaces. The user interfaces that are designed with Qt Designer are fully functional and can be previewed immediately to
33、 ensure that the design is as intended. There is no need to recompile the entire project to test out a new design. CodingWriting, editing and navigating in source code are core tasks in application development. Therefore, the code editor is one of the key components of Qt Creator. The code editor ca
34、n be used in the Edit mode to write code.he code editor offers a number of features that help developers maintain readability and coding style: Syntax highlighting for keywords, symbols, and macros in C+ files. In addition, generic highlighting is supported for other types of files. Code completion
35、for elements, properties, ids and code snippets. This is also supported for developers own classes in the current project. Checking code syntax and marking errors (with wavy underlining in red) while editing, making it unnecessary to use compilation simply as a way to find typos and syntax errors. A
36、uto-indentation for source code layout. The ability to collapse and expand functions in the source code (code folding). The Locator navigation tool for quick access to files, symbols, hierarchy, and other information. Support for refactoring code to improve the internal quality or your application,
37、its performance and extendibility, and code readability and maintainability, as well as to simplify code structure. In addition to these features, the code editor has other useful features, such as: Incremental search that highlights the matching strings in the window while typing. Advanced search 6
38、allows you to search from currently open projects or files on the file system. In addition, you can search for symbols when you want to refactor code. Line numbering and current line highlighting. Easy commenting and uncommenting of code. Quick switching between method definition and function declar
39、ation. Bookmarks for easier navigation in the code. The code editor supports different keyboard shortcuts for faster editing. It is possible to work without using the mouse at all, allowing developers to keep their hands on the keyboard and work more productively.Building for Multiple TargetsQt Crea
40、tor provides support for building and running Qt applications for desktop environments (Windows, Linux, and Mac OS) and mobile devices (Symbian, MeeGo, Maemo).Qt Creator allows developers to specify separate build settings for each development platform and to quickly switch between build targets. By
41、 default, shadow builds are used to keep the build specific files separate from the source. Developers can create separate versions of project files to keep platform-dependent code separate. They can use qmake scopes to select the file to process depending on which platform qmake is run on.As well a
42、s providing support for qmake, Qts own build tool, Qt Creator also comes with support for CMake cmake.org, a popular alternative. CMake is a cross-platform configuration and build tool that works with the native compiler toolchains on Microsoft Windows, Mac OS X, Linux and other platforms that the t
43、ool supports. However, the only supported build system for mobile applications in Qt Creator is qmake.Qt Creator also supports generic projects, where developers either use an unsupported build system, or do not want to associate a build system with their project at all. In cases like these, Qt Crea
44、tor works as a code editor, and build settings can be manually specified for the project.DebuggingQt Creator is integrated with several external native debuggers: GNU Symbolic Debugger (gdb), Microsoft Console Debugger (CDB) and an internal JavaScript debugger. The following figure shows Qt Creator
45、in Debug mode with the debugging tools pane below the code editor.In Debug mode, developers can perform common debugging tasks, including the following: Interrupt program execution. Step through the program line-by-line or instruction-by-instruction. Set breakpoints. Examine call stack contents. Exa
46、mine and modify registers and memory contents of the debugged program. Examine and modify registers and memory contents of local and global variables. Examine the list of loaded shared libraries. Create snapshots of the current state of the debugged program and re-examine them later. Qt Creator disp
47、lays the raw information provided by the native debuggers in a clear and concise manner. This simplifies the debugging process as much as possible without losing the power of the native debuggers.In addition to the generic IDE functionality provided by stack view, views for locals and expressions, r
48、egisters, and so on, Qt Creator includes features to make debugging Qt-based applications easy. The debugger plugin understands the internal layout of several Qt classes, as well as most containers of the C+ Standard Library and some gcc and Symbian extensions. This deeper understanding is used to p
49、resent objects of such classes in a useful way.If Qt Creator is installed as part of a Qt SDK, the GNU Symbolic Debugger is installed automatically and developers should be ready to start debugging after they create a new project. However, they can change the setup 7to use debugging tools for Windows, for example.Developers can connect mobile devices to the development PC and debug processes running on the devices.Analyzing CodeThe memory available on devices is limited and you should use