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

📄 toptencontainer.cpp

📁 series60 应用程序开发的源代码 series60 应用程序开发的源代码
💻 CPP
字号:
/**
* 
* @brief Definition of CTopTenContainer
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/

// INCLUDES

//  Class include
#include "TopTenContainer.h"

// System includes

// User includes
#include "CallArray.h" // CCallArray

// CONSTANTS
const TInt KTopMostFrequent = 10;

// ================= MEMBER FUNCTIONS =======================

/**
* Symbian OS 2 phase constructor.
* Constructs the CTopTenContainer using the NewLC method, popping
* the constructed object from the CleanupStack before returning it.
* 
* @param aRect The rectangle for this window
* @param aDirectionId what type of calls to filter from log i.e incoming
* @param  aPhoneBookEngine reference to the phonebook engine
* @return The newly constructed CTopTenContainer
*/
CTopTenContainer* CTopTenContainer::NewL(const TRect& aRect, TInt aDirectionId, CPhoneBookEngine& aPhoneBookEngine)
{
    CTopTenContainer* self = CTopTenContainer::NewLC(aRect, aDirectionId, aPhoneBookEngine);
    CleanupStack::Pop(self);
    return self;
}

/**
* Symbian OS 2 phase constructor.
* Constructs the CTopTenContainer using the constructor and ConstructL 
* method, leaving the constructed object on the CleanupStack before returning it.
* 
* @param aRect The rectangle for this window
* @param aDirectionId what type of calls to filter from log i.e incoming
* @param  aPhoneBookEngine reference to the phonebook engine
* @return The newly constructed CTopTenContainer
*/
CTopTenContainer* CTopTenContainer::NewLC(const TRect& aRect, TInt aDirectionId, CPhoneBookEngine& aPhoneBookEngine)
{
    CTopTenContainer* self = new (ELeave) CTopTenContainer(aPhoneBookEngine);
    CleanupStack::PushL(self);
    self->ConstructL(aRect, aDirectionId);
    return self;
}

/**
* C++ constructor
* @param  aPhoneBookEngine reference to the phonebook engine
*/
CTopTenContainer::CTopTenContainer(CPhoneBookEngine& aPhoneBookEngine)
    :CCallContainer(aPhoneBookEngine)
{
}

/**
* Symbian OS 2nd phase constructor.  Calls the base constructor
* @param aRect The rectangle for this window
* @param aDirectionId The resource id of the direction we are interested in
*/ 
void CTopTenContainer::ConstructL(const TRect& aRect, TInt aDirectionId)
{
    CCallContainer::ConstructL(aRect, aDirectionId);    
}

/** 
* Destructor.
*/
CTopTenContainer::~CTopTenContainer()
{
}

/** 
* from MCallLogEngineObserver
* Called from CCallLogEngine, when call array
* has been populated with events from the log engine
*/
void CTopTenContainer::CallArrayCreatedL()
{
    iCallArray->AnalysisCallLogArrayL(CCallArray::EFrequency);
    iCallArray->CreateListBoxDescriptorsL(CCallArray::EFrequency);

    // reduce the number entries to the KTopMostFrequent 
    iCallArray->ReduceListL(KTopMostFrequent);
    SetListBoxArray();    
    
    // Cancel busy message
    CancelBusyDialog();
}

// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -