0
Qt Item Views
  The Next Generation
•   Marius Bugge Monsen (mbm)

•   Qt Developer

•   Qt Widget Team Lead
Qt Item Views
           The Next Generation



• What is Qt Item Views?
• Why a “Next Generation”?
• How Does it Work?
• ...
What Is Qt Item Views?
QListView   QTableView   QTreeView
• QWidget-based
• Model-View
• Since Qt 4.0
Creative Friday!
Why a “Next Generation”?
... and why now?
• Lessons Learned
• Qt Development
• Competition
• Design Lessons
 • Different views - different use-cases
 • Eye-candy matters
 • KISS
• Process Lessons
 • Be open
 • Use the API
 • Encourage others to use the API
• So What Do We Want ?
Shark_food by starstreak007 on flickr
• Features
 • Fast
 • Integrated
 • Hardware Accelerated
• API
 • Discoverable
 • Structured
 • Clear
• Implementation
 • Simple
 • Clean
 • Testable
How Does It Work?
Model


View           Controller
Data and logic
                       Selection state


Presentation              Behavior
Data and logic   Selection state


Presentation        Behavior
Data


QListModelInterface   QListSelectionManager


QGraphicsListView        QListController



    Output               ...
QListModelInterface
        vs.
QAbstractItemModel
• Optimizable
• Maintainable
• Expandable
List View




 Adaptor




Tree Model
QListWidgetNG


QListDefaultModel   QListSelectionManager


QGraphicsListView      QListController
Graphics View



   Item View
int main(int argc, char *argv[])
{
   QApplication app(argc, argv);
   QListWidgetNG widget;
   widget.show();
   return a...
int main(int argc, char *argv[])
{
   QApplication app(argc, argv);
   QListWidgetNG widget;
   widget.controller()->setMo...
Data and logic    Selection state


QGraphicsListView      Behavior
• View or Layout?
View



Item
Invisible item




    Item
Invisible item




    Item
Invisible item




    Item
QGraphicsWidget



  QGraphicsWidget
QPropertyAnimation


                 QGraphicsWidget
Position                                      Size


       Opacity ...
Demo
QGraphicsSimpleTextItem


                                       QGraphicsLayout




                          Me



QGrap...
View




Item




Me
‘SUP DAWG YO I HERD U LIKE ITEM VIEWS...
View



View
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()->setVi...
View



Item
View



Item
Demo
Data and logic   Selection state


Presentation        Behavior
Data and logic   Selection state


Presentation     QListController
Input Events



Model   Controller
View                Input Events



Item   Controller
View                Scrollbar



Item   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);
 ...
Can I Start Using It?
• Yes
• Yes, but ...
Research!
• Current status
 • Integrating in existing applications
 • Profiling and optimizing
• Current status
 • Missing features
 • API may change
• Unsolved problem
 • Data Invalidation
“Don’t expect, inspect!”
http://labs.trolltech.com/page/Projects/Itemview/ItemviewsNG

         http://qt.gitorious.org/qt-labs/itemviews-ng
Thank you!

Questions?
The Next Generation Qt Item Views
The Next Generation Qt Item Views
The Next Generation Qt Item Views
The Next Generation Qt Item Views
The Next Generation Qt Item Views
Upcoming SlideShare
Loading in...5
×

The Next Generation Qt Item Views

2,823

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,823
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
78
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "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?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×