The Mobility Project
Alex Luddy
Purpose

• Fuel your ideas for using the Qt APIs from the
  Mobility project




                                         ...
Agenda

• Background

• Content Overview
  – Some examples

• Questions




                     2
Traditional Qt




                 3
Qt Going Forward




                   4
Mobility Project




                   5
Mobility and Applications




                            6
Qt Mobility Details

• The Mobility project is creating Qt APIs

• APIs will have supported functional back-ends on
  all ...
The Story of Bob the Developer

• Wants to make a mobile application

• Wants the application to be cross-platform



• A ...
Bearer Management

• Enables roaming between
 connections

• Choose most appropriate
 connection

• Manage connections



...
Bearer Management




                    10
Bearer Management Demo




                         11
Bearer Management Example

class BearerCloud : public QGraphicsScene

{

     // ...

     QNetworkConfigurationManager ma...
Bearer Management Example

connect(&manager,

    SIGNAL(configurationAdded(QNetworkConfiguration)),

    this, SLOT(confi...
Bearer Management Example

void BearerCloud::configurationAdded(

    const QNetworkConfiguration& configuration)

{

    ...
Back to Bob

• Efficient Internet connection



• Web feed reader with contact interest
  information…




               ...
Contacts

• Work with contact data

• Add custom data

• Introspect contact data

• Enumerate contact stores
  – Local and...
Contacts




           17
Contacts Example: Show Contacts

// prepare fetch request

QContactManager* manager = new QContactManager();

QContactFetc...
Contacts Example: Show Contacts

void Example::showContacts(QContactFetchRequest* request,
    bool appendOnly)

{

     Q...
Back to Bob

• Efficient Internet connection

• Access contact details
  – Add “interest” as custom data



• Web feed rea...
Messaging

• Send (Email, SMS, MMS)

• Work with stored/remote messages

• Access message accounts

• New message notifica...
Messaging




            22
Messaging Example: Send Message

// get to address

QString to =
  contact.detail<QContactEmailAddress>().emailAddress();
...
Messaging Example: Send Message

// send

QMessageServiceAction service;
connect(&service,
   SIGNAL(stateChanged(QMessage...
Back to Bob

• Efficient Internet connection

• Access contact details

• Send messages to contacts



• The “I am going t...
Location

• Where am I?
  – Stream location data

• Be notified when within range of a
  location

• Underlying location t...
Location




           27
Location Demo




                28
Location Example

// create source

source = new QNmeaPositionInfoSource(

        QNmeaPositionInfoSource::SimulationMode...
Location Example

void MapWindow::positionUpdated(const QGeoPositionInfo& info)

{

    if (info.hasProperty(QGeoPositionI...
Back to Bob

• Efficient use of network

• Accessing contact details

• Sending messages to contacts

• Knows where user i...
Other APIs for Application Developers

• Multimedia

• System Information

• Calendar (coming next year)

• Sensors (comin...
System Developer APIs

• Use case is focused more on development of a
  system rather than an application

• Publish and s...
Publish and Subscribe

• Unifies various sources of hierarchical data into a
  single consistent model

• Uses QVariant


...
Service Framework

• Discover and work with
  services

• Central service registry

• XML definition

• Out-of-process sup...
Service Framework




                    36
Content Summary

• Bearer Management, Contacts, Messaging,
 Location, Multimedia, System Information,
 Publish and Subscri...
Summary

• Rich cross-platform applications

• Qt brilliant developer offering everywhere




                            ...
Questions

• http://labs.qt.nokia.com/page/Projects/QtMobility

• All API feedback appreciated




                       ...
Upcoming SlideShare
Loading in...5
×

The Mobility Project

1,818

Published on

The Qt Mobility project is developing new Qt APIs. These APIs will benefit all Qt developers. This presentation shall provide an overview of the APIs and demonstrate the use of some the APIs through an example application. This presentation shall fuel ideas for usage of the new APIs in your own projects.

Presentation by Alex Luddy held during Qt Developer Days 2009.

http://qt.nokia.com/developer/learning/elearning

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,818
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
88
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

The Mobility Project

  1. 1. The Mobility Project Alex Luddy
  2. 2. Purpose • Fuel your ideas for using the Qt APIs from the Mobility project 1
  3. 3. Agenda • Background • Content Overview – Some examples • Questions 2
  4. 4. Traditional Qt 3
  5. 5. Qt Going Forward 4
  6. 6. Mobility Project 5
  7. 7. Mobility and Applications 6
  8. 8. Qt Mobility Details • The Mobility project is creating Qt APIs • APIs will have supported functional back-ends on all platforms where it makes sense • Some APIs on Qt labs now 7
  9. 9. The Story of Bob the Developer • Wants to make a mobile application • Wants the application to be cross-platform • A Web feed reader… 8
  10. 10. Bearer Management • Enables roaming between connections • Choose most appropriate connection • Manage connections 9
  11. 11. Bearer Management 10
  12. 12. Bearer Management Demo 11
  13. 13. Bearer Management Example class BearerCloud : public QGraphicsScene { // ... QNetworkConfigurationManager manager; }; 12
  14. 14. Bearer Management Example connect(&manager, SIGNAL(configurationAdded(QNetworkConfiguration)), this, SLOT(configurationAdded(QNetworkConfiguration))); connect(&manager, SIGNAL(configurationUpdated(QNetworkConfiguration)), this, SLOT(configurationUpdated(QNetworkConfiguration))); 13
  15. 15. Bearer Management Example void BearerCloud::configurationAdded( const QNetworkConfiguration& configuration) { const QNetworkConfiguration::StateFlags state = config.state(); // position in cloud based on state } 14
  16. 16. Back to Bob • Efficient Internet connection • Web feed reader with contact interest information… 15
  17. 17. Contacts • Work with contact data • Add custom data • Introspect contact data • Enumerate contact stores – Local and remote 16
  18. 18. Contacts 17
  19. 19. Contacts Example: Show Contacts // prepare fetch request QContactManager* manager = new QContactManager(); QContactFetchRequest* fetchRequest = new QContactFetchRequest; fetchRequest->setManager(manager); connect(fetchRequest, SIGNAL(progress(QContactFetchRequest*,bool)), this, SLOT(showContacts(QContactFetchRequest*,bool))); m_fetchRequest->start() 18
  20. 20. Contacts Example: Show Contacts void Example::showContacts(QContactFetchRequest* request, bool appendOnly) { QList<QContact> results = request->contacts(); // handle append only case // access contacts for display for (int i = 0; i < results.size(); ++i) { QString display = results[i].displayLabel().label(); // ... 19
  21. 21. Back to Bob • Efficient Internet connection • Access contact details – Add “interest” as custom data • Web feed reader that can send messages to contacts about relevant information.. 20
  22. 22. Messaging • Send (Email, SMS, MMS) • Work with stored/remote messages • Access message accounts • New message notifications • Retrieve 21
  23. 23. Messaging 22
  24. 24. Messaging Example: Send Message // get to address QString to = contact.detail<QContactEmailAddress>().emailAddress(); // prepare message QMessage message; message.setType(QMessage::Email); message.setTo(QMessageAddress(to, QMessageAddress::Email)); message.setSubject(“Boating”); message.setBody(“Here is a link you might like...”); 23
  25. 25. Messaging Example: Send Message // send QMessageServiceAction service; connect(&service, SIGNAL(stateChanged(QMessageServiceAction::State)), this, SLOT(stateChanged(QMessageServiceAction::State))); service.sendMessage(message); // check send result void MessageSender::stateChanged( QMessageServiceAction::State state) { if (state == QMessageServiceAction::Successful) // all good 24
  26. 26. Back to Bob • Efficient Internet connection • Access contact details • Send messages to contacts • The “I am going to be late” application… 25
  27. 27. Location • Where am I? – Stream location data • Be notified when within range of a location • Underlying location technology agnostic 26
  28. 28. Location 27
  29. 29. Location Demo 28
  30. 30. Location Example // create source source = new QNmeaPositionInfoSource( QNmeaPositionInfoSource::SimulationMode, this); // open NMEA data file and set as device for source source->setUpdateInterval(1500); connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo))); 29
  31. 31. Location Example void MapWindow::positionUpdated(const QGeoPositionInfo& info) { if (info.hasProperty(QGeoPositionInfo::Heading)) // ... QString url = /* ... */ .arg(QString::number( info.coordinate().latitude())) // ... 30
  32. 32. Back to Bob • Efficient use of network • Accessing contact details • Sending messages to contacts • Knows where user is 31
  33. 33. Other APIs for Application Developers • Multimedia • System Information • Calendar (coming next year) • Sensors (coming next year) • More to come… 32
  34. 34. System Developer APIs • Use case is focused more on development of a system rather than an application • Publish and subscribe • Service framework 33
  35. 35. Publish and Subscribe • Unifies various sources of hierarchical data into a single consistent model • Uses QVariant /Device/Buttons = 3 /Device/Buttons/1/Name = Context /Device/Buttons/1/Usable = true /Device/Buttons/2/Name = Select 34
  36. 36. Service Framework • Discover and work with services • Central service registry • XML definition • Out-of-process support coming next year 35
  37. 37. Service Framework 36
  38. 38. Content Summary • Bearer Management, Contacts, Messaging, Location, Multimedia, System Information, Publish and Subscribe, Service Framework • … 37
  39. 39. Summary • Rich cross-platform applications • Qt brilliant developer offering everywhere 38
  40. 40. Questions • http://labs.qt.nokia.com/page/Projects/QtMobility • All API feedback appreciated 39
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×