timerappui.h

来自「《基于Symbian OS的手机开发与应用实践》这本书的配套源码。」· C头文件 代码 · 共 95 行

H
95
字号
/*
* ============================================================================
*  Name     : CTimerAppUi from TimerAppui.h
*  Part of  : Timer
*  Created  : 05.02.2006 by ToBeReplacedByAuthor
*  Description:
*     Declares UI class for application.
*  Version  :
*  Copyright: ToBeReplacedByCopyright
* ============================================================================
*/

#ifndef TIMERAPPUI_H
#define TIMERAPPUI_H

// INCLUDES
#include <aknappui.h>

#include "CountdownTimer.h"

// FORWARD DECLARATIONS
class CTimerModel;
class CTimerContainer;


// CLASS DECLARATION

/**
* Application UI class.
* Provides support for the following features:
* - EIKON control architecture
* 
*/
class CTimerAppUi : public CAknAppUi, public CCountdownTimer::MObserver
    {
    public: // // Constructors and destructor

        /**
        * EPOC default constructor.
        */      
        void ConstructL();

        /**
        * Destructor.
        */      
        ~CTimerAppUi();
        
    public: // New functions

    public: // Functions from CCountdownTimer::MObserver
        void OnTimerL(const TTime& aTime);

    private:
        // From MEikMenuObserver
        void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);

    private:
        /**
        * From CEikAppUi, takes care of command handling.
        * @param aCommand command to be handled
        */
        void HandleCommandL(TInt aCommand);

        /**
        * From CEikAppUi, handles key events.
        * @param aKeyEvent Event to handled.
        * @param aType Type of the key event. 
        * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
        */
        virtual TKeyResponse HandleKeyEventL(
            const TKeyEvent& aKeyEvent,TEventCode aType);

    private: // New functions
        /**
        * Set the command button array of the application
        * @param aResourceId The id of the new CBA resource
        */
        void SetCbaL(TInt aResourceId);

    private: //Data
        /// The model
        CTimerModel* iModel;

        /// The container
        CTimerContainer* iAppContainer; 

        /// The timer
        CCountdownTimer* iTimer;

    };

#endif

// End of File

⌨️ 快捷键说明

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