fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp
changeset 0 eb1f2e154e89
child 19 ac7e4d1d9209
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #include <aknedsts.h>
       
    30 #include "AknFepQuery.h"
       
    31 #include <featmgr.h>                //FeatureManager
       
    32 
       
    33 CAknFepTextQueryDialog::CAknFepTextQueryDialog(TDes& aDataText, CAknEdwinState& aEditorState, 
       
    34     const TTone aTone, const TInt aEditorFlag) :
       
    35     CAknTextQueryDialog(aDataText, aTone),
       
    36     iUnderlyingEditorState(aEditorState),
       
    37     iEditorFlag(aEditorFlag)
       
    38     {
       
    39     }
       
    40 
       
    41 CAknFepTextQueryDialog::~CAknFepTextQueryDialog()
       
    42     {
       
    43     }
       
    44 
       
    45 void CAknFepTextQueryDialog::PreLayoutDynInitL()
       
    46     {
       
    47     CAknTextQueryDialog::PreLayoutDynInitL();
       
    48 
       
    49     // need to set query editor's case and sct resource based on editor present when this is launched
       
    50     CAknQueryControl* ctrl=STATIC_CAST(CAknQueryControl*, ControlOrNull(EGeneralQuery));
       
    51     CEikEdwin* editor=STATIC_CAST(CEikEdwin*, ctrl->ControlByLayoutOrNull(EDataLayout));
       
    52     if (editor)
       
    53         {
       
    54         if (iEditorFlag)
       
    55 	       { 
       
    56 	       editor->SetAknEditorFlags(editor->AknEdwinFlags() | iEditorFlag );	     
       
    57 	       }
       
    58         TInt currentCase = iUnderlyingEditorState.CurrentCase();
       
    59         if (currentCase != 0)
       
    60             {
       
    61             editor->SetAknEditorCase(iUnderlyingEditorState.CurrentCase());
       
    62             }
       
    63         else
       
    64             {
       
    65             editor->SetAknEditorCase(EAknEditorUpperCase);
       
    66             }
       
    67         if( iUnderlyingEditorState.Flags() & EAknEditorFlagLatinInputModesOnly )
       
    68             {
       
    69             editor->SetAknEditorFlags(editor->AknEdwinFlags() | EAknEditorFlagLatinInputModesOnly);
       
    70             }
       
    71         if (FeatureManager::FeatureSupported(KFeatureIdJapanese))
       
    72             {
       
    73             editor->SetAknEditorFlags(editor->AknEdwinFlags() | EAknEditorFlagLatinInputModesOnly);
       
    74             }
       
    75         TInt underlyingEditorSCTResId=iUnderlyingEditorState.SpecialCharacterTableResourceId();
       
    76         if (FeatureManager::FeatureSupported(KFeatureIdChinese))
       
    77             {
       
    78             if (!underlyingEditorSCTResId || underlyingEditorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
       
    79                 {
       
    80                 underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
       
    81                 }
       
    82             }
       
    83         else if (!underlyingEditorSCTResId)
       
    84             {
       
    85             underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
       
    86             }
       
    87         editor->SetAknEditorSpecialCharacterTable(underlyingEditorSCTResId);
       
    88         }
       
    89     }
       
    90 
       
    91 // End of File