×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Get network and operator name in Qt on Symbian

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Move into Archived namespace)
hamishwillee (Talk | contribs)
m (Text replace - "<code cpp>" to "<code cpp-qt>")
 
(2 intermediate revisions by one user not shown)
Line 35: Line 35:
  
 
==Headers required==
 
==Headers required==
<code cpp>
+
<code cpp-qt>
 
  #include <XQSysInfo>
 
  #include <XQSysInfo>
 
</code>
 
</code>
Line 42: 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 52: Line 52:
  
 
==Source==
 
==Source==
<code cpp>
+
<code cpp-qt>
  
 
XQSysInfo* sysInfo = new XQSysInfo(this);
 
XQSysInfo* sysInfo = new XQSysInfo(this);
Line 71: Line 71:
  
 
* 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]]

Latest revision as of 04:19, 11 October 2012

Archived.pngArchived: 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 ExampleTested with
Devices(s): Nokia 5800 XpressMusic
Compatibility
Platform(s): S60 3rd Edition, FP1, FP2
S60 5th Edition
Symbian
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

[edit] Prerequisite

Note.pngNote: 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.

[edit] Headers required

 #include <XQSysInfo>

[edit] .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

[edit] 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());

[edit] Postconditions

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

ImgNetworkOperator.jpg

[edit] 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.
79 page views in the last 30 days.
×