SlideShare una empresa de Scribd logo
1 de 47
Descargar para leer sin conexión
The Anatomy of Real World Apps
                              Dissecting cross-platform apps written using Qt Quick and C++




Wednesday, October 26, 2011
Marius Bugge Monsen


                                     • Co-Founder of Cutehacks
                                     • Eight years at Trolltech and Nokia
                                     • Main developer of Qt Itemviews
                                     • Team lead for Qt Widgets team




Wednesday, October 26, 2011
• Symbian                  • Symbian
                              • Maemo 5                  • Maemo 5
                              • MeeGo Harmattan          • MeeGo Harmattan (soon)
                              • Android (experimental)

                              • Symbian
                              • Maemo 5                  • Symbian
                              • MeeGo Harmattan          • MeeGo Harmattan
                              • Android


                              • Symbian                  • Symbian
                              • MeeGo Harmattan          • MeeGo Harmattan




Wednesday, October 26, 2011
Wednesday, October 26, 2011
Wednesday, October 26, 2011
The anatomy of your app ?



Wednesday, October 26, 2011
User Interface




                              Network / Parsing /       Playback /
                                RPC     Processing        Other




Wednesday, October 26, 2011
QML




                              Qt / C++




Wednesday, October 26, 2011
QML


                              QObject


                                        Qt / C++




Wednesday, October 26, 2011
QML

                                                    Item
                              QObject
                                                   Models

                                        Qt / C++




Wednesday, October 26, 2011
What is the state of your app?



Wednesday, October 26, 2011
Enter the hero!


Wednesday, October 26, 2011
QML

                                         State      Item
                              QObject   Machine    Models

                                        Qt / C++




Wednesday, October 26, 2011
State A


                              “Next”              “Next”

                                          ?
                              State B             State C
                                        “Next”




Wednesday, October 26, 2011
State A


                              “Next”              “Next”

                                          !
                              State B             State C
                                        “Next”




Wednesday, October 26, 2011
“Skeleton, muscle, skin”




Wednesday, October 26, 2011
Wednesday, October 26, 2011
Wednesday, October 26, 2011
Tabs
                                                                                    Share




                                                                 Tracks




                                            Toolbar                       Profile
                              Logo


                                                Cover                                       Tracks


                                                        Player




                                              Slider




Wednesday, October 26, 2011
Splash                       Popular
                               Screen                       Tracks

                                             Top Lists

                                View                      Recommended
                               Screen                        Tracks
                                            This Week’s
                                              Tracks
                               Player
                                                          Fresh Tracks
                               Screen

                                              Search

                              Artist Info                 Search for
                               Screen                       Artists

                                            My Playlist

                               About                      Search for
                               Screen                       Tracks



Wednesday, October 26, 2011
Top Level States


                                                    Player
                                                    Screen

                       Splash        Views
                       Screen        Screen

                                                   Artist Info
                                                    Screen
                                     About
                                     Screen


Wednesday, October 26, 2011
Views Screen State



                              Top Lists            Search




                              This Week          My Playlist




Wednesday, October 26, 2011
Top Lists State


                              Popular                 Fresh
                              Tracks                  Tracks




                                        Recommended
                                           Tracks




