An Introduction to Design Patterns in C++ and Qt 4 (Bruce Perens Open Source) (1ST)

An Introduction to Design Patterns in C++ and Qt 4 (Bruce Perens Open Source) (1ST)

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

Full Description


Learn C++, Patterns, and Qt 4 Cross-Platform DevelopmentMaster 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

Contents

Preface xixAcknowledgments xxiiiRationale for the Book xxvAbout the Authors xxviiPART I: Introduction to C++ and Qt 4 2Chapter 1: C++ Introduction 51.1 Overview of C++ 61.2 A Brief History of C++ 61.3 Setup: Open-Source Platforms 71.4 Setup: Win32 121.5 C++ First Example 121.6 Input and Output 161.7 Identifiers, Types, and Literals 191.8 C++ Simple Types 221.9 C++ Standard Library Strings 301.10 Streams 311.11 The Keyword const 341.12 Pointers and Memory Access 361.13 const* and *const 401.14 Reference Variables 43Points of Departure 44Review Questions 45Chapter 2: Classes 472.1 Structs 482.2 Class Definitions 492.3 Member Access Specifiers 512.4 Encapsulation 542.5 Introduction to UML 542.5.1 UML Relationships 552.6 Friends of a Class 552.7 Constructors 562.8 Subobjects 582.9 Destructors 602.10 The Keyword static 612.11 Copy Constructors and Assignment Operators 642.12 Conversions 672.13 const Member Functions 68Review Questions 79Chapter 3: Introduction to Qt 813.1 Example Project: Using QApplication and QLabel 823.2 Makefile, qmake, and Project Files 833.3 Getting Help Online 893.4 Style Guidelines and Naming Conventions 903.5 The Qt Core Module 913.6 Streams and Dates 91Points of Departure 93Review Questions 94Chapter 4: Lists 954.1 Introduction to Containers 964.2 Iterators 974.3 Relationships 99Points of Departure 102Review Questions 103Chapter 5: Functions 1055.1 Function Declarations 1065.2 Overloading Functions 1075.3 Optional Arguments 1095.4 Operator Overloading 1115.5 Parameter Passing by Value 1165.6 Parameter Passing by Reference 1185.7 References to const 1215.8 Function Return Values 1225.9 Returning References from Functions 1225.10 Overloading on const-ness 1245.11 Inline Functions 1265.12 Inlining versus Macro Expansion 127Review Questions 133Chapter 6: Inheritance and Polymorphism 1356.1 Simple Derivation 1366.2 Derivation with Polymorphism 1426.3 Derivation from an Abstract Base Class 1486.4 Inheritance Design 1526.5 Overloading, Hiding, and Overriding 1546.6 Constructors, Destructors, and Copy Assignment Operators 1556.7 Processing Command-Line Arguments 158Points of Departure 164Review Questions 165PART II: Higher-Level Programming 166Chapter 7: Libraries 1697.1 Code Containers 1707.2 Reusing Other Libraries 1717.3 Organizing Libraries: Dependency Management 1737.4 Installing Libraries: A Lab Exercise 1767.5 Frameworks and Components 178Review Questions 180Chapter 8: Introduction to Design Patterns 1818.1 Iteration and the Visitor Pattern 182Review Questions 190Chapter 9: QObject 1919.1 QObject's Child Managment 1949.2 Composite Pattern: Parents and Children 1969.3 QApplication and the Event Loop 2009.4 Q_OBJECT and moc: A Checklist 2099.5 Values and Objects 2109.6 tr() and Internationalization 211Point of Departure 211Review Questions 212Chapter 10: Generics and Containers 21310.1 Generics and Templates 21410.2 Containers 21910.3 Managed Containers, Composites, and Aggregates 22110.4 Implicitly Shared Classes 22410.5 Generics, Algorithms, and Operators 22510.6 Serializer Pattern 22710.7 Sorted Map Example 229Review Questions 235Chapter 11: Qt GUI Widgets 23711.1 Widget Categories 23911.2 QMainWindow and QSettings 24011.3 Dialogs 24411.4 Images and Resources 24811.5 Layout of Widgets 25111.6 QActions, QMenus, and QMenuBars 26011.7 QActions, QToolbars, and QActionGroups 26211.8 Regions and QDockWidgets 27011.9 Views of a QStringList 272Points of Departure 274Review Questions 275Chapter 12: Concurrency 27712.1 QProcess and Process Control 27812.2 Threads and QThread 29012.3 Summary: QProcess and QThread 303Review Questions 305Chapter 13: Validation and Regular Expressions 30713.1 Validators 30813.2 Regular Expressions 31013.3 Regular Expression Validation 316Review Questions 319Chapter 14: Parsing XML 32114.1 The Qt XML Module 32514.2 Event-Driven Parsing 32514.3 XML, Tree Structures, and DOM 329Review Questions 340Chapter 15: Meta Objects, Properties, and Reflective Programming 34115.1 Anti-patterns 34215.2 QMetaObject: The MetaObject Pattern 34415.3 Type Identification and qobject_cast 34515.4 Q_PROPERTY Macro: Describing QObject Properties 34715.5 QVariant Class: Accessing Properties 35015.6 DataObject: An Extension of QObject 35315.7 Property Containers: PropsMap 355Review Questions 357Chapter 16: More Design Patterns 35916.1 Creational Patterns 36016.2 Serializer Pattern Revisited 37316.3 The Facade Pattern 381Points of Departure 389Review Questions 390Chapter 17: Models and Views 39117.1 M-V-C: What about the Controller? 39217.2 Dynamic Form Models 39317.3 Qt 4 Models and Views 40917.4 Table Models 41117.5 Tree Models 417Review Questions 421Chapter 18: Qt SQL Classes 42318.1 Introduction to MySQL 42418.2 Queries and Result Sets 42718.3 Database Models 429Review Questions 433PART III: C++ Language Reference 434Chapter 19: Types and Expressions 43719.1 Operators 43819.2 Evaluation of Logical Expressions 44319.3 Enumerations 44319.4 Signed and Unsigned Integral Types 44519.5 Standard Expression Conversions 44719.6 Explicit Conversions 44919.7 Safer Typecasting Using ANSI C++ Typecasts 45019.8 Run-Time Type Identification (RTTI) 45419.9 Member Selection Operators 457Point of Departure 458Review Questions 461Chapter 20: Scope and Storage Class 46320.1 Declarations and Definitions 46420.2 Identifier Scope 46520.3 Storage Class 47020.4 Namespaces 473Review Questions 478Chapter 21: Statements and Control Structures 47921.1 Statements 48021.2 Selection Statements 48021.3 Iteration 48321.4 Exceptions 485Review Questions 502Chapter 22: Memory Access 50322.1 Pointer Pathology 50422.2 Further Pointer Pathology with Heap Memory 50622.3 Memory Access Summary 50922.4 Introduction to Arrays 50922.5 Pointer Arithmetic 51022.6 Arrays, Functions, and Return Values 51122.7 Different Kinds of Arrays 51322.8 Valid Pointer Operations 51322.9 What Happens If new Fails? 51522.10 Chapter Summary 519Review Questions 521Chapter 23: Inheritance in Detail 52323.1 Virtual Pointers and Virtual Tables 52423.2 Polymorphism and virtual Destructors 52623.3 Multiple Inheritance 528Point of Departure 53223.4 public, protected, and private Derivation 536Review Questions 539Chapter 24: Miscellaneous Topics 54124.1 Functions with Variable-Length Argument Lists 54224.2 Resource Sharing 543PART IV: Programming Assignments 548Chapter 25: MP3 Jukebox Assignments 55125.1 Data Model: Mp3File 55325.2 Visitor: Generating Playlists 55525.3 Preference: An Enumerated Type 55625.4 Reusing id3lib 55925.5 PlayListModel Serialization 56025.6 Testing Mp3File Related Classes 56125.7 Simple Queries and Filters 56125.8 Mp3PlayerView 56325.9 Models and Views: PlayList 56525.10 Source Selector 56625.11 Persistent Settings 56725.12 Edit Form View for FileTagger 56825.13 Database View 569Points of Departure 571PART V: Appendices 572Appendix A: C++ Reserved Keywords 575Appendix B: Standard Headers 577Appendix C: The Development Environment 579Bibliography 601Index 603

最近チェックした商品