外文文献—QT4.0 白皮书_第1页
外文文献—QT4.0 白皮书_第2页
外文文献—QT4.0 白皮书_第3页
外文文献—QT4.0 白皮书_第4页
外文文献—QT4.0 白皮书_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、附录i 英文资料翻译qt 4.0 whitepapper1. introduction qt is the de facto standard c+ framework for high performance cross-platform software development. in addition to an extensive c+ class library ,qt includes tools to make writing applications fast and straightforward. qts cross-platform capabilities and in

2、ternationalization support ensure that qt applications reach the widest possible market. the qt c+ frame work has been at the heart of commercial applications since1995. qt is used by companies and organizations as diverse as adobe., boeing., ibm., motorola., nasa, skype., and by numerous smaller co

3、mpanies and organizations. qt 4 is designed to be easier to use than previous versions of qt, while adding more powerful functionality. qts classes are fully featured and provide consistent interfaces to assist learning, reduce developer workload, and increase programmer productivity. qt is, and alw

4、ays has been, fully object-oriented. this whitepaper gives an overview of qts tools and functionality. each section begins with a non-technical introduction before providing a more detailed description of relevant features . links to online resources are also given for each subject area.1.1. executi

5、ve summary qt includes a rich set of widgets(“controls”in windows terminology)that provide standard gui functionality. qt introduces an innovative alternative for inter-object communication ,called “signals and slots”,that replaces the old and unsafe callback technique used in many legacy frameworks

6、. qt also provides a conventional event model for handling mouse clicks ,key presses, and other user input .qts cross-platform gui applications can support all the user interface functionality required by modern applications, such as menus, context menus ,drag and drop , and dockable toolbars. qt al

7、so includes qt designer (page 20), a tool for graphically designing user interfaces. qt designer supports qts powerful layout features (page 39) in addition to absolute positioning. qt designer can be used purely for gui design, or to create entire applications with its support for integration with

8、popular integrated development environments(ides). qt has excellent supportfor2d and3dgraphics. qt is the de facto standard gui framework for platform-independent opengl.programming.qt4spainting system offers high quality rendering across all supported platforms. qt makes it possible to create platf

9、orm-independent database applications using standard databases. qt includes native drivers for oracle ,microsoft sql server, sybase .adaptive server, ibmdb2, postgresql., mysql., borland interbase, sqlite, and odbc-compliant databases. qt includes database-specific widgets, and any built-in or custo

10、m widget can be made data-aware. qt programs have native look and feel on all supported platforms using qts styles and themes support. from a single source tree, recompilation is all that is required toproduceapplicationsforwindows.98 to xp ,macos x. , linux , solaris ,hp-ux., and many other version

11、s of unix with x11.qt applications can also be compiled to run on qt opia. qts qmake build tool produces makefiles or .dsp files appropriate to the target platform.since qts architecture takes advantage of the underlying platform, many customers use qt for single-platform development on windows, mac

12、 os x, and unix because they prefer qts approach. qt includes support for important platform-specific features, such as activex on windows , and motif on unix . see the section on qts architecture for more information. qt uses unicode .throughout and has consider able support for internationalizatio

13、n. qt includes qt linguist and other tools to support translators. applications can easily use and mix text in arabic, chinese, english, hebrew, japanese, russian, and other languages supported by unicode. qt includes a variety of domain-specific classes. for example, qt has an xml module that inclu

14、des sax and dom classes for reading and manipulating data stored in xml-based formats. objects can be stored in memory using qts stl-compatible collection classes, and handled using styles of iterators used in java. and the c+ standard template library(stl).local and remote file handling using stand

15、ard protocols are provided by qts input/output and networking classes. qt applications can have their functionality extended by plugins and dynamic libraries . plugins provide additional codecs ,data base drivers ,image formats, styles, and widgets. plugins and libraries can be sold as products in t

16、heir own right. qt is a mature c+ framework that is widely used around the world. in addition to qts many commercial uses, the open source edition of qt is the foundation of kde ,the linux desktop environment .qt makes application development a pleasure ,with its cross platform build system, visual

17、form design, and elegant api. 2. widgets qt provides a rich set of standard widgets that can be used to create graphical user interfaces for applications. qts widgets are flexible and can easily be subclassed to suit specialized requirements. widgets are visual elements that are combined to create u

18、ser interfaces. buttons, menus, scroll bars, message boxes, and application windows are all examples of widgets. qts widgets are not arbitrarily divided between “controls”and “containers”; all widgets can be used both as controls and as containers. custom widgets can easily be created by subclassing

19、 existing qt widgets, or created from scratch if necessary. standard widgets are provided by the qwidget class and its subclasses, and custom widgets can be created by subclassing them and reimplementing virtual functions. a widget may contain any number of child widgets. child widgets are shown wit

20、hin the parent widgets area. a widget with no parent is a top-level widget (a “window”), and usually has its own entry in the desktop environments task bar. qt imposes no arbitrary limitations on widgets. any widget can be a top-level widget; any widget can be a child of any other widget. the positi

21、on of child widgets within the parents area can be set automatically using layout managers, or manually if preferred. when a parent widget is disabled , hidden , or deleted, the same action is recursively applied to all its child widgets.3. signals and slots signals and slots provide inter-object co

22、mmunication. they are easy to understand and use, and are fully supported by qt designer. gui applications respond to user actions .for example, when a user clicks a menu item or a toolbar button, the application executes some code. more generally, we want objects of any kind to be able to communica

23、te with each other. the programmer must relate events to the relevant code. older toolkits use mechanisms that are not type-safe(i.e. ,they are crash-prone), are inflexible ,and are not object-oriented. trolltech has invented a solution called “signals and slots.” the signals and slots mechanism is

24、a powerful inter-object communication mechanism that can be used to completely replace the crude callbacks and message maps used by legacy toolkits. signals and slots are flexible ,fully object-oriented, and implemented in c+. to associate some code with a button using the old callback mechanism, it

25、 is necessary to pass a function pointer to the button. when the button is clicked, the function is then called. old toolkits do not ensure that arguments of the correct type are given to the function when it is called, making crashes more likely .another problem with the callback approach is that i

26、t tightly binds the gui element to the functionality, making it difficult to develop classes independently. qts signals and slots mechanism is different. qt widgets emit signals when events occur. 4. gui applications building modern gui applications with qt is fast and simple, and can be achieved by

27、 hand coding or by using qt designer ,qts visual design tool. qt provides all the classes and functions necessary to create modern gui applications .qt can be used to create both “main window”style applications with a menu bar ,toolbars ,and status bar surrounding a central area ,and “dialog”style a

28、pplications that use buttons and possibly tabs to present options and information. qt supports both sdi(single document interface) and mdi(multiple document interface). qt also supports drag and drop and the clipboard. 5. qt designer qt designer is a graphical user interface design tool for qt appli

29、cations. applications can be written entirely as source code ,or using qt designer to speed up development. a component-based architecture makes it possible for developers to extend qt designer with custom widgets and extensions, and even integrate it into integrated development environments. design

30、ing a form with qt designer is a simple process. developers drag widgets from a toolbox onto a form, and use standard editing tools to select, cut, paste, and resize them. each widgets properties can then be changed using the property editor. the precise positions and sizes of the widgets do not mat

31、ter. developers select widgets and apply layouts to them. for example, some button widgets could be selected and laid out side by side by choosing the “lay out horizontally” option. this approach makes design very fast, and the finished forms will scale properly to fit whatever window size the end-u

32、ser prefers. see layouts on page 39 for information about qts automatic layouts. qt designer eliminates the time-consuming “compile ,link ,and run”cycle for user interface design. this makes it easy to correct or change designs. qt designers preview options let developers see their forms in other st

33、yles ;for example ,a macintosh developer can preview a form in the windows style. commercial licensees on windows can enjoy qt designers user interface design facilities from with in microsoft visual studio .on mac os x , developers can use qt designer from with in apples xcode environment. qt4.0 白皮

34、书1. 简介qt是一种标准的c+框架,进行高性能跨平台的软件开发。除了拥有广泛的c+类库,qt还包括许多能够加快、简化编写应用程序的工具。qt的跨平台能力以及国际化支持确保了qt的应用程序影响到最广泛的市场。qt的c+框架自1995年以来就一直是商务应用程序的核心。许多公司和组织都在使用qt,如adobe ,波音, ibm公司,摩托罗拉,美国航天局,skype公司,同时也有许多规模较小的公司和组织在使用。qt在增加了更加强大的功能之后,所设计出来的qt4使用起来比之前的qt版本更为方便。qt的类功能齐全,提供一致的接口来辅助学习,减少开发人员的工作量,提高程序员的工作效率。qt现在是,并且一直

35、都是,完全面向对象的。此白皮书对qt的各种工具以及功能进行了概述。每一节在详细说明相关功能之前,都会先进行简单的(非技术的)介绍。每个章节的内容都提供了网上链接。1.1 执行摘要qt包括一套丰富的小部件(在windows术语中称之为“控制键”),它们具有标准的gui功能。qt为对象间的通讯提供了一项新的选择,被称之为“信号与槽”,它取代了用在许多传统框架上的陈旧危险的回调技术。qt还提供了传统的事件模型,用来处理鼠标点击,按键和其他的用户输入。qt的跨平台gui应用程序可以支持现代应用程序所要求的任何用户界面功能,如菜单,上下文菜单,拖放,以及可调整的工具栏。qt还包括qt设计器和图形设计用户

36、界面的工具。qt设计器除了拥有绝对的定位功能,还支持强大的布局功能。qt设计器可以单纯只用于gui设计,或者凭借其对于流行的集成开发环境的支持进行整个应用程序的创建。qt对二维和三维图形都完全支持。qt是目前标准的图形用户界面框架,支持与平台无关的opengl 编程。qt4的绘画体系能够在所有支持的平台上提供高品质的作品。通过使用标准数据库,qt创建了与平台无关的数据库应用程序。qt包括许多本机的驱动程序,用于oracle ,微软 sql 服务器,sybase数据库自适应服务器,ibm的db2 ,postgre的sql的,mysql,borland公司 interbase,sqlite和odb

37、c兼容的数据库。qt还包括许多数据库专用的部件,任何内置或自定义部件都能够做成与数据相关联的。在所有使用qt风格和主题支持的平台上,qt的应用程序都具有本机的外观和感觉。从单一的源代码来看,重新编译是生产适用于windows 98应用到xp ,mac os x,linux ,solaris,hp - ux,和许多其他版本的附有x11的unix 的程序全部需要的。qt的应用程序也可以编写成在qtopia上运行。qt的qmake生成工具生成的makefile或.dsp文件适用于目标平台。由于qt的架构采用了底层平台,许多客户在windows,mac os x和unix开发时都使用了qt的单一平台,

38、因为他们更喜欢qt的做法。qt支持特定平台的重要功能,如windows上的activex ,和unix母题。qt至始至终都在使用unicode,相当支持国际化。qt包括qt语言学家和其他工具来帮助译者进行翻译工作。应用程序可以很容易使用和混合各种unicode支持的语言文字,如阿拉伯文,中文,英文,希伯来文,日文,俄文等。qt包括多种多样的特定域。例如,qt有一个xml模块,这一模块包括sax和dom类,用来阅读和处理以xml格式存储的数据。对象可以存储于使用了qt的stl兼容的集合类的内存中,并采用在java中使用的的迭代器风格和c+标准模板库进行处理。使用标准协议的本地和远程文件处理是由q

39、t的输入/输出和网络类提供的。qt的应用程序可以通过插件和动态库来扩展其功能。插件提供额外的编解码器,数据库驱动程序,图像格式,样式和部件。插件和库可以像商品一样自行出售。qt是一个成熟的c+框架,它广泛应用于世界各地。qt除了具有许多商业用途外,qt的开源版本是kde的基础linux桌面环境。具有跨平台构建系统,视觉造型设计以及优雅api的qt使开发应用程序成为一种乐趣。2. 小工具qt提供了丰富的标准部件,这些部件可以为应用程序创建图形用户界面。qt的窗口部件十分灵活,很容易创建子类,以满足特殊的要求。widget是为了创建用户界面而结合的视觉元素。按钮,菜单,滚动条,消息框和应用程序窗口都是小部件的例子。qt的部件并不是任意被划分为“控制键”和“容器”的,所有部件都可以以控制键和容器两种形式存在使用。自定义部件很容易由现有的qt部件生成子类,或者如有需要,也可以从头开始创建。标准部件是由qwidget的类及其子类提供的,自定义部件可以通过创建它们的子类重新构建虚函数。一个部件可能包含任何数量的子部件。子部件都显示在父窗口部件的区域。一个没有父部件的部件是一个顶级窗口部件(一个“窗口”),通常在桌面环境的任务栏里有它自己的条目。qt规定不能任意限制部件。任何部件都可以是一个顶级部件,任何部件可以是其它任

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论