?? screenupdatetimer.cpp
字號:
/*
* ============================================================================
* Name : Screenupdatetimer.cpp
* Part of : RecorderExample
* Created : 20.03.2005 by Forum Nokia
* Version : 1.0.0
* Copyright: Nokia Corporation
* ============================================================================
*/
// INCLUDE FILES
#include "TimerModel.h"
#include "ScreenUpdateTimer.h"
#include "RecorderContainer.h"
#include "RecorderAdapter.h"
// CONSTANTS
const TInt KIntervalBaseTime = 10000;
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CScreenUpdateTimer::CSreenUpdateTimer()
// C++ default constructor can NOT contain any code, that
// might leave.
// ---------------------------------------------------------
CScreenUpdateTimer::CScreenUpdateTimer()
: CTimer( EActivePriorityClockTimer )
{
}
// ---------------------------------------------------------
// CSreenUpdateTimer::ConstructL()
// EPOC default constructor can leave.
// ---------------------------------------------------------
void CScreenUpdateTimer::ConstructL( TTimerModel* aModel,
CRecorderContainer *aContainer,
CRecorderAdapter *aRecorder )
{
CTimer::ConstructL();
CActiveScheduler::Add( this );
iModel = aModel;
iContainer = aContainer;
iRecorder = aRecorder;
if ( iModel->iRunning )
{
Queue();
}
}
// ---------------------------------------------------------
// CScreenUpdateTimer::~CScreenUpdateTimer()
// Destructor
// ---------------------------------------------------------
CScreenUpdateTimer::~CScreenUpdateTimer()
{
iContainer->SetBarValue( iRecorder ->GetDuration() );
Cancel();
}
// ---------------------------------------------------------
// ScreenUpdateTimer::RunL()
// Definition of what to do, when timer event occurs.
// ---------------------------------------------------------
//
void CScreenUpdateTimer::RunL()
{
iContainer->SetBarValue( iRecorder ->GetDuration() );
Queue();
}
// ---------------------------------------------------------
// ScreenUpdateTimer::Queue()
// Set timer event interval
// ---------------------------------------------------------
//
void CScreenUpdateTimer::Queue()
{
After( KIntervalBaseTime * iModel->iHundredths );
}
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -