Book description
Learn C++, Patterns, and Qt 4 Cross-Platform Development
Master C++ and design patterns together, using the world's leading open source framework for cross-platform development: Qt 4.
An Introduction to Design Patterns in C++ with Qt 4 is a complete tutorial and reference that assumes no previous knowledge of C, C++, objects, or patterns. You'll walk through every core concept, one step at a time, learning through an extensive collection of Qt 4.1-tested examples and exercises.
By the time you're done, you'll be creating multithreaded GUI applications that access databases and manipulate XML files--applications that run on platforms including Windows, Linux, Unix, and Mac OS X. Best of all, you'll be writing code that's efficient, reusable, and elegant.
Learn objects fast: classes, inheritance, polymorphism, and more
Master powerful design patterns
Discover efficient high-level programming techniques using libraries, generics, and containers
Build graphical applications using Qt widgets, models, and views
Learn advanced techniques ranging from multithreading to reflective programming
Use Qt's built-in classes for accessing MySQL data
Includes a complete C++ language reference
Table of contents
- Copyright
- Bruce Perens’ Open Source Series
- Preface
- Acknowledgments
- Rationale for the Book
- About the Authors
-
I. Introduction to C++ and Qt 4
-
1. C++ Introduction
- 1.1. Overview of C++
- 1.2. A Brief History of C++
- 1.3. Setup: Open-Source Platforms
- 1.4. Setup: Win32
- 1.5. C++ First Example
- 1.6. Input and Output
- 1.7. Identifiers, Types, and Literals
- 1.8. C++ Simple Types
- 1.9. C++ Standard Library Strings
- 1.10. Streams
- 1.11. The Keyword const
- 1.12. Pointers and Memory Access
- 1.13. const* and *const
- 1.14. Reference Variables
- Points of Departure
- Review Questions
-
2. Classes
- 2.1. Structs
- 2.2. Class Definitions
- 2.3. Member Access Specifiers
- 2.4. Encapsulation
- 2.5. Introduction to UML
- 2.6. Friends of a Class
- 2.7. Constructors
- 2.8. Subobjects
- 2.9. Destructors
- 2.10. The Keyword static
- 2.11. Copy Constructors and Assignment Operators
- 2.12. Conversions
- 2.13. const Member Functions
- Review Questions
- 3. Introduction to Qt
- 4. Lists
-
5. Functions
- 5.1. Function Declarations
- 5.2. Overloading Functions
- 5.3. Optional Arguments
- 5.4. Operator Overloading
- 5.5. Parameter Passing by Value
- 5.6. Parameter Passing by Reference
- 5.7. References to const
- 5.8. Function Return Values
- 5.9. Returning References from Functions
- 5.10. Overloading on const-ness
- 5.11. Inline Functions
- 5.12. Inlining versus Macro Expansion
- Review Questions
-
6. Inheritance and Polymorphism
- 6.1. Simple Derivation
- 6.2. Derivation with Polymorphism
- 6.3. Derivation from an Abstract Base Class
- 6.4. Inheritance Design
- 6.5. Overloading, Hiding, and Overriding
- 6.6. Constructors, Destructors, and Copy Assignment Operators
- 6.7. Processing Command-Line Arguments
- Points of Departure
- Review Questions
-
1. C++ Introduction
-
II. Higher-Level Programming
- 7. Libraries
- 8. Introduction to Design Patterns
- 9. QObject
- 10. Generics and Containers
-
11. Qt GUI Widgets
- 11.1. Widget Categories
- 11.2. QMainWindow and QSettings
- 11.3. Dialogs
- 11.4. Images and Resources
- 11.5. Layout of Widgets
- 11.6. QActions, QMenus, and QMenuBars
- 11.7. QActions, QToolbars, and QActionGroups
- 11.8. Regions and QDockWidgets
- 11.9. Views of a QStringList
- Points of Departure
- Review Questions
- 12. Concurrency
- 13. Validation and Regular Expressions
- 14. Parsing XML
- 15. Meta Objects, Properties, and Reflective Programming
- 16. More Design Patterns
- 17. Models and Views
- 18. Qt SQL Classes
-
III. C++ Language Reference
-
19. Types and Expressions
- 19.1. Operators
- 19.2. Evaluation of Logical Expressions
- 19.3. Enumerations
- 19.4. Signed and Unsigned Integral Types
- 19.5. Standard Expression Conversions
- 19.6. Explicit Conversions
- 19.7. Safer Typecasting Using ANSI C++ Typecasts
- 19.8. Run-Time Type Identification (RTTI)
- 19.9. Member Selection Operators
- Point of Departure
- Review Questions
- 20. Scope and Storage Class
- 21. Statements and Control Structures
-
22. Memory Access
- 22.1. Pointer Pathology
- 22.2. Further Pointer Pathology with Heap Memory
- 22.3. Memory Access Summary
- 22.4. Introduction to Arrays
- 22.5. Pointer Arithmetic
- 22.6. Arrays, Functions, and Return Values
- 22.7. Different Kinds of Arrays
- 22.8. Valid Pointer Operations
- 22.9. What Happens If new Fails?
- 22.10. Chapter Summary
- Review Questions
- 23. Inheritance in Detail
- 24. Miscellaneous Topics
-
19. Types and Expressions
-
IV. Programming Assignments
-
25. MP3 Jukebox Assignments
- 25.1. Data Model: Mp3File
- 25.2. Visitor: Generating Playlists
- 25.3. Preference: An Enumerated Type
- 25.4. Reusing id3lib
- 25.5. PlayListModel Serialization
- 25.6. Testing Mp3File Related Classes
- 25.7. Simple Queries and Filters
- 25.8. Mp3PlayerView
- 25.9. Models and Views: PlayList
- 25.10. Source Selector
- 25.11. Persistent Settings
- 25.12. Edit Form View for FileTagger
- 25.13. Database View
- Points of Departure
-
25. MP3 Jukebox Assignments
- V. Appendices
- Bibliography
Product information
- Title: An Introduction to Design Patterns in C++ with Qt 4
- Author(s):
- Release date: August 2006
- Publisher(s): Pearson
- ISBN: 0131879057
You might also like
book
Game Programming Using Qt
A complete guide to designing and building fun games with Qt and Qt Quick 2 using …
book
Hands-On GUI Programming with C++ and Qt5
Create visually appealing and feature-rich applications by using Qt 5 and the C++ language About This …
book
C++ GUI Programming with Qt 4
The Only Official Best-Practice Guide to Qt 4.1 Programming Using Trolltech's Qt you can build industrial-strength …
book
C++ GUI Programming with Qt 4
The Only Official, Best-Practice Guide to Qt 4.3 Programming Using Trolltech's Qt you can build industrial-strength …