iaupdate/IAD/ui/inc/iaupdatedialogutil.h
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:   This file contains the header file of the IAUpdateDialogUtil class 
    14 * Description:    
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 #ifndef IAUPDATEDIALOGUTIL_H
    20 #ifndef IAUPDATEDIALOGUTIL_H
    21 #define IAUPDATEDIALOGUTIL_H
    21 #define IAUPDATEDIALOGUTIL_H
    22 
    22 
    23 #include <QtCore/qmetaobject.h>
       
    24 #include <QObject>
       
    25 #include <HbAction>
       
    26 
    23 
    27 class IAUpdateDialogObserver;
    24 //  INCLUDES
       
    25 #include <e32base.h>
    28 
    26 
    29 
    27 
    30 class IAUpdateDialogUtil : public QObject
    28 //FORWARD DECLARATIONS
    31 {
    29 class MIAUpdateNode;
    32     Q_OBJECT
    30 
    33     
    31 
       
    32 /**
       
    33 * TIAUpdateTextLinkObserver
       
    34 * 
       
    35 * Observer interface function for observing text link.
       
    36 */
       
    37 class MIAUpdateTextLinkObserver
       
    38     {
    34     public:
    39     public:
    35             
    40         virtual void TextLinkL( TInt aLinkId ) = 0;
    36     IAUpdateDialogUtil(QObject *parent, IAUpdateDialogObserver *observer = NULL);
    41     };
    37     ~IAUpdateDialogUtil();
       
    38 
    42 
    39     void showInformation(const QString &text, HbAction *primaryAction);
       
    40     
       
    41     void showQuestion(const QString &text, HbAction *primaryAction, HbAction *secondaryAction);
       
    42     
       
    43     void showAgreement(HbAction *primaryAction, HbAction *secondaryAction = NULL);  
       
    44     
       
    45     public slots:
       
    46 
    43 
    47     void finished(HbAction *action);
    44 /**
    48     
    45 * TIAUpdateDialogParam
    49     
    46 *
    50     private:
    47 * This class is used as general dialog parameter type.
    51     
    48 */
       
    49 class TIAUpdateDialogParam
       
    50 	{
       
    51     public:
       
    52 		TInt iCountSuccessfull;
       
    53 		TInt iCountCancelled;
       
    54 		TInt iCountFailed;
       
    55 		TInt iShowCloseAllText;
       
    56 		TInt iResourceId;
       
    57 		MIAUpdateNode* iNode;
       
    58 		MIAUpdateTextLinkObserver* iLinkObserver;
       
    59 		
       
    60     public:
       
    61     	TIAUpdateDialogParam();
       
    62 		
       
    63 	};
       
    64 
       
    65 
       
    66 
       
    67 
       
    68 /**
       
    69 * IAUpdateDialogUtil
       
    70 * 
       
    71 * IAUpdateDialogUtil contains general dialog utilities.
       
    72 */
       
    73 class IAUpdateDialogUtil
       
    74 	{
       
    75     public:
       
    76 		static void ShowMessageQueryL( const TDesC& aTitle, const TDesC& aText) ;
       
    77 		static void ShowMessageQueryL( const TDesC& aTitle, TInt aResource );
       
    78 		
       
    79         static void ShowInformationQueryL( const TDesC& aText );
       
    80         static void ShowInformationQueryL( TInt aResource );
    52         
    81         
    53     private:
    82         static TInt ShowConfirmationQueryL( const TDesC& aText, TInt aSoftkeyResourceId );
    54     
    83         static TInt ShowConfirmationQueryL( TInt aResource, TInt aSoftkeyResourceId );
    55     IAUpdateDialogObserver* mObserver; //not owned
    84         
    56     
    85         static void Panic( TInt aReason );
    57 };
    86 	};
    58 
    87 
    59 #endif  // IAUPDATEDIALOGUTIL_H
    88 
       
    89 
       
    90 
       
    91 
       
    92 #endif      // IAUPDATEDIALOGUTIL_H
    60             
    93             
    61 // End of File
    94 // End of File