📄 graphicexamview2.cpp
字号:
/*
============================================================================
Name : CGraphicExamView2 from GraphicExamView2.h
Author : hou maoqing
Version :
Copyright : Copyright (c) Hou maoqing 2008
Description : CGraphicExamView2 implementation
============================================================================
*/
// INCLUDE FILES
#include <aknviewappui.h>
#include <avkon.hrh>
#include <GraphicExam.rsg>
#include "GraphicExamView2.h"
#include "GraphicExamContainer2.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CGraphicExamView2::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CGraphicExamView2::ConstructL()
{
BaseConstructL( R_GRAPHICEXAM_VIEW2 );
}
// ---------------------------------------------------------
// CGraphicExamView2::~CGraphicExamView2()
// destructor
// ---------------------------------------------------------
//
CGraphicExamView2::~CGraphicExamView2()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CGraphicExamView2::Id()
//
// ---------------------------------------------------------
//
TUid CGraphicExamView2::Id() const
{
return KView2Id;
}
// ---------------------------------------------------------
// CGraphicExamView2::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CGraphicExamView2::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyOk:
{
iEikonEnv->InfoMsg( _L("view2 ok") );
break;
}
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ---------------------------------------------------------
// CGraphicExamView2::HandleClientRectChange()
// ---------------------------------------------------------
//
void CGraphicExamView2::HandleClientRectChange()
{
if ( iContainer )
{
iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CGraphicExamView2::DoActivateL(...)
//
// ---------------------------------------------------------
//
void CGraphicExamView2::DoActivateL(
const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = new (ELeave) CGraphicExamContainer2;
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ---------------------------------------------------------
// CGraphicExamView2::DoDeactivate()
//
// ---------------------------------------------------------
//
void CGraphicExamView2::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
iContainer = NULL;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -