Namespaces
Variants
Actions
(Difference between revisions)

Archived:Get network and operator name in Qt on Symbian

Jump to: navigation, search
(get network and operator name)
 
m (Text replace - "<code cpp>" to "<code cpp-qt>")
 
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{CodeSnippet
+
{{Archived|timestamp=20110405021858|This article uses a Symbian-specific Qt Mobility Extension which has been superceded by the Qt Mobility API [http://doc.qt.nokia.com/qtmobility-1.0/qsystemnetworkinfo.html QSystemNetworkInfo]. See [[Get Network information using Qt]] for an alternative approach}}
|id=...
+
[[Category:Qt]][[Category:Symbian]][[Category:Code Examples]][[Category:Telephony]]
|platform=S60 3rd Edition, FP1, FP2<br>S60 5th Edition
+
{{Abstract|Archived: This code snippets shows how to get Network name and Operator name using a Qt Mobility Extension}}
 +
{{ArticleMetaData <!-- v1.2 -->
 +
|sourcecode= [[Media:ExtXQSysInfo2.zip]] [[Media:ExtXQSysInfo2.zip]] [[Media:QtNetworkOperator.zip]]
 +
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|devices= Nokia 5800 XpressMusic
 
|devices= Nokia 5800 XpressMusic
|category=Qt for S60
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|subcategory=
+
|platform= S60 3rd Edition, FP1, FP2<br>S60 5th Edition
|creationdate=June 26, 2009
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
 +
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= DevCert
 +
|capabilities= ReadDeviceData
 
|keywords= XQSysInfo::network(), XQSysInfo::operatorName()
 
|keywords= XQSysInfo::network(), XQSysInfo::operatorName()
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|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= 20090626
 +
|author= [[User:Savaj]]
 
}}
 
}}
  
==Overview==
 
 
This code snippets shows how to get Network name and Operator name.
 
 
This snippet requires ReadDeviceData capabilities. Self-signing is not possible because a [[Developer certificate]] is needed.
 
  
 
==Prerequisite==
 
==Prerequisite==
  
* Install Qt for S60:[[Installing Qt on S60]]
+
* Download [[Media:ExtXQSysInfo2.zip|ExtXQSysInfo2.zip]].
* Download [[ExtXQSysInfo2.zip|ExtXQSysInfo2.zip]].
+
* Extract [[Media:ExtXQSysInfo2.zip|ExtXQSysInfo2.zip]] and place all the file in your project directory.
* Extracting [[ExtXQSysInfo2.zip|ExtXQSysInfo2.zip]] and place all the file in your project directory.
+
* Edit your .pro file as mentioned below.
* Edit your .pro file as mentioned below. <br><br>
+
 
 
'''Note:''' These files are extended from source file of XQSysInfo API. More clearly , i have just edited some file of XQSysInfo API to get Network name and Operator name. XQSysInfo::network() gives network name and XQSysInfo::operatorName() gives operator name.
+
{{Note|These files are extended from source file of XQSysInfo API. More clearly, i have just edited some file of XQSysInfo API to get Network name and Operator name. XQSysInfo::network() gives network name and XQSysInfo::operatorName() gives operator name.}}
  
 
==Headers required==
 
==Headers required==
<code cpp>
+
<code cpp-qt>
 
  #include <XQSysInfo>
 
  #include <XQSysInfo>
 
</code>
 
</code>
Line 32: Line 42:
 
All source files are automatically added to .pro file by carbide, so need to add the libraries and capability only.
 
All source files are automatically added to .pro file by carbide, so need to add the libraries and capability only.
  
<code cpp>
+
<code cpp-qt>
 
symbian:LIBS += -letel3rdparty \
 
symbian:LIBS += -letel3rdparty \
 
   -lsysutil \
 
   -lsysutil \
Line 42: Line 52:
  
 
==Source==
 
==Source==
<code cpp>
+
<code cpp-qt>
  
XQSysInfo* sysInfo = new XQSysInfo;
+
XQSysInfo* sysInfo = new XQSysInfo(this);
 
/* show network name on label */
 
/* show network name on label */
 
ui.label->setText("Network Name: " + sysInfo->network());
 
ui.label->setText("Network Name: " + sysInfo->network());
Line 56: Line 66:
 
The code snippet is expected to show Network name and Operator name on screen as showm bellow.
 
The code snippet is expected to show Network name and Operator name on screen as showm bellow.
  
[[Image:ImgNetworkOperator.jpg]]
+
[[File:ImgNetworkOperator.jpg]]
  
 
==Download Code Example==
 
==Download Code Example==
  
 
* The [[Media:QtNetworkOperator.zip|Code Example]] will show network name and operator name on screen and is tested on Nokia 5800 XpressMusic.
 
* The [[Media:QtNetworkOperator.zip|Code Example]] will show network name and operator name on screen and is tested on Nokia 5800 XpressMusic.
 
+
<!-- Translation --> [[pt:Archived:Como obter o nome da rede e da operadora, em Qt para Symbian]]
[[Category:Qt]][[Category:Qt for S60]][[Category:Code Examples]]
+

Latest revision as of 04:19, 11 October 2012

Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

This article uses a Symbian-specific Qt Mobility Extension which has been superceded by the Qt Mobility API QSystemNetworkInfo. See Get Network information using Qt for an alternative approach

Archived: This code snippets shows how to get Network name and Operator name using a Qt Mobility Extension

Article Metadata

Code Example
Tested with
Devices(s): Nokia 5800 XpressMusic

Compatibility
Platform(s): S60 3rd Edition, FP1, FP2
S60 5th Edition

Platform Security
Signing Required: DevCert
Capabilities: ReadDeviceData

Article
Keywords: XQSysInfo::network(), XQSysInfo::operatorName()
Created: savaj (26 Jun 2009)
Last edited: hamishwillee (11 Oct 2012)


Contents

Prerequisite

Note.png
Note: These files are extended from source file of XQSysInfo API. More clearly, i have just edited some file of XQSysInfo API to get Network name and Operator name. XQSysInfo::network() gives network name and XQSysInfo::operatorName() gives operator name.

Headers required

 #include <XQSysInfo>

.pro file

All source files are automatically added to .pro file by carbide, so need to add the libraries and capability only.

symbian:LIBS += -letel3rdparty \
-lsysutil \
-lefsrv \
-lfeatdiscovery
 
symbian:TARGET.CAPABILITY = ReadDeviceData

Source

XQSysInfo* sysInfo = new XQSysInfo(this);
/* show network name on label */
ui.label->setText("Network Name: " + sysInfo->network());
/* show operator name on label */
ui.label_2->setText("Operator Name: " + sysInfo->operatorName());

Postconditions

The code snippet is expected to show Network name and Operator name on screen as showm bellow.

ImgNetworkOperator.jpg

Download Code Example

  • The Code Example will show network name and operator name on screen and is tested on Nokia 5800 XpressMusic.
This page was last modified on 11 October 2012, at 04:19.
240 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved