vmbx/vmbxengine/inc/vmbxqtuihandler.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2009-2010 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:  Hanlder Ui which implement of qt.
       
    15 *  Interface   : Private, VmbxQtUiHandler
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef VMBXQTUIHANDLER_H
       
    21 #define VMBXQTUIHANDLER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <QObject>
       
    25 #include <QTranslator>
       
    26 #include <voicemailboxdefs.h>
       
    27 
       
    28 #include "voicemailboxdefsinternal.h"
       
    29 
       
    30 // FORWARD DECLARATION
       
    31 class CVoiceMailboxEntry;
       
    32 class TVoiceMailboxParams;
       
    33 class HbInputDialog;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  Dialog manager
       
    39 *
       
    40 *  @lib vmbxengine.lib
       
    41 */
       
    42 class VmbxQtUiHandler : public QObject
       
    43     {
       
    44     Q_OBJECT
       
    45     
       
    46 public: // Constructors and destructor
       
    47 
       
    48     /**
       
    49     * C++ default constructor.
       
    50     *
       
    51     */
       
    52     VmbxQtUiHandler(QObject* parent = 0 );
       
    53 
       
    54     /**
       
    55     * Destructor.
       
    56     */
       
    57     virtual ~VmbxQtUiHandler();
       
    58 
       
    59      /**
       
    60      * Initialize, load qt translator.
       
    61      */
       
    62      void  init();
       
    63 
       
    64     /**
       
    65     * Show mailbox query dialog
       
    66     *
       
    67     * @param aType in TVmbxType type
       
    68     * @param aNumber the voice mailbox number
       
    69     * @param aResult out the result of dialog
       
    70     */
       
    71     void showVmbxQueryDialog(const TVmbxType& aType,
       
    72                              QString& aNumber, int& aResult);
       
    73 
       
    74     /**
       
    75      * Show define number in selection dialog
       
    76      * Leaves if user cancel selected.
       
    77      *
       
    78      * @param in aType vmbx type
       
    79      * @param out aResult the result of dialog
       
    80      */
       
    81     void showDefineSelectionDialog(TVmbxType& aType, int& aResult);
       
    82 
       
    83     /**
       
    84      * Show call number in selection dialog
       
    85      *
       
    86      * @param in entryList array of the defined voice mailbox entry
       
    87      * @param out params the type TVoiceMailboxParams which should include
       
    88      *          the service id and the type of seclected TVmbxType
       
    89      * @param out result the result user seclected
       
    90      */
       
    91     void showCallSelectionDialog(
       
    92                 const QList<CVoiceMailboxEntry *> entryList,
       
    93                 TVoiceMailboxParams &params, int &result );
       
    94 
       
    95     /**
       
    96     * Show voice mailbox information number
       
    97     *
       
    98     * @param aNoteType in TVmbxType type
       
    99     */
       
   100     void showInformationNote(const TVmbxNoteType aType);
       
   101 
       
   102     /**
       
   103     * Check qt environment supported or not.
       
   104     *
       
   105     * @return qt environment supported or not.
       
   106     */
       
   107     bool isQtEnvSupported();
       
   108     
       
   109 private slots:
       
   110     /**
       
   111     * update Ok button status according to user input string
       
   112     *
       
   113     * @param aInput User input string
       
   114     */
       
   115     void updatePrimaryAction(const QString &aInput);
       
   116 
       
   117 private:
       
   118 
       
   119     /**
       
   120     * Translator vmbx localization
       
   121     */
       
   122     QTranslator iTranslator;
       
   123 
       
   124     /**
       
   125     * Translator common localization
       
   126     */
       
   127     QTranslator iCommonTranslator;
       
   128     
       
   129     /**
       
   130     * Query and Define mailbox dialog. Own
       
   131     */    
       
   132     HbInputDialog *iQueryDialog;
       
   133     };
       
   134 
       
   135 #endif  // VMBXQTUIHANDLER_H