| |
| |
Foreword | |
| |
| |
Preface | |
| |
| |
Preface to the Second Edition | |
| |
| |
Acknowledgments | |
| |
| |
About the Authors | |
| |
| |
| |
Design Patterns and Qt 4 | |
| |
| |
| |
C++ Introduction | |
| |
| |
| |
Overview of C++ | |
| |
| |
| |
A Brief History of C++ | |
| |
| |
| |
C++ First Example | |
| |
| |
| |
Standard Input and Output | |
| |
| |
| |
Introduction to Functions | |
| |
| |
| |
qmake, Project Files, and Makefile | |
| |
| |
| |
Getting Help Online | |
| |
| |
| |
Strings | |
| |
| |
| |
Streams | |
| |
| |
| |
File Streams | |
| |
| |
| |
Qt Dialogs for User Input/Output | |
| |
| |
| |
Identifiers, Types, and Literals | |
| |
| |
| |
C++ Simple Types | |
| |
| |
| |
The Keyword const | |
| |
| |
| |
Pointers and Memory Access | |
| |
| |
| |
Reference Variables | |
| |
| |
| |
Const* and *const | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Top of the class | |
| |
| |
| |
First, There Was struct | |
| |
| |
| |
Class Definitions | |
| |
| |
| |
Member Access Specifiers | |
| |
| |
| |
Encapsulation | |
| |
| |
| |
Introduction to UML | |
| |
| |
| |
Friends of a Class | |
| |
| |
| |
Constructors | |
| |
| |
| |
Destructors | |
| |
| |
| |
The Keyword static | |
| |
| |
| |
Class Declarations and Definitions | |
| |
| |
| |
Copy Constructors and Assignment Operators | |
| |
| |
| |
Conversions | |
| |
| |
| |
Const Member Functions | |
| |
| |
| |
Subobjects | |
| |
| |
| |
Exercise: Classes | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Introduction to Qt | |
| |
| |
| |
Style Guidelines, Naming Conventions | |
| |
| |
| |
The Qt Core Module | |
| |
| |
| |
QtCreator--;An IDE for Qt Programming | |
| |
| |
| |
Exercises: Introduction to Qt | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Lists | |
| |
| |
| |
Introduction to Containers | |
| |
| |
| |
Iterators | |
| |
| |
| |
Relationships | |
| |
| |
| |
Exercise: Relationships | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Functions | |
| |
| |
| |
Overloading Functions | |
| |
| |
| |
Optional Arguments | |
| |
| |
| |
Operator Overloading | |
| |
| |
| |
Parameter Passing by Value | |
| |
| |
| |
Parameter Passing by Reference | |
| |
| |
| |
References to const | |
| |
| |
| |
Function Return Values | |
| |
| |
| |
Returning References from Functions | |
| |
| |
| |
Overloading on const | |
| |
| |
| |
Inline Functions | |
| |
| |
| |
Functions with Variable-Length Argument Lists | |
| |
| |
| |
Exercise: Encryption | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Inheritance and Polymorphism | |
| |
| |
| |
Simple Derivation | |
| |
| |
| |
Derivation with Polymorphism | |
| |
| |
| |
Derivation from an Abstract Base Class | |
| |
| |
| |
Inheritance Design | |
| |
| |
| |
Overloading, Hiding, and Overriding | |
| |
| |
| |
Constructors, Destructors, and Copy Assignment Operators | |
| |
| |
| |
Processing Command-Line Arguments | |
| |
| |
| |
Containers | |
| |
| |
| |
Managed Containers, Composites, and Aggregates | |
| |
| |
| |
Containers of Pointers | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Libraries and Design Patterns | |
| |
| |
| |
Building and Reusing Libraries | |
| |
| |
| |
Exercise: Installing Libraries | |
| |
| |
| |
Frameworks and Components | |
| |
| |
| |
Design Patterns | |
| |
| |
| |
Review Questions | |
| |
| |
| |
QObject, QApplication, Signals, and Slots | |
| |
| |
| |
Values and Objects | |
| |
| |
| |
Composite Pattern: Parents and Children | |
| |
| |
| |
QApplication and the Event Loop | |
| |
| |
| |
Q_OBJECT and moc: A checklist | |
| |
| |
| |
Signals and Slots | |
| |
| |
| |
QObject Lifecycle | |
| |
| |
| |
QTestLib | |
| |
| |
| |
Exercises: QObject, QApplication, Signals, and Slots | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Widgets and Designer | |
| |
| |
| |
Widget Categories | |
| |
| |
| |
Designer Introduction | |
| |
| |
| |
Dialogs | |
| |
| |
| |
Form Layout | |
| |
| |
| |
Icons, Images, and Resources | |
| |
| |
| |
Layout of Widgets | |
| |
| |
| |
Designer Integration with Code | |
| |
| |
| |
Exercise: Input Forms | |
| |
| |
| |
The Event Loop: Revisited | |
| |
| |
| |
Paint Events, Drawing Images | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Main Windows and Actions | |
| |
| |
| |
QActions, QMenus, and QMenuBars | |
| |
| |
| |
Regions and QDockWidgets | |
| |
| |
| |
QSettings: Saving and Restoring Application State | |
| |
| |
| |
Clipboard and Data Transfer Operations | |
| |
| |
| |
The Command Pattern | |
| |
| |
| |
tr() and Internationalization | |
| |
| |
| |
Exercises: Main Windows and Actions | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Generics and Containers | |
| |
| |
| |
Generics and Templates | |
| |
| |
| |
Generics, Algorithms, and Operators | |
| |
| |
| |
Sorted Map Example | |
| |
| |
| |
Function Pointers and Functors | |
| |
| |
| |
Flyweight Pattern: Implicitly Shared Classes | |
| |
| |
| |
Exercise: Generics | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Meta Objects, Properties, and Reflective Programming | |
| |
| |
| |
QMetaObject--;The MetaObject Pattern | |
| |
| |
| |
Type Identification and qobject_cast | |
| |
| |
| |
Q_PROPERTY Macro--;Describing QObject Properties | |
| |
| |
| |
QVariant Class: Accessing Properties | |
| |
| |
| |
Dynamic Properties | |
| |
| |
| |
MetaTypes, Declaring, and Registering | |
| |
| |
| |
invokeMethod() | |
| |
| |
| |
Exercises: Reflection | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Models and Views | |
| |
| |
| |
Model-View-Controller (MVC) | |
| |
| |
| |
Qt Models and Views | |
| |
| |
| |
Table Models | |
| |
| |
| |
Tree Models | |
| |
| |
| |
Smarter Pointers | |
| |
| |
| |
Exercises: Models and Views | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Validation and Regular Expressions | |
| |
| |
| |
Input Masks | |
| |
| |
| |
Validators | |
| |
| |
| |
Regular Expressions | |
| |
| |
| |
Regular Expression Validation | |
| |
| |
| |
Subclassing QValidator | |
| |
| |
| |
Exercises: Validation and Regular Expressions | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Parsing XML | |
| |
| |
| |
The Qt XML Parsers | |
| |
| |
| |
SAX Parsing | |
| |
| |
| |
XML, Tree Structures, and DOM | |
| |
| |
| |
XML Streams | |
| |
| |
| |
Review Questions | |
| |
| |
| |
More Design Patterns | |
| |
| |
| |
Creational Patterns | |
| |
| |
| |
Memento Pattern | |
| |
| |
| |
Fa�ade Pattern | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Concurrency | |
| |
| |
| |
QProcess and Process Control | |
| |
| |
| |
QThread and QtConcurrent | |
| |
| |
| |
Exercises: QThread and QtConcurrent | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Database Programming | |
| |
| |
| |
QSqlDatabase: Connecting to SQL from Qt | |
| |
| |
| |
Queries and Result Sets | |
| |
| |
| |
Database Models | |
| |
| |
| |
Review Questions | |
| |
| |
| |
C++ Language Reference | |
| |
| |
| |
Types and Expressions | |
| |
| |
| |
Operators | |
| |
| |
| |
Statements and Control Structures | |
| |
| |
| |
Evaluation of Logical Expressions | |
| |
| |
| |
Enumerations | |
| |
| |
| |
Signed and Unsigned Integral Types | |
| |
| |
| |
Standard Expression Conversions | |
| |
| |
| |
Explicit Conversions | |
| |
| |
| |
Safer Typecasting Using ANSI C++ Typecasts | |
| |
| |
| |
Overloading Special Operators | |
| |
| |
| |
Runtime Type Identification | |
| |
| |
| |
Member Selection Operators | |
| |
| |
| |
Exercises: Types and Expressions | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Scope and Storage Class | |
| |
| |
| |
Declarations and Definitions | |
| |
| |
| |
Identifier Scope | |
| |
| |
| |
Storage Class | |
| |
| |
| |
Namespaces | |
| |
| |
| |
Review Questions | |
| |
| |
| |
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 | |
| |
| |
| |
Arrays and Memory: Important Points | |
| |
| |
| |
Exercises: Memory Access | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Inheritance in Detail | |
| |
| |
| |
Virtual Pointers, virtual Tables | |
| |
| |
| |
Polymorphism and virtual Destructors | |
| |
| |
| |
Multiple Inheritance | |
| |
| |
| |
Public, protected, and private Derivation | |
| |
| |
| |
Review Questions | |
| |
| |
| |
Programming Assignments | |
| |
| |
| |
MP3 Jukebox Assignments | |
| |
| |
| |
Phonon/MultiMediaKit Setup | |
| |
| |
| |
Playlist | |
| |
| |
| |
Playlists | |
| |
| |
| |
Source Selector | |
| |
| |
| |
Database Playlists | |
| |
| |
| |
Star Delegates | |
| |
| |
| |
Sorting, Filtering, and Editing Playlists | |
| |
| |
| |
C++ Reserved Keywords | |
| |
| |
| |
Standard Headers | |
| |
| |
| |
Development Tools | |
| |
| |
| |
Alan�s Quick Start Guide to Debian for Programmers | |
| |
| |
C++/Qt Setup | |