?? listboxrefreshtimer.cpp
字號:
/*
* ============================================================================
* Name : CListboxRefreshTimer from ListboxRefreshTimer.h
* Part of : ThreadAO
* Created : 12.1.2005 by Forum Nokia
* Version : 1.0
* Copyright: Nokia Corporation
* ============================================================================
*/
// INCLUDES
#include <e32base.h>
#include "aknnotewrappers.h"
#include "DeviceListContainer.h"
// Listbox screen update interval
const TInt KSecond = 1000 * 1000;
#include "ListboxRefreshTimer.h"
// ----------------------------------------------------------------------------
// CListboxRefreshTimer::CListboxRefreshTimer(void)
//
// Constructor.
// ----------------------------------------------------------------------------
CListboxRefreshTimer::CListboxRefreshTimer(CDeviceListContainer* aListBox)
: CTimer(CActive::EPriorityStandard), iListbox(aListBox)
{
}
// ----------------------------------------------------------------------------
// CListboxRefreshTimer::~CListboxRefreshTimer(void)
//
// Destructor.
// ----------------------------------------------------------------------------
CListboxRefreshTimer::~CListboxRefreshTimer(void)
{
Cancel();
}
CListboxRefreshTimer* CListboxRefreshTimer::NewL(CDeviceListContainer* aListBox)
{
CListboxRefreshTimer* self = CListboxRefreshTimer::NewLC(aListBox);
CleanupStack::Pop(self);
return self;
}
CListboxRefreshTimer* CListboxRefreshTimer::NewLC(CDeviceListContainer* aListBox)
{
CListboxRefreshTimer* self = new (ELeave) CListboxRefreshTimer(aListBox);
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
// Standard Symbian OS 2nd phase constructor
void CListboxRefreshTimer::ConstructL()
{
CTimer::ConstructL();
CActiveScheduler::Add(this);
}
// ----------------------------------------------------------------------------
// CListboxRefreshTimer::StartL()
//
// Start updating the listbox.
// ----------------------------------------------------------------------------
void CListboxRefreshTimer::StartL()
{
After( KSecond );
}
// ----------------------------------------------------------------------------
// CListboxRefreshTimer::RunL()
// ----------------------------------------------------------------------------
void CListboxRefreshTimer::RunL()
{
// Update the listbox.
iListbox->HandleChangedL();
// Wait for a while and run the same function again
After( KSecond );
}
// ----------------------------------------------------------------------------
// CListboxRefreshTimer::DoCancel()
//
// Cancel and stop the timer.
// ----------------------------------------------------------------------------
void CListboxRefreshTimer::DoCancel()
{
CTimer::DoCancel();
}
// ----------------------------------------------------------------------------
// CListboxRefreshTimer::RunError(TInt)
// ----------------------------------------------------------------------------
TInt CListboxRefreshTimer::RunError(TInt)
{
return KErrNone;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -