📄 markgridappui.cpp
字号:
/*
* ============================================================================
* Name : CMarkGridAppUi from MarkGridAppui.cpp
* Part of : MarkGrid
* Created : 16.03.2006 by ToBeReplacedByAuthor
* Implementation notes:
* Initial content was generated by Series 60 Application Wizard.
* Version :
* Copyright: ToBeReplacedByCopyright
* ============================================================================
*/
// INCLUDE FILES
#include <eikmenup.h> // for CEikMenuPane
#include <avkon.hrh>
#include <avkon.rsg>
#include <MarkGrid.rsg>
#include "MarkGridAppui.h"
#include "MarkGridContainer.h"
#include "MarkGrid.hrh"
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CMarkGridAppUi::ConstructL()
//
// ----------------------------------------------------------
//
void CMarkGridAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = new (ELeave) CMarkGridContainer;
iAppContainer->SetMopParent( this );
iAppContainer->ConstructL( ClientRect() );
AddToStackL( iAppContainer );
}
// ----------------------------------------------------
// CMarkGridAppUi::~CMarkGridAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CMarkGridAppUi::~CMarkGridAppUi()
{
if (iAppContainer)
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
}
// ------------------------------------------------------------------------------
// CMarkGridAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
// This function is called by the EIKON framework just before it displays
// a menu pane. Its default implementation is empty, and by overriding it,
// the application can set the state of menu items dynamically according
// to the state of application data.
// ------------------------------------------------------------------------------
//
void CMarkGridAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
{
if(aResourceId==R_MARKGRID_MENU)
{
aMenuPane->SetItemDimmed(EMarkGridCmdDelete, iAppContainer->RecordCount()<=0);
}
}
// ----------------------------------------------------
// CMarkGridAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// takes care of key event handling
// ----------------------------------------------------
//
TKeyResponse CMarkGridAppUi::HandleKeyEventL(
const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
{
return EKeyWasNotConsumed;
}
// ----------------------------------------------------
// CMarkGridAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CMarkGridAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknCmdMark:
case EAknCmdUnmark:
case EAknMarkAll:
case EAknUnmarkAll:
{
iAppContainer->HandleMarkCommandL(aCommand);
break;
}
case EMarkGridCmdDelete:
{
iAppContainer->DeleteRecordL();
break;
}
case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
default:
break;
}
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -