SlideShare una empresa de Scribd logo
1 de 88
Descargar para leer sin conexión
Qt tales from the embedded
trenches
Cabledogs (savago, igolivei)
2011
About us




  Adenilson Cavalcanti (Savago): KDE-pim, KDE-Plasma, IMTK, libgcal,
  amora
  Igor Trindade Oliveira (igolive): KDE-pim, KDE-plasma, Gallium
Structure




  A problem is given
  A solution is proposed
  Discussion
Topics

1 Kinectic scrolling pain

2 Meego UI without libmeegotouch?

3 Sliding Widgets

4 JSON parsing

5 D-BUS

6 Responsiveness

7 Symbian on Linux
Kinetic Scrolling
Kinetic example: iPhone 2007
Prior art?
Bill Buxton: Two-handed input in HCI, 1982
Canola 2007
etc
Prior art?
Bill Buxton: Two-handed input in HCI, 1982
Canola 2007
etc
Prior art?
Bill Buxton: Two-handed input in HCI, 1982
Canola 2007
etc
Prior art?
Bill Buxton: Two-handed input in HCI, 1982
Canola 2007
etc
A personal favorite: Canola 2007
What about Qt? flickable 2008
How scrolling works?
How kinetic scrolling works?




Displacement is defined in factor of:
    attenuation given by Easing curve
    time elapsed between the drag event
    other factors (e.g. friction, etc)
    optimizations: clipping, lazy loading, ring buffer, snapshots, etc
Demo time
C++: toyflick
QML
Looking at the pros
Currently known Qt-based
implementations


  Ariya’s Flickable 2008
  toyflick 2009
  Plasma ScrollWidget 2009
  IMTK ImtkKinecticListView 2010
  QML Flickable 2010
Meego UI without
libmeegotouch?
Meego app




Ok, somewhat old example...
Can it run on Symbian?
Short answer: NOT!
Long answer: it could be ported...
You have 1 day!
Solution: cheat!
Can it run on Symbian?
Short answer: NOT!
Long answer: it could be ported...
You have 1 day!
Solution: cheat!
Can it run on Symbian?
Short answer: NOT!
Long answer: it could be ported...
You have 1 day!
Solution: cheat!
Can it run on Symbian?
Short answer: NOT!
Long answer: it could be ported...
You have 1 day!
Solution: cheat!
Can it run on Symbian?
Short answer: NOT!
Long answer: it could be ported...
You have 1 day!
Solution: cheat!
UI elements
UI elements
UI elements
UI elements
UI elements
Final result
Pure blood Qt runs everywhere!
’Minor’ details: 7 months ago



  Forgot the Buttons...
  Rescalable button backgrounds
  Borders on background
  Centered Icons
  Layouts/sizeHints sometimes are tricky
’Minor’ details: 7 months ago



  Forgot the Buttons...
  Rescalable button backgrounds
  Borders on background
  Centered Icons
  Layouts/sizeHints sometimes are tricky
’Minor’ details: 7 months ago



  Forgot the Buttons...
  Rescalable button backgrounds
  Borders on background
  Centered Icons
  Layouts/sizeHints sometimes are tricky
’Minor’ details: 7 months ago



  Forgot the Buttons...
  Rescalable button backgrounds
  Borders on background
  Centered Icons
  Layouts/sizeHints sometimes are tricky
’Minor’ details: 7 months ago



  Forgot the Buttons...
  Rescalable button backgrounds
  Borders on background
  Centered Icons
  Layouts/sizeHints sometimes are tricky
’Minor’ details: today



   Rescalable button backgrounds: QML BorderImage
   Borders: QML BorderImage
   Centered Icons: maybe Qt components
   Layouts/sizeHints: QML anchors
’Minor’ details: today



   Rescalable button backgrounds: QML BorderImage
   Borders: QML BorderImage
   Centered Icons: maybe Qt components
   Layouts/sizeHints: QML anchors
’Minor’ details: today



   Rescalable button backgrounds: QML BorderImage
   Borders: QML BorderImage
   Centered Icons: maybe Qt components
   Layouts/sizeHints: QML anchors
’Minor’ details: today



   Rescalable button backgrounds: QML BorderImage
   Borders: QML BorderImage
   Centered Icons: maybe Qt components
   Layouts/sizeHints: QML anchors
Demo time
C++: frame
Animated layout items
Sliding widgets
Example: iPhone contact list
How to do it?
step1: have a specialized layout
step2: put widget side by side
step3: make both visible...
step4: animate!
step5: hide the old widget
Demo time
C++: slider
’Minor’ details: 7 months ago



  QGraphicsLayout is not a QObject
  Multiple heritance is nasty!
  Parenting issues of widgets
  No documentation, of course...
’Minor’ details: 7 months ago



  QGraphicsLayout is not a QObject
  Multiple heritance is nasty!
  Parenting issues of widgets
  No documentation, of course...
’Minor’ details: 7 months ago



  QGraphicsLayout is not a QObject
  Multiple heritance is nasty!
  Parenting issues of widgets
  No documentation, of course...
’Minor’ details: 7 months ago



  QGraphicsLayout is not a QObject
  Multiple heritance is nasty!
  Parenting issues of widgets
  No documentation, of course...
’Minor’ details: today




   Qt Components has PageStack
JSON parsing
Qt doesn’t parse JSON?
Qt doesn’t parse JSON?




         SAY WHAAAT!!?
Solution: QJSON



  Really easy to use
  Tested on embedded platforms
  License is LGPL
  Use it. Really.
Solution: QJSON



  Really easy to use
  Tested on embedded platforms
  License is LGPL
  Use it. Really.
Solution: QJSON



  Really easy to use
  Tested on embedded platforms
  License is LGPL
  Use it. Really.
Solution: QJSON



  Really easy to use
  Tested on embedded platforms
  License is LGPL
  Use it. Really.
D-BUS
The-BUS
Rules of thumb



  Small batches of items
  Marshalling/de-marshall: operator<<
  Your item must be a QObject
  D-Feet is your friend
Rules of thumb



  Small batches of items
  Marshalling/de-marshall: operator<<
  Your item must be a QObject
  D-Feet is your friend
Rules of thumb



  Small batches of items
  Marshalling/de-marshall: operator<<
  Your item must be a QObject
  D-Feet is your friend
Rules of thumb



  Small batches of items
  Marshalling/de-marshall: operator<<
  Your item must be a QObject
  D-Feet is your friend
Responsiveness
Responsiveness
Simple! Threads!
Why sometimes is a bad idea...




  Hard to debug
  Resource consumption
  Embedded limitations
Why sometimes is a bad idea...




  Hard to debug
  Resource consumption
  Embedded limitations
Why sometimes is a bad idea...




  Hard to debug
  Resource consumption
  Embedded limitations
"Are for people who can’t use state
machines."




   Solution: Divide and conquer
"Are for people who can’t use state
machines."




   Solution: Divide and conquer
Demo time
D-BUS server
JSON data
QML UI
Symbian: Can Tux sing the
         Blues?
Symbian?
Yes!
Demo time
Compiling a shared library
Compiling an app
The end?
Vacations, of course!
Vacations
Vacations
Vacations
Vacations
By the way...
Thanks!
E-mail: adenilson.silva@openbossa.org
Site: http://savago.wordpress.com
Site: http://www.openbossa.org.br

Más contenido relacionado

Similar a QtEmbedded

Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015Gregory Starr
 
Smalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneSmalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneEsteban Lorenzano
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistMark Fayngersh
 
Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...Balanced Team
 
From Prototype to Kickstarter to Production: How blink(1) was made
From Prototype to Kickstarter to Production: How blink(1) was madeFrom Prototype to Kickstarter to Production: How blink(1) was made
From Prototype to Kickstarter to Production: How blink(1) was madetodbotdotcom
 
The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196Mahmoud Samir Fayed
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet
 
Qt for beginners part 5 ask the experts
Qt for beginners part 5   ask the expertsQt for beginners part 5   ask the experts
Qt for beginners part 5 ask the expertsICS
 
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in ActionBill Scott
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changesJaewoo Ahn
 
Extending the web: Maps, the commons, and pie
Extending the web: Maps, the commons, and pieExtending the web: Maps, the commons, and pie
Extending the web: Maps, the commons, and pieIgalia
 
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023Pedro Vicente
 
C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem Claudson Oliveira
 
Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy Ambassador Labs
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQueryPaul Bakaus
 
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di PriscoFwdays
 
Scratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry PieScratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry PieESUG
 
For a Social Local and Mobile Drupal
For a Social Local and Mobile DrupalFor a Social Local and Mobile Drupal
For a Social Local and Mobile DrupalAdyax
 

Similar a QtEmbedded (20)

Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015Javascript Animation with Canvas - Gregory Starr 2015
Javascript Animation with Canvas - Gregory Starr 2015
 
Smalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhoneSmalltalk in the pocket - Building applications for the iPhone
Smalltalk in the pocket - Building applications for the iPhone
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
 
Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...
 
From Prototype to Kickstarter to Production: How blink(1) was made
From Prototype to Kickstarter to Production: How blink(1) was madeFrom Prototype to Kickstarter to Production: How blink(1) was made
From Prototype to Kickstarter to Production: How blink(1) was made
 
The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196The Ring programming language version 1.7 book - Part 89 of 196
The Ring programming language version 1.7 book - Part 89 of 196
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
 
Qt for beginners part 5 ask the experts
Qt for beginners part 5   ask the expertsQt for beginners part 5   ask the experts
Qt for beginners part 5 ask the experts
 
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changes
 
Extending the web: Maps, the commons, and pie
Extending the web: Maps, the commons, and pieExtending the web: Maps, the commons, and pie
Extending the web: Maps, the commons, and pie
 
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
 
C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem C# .NET - Um overview da linguagem
C# .NET - Um overview da linguagem
 
Enabling Lean at Enterprise Scale: Lean Engineering in Action
Enabling Lean at Enterprise Scale: Lean Engineering in ActionEnabling Lean at Enterprise Scale: Lean Engineering in Action
Enabling Lean at Enterprise Scale: Lean Engineering in Action
 
Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy Ambassador: Building a Control Plane for Envoy
Ambassador: Building a Control Plane for Envoy
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di Prisco
 
Scratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry PieScratching the itch, making Scratch for the Raspberry Pie
Scratching the itch, making Scratch for the Raspberry Pie
 
AngularJs Crash Course
AngularJs Crash CourseAngularJs Crash Course
AngularJs Crash Course
 
For a Social Local and Mobile Drupal
For a Social Local and Mobile DrupalFor a Social Local and Mobile Drupal
For a Social Local and Mobile Drupal
 

QtEmbedded