profilesservices/FileList/Src/CFLDSoftKeyChanger.h
branchRCL_3
changeset 24 8ee96d21d9bf
parent 23 8bda91a87a00
child 25 7e0eff37aedb
equal deleted inserted replaced
23:8bda91a87a00 24:8ee96d21d9bf
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * 	CFLDSoftKeyChanger changes softkeys into video preview layout and
       
    16 * 	video preview select layout. Allows also to restore old layout.	
       
    17 *
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef __CFLDSOFTKEYCHANGER_H__
       
    23 #define __CFLDSOFTKEYCHANGER_H__
       
    24 
       
    25 // INTERNAL INCLUDES
       
    26 #include <e32base.h>
       
    27 
       
    28 // EXTERNAL INCLUDES
       
    29 #include "MFLDFileListBoxObserver.h"
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * CFLDSoftKeyChanger changes softkeys into video preview layout and
       
    37 * video preview select layout. Allows also to restore old layout.
       
    38 *
       
    39 * @lib filelist.lib
       
    40 * @since 3.1
       
    41 */
       
    42 NONSHARABLE_CLASS( CFLDSoftKeyChanger ) : public CBase
       
    43     {
       
    44     
       
    45     public:	// Constructors and destructors
       
    46 
       
    47 		/**
       
    48 		* Two-phased static constructor.
       
    49 		* @return A pointer to a fully constructed CFLDSoftKeyChanger instance
       
    50 		*/
       
    51     	static CFLDSoftKeyChanger* NewL();
       
    52  
       
    53  		/**
       
    54  	 	* Two-phased static constructor, leaves a pointer to cleanup stack
       
    55  		* @return A pointer to a fully constructed CFLDSoftKeyChanger instance
       
    56  		*/
       
    57 		static CFLDSoftKeyChanger* NewLC();
       
    58 
       
    59     	/**
       
    60     	* Destructor
       
    61     	*/
       
    62     	virtual ~CFLDSoftKeyChanger();
       
    63 
       
    64     protected:  // Constructors and destructors
       
    65 
       
    66     	/**
       
    67     	* Constructor, protected
       
    68     	*/
       
    69     	CFLDSoftKeyChanger();
       
    70 
       
    71     	/**
       
    72     	* Second phase constructor
       
    73     	*/
       
    74     	void ConstructL();
       
    75     
       
    76     public: // New methods
       
    77     
       
    78     	/**
       
    79     	* Changes softkey layout into 'Preview' 'Cancel'
       
    80         */
       
    81     	void ChangeNewSoftKeysPreviewL();
       
    82     	
       
    83     	/**
       
    84     	* Changes softkey layout into 'Select' 'Cancel'
       
    85     	* NOTE: this layout is used only when tone selection list
       
    86     	* is at preview state
       
    87         */
       
    88     	void ChangeNewSoftKeysPreviewSelectL();
       
    89     	
       
    90     	/**
       
    91     	* Restores layout into original 'Select' 'Back'
       
    92         */
       
    93     	void RestoreOldToneSelectionSoftKeysL();
       
    94     	
       
    95     	/**
       
    96     	* Returns current softkeystate
       
    97         */
       
    98         MFLDFileListBoxObserver::TFileListSoftKeyState
       
    99          SoftKeyState() const;
       
   100                 
       
   101     private: // New methods
       
   102     
       
   103     	/**
       
   104     	* Opens filelist internal resource file
       
   105         */
       
   106     	void OpenResourceL();
       
   107     	
       
   108     	/**
       
   109     	* Changes softkey label from given string
       
   110     	* @parameter aSoftKeyLabel new label for softkey
       
   111         */
       
   112    		void ChangeLeftSoftKeyL( const TDesC& aSoftKeyLabel ) const;
       
   113    		/**
       
   114     	* Changes softkey label from given string
       
   115     	* @parameter aSoftKeyLabel new label for softkey
       
   116         */
       
   117    		void ChangeRightSoftKeyL( const TDesC& aSoftKeyLabel ) const;
       
   118 
       
   119     
       
   120     private: // Data
       
   121     
       
   122 		// Softkey state       	
       
   123        	MFLDFileListBoxObserver::TFileListSoftKeyState iSoftKeyState;
       
   124        	
       
   125        	/// Own: SoftkeyLabel
       
   126        	HBufC* iSoftKeySelect;
       
   127        	
       
   128        	/// Own: SoftkeyLabel
       
   129        	HBufC* iSoftKeyPreview;
       
   130        	
       
   131        	/// Own: SoftkeyLabel
       
   132        	HBufC* iSoftKeyCancel;
       
   133 
       
   134        	/// Own: SoftkeyLabel
       
   135        	HBufC* iSoftKeyBack;
       
   136 
       
   137     };
       
   138 
       
   139 #endif      // __CFLDSOFTKEYCHANGER_H__
       
   140 
       
   141 // End of File