Wednesday, October 26, 2011
class StateMachine : public QStateMachine
        {
            Q_OBJECT
            Q_PROPERTY(QObject *splashScreenState READ splashScreenState CONSTANT)
            Q_PROPERTY(QObject *viewsScreenState READ viewsScreenState CONSTANT)
            Q_PROPERTY(QObject *topListsViewState READ topListsViewState CONSTANT)
            Q_PROPERTY(QObject *popularTabState READ popularTabState CONSTANT)
            Q_PROPERTY(QObject *recommendedTabState READ recommendedTabState CONSTANT)
            Q_PROPERTY(QObject *freshTabState READ freshTabState CONSTANT)
            Q_PROPERTY(QObject *thisWeekViewState READ thisWeekViewState CONSTANT)
            Q_PROPERTY(QObject *searchViewState READ searchViewState CONSTANT)
            Q_PROPERTY(QObject *artistsTabState READ artistsTabState CONSTANT)
            Q_PROPERTY(QObject *tracksTabState READ tracksTabState CONSTANT)
            Q_PROPERTY(QObject *myPlaylistViewState READ myPlaylistViewState CONSTANT)
            Q_PROPERTY(QObject *playerScreenState READ playerScreenState CONSTANT)
            Q_PROPERTY(QObject *aboutScreenState READ aboutScreenState CONSTANT)
            Q_PROPERTY(QObject *artistInfoScreenState READ artistInfoScreenState CONSTANT)
        public:
            ...
        }
                                                                                     statemachine.h




Wednesday, October 26, 2011
...
           Q_SIGNALS:
               void views();
           ...
                                                                                          statemachine.h




           ...
           m_splashScreenState->addTransition(this, SIGNAL(views()), m_viewsScreenState);
           ...                                                                     statemachine.cpp




Wednesday, October 26, 2011
QHistoryState *viewsScreenHistoryState = new QHistoryState(m_viewsScreenState);

            viewsScreenHistoryState->setDefaultState(m_topListsViewState);

            m_viewsScreenState->setInitialState(viewsScreenHistoryState);
                                                                                   statemachine.cpp




Wednesday, October 26, 2011
Almost there.



Wednesday, October 26, 2011
class State : public QState
                     {
                         Q_OBJECT
                         Q_PROPERTY(bool isActive READ isActive NOTIFY isActiveChanged)
                     public:
                         explicit State(QState *parent = 0);
                         ~State();

                              bool isActive() const;

                     Q_SIGNALS:
                         void isActiveChanged();

                     protected:
                         void onEntry(QEvent *event);
                         void onExit(QEvent *event);

                     private:
                         bool m_active;
                     };
                                                                                          state.h




Wednesday, October 26, 2011
State {
         name: "splash"
         when: stateMachine.splashScreenState.isActive
         PropertyChanges { target: splashScreen; y: 0 }
         PropertyChanges { target: viewsScreen; y: main.height }
         PropertyChanges { target: playerScreen; y: main.height }
         PropertyChanges { target: aboutScreen; y: main.height }
         PropertyChanges { target: artistInfoScreen; y: main.height }
     }




Wednesday, October 26, 2011
SplashScreen {
                                  Timer {
                                      interval: 1000
                                      repeat: false
                                      running: true
                                      onTriggered: stateMachine.views();
                                  }
                              }




Wednesday, October 26, 2011
Light at the end of the tunnel.


Wednesday, October 26, 2011
Splash                         Popular
         Screen                         Tracks

                         Top Lists

          View                         Recommended
         Screen                           Tracks
                               This
                              Week’s
                              Tracks
         Player                          Fresh
         Screen                          Tracks

                           Search

        Artist Info                     Search for
         Screen                           Artists

                         My Playlist

         About                         Search for
         Screen                          Tracks




                      “Skeleton”



Wednesday, October 26, 2011
Splash                         Popular
         Screen                         Tracks

                         Top Lists

          View                         Recommended
         Screen                           Tracks
                               This
                              Week’s
                              Tracks
         Player                          Fresh
         Screen                          Tracks

                           Search

        Artist Info                     Search for
         Screen                           Artists

                         My Playlist

         About                         Search for
         Screen                          Tracks




                      “Skeleton”                     “Muscle”



Wednesday, October 26, 2011
Splash                         Popular
         Screen                         Tracks

                         Top Lists

          View                         Recommended
         Screen                           Tracks
                               This
                              Week’s
                              Tracks
         Player                          Fresh
         Screen                          Tracks

                           Search

        Artist Info                     Search for
         Screen                           Artists

                         My Playlist

         About                         Search for
         Screen                          Tracks




                      “Skeleton”                     “Muscle”   “Skin”



