📄 silentsmsappui.cpp
字号:
/*
============================================================================
Name : SilentSmsAppUi.cpp
Author :
Version :
Copyright : Your copyright notice
Description : Main application UI class (controller)
============================================================================
*/
// INCLUDE FILES
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <SilentSms.rsg>
#include <f32file.h>
#include <s32file.h>
#include "SilentSms.pan"
#include "SilentSmsAppUi.h"
#include "SilentSmsAppView.h"
#include "SilentSms.hrh"
#include "Soc.h"
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CSilentSmsAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CSilentSmsAppUi::ConstructL()
{
// Initialise app UI with standard value.
BaseConstructL();
// Create view object
iAppView = CSilentSmsAppView::NewL( ClientRect() );
iSmsEngine=CSMSEngine::NewL();
}
// -----------------------------------------------------------------------------
// CSilentSmsAppUi::CSilentSmsAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CSilentSmsAppUi::CSilentSmsAppUi()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CSilentSmsAppUi::~CSilentSmsAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CSilentSmsAppUi::~CSilentSmsAppUi()
{
if(iSmsEngine)
{
delete iSmsEngine;
iSmsEngine = NULL;
}
if ( iAppView )
{
delete iAppView;
iAppView = NULL;
}
}
// -----------------------------------------------------------------------------
// CSilentSmsAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CSilentSmsAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case ESilentSmsCommand1:
{
iSmsEngine->SocketListen();
}
break;
default:
Panic( ESilentSmsUi );
break;
}
}
// -----------------------------------------------------------------------------
// Called by the framework when the application status pane
// size is changed. Passes the new client rectangle to the
// AppView
// -----------------------------------------------------------------------------
//
void CSilentSmsAppUi::HandleStatusPaneSizeChange()
{
iAppView->SetRect( ClientRect() );
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -