Qt + Maemo development

Similar documents
CS 4300 Computer Graphics

An overview of mobile and embedded platforms

Designing Interactive Systems II

Review. Designing Interactive Systems II. Introduction. Web 2.0 in keywords GWT Cappuccino HTML5. Cross platform GUI Toolkit

Embedded Linux UI Comparison. Tim Bird Senior Staff Software Engineer Sony Electronics

GUI in C++ PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill. Faculty of Informatics, Masaryk University.

QT QUICK UI Exam Curriculum

Object-Oriented Programming

Oh my. Maya is Qt! Kristine Middlemiss, Autodesk Developer Consultant, Autodesk Developer Network

Qt for Device Creation

Kick Start your Embedded Development with Qt

Qt Essentials - Fundamentals of Qt Module

An imperative approach to video user experiences using LUNA

Merits of QT for developing Imaging Applications UI

Visual HTML5. Human Information Interaction for Knowledge Extraction, Interaction, Utilization, Decision making HI-I-KEIUD

In the Driver s Seat

Developing Applications for ios

Qt Essentials - Fundamentals of Qt Module

Etanova Enterprise Solutions

+ C++11. Qt5 with a touch of C++11. Matthew Eshleman covemountainsoftware.com

Creating Dynamic UIs with Qt Declarative UI

Lecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement.

Review. Designing Interactive Systems II. Review. Base Window System. Apps UITK BWS GEL. 4-Layer Model Graphics and Event Library BWS GEL

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++

Asynchronous Database Access with Qt 4.x

UI, Graphics & EFL. Carsten Haitzler Principal Engineer Samsung Electronics Korea Founder/Leader Enlightenment / EFL

Qt in MeeGo. Zhang Chi Manager of Qt & MeeGo ecosystem, Greater China

SIG: ROS GUI. Sep. 26, 2011 SIG: ROS GUI Dorian Scholz, Dirk Thomas 1

Open Source Software in mobile devices. Timofey Turenko Nokia Research Center, Office of CTO

Programming in Python

Java SE7 Fundamentals

Dave Shreiner, ARM March 2009

JavaFX. JavaFX Overview Release E

<Insert Picture Here> JavaFX 2.0

CopperSpice: A Pure C++ GUI Library. Barbara Geller & Ansel Sermersheim CPPCon - September 2015

Organization of User Interface Software

Chapter 2: Operating-System Structures

Creating outstanding digital cockpits with Qt Automotive Suite

SERIOUS ABOUT SOFTWARE. Qt Core features. Timo Strömmer, May 26,

Mobile Computing LECTURE # 2

Interface Builders and Interface Description Languages

CHAPTER 3 - PROCESS CONCEPT

Hardware Accelerated Graphics for High Performance JavaFX Mobile Applications

Chapter 6 Introduction to Defining Classes

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

Developing the Roadmap - Director Next Survey

INTRODUCING Qt The Cross-Platform C++ Development Framework. Presented by Cody Bittle

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Syllabus- Java + Android. Java Fundamentals

Automated JAVA GUI Testing. Challenges and Experiences

Topics in Mobile Computing

Programming in HTML5 with JavaScript and CSS3

User Interface. Technology Domain Roadmap & Strategy. 22 February 2010 Scott Weiss, UI Technology Manager

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Performance, memory

Announcements. This week is about your term project. Meet in person, more than once. Paper prototype

AN ENTITY-COMPONENT SYSTEM IN C++ AND QT - JAMES TURNER QT3D S ECS

Android Essentials with Java

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Qt Quick From bottom to top

Index LICENSED PRODUCT NOT FOR RESALE

IT6503 WEB PROGRAMMING. Unit-I

Outline. Threads. Single and Multithreaded Processes. Benefits of Threads. Eike Ritter 1. Modified: October 16, 2012

CS123. Programming Your Personal Robot. Part 2: Event Driven Behavior

Tango - Icalepcs 2009 ESRF

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

Quick Multitouch Apps using kivy and Python

Software Development. Integrated Software Environment

Dr Markus Hagenbuchner CSCI319. Distributed Systems Chapter 3 - Processes

CS 3305 Intro to Threads. Lecture 6

Software api overview VERSION 3.1v3

Widgets. Overview. Widget. Widgets Widget toolkits Lightweight vs. heavyweight widgets Swing Widget Demo

Enlightenment Foundation Libraries 2.0 Time to rethink and make things easier!

IGME-330. Rich Media Web Application Development I Week 1

Murach s Beginning Java with Eclipse

Qt-Interface For Volume Visualization