Wednesday, October 26, 2011
Wednesday, October 26, 2011
Wednesday, October 26, 2011
360x640       640x480   480x854




Wednesday, October 26, 2011
3.5”    2.46”   3.9”




Wednesday, October 26, 2011
Wednesday, October 26, 2011
Wednesday, October 26, 2011
Wednesday, October 26, 2011
#if defined(Q_OS_SYMBIAN)
                context->setContextProperty("nhdMode", true);
            #else
                context->setContextProperty("nhdMode", false);
            #endif
                                                                      main.cpp




             QtObject {
                 property real screenFactor: nhdMode ? 1.0 : 1.33

                      // geometry
                      property int verticalMargin: 2 * screenFactor
                      ...

                      // fonts
                      property int fontSize: 14 * screenFactor
                      ...
             }                                                        Theme.qml




Wednesday, October 26, 2011
QtObject {
         ...

               // images
               property string backgroundImage: "qrc:/images/background.jpg"
               ...
     }
                                                                          Theme.qml




     Image {
         id: main
         source: theme.backgroundImage
         ...
     }
                                                                      MainWindow.qml




Wednesday, October 26, 2011
Wednesday, October 26, 2011
import com.meego 1.0

            PageStackWindow {
                initialPage: Page {
                    orientationLock: PageOrientation.Automatic
                    MainWindow { anchors.fill: parent }
                }
            }
                                                                                  MeegoWindow.qml




            #if defined(MEEGO_EDITION_HARMATTAN)
                viewer.setMainQmlFile(QLatin1String("qml/NRKP3Untouched/MeeGoWindow.qml"));
            #else
                viewer.setMainQmlFile(QLatin1String("qml/NRKP3Untouched/MainWindow.qml"));
            #endif
                                                                                         main.cpp




Wednesday, October 26, 2011
Wednesday, October 26, 2011
Thank you!




                              cutehacks.com


                                         Illustrations by Frits Ahlefeldt-Laurvig, HikingArtist.com

Wednesday, October 26, 2011

Más contenido relacionado

Destacado

Introduction to WebGL and Three.js
Introduction to WebGL and Three.jsIntroduction to WebGL and Three.js
Introduction to WebGL and Three.jsJames Williams
 
Talent webinar slides 6 25 2015 final
Talent webinar slides 6 25 2015 finalTalent webinar slides 6 25 2015 final
Talent webinar slides 6 25 2015 finalLora Cecere
 
Overview of Using Wordpress for Web Site Design
Overview of Using Wordpress for Web Site DesignOverview of Using Wordpress for Web Site Design
Overview of Using Wordpress for Web Site DesignAmy Goodloe
 
Things I like, I love and I hate.
Things I like, I love and I hate.Things I like, I love and I hate.
Things I like, I love and I hate.nachisoukaina
 
Galicia - Comenius Project
Galicia - Comenius ProjectGalicia - Comenius Project
Galicia - Comenius Projectlaborcomenius
 
Presentación sobre Derechos Humanos
Presentación sobre Derechos HumanosPresentación sobre Derechos Humanos
Presentación sobre Derechos HumanosJoaquin Sanchez
 
風險測試
風險測試風險測試
風險測試excel2003
 
The 10 Commandments of Electromagnetic Compatibility
The 10 Commandments of Electromagnetic CompatibilityThe 10 Commandments of Electromagnetic Compatibility
The 10 Commandments of Electromagnetic CompatibilityJaymie Murray
 
Talent pipeline activation webinar
Talent pipeline activation webinarTalent pipeline activation webinar
Talent pipeline activation webinarLinkedIn
 

Destacado (15)

Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
 
Introduction to WebGL and Three.js
Introduction to WebGL and Three.jsIntroduction to WebGL and Three.js
Introduction to WebGL and Three.js
 
