开发工具:
文件大小: 3mb
下载次数: 0
上传时间: 2009-03-18
详细说明: Dedication This book is dedicated to Miriam Ezust, without whom none of our work would have been possible. Table of Contents Preface Acknowledgements Rationale for the Book I. Intro to C++ and Qt 4. 1. C++ Introduction Overview of C++ A Brief History of C++ Setup - Open Source Platforms Setup - Win32 C++ First Example Input and Output Exercise: Input and Output Identifiers, Types, and Literals Exercise: Identifiers, Types, and Literals C++ Simple Types main, and command line arguments Arithmetic Exercise: C++ Simple Types C++ Standard Library strings Streams Exercise: Streams The Keyword const Pointers and Memory access The Unary Operators & and * Operators new and delete Exercise: Pointers and Memory access const* and *const Reference Variables Review Questions Points of Departure 2. Classes Structs Class definitions Member Access Specifiers Encapsulation Intro to UML UML Relationships Friends of a Class Constructors Subobjects Destructors The keyword static Copy Constructors and Assignment Operators Conversions const Member Functions Exercise: Classes Review Questions 3. Introduction to Qt Example project: using QApplication and QLabel Makefile, qmake, and Project files #include: finding header files The make command Getting Help Online Style Guidelines, Naming Conventions The Qt Core Module Streams and Dates Exercise: The Qt Core Module Review Questions Points of Departure 4. Lists Introduction to Containers Iterators QStringList and iteration Relationships Exercise: Relationships Review Questions Points of Departure 5. Functions Function Declarations Overloading Functions Exercise: Overloading Functions Default (Optional) Arguments Operator Overloading Exercise: Operator Overloading Parameter Passing by Value Parameter Passing by Reference References to const Function Return Values Returning References from Functions Overloading on Const-ness Inline Functions Inlining vs Macro Expansion Exercise: Encryption Review Questions 6. Inheritance and Polymorphism Simple Derivation Inheritance client code example Derivation with Polymorphism Exercise: Derivation with Polymorphism Derivation from an Abstract Base Class Inheritance Design Overloading, Hiding, and Overriding Processing Command-Line Arguments Derivation and ArgumentList Exercise: Contact List Review Questions Points of Departure II. Higher Level Programming 7. Libraries Code Containers Re-using other libraries Organizing Libraries: Dependency Management Installing Libraries Installing Libraries - a lab exercise Frameworks and Components Review Questions 8. Intro to Design patterns Iteration and the Visitor pattern Directories and Files: QDir and QFileInfo Visitor pattern Customizing the Visitor using Inheritance Exercise: Iteration and the Visitor pattern Review Questions Points of Departure 9. QObject QObject's child managment Exercise: QObject's child managment Composite pattern: Parents and Children Exercise: Composite pattern: Parents and Children Finding children QApplication and the Event Loop Connecting to slots Signals and Slots Exercise: Signals and Slots Q_OBJECT and moc: A checklist Values and Objects Exercise: QObject tr() and internationalization. Review Questions 10. Generics and Containers Generics and Templates Function Templates Exercise: Function Templates Class Templates Exercise: Class Templates Containers Managed Containers, Composites and Aggregates Exercise: Managed Containers, Composites and Aggregates Implicitly Shared Classes Generics, Algorithms, and Operators Exercise: Generics, Algorithms, and Operators Serializer pattern Exercise: Serializer pattern Sorted Map example Exercise: QSets and QMaps Review Questions 11. Qt GUI Widgets Widget Categories QMainWindow and QSettings Dialogs Input Dialogs and Widgets Exercise: Dialogs Images and Resources Layout of Widgets Spacing, Stretching, and Struts Moving widgets across layouts Exercise: Layout of Widgets QActions, QMenus and QMenuBars QActions, QToolbars, and QActionGroups Exercise: QActions, QMenus and QMenuBars Exercise: CardGame GUI Points of Departure Regions and QDockWidgets Views of a QStringList Exercise: Views of a QStringList Review Questions Points of Departure 12. Concurrency QProcess and process control Processes and Environment Qonsole: Writing an Xterm in Qt Qonsole with keyboard events Exercise: QProcess and process control Threads, and QThread QPixmap and QThread Animation Example: Movie Player Movie player with QTimer Multiple Threads, Queues, and Loggers example: Giant Thread Safety and QObjects Exercise: Threads, and QThread Summary: QProcess and QThread Review Questions 13. Validation and Regular Expressions Validators Regular Expressions Regular Expression Syntax Regular Expressions: Phone Number Recognition Exercise: Regular Expressions: Phone Number Recognition Regular Expression Validation Exercise: Validation and Regular Expressions Review Questions 14. Parsing XML The Qt XML Module Event-Driven parsing XML, Tree Structures, and DOM Visitor pattern: DOM Tree Walking Generation of XML with DOM Exercise: XML, Tree Structures, and DOM Review Questions 15. Meta Objects, Properties, and Reflective Programming Anti-patterns QMetaObject - The MetaObject pattern Type Identification and qobject_cast Q_PROPERTY Macro - Describing QObject Properties QVariant Class - Accessing Properties DataObject: An Extension of QObject Exercise: Meta Objects, Properties, and Reflective Programming Property Containers: PropsMap Review Questions 16. More Design Patterns Creational Patterns Abstract Factory Abstract Factories and libraries qApp and Singleton pattern Creation rules and friend functions Benefits of using factories Exercise: Creational Patterns Serializer pattern revisited Exporting to XML Importing Objects with an Abstract Factory The Fa?ade pattern Functional Fa?ade Smart pointers: auto_ptr FileTagger: Fa?ade Example Exercise: The Fa?ade pattern Review Questions Points of Departure 17. Models and Views M-V-C: What about the Controller? Dynamic Form Models Exercise: Dynamic Form Models Form Models Form Views Unforseen Types Controlling Actions DataObject Form model Exercise: DataObject Form model Qt 4 Models and Views Table Models Tree models Extended Tree Widget Items Exercise: Tree models Review Questions 18. Qt SQL classes Intro to MySQL Queries and Result Sets Database Models Review Questions III. C++ Language Reference 19. Types and Expressions Operators Table of Operators Evaluation of Logical Expressions Enumerations Signed and Unsigned Integral Types Exercise: Signed and Unsigned Integral Types Standard Expression Conversions Exercise: Standard Expression Conversions Explicit Conversions Safer ANSI C++ Typecast operators static_cast and const_cast Exercise: static_cast and const_cast reinterpret_cast Why not use C-style casts? Run-Time Type Identification (RTTI) typeid operator Member Selection operators Points of Departure Exercise: Types and Expressions Review Questions 20. Scope and Storage Class Declarations and Definitions Identifier Scope Default Scope of Identifiers - Summary File Scope vs Block Scope and operator:: Exercise: File Scope vs Block Scope and operator:: Storage Class Globals, statics, and QObject globals and consts Exercise: Storage Class Namespaces Anonymous Namespaces Open Namespaces namespace/static objects and extern Review Questions 21. Statements and Control Structures Statements Selection Statements Exercise: Selection Statements Iteration Exercise: Iteration Exceptions Exception-Handling Exception Types throwing things around Try/Catch More about throw Rethrown Exceptions Exception Expressions Review Questions 22. Memory Access Pointer Pathology Further Pointer Pathology with Heap Memory Memory Access Summary Introduction to Arrays Pointer Arithmetic Arrays, Functions, and Return Values Different kinds of arrays Valid Pointer Operations What happens if new fails? set_new_handler() : Another approach to new failures Exercise: set_new_handler() : Another approach to new failures set_new_handler and bad_alloc combined Checking for null: The updated old way to test for new failures Arrays Summary Review Questions 23. Inheritance in Detail virtual pointers, virtual tables Constructors, Destructors, and Copy Assignment Operators Polymorphism and virtual destructors Multiple Inheritance Multiple Inheritance syntax Multiple Inheritance with Abstract Interfaces Points of Departure Resolving Multiple Inheritance Conflicts Virtual Inheritance Virtual Base Classes public, protected, and private derivation Review Questions 24. Miscellaneous Topics Functions with Variable-length Argument Lists Resource Sharing Exercise: Resource Sharing IV. Programming Assignments 25. MP3 jukebox Assignments Data Model: Mp3File Visitor: Generating Playlists Preference: An enumerated type Reusing id3lib PlayListModel Serialization Testing mp3file related classes Simple Queries and Filters Mp3PlayerView Models and Views: PlayList Source Selector Persistent settings Query Forms Edit Form View for FileTagger Database View A. C++ Reserved keywords B. Standard Headers C. The development environment The Preprocessor: for #including files Understanding the Linker Common Linker Errors unable to find libxxx.so.x undefined reference to [identifier] Undefined reference to vtable for ClassName Debugging Building a debuggable target Exercise: Building a debuggable target gdb quickstart Finding Memory Errors Qt Assistant and Designer Open Source IDEs, Development Tools jEdit Bibliography Index List of Figures 1.1. Pointer Demo 2.1. Person class 2.2. Composition 2.3. The Company Chart 3.1. (q)make build steps 4.1. Simple relationship 4.2. The Employer's view of the Company 6.1. UML diagram of inheritance 6.2. Animal Taxonomy 6.3. Shapes UML diagram 6.4. Another way to represent shapes 6.5. Contacts 7.1. Dependency 7.2. Libraries and their Dependencies 9.1. Components and Composites 9.2. Suffolk University Org Chart 10.1. Template based Stack 10.2. Aggregates and Compositions 10.3. Card Game UML 10.4. The Serializer pattern 10.5. A Map of Sets 11.1. QWidget's Heritange 11.2. A Main Window 11.3. Rows and Columns 11.4. Moving app Layouts 11.5. Sample 8 puzzle 11.6. Model-View Controller design for Puzzle 11.7. Dragged Dockwindows 12.1. Linux Process Hierarchy 12.2. Qonsole UML - model and view 12.3. Users 12.4. UML diagram for Movie and MovieView 12.5. Loggers 12.6. Speaking with signals 12.7. Jack and Giant UML 14.1. Abstract and Concrete XML classes 14.2. Plug-in Component Architecture 14.3. QDom UML model 14.4. Domwalker and Slacker 14.5. DocbookDoc 15.1. Anti-pattern 15.2. MetaObjects 15.3. DataObject 16.1. Libraries and Factories 16.2. DataObjectReader and its related classes 16.3. ID3_Tag and its related classes 16.4. FileTagger, and the classes it fronts for 17.1. Model-View Controller pattern 17.2. Forms 17.3. Input Fields 17.4. FormModel and Question 17.5. Form Views 17.6. Rephrasing the Question 17.7. Qt 4 Model/View classes 17.8. qjots data types 18.1. DbViewApp 19.1. Hierarchy of Basic Types 23.1. QWidget's inheritance 23.2. Window and ScreenRegion 23.3. Mp3 Data Model 23.4. Person - Student - Teacher 23.5. GradTeachingFellow - nonvirtual 23.6. GradTeachingFellow - virtual 25.1. Example screenshot 25.2. The Controller and its managed objects 25.3. Initial Data Model 25.4. Serialization Classes for PlayListModel 25.5. Playlist Generator UML diagram 25.6. PlayListTableModel 25.7. Source Selector View 25.8. Source Selector and related classes UML 25.9. QTableView of a database C.1. The Linker's inputs and outputs C.2. KDevelop C.3. Umbrello Screenshot List of Tables Examples of Literals. 1.2. Simple Types Hierarchy 7.1. Reusable Components 8.1. Options for diskusage 12.1. QProcess vs QThread 13.1. Examples of Regular Expressions 19.1. C++ Operators B.1. Standard Headers C.1. The arguments to the linker ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.