SlideShare une entreprise Scribd logo
1  sur  31
Animation Framework
                            3/4/2010
A step towards modern UIs
Leonardo Sobral Cunha


• AA troll
   – widgets team

• before, 3 years in INdT
   – Nokia Technology Institute in Brazil

   – various projects on embedded
       • maemo: Canola, QEdje

       • together with a big team of designers




                                                 1
Thierry Bastian


• Software engineer

• Moved to Oslo in 2006

• Member of the widget team

• Participations in
   – Animation API

   – Multimedia Framework




                              2
Animation Agenda


• Introduction

• Architecture

• Usage
   – QGraphicsView

   – States & Transitions

• Conclusion




                            3
Introduction: animations in Qt < 4.6


• What do we have today in Qt?
   – QTimer / QTimeLine

   – QGraphicsItemAnimation

   – QMainWindow

   – Different animations in the QStyles

   – ...




                                           4
Introduction: why?


              “Simplify the creation of dynamic UIs

         by improving the support for animations in Qt”




• New feature of Qt 4.6
   – part of Qt Kinetic




                                                          5
Introduction: what is it all about?


• Goals
   – Good API

   – Simplify animations

   – Focus on performance

• Animates
   – QWidgets (QObjects)

   – QGraphicsItems




                                      6
Animation Agenda


• Introduction

• Architecture

• Usage
   – QGraphicsView

   – States & Transitions

• Conclusion




                            7
Animation classes

                     QAbstractAnimation




                                   QVariantAnimation
       QAnimationGroup




                                  QPropertyAnimation
                                          animates




                                          Qobject
                                            …


                                                       8
Animations: QAbstractAnimation


• base-class for the animations

• completely abstracts the timer/timerEvent

• synchronized

• has all the basic controls: start, stop, pause




                                                   9
Animations: QAbstractAnimation


• Properties
   – Loop count

   – Duration

   – Direction

   – Current time


      0 (start)                  duration (end)
                                                  time




                    looping


                                                         10
Animations: QVariantAnimation


• QVariant-based

• has startValue and endValue
   – and key frames

• does the linear interpolation
   – Also allows to set your own interpolator

• easingCurve

• reimplement this class to animate non-QObject classes




                                                          11
Animations: QPropertyAnimation


• Works on Qt properties
    – target property of an object

    – picks up automatically the start value

    – dynamic properties are also supported

• This is the class you want to use!

QPropertyAnimation *anim = new QPropertyAnimation(item, “opacity”);
anim->setEndValue(0);
anim->start(QPropertyAnimation::DeleteWhenStopped);




                                                                      12
Animations: QEasingCurve


• Property of variant animation

• Many default curves are provided

• You can define your own curves



QPropertyAnimation *anim = new QPropertyAnimation(item, “opacity”);
anim->setEasingCurve(QEasingCurve::InOutSine);




                                                                      13
Animations: QAnimationGroup


• Container for animations

• parallel or sequential

• Duration defined by the content

       Sequential group
                           Parallel Group

                           Animation
         Animation                          Animation

                             Animation




                                                        14
Animations: managing memory


• We use parent-child relationship of QObject

• Group takes ownership of child animations

• Animation can autodelete
    – through deletePolicy




QPropertyAnimation *anim = new QPropertyAnimation(item, “opacity”);
anim->setEndValue(0);
anim->start(QPropertyAnimation::DeleteWhenStopped);




                                                                      15
Demo animations




                  16
Animation Agenda


• Introduction

• Architecture

• Usage
   – QGraphicsView

   – States & Transitions

• Conclusion




                            17
Usage: QGraphicsView


• How do we animate QGraphicsItem?
  – QGraphicsItem doesn’t have a property system

• Options
  – QGraphicsObject

  – Inherit from QObject

  – Use QGraphicsTransform




                                                   18
Animations: QGraphicsItem


• New class QGraphicsObject
    – inherits from QObject and QGraphicsItem

    – got basic properties for animations

• QGraphicsItemAnimation is deprecated



