Libro QT

 

Embed or link this publication

Description

libro QT

Popular Pages


p. 1



[close]

p. 2

advanced qt programming

[close]

p. 3

this page intentionally left blank

[close]

p. 4

advanced qt programming creating great software with c and qt 4 mark summerfield upper saddle river nj · boston · indianapolis · san francisco p new york · toronto · montreal · london · munich · paris · madrid p capetown · sydney · tokyo · singapore · mexico city

[close]

p. 5

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 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.com for sales outside the united states please contact international sales international@pearsoned.com visit us on the web informit.com/aw library of congress cataloging-in-publication data summerfield 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 dc22 2010019289 copyright © 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-3447 isbn-13 978-0-321-63590-7 isbn-10 0-321-63590-6 text printed in the united states on recycled paper at courier in westford massachusetts first printing july 2010

[close]

p. 6

this book is dedicated to anna rebecca paterson

[close]

p. 7

this page intentionally left blank

[close]

p. 8

contents at a glance list of tables foreword introduction chapter 1 hybrid desktop/internet applications chapter 2 audio and video chapter 3 model/view table models chapter 4 model/view tree models chapter 5 model/view delegates chapter 6 model/view views chapter 7 threading with qtconcurrent chapter 8 threading with qthread chapter 9 creating rich text editors chapter 10 creating rich text documents chapter 11 creating graphics/view windows chapter 12 creating graphics/view scenes chapter 13 the animation and state machine frameworks epilogue selected bibliography index www.qtrac.eu/aqpbook.html xiii xv 1 5 53 87 129 185 207 245 287 317 359 389 409 469 491 495 499 vii

[close]

p. 9

this page intentionally left blank

[close]

p. 10

contents list of tables foreword introduction 1 acknowledgements chapter 1 hybrid desktop/internet applications 5 internet-aware widgets using webkit a generic web browser window component creating web site-specific applications embedding qt widgets in web pages chapter 2 audio and video using qsound and qmovie the phonon multimedia framework playing music playing videos 6 21 22 30 44 53 54 60 64 80 3 xiii xv 87 chapter 3 model/view table models qt s model/view architecture 88 using qstandarditemmodels for tables 90 changing a table model through the user interface 91 a qstandarditemmodel subclass for tables 102 a qsortfilterproxymodel to filter out duplicate rows 107 a qsortfilterproxymodel to filter in wanted rows 109 creating custom table models 113 changing a table model through the user interface 113 a custom qabstracttablemodel subclass for tables 116 the qabstractitemmodel api methods for tables 117 methods to support saving and loading table items 126

[close]

p. 11

chapter 4 model/view tree models using qstandarditemmodels for trees changing a tree model through the user interface a qstandarditem subclass for tree items a qstandarditemmodel subclass for trees creating custom tree models changing a tree model through the user interface a custom item class for tree items a custom qabstractitemmodel subclass for trees the qabstractitemmodel api for trees the qabstractitemmodel api for drag and drop 129 130 131 141 143 151 152 155 158 160 168 methods for saving and loading tree items 180 chapter 5 model/view delegates 185 datatype-specific editors 186 datatype-specific delegates a read­only column or row delegate an editable column or row delegate model-specific delegates chapter 6 model/view views qabstractitemview subclasses model-specific visualizing views the visualizer widget the visualizer s aggregated header widget the visualizer s aggregated view widget chapter 7 threading with qtconcurrent executing functions in threads using qtconcurrent run using qrunnable filtering and mapping in threads using qtconcurrent to filter using qtconcurrent to filter and reduce using qtconcurrent to map chapter 8 threading with qthread 188 188 193 201 207 208 224 225 232 235 245 248 252 257 261 270 277 281

[close]

p. 12

chapter 9 creating rich text editors introducing qtextdocument creating custom text editors completion for line edits and comboboxes completion and syntax highlighting for text editors completion for multi-line editors syntax highlighting a rich text single line editor multi-line rich text editing chapter 10 creating rich text documents exported qtextdocument file quality 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 painting pages painting pdf or postscript painting svg painting pixmaps chapter 11 creating graphics/view windows the graphics/view architecture graphics/view widgets and layouts introducing graphics items chapter 12 creating graphics/view scenes scenes items and actions creating the main window saving loading printing and exporting scenes saving scenes loading scenes xi 317 318 320 320 322 323 336 342 353 359 361 364 364 367 371 372 372 373 374 375 375 376 379 387 387 388 389 390 392 399 409 411 412 415 415 417

[close]

p. 13

printing and exporting scenes manipulating graphics items adding items copying cutting and pasting items manipulating selected items showing and hiding the guideline grid keeping the user interface up to date enhancing qgraphicsview creating a dock widget toolbox creating custom graphics items enhancing qgraphicstextitem graphics item transformations enhancing an existing graphics item creating a custom graphics item from scratch chapter 13 the animation and state machine frameworks introducing the animation framework introducing the state machine framework combining animations and state machines epilogue selected bibliography index 420 423 425 427 430 435 436 439 440 447 447 453 455 459 469 469 474 481 491 495 499 xii

[close]

p. 14

list of tables 1.1 the main webkit classes 1.2 qt s global utility functions 2.1 the main phonon classes 3.1 the qabstractitemmodel api 3.2 the qt itemdatarole enum 3.3 the qt itemflag enum 4.1 the qabstractitemmodel s drag and drop api 5.1 the qstyleditemdelegate api 6.1 the qabstractitemview api 9.1 the qtextcursor api #1 9.2 the qtextcursor api #2 329 9.3 the qtextcursor api #3 330 9.4 the qtextcursor moveoperation enum 334 11.1 the qgraphicsitem api selected methods #1 11.2 the qgraphicsitem api selected methods #2 404 11.3 the qgraphicsitem api selected methods #3 405 11.4 the qgraphicsitem api selected methods #4 406 11.5 the qt itemselectionmode enum 406 11.6 the qgraphicsitem graphicsitemflag enum #1 406 11.7 the qgraphicsitem graphicsitemflag enum #2 407 403 21 46 63 118 119 119 159 194 210 328 xiii

[close]

p. 15

this page intentionally left blank

[close]

Tags

C++, QT

Comments

no comments yet

YOUBLISHER
About
What Others Say
Sitemap
Impressum

PUBLISHERS
Login
Signup
Tutorials
FAQ
Support

BUSINESS
Overview
Advertising
Support

DEVELOPERS
API

LEGAL
Report a Copyright Violation
Copyright FAQ
Terms of Use
Privacy Policy