Introduction to Design Patterns in C++ with Qt 4

Overhead Slides version

Alan Ezust

Paul Ezust

This document is always under development. Distribution of this work or derivative of the work is permitted under the OPL, as long as proper attribution is made.

Although every reasonable effort has been made to incorporate accurate and useful information into this book, it is provided “as is” without expressed or implied warranty. If you find a mistake, or wish to make a suggestion/contribution, please open a ticket in our Trac Database.

Abstract

C++ is taught “The Qt way”, with an emphasis on design patterns, and re-use of open source libraries and tools. By the end of the book, the reader should have a deep understanding of both the language and libraries, as well the design patterns used in developing software with them.


Table of Contents

Acknowledgments
I. Introduction to C++ and Qt 4
1. C++ Introduction
1.1. Overview of C++
1.2. A Brief History of C++
1.3. C++/Qt Setup: Open Source Platforms
1.4. C++/Qt Setup: Win32
1.5. C++ First Example
1.6. Input and Output
1.6.1. Exercises: Input and Output
1.7. Identifiers, Types, and Literals
1.7.1. Exercises: Identifiers, Types, and Literals
1.8. C++ Simple Types
1.8.1. main, and Command Line Arguments
1.8.2. Arithmetic
1.8.3. Exercises: C++ Simple Types
1.9. C++ Standard Library strings
1.10. Streams
1.10.1. Exercises: Streams
1.11. The Keyword const
1.12. Pointers and Memory access
1.12.1. The Unary Operators & and *
1.12.2. Operators new and delete
1.12.3. Exercises: Pointers and Memory access
1.13. const* and *const
1.14. Reference Variables
1.15. Review Questions
1.15.1. Points of Departure
2. Top of the class
2.1. First, there was struct
2.2. Class definitions
2.3. Member Access Specifiers
2.4. Encapsulation
2.5. Introduction to UML
2.5.1. UML Relationships
2.6. Friends of a Class
2.7. Constructors
2.8. Destructors
2.9. The Keyword static
2.10. Class Declarations and Defintions
2.11. Copy Constructors and Assignment Operators
2.12. Conversions
2.13. const Member Functions
2.14. Subobjects
2.15. Exercise: Classes
2.16. Review Questions
3. Introduction to Qt
3.1. Example project: using QApplication and QLabel
3.2. Makefile, qmake, and Project Files
3.2.1. #include: Finding Header Files
3.3. The make Command
3.4. Getting Help Online
3.5. Style Guidelines, Naming Conventions
3.5.1. Points of Departure
3.6. The Qt Core Module
3.6.1. Streams and Dates
3.6.2. Exercises: The Qt Core Module
3.7. Review Questions
3.7.1. Points of Departure
4. Lists
4.1. Introduction to Containers
4.2. Iterators
4.2.1. QStringList and iteration
4.3. Relationships
4.3.1. Relationships Summary
4.4. Exercise: Relationships
4.5. Review Questions
4.5.1. Points of Departure
5. Functions
5.1. Function Declarations
5.2. Overloading Functions
5.2.1. Exercises: Overloading Functions
5.3. Default (Optional) Arguments
5.4. Operator Overloading
5.4.1. Exercises: 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
5.10.1. Exercises: Overloading on const
5.11. inline Functions
5.11.1. Inlining versus Macro Expansion
5.12. Functions with Variable-length Argument Lists
5.13. Exercise: Encryption
5.14. Review Questions
6. Inheritance and Polymorphism
6.1. Simple Derivation
6.1.1. Inheritance Client Code Example
6.2. Derivation with Polymorphism
6.2.1. Exercises: 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
6.7.1. Derivation and ArgumentList
6.8. Exercises: Inheritance and Polymorphism
6.9. Review Questions
6.9.1. Points of Departure
II. Higher Level Programming
7. Libraries
7.1. Code Containers
7.2. Building and Reusing Libraries
7.2.1. Organizing Libraries: Dependency Management
7.2.2. Installing Libraries
7.2.2.1. Points of Departure
7.3. Installing Libraries: A Lab Exercise
7.4. Frameworks and Components
7.5. Review Questions
8. Introduction to Design patterns
8.1. Anti-patterns
8.2. The Visitor Pattern
8.2.1. Directories and Files: QDir and QFileInfo
8.2.2. Customizing the Visitor using Inheritance
8.2.3. Exercises: The Visitor Pattern
8.2.4. QDirIterator and the Iterator pattern
8.3. Review Questions
9. QObject
9.1. QObject's Child Managment
9.1.1. Exercises: QObject's Child Managment
9.2. Parents and Children
9.2.1. Finding Children
9.2.2. Exercises: Parents and Children
9.3. QApplication and the Event Loop
9.3.1. Layouts: A First Look
9.3.2. Connecting to slots
9.3.3. Signals and Slots
9.3.3.1. Signal Mappers
9.3.3.2. Exercises: Signals and Slots
9.4. Q_OBJECT and moc: A checklist
9.5. Values and Objects
9.6. Exercises: QObject
9.7. tr() and Internationalization.
9.8. Review Questions
9.9. Points of Departure
10. Generics and Containers
10.1. Generics and Templates
10.1.1. Function Templates
10.1.1.1. Exercises: Function Templates
10.1.2. Class Templates
10.1.3. Exporting template functions
10.1.4. Exercises: Generics and Templates
10.2. Containers
10.3. Managed Containers, Composites and Aggregates
10.3.1. Exercises: Managed Containers, Composites and Aggregates
10.4. Generics, Algorithms, and Operators
10.4.1. Exercises: Generics, Algorithms, and Operators
10.5. Serializer Pattern
10.5.1. Exercises: Serializer Pattern
10.6. Sorted Map example
10.7. Flyweight pattern: Implicitly Shared Classes
10.7.1. Exercises: Flyweight pattern: Implicitly Shared Classes
10.8. Exercise: QSet and QMap
10.9. Review Questions
11. Qt GUI Widgets
11.1. Widget Categories
11.2. QMainWindow and QSettings
11.2.1. QSettings: Saving and Restoring Application State
11.3. Dialogs
11.3.1. Input Dialogs and Widgets
11.3.2. Exercises: Dialogs
11.4. Images and Resources
11.5. Layout of Widgets
11.5.1. Spacing, Stretching, and Struts
11.5.2. Moving Widgets across Layouts
11.5.3. Exercises: Layout of Widgets
11.6. QActions, QMenus, and QMenuBars
11.6.1. QActions, QToolbars, and QActionGroups
11.6.2. Exercises: QActions, QMenus, and QMenuBars
11.6.3. Exercise: CardGame GUI
11.6.4. Points of Departure
11.7. Regions and QDockWidgets
11.8. Views of a QStringList
11.8.1. Exercises: Views of a QStringList
11.9. Qt Designer
11.9.1. Form Views
11.9.2. Reusing dynamic widgets
11.9.3. Adding widget plugins to Designer
11.10. Review Questions
11.10.1. Points of Departure
12. Concurrency
12.1. QProcess and Process Control
12.1.1. Processes and Environment
12.1.2. Qonsole: Writing an Xterm in Qt
12.1.3. Qonsole with Keyboard Events
12.1.4. Exercises: QProcess and Process Control
12.2. Threads and QThread
12.2.1. QPixmap and QThread Animation Example: Movie Player
12.2.2. Movie Player with QTimer
12.2.3. Multiple Threads, Queues, and Loggers Example: Giant
12.2.4. Thread Safety and QObjects
12.2.5. Exercises: Threads and QThread
12.3. Summary: QProcess and QThread
12.4. Review Questions
13. Validation and Regular Expressions
13.1. Input Masks
13.2. Validators
13.3. Regular Expressions
13.3.1. Regular Expression Syntax
13.3.2. Regular Expressions: Phone Number Recognition
13.3.3. Exercises: Regular Expressions
13.4. Regular Expression Validation
13.5. Constraints and Boolean Expressions
13.5.1. Interpreter Pattern: Groups of Constraints
13.5.1.1. Exercises: Interpreter Pattern: Groups of Constraints
13.6. Exercises: Validation and Regular Expressions
13.7. Review Questions
14. Parsing XML
14.1. The Qt XML Module
14.2. Event-Driven parsing
14.3. XML, Tree Structures, and DOM
14.3.1. Visitor Pattern: DOM Tree Walking
14.3.2. Generation of XML with DOM
14.3.3. Exercises: XML, Tree Structures, and DOM
14.4. Review Questions
15. Meta Objects, Properties, and Reflective Programming
15.1. QMetaObject - The Meta Object pattern
15.2. Type Identification and qobject_cast
15.3. Q_PROPERTY Macro - Describing QObject Properties
15.4. QVariant Class: Accessing Properties
15.4.1. DataObject: An Extension of QObject
15.4.1.1. Exercises: DataObject: An Extension of QObject
15.5. Dynamic Properties
15.6. Prototype Pattern: using dynamic properties
15.7. Review Questions
16. More Design Patterns
16.1. Creational Patterns
16.1.1. Abstract Factory
16.1.2. Abstract Factories and Libraries
16.1.3. qApp and Singleton pattern
16.1.4. Creation Rules and Friend Functions
16.1.5. Benefits of Using Factories
16.1.6. Exercises: Creational Patterns
16.2. Memento Pattern
16.2.1. Exporting to XML
16.2.2. Importing Objects with an Abstract Factory
16.3. The Façade Pattern
16.3.1. Functional Façade
16.3.2. Smart Pointers: auto_ptr
16.3.3. FileTagger: Façade Example
16.3.4. Exercises: The Façade Pattern
16.4. Review Questions
16.4.1. Points of Departure
17. Models and Views
17.1. M-V-C: What about the Controller?
17.2. Dynamic Form Models
17.2.1. Exercises: Dynamic Form Models
17.2.2. Form Models
17.2.3. Form Views
17.2.4. Unforeseen Types
17.2.5. Controlling Actions
17.2.6. DataObject Form model
17.2.6.1. Exercises: DataObject Form model
17.3. Qt 4 Models and Views
17.3.1. QStandardItemModel and Multiple Views
17.4. Table Models
17.5. Tree Models
17.5.1. Extended Tree Widget Items
17.5.1.1. Exercises: Extended Tree Widget Items
17.6. Review Questions
17.7. Points of Departure
18. Database Programming
18.1. Intro to MySQL
18.2. Connecting to MySQL from Qt
18.3. Queries and Result Sets
18.4. Long Running Threads and the Command Pattern
18.5. Database Models
18.6. Review Questions
III. C++ Language Reference
19. Types and Expressions
19.1. Operators
19.1.1. Table of Operators
19.2. Evaluation of Logical Expressions
19.3. Enumerations
19.4. Signed and Unsigned Integral Types
19.4.1. Exercises: Signed and Unsigned Integral Types
19.5. Standard Expression Conversions
19.5.1. Exercises: Standard Expression Conversions
19.6. Explicit Conversions
19.7. Safer ANSI C++ Typecast operators
19.7.1. static_cast and const_cast
19.7.1.1. Exercises: static_cast and const_cast
19.7.2. reinterpret_cast
19.7.3. Why not use C-style casts?
19.8. Overloading special operators
19.8.1. Conversion Operators
19.8.2. Vectors and operator[]
19.8.3. The Function-Call operator()
19.9. Runtime Type Identification (RTTI)
19.9.1. typeid operator
19.10. Member Selection operators
19.10.1. Points of Departure
19.11. Exercises: Types and Expressions
19.12. Review Questions
20. Scope and Storage Class
20.1. Declarations and Definitions
20.2. Identifier Scope
20.2.1. Default Scope of Identifiers - A Summary
20.2.2. File Scope versus Block Scope and operator::
20.2.2.1. Exercises: File Scope versus Block Scope and operator::
20.3. Storage Class
20.3.1. Globals, static, and QObject
20.3.1.1. Globals and const
20.3.2. Exercises: Storage Class
20.4. Namespaces
20.5. Review Questions
21. Statements and Control Structures
21.1. Statements
21.2. Selection Statements
21.2.1. Exercises: Selection Statements
21.3. Iteration
21.3.1. Exercises: Iteration
21.4. Exceptions
21.4.1. Exception Handling
21.4.2. Exception Types
21.4.3. throwing things around
21.4.4. try and catch
21.4.4.1. Exercises: try and catch
21.4.5. More about throw
21.4.6. Rethrown Exceptions
21.4.7. Exception Expressions
21.4.8. Exercises: Exceptions
21.5. Review Questions
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.9.1. set_new_handler() : Another Approach To new Failures
22.9.2. Using set_new_handler and bad_alloc
22.9.3. Checking for null: new(nothrow)
22.10. Chapter Summary
22.11. Review Questions
23. Inheritance in Detail
23.1. virtual pointers, virtual tables
23.2. Polymorphism and virtual destructors
23.3. Multiple Inheritance
23.3.1. Multiple Inheritance Syntax
23.3.2. Multiple Inheritance with Abstract Interfaces
23.3.2.1. Points of Departure
23.3.3. Resolving Multiple Inheritance Conflicts
23.3.3.1. virtual Inheritance
23.3.3.2. virtual Base Classes
23.4. public, protected, and private derivation
23.5. Review Questions
IV. Programming Assignments
24. MP3 jukebox Assignments
24.1. Data Model: Mp3File
24.2. Visitor: Generating Playlists
24.3. Reusing id3lib
24.4. PlayListModel Serialization
24.5. Testing Mp3File related classes
24.6. Simple Queries and Filters
24.7. Mp3Player and its View
24.8. Models and Views: PlayList
24.9. Source Selector
24.10. Persistent settings
24.11. Edit Form View for FileTagger
24.12. Database View
24.13. Points of Departure
A. C++ Reserved keywords
B. Standard Headers
C. The Development Environment
C.1. The Preprocessor: For #including Files
C.2. Understanding the Linker
C.2.1. Common Linker Error Messages
C.3. Debugging
C.3.1. Building a Debuggable Target
C.3.1.1. Exercises: Building a Debuggable Target
C.3.2. gdb Quickstart
C.3.3. Finding Memory Errors
C.4. Qt Assistant and Designer
C.5. Open Source development tools, Libraries, IDEs.
C.5.1. jEdit
D. A quickstart guide to Debian for programmers.
D.1. The apt system
D.2. update-alternatives
E. Errata
Bibliography
Index

List of Figures

1.1. Pointer Demo
1.2. Memory Snapshots
2.1. Person class
2.2. Composition
2.3. UML class definition with static
2.4. Bidirectional Relationship
2.5. Fraction class diagram
2.6. The Company Chart
2.7. Hondurota
2.8. Date UML class diagram
3.1. (q)make build steps
4.1. One-To-Many Relationship
4.2. The Employer's view of the Company
4.3. Books and Pages
4.4. Contacts
5.1. Before first swap()
5.2. Inside first swap()
5.3. Inside second swap()
6.1. UML diagram of inheritance
6.2. Animal Taxonomy
6.3. Shapes UML diagram
6.4. Another way to represent shapes
6.5. Film classes
7.1. Dependency
7.2. Libraries and their Dependencies
8.1. Anti-pattern
8.2. Code Visitor UML
9.1. Components and Composites
9.2. QObject: Composite and Component
9.3. Suffolk University Organizational Chart
9.4. A widget
9.5. A Dialog
10.1. Template based Stack
10.2. Aggregates and Compositions
10.3. Card Game UML
10.4. The Serializer pattern
10.5. TextbookMap
10.6. A map of sets
11.1. QWidget's Heritage
11.2. Buttons
11.3. Input widgets
11.4. A main window
11.5. Rows and Columns
11.6. Improved layout with stretch and spacing
11.7. Moving labels app
11.8. Sample 15 Puzzle
11.9. Model-View-Controller Design for Puzzle
11.10. Login application design
11.11. BlackJack UML diagram
11.12. Dragged Dockwindows
12.1. Linux process hierarchy
12.2. Qonsole1
12.3. Qonsole UML: model and view
12.4. UML diagram for Movie and MovieView
12.5. Giant vs Jack main window
12.6. Loggers
12.7. Speaking with signals
12.8. Jack and Giant UML
13.1. Regexp Tester
13.2. Managed Constraints
13.3. setProperty
14.1. Abstract and concrete SAX classes
14.2. Plug-in component architecture
14.3. QDom UML model
14.4. Domwalker and Slacker
14.5. DocbookDoc
15.1. MetaObjects
15.2. 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. InputFields
17.4. FormModel and Question
17.5. Form Views
17.6. Rephrasing the Question
17.7. Auto-Generated FileTagger form
17.8. Qt 4 Model/View classes
17.9. Multiple views, one model
17.10. qjots data types
18.1. Main Window with progress bar and abort button
18.2. Command Pattern and WorkThreads
18.3. DbViewApp
19.1. Hierarchy of basic types
22.1. Initial values of memory
22.2. Memory after leak
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
24.1. Example screenshot
24.2. The Main Window, Models and Views
24.3. Initial Data Model
24.4. PlayList and PlayListModel
24.5. Serialization Classes for PlayListModel
24.6. Playlist Generator With Constraints
24.7. Mp3Player
24.8. PlayListTableModel
24.9. Source Selector View
24.10. Source Selector and related classes
24.11. QTableView of a database
24.12. Mp3TableModel
C.1. The Linker's inputs and outputs
C.2. Umbrello Screenshot
C.3. Jedit 4.3
E.1. UML diagram of inheritance

List of Tables

1.1. Examples of Literals
1.2. Simple Types Hierarchy
7.1. Reusable Components
8.1. Options for diskusage
12.1. QProcess versus QThread
13.1. Examples of Regular Expressions
19.1. C++ Operators
B.1. Standard Headers

List of Examples

1.1. ../bin/qtconfigure
1.2. src/libs/utils/qt.sh
1.3. src/early-examples/fac.cpp
1.4. src/iostream/io.cpp
1.5. src/early-examples/fac2.cpp
1.6. src/early-examples/literals.cpp
1.7. src/early-examples/size.cpp
1.8. src/main/main1.cpp
1.9. src/arithmetic/arithmetic.cpp
1.10. src/arithmetic/arithmetic.cpp
1.11. src/arithmetic/arithmetic.cpp
1.12. src/arithmetic/arithmetic.cpp
1.13. src/arithmetic/arithmetic.cpp
1.14. src/generic/stlstringdemo.cpp
1.15. src/stdstreams/streamdemo.cpp
1.16. src/stl/streams/streams.cpp
1.17. src/stl/streams/streams.cpp
1.18. src/stl/streams/streams.cpp
1.19. src/pointers/pointerdemo.cpp
1.20. src/pointers/newdelete/ndsyntax.cpp
1.21. src/pointers/newdelete1.cpp
1.22. src/constptr/constptr.cpp
1.23. src/types/types.cpp
2.1. src/structdemo/demostruct.h
2.2. src/structdemo/demostruct.cpp
2.3. src/classes/fraction.h
2.4. src/classes/fraction.cpp
2.5. src/classes/fraction.h
2.6. src/classes/fraction-client.cpp
2.7. src/ctor/complex.h
2.8. src/ctor/complex.cpp
2.9. src/statics/static.h
2.10. src/statics/static.cpp
2.11. src/statics/static-test.cpp
2.12. src/circular/badegg/egg.h
2.13. src/circular/badegg/chicken.h
2.14. src/circular/goodegg/egg.h
2.15. src/circular/goodegg/egg.cpp
2.16. src/lifecycle/copyassign/fraction.h
2.17. src/lifecycle/copyassign/fraction.cpp
2.18. src/lifecycle/copyassign/copyassign.cpp
2.19. src/ctor/conversion/fraction.cpp
2.20. src/const/constmembers.cpp
2.21. src/subobject/subobject.h
2.22. src/subobject/subobject.cpp
2.23. src/early-examples/thing.h
2.24. src/early-examples/thing.cpp
2.25. src/early-examples/thing-demo.cpp
2.26. src/statics/static3.h
2.27. src/statics/static3.cpp
2.28. src/destructor/demo/thing.h
2.29. src/destructor/demo/destructor-demo.cpp
3.1. src/qapp/main.cpp
3.2. src/qapp/qapp.pro
3.3. src/qapp/Makefile-abbreviated
3.4. src/libs/utils/qstd.h
3.5. src/libs/utils/qstd.cpp
3.6. src/qtio/qtio-demo.cpp
4.1. src/containers/lists/lists-examples.cpp
4.2. src/containers/contact/testdriver.cpp
5.1. src/functions/function-call.cpp
5.2. src/functions/function-call.cpp
5.3. src/functions/date.h
5.4. src/functions/date.cpp
5.5. src/functions/date-test.cpp
5.6. src/complex/complex.h
5.7. src/complex/complex.cpp
5.8. src/complex/complex.cpp
5.9. src/complex/complex-test.cpp
5.10. src/complex/complex-conversions.cpp
5.11. src/functions/summit.cpp
5.12. src/functions/pointerparam.cpp
5.13. src/reference/swap.cpp
5.14. src/const/reference/constref.cpp
5.15. src/reference/maxi.cpp
5.16. src/const/overload/constoverload.h
5.17. src/const/overload/constoverload.cpp
5.18. src/const/overload/constoverload-client.cpp
5.19. src/functions/inlinetst.cpp
5.20. src/ellipsis/ellipsis.cpp
5.21. src/functions/cryptoclass/crypto-client.cpp
6.1. src/derivation/qmono/student.h
6.2. src/derivation/qmono/student.cpp
6.3. src/derivation/qmono/student.cpp
6.4. src/derivation/qmono/student.cpp
6.5. src/derivation/qmono/student-test.cpp
6.6. src/derivation/qpoly/student.h
6.7. src/derivation/qpoly/student-test.cpp
6.8. src/polymorphic1.cc
6.9. src/polymorphic2.cc
6.10. src/derivation/exercise/Base.h
6.11. src/derivation/exercise/Base.cpp
6.12. src/derivation/exercise/main.cpp
6.13. src/derivation/shape1/shapes.h
6.14. src/derivation/shape1/shapes.h
6.15. src/derivation/shape1/shapes.cpp
6.16. src/derivation/shape1/shape1.cpp
6.17. src/derivation/shape1/shape.txt
6.18. src/derivation/overload/account.h
6.19. src/derivation/overload/account.cpp
6.20. src/derivation/assigcopy/account.h
6.21. src/derivation/assigcopy/account.h
6.22. src/derivation/assigcopy/account.cpp
6.23. src/reuse/argproc.cpp
6.24. src/libs/utils/argumentlist.h
6.25. src/libs/utils/argumentlist.cpp
6.26. src/reuse/main.cpp
6.27. src/reuse/reuse.pro
7.1. src/qapp-gui/qapp-gui.pro
7.2. src/libs/utils/myexport.h
7.3. src/bash/env-script.sh
8.1. src/visitorsrc/recurseadddir.cpp
8.2. src/libs/utils/filevisitor.h
8.3. src/libs/utils/filevisitor.cpp
8.4. src/visitor/codevisitor/codevisitor.h
8.5. src/visitor/codevisitor/codevisitor.cpp
8.6. src/visitor/codevisitor/codevisitor-test.cpp
9.1. src/qobject/person.h
9.2. src/qobject/person.cpp
9.3. src/qobject/bunch.cpp
9.4. src/findchildren/findchildren.cpp
9.5. src/eventloop/eventloop.cpp
9.6. src/eventloop/eventloop.cpp
9.7. src/eventloop/messager.h
9.8. src/eventloop/messager.cpp
9.9. src/widgets/sliderlcd/sliderlcd.h
9.10. src/widgets/sliderlcd/sliderlcd.cpp
9.11. src/widgets/sliderlcd/sliderlcd.cpp
9.12. src/widgets/sliderlcd/sliderlcd-demo.cpp
10.1. src/templates/template-demo.cpp
10.2. src/templates/template-demo.cpp
10.3. src/containers/stack/stack.h
10.4. src/containers/stack/stack.h
10.5. src/containers/stack/main.cpp
10.6. src/templates/export/power.h
10.7. src/templates/export/power.cpp
10.8. src/templates/export/main.cpp
10.9. src/cardgame/datastructure/cardgame-client.cpp
10.10. src/containers/sortlist/sortlist4.cpp
10.11. src/containers/sortlist/sortlist-output.txt
10.12. src/containers/contact/serializer.cpp
10.13. src/containers/qmap/textbook.h
10.14. src/containers/qmap/qmap-example.cpp
10.15. src/containers/qmap/qmap-example.cpp
10.16. src/containers/qmap/qmap-example-output.txt
10.17. src/mystring/refcount/refcount.h
10.18. src/mystring/refcount/refcount.cpp
10.19. src/mystring/refcount/refcount-test.cpp
11.1. src/widgets/mainwindow/mymainwindow.h
11.2. src/widgets/mainwindow/mymainwindow.cpp
11.3. src/widgets/mainwindow/mainwindow-main.cpp
11.4. src/widgets/dialogs/messagebox/dialogs.h
11.5. src/widgets/dialogs/messagebox/dialogs.cpp
11.6. src/widgets/dialogs/inputdialog/inputdialog.cpp
11.7. src/libs/cards2/cards2.pro
11.8. src/libs/cards2/cardpics.h
11.9. src/libs/cards2/cardpics.cpp
11.10. src/layouts/boxes/cardtable.h
11.11. src/layouts/boxes/cardtable.cpp
11.12. src/layouts/boxes/boxes.cpp
11.13. src/layouts/stretch/cardtable.cpp
11.14. src/layouts/moving/moving.h
11.15. src/layouts/moving/moving.cpp
11.16. src/layouts/moving/moving.cpp
11.17. src/layouts/moving/moving.cpp
11.18. src/widgets/dialogs/messagebox/dialogs.cpp
11.19. src/widgets/menus/study.h
11.20. src/widgets/menus/study.cpp
11.21. src/widgets/menus/study.cpp
11.22. src/widgets/menus/study.cpp
11.23. src/widgets/menus/study.cpp
11.24. src/modelview/qstringlistmodel/simplelistapp.h
11.25. src/modelview/qstringlistmodel/simplelistapp.cpp
12.1. src/logtail/logtail.h
12.2. src/logtail/logtail.cpp
12.3. src/logtail/logtail.cpp
12.4. src/logtail/logtail.cpp
12.5. src/environment/setenv.cpp
12.6. src/qonsole/qonsole1/qonsole.cpp
12.7. src/qonsole/qonsole1/qonsole.cpp
12.8. src/qonsole/qonsole1/qonsole.cpp
12.9. src/qonsole/keyevents/qonsole.h
12.10. src/qonsole/keyevents/qonsole.cpp
12.11. src/qonsole/keyevents/qonsole.cpp
12.12. src/qonsole/keyevents/qonsole.cpp
12.13. src/threads/animate/moviethreadmain.cpp
12.14. src/threads/animate/moviethread.cpp
12.15. src/threads/animate/movieview.cpp
12.16. src/threads/animate/movieview.cpp
12.17. src/threads/animate/moviethread.cpp
12.18. src/threads/animate/moviethread.cpp
12.19. src/threads/animate/movietimer.h
12.20. src/threads/animate/movietimermain.cpp
12.21. src/threads/animate/movietimer.cpp
12.22. src/threads/giant/giant.h
12.23. src/threads/giant/giant.cpp
12.24. src/threads/giant/giant.cpp
12.25. src/threads/giant/giantwindow.h
12.26. src/threads/giant/giantwindow.cpp
13.1. src/validate/inputform.h
13.2. src/validate/inputform.cpp
13.3. src/regexp/testphone.txt
13.4. src/regexp/testphoneread.cpp
13.5. src/validate/regexval/rinputform.h
13.6. src/validate/regexval/rinputform.cpp
13.7. src/libs/dataobjects/constraint.h
13.8. src/libs/dataobjects/constraint.h
13.9. src/libs/dataobjects/constraintgroup.h
13.10. src/libs/dataobjects/constraineddataobject.cpp
13.11. src/libs/dataobjects/constraintgroup.cpp
13.12. src/libs/tests/testconstraint.cpp
14.1. src/xml/html/testhtml.html
14.2. src/xml/html/testxhtml.html
14.3. src/xml/sax1/samplefile.xml
14.4. src/xml/sax1/tagreader.cpp
14.5. src/xml/sax1/myhandler.h
14.6. src/xml/sax1/myhandler.cpp
14.7. src/xml/sax1/sax1.pro
14.8. src/xml/sax1/tagreader-output.txt
14.9. src/xml/domwalker/main.cpp
14.10. src/xml/domwalker/domwalker.cpp
14.11. src/xml/domwalker/slacker.cpp
14.12. src/libs/docbook/docbookdoc.h
14.13. src/xml/xmlbuilder/zenflesh.cpp
14.14. src/xml/zen.xml
14.15. src/xml/zen2html
14.16. src/libs/docbook/docbookdoc.cpp
14.17. src/libs/docbook/docbookdoc.cpp
15.1. src/qtrtti/myapp-classdef.cpp
15.2. src/qtrtti/qtrtti.cpp
15.3. src/properties/customer-props.h
15.4. src/properties/customer-props.cpp
15.5. src/properties/testcustomerprops.cpp
15.6. src/properties/testcustomerprops.cpp
15.7. src/libs/dataobjects/dataobject.cpp
15.8. src/libs/tests/properties/testprops.cpp
16.1. src/libs/dataobjects/abstractfactory.h
16.2. src/libs/dataobjects/objectfactory.h
16.3. src/libs/dataobjects/objectfactory.cpp
16.4. src/libs/customer/customerfactory.h
16.5. src/libs/customer/customerfactory.cpp
16.6. src/libs/customer/customerfactory.cpp
16.7. src/libs/dataobjects/objectfactory.h
16.8. src/libs/dataobjects/objectfactory.cpp
16.9. src/libs/customer/customer.h
16.10. src/libs/dataobjects/address.h
16.11. src/libs/dataobjects/address.h
16.12. src/ctorpoly/ctorpoly.cpp
16.13. src/ctorpoly/ctorpoly-output.txt
16.14. src/xml/propchildren/customer.h
16.15. src/xml/propchildren/customerlist.h
16.16. src/xml/propchildren/customerlist.xml
16.17. src/xml/propchildren/xmlexport.h
16.18. src/xml/propchildren/xmlexport.cpp
16.19. src/libs/dataobjects/dataobjectreader.h
16.20. src/xml/propchildren/customerlist.xml
16.21. src/libs/dataobjects/dataobjectreader.cpp
16.22. src/libs/dataobjects/dataobjectreader.cpp
16.23. src/libs/dataobjects/objectfactory.cpp
16.24. src/facade/id3lib-usage.cpp
16.25. auto_ptr code fragment
16.26. src/libs/filetagger/filetagger.h
16.27. src/libs/filetagger/filetagger.cpp
17.1. src/libs/forms/testform.cpp
17.2. src/libs/forms/testform.cpp
17.3. src/libs/forms/formmodel.cpp
17.4. src/libs/forms/question.h
17.5. src/libs/forms/question.cpp
17.6. src/libs/forms/formfactory.cpp
17.7. src/libs/forms/formfactory.cpp
17.8. src/libs/forms/inputfields.h
17.9. src/libs/dataobjects/variant.h
17.10. src/libs/forms/dirinputfield.h
17.11. src/libs/forms/formactions.h
17.12. src/libs/forms/formactions.cpp
17.13. src/libs/forms/propquestion.cpp
17.14. src/libs/forms/testform2.cpp
17.15. src/libs/forms/formfactory.cpp
17.16. src/modelview/html/bridgekeeper.html
17.17. src/modelview/multiview/createModel.cpp
17.18. src/modelview/multiview/multiview.cpp
17.19. src/libs/dataobjects/dataobjecttablemodel.h
17.20. src/modelview/tablemodel/tablemodel.cpp
17.21. src/libs/dataobjects/dataobjecttablemodel.cpp
17.22. src/libs/dataobjects/dataobjecttablemodel.h
17.23. src/libs/dataobjects/dataobjecttablemodel.cpp
17.24. src/libs/dataobjects/dataobjecttablemodel.cpp
17.25. src/libs/dataobjects/dataobjecttablemodel.cpp
17.26. src/modelview/objectbrowser/ObjectBrowserModel.h
17.27. src/modelview/qjots/item.h
17.28. src/modelview/qjots/item.cpp
18.1. src/sql/guimysql/permissions.sql
18.2. src/sql/guimysql/database.cpp
18.3. src/sql/guimysql/table.sql
18.4. src/sql/guimysql/mainwindow.cpp
18.5. src/sql/guimysql/importcommand.cpp
18.6. src/sql/filetagger/mp3db.cpp
18.7. src/mmjbamarok/src/importcommand.cpp
18.8. src/mmjbamarok/src/commands.h
18.9. src/mmjbamarok/src/mmjbamarok.cpp
18.10. src/modelview/database/dbviewapp.cpp
18.11. src/modelview/database/dbviewapp.cpp
19.1. src/enums/enumtst.cpp
19.2. src/mixed-types.cpp
19.3. src/ansicast/m2k.cpp
19.4. src/casts/constcast1.cpp
19.5. src/casts/constcast2.cpp
19.6. src/operators/fraction/fraction-operators.cpp
19.7. src/operators/vect1/vect1.h
19.8. src/operators/vect1/vect1test.cpp
19.9. src/operators/matrix/matrix.h
19.10. src/operators/matrix/matrix.cpp
19.11. src/rtti/dynamic_cast.cpp
19.12. src/pointers/autoptr/qpointer.h
19.13. src/const/cast/const.cc
19.14. src/const/cast/const2.cc
20.1. src/early-examples/decldef/point.h
20.2. src/early-examples/decldef/point.cpp
20.3. Global vs File scope
20.4. src/goto/goto.cpp
20.5. src/early-examples/scopex.cpp
20.6. src/storage/storage.cpp
20.7. src/namespace/a.h
20.8. src/namespace/b.h
20.9. src/namespace/namespace1.cc
20.10. src/namespace/namespace2.cc
20.11. src/namespace/namespace3.cc
21.1. src/early-examples/nestedif.cpp
21.2. src/exceptions/example/exceptions.h
21.3. src/exceptions/example/vector.h
21.4. src/exceptions/example/vector.h
21.5. src/exceptions/catch.cpp
21.6. src/exceptions/example/exceptions.cpp
21.7. src/exceptions/throw0/throw0.cpp
21.8. src/exceptions/throw2/throw2.cpp
21.9. src/exceptions/registrar/registrar.h
21.10. src/exceptions/registrar/exceptions.h
21.11. src/exceptions/registrar/registrar.cpp
21.12. src/exceptions/registrar/registrarClientCode.cpp
22.1. src/pointers/pathology/pathologydecls1.cpp
22.2. src/pointers/pathology/pathologydecls2.cpp
22.3. src/pointers/pathology/pathologydemo1.cpp
22.4. src/arrays/pointerArith.cpp
22.5. src/arrays/returningpointers.cpp
22.6. src/arrays/pointerIndex.cpp
22.7. src/newfailure/bad-alloc1.cpp
22.8. src/newfailure/setnewhandler.cpp
22.9. src/newfailure/bad-alloc2.cpp
22.10. src/newfailure/nullchecking.cpp
23.1. src/derivation/typeid/vtable.h
23.2. src/derivation/typeid/vtable.cpp
23.3. src/derivation/assigcopy/bank.h
23.4. src/derivation/assigcopy/bank.cpp
23.5. src/derivation/assigcopy/bank.cpp
23.6. src/multinheritance/window.h
23.7. src/multinheritance/window.cpp
23.8. src/multinheritance/people.h
23.9. src/privatederiv/stack.h
23.10. src/privatederiv/stack-test.cpp
24.1. ../src/libs/filetagger/mp3song.h
24.2. filetagger-examplefiles/test-winamp-playlist.m3u
24.3. ../src/libs/filetagger/filetagger.sql
C.1. src/preprocessor/constraintmap.h
C.2. src/preprocessor/constraintmap.cpp
C.3. linker-invocation.txt
C.4. src/debugging/wrongdelete.cpp
C.5. src/debugging/valgrind-test.cpp
E.1. src/libs/utils/filevisitor.h
E.2. src/libs/utils/filevisitor.cpp
E.3. src/visitor/codevisitor/codevisitor.h
E.4. src/visitor/codevisitor/codevisitor-test.cpp
E.5. src/qonsole/keyevents/qonsole.cpp