QGraphicsObject *item = …
…
QPropertyAnimation *anim = new QPropertyAnimation(item, “rotation”);
anim->setTargetValue(360);
anim->start(QPropertyAnimation::DeleteWhenFinished);




                                                                       19
Animations : QGraphicsTransform


• For more complex 3D (2.5D) animations

• QObject-based

• Each QGraphicsItem has a list of QGraphicsTransform

 QGraphicsItem *item = …
 QGraphicsRotation *rotation = new QGraphicsRotation(Qt::YAxis);
 item->setTransformations(…);
 …
 QPropertyAnimation *anim =
                    new QPropertyAnimation(rotation, “angle”);
 anim->setTargetValue(360);
 anim->start(QPropertyAnimation::DeleteWhenStopped);




                                                                   20
Usage: QGraphicsView


• Preferred solution is to use QGraphicsObject
   – common base class for all graphical items

   – we are doing that too!




                                                 21
Animations : demo




                    22
Animation Agenda


• Introduction

• Architecture

• Usage
   – QGraphicsView

   – States & Transitions

• Conclusion




                            23
Using a statemachine for your UI



• Each state defines a set of property values on items
   – position, scale, rotation, opacity, …
• A transition between states can be animated




                                                         24
States & Transitions


• Define states for components of your application




           State 1                           State 2




                                                       25
Animated transitions


                        addAnimation()
     QTransition                         QAbstractAnimation




      addTransition()
                              QAnimationGroup         QPropertyAnimation


                                                              animates


       QState
                                                          QObject
                                                       QGraphicsObject
                                                             …



                                                                           26
States & Transitions : demo


• Almost all animation examples use states and transitions




                                                             27
Animation Agenda


• Introduction

• Architecture

• Usage
   – QGraphicsView

   – States & Transitions

• Conclusion




                            28
Conclusion


• Part of 4.6

• Good integration with statemachine API

• Used by declarative UI

• Ongoing work to animate layouts




                                           29
Thanks for you attention




                    Q&A



                           30

Contenu connexe

Tendances

Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systemsaccount inactive
 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2NokiaAppForum
 
Qt State Machine Framework
Qt State Machine FrameworkQt State Machine Framework
Qt State Machine Frameworkaccount inactive
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1NokiaAppForum
 
Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)vitalipe
 
Graphics programming in open gl
Graphics programming in open glGraphics programming in open gl
Graphics programming in open glArvind Devaraj
 
OpenGL Transformation
OpenGL TransformationOpenGL Transformation
OpenGL TransformationSandip Jadhav
 
Chapter02 graphics-programming
Chapter02 graphics-programmingChapter02 graphics-programming
Chapter02 graphics-programmingMohammed Romi
 
OpenGL L02-Transformations
OpenGL L02-TransformationsOpenGL L02-Transformations
OpenGL L02-TransformationsMohammad Shaker
 
The Next Generation Qt Item Views
The Next Generation Qt Item ViewsThe Next Generation Qt Item Views
The Next Generation Qt Item Viewsaccount inactive
 
OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android Arvind Devaraj
 
Real-Time 3D Programming in Scala
Real-Time 3D Programming in ScalaReal-Time 3D Programming in Scala
Real-Time 3D Programming in ScalaHideyuki Takeuchi
 
Introduction of openGL
Introduction  of openGLIntroduction  of openGL
Introduction of openGLGary Yeh
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threadsYnon Perek
 

Tendances (20)

Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systems
 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2
 
Qt State Machine Framework
Qt State Machine FrameworkQt State Machine Framework
Qt State Machine Framework
 
Qt Widget In-Depth
Qt Widget In-DepthQt Widget In-Depth
Qt Widget In-Depth
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1
 
Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)Qt Graphics View Framework (Qt Developers Meetup Isreal)
Qt Graphics View Framework (Qt Developers Meetup Isreal)
 
Graphics programming in open gl
Graphics programming in open glGraphics programming in open gl
Graphics programming in open gl
 
OpenGL Transformation
OpenGL TransformationOpenGL Transformation
OpenGL Transformation
 
Open gl
Open glOpen gl
Open gl
 
Chapter02 graphics-programming
Chapter02 graphics-programmingChapter02 graphics-programming
Chapter02 graphics-programming
 
