simpledlgappui.cpp
来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C++ 代码 · 共 79 行
CPP
79 行
/**
*
* @brief Definition of CSimpleDlgAppUi
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
// INCLUDE FILES
// Class include
#include "SimpleDlgAppUi.h"
// System includes
#include <SimpleDlg.rsg> // R_SIMPLEDLG_DIALOG
// User includes
#include "SimpleDlgDialog.h" // CSimpleDlgDialog
#include "SimpleDlgPlayerNameDialog.h" // CSimpleDlgPlayerNameDialog
// ================= MEMBER FUNCTIONS =======================
/**
* Symbian OS 2nd phase constructor. Constructs and executes the application's dialog,
* setting itself as the dialog's MOP parent, and adds it to the control
* stack.
*/
void CSimpleDlgAppUi::ConstructL()
{
BaseConstructL();
iAppDialog = new (ELeave) CSimpleDlgDialog;
iAppDialog->SetMopParent(this);
iAppDialog->ExecuteLD(R_SIMPLEDLG_DIALOG);
AddToStackL(iAppDialog);
}
/**
* Destructor.
* Removes the application's dialog from the stack and deletes it.
*/
CSimpleDlgAppUi::~CSimpleDlgAppUi()
{
if (iAppDialog)
{
RemoveFromStack(iAppDialog);
delete iAppDialog;
}
}
/**
* From CEikAppUi, takes care of command handling.
*
* @param aCommand command to be handled
*/
void CSimpleDlgAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case ESimpleDlgCmdNewGame:
{
if (CSimpleDlgPlayerNameDialog::RunDlgLD (iPlayerName))
{
StartNewGameL();
}
break;
}
case EEikCmdExit:
{
Exit();
break;
}
default:
break;
}
}
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?