HTML5 on TV - was fehlt? Cloud-basierte TV apps auf der Basis neuester Webtechnologien

Concurrent Task Trees

GRITS AJAX & GWT. Trey Roby. GRITS 5/14/09 Roby - 1

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Chapter 2. Operating-System Structures

Multithreading and Interactive Programs

Java Swing Introduction

Leow Wee Kheng CS3249 User Interface Development. Windowing Systems CS3249

Cross-platform software development in practice. Object-Oriented approach.

HTML5 Evolution and Development. Matt Spencer UI & Browser Marketing Manager

Widget Toolkits CS MVC

But before understanding the Selenium WebDriver concept, we need to know about the Selenium first.

Lecture 13: OpenGL Shading Language (GLSL)

Course 20480: Programming in HTML5 with JavaScript and CSS3

ArcGIS Runtime: Building Cross-Platform Apps. Rex Hansen Mark Baird Michael Tims Morten Nielsen

OpenGL and Qt Creator: a Gentle Introduction

CSC209 Review. Yeah! We made it!

Android App Development

Android Online Training

Background Information About GTK+ and Related Libraries

Game Programming with. presented by Nathan Baur

Transcription:

ES3 Lecture 11 Qt + Maemo development

Maemo Nokia's Linux based platform Almost entirely open source Nokia N770, N800, N810, N900 only models Only N900 has 3G/phone capability N900 has relatively fast ARM CPU, GPU acceleration resistive touch screen -- so no multitouch Development is very flexible C, C++, Java, Python, Ruby, Lua, Lisp, whatever you want

Maemo development Can develop on the device itself e.g. using gcc(but not really practical for big projects --too slow and memory intensive) or just copy over python scripts and running them... Scratchbox provides a Linux-based cross-compilation toolkit Makes it easy to develop on a Linux system and target for Maemo Only available for Linux though, and a bit tricky to set up Maemoemulator available as part of the API Runs in virtual machine Development can be very straightforward e.g. sshinto device to execute and debug files can be directly shared, so you can edit files on the device transparently

Maemo Development (II) Maemouses a derivative of Debian Many standard libraries and utilities are present Porting new libraries is often feasible as well The MaemoUI is currently a custom UI built on GTK+ (Hildon) adds "finger-friendly" extensions supports a simple desktop environment control panel, application manager some common widgets for mobile systems implemented But Nokia will be moving to Qt across all their platforms shortly

The Qt framework Qt is a full object-oriented framework with extensive GUI support Written in C++ Large class library Provides basic container objects, file system access, multi-threading, networking, user interface components, scripting and database access Originally developed by TrollTech, recently bought by Nokia, who are pushing hard to standardize its use across their platforms Open-source, under the LGPL license (Expensive!) commercial license available if you want to modify the libraryand redistribute without releasing the source

Development Cross-platform code using this framework should simply recompile on another platform unlike other platforms we've covered,this is just a very complete library it runs on desktop as well as mobile platforms Supported platforms include: Linux, Windows, Mac OSX, Maemo, Windows CE, Symbianand Maemo experimental support for Android and even the iphone(!) New IDE recently released (Qt Creator) provides code editor, GUI designer, debugger etc. Although written in C++, bindings exist for other languages Jambi provides Java bindings PyQt provides Python bindings but is proprietary PySide is Nokia's PyQt reimplementation project (a bit ropey at the moment)

Qt Structure Qt has: Core module (data structures, OS services) GUI module (widgets, canvas) Extension modules, including: OpenGL(ES) Database access Networking (HTTP, FTP, sockets) Database drivers XML parsing Media playback (video and audio) HTML renderer

Qt and C++ Qt is implemented in C++, and is thus strongly-typed nothing like the message-based model of Objective-C... All the benefits (performance, compatibility, flexibility) of C++, and all of the downsides too (awful syntax, complexity, manual memory management) All Qt objects inherit from QObject, the base object of the Qt hierarchy C++ has manual memory management Qt provides some help by automatically destroying objects hierarchically (e.g. window is destroyed, all child widgets are destroyed) Provides QPointersmart pointers which automatically null after the object is freed Adds features such as internationalised strings (QString), hashtables(dictionaries), standard C++ datastructures(e.g. from STL) are little used

Signals and Slots Qt has to be able to work over many different platforms It has a custom communication interface called Signals and Slots Allows typesafe communication between any Qt objects Each signal and slot has a method signature These signatures must match when connecting objects! e.g. void f(intx) -> void g(intx), but not void f(qobject*q) -> void g(intx) A slot is just a object method which will be called when an event is sent A signal looks like a method, but is never called instead it is emitted this routes the call to the connected slot instead