OpenGL L02-Transformations
OpenGL L02-TransformationsOpenGL L02-Transformations
OpenGL L02-Transformations
 
The Next Generation Qt Item Views
The Next Generation Qt Item ViewsThe Next Generation Qt Item Views
The Next Generation Qt Item Views
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
iOS OpenGL
iOS OpenGLiOS OpenGL
iOS OpenGL
 
OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android OpenGLES - Graphics Programming in Android
OpenGLES - Graphics Programming in Android
 
Real-Time 3D Programming in Scala
Real-Time 3D Programming in ScalaReal-Time 3D Programming in Scala
Real-Time 3D Programming in Scala
 
OpenGL Basics
OpenGL BasicsOpenGL Basics
OpenGL Basics
 
Introduction of openGL
Introduction  of openGLIntroduction  of openGL
Introduction of openGL
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threads
 

En vedette

En vedette (6)

Shipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for SymbianShipping Mobile Applications Using Qt for Symbian
Shipping Mobile Applications Using Qt for Symbian
 
The Future of Qt Widgets
The Future of Qt WidgetsThe Future of Qt Widgets
The Future of Qt Widgets
 
Meet Qt
Meet QtMeet Qt
Meet Qt
 
KDE Plasma for Mobile Phones
KDE Plasma for Mobile PhonesKDE Plasma for Mobile Phones
KDE Plasma for Mobile Phones
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
Sap Business Objects solutioning Framework architecture
Sap Business Objects solutioning Framework architectureSap Business Objects solutioning Framework architecture
Sap Business Objects solutioning Framework architecture
 

Similaire à Animation Framework: A Step Towards Modern UIs

Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core AnimationJohn Wilker
 
Witekio custom modern qt quick components
Witekio custom modern qt quick componentsWitekio custom modern qt quick components
Witekio custom modern qt quick componentsWitekio
 
Core Animation
Core AnimationCore Animation
Core AnimationBob McCune
 
Best Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IBest Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IICS
 
Qt Itemviews, The Next Generation
Qt Itemviews, The Next GenerationQt Itemviews, The Next Generation
Qt Itemviews, The Next GenerationMarius Bugge Monsen
 
Advanced Visualization with OpenGL in Oil & Gas
Advanced Visualization with OpenGL in Oil & GasAdvanced Visualization with OpenGL in Oil & Gas
Advanced Visualization with OpenGL in Oil & Gasaccount inactive
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Marakana Inc.
 
下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application developmentcsdnmobile
 
Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4ICS
 
CocoaHeads Paris - CATransaction: What the flush?!
CocoaHeads Paris - CATransaction: What the flush?!CocoaHeads Paris - CATransaction: What the flush?!
CocoaHeads Paris - CATransaction: What the flush?!amadour
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJava Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJAX London
 
Qt Itemviews, The Next Generation (Bossa09)
Qt Itemviews, The Next Generation (Bossa09)Qt Itemviews, The Next Generation (Bossa09)
Qt Itemviews, The Next Generation (Bossa09)Marius Bugge Monsen
 
Petri Niemi Qt Web Kit
Petri Niemi Qt Web KitPetri Niemi Qt Web Kit
Petri Niemi Qt Web KitNokiaAppForum
 
Core animation taobao
Core animation taobaoCore animation taobao
Core animation taobaoyarshure Kong
 
Enhancing UI/UX using Java animations
Enhancing UI/UX using Java animationsEnhancing UI/UX using Java animations
Enhancing UI/UX using Java animationsNaman Dwivedi
 
Optimizing Performance in Qt-Based Applications
Optimizing Performance in Qt-Based ApplicationsOptimizing Performance in Qt-Based Applications
Optimizing Performance in Qt-Based Applicationsaccount inactive
 

Similaire à Animation Framework: A Step Towards Modern UIs (20)

Starting Core Animation
Starting Core AnimationStarting Core Animation
Starting Core Animation
 
Witekio custom modern qt quick components
Witekio custom modern qt quick componentsWitekio custom modern qt quick components
Witekio custom modern qt quick components
 
Core Animation
Core AnimationCore Animation
Core Animation
 
