📄 alarmnotificationappui.cpp
字号:
/* ====================================================================
* File: alarmnotificationAppUi.cpp
* Created: 10/16/06
* Author:
* Copyright (c): All rights reserved
* ==================================================================== */
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <almconst.h>
#include "alarmnotification.pan"
#include "alarmnotificationAppUi.h"
#include "alarmnotificationAppView.h"
#include "alarmnotification.hrh"
// ConstructL is called by the application framework
void CAlarmNotificationAppUi::ConstructL()
{
BaseConstructL();
iAppView = CAlarmNotificationAppView::NewL(ClientRect());
//Connect to Alarm Server
iCliSession.Connect();
AddToStackL(iAppView);
}
CAlarmNotificationAppUi::CAlarmNotificationAppUi()
{
// no implementation required
}
CAlarmNotificationAppUi::~CAlarmNotificationAppUi()
{
if (iAppView)
{
RemoveFromStack(iAppView);
delete iAppView;
iAppView = NULL;
}
iCliSession.Close();
}
// handle any menu commands
void CAlarmNotificationAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case EalarmnotificationCommand1:
{
RArray<TAlarmId> ids;
// Get List of all alarm
iCliSession.GetAlarmIdListL(ids);
TASShdAlarm alarm;
for(TInt i = 0; i<ids.Count();i++)
{
TInt err ( KErrNone );
err = iCliSession.GetAlarmDetails( ids[i], alarm );
if( (!err))
{
if ( alarm.Category().iUid == KAlarmClockOne.iUid )
{
CEikonEnv::InfoWinL(_L("Clock Alarm"),alarm.Message());
}
else
{
CEikonEnv::InfoWinL(_L("Not Clock Alarm"),alarm.Message());
}
}
}
}
break;
default:
Panic(EalarmnotificationBasicUi);
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -