?? aolabbubblesortappui.cpp
字號:
// Copyright (c) 2006 Nokia Corporation.
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <AOLabBubbleSort.rsg>
#include <f32file.h>
#include <s32file.h>
#include "AOLabBubbleSortAppUi.h"
#include "AOLabBubbleSortContainer.h"
#include "AOLabBubbleSort.hrh"
// Symbian 2nd phase constructor
void CAOLabBubbleSortAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = CAOLabBubbleSortContainer::NewL(ClientRect());
}
// C++ constructor
CAOLabBubbleSortAppUi::CAOLabBubbleSortAppUi()
{
// No implementation required
}
// C++ Destructor
CAOLabBubbleSortAppUi::~CAOLabBubbleSortAppUi()
{
delete iAppContainer;
}
// 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 CAOLabBubbleSortAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
{
if (aResourceId == R_MENU)
{
if (iAppContainer->IsSorting())
{
aMenuPane->SetItemTextL(ECommandSort, R_COMMAND_CANCELSORTING);
}
else
{
aMenuPane->SetItemTextL(ECommandSort,R_COMMAND_STARTSORTING);
}
}
}
// Takes care of command handling
void CAOLabBubbleSortAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
{
Exit();
break;
}
case ECommandSort:
{
if (iAppContainer->IsSorting())
{
iAppContainer->CancelSortL();
}
else
{
iAppContainer->SortL();
}
break;
}
default:
break;
}
}
// Called by the framework when the application status pane size is changed.
void CAOLabBubbleSortAppUi::HandleStatusPaneSizeChange()
{
iAppContainer->SetRect( ClientRect() );
}
// End of File
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -