×
Namespaces

Variants
Actions
(Difference between revisions)

Qt Mobility API Basic Examples Part 1

From Nokia Developer Wiki
Jump to: navigation, search
jimgilmour1 (Talk | contribs)
m (minor spelling)
hamishwillee (Talk | contribs)
m (Text replace - "Category:MeeGo" to "Category:MeeGo Harmattan")
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Qt for Symbian]][[Category:Qt]]
+
[[Category:Qt Mobility]][[Category:Code Examples]]
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
{{Abstract|visible=true|This article introduces 5 sample applications that demonstrate the capability of Qt Mobility.}}
|-
+
{{ArticleMetaData
|'''ID''' ||
+
|sourcecode=[[Media:QSystemDeviceInfoExample.zip]] [[Media:QSystemDisplayInfoExample.zip]] [[Media:QSystemInfoExample.zip]] [[Media:QSystemNetworkInfoExample.zip]] [[Media:QSystemStorageInfoExample.zip]] [[Media:QMessageServiceActionExample.zip]] [[Media:QMessageStoreExample.zip]] [[Media:QContactManagerExample.zip]] [[Media:QGeoPositionInfoSourceExample.zip]] [[Media:QtForwardSMS.zip]] [[Media:Qt_SMS_Preview.zip]] [[Media:Qt_Call_Alert.zip]] [[Media:QtIReached.zip]] [[Media:Qt_AntiTheft.zip]] [[Media:QtIAmHere.zip]]
|'''Creation date''' || 03rd Apr 2010
+
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
|-
+
|devices=Nokia N97 Mini
|'''Platform''' || S60 5th Edition  
+
|sdk= [[Nokia Qt SDK]]
|'''Tested on devices''' || Nokia N97 Mini
+
|platform=S60 5th Edition  
|-
+
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
|'''Category''' || Qt for Symbian
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|'''Subcategory''' || Qt Mobility API
+
|signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
|-
+
|capabilities=<!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
|}
+
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|id= <!-- Article Id (Knowledge base articles only) -->
 +
|language=<!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|review-by=<!-- After re-review: [[User:username]] -->
 +
|review-timestamp=<!-- After re-review: YYYYMMDD -->
 +
|update-by=<!-- After significant update: [[User:username]]-->
 +
|update-timestamp=<!-- After significant update: YYYYMMDD -->
 +
|creationdate=20100402
 +
|author=[[User:Skumar rao]]
 +
}}
 +
{{ArticleNeedsUpdate|timestamp=20110413014620|Article needs to be verified against the [[Nokia Qt SDK|Qt SDK]] and Qt Creator and then updated. It was previously tested using the Qt for Symbian platform SDK which is no longer supplied, and  Carbide.c++ which doesn't work with the Qt SDK.}}
  
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
=== General Instructions for building the code examples  ===
|-
+
|'''Keywords (APIs, classes, methods, functions)''': Qt Mobility APIs
+
|}
+
  
{{Tip| Read this article before moving forward: [[Setting up environment for Qt Mobility API]]}}
+
* Unzip the examples and use Qt Creator to open the .pro file
 
+
== Overview ==
+
Qt Mobility API Basic Examples (Part 1)
+
 
+
Below are list of Examples that demonstrates the capability of Qt Mobility also 6 Sample Applications that can be created using Qt Mobility APIs.
+
 
+
=== '''''General Pre-requisite for the examples to run on device'''''  ===
+
* Qt 4.6.2
+
* Qt Mobility Beta
+
* Symbian.C++ 5th Edition (can any other SDK where Qt Mobility is Available)
+
 
+
=== '''''General Instructions for building the code examples'''''  ===
+
* Use Carbide.c++ or ADT to open the project
+
 
* Add certificate and keys for required capability
 
* Add certificate and keys for required capability
* Add package file to project
 
 
* Build to get the sisx file
 
* Build to get the sisx file
  
==<center>'''Examples'''</center>==
+
== Examples ==
  
=== '''''QSystemDeviceInfoExample''''' ===
+
=== QSystemDeviceInfoExample ===
 
This example shows how to read device information like
 
This example shows how to read device information like
 
* IMEI
 
* IMEI
Line 47: Line 40:
 
using QSystemDeviceInfo and shows on a Qt Dialog
 
using QSystemDeviceInfo and shows on a Qt Dialog
  
http://wiki.forum.nokia.com/index.php/File:QSystemDeviceInfoExample.zip
+
[[File:QSystemDeviceInfoExample.zip]] - updated 25 November 2011 (tested on Symbian Anna Qt SDK 1.1.4)
  
 
=== '''''QSystemDisplayInfoExample'''''  ===
 
=== '''''QSystemDisplayInfoExample'''''  ===
Line 55: Line 48:
 
using QSystemDisplayInfo and shows on a Qt Dialog.
 
using QSystemDisplayInfo and shows on a Qt Dialog.
  
http://wiki.forum.nokia.com/index.php/File:QSystemDisplayInfoExample.zip
+
[[File:QSystemDisplayInfoExample.zip]]
  
=== '''''QSystemInfoExample''''' ===
+
=== QSystemInfoExample  ===
 
This example shows how to read System information like
 
This example shows how to read System information like
 
* CurrentLanguage
 
* CurrentLanguage
Line 79: Line 72:
 
using QSystemInfo and shows on a Qt Dialog.
 
using QSystemInfo and shows on a Qt Dialog.
  
http://wiki.forum.nokia.com/index.php/File:QSystemInfoExample.zip
+
[[File:QSystemInfoExample.zip]]
  
 
=== '''''QSystemNetworkInfoExample'''''  ===
 
=== '''''QSystemNetworkInfoExample'''''  ===
Line 85: Line 78:
 
SignalStrength , Mac Address, NetworkName using QSystemNetworkInfo and shows on a Qt Dialog.
 
SignalStrength , Mac Address, NetworkName using QSystemNetworkInfo and shows on a Qt Dialog.
  
http://wiki.forum.nokia.com/index.php/File:QSystemNetworkInfoExample.zip
+
[[File:QSystemNetworkInfoExample.zip]]
  
 
=== '''''QSystemStorageInfoExample'''''  ===
 
=== '''''QSystemStorageInfoExample'''''  ===
Line 91: Line 84:
 
total & available using QSystemStorageInfo and shows on a Qt Table Widget.
 
total & available using QSystemStorageInfo and shows on a Qt Table Widget.
  
http://wiki.forum.nokia.com/index.php/File:QSystemStorageInfoExample.zip
+
[[File:QSystemStorageInfoExample.zip]]
  
=== '''''QMessageServiceActionExample''''' ===
+
=== QMessageServiceActionExample  ===
 
This example takes phone number & text body from user and sends a SMS to  
 
This example takes phone number & text body from user and sends a SMS to  
 
phone number. It has option to delete the message in case it fails.
 
phone number. It has option to delete the message in case it fails.
  
http://wiki.forum.nokia.com/index.php/File:QMessageServiceActionExample.zip
+
[[File:QMessageServiceActionExample.zip]]
  
=== '''''QMessageStoreExample''''' ===
+
=== QMessageStoreExample  ===
 
This example reads all SMS & MMS messages from phone and displays in a
 
This example reads all SMS & MMS messages from phone and displays in a
 
tree like structure. when a node is selected the user can see the detailed message.
 
tree like structure. when a node is selected the user can see the detailed message.
  
http://wiki.forum.nokia.com/index.php/File:QMessageStoreExample.zip
+
[[File:QMessageStoreExample.zip]]
  
 
=== '''''QContactManagerExample'''''  ===
 
=== '''''QContactManagerExample'''''  ===
Line 109: Line 102:
 
selected the user can see the detailed of the contact.
 
selected the user can see the detailed of the contact.
  
http://wiki.forum.nokia.com/index.php/File:QContactManagerExample.zip
+
[[File:QContactManagerExample.zip]]
  
=== '''''QGeoPositionInfoSourceExample''''' ===
+
=== QGeoPositionInfoSourceExample  ===
 
This example reads current coordinates (using data network)and shows on a dialog.
 
This example reads current coordinates (using data network)and shows on a dialog.
 
Mobility API used : QGeoPositionInfoSource & related APIs
 
Mobility API used : QGeoPositionInfoSource & related APIs
  
http://wiki.forum.nokia.com/index.php/File:QGeoPositionInfoSourceExample.zip
+
[[File:QGeoPositionInfoSourceExample.zip]]
  
== <center>'''Sample Applications using above Qt Mobility APIs''' </center>==
+
== Sample Applications using above Qt Mobility APIs==
  
=== '''''Qt Forward SMS''''' ===
+
=== Qt Forward SMS  ===
 
This Sample application takes a destination Mobile number, and keep an
 
This Sample application takes a destination Mobile number, and keep an
 
eye on the inbox if a message is received then a notification message will be send to
 
eye on the inbox if a message is received then a notification message will be send to
 
destination phone number with details / full content of the received SMS
 
destination phone number with details / full content of the received SMS
  
http://wiki.forum.nokia.com/index.php/File:QtForwardSMS.zip
+
[[File:QtForwardSMS.zip]]
  
=== '''''Qt SMS Preview''''' ===
+
=== Qt SMS Preview  ===
 
This Example application keep an eye on the inbox if a message is received  
 
This Example application keep an eye on the inbox if a message is received  
 
this application will show a Dialog with full content / summary of the SMS on screen. By using this application user do not have to open viewer to see what the message is all about.
 
this application will show a Dialog with full content / summary of the SMS on screen. By using this application user do not have to open viewer to see what the message is all about.
Line 132: Line 125:
 
'''''Note:''''' For SMS Monitoring the Qt Extension APIs are used (this sample application will be updated to use Qt Mobility only in future.)
 
'''''Note:''''' For SMS Monitoring the Qt Extension APIs are used (this sample application will be updated to use Qt Mobility only in future.)
  
http://wiki.forum.nokia.com/index.php/File:Qt_SMS_Preview.zip
+
[[File:Qt_SMS_Preview.zip]]
  
=== '''''Qt Call Alert''''' ===
+
=== Qt Call Alert  ===
 
This Example application observes of any calls and sends a message to a predefined number.
 
This Example application observes of any calls and sends a message to a predefined number.
  
 
'''''Note:''''' For Call Monitoring the Qt Extension APIs are used (this sample application will be updated to use Qt Mobility only in future.)
 
'''''Note:''''' For Call Monitoring the Qt Extension APIs are used (this sample application will be updated to use Qt Mobility only in future.)
  
http://wiki.forum.nokia.com/index.php/File:Qt_Call_Alert.zip
+
[[File:Qt_Call_Alert.zip]]
  
=== '''''Qt iReached'''''  ===
+
===Qt iReached ===
 
This example application will send a message to a predefined number when phone detects a pre-fixed co-ordinates by user.  
 
This example application will send a message to a predefined number when phone detects a pre-fixed co-ordinates by user.  
  
http://wiki.forum.nokia.com/index.php/File:QtIReached.zip
+
[[File:QtIReached.zip]]
  
=== '''''Qt AntiTheft''''' ===
+
=== Qt AntiTheft  ===
 
This example application will detect SIM change and send new SIM info's to a pre-defined  
 
This example application will detect SIM change and send new SIM info's to a pre-defined  
 
number, so that user can recover his phone in-case of theft.
 
number, so that user can recover his phone in-case of theft.
Line 152: Line 145:
 
'''''Note:''''' this application requires auto-stating a exe on boot-up for that this application uses Symbian "Startup List Management API", will be updated to Qt only when APIs will be made available.  
 
'''''Note:''''' this application requires auto-stating a exe on boot-up for that this application uses Symbian "Startup List Management API", will be updated to Qt only when APIs will be made available.  
  
http://wiki.forum.nokia.com/index.php/File:Qt_AntiTheft.zip
+
[[File:Qt_AntiTheft.zip]]
  
=== '''''Qt iAmHere''''' ===
+
=== Qt iAmHere  ===
 
How many times have you spend ages trying to explain somebody where you are so that your  
 
How many times have you spend ages trying to explain somebody where you are so that your  
 
friend can come to same position, and waste lots of time and money using call. With this application  
 
friend can come to same position, and waste lots of time and money using call. With this application  
 
you can send a SMS that contains a link to your current position, receiver just have to click on the link to see your position on Google MAP.
 
you can send a SMS that contains a link to your current position, receiver just have to click on the link to see your position on Google MAP.
  
http://wiki.forum.nokia.com/index.php/File:QtIAmHere.zip
+
[[File:QtIAmHere.zip]]
  
  
 
== Reference links==
 
== Reference links==
 
* [http://qt.nokia.com/ Qt - cross-platform application and UI framework]
 
* [http://qt.nokia.com/ Qt - cross-platform application and UI framework]
* [http://labs.trolltech.com/page/Projects/QtMobility Qt Mobility API]
+
* [http://doc.qt.nokia.com/qtmobility/index.html Qt Mobility API]
* [http://qt.nokia.com/developer/new-qt-apis New Qt APIs Beta - Mobility Project]
+
 
* SDK help
 
* SDK help
  
--[[User:Skumar rao|Skumar rao]] 19:12, 2 April 2010 (UTC)
+
--[[User:Skumar rao|Skumar rao]] 19:12, 2 April 2010 (UTC)[[Category:MeeGo Harmattan]] [[Category:Symbian]]

Latest revision as of 13:57, 13 June 2012

This article introduces 5 sample applications that demonstrate the capability of Qt Mobility.

Needs-update.pngThis article needs to be updated: If you found this article useful, please fix the problems below then delete the {{ArticleNeedsUpdate}} template from the article to remove this warning.

Reasons: (13 Apr 2011)
Article needs to be verified against the Qt SDK and Qt Creator and then updated. It was previously tested using the Qt for Symbian platform SDK which is no longer supplied, and Carbide.c++ which doesn't work with the Qt SDK.

Contents

[edit] General Instructions for building the code examples

  • Unzip the examples and use Qt Creator to open the .pro file
  • Add certificate and keys for required capability
  • Build to get the sisx file

[edit] Examples

[edit] QSystemDeviceInfoExample

This example shows how to read device information like

  • IMEI
  • IMSI
  • Manufacturer
  • Model
  • ProductName

using QSystemDeviceInfo and shows on a Qt Dialog

File:QSystemDeviceInfoExample.zip - updated 25 November 2011 (tested on Symbian Anna Qt SDK 1.1.4)

[edit] QSystemDisplayInfoExample

This example shows how to read device display information like 1. Brightness 2. ColorDepth using QSystemDisplayInfo and shows on a Qt Dialog.

File:QSystemDisplayInfoExample.zip

[edit] QSystemInfoExample

This example shows how to read System information like

  • CurrentLanguage
  • AvailableLanguages Array
  • CurrentCountryCode
  • Version [OS, Core & Firmware]
  • Device connection features like
    • Bluetooth
    • CameraFeature
    • FM RadioFeature
    • IrFeature
    • LedFeature
    • MemcardFeature
    • UsbFeature
    • VibFeature
    • WlanFeature
    • SimFeature
    • LocationFeature
    • VideoOutFeature
    • HapticsFeature

using QSystemInfo and shows on a Qt Dialog.

File:QSystemInfoExample.zip

[edit] QSystemNetworkInfoExample

This example gets the device network status also if find the corresponding SignalStrength , Mac Address, NetworkName using QSystemNetworkInfo and shows on a Qt Dialog.

File:QSystemNetworkInfoExample.zip

[edit] QSystemStorageInfoExample

This example gets the all drives connected to device and list corresponding total & available using QSystemStorageInfo and shows on a Qt Table Widget.

File:QSystemStorageInfoExample.zip

[edit] QMessageServiceActionExample

This example takes phone number & text body from user and sends a SMS to phone number. It has option to delete the message in case it fails.

File:QMessageServiceActionExample.zip

[edit] QMessageStoreExample

This example reads all SMS & MMS messages from phone and displays in a tree like structure. when a node is selected the user can see the detailed message.

File:QMessageStoreExample.zip

[edit] QContactManagerExample

This example reads all contacts and shows as a list.when an element is selected the user can see the detailed of the contact.

File:QContactManagerExample.zip

[edit] QGeoPositionInfoSourceExample

This example reads current coordinates (using data network)and shows on a dialog. Mobility API used : QGeoPositionInfoSource & related APIs

File:QGeoPositionInfoSourceExample.zip

[edit] Sample Applications using above Qt Mobility APIs

[edit] Qt Forward SMS

This Sample application takes a destination Mobile number, and keep an eye on the inbox if a message is received then a notification message will be send to destination phone number with details / full content of the received SMS

File:QtForwardSMS.zip

[edit] Qt SMS Preview

This Example application keep an eye on the inbox if a message is received this application will show a Dialog with full content / summary of the SMS on screen. By using this application user do not have to open viewer to see what the message is all about.

Note: For SMS Monitoring the Qt Extension APIs are used (this sample application will be updated to use Qt Mobility only in future.)

File:Qt SMS Preview.zip

[edit] Qt Call Alert

This Example application observes of any calls and sends a message to a predefined number.

Note: For Call Monitoring the Qt Extension APIs are used (this sample application will be updated to use Qt Mobility only in future.)

File:Qt Call Alert.zip

[edit] Qt iReached

This example application will send a message to a predefined number when phone detects a pre-fixed co-ordinates by user.

File:QtIReached.zip

[edit] Qt AntiTheft

This example application will detect SIM change and send new SIM info's to a pre-defined number, so that user can recover his phone in-case of theft.

Note: this application requires auto-stating a exe on boot-up for that this application uses Symbian "Startup List Management API", will be updated to Qt only when APIs will be made available.

File:Qt AntiTheft.zip

[edit] Qt iAmHere

How many times have you spend ages trying to explain somebody where you are so that your friend can come to same position, and waste lots of time and money using call. With this application you can send a SMS that contains a link to your current position, receiver just have to click on the link to see your position on Google MAP.

File:QtIAmHere.zip


[edit] Reference links

--skumar_rao 19:12, 2 April 2010 (UTC)

This page was last modified on 13 June 2012, at 13:57.
96 page views in the last 30 days.
×