Best Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IBest Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part I
 
Qt Itemviews, The Next Generation
Qt Itemviews, The Next GenerationQt Itemviews, The Next Generation
Qt Itemviews, The Next Generation
 
Core animation
Core animationCore animation
Core animation
 
Advanced Visualization with OpenGL in Oil & Gas
Advanced Visualization with OpenGL in Oil & GasAdvanced Visualization with OpenGL in Oil & Gas
Advanced Visualization with OpenGL in Oil & Gas
 
Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)Graphicsand animations devoxx2010 (1)
Graphicsand animations devoxx2010 (1)
 
下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development
 
Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4
 
CocoaHeads Paris - CATransaction: What the flush?!
CocoaHeads Paris - CATransaction: What the flush?!CocoaHeads Paris - CATransaction: What the flush?!
CocoaHeads Paris - CATransaction: What the flush?!
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJava Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
 
Qt Itemviews, The Next Generation (Bossa09)
Qt Itemviews, The Next Generation (Bossa09)Qt Itemviews, The Next Generation (Bossa09)
Qt Itemviews, The Next Generation (Bossa09)
 
Iagc2
Iagc2Iagc2
Iagc2
 
Petri Niemi Qt Web Kit
Petri Niemi Qt Web KitPetri Niemi Qt Web Kit
Petri Niemi Qt Web Kit
 
QtQuick Day 2
QtQuick Day 2QtQuick Day 2
QtQuick Day 2
 
Core animation taobao
Core animation taobaoCore animation taobao
Core animation taobao
 
iOS Core Animation
iOS Core AnimationiOS Core Animation
iOS Core Animation
 
Enhancing UI/UX using Java animations
Enhancing UI/UX using Java animationsEnhancing UI/UX using Java animations
Enhancing UI/UX using Java animations
 
Optimizing Performance in Qt-Based Applications
Optimizing Performance in Qt-Based ApplicationsOptimizing Performance in Qt-Based Applications
Optimizing Performance in Qt-Based Applications
 

Plus de account inactive

Developments in The Qt WebKit Integration
Developments in The Qt WebKit IntegrationDevelopments in The Qt WebKit Integration
Developments in The Qt WebKit Integrationaccount inactive
 
Development with Qt for Windows CE
Development with Qt for Windows CEDevelopment with Qt for Windows CE
Development with Qt for Windows CEaccount inactive
 
Translating Qt Applications
Translating Qt ApplicationsTranslating Qt Applications
Translating Qt Applicationsaccount inactive
 
Mobile Development with Qt for Symbian
Mobile Development with Qt for SymbianMobile Development with Qt for Symbian
Mobile Development with Qt for Symbianaccount inactive
 
How to Make Your Qt App Look Native
How to Make Your Qt App Look NativeHow to Make Your Qt App Look Native
How to Make Your Qt App Look Nativeaccount inactive
 
Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)
Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)
Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)account inactive
 
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization SoftwareCase Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Softwareaccount inactive
 
Case Study: Porting Qt for Embedded Linux on Embedded Processors
Case Study: Porting Qt for Embedded Linux on Embedded ProcessorsCase Study: Porting Qt for Embedded Linux on Embedded Processors
Case Study: Porting Qt for Embedded Linux on Embedded Processorsaccount inactive
 
OGRE: Qt & OGRE for Multimedia Creation
OGRE: Qt & OGRE for Multimedia CreationOGRE: Qt & OGRE for Multimedia Creation
OGRE: Qt & OGRE for Multimedia Creationaccount inactive
 
HGZ Kaffeemaschinen & Qt Speak Coffee
HGZ Kaffeemaschinen & Qt Speak CoffeeHGZ Kaffeemaschinen & Qt Speak Coffee
HGZ Kaffeemaschinen & Qt Speak Coffeeaccount inactive
 
Discover Qt Learning and Certification
Discover Qt Learning and CertificationDiscover Qt Learning and Certification
Discover Qt Learning and Certificationaccount inactive
 
Accelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architectureAccelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architectureaccount inactive
 
