📄 testnoteappui.cpp
字号:
/*
============================================================================
Name : TestNoteAppUi.cpp
Author : Lion
Copyright : Your copyright notice
Description : CTestNoteAppUi implementation
============================================================================
*/
// INCLUDE FILES
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <TestNote.rsg>
#include <f32file.h>
#include <s32file.h>
#include "TestNote.pan"
#include "TestNoteAppUi.h"
#include "TestNoteAppView.h"
#include "TestNote.hrh"
_LIT( KFileName, "C:\\private\\07AF2204\\TestNote.txt" );
_LIT( KText, "Hello World!");
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CTestNoteAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CTestNoteAppUi::ConstructL()
{
// Initialise app UI with standard value.
BaseConstructL();
// Create view object
iAppView = CTestNoteAppView::NewL( ClientRect() );
}
// -----------------------------------------------------------------------------
// CTestNoteAppUi::CTestNoteAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CTestNoteAppUi::CTestNoteAppUi()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CTestNoteAppUi::~CTestNoteAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CTestNoteAppUi::~CTestNoteAppUi()
{
if ( iAppView )
{
delete iAppView;
iAppView = NULL;
}
}
// -----------------------------------------------------------------------------
// CTestNoteAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CTestNoteAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case ECommand1:
{
CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote;
note->ExecuteLD(_L("Confirmation Note"));
}
break;
case ECommand2:
{
CAknInformationNote* note = new (ELeave) CAknInformationNote;
note->ExecuteLD(_L("Information Note"));
}
break;
case ECommand3:
{
CAknWarningNote* note = new (ELeave) CAknWarningNote;
note->ExecuteLD(_L("Information Note"));
}
break;
case ECommand4:
{
CAknErrorNote* note = new (ELeave) CAknErrorNote;
note->ExecuteLD(_L("Information Note"));
}
break;
default:
Panic( ETestNoteUi );
break;
}
}
// -----------------------------------------------------------------------------
// Called by the framework when the application status pane
// size is changed. Passes the new client rectangle to the
// AppView
// -----------------------------------------------------------------------------
//
void CTestNoteAppUi::HandleStatusPaneSizeChange()
{
iAppView->SetRect( ClientRect() );
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -