An Introduction to Design Patterns in C++ with Qt (Prentice Hall Open Source Software Development) (2ND)

An Introduction to Design Patterns in C++ with Qt (Prentice Hall Open Source Software Development) (2ND)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Hardcover:ハードカバー版/ページ数 734 p.
  • 言語 ENG
  • 商品コード 9780132826457
  • DDC分類 005.133

Full Description


Master C++ "The Qt Way" with Modern Design Patterns and Efficient ReuseThis fully updated, classroom-tested book teaches C++ "The Qt Way," emphasizing design patterns and efficient reuse. Readers will master both the C++ language and Qt libraries, as they learn to develop maintainable software with well-defined code layers and simple, reusable classes and functions.Every chapter of this edition has been improved with new content, better organization, or both. Readers will find extensively revised coverage of QObjects, Reflection, Widgets, Main Windows, Models and Views, Databases, Multi-Threaded Programming, and Reflection. This edition introduces the powerful new Qt Creator IDE; presents new multimedia APIs; and offers extended coverage of Qt Designer and C++ Integration. It has been restructured to help readers start writing software immediately and write robust, effective software sooner.The authors introduce several new design patterns, add many quiz questions and labs, and present more efficient solutions relying on new Qt features and best practices. They also provide an up-to-date C++ reference section and a complete application case study.Master C++ keywords, literals, identifiers, declarations, types, and type conversions. Understand classes and objects, organize them, and describe their interrelationships. Learn consistent programming style and naming rules. Use lists, functions, and other essential techniques. Define inheritance relationships to share code and promote reuse. Learn how code libraries are designed, built, and reused. Work with QObject, the base class underlying much of Qt. Build graphical user interfaces with Qt widgets. Use templates to write generic functions and classes. Master advanced reflective programming techniques. Use the Model-View framework to cleanly separate data and GUI classes. Validate input using regular expressions and other techniques. Parse XML data with SAX, DOM, and QXmlStreamReader. Master today's most valuable creational and structural design patterns. Create, use, monitor, and debug processes and threads. Access databases with Qt's SQL classes. Manage memory reliably and efficiently. Understand how to effectively manage QThreads and use QtConcurrent algorithms.Click here to obtain supplementary materials for this book.

Contents

Foreword xvPreface xixPreface to the Second Edition xxiiAcknowledgments xxvAbout the Authors xxxPart I: Design Patterns and Qt 4 1Chapter 1: C++ Introduction 31.1 Overview of C++ 31.2 A Brief History of C++ 41.3 C++ First Example 51.4 Standard Input and Output 81.5 Introduction to Functions 111.6 qmake, Project Files, and Makefile 171.7 Getting Help Online 241.8 Strings 241.9 Streams 261.10 File Streams 291.11 Qt Dialogs for User Input/Output 341.12 Identifiers, Types, and Literals 371.13 C++ Simple Types 401.14 The Keyword const 521.15 Pointers and Memory Access 541.16 Reference Variables 601.17 const* and *const 611.18 Review Questions 64Chapter 2: Top of the class 672.1 First, There Was struct 672.2 Class Definitions 692.3 Member Access Specifiers 712.4 Encapsulation 742.5 Introduction to UML 752.6 Friends of a Class 762.7 Constructors 772.8 Destructors 802.9 The Keyword static 812.10 Class Declarations and Definitions 862.11 Copy Constructors and Assignment Operators 882.12 Conversions 922.13 const Member Functions 952.14 Subobjects 972.15 Exercise: Classes 982.16 Review Questions 108Chapter 3: Introduction to Qt 1133.1 Style Guidelines, Naming Conventions 1143.2 The Qt Core Module 1163.3 QtCreator-An IDE for Qt Programming 1193.4 Exercises: Introduction to Qt 1203.5 Review Questions 121Chapter 4: Lists 1224.1 Introduction to Containers 1224.2 Iterators 1234.3 Relationships 1294.4 Exercise: Relationships 1324.5 Review Questions 134Chapter 5: Functions 1355.1 Overloading Functions 1355.2 Optional Arguments 1385.3 Operator Overloading 1415.4 Parameter Passing by Value 1465.5 Parameter Passing by Reference 1485.6 References to const 1525.7 Function Return Values 1545.8 Returning References from Functions 1545.9 Overloading on const 1555.10 inline Functions 1585.11 Functions with Variable-Length Argument Lists 1625.12 Exercise: Encryption 1645.13 Review Questions 167Chapter 6: Inheritance and Polymorphism 1686.1 Simple Derivation 1686.2 Derivation with Polymorphism 1776.3 Derivation from an Abstract Base Class 1846.4 Inheritance Design 1896.5 Overloading, Hiding, and Overriding 1916.6 Constructors, Destructors, and Copy Assignment Operators 1936.7 Processing Command-Line Arguments 1986.8 Containers 2046.9 Managed Containers, Composites, and Aggregates 2066.10 Containers of Pointers 2106.11 Review Questions 228Chapter 7: Libraries and Design Patterns 2347.1 Building and Reusing Libraries 2367.2 Exercise: Installing Libraries 2447.3 Frameworks and Components 2477.4 Design Patterns 2487.5 Review Questions 257Chapter 8: QObject, QApplication, Signals, and Slots 2598.1 Values and Objects 2638.2 Composite Pattern: Parents and Children 2648.3 QApplication and the Event Loop 2728.4 Q_OBJECT and moc: A checklist 2748.5 Signals and Slots 2758.6 QObject Lifecycle 2778.7 QTestLib 2778.8 Exercises: QObject, QApplication, Signals, and Slots 2828.9 Review Questions 282Chapter 9: Widgets and Designer 2839.1 Widget Categories 2849.2 Designer Introduction 2869.3 Dialogs 2909.4 Form Layout 2929.5 Icons, Images, and Resources 2959.6 Layout of Widgets 2989.7 Designer Integration with Code 3069.8 Exercise: Input Forms 3139.9 The Event Loop: Revisited 3149.10 Paint Events, Drawing Images 3239.11 Review Questions 325Chapter 10: Main Windows and Actions 32610.1 QActions, QMenus, and QMenuBars 32710.2 Regions and QDockWidgets 33710.3 QSettings: Saving and Restoring Application State 33910.4 Clipboard and Data Transfer Operations 34110.5 The Command Pattern 34310.6 tr() and Internationalization 35110.7 Exercises: Main Windows and Actions 35210.8 Review Questions 353Chapter 11: Generics and Containers 35511.1 Generics and Templates 35511.2 Generics, Algorithms, and Operators 36211.3 Sorted Map Example 36511.4 Function Pointers and Functors 36811.5 Flyweight Pattern: Implicitly Shared Classes 37111.6 Exercise: Generics 37511.7 Review Questions 376Chapter 12: Meta Objects, Properties, and Reflective Programming 37812.1 QMetaObject-The MetaObject Pattern 37812.2 Type Identification and qobject_cast 38012.3 Q_PROPERTY Macro-Describing QObject Properties 38312.4 QVariant Class: Accessing Properties 38612.5 Dynamic Properties 38912.6 MetaTypes, Declaring, and Registering 39412.7 invokeMethod() 39612.8 Exercises: Reflection 39712.9 Review Questions 397Chapter 13: Models and Views 39913.1 Model-View-Controller (MVC) 40013.2 Qt Models and Views 40213.3 Table Models 41413.4 Tree Models 42413.5 Smarter Pointers 42913.6 Exercises: Models and Views 43113.7 Review Questions 433Chapter 14: Validation and Regular Expressions 43414.1 Input Masks 43514.2 Validators 43814.3 Regular Expressions 44014.4 Regular Expression Validation 44914.5 Subclassing QValidator 45114.6 Exercises: Validation and Regular Expressions 45414.7 Review Questions 456Chapter 15: Parsing XML 45715.1 The Qt XML Parsers 46015.2 SAX Parsing 46215.3 XML, Tree Structures, and DOM 46615.4 XML Streams 47615.5 Review Questions 479Chapter 16: More Design Patterns 48116.1 Creational Patterns 48116.2 Memento Pattern 49116.3 Facade Pattern 49816.4 Review Questions 505Chapter 17: Concurrency 50617.1 QProcess and Process Control 50617.2 QThread and QtConcurrent 52217.3 Exercises: QThread and QtConcurrent 53617.4 Review Questions 537Chapter 18: Database Programming 53918.1 QSqlDatabase: Connecting to SQL from Qt 54118.2 Queries and Result Sets 54618.3 Database Models 54818.4 Review Questions 549Part II: C++ Language Reference 550Chapter 19: Types and Expressions 55219.1 Operators 55319.2 Statements and Control Structures 55719.3 Evaluation of Logical Expressions 56419.4 Enumerations 56519.5 Signed and Unsigned Integral Types 56719.6 Standard Expression Conversions 57019.7 Explicit Conversions 57419.8 Safer Typecasting Using ANSI C++ Typecasts 57419.9 Overloading Special Operators 58119.10 Runtime Type Identification 58719.11 Member Selection Operators 59019.12 Exercises: Types and Expressions 59219.13 Review Questions 594Chapter 20: Scope and Storage Class 59520.1 Declarations and Definitions 59520.2 Identifier Scope 59720.3 Storage Class 60620.4 Namespaces 61020.5 Review Questions 615Chapter 21: Memory Access 61721.1 Pointer Pathology 61821.2 Further Pointer Pathology with Heap Memory 62021.3 Memory Access Summary 62321.4 Introduction to Arrays 62421.5 Pointer Arithmetic 62621.6 Arrays, Functions, and Return Values 62721.7 Different Kinds of Arrays 62921.8 Valid Pointer Operations 62921.9 Arrays and Memory: Important Points 63221.10 Exercises: Memory Access 63321.11 Review Questions 634Chapter 22: Inheritance in Detail 63522.1 virtual Pointers, virtual Tables 63522.2 Polymorphism and virtual Destructors 63822.3 Multiple Inheritance 64222.4 public, protected, and private Derivation 65022.5 Review Questions 652Part III: Programming Assignments 653Chapter 23: MP3 Jukebox Assignments 65523.1 Phonon/MultiMediaKit Setup 65723.2 Playlist 65723.3 Playlists 65823.4 Source Selector 65923.5 Database Playlists 66123.6 Star Delegates 66123.7 Sorting, Filtering, and Editing Playlists 661Appendix A: C++ Reserved Keywords 662Appendix B: Standard Headers 664Appendix C: Development Tools 666Appendix D: Alan's Quick Start Guide to Debian for Programmers 691Appendix E: C++/Qt Setup 698Bibliography 706Index 709

最近チェックした商品