⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myxmlparseappui.cpp

📁 symbian os xml parse
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CMyXMLParseAppUi from MyXMLParseAppui.cpp
*  Part of  : MyXMLParse
*  Created  : 19.05.2008 by 
*  Implementation notes:
*     Initial content was generated by Series 60 Application Wizard.
*  Version  :
*  Copyright: 
* ============================================================================
*/

// INCLUDE FILES
#include "MyXMLParseAppui.h"
#include "MyXMLParseView.h"
#include "MyXMLParseView2.h"
#include "MyXMLParseView3.h"
#include <MyXMLParse.rsg>
#include "MyXMLParse.hrh"



#include <avkon.hrh>

// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CMyXMLParseAppUi::ConstructL()
// 
// ----------------------------------------------------------
//
void CMyXMLParseAppUi::ConstructL()
    {
    BaseConstructL();


    // Show tabs for main views from resources
    CEikStatusPane* sp = StatusPane();

    // Fetch pointer to the default navi pane control
    iNaviPane = (CAknNavigationControlContainer*)sp->ControlL( 
        TUid::Uid(EEikStatusPaneUidNavi));

    // Tabgroup has been read from resource and it were pushed to the navi pane. 
    // Get pointer to the navigation decorator with the ResourceDecorator() function. 
    // Application owns the decorator and it has responsibility to delete the object.
    iDecoratedTabGroup = iNaviPane->ResourceDecorator();
    if (iDecoratedTabGroup)
	{
        iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl();
		iTabGroup->SetObserver( this );
	}

    CMyXMLParseView* view1 = new (ELeave) CMyXMLParseView;

    CleanupStack::PushL( view1 );
    view1->ConstructL();
    AddViewL( view1 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // view1

    CMyXMLParseView2* view2 = new (ELeave) CMyXMLParseView2;

    CleanupStack::PushL( view2 );
    view2->ConstructL();
    AddViewL( view2 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // view2

	CMyXMLParseView3* view3 = new (ELeave) CMyXMLParseView3;

    CleanupStack::PushL( view3 );
    view3->ConstructL();
    AddViewL( view3 );      // transfer ownership to CAknViewAppUi
    CleanupStack::Pop();    // view1

    SetDefaultViewL(*view1);

    }

// ----------------------------------------------------
// CMyXMLParseAppUi::~CMyXMLParseAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CMyXMLParseAppUi::~CMyXMLParseAppUi()
    {
    delete iDecoratedTabGroup;
   }

// ------------------------------------------------------------------------------
// CMyXMLParseAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
//  This function is 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 CMyXMLParseAppUi::DynInitMenuPaneL(
    TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
    {
    }

// ----------------------------------------------------
// CMyXMLParseAppUi::HandleKeyEventL(
//     const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// takes care of key event handling
// ----------------------------------------------------
//
TKeyResponse CMyXMLParseAppUi::HandleKeyEventL(
    const TKeyEvent& aKeyEvent,TEventCode aType)
    {
	if ( iTabGroup == NULL )
        {
        return EKeyWasNotConsumed;
        }

    if ( aKeyEvent.iCode == EKeyLeftArrow || aKeyEvent.iCode == EKeyRightArrow )
        {
        return iTabGroup->OfferKeyEventL( aKeyEvent, aType );
        }
    else
        {
        return EKeyWasNotConsumed;
        }
    }

// ----------------------------------------------------
// CMyXMLParseAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CMyXMLParseAppUi::HandleCommandL(TInt aCommand)
    {
    switch ( aCommand )
        {
        case EEikCmdExit:
            {
            Exit();
            break;
            }
//        case EMyXMLParseCmdAppTest:
//            {
//            iEikonEnv->InfoMsg(_L("test"));
//            break;
//            }
        // TODO: Add Your command handling code here

        default:
            break;      
        }
    }


 // ----------------------------------------------------
 // CMyXMLParseAppUi::TabChangedL(TInt aIndex)
 // This method gets called when CAknTabGroup active 
 // tab has changed.
 // ----------------------------------------------------
 //
void CMyXMLParseAppUi::TabChangedL(TInt aIndex)
{
     ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(aIndex)));
}

TBuf<128>  CMyXMLParseAppUi::Share()
{	
	return iShare;
}

TBuf<128> CMyXMLParseAppUi::Getfilename(TBuf<128> abuf)
{
	iShare=abuf;
	return iShare;	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -