email/mail/EditorSrc/cmsgmailencodingsetting.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Encoding setting item and setting page
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _MSGMAILEDITOR_ENCODING_SETTINGITEM_H
       
    20 #define _MSGMAILEDITOR_ENCODING_SETTINGITEM_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <aknsettingitemlist.h>
       
    24 #include <aknradiobuttonsettingpage.h>
       
    25 #include <msvstd.h>
       
    26 
       
    27 class CMsgMailEditorDocument;
       
    28 
       
    29 /**
       
    30 * Setting item for encoding setting
       
    31 * @since 3.2
       
    32 */
       
    33 class CMsgMailEditorEncodingSettingItem
       
    34     : public CAknTextSettingItem
       
    35     {
       
    36     public: // Constructors and destructor
       
    37          
       
    38          /**
       
    39          * Creates a new instance of this class.
       
    40          * @param aIdentifier setting id
       
    41          */
       
    42 		static CMsgMailEditorEncodingSettingItem* NewL( 
       
    43 		    TInt aIdentifier,
       
    44 		    CMsgMailEditorDocument& aDocument );
       
    45     	
       
    46     	~CMsgMailEditorEncodingSettingItem();
       
    47 
       
    48     public: // From CAknTextSettingItem
       
    49 
       
    50     	void EditItemL( TBool aCalledFromMenu );
       
    51     	
       
    52     private: // implementation
       
    53         void NameArrayL( TInt& aSelected );
       
    54         void SaveSettingValueL( TInt aSelected );
       
    55         void SetSettingValueL();
       
    56         HBufC* GetCharsetNameLC();
       
    57         	
       
    58     
       
    59     private: // C'tor	
       
    60     	    	
       
    61     	CMsgMailEditorEncodingSettingItem( 
       
    62     	    TInt aIdentifier,
       
    63     	    CMsgMailEditorDocument& aDocument );
       
    64     	void ConstructL();    
       
    65     
       
    66     private: // Data
       
    67         /// Own: setting value 
       
    68         RBuf iSettingValue;	
       
    69         /// Ref to Mail editor document
       
    70         CMsgMailEditorDocument& iDocument;
       
    71         CDesCArrayFlat* iIdArray;       
       
    72     };
       
    73 
       
    74 /**
       
    75 * Setting page for Encoding.
       
    76 * @since 3.2
       
    77 */
       
    78 class CMsgMailEditorEncodingSettingPage
       
    79     : public CAknRadioButtonSettingPage
       
    80     {
       
    81     public: // Constructors and destructor
       
    82         
       
    83         /// See CAknRadioButtonSettingPage for params
       
    84     	CMsgMailEditorEncodingSettingPage( 
       
    85     	    TInt aResourceID,
       
    86     	    TInt& aCurrentSelectionIndex, 
       
    87 		    const MDesCArray* aItemArray );
       
    88 
       
    89     	CMsgMailEditorEncodingSettingPage( 
       
    90     	    const TDesC* aSettingTitleText,
       
    91             TInt aSettingNumber, 
       
    92     		TInt aControlType,
       
    93     		TInt aEditorResourceId, 
       
    94     		TInt aResourceID,
       
    95     	    TInt& aCurrentSelectionIndex, 
       
    96 		    const MDesCArray* aItemArray );
       
    97 
       
    98         void ConstructL();
       
    99         
       
   100         ~CMsgMailEditorEncodingSettingPage();
       
   101 
       
   102     };
       
   103 
       
   104 #endif // _MSGMAILEDITOR_ENCODING_SETTINGITEM_H
       
   105 
       
   106 // End of File