Introduction to Qt
Introduction to QtIntroduction to Qt
Introduction to Qt
 
Talent webinar slides 6 25 2015 final
Talent webinar slides 6 25 2015 finalTalent webinar slides 6 25 2015 final
Talent webinar slides 6 25 2015 final
 
Overview of Using Wordpress for Web Site Design
Overview of Using Wordpress for Web Site DesignOverview of Using Wordpress for Web Site Design
Overview of Using Wordpress for Web Site Design
 
Chindogu
ChindoguChindogu
Chindogu
 
ขยายเวลาเปิดรับข้อเสนอโครงการงบสกอ. ประจำปีงบประมาณ 2557
ขยายเวลาเปิดรับข้อเสนอโครงการงบสกอ. ประจำปีงบประมาณ 2557ขยายเวลาเปิดรับข้อเสนอโครงการงบสกอ. ประจำปีงบประมาณ 2557
ขยายเวลาเปิดรับข้อเสนอโครงการงบสกอ. ประจำปีงบประมาณ 2557
 
Things I like, I love and I hate.
Things I like, I love and I hate.Things I like, I love and I hate.
Things I like, I love and I hate.
 
Galicia - Comenius Project
Galicia - Comenius ProjectGalicia - Comenius Project
Galicia - Comenius Project
 
5° básico b semana 23 al 27 mayo
5° básico b  semana 23  al 27 mayo5° básico b  semana 23  al 27 mayo
5° básico b semana 23 al 27 mayo
 
Presentación sobre Derechos Humanos
Presentación sobre Derechos HumanosPresentación sobre Derechos Humanos
Presentación sobre Derechos Humanos
 
SF Cordova Meetup
SF Cordova MeetupSF Cordova Meetup
SF Cordova Meetup
 
風險測試
風險測試風險測試
風險測試
 
The 10 Commandments of Electromagnetic Compatibility
The 10 Commandments of Electromagnetic CompatibilityThe 10 Commandments of Electromagnetic Compatibility
The 10 Commandments of Electromagnetic Compatibility
 
Talent pipeline activation webinar
Talent pipeline activation webinarTalent pipeline activation webinar
Talent pipeline activation webinar
 

Más de Marius Bugge Monsen

Más de Marius Bugge Monsen (12)

About Cutehacks
About CutehacksAbout Cutehacks
About Cutehacks
 
How to hire and keep good people
How to hire and keep good peopleHow to hire and keep good people
How to hire and keep good people
 
I can see your house from here
I can see your house from hereI can see your house from here
I can see your house from here
 
Practical Model View Programming (Roadshow Version)
Practical Model View Programming (Roadshow Version)Practical Model View Programming (Roadshow Version)
Practical Model View Programming (Roadshow Version)
 
Practical Model View Programming
Practical Model View ProgrammingPractical Model View Programming
Practical Model View Programming
 
The Qt 4 Item Views
The Qt 4 Item ViewsThe Qt 4 Item Views
The Qt 4 Item Views
 
Qt Item Views In Depth
Qt Item Views In DepthQt Item Views In Depth
Qt Item Views In Depth
 
IPC with Qt
IPC with QtIPC with Qt
IPC with Qt
 
The Future of Qt Widgets
The Future of Qt WidgetsThe Future of Qt Widgets
The Future of Qt Widgets
 
Qt Widgets In Depth
Qt Widgets In DepthQt Widgets In Depth
Qt Widgets In Depth
 
Qt Itemviews, The Next Generation
Qt Itemviews, The Next GenerationQt Itemviews, The Next Generation
Qt Itemviews, The Next Generation
 
Qt Itemviews, The Next Generation (Bossa09)
Qt Itemviews, The Next Generation (Bossa09)Qt Itemviews, The Next Generation (Bossa09)
Qt Itemviews, The Next Generation (Bossa09)
 

Último

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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Último (20)

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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

