photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h
branchRCL_3
changeset 12 ce1c7ad1f18b
child 14 2dac0fdba72b
equal deleted inserted replaced
11:71da52165949 12:ce1c7ad1f18b
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    Progressdialog
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GLXPROGRESSINDICATOR_H_
       
    19 #define GLXPROGRESSINDICATOR_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <aknwaitdialog.h>
       
    23 
       
    24 class CAknProgressDialog;
       
    25 class CEikProgressInfo;
       
    26 
       
    27 class MDialogDismisedObserver
       
    28     {
       
    29 public:
       
    30     virtual void HandleDialogDismissedL()=0;
       
    31     };
       
    32 
       
    33 class CGlxProgressIndicator : public CBase,
       
    34                                  public MProgressDialogCallback
       
    35     {
       
    36 public:
       
    37     IMPORT_C static CGlxProgressIndicator* NewL(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
       
    38     ~CGlxProgressIndicator();
       
    39     static CGlxProgressIndicator* NewLC(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
       
    40 
       
    41 private:
       
    42     CGlxProgressIndicator(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
       
    43     void ConstructL();
       
    44     
       
    45     /**
       
    46      * show the progress bar
       
    47      * @param aFinalValue Sets the final value of the bar
       
    48      * @param aShow hide/display the progress bar 
       
    49      */
       
    50     void StartProgressNoteL(TInt aFinalValue ,TBool aShow);
       
    51     /**
       
    52      * displays the increment of progress bar
       
    53      */
       
    54     void UpdateProgressBar();
       
    55 
       
    56     /**
       
    57      * calculates how much increment to be done in progress bar
       
    58      * @return increment value
       
    59      */
       
    60     TInt CalculateDisplayBarIncrementL();
       
    61 public:
       
    62     // Callback for periodic timer, static, 
       
    63     static TInt PeriodicCallbackL( TAny* aPtr );
       
    64     
       
    65     //nonstatic func called from periodic timer
       
    66     void DisplayProgressBarL();
       
    67 protected://MProgressDialogCallback
       
    68     void DialogDismissedL (TInt aButtonId);
       
    69     
       
    70 private:
       
    71     //Progress bar updation ticker
       
    72     CPeriodic* iProgressbarTicker;
       
    73 
       
    74     //Progress bar
       
    75     CAknProgressDialog* iProgressDialog;
       
    76     
       
    77     //Progress info
       
    78     CEikProgressInfo* iProgressInfo;
       
    79     
       
    80     //final count to set in progress bar
       
    81     TInt iFinalCount;
       
    82     MDialogDismisedObserver&  iGlxGridViewNotifyObserver;
       
    83 
       
    84     };
       
    85 #endif /* GLXPROGRESSINDICATOR_H_ */