⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 screenupdatetimer.cpp

📁 play stream media file. OS: symbian s60
💻 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 + -