The Anatomy of Real World Apps - Dissecting cross-platform apps written using Qt Quick and C++

  • 1. The Anatomy of Real World Apps Dissecting cross-platform apps written using Qt Quick and C++ Wednesday, October 26, 2011
  • 2. Marius Bugge Monsen • Co-Founder of Cutehacks • Eight years at Trolltech and Nokia • Main developer of Qt Itemviews • Team lead for Qt Widgets team Wednesday, October 26, 2011
  • 3. • Symbian • Symbian • Maemo 5 • Maemo 5 • MeeGo Harmattan • MeeGo Harmattan (soon) • Android (experimental) • Symbian • Maemo 5 • Symbian • MeeGo Harmattan • MeeGo Harmattan • Android • Symbian • Symbian • MeeGo Harmattan • MeeGo Harmattan Wednesday, October 26, 2011
  • 6. The anatomy of your app ? Wednesday, October 26, 2011
  • 7. User Interface Network / Parsing / Playback / RPC Processing Other Wednesday, October 26, 2011
  • 8. QML Qt / C++ Wednesday, October 26, 2011
  • 9. QML QObject Qt / C++ Wednesday, October 26, 2011
  • 10. QML Item QObject Models Qt / C++ Wednesday, October 26, 2011
  • 11. What is the state of your app? Wednesday, October 26, 2011
  • 12. Enter the hero! Wednesday, October 26, 2011
  • 13. QML State Item QObject Machine Models Qt / C++ Wednesday, October 26, 2011
  • 14. State A “Next” “Next” ? State B State C “Next” Wednesday, October 26, 2011
  • 15. State A “Next” “Next” ! State B State C “Next” Wednesday, October 26, 2011
  • 19. Tabs Share Tracks Toolbar Profile Logo Cover Tracks Player Slider Wednesday, October 26, 2011
  • 20. Splash Popular Screen Tracks Top Lists View Recommended Screen Tracks This Week’s Tracks Player Fresh Tracks Screen Search Artist Info Search for Screen Artists My Playlist About Search for Screen Tracks Wednesday, October 26, 2011
  • 21. Top Level States Player Screen Splash Views Screen Screen Artist Info Screen About Screen Wednesday, October 26, 2011
  • 22. Views Screen State Top Lists Search This Week My Playlist Wednesday, October 26, 2011
  • 23. Top Lists State Popular Fresh Tracks Tracks Recommended Tracks Wednesday, October 26, 2011
  • 24. class StateMachine : public QStateMachine { Q_OBJECT Q_PROPERTY(QObject *splashScreenState READ splashScreenState CONSTANT) Q_PROPERTY(QObject *viewsScreenState READ viewsScreenState CONSTANT) Q_PROPERTY(QObject *topListsViewState READ topListsViewState CONSTANT) Q_PROPERTY(QObject *popularTabState READ popularTabState CONSTANT) Q_PROPERTY(QObject *recommendedTabState READ recommendedTabState CONSTANT) Q_PROPERTY(QObject *freshTabState READ freshTabState CONSTANT) Q_PROPERTY(QObject *thisWeekViewState READ thisWeekViewState CONSTANT) Q_PROPERTY(QObject *searchViewState READ searchViewState CONSTANT) Q_PROPERTY(QObject *artistsTabState READ artistsTabState CONSTANT) Q_PROPERTY(QObject *tracksTabState READ tracksTabState CONSTANT) Q_PROPERTY(QObject *myPlaylistViewState READ myPlaylistViewState CONSTANT) Q_PROPERTY(QObject *playerScreenState READ playerScreenState CONSTANT) Q_PROPERTY(QObject *aboutScreenState READ aboutScreenState CONSTANT) Q_PROPERTY(QObject *artistInfoScreenState READ artistInfoScreenState CONSTANT) public: ... } statemachine.h Wednesday, October 26, 2011
  • 25. ... Q_SIGNALS: void views(); ... statemachine.h ... m_splashScreenState->addTransition(this, SIGNAL(views()), m_viewsScreenState); ... statemachine.cpp Wednesday, October 26, 2011
  • 26. QHistoryState *viewsScreenHistoryState = new QHistoryState(m_viewsScreenState); viewsScreenHistoryState->setDefaultState(m_topListsViewState); m_viewsScreenState->setInitialState(viewsScreenHistoryState); statemachine.cpp Wednesday, October 26, 2011
  • 28. class State : public QState { Q_OBJECT Q_PROPERTY(bool isActive READ isActive NOTIFY isActiveChanged) public: explicit State(QState *parent = 0); ~State(); bool isActive() const; Q_SIGNALS: void isActiveChanged(); protected: void onEntry(QEvent *event); void onExit(QEvent *event); private: bool m_active; }; state.h Wednesday, October 26, 2011
  • 29. State { name: "splash" when: stateMachine.splashScreenState.isActive PropertyChanges { target: splashScreen; y: 0 } PropertyChanges { target: viewsScreen; y: main.height } PropertyChanges { target: playerScreen; y: main.height } PropertyChanges { target: aboutScreen; y: main.height } PropertyChanges { target: artistInfoScreen; y: main.height } } Wednesday, October 26, 2011
  • 30. SplashScreen { Timer { interval: 1000 repeat: false running: true onTriggered: stateMachine.views(); } } Wednesday, October 26, 2011
  • 31. Light at the end of the tunnel. Wednesday, October 26, 2011
  • 32. Splash Popular Screen Tracks Top Lists View Recommended Screen Tracks This Week’s Tracks Player Fresh Screen Tracks Search Artist Info Search for Screen Artists My Playlist About Search for Screen Tracks “Skeleton” Wednesday, October 26, 2011
  • 33. Splash Popular Screen Tracks Top Lists View Recommended Screen Tracks This Week’s Tracks Player Fresh Screen Tracks Search Artist Info Search for Screen Artists My Playlist About Search for Screen Tracks “Skeleton” “Muscle” Wednesday, October 26, 2011
  • 34. Splash Popular Screen Tracks Top Lists View Recommended Screen Tracks This Week’s Tracks Player Fresh Screen Tracks Search Artist Info Search for Screen Artists My Playlist About Search for Screen Tracks “Skeleton” “Muscle” “Skin” Wednesday, October 26, 2011
  • 37. 360x640 640x480 480x854 Wednesday, October 26, 2011
  • 38. 3.5” 2.46” 3.9” Wednesday, October 26, 2011
  • 42. #if defined(Q_OS_SYMBIAN) context->setContextProperty("nhdMode", true); #else context->setContextProperty("nhdMode", false); #endif main.cpp QtObject { property real screenFactor: nhdMode ? 1.0 : 1.33 // geometry property int verticalMargin: 2 * screenFactor ... // fonts property int fontSize: 14 * screenFactor ... } Theme.qml Wednesday, October 26, 2011
  • 43. QtObject { ... // images property string backgroundImage: "qrc:/images/background.jpg" ... } Theme.qml Image { id: main source: theme.backgroundImage ... } MainWindow.qml Wednesday, October 26, 2011
  • 45. import com.meego 1.0 PageStackWindow { initialPage: Page { orientationLock: PageOrientation.Automatic MainWindow { anchors.fill: parent } } } MeegoWindow.qml #if defined(MEEGO_EDITION_HARMATTAN) viewer.setMainQmlFile(QLatin1String("qml/NRKP3Untouched/MeeGoWindow.qml")); #else viewer.setMainQmlFile(QLatin1String("qml/NRKP3Untouched/MainWindow.qml")); #endif main.cpp Wednesday, October 26, 2011
  • 47. Thank you! cutehacks.com Illustrations by Frits Ahlefeldt-Laurvig, HikingArtist.com Wednesday, October 26, 2011