📄 s60appengineslabappui.cpp
字号:
/*
* ============================================================================
* Name : CS60AppEnginesLabAppUi from S60AppEnginesLabAppUi.cpp
* Part of : S60AppEnginesLab
* Created : 09/02/2004 by
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright:
* ============================================================================
*/
// INCLUDE FILES
#include "S60AppEnginesLabAppUi.h"
#include "S60AppEnginesLabContainer.h"
#include <S60AppEnginesLab.rsg>
#include "s60appengineslab.hrh"
_LIT(KEventText, "event text string");
_LIT(KApptText, "appointment text string");
const TInt KDefaultTime=60; // used when opening the agenda file
#include <avkon.hrh>
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CS60AppEnginesLabAppUi::ConstructL()
//
// ----------------------------------------------------------
//
void CS60AppEnginesLabAppUi::ConstructL()
{
BaseConstructL();
iParaFmtLayer = CParaFormatLayer::NewL();
iCharFmtLayer = CCharFormatLayer::NewL();
// start time for entries - January 31 2004 10.00 AM
iStartTime.Set(2004,EJanuary,31,10,0,0,0);
// end time for entries - January 31 2004 12.30 PM
iEndTime.Set(2004,EJanuary,31,12,30,0,0);
iAppContainer = new (ELeave) CS60AppEnginesLabContainer;
iAppContainer->SetMopParent( this );
iAppContainer->ConstructL( ClientRect()/*, iAgnModel->EntryCount() */);
AddToStackL( iAppContainer );
}
// ----------------------------------------------------
// CS60AppEnginesLabAppUi::~CS60AppEnginesLabAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CS60AppEnginesLabAppUi::~CS60AppEnginesLabAppUi()
{
if (iAppContainer)
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
// uncomment the following
// iFs.Close();
// delete iAgnModel;
// iAgnServ->Close();
// delete iAgnServ;
delete iParaFmtLayer;
delete iCharFmtLayer;
}
// ------------------------------------------------------------------------------
// CS60AppEnginesLabAppUi::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 CS60AppEnginesLabAppUi::DynInitMenuPaneL(
TInt aResourceId,CEikMenuPane* aMenuPane)
{
// uncomment the following
/*
if (aResourceId == R_S60APPENGINESLAB_MENU)
{
aMenuPane->SetItemDimmed(ES60AppEnginesLabCmdDeleteEntry, EFalse);
aMenuPane->SetItemDimmed(ES60AppEnginesLabCmdAddEvent, EFalse);
aMenuPane->SetItemDimmed(ES60AppEnginesLabCmdAddAppt, EFalse);
// check if entries exist
if (iAgnModel->EntryCount()==0)
{
aMenuPane->SetItemDimmed(ES60AppEnginesLabCmdDeleteEntry, ETrue);
aMenuPane->SetItemDimmed(ES60AppEnginesLabCmdDeleteAll, ETrue);
}
}
*/
}
// ----------------------------------------------------
// CS60AppEnginesLabAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// takes care of key event handling
// ----------------------------------------------------
//
TKeyResponse CS60AppEnginesLabAppUi::HandleKeyEventL(
const TKeyEvent& /*aKeyEvent*/,TEventCode /*aType*/)
{
return EKeyWasNotConsumed;
}
// ----------------------------------------------------
// CS60AppEnginesLabAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CS60AppEnginesLabAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
case ES60AppEnginesLabCmdAddEvent:
{
break;
}
case ES60AppEnginesLabCmdAddAppt:
{
break;
}
case ES60AppEnginesLabCmdDeleteEntry:
{
break;
}
case ES60AppEnginesLabCmdDeleteAll:
{
// uncomment the following
// iAppContainer->UpdateL(iAgnModel->EntryCount());
break;
}
// TODO: Add Your command handling code here
default:
break;
}
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -