Jasmin blanchette, mark summerfield GUI programming with QT 4 (2nd edition) kho tài liệu bách khoa

1.2K 218 0
Jasmin blanchette, mark summerfield   GUI programming with QT 4 (2nd edition) kho tài liệu bách khoa

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

C++ GUI Programming with Qt 4, Second Edition by Jasmin Blanchette; Mark Summerfield Publisher: Prentice Hall Pub Date: February 04, 2008 Print ISBN-10: 0-13-235416-0 Print ISBN-13: 978-0-13-235416-5 eText ISBN-10: 0-13-714397-4 eText ISBN-13: 978-0-13714397-9 Pages: 752 Table of Contents | Index Overview The Only Official, Best-Practice Guide to Qt 4.3 Programming Using Trolltech's Qt you can build industrial-strength C++ applications that run natively on Windows, Linux/Unix, Mac OS X, and embedded Linux without source code changes Now, two Trolltech insiders have written a start-to-finish guide to getting outstanding results with the latest version of Qt: Qt 4.3 Packed with realistic examples and in-depth advice, this is the book Trolltech uses to teach Qt to its own new hires Extensively revised and expanded, it reveals today's best Qt programming patterns for everything from implementing model/view architecture to using Qt 4.3's improved graphics support You'll find proven solutions for virtually every GUI development task, as well as sophisticated techniques for providing database access, integrating XML, using subclassing, composition, and more Whether you're new to Qt or upgrading from an older version, this book can help you accomplish everything that Qt 4.3 makes possible Completely updated throughout, with significant new coverage of databases, XML, and Qtopia embedded programming Covers all Qt 4.2/4.3 changes, including Windows Vista support, native CSS support for widget styling, and SVG file generation Contains separate 2D and 3D chapters, coverage of Qt 4.3's new graphics view classes, and an introduction to QPainter's OpenGL back-end Includes new chapters on look-and-feel customization and application scripting Illustrates Qt 4's model/view architecture, plugin support, layout management, event processing, container classes, and much more Presents advanced techniques covered in no other book–from creating plugins to interfacing with native APIs Includes a new appendix on Qt Jambi, the new Java version of Qt C++ GUI Programming with Qt 4, Second Edition by Jasmin Blanchette; Mark Summerfield Publisher: Prentice Hall Pub Date: February 04, 2008 Print ISBN-10: 0-13-235416-0 Print ISBN-13: 978-0-13-235416-5 eText ISBN-10: 0-13-714397-4 eText ISBN-13: 978-0-13714397-9 Pages: 752 Table of Contents | Index Copyright Series Editor's Note Foreword Preface Acknowledgments A Brief History of Qt Part I: Basic Qt Chapter Getting Started Hello Qt Making Connections Laying Out Widgets Using the Reference Documentation Chapter Creating Dialogs Subclassing QDialog Signals and Slots in Depth Rapid Dialog Design Shape-Changing Dialogs Dynamic Dialogs Built-in Widget and Dialog Classes Chapter Creating Main Windows Subclassing QMainWindow Creating Menus and Toolbars Setting Up the Status Bar Implementing the File Menu Using Dialogs Storing Settings Multiple Documents Splash Screens Chapter Implementing Application Functionality The Central Widget Subclassing QTableWidget Loading and Saving Implementing the Edit Menu Implementing the Other Menus Subclassing QTableWidgetItem Chapter Creating Custom Widgets Customizing Qt Widgets Subclassing QWidget Integrating Custom Widgets with Qt Designer Double Buffering Part II: Intermediate Qt Chapter Layout Management Laying Out Widgets on a Form Stacked Layouts Splitters Scrolling Areas Dock Windows and Toolbars Multiple Document Interface Chapter Event Processing Reimplementing Event Handlers Installing Event Filters Staying Responsive during Intensive Processing Chapter 2D Graphics Painting with QPainter Coordinate System Transformations High-Quality Rendering with QImage Item-Based Rendering with Graphics View Printing Chapter Drag and Drop Enabling Drag and Drop Supporting Custom Drag Types Clipboard Handling Chapter 10 Item View Classes Using the Item View Convenience Classes Using Predefined Models Implementing Custom Models Implementing Custom Delegates Chapter 11 Container Classes Sequential Containers Associative Containers Generic Algorithms Strings, Byte Arrays, and Variants Chapter 12 Input/Output Reading and Writing Binary Data Reading and Writing Text Traversing Directories Embedding Resources Inter-Process Communication Chapter 13 Databases Connecting and Querying Viewing Tables Editing Records Using Forms Presenting Data in Tabular Forms Chapter 14 Multithreading Creating Threads Synchronizing Threads Communicating with the Main Thread Using Qt's Classes in Secondary Threads Chapter 15 Networking Writing FTP Clients Writing HTTP Clients Writing TCP Client–Server Applications Sending and Receiving UDP Datagrams Chapter 16 XML Reading XML with QXmlStreamReader Reading XML with DOM Reading XML with SAX Writing XML Chapter 17 Providing Online Help Tooltips, Status Tips, and "What's This?" Help Using a Web Browser to Provide Online Help Using QTextBrowser as a Simple Help Engine Using Qt Assistant for Powerful Online Help Part III: Advanced Qt Chapter 18 with Internationalization Working Unicode Making Applications Translation-Aware Dynamic Language Switching Translating Applications Chapter 19 Look and Feel Customization Using Qt Style Sheets Subclassing QStyle Chapter 20 3D Graphics Drawing Using OpenGL Combining OpenGL and QPainter Doing Overlays Using Framebuffer Objects Chapter 21 Creating Plugins Extending Qt with Plugins Making Applications Plugin-Aware Writing Application Plugins Chapter 22 Application Scripting Overview of the ECMAScript Language Extending Qt Applications with Scripts Implementing GUI Extensions Using Scripts Automating Tasks through Scripting Chapter 23 Platform-Specific Features Interfacing with Native APIs Using ActiveX on Windows Handling X11 Session Management Chapter 24 Embedded Programming Getting Started with Qt/Embedded Linux Customizing Qt/Embedded Linux Integrating Qt Applications with Qtopia Using Qtopia APIs Part IV: Appendixes Appendix A Obtaining and Installing Qt A Note on Licensing Installing Qt/Windows Installing Qt/Mac Installing Qt/X11 Appendix B Building Qt Applications Using qmake Using Third-Party Build Tools Appendix C Introduction to Qt Jambi Getting Started with Qt Jambi Using Qt Jambi in the Eclipse IDE Integrating C++ Components with Qt Jambi Appendix D Introduction to C++ for Java and C# Programmers Getting Started with C++ Main Language Differences The Standard C++ Library About the Authors Jasmin Blanchette Mark Summerfield Production Index Copyright In association with Trolltech Press Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests For more information, please contact: U.S Corporate and Government Sales (800) 382-3419 corpsales@pearsontechgroup.com For sales outside the United States, please contact: International Sales international@pearsoned.com Visit us on the Web: www.prenhallprofessional.com Library of Congress Cataloging-in-Publication Data Blanchette, Jasmin C++ GUI programming with Qt / Jasmin Blanchette, Mark Summerfield.-2nd ed p cm Includes index ISBN-13: 978-0-13-235416-5 (hardcover : alk paper) Qt (Electronic resource) Graphical user interfaces (Computer systems) C++ (Computer program language) I Summerfield, Mark II Title QA76.9.U83B532 2008 005.13'3—dc22 2008000243 Copyright © 2008 Trolltech ASA All rights reserved Printed in the United States of America This publication may only be distributed subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is available at http://www.opencontent.org/openpub/) Trolltech®, Qt®, Qtopia®, and the Trolltech and Qtopia logos are registered trademarks of Trolltech ASA ISBN-13: 978-0-13-235416-5 Text printed in the United States on recycled paper at Courier in Westford, Massachusetts First printing, February 2008 Series Editor's Note Dear Reader, As a working programmer, I use Qt every day, and I am really impressed by the organization, design, and power that Qt brings to the C++ programmer While Qt began life as a cross-platform GUI toolkit, it has expanded to include portable facilities for just about every aspect of day-to-day programming: files, processes, networking, and database access, to name just a few Because of Qt's broad applicability, you really can write your code once and just recompile it on a different platform in order to have it work out of the box This is extraordinarily valuable when your customer base requires your product to run on different platforms Of course, because Qt is also available with an open source license, if you're an open source developer, you too can benefit from everything Qt has to offer While Qt comes with extensive online help, that help is primarily reference oriented The example programs are useful, but it can be hard to reverse engineer correct use of Qt for your programs just by reading the examples And that is where this book comes into the picture This is a really neat book First, it's the official book on Qt from Trolltech, which says a lot But it's also a great book: well organized, well written, and easy to follow and learn from The combination of a great book about a great technology makes for a real winner, and that is why I am very proud and excited to have this book in the Prentice Hall Open Source Software Development Series I hope you will enjoy reading this book and that you will learn a lot from it; I certainly did Arnold Robbins Nof Ayalon, Israel November 2007 TSD (thread-specific data) TTF Turkish two-dimensional graphics Type type() QEvent 2nd QVariant typedef keyword TypeError (ECMAScript) typeof operator (ECMAScript) 2nd Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Z] UCS-2 (UTF-16) UDP 2nd 3rd Ui_ classes (Java) UI builder [See Qt Designer.] Ui:: classes 2nd 3rd 4th ui files 2nd 3rd 4th 5th 6th 7th 8th Ui_GoToCellDialogClass (Java) uic 2nd 3rd 4th 5th 6th 7th 8th #undef directives undefined (ECMAScript) 2nd 3rd undefined references [See unresolved symbols.] ungetChar() (QIODevice) Unicode 2nd 3rd 4th 5th 6th 7th 8th unicode() (QChar) uniform resource identifiers (URIs) uniform resource locators (URLs) 2nd Unit Converter example universal binaries (Mac OS X) Unix 2nd unix condition (.pro files) unlock() QMutex 2nd QReadWriteLock unordered associative containers [See hashes.] unpolish() BronzeStyle QStyle 2nd -unregserver option (ActiveX servers) unresolved symbols 2nd 3rd 4th unsetCursor() (QWidget) unsigned keyword untitled documents UPDATE statements (SQL) update() QGraphicsItem 2nd QWidget 2nd 3rd 4th 5th 6th 7th 8th 9th 10th updateActions() (DiagramWindow) updateEmployeeView() (MainForm) updateGeometry() (QWidget) 2nd updateGL() (QGLWidget) 2nd updateOutputTextEdit() (ConvertDialog) updateRecentFileActions() (MainWindow) updateRubberBandRegion() (Plotter) updateStatusBar() (MainWindow) updateTableWidget() (TripPlanner) updateWindowTitle() (HelpBrowser) UppercaseBase (QTextStream) UppercaseDigits (QTextStream) uppercasedigits manipulator URIError (ECMAScript) URIs URLs 2nd urls() (QMimeData) 2nd user actions 2nd 3rd 4th user interface compiler (uic) 2nd 3rd 4th 5th UserRole (Qt) using declarations using namespace directives UTF-8 2nd 3rd 4th 5th UTF-16 (UCS-2) 2nd Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Z] Valgrind validate() QAbstractSpinBox QValidator validating XML parsers 2nd validators 2nd value() Cell Java-style iterators 2nd QMap QSettings QSqlQuery QSqlRecord STL-style iterators value() (QVariant) 2nd 3rd value binding (SQL) valueChanged() QAbstractSlider QSpinBox valueFromText() (HexSpinBox) valueOf() (ECMAScript) values() (associative containers) 2nd value types 2nd 3rd var keyword (ECMAScript) variable-length arrays VARIANT (Windows) VARIANT_BOOL (Windows) variants 2nd 3rd 4th 5th 6th 7th vector (std) vector paths [See QPainterPath.] vectors 2nd VerPattern (Qt) version of data stream 2nd 3rd 4th 5th of operating system of Qt 2nd 3rd 4th of style options VERSION entry (.pro files) verticalHeader() (QTableView) vertical layouts 2nd 3rd verticalScrollBar() (QAbstractScrollArea) 2nd video display (Linux) Vietnamese viewport of a painter 2nd 3rd of a scroll area 2nd 3rd viewport coordinates viewport() (QAbstractScrollArea) 2nd 3rd views [See item views; graphics view classes.] virtual destructors 2nd virtual framebuffer 2nd 3rd virtual functions 2nd 3rd virtual machines visible widgets 2nd 3rd Vista style 2nd 3rd Visual Basic Visual C++ (MSVC) 2nd 3rd 4th 5th Visual Studio 2nd 3rd visualRect() (QStyle) VNC (Virtual Network Computing) void pointers 2nd 3rd volatile keyword VowelCube class definition VowelCube() ~VowelCube() createGLObject() createGradient() drawBackground() drawCube() drawLegend() 2nd paintEvent() 2nd wheelEvent() Vowel Cube example vproj files Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Z] W3C WA_DeleteOnClose (Qt) 2nd 3rd 4th WA_GroupLeader (Qt) WA_Hover (Qt) WA_PaintOnScreen (Qt) WA_StaticContents (Qt) 2nd wait() QThread 2nd QWaitCondition wait conditions waitconditions example wait cursor waitForDisconnected() (QAbstractSocket) waitForFinished() (QProcess) 2nd waitForStarted() (QProcess) wakeAll() (QWaitCondition) wakeOne() (QWaitCondition) warning() (QMessageBox) 2nd warnings (compiler) 2nd wasCanceled() (QProgressDialog) WeatherBalloon Weather Balloon example WeatherStation class definition processPendingDatagrams() WeatherStation() Weather Station example 2nd web browsers 2nd What's This? 2nd whatsThis() (IconEditorPlugin) WhatsThisRole (Qt) wheelEvent() CityView Plotter VowelCube WHERE clause (SQL) whitespace widget stacks [See stacked widgets.] widget styles widgets attributes background 2nd 3rd built-in 2nd 3rd coordinate system custom disabled 2nd 3rd dynamic properties 2nd 3rd fixed size focus policy geometry hidden 2nd 3rd in multithreaded applications minimum and maximum size 2nd names 2nd OpenGL palette 2nd parent–child mechanism 2nd 3rd platform-specific ID properties 2nd 3rd 4th 5th 6th 7th 8th 9th reparenting 2nd 3rd size hint 2nd 3rd 4th 5th 6th 7th size policy 2nd 3rd styles 2nd 3rd 4th [See also objects; windows.] width() (QPaintDevice) 2nd wildcard patterns 2nd 3rd Win32 API 2nd win32 condition (.pro files) winEvent() (QWidget) winEventFilter() (QApplication) winId() (QWidget) 2nd Window (X11) window managers windowMenuAction() (Editor) Window menus (MDI) 2nd windowModified property (QWidget) 2nd 3rd 4th windows active 2nd 3rd closing 2nd decorations icon MDI children of painters 2nd 3rd platform-specific ID title bar 2nd 3rd [See also widgets.] Windows (Microsoft) 12xx encodings CE hibernation installing Qt Media Player native APIs registry version widget styles 2nd 3rd 4th WindowsVersion (QSysInfo) WINSAMI2 wizards 2nd workspaces [See MDI.] world transform 2nd World Wide Web Consortium wrappedFilter() (PumpFilterPrototype) write() (QIODevice) 2nd 3rd writeAttribute() (QXmlStreamWriter) writeDatagram() (QUdpSocket) 2nd writeEndElement() (QXmlStreamWriter) writeFile() (Spreadsheet) 2nd 3rd writeIndexEntry() WriteOnly (QIODevice) 2nd writeRawBytes() (QDataStream) writeSettings() MailClient MainWindow 2nd writeStartDocument() (QXmlStreamWriter) writeStartElement() (QXmlStreamWriter) writeTextElement() (QXmlStreamWriter) writeXml() writing systems Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Z] X Render extension 2nd X Window System (X11) installing Qt native APIs selection clipboard session management x11Event() (QWidget) x11EventFilter() (QApplication) x11Info() QPixmap QWidget x11PictureHandle() QPixmap QWidget x11Screen() (QCursor) XBM Xcode 2nd 3rd XEvent (X11) Xlib XML encodings for Qt Jambi generator qrc files 2nd reading documents ts files ui files validation 2nd writing documents XML Stream Reader (example) class definition XmlStreamReader() readBookindexElement() readEntryElement() readFile() readPageElement() skipUnknownElement() XML Stream Writer (example) Xor (composition mode) XP style 2nd 3rd XPath -xplatform option (configure) XPM 2nd XQuery xsm Xt migration Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Z] zero timers 2nd zlib [See data compression.] zoomIn() (Plotter) zoomOut() (Plotter) ... Prentice Hall Pub Date: February 04, 2008 Print ISBN-10: 0-1 3-2 3 541 6-0 Print ISBN-13: 97 8-0 -1 3-2 3 541 6-5 eText ISBN-10: 0-1 3-7 143 9 7 -4 eText ISBN-13: 97 8-0 -1 37 143 9 7-9 Pages: 752 Table of Contents... Cataloging-in-Publication Data Blanchette, Jasmin C++ GUI programming with Qt / Jasmin Blanchette, Mark Summerfield. -2 nd ed p cm Includes index ISBN-13: 97 8-0 -1 3-2 3 541 6-5 (hardcover : alk paper) Qt. .. plugins to interfacing with native APIs Includes a new appendix on Qt Jambi, the new Java version of Qt C++ GUI Programming with Qt 4, Second Edition by Jasmin Blanchette; Mark Summerfield Publisher:

Ngày đăng: 16/11/2019, 20:55

Từ khóa liên quan

Mục lục

  • C++ GUI Programming with Qt 4, Second Edition - Graphically Rich Book

  • Table of Contents

  • Copyright

  • Series Editor's Note

  • Foreword

  • Preface

  • Acknowledgments

  • A Brief History of Qt

  • Part I: Basic Qt

    • Chapter 1. Getting Started

      • Hello Qt

      • Making Connections

      • Laying Out Widgets

      • Using the Reference Documentation

      • Chapter 2. Creating Dialogs

        • Subclassing QDialog

        • Signals and Slots in Depth

        • Rapid Dialog Design

        • Shape-Changing Dialogs

        • Dynamic Dialogs

        • Built-in Widget and Dialog Classes

        • Chapter 3. Creating Main Windows

          • Subclassing QMainWindow

          • Creating Menus and Toolbars

Tài liệu cùng người dùng

Tài liệu liên quan