photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h
branchRCL_3
changeset 35 420f6808bf21
parent 30 a60acebbbd9d
equal deleted inserted replaced
32:78ad99c24f08 35:420f6808bf21
    26 class CGlxUiUtility;
    26 class CGlxUiUtility;
    27 
    27 
    28 class MDialogDismisedObserver
    28 class MDialogDismisedObserver
    29     {
    29     {
    30 public:
    30 public:
    31     virtual void HandleDialogDismissedL()=0;
    31     virtual void HandleDialogDismissedL() = 0;
    32     };
    32     };
    33 
    33 
    34 class CGlxProgressIndicator : public CBase,
    34 class CGlxProgressIndicator : public CBase, public MProgressDialogCallback
    35                                  public MProgressDialogCallback
       
    36     {
    35     {
    37 public:
    36 public:
    38     IMPORT_C static CGlxProgressIndicator* NewL(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
    37     IMPORT_C static CGlxProgressIndicator* NewL(
       
    38             MDialogDismisedObserver& aGlxGridViewNotifyObserver);
       
    39     
    39     ~CGlxProgressIndicator();
    40     ~CGlxProgressIndicator();
    40     static CGlxProgressIndicator* NewLC(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
    41 
    41     /**
    42     /**
    42      * dismiss progress dialog when it is needed
    43      * dismiss progress dialog when it is needed
    43      */
    44      */
    44     IMPORT_C void DismissProgressDialog();
    45     IMPORT_C void DismissProgressDialog();
       
    46 
       
    47     /**
       
    48      * Show progressbar dialog
       
    49      */
       
    50     IMPORT_C void ShowProgressbarL();
       
    51     
       
    52     /**
       
    53      * Start or stop the TN daemon
       
    54      * @param aStatus The foreground status
       
    55      */
       
    56     IMPORT_C void ControlTNDaemon(TBool aStatus);
       
    57     
       
    58 public:
       
    59     // Callback for periodic timer, static, 
       
    60     static TInt PeriodicCallbackL(TAny* aPtr);
       
    61     
       
    62     //nonstatic func called from periodic timer
       
    63     void DisplayProgressBarL();
       
    64     
       
    65 protected:
       
    66     //MProgressDialogCallback
       
    67     void DialogDismissedL(TInt aButtonId);
       
    68 
    45 private:
    69 private:
    46     CGlxProgressIndicator(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
    70     static CGlxProgressIndicator* NewLC(
       
    71             MDialogDismisedObserver& aGlxGridViewNotifyObserver);
       
    72     
       
    73     CGlxProgressIndicator(
       
    74                     MDialogDismisedObserver& aGlxGridViewNotifyObserver);
       
    75     
    47     void ConstructL();
    76     void ConstructL();
    48     
    77     
    49     /**
    78     /**
    50      * show the progress bar
    79      * show the progress bar
    51      * @param aFinalValue Sets the final value of the bar
    80      * @param aFinalValue Sets the final value of the bar
    52      * @param aShow hide/display the progress bar 
    81      * @param aShow hide/display the progress bar 
    53      */
    82      */
    54     void StartProgressNoteL(TInt aFinalValue ,TBool aShow);
    83     void StartProgressNoteL(TInt aFinalValue, TBool aShow);
       
    84     
    55     /**
    85     /**
    56      * displays the increment of progress bar
    86      * displays the increment of progress bar
    57      */
    87      */
    58     void UpdateProgressBar();
    88     void UpdateProgressBar();
    59 
    89 
    60     /**
    90     /**
    61      * calculates how much increment to be done in progress bar
    91      * calculates how much increment to be done in progress bar
    62      * @return increment value
    92      * @return increment value
    63      */
    93      */
    64     TInt CalculateDisplayBarIncrement();
    94     TInt CalculateDisplayBarIncrement();
    65 public:
    95         
    66     // Callback for periodic timer, static, 
       
    67     static TInt PeriodicCallbackL( TAny* aPtr );
       
    68     
       
    69     //nonstatic func called from periodic timer
       
    70     void DisplayProgressBarL();
       
    71     
       
    72     //show progress bar
       
    73     IMPORT_C void ShowProgressbarL();
       
    74     
       
    75 protected://MProgressDialogCallback
       
    76     void DialogDismissedL (TInt aButtonId);
       
    77     
       
    78 private:
    96 private:
    79     //Progress bar updation ticker
    97     //Progress bar updation ticker
    80     CPeriodic* iProgressbarTicker;
    98     CPeriodic* iProgressbarTicker;
    81 
    99 
    82     //Progress bar
   100     //Progress bar
    85     //Progress info
   103     //Progress info
    86     CEikProgressInfo* iProgressInfo;
   104     CEikProgressInfo* iProgressInfo;
    87     
   105     
    88     //final count to set in progress bar
   106     //final count to set in progress bar
    89     TInt iFinalCount;
   107     TInt iFinalCount;
    90     MDialogDismisedObserver&  iGlxGridViewNotifyObserver;
   108 
       
   109     MDialogDismisedObserver& iGlxGridViewNotifyObserver;
       
   110     
    91     CGlxUiUtility* iUiUtility;
   111     CGlxUiUtility* iUiUtility;
       
   112     };
    92 
   113 
    93     };
       
    94 #endif /* GLXPROGRESSINDICATOR_H_ */
   114 #endif /* GLXPROGRESSINDICATOR_H_ */