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