The Most Popular UI/Apps Framework For IVI on Linux · About me •Tasuku Suzuki •Qt Engineer...

Post on 25-Mar-2020

3 views 0 download

transcript

The Most PopularUI/Apps Framework

For IVI on Linux

About me•Tasuku Suzuki

•Qt Engineer •Qt, Developer Experience and Marketing, Nokia

•Have been using Qt since 2002

•Joined Trolltech in 2006

•Nokia since 2008

Agenda•What is Qt?

• Qt introduction• Who uses Qt?

•What Qt will be like?•Qt in automotive

What is Qt?•Qt is an open source project•Cross-platform application and UI framework• Qt Quick for beautiful UIs• Qt/C++ for fast and complex backends

•Qt Creator IDE•Qt SDK

http://qt.nokia.com/

The Qt project•governs the open source development of Qt. It allows anybody wanting to contribute to join the effort.

•Fair•Transparent•Inclusive•Meritocratic

http://qt-project.org/

http://qt.nokia.com/products/class-library-1

Qt Features/Architecture

OpenGL

WebKit(HTML5) Scripting

Multimedia

GUI

XML

Database

Unit Test

Core(Fundamentals)

Network

Declarative(for Qt Quick)

Qt Mobility APIs•APIs for mobile phone•cross platform/deviceBearer managementContactsLocationMessagingMultimediaPublish and SubscribeService Framework

SensorsVersitCameraDocument GalleryFeedbackLandmarkMaps/Navigation

System Information Organizer

http://qt.nokia.com/products/qt-addons/mobility

Who uses Qt?•OSS projects

• KDE SC• Ubuntu Unity 2D• VLC• MuseScore

http://qt.nokia.com/qt-in-use

Who uses Qt?•non-OSS

• Google Earth• Adobe Photoshop Elements• Autodesk Maya 2011• Skype

Getting started•Install Qt SDK•start development with Qt Creator IDE•Qt Quick introduction•Qt/C++ introduction

http://qt.nokia.com/downloads

Qt SDK•combines the Qt framework with tools designed to streamline the creation of applications for Symbian and MeeGo/Maemo in addition to desktop platforms, such as Microsoft Windows, Mac OS X, and Linux.

http://qt.nokia.com/products/qt-sdk

Qt Creator•a cross-platform integrated development environment (IDE) tailored to the needs of Qt

•C++ and QML code editor•Visual designer for C++ UIs and QML•Project and build management•debugging, version control, etc.

http://qt.nokia.com/products/developer-tools

Qt Quickimport QtQuick 1.1

Rectangle { width: 200; height: 200 gradient: Gradient { GradientStop { position: 0.0; color: "lightgreen" } GradientStop { position: 1.0; color: "green" } } Text { id: myText text: 'QML rocks!‘ anchors.centerIn: parent font.pointSize:16 } MouseArea { anchors.fill: parent onClicked: Qt.quit() }}

http://qt.nokia.com/qtquick

Qt Quick : QML•A new declarative language to create UIs•The syntax is inspired by CSS and JSON•supports JavaScript•supports States and animated Transitions

•Easy to read, easy to write, easy to extend

Qt Quick: QtDeclarative•Runtime module

• QDeclarativeView class for GUI• QDeclarativeEngine class for non-GUI

•provides basic elements for QML• Rectangle, Text, Image, MouseArea, etc.

•provides bridge between C++ and QML• access C++ object from QML and vice versa• register custom QML element developed in C++

Qt Quick: Develop environment•Qt Creator has both QML source editor and visual editor

Qt Quick: demo

Qt C++#include <QApplication>#include <QLabel>

int main(int argc, char **argv){ QApplication app(argc, argv);

QLabel label(“Hello World”); label.show();

return app.exec();}

What Qt will be•Qt history•Qt 5

Qt history• 1996 Qt 1.0 (for X11 and Windows)• 1999 Qt 2.0 (for X11 became OSS)• 2001 Qt 3.0 (Mac OS X support added)• 2005 Qt 4.0 (GPL 2.0 or later added)• 2007 Qt 4.5 (LGPL 2.1 added)• 2010 Qt 4.7• 2011 Qt became an open source project!• 2011 Qt 4.8 (4.8.0 RC1 is already released)• 2012 Qt 5.0

Qt 5: Objectives• Make better use of the GPU, allowing you to create

smooth (and accelerated) graphics performance even with limited resources;

• Making your creation of advanced applications and UIs easier and faster (with QML and Javascript);

• Make apps connected to the web be as powerful as possible, i.e. to embed and power up web content and services into any Qt app; and

• Reduce the complexity and amount of code required to maintain and implement a port.

Qt 5: big changes• Re-architecture the graphics stack• Base all Qt ports on Qt Platform Abstraction

architecture• Modular repository structure• Separate all QWidget related functionality into its

own library• Change JavaScript backend to Google V8• QtWebKit based on WebKit2 architecture• Merge QtMobility APIs to Qt

Qt 5: Graphics Stack for QML•called QML SceneGraph•based on scene graph algorithm•optimized for drawing on OpenGL

• manages all visual elements• opaque element: front to back• non-opaque element: back to front• minimizes OpenGL context switching

• separates paint thread from main thread

•supports GLSL effects in QML

Qt 5: Benchmark•Intel Sandy Bridge i7-2600K•Intel HD Graphics 3000 GPU

Qt5: Qt Platform Abstraction•QPA will be introduced in upcoming Qt 4.8 to abstract windowing system• Qt for Android or Qt for iOS community ports

use the plugin system

•In Qt5, QPA is extended. All platform ports including desktops will use QPA

•easy to add a port•reduce cost to maintain each port

Qt 5: ArchitectureThe%road%to%Qt%5%

!

%Page%5%of%7%

!!

QML'!QML!in!Qt!4.7!uses!QGraphicsView!as!its!rendering!backend.!All!drawing!happens!through!imperative!drawing!commands!making!suboptimal!use!of!the!GPU!and!making!certain!things!as!shader!effects!on!subtrees!of!items!very!hard!to!implement.!!For!that!reason!we!will!be!moving!over!to!the!scene!graph!that!has!been!developed!with!QML!in!mind!over!the!last!year.!This!new!scene!graph!based!version!of!QML!will!be!backwards!compatible!on!the!QML!side,!but!QML!items!implemented!in!C++!(by!inheriting!QDeclarativeItem)!will!need!to!be!slightly!changed.!We!will!aim!at!providing!an!item!in!the!scene!graph!that!is!as!(source)!compatible!as!possible!to!QDeclarativeItem!to!ease!transition.!!The!existing!QGraphicsView!based!QML!will!continue!to!be!supported!for!a!transitionary!period,!but!will!not!be!developed!any!further.!Furthermore!it!will!depend!on!QWidget!and!thus!be!not!recommended!(or!available)!for!usage!on!devices.!!!

QML 3D

SceneGraph

Qt Components

QML WebKit Qt 3D

Lighthouse

OpenGL Enabled WindowSurface

Win Mac Linux/Wayland Symbian X11 Android !

QtGuiCore module Composition of all UI will go through SceneGraph. WebKit, Qt Components and QML will create content nodes for the scene graph and the scenegraph will compose / render all content through and OpenGL surface provided by the Lighthouse layer. 2D API's will primarily serve as a content feeder into the scenegraph, typically layers that need to be composed.

2D API (QPainter)

Raster Engine

GL Engine

QBackingstore

QWidget

What Qt5 apps will be?•Demo

Qt in automotive• Lots of Car OEM, Tier1s and suppliers are

using Qt• Public

• Altran (Press release announcing an Automotive Connected Car platform)

• Magneti Maralli (Demos at GENIVI members meetings)• AWTCE (AISIN) @ Qt Developers Days Munich, Oct 2011

• Demo using Qt Quick• Valeo @ Qt Developers Days Munich, Oct 2011

• Qt in use talk on MirrorLink implementation with Qt

Qt Core in GENIVI“After evaluation of Qt basic concepts and overall architecture the System Architecture team agreed that the basic Qt architecture is a good and available framework that GENIVI should integrate Qt as its application development framework (platform applications, no app store concept) into the GENIVI specification. This includes the qt core library and the API definition also from Qt mobility. Explicitly excluded is the Qt HMI framework, called qt-gui.”

Markus Boje – GENIVI Technical Council Oct, 7th 2010

: Seamless Smartphone in the Car

DisplayOutput

KeyControl

Voice Control

Audio Output

Allows phone apps to be shown on the car display with audio

Car makers are in control of which phone apps are allowed

Car Optimized User ExperienceOptimized (Examples only)

Make use of Car Controls:- Touch, Voice, Hard-Keys

Simplified UI Logic to comply to Driver Distraction and Car Maker needs

Optimized Home Screen only showing relevant / certified Apps

Standard phone UI

Car Connectivity Consortium

Summary• Qt is a cross-platform application and UI framework with APIs

for C++ programming and Qt Quick for rapid UI creation• Intuitive class libraries• Easy to use and learn• Produce highly readable, easily maintainable and reusable code• High runtime performance and small footprint

• Qt is an open source project licensed under LGPL• Large community of over 500K Qt developers• Qt works on any Linux Distribution

• Qt is a part of Ubuntu• Large customer demand to support Qt in Tizen• Qt used in Windriver IVI demos

Thank you!