halviewappui.cpp
来自「series60 应用程序开发的源代码 series60 应用程序开发的源代码」· C++ 代码 · 共 92 行
CPP
92 行
/**
*
* @brief Definition of CHalViewAppUi
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/
// INCLUDE FILES
// Class include
#include "HalViewappui.h"
// System includes
#include <aknnavi.h> // CAknNavigationControlContainer
#include <aknnavide.h> // CAknNavigationDecorator
#include <akntabgrp.h> // CAknTabGroup
#include <HalView.rsg>
// User includes
#include "HalView.hrh" // THalViewViewNumber
#include "HalViewView.h" // CHalViewView
// ================= MEMBER FUNCTIONS =======================
CHalViewAppUi::CHalViewAppUi()
{
}
/**
* Symbian OS 2nd phase constructor. Constructs the application's views,
* transferring ownership of them to the superclass.
* Sets view 1 as the default and remembers that this is the current view id.
*/
void CHalViewAppUi::ConstructL()
{
BaseConstructL();
// Show tabs for main views from resources
CEikStatusPane* sp = StatusPane();
// Fetch pointer to the default navi pane control
CAknNavigationControlContainer* naviPane = static_cast<CAknNavigationControlContainer*>(sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi)));
// Get pointer to the navigation decorator with the ResourceDecorator() function.
// Application owns the decorator and it has responsibility to delete the object.
iDecoratedTabGroup = naviPane->ResourceDecorator();
// Create and add the view that will display the output.
CHalViewView* view = CHalViewView::NewL();
AddViewL(view);
}
/**
* Destructor.
* Deletes the iDecoratedTabGroup
*/
CHalViewAppUi::~CHalViewAppUi()
{
delete iDecoratedTabGroup;
}
/**
* Utility function to return a pointer to the tabgroup control
*/
CAknTabGroup* CHalViewAppUi::TabGroup()
{
return static_cast<CAknTabGroup*>(iDecoratedTabGroup->DecoratedControl());
}
/**
* From CAknViewAppUi, takes care of command handling for both views.
*
* @param aCommand command to be handled
*/
void CHalViewAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EEikCmdExit:
{
Exit();
break;
}
default:
break;
}
}
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?