advanced qt programming createing great software with c++ and qt4 - Mark summerfield

554 642 1
  • Loading ...
1/554 trang
Tải xuống

Thông tin tài liệu

Ngày đăng: 19/03/2014, 14:10

Đây là quyển sách tiếng anh về lĩnh vực công nghệ thông tin cho sinh viên và những ai có đam mê. Quyển sách này trình về lý thuyết ,phương pháp lập trình cho ngôn ngữ C và C++. ptg From the Library of Wow! eBookptgAdvanced Qt Programming From the Library of Wow! eBookptgThis page intentionally left blank From the Library of Wow! eBookptgAdvanced Qt ProgrammingCreating Great Software with C+ + and Qt 4Mark SummerfieldUpper Saddle River, NJ·Boston·Indianapolis·San Franciscop New York·Toronto·Montreal·London·Munich·Paris·Madrid pCapetown·Sydney·Tokyo·Singapore·Mexico City From the Library of Wow! eBookptgMany 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 author 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.comFor sales outside the United States, please contact: International Sales international@pearsoned.comVisit us on the Web: informit.com/awLibrary of Congress Cataloging-in-Publication DataSummerfield, Mark. Advanced Qt programming : creating great software with C++ and Qt 4 / Mark Summerfield. p.mcm. Includes bibliographical references and index. ISBN 978-0-321-63590-7 (hardcover : alk. paper)1. Qt (Electronic resource) 2. Graphical user interfaces (Computer systems) 3. C++ (Computer program language) I. Title. QA76.9.U83S88 2010 005.1’13—dc222010019289Copyright ©2011 Qtrac Ltd.All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to:Pearson Education, Inc.Rights and Contracts Department 501 Boylston Street, Suite 900 Boston, MA 02116 Fax: (617) 671-3447ISBN-13: 978-0-321-63590-7ISBN-10: 0-321-63590-6Text printed in the United States on recycled paper at Courier in Westford, Massachusetts. First printing, July 2010 From the Library of Wow! eBookptgThis book is dedicated toAnna Rebecca Paterson From the Library of Wow! eBookptgThis page intentionally left blank From the Library of Wow! eBookptgContents at a GlanceList of Tables. xiiiForeword. xvIntroduction. 1Chapter 1. Hybrid Desktop/Internet Applications 5Chapter 2. Audio and Video 53Chapter 3. Model/View Table Models 87Chapter 4. Model/View Tree Models 129Chapter 5. Model/View Delegates. 185Chapter 6. Model/View Views 207Chapter 7. Threading with QtConcurrent. 245Chapter 8. Threading with QThread. 287Chapter 9. Creating Rich Text Editors 317Chapter 10. Creating Rich Text Documents. 359Chapter 11. Creating Graphics/View Windows 389Chapter 12. Creating Graphics/View Scenes. 409Chapter 13. The Animation and State Machine Frameworks 469Epilogue. 491Selected Bibliography. 495Index. 499www.qtrac.eu/aqpbook.htmlvii From the Library of Wow! eBookptgThis page intentionally left blank From the Library of Wow! eBookptgContentsList of Tables. xiiiForeword. xvIntroduction. 1Acknowledgements . 3Chapter 1.Hybrid Desktop/Internet Applications.5Internet-Aware Widgets .6Using WebKit . 21A Generic Web Browser Window Component 22Creating Web Site-Specific Applications . 30Embedding Qt Widgets in Web Pages 44Chapter 2.Audio and Video 53Using QSound and QMovie 54The Phonon Multimedia Framework . 60Playing Music . 64Playing Videos 80Chapter 3.Model/View Table Models. 87Qt’s Model/View Architecture . 88Using QStandardItemModels for Tables . 90Changing a Table Model through the User Interface . 91A QStandardItemModel Subclass for Tables 102A QSortFilterProxyModel to Filter Out Duplicate Rows . 107A QSortFilterProxyModel to Filter In Wanted Rows 109Creating Custom Table Models . 113Changing a Table Model through the User Interface . 113A Custom QAbstr actTableModel Su bclass for Tables . 116The QAbstractItemModel API Methods for Tables . 117Methods to Support Saving and Loading Table Items . . . 126ix From the Library of Wow! eBook[...]... to make them easy to reuse, and they are all introduced in the rst couple of chapters, and then used throughout the book All the examplesexcept for those in the last chapter which use Qt 4.6-specic featureshave been tested with Qt 4.5 and Qt 4.6 on Linux, Mac OS X, and Windows Applications built using Qt 4.5 will run unchanged with Qt 4.6, and later Qt 4.x versions, because Qt maintains backward compatibility... purely on Qt 4.5 and Qt 4.6, so there is no explicit coverage of backporting The book shows best Qt 4.6 practices, and despite Qt 4.6s numerous new features compared with Qt 4.5, this makes few differences to the code One trivial difference is that Qt 4.6 has a shortcut for the quit action and Qt 4.5 hasnt; the source code uses the shortcut for Qt 4.6 and has equivalent code for Qt 4.5 by using #if QT_ VERSION... result was a great book about Qt, which has since been updated and expanded Mark has now completed another important project A good book on advanced Qt programming has been missing in the arsenal of Qt programmers Im very happy that Mark has written one He is a fantastic technical writer with all the necessary background to write authoritatively about Qt programming His focus on detail and ability to... of webenabled mobile phones and small form-factor netbook and smartbook computersnot to mention the Google Docs le storeand the zero-deployment costs of web-based applications might lead us to believe that desktop applications are dinosaurs that dont yet know theyre extinct But before we abandon C++ and Qt and switch to web programming and the subtle pleasures of JavaScript and HTML, it is worth reecting... another friend, Jasmin Blanchette, also an ex-senior software engineer at Qt Development Frameworks, coauthor with me of the C++ GUI Programming with Qt 4 book, and now researching for a PhD at the Technische Universitọt Mỹnchen We both came up with the idea for this book some time ago, and it is only due to pressure of work that he has been an excellentand demandingreviewer, rather than coauthor I would... between the two Qt versions, the book shows and explains the Qt 4.6-specic approach, while the source code uses #if QT_ VERSION so that the code compiles with either version with the best practices used for each A few examples may work with earlier Qt 4.x versions, particularly Qt 4.4, and some examples could be backported to From the Library of Wow! eBook Introduction 3 an earlier Qt versionhowever,... and web programming, and the threading chapters assume a basic understanding of threading and Qts threading classes All these assumptions mean that this book can avoid ex- C++ GUI Programming with Qt 4, Second Edition, by Jasmin Blanchette and this author, ISBN 0132354160 1 From the Library of Wow! eBook 2 Introduction plaining many details and classes that are already familiar to Qt programmers, such... President of Trolltech and Mark Summereld, the head of documentation, came into my ofce He wanted to write a book about Qt together with Jasmin Blanchette A really good book, written by someone with intimate knowledge of the product and with a passion for explaining things clearly and intuitively Who was better t for the task than the head of Qt documentation, together with one of the best Qt developers? The... Creating QTextDocuments Creating QTextDocuments with HTML Creating QTextDocuments with QTextCursor Exporting and Printing Documents Exporting QTextDocuments Exporting in PDF and PostScript Format Exporting in Open Document Format Exporting in HTML Format Exporting in SVG Format Exporting in Pixmap Formats Printing and Previewing QTextDocuments... to help Qt programmers deepen and broaden their Qt knowledge and to increase the repertoire of what they can achieve using Qt The advanced aspect often refers more to what you will be able to achieve than to the means of achieving it This is becauseas alwaysQt insulates us as far as possible from irrelevant detail and underlying complexity to provide easy-to-use APIs that we can use simply and directly
- Xem thêm -

Xem thêm: advanced qt programming createing great software with c++ and qt4 - Mark summerfield , advanced qt programming createing great software with c++ and qt4 - Mark summerfield , advanced qt programming createing great software with c++ and qt4 - Mark summerfield , Chapter 9. Creating Rich Text Editors, Chapter 10. Creating Rich Text Documents, Chapter 13. The Animation and State Machine Frameworks

Từ khóa liên quan

Mục lục

Xem thêm

Gợi ý tài liệu liên quan cho bạn

Nhận lời giải ngay chưa đến 10 phút Đăng bài tập ngay