Signals and Slots Signals and slots are connected using QObject::connect() takes a sending object, a signal, a receiving object and its slot QObject::connect(vehicle, SIGNAL(engineStarted(int)), vehicleregistry, SLOT(vehicleStartedEngine(int)) Signals and slots are declared in the class definition class Vehicle : public QObject {... signals: void enginestarted(int started); } class VehicleRegistry : public QObject { public slots: void vehiclestartedengine(int started); }

Emitting signals Executing emit enginestarted(1) in this example would send the signal emitwill only work from within the class that defines the signal Signals are always private and always return void Any object connected to it would receive a call to the slot method Methods are executed synchronously i.e. when an emit is encountered, each listening slot is executed, and then the code after the emit resumes Signals and slots are high-perfomance slower than basic function calls, but not by much Sender of signal can be recovered in a slot using QObject::sender() Other more complex functionality available (e.g. asynchronous queued signals)

QPointer Qt provides guarded pointers (QPointers) which work with all Qt objects Uses operator overloading to work like a normal pointer But auto-nulls when the object it is pointing to is destroyed avoids dangling pointers Use C++ generics so that QPointer'swork just like ordinary pointers (except for no pointer arithmetic) // standard pointer QLabel *ql = new QLabel; // guarded pointer QPointer<QLabel> ql = new QLabel;

Javascript (ECMAScript) scripting Qt has built in ECMAScript support, called QScript Basically Javascript Integrated script debugger in the IDE QScript can access and manipulate Qt objects properties, signals and slots are available Use is simple: create a QScriptobject, passing in any objects you want the script to access, and then execute it The C++ code can set and get values that the script uses QScriptEngine engine; QScriptValue result = engine.evaluate(scriptstring);

Statechart support Qt has powerful support for state machine models especially the formalisms used in statecharts States and transitions can be defined, and actions can happen on transitions, and when states are entered and left Guards and targetless transitions are supported States can be grouped to produce hierarchical state machines History states (so that groups remember their previous state) are supported Concurrent state machines are also possible State machines can receive messages from your code, and perform actions as a result (e.g. by sending messages back) State machines can be linked to the UI using the animation framework

GUI features Many standard widgets GUI editor Dialog creation tools (e.g. for wizards) High-quality anti-aliased drawing Built in SVG support Animation support (similar to Android and iphone, but more flexible) Multi-touch support Built in gesture-recognition (pinch etc.) Able to support nativelook and feel on all platforms e.g. looks like Windows on Windows This is quite unlike GTK...

GUI QtGui module provides standard widgets text box, buttons, labels, combo boxes advanced widgets like treeviews, toolboxes printer support undo support drag and drop accessibility functions layout managers Item views support simple linkage of data sets to the GUI (e.g. standardized table views)

High-performance Canvas One of Qt's advantages is a powerful drawing module Hardware accelerated, where supported Highly scalable, and can draw huge numbers of graphical elements efficiently Automatically supports printing Graphical effects like blurring, blending and shadowing are built in The QGraphicsView widget provides the canvas, and be used as any other widget Geometric primitives, Bezier curves, advanced type rendering are all supported

Qt Multithreading Qt has a cross-platform common interface for multithreaded applications Thread starting and completion Semaphores and mutexes Inter-thread communication Threads can communicate using the standard signal and slot mechanism High-level concurrent programming interface allows parallel computation without using threads e.g. mapping a function over a list, or doing map/reduce, or filtering sequences makes it easy to scale applications across cores without rewriting any code Inter-process communication also has a standard interface either using simple local sockets or shared memory, for fast transfer of data between processes

Using PyQt PyQt provides standardized bindings for Qt Open-source, but only licensable as GPL for free use This means you must distribute soruce code Commercial use requires a license PyQt is extremely complete, and covers virtually everything available in Qt Even GUIs designed in the design tool can be converted to Python code with an automatic tool! Designed to make Qt appear as much like Python as possible Most memory management issues just disappear There is a book "Rapid GUI programming with Python and Qt" by Mark Summerfield published in 2007 (so reasonably up-to-date)

PySide Nokia's reimplementation of PyQt, using a free license (LGPL, like Qt) Incomplete as of now (e.g. no Windows port) Supposed to be well supported on Maemo It is not recommended for "production-level stability" However, Users have reported than many applications written for PyQtwork correctly with PySide as is API is currently intended to be one-for-one compatible with PyQt i.e. you can just substitute the importline and everything will work the same