S60UIExampleappui.cpp
上传用户:laixiong
上传日期:2007-03-11
资源大小:2994k
文件大小:2k
- // Copyright (c) 2006 Nokia Corporation.
- #include <e32std.h>
- #include "S60UIExample.pan"
- #include "S60UIExampleAppUi.h"
- #include "S60UIExampleInitialView.h"
- #include "S60UIExamplePlayView.h"
- #include "S60UIExampleModel.h"
- // -----------------------------------------------------------------------------
- // CS60UIExampleAppUi::ConstructL()
- // Symbian 2nd phase constructor can leave.
- // -----------------------------------------------------------------------------
- //
- void CS60UIExampleAppUi::ConstructL()
- {
- // Initialise app UI
- BaseConstructL();
-
- // Create a model to hold data
- iModel = CS60UIExampleModel::NewL();
-
- // Creates views
- iAppInitialView = CS60UIExampleInitialView::NewL(*iModel);
- // Transfer ownership to base class
- AddViewL(iAppInitialView);
- SetDefaultViewL(*iAppInitialView);
- }
- CS60UIExampleAppUi::~CS60UIExampleAppUi()
- {
- delete iModel;
- }
-
- // -----------------------------------------------------------------------------
- // CS60UIExampleAppUi::HandleCommandL()
- // Takes care of command handling.
- // -----------------------------------------------------------------------------
- //
- void CS60UIExampleAppUi::HandleCommandL(TInt aCommand)
- {
- switch (aCommand)
- {
- case EEikCmdExit:
- case EAknSoftkeyExit:
- Exit();
- break;
-
- default:
- Panic(ES60UIExampleBasicUi);
- break;
-
- }
- }
- // End of File