fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp
changeset 0 eb1f2e154e89
child 19 ac7e4d1d9209
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepQuery.cpp	Tue Feb 02 01:02:04 2010 +0200
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:           
+*
+*/
+
+
+
+
+
+
+
+
+
+
+
+
+#include <aknedsts.h>
+#include "AknFepQuery.h"
+#include <featmgr.h>                //FeatureManager
+
+CAknFepTextQueryDialog::CAknFepTextQueryDialog(TDes& aDataText, CAknEdwinState& aEditorState, 
+    const TTone aTone, const TInt aEditorFlag) :
+    CAknTextQueryDialog(aDataText, aTone),
+    iUnderlyingEditorState(aEditorState),
+    iEditorFlag(aEditorFlag)
+    {
+    }
+
+CAknFepTextQueryDialog::~CAknFepTextQueryDialog()
+    {
+    }
+
+void CAknFepTextQueryDialog::PreLayoutDynInitL()
+    {
+    CAknTextQueryDialog::PreLayoutDynInitL();
+
+    // need to set query editor's case and sct resource based on editor present when this is launched
+    CAknQueryControl* ctrl=STATIC_CAST(CAknQueryControl*, ControlOrNull(EGeneralQuery));
+    CEikEdwin* editor=STATIC_CAST(CEikEdwin*, ctrl->ControlByLayoutOrNull(EDataLayout));
+    if (editor)
+        {
+        if (iEditorFlag)
+	       { 
+	       editor->SetAknEditorFlags(editor->AknEdwinFlags() | iEditorFlag );	     
+	       }
+        TInt currentCase = iUnderlyingEditorState.CurrentCase();
+        if (currentCase != 0)
+            {
+            editor->SetAknEditorCase(iUnderlyingEditorState.CurrentCase());
+            }
+        else
+            {
+            editor->SetAknEditorCase(EAknEditorUpperCase);
+            }
+        if( iUnderlyingEditorState.Flags() & EAknEditorFlagLatinInputModesOnly )
+            {
+            editor->SetAknEditorFlags(editor->AknEdwinFlags() | EAknEditorFlagLatinInputModesOnly);
+            }
+        if (FeatureManager::FeatureSupported(KFeatureIdJapanese))
+            {
+            editor->SetAknEditorFlags(editor->AknEdwinFlags() | EAknEditorFlagLatinInputModesOnly);
+            }
+        TInt underlyingEditorSCTResId=iUnderlyingEditorState.SpecialCharacterTableResourceId();
+        if (FeatureManager::FeatureSupported(KFeatureIdChinese))
+            {
+            if (!underlyingEditorSCTResId || underlyingEditorSCTResId == R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG)
+                {
+                underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_CHINESE;
+                }
+            }
+        else if (!underlyingEditorSCTResId)
+            {
+            underlyingEditorSCTResId = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
+            }
+        editor->SetAknEditorSpecialCharacterTable(underlyingEditorSCTResId);
+        }
+    }
+
+// End of File