src/hbwidgets/devicedialogs/hbdevicenotificationdialogsymbian.cpp
changeset 23 e6ad4ef83b23
parent 21 4633027730f5
child 28 b7da29130b0e
--- a/src/hbwidgets/devicedialogs/hbdevicenotificationdialogsymbian.cpp	Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbwidgets/devicedialogs/hbdevicenotificationdialogsymbian.cpp	Thu Sep 02 20:44:51 2010 +0300
@@ -37,6 +37,7 @@
 _LIT(KPluginIdentifier, "com.nokia.hb.devicenotificationdialog/1.0");
 _LIT(KKeyTitleTextWrapping, "titleTextWrapping");
 _LIT(KKeyAnimationDefinition, "animationDefinition");
+_LIT(KKeyShowLevel, "showLevel");
 
 NONSHARABLE_CLASS(CHbDeviceNotificationDialogSymbianPrivate) : public CBase,
                                                   public MHbDeviceDialogObserver
@@ -68,6 +69,7 @@
     
     TBool iEnable;
     TInt iTimeout;
+    TInt iShowLevel;
     CHbDeviceNotificationDialogSymbian::TextWrapping iWrap;
 };
 
@@ -99,6 +101,10 @@
     AddVariantL(KKeyTouchActivation, &iEnable, CHbSymbianVariant::EBool);
     AddVariantL(KKeyTimeOut, &iTimeout, CHbSymbianVariant::EInt);
     AddVariantL(KKeyTitleTextWrapping, &iWrap, CHbSymbianVariant::EInt);
+    if (iShowLevel) { // send only if non-default
+        AddVariantL(KKeyShowLevel, &iShowLevel, CHbSymbianVariant::EInt);
+    }
+
     TInt error = iDeviceDialog->Show(KPluginIdentifier, *iVariantMap, this);
     if (error != KErrNone) {
         User::Leave(error); // error can be positive or negative
@@ -162,6 +168,12 @@
         }
     }
 
+// Set dialog show level
+void SetShowLevel(CHbDeviceNotificationDialogSymbianPrivate *aDialog, TInt aLevel)
+{
+    aDialog->iShowLevel = aLevel;
+}
+
 /*!
     \class MHbDeviceNotificationDialogObserver
     \brief MHbDeviceNotificationDialogObserver is an observer interface for observing CHbDeviceNotificationDialogSymbian.
@@ -289,36 +301,36 @@
 
     - GIF (.gif)
     - MNG (.mng)
-	- Frame animations
-	
-	There is a built-in support for GIF and MNG animations. 
-	
-	Frame animations can be created by following way:
-		
-	\code
-	Create an animation definition file.	
-	
-	<animations>
-		<icon name="frame_anim_looping" playmode="loop">
-			<frame duration="100">c:\icon1.svg</frame>
-			<frame duration="200">c:\icon2.svg</frame>
-			<frame duration="300">c:\icon3.svg</frame>
-		</icon>
-	</animations>	
-	
-	Create CHbDeviceNotificationDialogSymbian in a way described before and
-	set definition file and animation's logical name.
-	
-	_LIT(KAnimationDefinitionXML, "C:\animation.axml");	
-	_LIT(KLogicalIconName, "frame_anim_looping");
-		
-	iDialog->SetAnimationDefinitionL(KAnimationDefinitionXML);
-	iDialog->SetIconNameL(KLogicalIconName);
-	iDialog->ShowL();		
-	\endcode
-	\sa HbIconAnimationManager::addDefinitionFile
-	\note Animation definition files must be stored to a place where they
-	can be accessed.    
+    - Frame animations
+    
+    There is a built-in support for GIF and MNG animations. 
+    
+    Frame animations can be created by following way:
+        
+    \code
+    Create an animation definition file.    
+    
+    <animations>
+        <icon name="frame_anim_looping" playmode="loop">
+            <frame duration="100">c:\icon1.svg</frame>
+            <frame duration="200">c:\icon2.svg</frame>
+            <frame duration="300">c:\icon3.svg</frame>
+        </icon>
+    </animations>   
+    
+    Create CHbDeviceNotificationDialogSymbian in a way described before and
+    set definition file and animation's logical name.
+    
+    _LIT(KAnimationDefinitionXML, "C:\animation.axml"); 
+    _LIT(KLogicalIconName, "frame_anim_looping");
+        
+    iDialog->SetAnimationDefinitionL(KAnimationDefinitionXML);
+    iDialog->SetIconNameL(KLogicalIconName);
+    iDialog->ShowL();       
+    \endcode
+    \sa HbIconAnimationManager::addDefinitionFile
+    \note Animation definition files must be stored to a place where they
+    can be accessed.    
     
     \stable
     \hbwidgets
@@ -419,7 +431,7 @@
 */
 EXPORT_C void CHbDeviceNotificationDialogSymbian::SetAnimationDefinitionL(const TDesC& aAnimationDefinition)
 {
-	d->AddVariantL(KKeyAnimationDefinition, &aAnimationDefinition, CHbSymbianVariant::EDes);
+    d->AddVariantL(KKeyAnimationDefinition, &aAnimationDefinition, CHbSymbianVariant::EDes);
 }
 
 /*!