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

📄 mpsappview.cpp

📁 Describes how to create links and dispaly in views
💻 CPP
字号:
/*
 ============================================================================
 Name		: CameraAppView.cpp
 Author	  : 
 Copyright   : Your copyright notice
 Description : Application view implementation
 ============================================================================
 */

// INCLUDE FILES
#include <coemain.h>
#include "mpsAppView.h"
#include "EIKENV.H"
#include "mps.hrh"
#include <MPS.rsg>
#include "AknAppUi.h"
#include "AppContainer.h"
#include "mpsappui.h"
#include "aknview.h"

// ============================ MEMBER FUNCTIONS ===============================

//*
/* ============================================================================
*  Name     : CMPSAppView 
*  Created  : 25/03/2009 by TELXSI
*  Implementation notes:
*     Initial content was generated by Series 60 AppWizard.
*  Version  :
*  Copyright: TELXSI
* ============================================================================
*/



// ---------------------------------------------------------
// CMPSAppView::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CMPSAppView::ConstructL()
    {
    BaseConstructL( R_P_T_MAINVIEW_VIEW1 );
    }

// ---------------------------------------------------------
// CMPSAppView::~CMPSAppView()
// destructor
// ---------------------------------------------------------
//
CMPSAppView::~CMPSAppView()
    {
    if ( iContainer )
        {
        AppUi()->RemoveFromViewStack( *this, iContainer );
        }

    delete iContainer;
    }

CMPSAppView::CMPSAppView()
    {
   
    }
// ---------------------------------------------------------
// TUid CMPSAppView::Id()
//
// ---------------------------------------------------------
//
TUid CMPSAppView::Id() const
    {
    return KViewMain;
    }

// ---------------------------------------------------------
// CMPSAppView::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CMPSAppView::HandleCommandL(TInt aCommand)
    {   
    switch ( aCommand )
        {
     /*   case ECommand1:
            {
           // iEikonEnv->InfoMsg( _L("view1 ok") );
            AppUi()->HandleCommandL(ECommand1);
            break;
            }
        case ECommand2:
            {
           AppUi()->HandleCommandL(EAknCmdExit);
          
            break;
            }
            */
      //  case ECommand3:
                  //  {
              //     AppUi()->HandleCommandL(EAknCmdExit);
                  
                   // break;
                   // }
            
            
        default:
            {
            AppUi()->HandleCommandL( aCommand );
            break;
            }
        }
    }

// ---------------------------------------------------------
// CMPSAppView::HandleClientRectChange()
// ---------------------------------------------------------
//
void CMPSAppView::HandleClientRectChange()
    {
    if ( iContainer )
        {
        iContainer->SetRect( ClientRect() );
        }
    }

// ---------------------------------------------------------
// CMPSAppView::DoActivateL(...)
// 
// ---------------------------------------------------------
//
void CMPSAppView::DoActivateL(
   const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
   const TDesC8& /*aCustomMessage*/)
    {
    if (!iContainer)
        {
        iContainer = new (ELeave) CAppContainer;
        iContainer->SetMopParent(this);
        StatusPane()->MakeVisible(EFalse);
        iContainer->ConstructL( ClientRect() );
        AppUi()->AddToStackL( *this, iContainer );
        } 
   }

// ---------------------------------------------------------
// CMPSAppView::DoDeactivate()
// 
// ---------------------------------------------------------
//
void CMPSAppView::DoDeactivate()
    {
    if ( iContainer )
        {
        AppUi()->RemoveFromViewStack( *this, iContainer );
        }
    
    delete iContainer;
    iContainer = NULL;
    }

// End of File

⌨️ 快捷键说明

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