Upload
marius-bugge-monsen
View
814
Download
2
Embed Size (px)
Citation preview
Qt Item ViewsThe Next Generation
• Marius Bugge Monsen
• Qt Software, Nokia
• Senior SW Engineer
• Lead, Qt Widget Team 2
• What is it?
• Why do we need a “Next Generation”?
• How does it work?
Qt Item Views
List View Table View Tree View
• Experience
• Graphics View
• Animation Framework
• Competition
Creative Friday
Warning:Work in progress!
View Controller
Model
Data and logicSelection state
Presentation Behavior
Data and logic Selection state
Presentation Behavior
QListModelInterface QListSelectionManager
QGraphicsListView QListController
Data
InputOutput
QListSelectionManager
QGraphicsListView QListController
Data
InputOutput
QListWidgetNG
QListSelectionManager
QGraphicsListView QListController
QListWidgetNG
QListDefaultModel QListSelectionManager
QGraphicsListView QListController
int main(int argc, char *argv[]){ QApplication app(argc, argv); QListWidgetNG widget; widget.show(); return app.exec();}
int main(int argc, char *argv[]){ QApplication app(argc, argv); QListWidgetNG widget; widget.controller()->setModel(new MyData(&widget)); widget.show(); return app.exec();}
Data and logic Selection state
QGraphicsListView Behavior
Item
View
Item
Invisible item
Item
Invisible item
Item
Invisible item
QGraphicsWidget
QGraphicsWidget
QGraphicsWidget
QPropertyAnimation
Position
Opacity
Scale
Rotation
Size
Me
QGraphicsSimpleTextItem
QGraphicsPixmapItemQGraphicsSvgItem
QGraphicsLayout
‘SUP DAWG YO I HERD U LIKE ITEM VIEWS...
View
ViewView
Data and logic Selection state
QGraphicsListView Behavior
Data and logic Selection state
Behavior
Data and logic Selection state
Behavior
Data and logic Selection state
PathListView Behavior
int main(int argc, char *argv[]){ QApplication app(argc, argv); QListWidgetNG widget; widget.controller()->setView(new MyPathView); widget.show(); return app.exec();}
Item
View
Item
View
Demo
View or Layout ?
Data and logic Selection state
Presentation Behavior
Data and logic Selection state
Presentation QListController
Item
View Input Events
Controller
Item
View Scrollbar
Controller
Data and logic Selection state
Presentation QListController
Data and logic Selection state
Presentation
Data and logic Selection state
Presentation
Data and logic Selection state
Presentation QKineticListController
int main(int argc, char *argv[]){ QApplication app(argc, argv); QListWidgetNG widget(new QKineticListController); widget.show(); return app.exec();}
Demo
http://labs.trolltech.com/page/Projects/Itemview/ItemviewsNG
Thank you!
Questions?