uifw/AvKon/src/aknprogresstimer.cpp
branchRCL_3
changeset 55 aecbbf00d063
parent 4 8ca85d2f0db7
child 56 d48ab3b357f1
equal deleted inserted replaced
51:fcdfafb36fe7 55:aecbbf00d063
    16 */
    16 */
    17 
    17 
    18 // AknProgressTimer.cpp: implementation of the CAknProgressTimer class.
    18 // AknProgressTimer.cpp: implementation of the CAknProgressTimer class.
    19 //
    19 //
    20 //////////////////////////////////////////////////////////////////////
    20 //////////////////////////////////////////////////////////////////////
    21 #include <coemain.h>
    21 
    22 #include "aknnotecontrol.h"
    22 #include "aknnotecontrol.h"
    23 #include "aknprogresstimer.h"
    23 #include "aknprogresstimer.h"
    24 #include "akntrace.h"
    24 #include <coemain.h>
    25 
       
    26 
    25 
    27 //////////////////////////////////////////////////////////////////////
    26 //////////////////////////////////////////////////////////////////////
    28 // Construction/Destruction
    27 // Construction/Destruction
    29 //////////////////////////////////////////////////////////////////////
    28 //////////////////////////////////////////////////////////////////////
    30 
    29 
    44   (iModel->iRunning) ? Queue() : Cancel();
    43   (iModel->iRunning) ? Queue() : Cancel();
    45   }
    44   }
    46 
    45 
    47 void CAknProgressTimer::ConstructL(TTimerModel *aModel,CAknNoteControl *aContainer,TCallBack aCallBack)
    46 void CAknProgressTimer::ConstructL(TTimerModel *aModel,CAknNoteControl *aContainer,TCallBack aCallBack)
    48   {
    47   {
    49   _AKNTRACE_FUNC_ENTER;
       
    50   iCallBack = aCallBack;
    48   iCallBack = aCallBack;
    51   CTimer::ConstructL();
    49   CTimer::ConstructL();
    52   CActiveScheduler::Add(this);
    50   CActiveScheduler::Add(this);
    53   iModel = aModel;
    51   iModel = aModel;
    54   iContainer = aContainer;
    52   iContainer = aContainer;
    55   iContainer->SetFinalProgressValue(iModel->iFinalValue);
    53   iContainer->SetFinalProgressValue(iModel->iFinalValue);
    56   if (iModel->iRunning)
    54   if (iModel->iRunning)
    57     Queue();
    55     Queue();
    58   _AKNTRACE_FUNC_EXIT;
       
    59   }
    56   }
    60 
    57 
    61 void CAknProgressTimer::Queue()
    58 void CAknProgressTimer::Queue()
    62   {
    59   {
    63   After(10000 * iModel->iHundreths);
    60   After(10000 * iModel->iHundreths);
    64   }
    61   }
    65 
    62 
    66 void CAknProgressTimer::RunL()
    63 void CAknProgressTimer::RunL()
    67   {
    64   {
    68   _AKNTRACE_FUNC_ENTER;
       
    69   if (iContainer->IncrementBarsAndDraw(iModel->iIncrement))
    65   if (iContainer->IncrementBarsAndDraw(iModel->iIncrement))
    70     Queue();
    66     Queue();
    71   else
    67   else
    72     iCallBack.CallBack();
    68     iCallBack.CallBack();
    73   _AKNTRACE_FUNC_EXIT;
       
    74   }
    69   }
    75 
    70 
    76 // End of File
    71 // End of File