📄 alllistsview.cpp
字号:
/*
* ============================================================================
* Name : CAllListsView from AllListsView.h
* Part of : AllLists
* Created : 16.03.2006 by ToBeReplacedByAuthor
* Implementation notes:
* Initial content was generated by Series 60 Application Wizard.
* Version :
* Copyright: ToBeReplacedByCopyright
* ============================================================================
*/
// INCLUDE FILES
#include <avkon.hrh>
#include <aknviewappui.h>
#include <AllLists.rsg>
#include "AllLists.hrh"
#include "AllListsView.h"
#include "AllListsContainer.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CAllListsView::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CAllListsView::ConstructL()
{
BaseConstructL( R_ALLLISTS_VIEW1 );
}
// ---------------------------------------------------------
// CAllListsView::~CAllListsView()
// destructor
// ---------------------------------------------------------
//
CAllListsView::~CAllListsView()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CAllListsView::Id()
//
// ---------------------------------------------------------
//
TUid CAllListsView::Id() const
{
return KViewId;
}
// ---------------------------------------------------------
// CAllListsView::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CAllListsView::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAllListsCmdSingle:
case EAllListsCmdSingleNumber:
case EAllListsCmdSingleHeading:
case EAllListsCmdSingleGraphic:
case EAllListsCmdSingleGraphicHeading:
case EAllListsCmdSingleNumberHeading:
case EAllListsCmdSingleLarge:
{
TInt id = aCommand - EAllListsCmdSingle + R_ALLLISTS_SINGLE_LISTBOX;
iContainer->ShowListBoxL(id);
break;
}
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ---------------------------------------------------------
// CAllListsView::HandleClientRectChange()
// ---------------------------------------------------------
//
void CAllListsView::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CAllListsView::DoActivateL(...)
//
// ---------------------------------------------------------
//
void CAllListsView::DoActivateL(
const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = new (ELeave) CAllListsContainer;
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ---------------------------------------------------------
// CAllListsView::DoDeactivate()
//
// ---------------------------------------------------------
//
void CAllListsView::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
iContainer = NULL;
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -