wlanutilities/wlanindicatorplugin/src/wlanindicatorplugin.cpp
changeset 22 498f36116140
parent 19 10810c91db26
child 29 dbe86d96ce5b
--- a/wlanutilities/wlanindicatorplugin/src/wlanindicatorplugin.cpp	Fri Apr 16 16:07:56 2010 +0300
+++ b/wlanutilities/wlanindicatorplugin/src/wlanindicatorplugin.cpp	Mon May 03 13:32:51 2010 +0300
@@ -42,7 +42,7 @@
     WlanIndicatorPlugin constructor.
 */
 WlanIndicatorPlugin::WlanIndicatorPlugin() :
-    HbIndicatorInterface(IndicatorType, GroupPriorityAverage, InteractionActivated),
+    HbIndicatorInterface(IndicatorType, SettingCategory, InteractionActivated),
     mError(0)
 {
     OstTraceFunctionEntry1(WLANINDICATORPLUGIN_WLANINDICATORPLUGIN_ENTRY, this);
@@ -74,7 +74,7 @@
     The handleClientRequest handles client request to change indicators parameters.
 */
 bool WlanIndicatorPlugin::accessAllowed(const QString &indicatorType,
-    const HbSecurityInfo *securityInfo) const
+    const QVariantMap &securityInfo) const
 {
     OstTraceFunctionEntry1(WLANINDICATORPLUGIN_ACCESSALLOWED_ENTRY, this);
 
@@ -207,12 +207,18 @@
             OstTrace0( WLANINDICATORPLUGIN_ERR,INVALID_PARAMS,"Invalid indicator parameters");
            }
         break;
-    case IconNameRole:
-        if (mParameter.isValid()) {
+        // this is the statusbar icon, which is shown only when a connection is active
+    case MonoDecorationNameRole:
         OstTraceFunctionExit1(DUP1_WLANINDICATORPLUGIN_INDICATORDATA_EXIT, this);
-        qvariant = HbIcon("qtg_small_wlan");
+        
+        if (mParameter.isValid() && mParameter.type() == QVariant::List) {
+            indicatorText = mParameter.toList();
+            if ((indicatorText.size() > 0) && (indicatorText[0] == wlanConnected)) {
+                qvariant = HbIcon("qtg_status_wlan");
+            }
+        }
         break;
-        }
+        // this is the icon in the indicator
     case DecorationNameRole:
         OstTraceFunctionExit1(DUP2_WLANINDICATORPLUGIN_INDICATORDATA_EXIT, this);
         qvariant = HbIcon("qtg_small_wlan");