i can see your house from here

Post on 19-May-2015

521 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Joint presentation with Till Adam and Marius Bugge Monsen. The model/view framework is one of the most powerful areas of Qt4, but also one of the most complex. It is elegant in its design, but proves to be difficult to master for many who try in practice. While a lot of effort went into anticipating how developers would use and potentially mis-use this API, real world usage patterns, best practices and common errors turn out to be interestingly deviant. Marius, who was part of the original architecture team behind these classes, and Till, who has taught the concepts to varied audiences and seen a wide range of real world applications of them both in his work on KDEPIM and as a consultant at KDAB, combine their experiences in this presentation to provide a unique joint perspective.

TRANSCRIPT

I can see your house from here

Part 1

7.5 Years

79 Files

32957 Lines Of Code

The Beginning

AuthorClient

DateDescription

Jobs fixed

reggiereggie-piefke2002/12/03 14:43:32nothing yet-

espenrespenr-deimos2002/12/04 19:30:30Added a FileTableModel and changed main to test it.Reads the columns in the astronomy_large.txt backwardsand will reread the file if you edit it. (Just touch it)-

AuthorClient

DateDescription

Jobs fixed

mmonsenmmonsen-elysium2002/12/05 15:37:13QItemModel subclass that implements a directory tree as a data source.-

AuthorClient

DateDescription

Jobs fixed

A Rush of Creativity

2002/12/09

2002/12/13

2002/12/16

2002/12/18

2002/12/20

2003/01/06

2003/01/07

2003/01/09

2003/01/10

2003/01/016

2003/01/24

2003/02/03Last commit by reggie.

2003/03/04espenr releases Qt 3.1.2

Decisions

mmonsenmmonsen-elysium2003/10/23 16:49:51Add QObjectRepository. This is an object pool to avoid new/deletes.Use it on MemModelItems (for testing).-

AuthorClient

DateDescription

Jobs fixed

mmonsenmmonsen-elysium2003/10/26 16:08:11Introduce the alt_ classes.They are the begining of the implementation of item views usingQModelIndex instead of QGenericModelItem.The model items are just too heavy.-

AuthorClient

DateDescription

Jobs fixed

haraldharald-morpork2003/11/11 21:26:08Here we go - first implementation of a database model-

AuthorClient

DateDescription

Jobs fixed

espenrespenr-phobos2004/01/21 11:49:57move new itemviews into qt4 (no they are not finished)-

AuthorClient

DateDescription

Jobs fixed

espenrespenr-phobos2004/02/11 20:06:25changed QGenericItemModel to have roles (Display, Decoration, ToolTipetc) and removed the use of "elements" everywhere.<snipp>-

AuthorClient

DateDescription

Jobs fixed

mmonsenmmonsen-elysium2004/02/25 17:06:16QGenericItemModel -> QAbstractItemModel.-

AuthorClient

DateDescription

Jobs fixed

Complexity

mmonsenmmonsen-elysium2004/05/04 18:22:39Add QPersistentModelIndex.-

AuthorClient

DateDescription

Jobs fixed

rraggirraggi-rabagast2004/07/01 17:13:10Initial implementation of the new Property Editor-

AuthorClient

DateDescription

Jobs fixed

2004/08/21 - 29Akademy 2004

mmonsenmmonsen-onyx2004/08/26 22:17:16Add QProxyModel.The idea is that you can subclass this model and use it for filtering and sorting.-

AuthorClient

DateDescription

Jobs fixed

mmonsenmmonsen-elysium2004/10/22 19:25:11Add a model pointer to QModelIndex.-

AuthorClient

DateDescription

Jobs fixed

Towards the Goal

espenrespenr-phobos2005/02/27 22:31:42branch 4.0 from main-

AuthorClient

DateDescription

Jobs fixed

2005/06/28Qt 4.0 Released!!!

Work Continues

I can see your house from here

Part 2

Marius, Espen, I want your baby

Disclaimer:

the five stages of grief

Denial

Anger

Bargaining

The Mutz Axiom

“the solution to every engineering problem is QProxyModel”

View

Stuff

Model

political correctness proxy

sorting proxy

View

Stuff

Model

sorting proxy

political correctness proxyStuff

Depression

- excessive minimalism

- missing error handling guidance

- hard to make transactional

- hard to implement undo

- tree complexity imposed on the table case

- treacherously public internalId/internalPointer

- unfortunately named QStandardItemModel

- "thou shall not work on foreign indexes" not

enforced (NVI?)

- MVC, but not really

Acceptance

QAbstractItemView

QAbstractItemModel

political correctness proxy

sorting proxy

Controller ModelStuff

View

Image Credits:

Stuck in Customs on flickrMichelle Smorgon on flickr

top related