The Next Generation Qt Item Views

2,959
-1

Published on

The Qt Kinetic project is an initiative to provide powerful frameworks to create dynamic, beautiful graphical user interfaces in Qt. As an extension of this effort, the next generation of Qt's item views framework is being designed with animated user interfaces in mind. This talk will give an introduction to the Item Views NG project and the new architecture that is being proposed.

Presentation by Marius Bugge Monsen held during Qt Developer Days 2009.

http://qt.nokia.com/developer/learning/elearning

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,959
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
80
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

The Next Generation Qt Item Views

  1. 1. Qt Item Views The Next Generation
  2. 2. • Marius Bugge Monsen (mbm) • Qt Developer • Qt Widget Team Lead
  3. 3. Qt Item Views The Next Generation • What is Qt Item Views? • Why a “Next Generation”? • How Does it Work? • Can I Start Using It?
  4. 4. What Is Qt Item Views?
  5. 5. QListView QTableView QTreeView
  6. 6. • QWidget-based • Model-View • Since Qt 4.0
  7. 7. Creative Friday!
  8. 8. Why a “Next Generation”?
  9. 9. ... and why now?
  10. 10. • Lessons Learned • Qt Development • Competition
  11. 11. • Design Lessons • Different views - different use-cases • Eye-candy matters • KISS
  12. 12. • Process Lessons • Be open • Use the API • Encourage others to use the API
  13. 13. • So What Do We Want ?
  14. 14. Shark_food by starstreak007 on flickr
  15. 15. • Features • Fast • Integrated • Hardware Accelerated
  16. 16. • API • Discoverable • Structured • Clear
  17. 17. • Implementation • Simple • Clean • Testable
  18. 18. How Does It Work?
  19. 19. Model View Controller
  20. 20. Data and logic Selection state Presentation Behavior
  21. 21. Data and logic Selection state Presentation Behavior
  22. 22. Data QListModelInterface QListSelectionManager QGraphicsListView QListController Output Input
  23. 23. QListModelInterface vs. QAbstractItemModel
  24. 24. • Optimizable • Maintainable • Expandable
  25. 25. List View Adaptor Tree Model
  26. 26. QListWidgetNG QListDefaultModel QListSelectionManager QGraphicsListView QListController
  27. 27. Graphics View Item View
  28. 28. int main(int argc, char *argv[]) { QApplication app(argc, argv); QListWidgetNG widget; widget.show(); return app.exec(); }
  29. 29. int main(int argc, char *argv[]) { QApplication app(argc, argv); QListWidgetNG widget; widget.controller()->setModel(new MyData(&widget)); widget.show(); return app.exec(); }
  30. 30. Data and logic Selection state QGraphicsListView Behavior
  31. 31. • View or Layout?
  32. 32. View Item
  33. 33. Invisible item Item
  34. 34. Invisible item Item
  35. 35. Invisible item Item
  36. 36. QGraphicsWidget QGraphicsWidget
  37. 37. QPropertyAnimation QGraphicsWidget Position Size Opacity Rotation Scale
  38. 38. Demo
  39. 39. QGraphicsSimpleTextItem QGraphicsLayout Me QGraphicsPixmapItem QGraphicsSvgItem
  40. 40. View Item Me
  41. 41. ‘SUP DAWG YO I HERD U LIKE ITEM VIEWS...
  42. 42. View View
  43. 43. Data and logic Selection state QGraphicsListView Behavior
  44. 44. Data and logic Selection state Behavior
  45. 45. Data and logic Selection state Behavior
  46. 46. Data and logic Selection state PathListView Behavior
  47. 47. int main(int argc, char *argv[]) { QApplication app(argc, argv); QListWidgetNG widget; widget.controller()->setView(new MyPathView); widget.show(); return app.exec(); }
  48. 48. View Item
  49. 49. View Item
  50. 50. Demo
  51. 51. Data and logic Selection state Presentation Behavior
  52. 52. Data and logic Selection state Presentation QListController
  53. 53. Input Events Model Controller
  54. 54. View Input Events Item Controller
  55. 55. View Scrollbar Item Controller
  56. 56. Data and logic Selection state Presentation QListController
  57. 57. Data and logic Selection state Presentation
  58. 58. Data and logic Selection state Presentation
  59. 59. Data and logic Selection state Presentation QKineticListController
  60. 60. int main(int argc, char *argv[]) { QApplication app(argc, argv); QListWidgetNG widget(new QKineticListController); widget.show(); return app.exec(); }
  61. 61. Can I Start Using It?
  62. 62. • Yes
  63. 63. • Yes, but ...
  64. 64. Research!
  65. 65. • Current status • Integrating in existing applications • Profiling and optimizing
  66. 66. • Current status • Missing features • API may change
  67. 67. • Unsolved problem • Data Invalidation
  68. 68. “Don’t expect, inspect!”
  69. 69. http://labs.trolltech.com/page/Projects/Itemview/ItemviewsNG http://qt.gitorious.org/qt-labs/itemviews-ng
  70. 70. Thank you! Questions?

×