Qt Experiences on NXP's Connetcted TV Platforms
Qt Experiences on NXP's Connetcted TV PlatformsQt Experiences on NXP's Connetcted TV Platforms
Qt Experiences on NXP's Connetcted TV Platformsaccount inactive
 

Plus de account inactive (17)

Developments in The Qt WebKit Integration
Developments in The Qt WebKit IntegrationDevelopments in The Qt WebKit Integration
Developments in The Qt WebKit Integration
 
Qt Kwan-Do
Qt Kwan-DoQt Kwan-Do
Qt Kwan-Do
 
Development with Qt for Windows CE
Development with Qt for Windows CEDevelopment with Qt for Windows CE
Development with Qt for Windows CE
 
Translating Qt Applications
Translating Qt ApplicationsTranslating Qt Applications
Translating Qt Applications
 
Qt Creator Bootcamp
Qt Creator BootcampQt Creator Bootcamp
Qt Creator Bootcamp
 
Mobile Development with Qt for Symbian
Mobile Development with Qt for SymbianMobile Development with Qt for Symbian
Mobile Development with Qt for Symbian
 
How to Make Your Qt App Look Native
How to Make Your Qt App Look NativeHow to Make Your Qt App Look Native
How to Make Your Qt App Look Native
 
Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)
Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)
Debugging Qt, Fixing and Contributing a Bug Report (Using Gitorious)
 
The Mobility Project
The Mobility ProjectThe Mobility Project
The Mobility Project
 
Qt Licensing Explained
Qt Licensing ExplainedQt Licensing Explained
Qt Licensing Explained
 
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization SoftwareCase Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
Case Study: Using Qt to Develop Advanced GUIs & Advanced Visualization Software
 
Case Study: Porting Qt for Embedded Linux on Embedded Processors
Case Study: Porting Qt for Embedded Linux on Embedded ProcessorsCase Study: Porting Qt for Embedded Linux on Embedded Processors
Case Study: Porting Qt for Embedded Linux on Embedded Processors
 
OGRE: Qt & OGRE for Multimedia Creation
OGRE: Qt & OGRE for Multimedia CreationOGRE: Qt & OGRE for Multimedia Creation
OGRE: Qt & OGRE for Multimedia Creation
 
HGZ Kaffeemaschinen & Qt Speak Coffee
HGZ Kaffeemaschinen & Qt Speak CoffeeHGZ Kaffeemaschinen & Qt Speak Coffee
HGZ Kaffeemaschinen & Qt Speak Coffee
 
Discover Qt Learning and Certification
Discover Qt Learning and CertificationDiscover Qt Learning and Certification
Discover Qt Learning and Certification
 
Accelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architectureAccelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architecture
 
Qt Experiences on NXP's Connetcted TV Platforms
Qt Experiences on NXP's Connetcted TV PlatformsQt Experiences on NXP's Connetcted TV Platforms
Qt Experiences on NXP's Connetcted TV Platforms
 

Dernier

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Animation Framework: A Step Towards Modern UIs

  • 1. Animation Framework 3/4/2010 A step towards modern UIs
  • 2. Leonardo Sobral Cunha • AA troll – widgets team • before, 3 years in INdT – Nokia Technology Institute in Brazil – various projects on embedded • maemo: Canola, QEdje • together with a big team of designers 1
  • 3. Thierry Bastian • Software engineer • Moved to Oslo in 2006 • Member of the widget team • Participations in – Animation API – Multimedia Framework 2
  • 4. Animation Agenda • Introduction • Architecture • Usage – QGraphicsView – States & Transitions • Conclusion 3
  • 5. Introduction: animations in Qt < 4.6 • What do we have today in Qt? – QTimer / QTimeLine – QGraphicsItemAnimation – QMainWindow – Different animations in the QStyles – ... 4
  • 6. Introduction: why? “Simplify the creation of dynamic UIs by improving the support for animations in Qt” • New feature of Qt 4.6 – part of Qt Kinetic 5
  • 7. Introduction: what is it all about? • Goals – Good API – Simplify animations – Focus on performance • Animates – QWidgets (QObjects) – QGraphicsItems 6
  • 8. Animation Agenda • Introduction • Architecture • Usage – QGraphicsView – States & Transitions • Conclusion 7
  • 9. Animation classes QAbstractAnimation QVariantAnimation QAnimationGroup QPropertyAnimation animates Qobject … 8
  • 10. Animations: QAbstractAnimation • base-class for the animations • completely abstracts the timer/timerEvent • synchronized • has all the basic controls: start, stop, pause 9
  • 11. Animations: QAbstractAnimation • Properties – Loop count – Duration – Direction – Current time 0 (start) duration (end) time looping 10
  • 12. Animations: QVariantAnimation • QVariant-based • has startValue and endValue – and key frames • does the linear interpolation – Also allows to set your own interpolator • easingCurve • reimplement this class to animate non-QObject classes 11
  • 13. Animations: QPropertyAnimation • Works on Qt properties – target property of an object – picks up automatically the start value – dynamic properties are also supported • This is the class you want to use! QPropertyAnimation *anim = new QPropertyAnimation(item, “opacity”); anim->setEndValue(0); anim->start(QPropertyAnimation::DeleteWhenStopped); 12
  • 14. Animations: QEasingCurve • Property of variant animation • Many default curves are provided • You can define your own curves QPropertyAnimation *anim = new QPropertyAnimation(item, “opacity”); anim->setEasingCurve(QEasingCurve::InOutSine); 13
  • 15. Animations: QAnimationGroup • Container for animations • parallel or sequential • Duration defined by the content Sequential group Parallel Group Animation Animation Animation Animation 14
  • 16. Animations: managing memory • We use parent-child relationship of QObject • Group takes ownership of child animations • Animation can autodelete – through deletePolicy QPropertyAnimation *anim = new QPropertyAnimation(item, “opacity”); anim->setEndValue(0); anim->start(QPropertyAnimation::DeleteWhenStopped); 15
  • 18. Animation Agenda • Introduction • Architecture • Usage – QGraphicsView – States & Transitions • Conclusion 17
  • 19. Usage: QGraphicsView • How do we animate QGraphicsItem? – QGraphicsItem doesn’t have a property system • Options – QGraphicsObject – Inherit from QObject – Use QGraphicsTransform 18
  • 20. Animations: QGraphicsItem • New class QGraphicsObject – inherits from QObject and QGraphicsItem – got basic properties for animations • QGraphicsItemAnimation is deprecated QGraphicsObject *item = … … QPropertyAnimation *anim = new QPropertyAnimation(item, “rotation”); anim->setTargetValue(360); anim->start(QPropertyAnimation::DeleteWhenFinished); 19
  • 21. Animations : QGraphicsTransform • For more complex 3D (2.5D) animations • QObject-based • Each QGraphicsItem has a list of QGraphicsTransform QGraphicsItem *item = … QGraphicsRotation *rotation = new QGraphicsRotation(Qt::YAxis); item->setTransformations(…); … QPropertyAnimation *anim = new QPropertyAnimation(rotation, “angle”); anim->setTargetValue(360); anim->start(QPropertyAnimation::DeleteWhenStopped); 20
  • 22. Usage: QGraphicsView • Preferred solution is to use QGraphicsObject – common base class for all graphical items – we are doing that too! 21
  • 24. Animation Agenda • Introduction • Architecture • Usage – QGraphicsView – States & Transitions • Conclusion 23
  • 25. Using a statemachine for your UI • Each state defines a set of property values on items – position, scale, rotation, opacity, … • A transition between states can be animated 24
  • 26. States & Transitions • Define states for components of your application State 1 State 2 25
  • 27. Animated transitions addAnimation() QTransition QAbstractAnimation addTransition() QAnimationGroup QPropertyAnimation animates QState QObject QGraphicsObject … 26
  • 28. States & Transitions : demo • Almost all animation examples use states and transitions 27
  • 29. Animation Agenda • Introduction • Architecture • Usage – QGraphicsView – States & Transitions • Conclusion 28
  • 30. Conclusion • Part of 4.6 • Good integration with statemachine API • Used by declarative UI • Ongoing work to animate layouts 29
  • 31. Thanks for you attention Q&A 30