appinstaller/AppinstUi/Plugin/CommonUI/Src/CUIProgressDialog.cpp
changeset 0 ba25891c3a9e
child 44 329d304c1aa1
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2002-2008 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:   This file contains the implementation of CCUIProgressDialog
       
    15 *                class member functions.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "CUIProgressDialog.h"
       
    22 #include "CUIDialogs.h"
       
    23 
       
    24 using namespace SwiUI::CommonUI;
       
    25 
       
    26 // ========================= MEMBER FUNCTIONS ================================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CCUIDialogs::CCUIDialogs
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CCUIProgressDialog::CCUIProgressDialog( CEikDialog** aSelfPtr,
       
    35                                         TBool aVisibilityDelayOff )
       
    36     :CAknProgressDialog( aSelfPtr, aVisibilityDelayOff )
       
    37     {
       
    38     }
       
    39 
       
    40 // Destructor
       
    41 CCUIProgressDialog::~CCUIProgressDialog()
       
    42     {
       
    43     if (iSelfPtr) 
       
    44         {
       
    45         *iSelfPtr = NULL;
       
    46         iSelfPtr = NULL;
       
    47         }
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CCUIProgressDialog::OkToExitL
       
    52 // called by framework when the Softkey is pressed.
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 TBool CCUIProgressDialog::OkToExitL( TInt aButtonId )
       
    56     {
       
    57     TBool result( ETrue );
       
    58     
       
    59     if ( iCallback )
       
    60         {
       
    61         result = iCallback->HandleDialogExitL( aButtonId );
       
    62         }
       
    63     
       
    64     return result;
       
    65     }
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // CCUIProgressDialog::SetCallback
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 void CCUIProgressDialog::SetCallback( MCUIWaitDialogCallback* aCallback )
       
    72     {
       
    73     iCallback = aCallback;
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CCUIProgressDialog::PreLayoutDynInitL
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 void CCUIProgressDialog::PreLayoutDynInitL()
       
    81     {
       
    82     // prevent background apps getting pointer events when dimmed area tapped
       
    83     SetGloballyCapturing( ETrue );
       
    84     SetPointerCapture( ETrue );
       
    85     }
       
    86 
       
    87 
       
    88 // End of File