simpleex_ui.cpp

来自「symbian下的几个小例子。。很值得学习」· C++ 代码 · 共 53 行

CPP
53
字号
// simpleEx_ui.cpp
//
// Copyright (c) Symbian Software Ltd 1999 - 2007.  All rights reserved.
//
/*=================================================================
      This file contains the application UI class for SimpleEx.
      Enhanced to contain active object for Chapter 9 example.
==================================================================*/

#include "SimpleEx.h"
#include "countdown.h"
/*-------------------------------------------------------------
     CSimpleExAppUi class
--------------------------------------------------------------*/

void CSimpleExAppUi::ConstructL()
	{
    BaseConstructL();
	           
    iAppView = CSimpleExAppView::NewL(ClientRect());
    iCountdown = CCountdown::NewL(iAppView);
    iAppView->UpdateScreenText(KSimpleExText);
	}


CSimpleExAppUi::~CSimpleExAppUi()
    {
     delete iAppView;
     delete iCountdown;
    }

void CSimpleExAppUi::HandleCommandL(TInt aCommand)
    {
    switch(aCommand)
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            Exit();
            break;

        case ESimpleExCommand:
           iCountdown->StartCountdown();
           break;
        
        case ESimpleExStop:
           iCountdown->Stop();
           break;
     
        default:
        	; // Nothing to do
      }
    }

⌨️ 快捷键说明

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