incallview.h

来自「symbian 2rd下可以获取并显示来电号码」· C头文件 代码 · 共 84 行

H
84
字号
#ifndef __INCALLVIEW_H__
#define __INCALLVIEW_H__

// INCLUDES

#include <coecntrl.h>	// CCoeControl
#include "CallEngine.h"

// FORWARD DECLARATIONS

// CLASS DECLARATION
class CEikLabel;
class CCegoViewManager;
class CCallEngine;

/**
*
* @class InCallView InCallView.h 
* @brief This is a container class for the information displaying of an incoming call
*
* Copyright (c) BJNNI Ltd 2007.12
* @author Perry Yan 2007.12.28
* @version 1.0
* 
*/
class CInCallView : public CCoeControl, MCoeControlObserver, MCallEngineObserver
    {
    public: // constructors and destructor
        static CInCallView* NewL(const TRect& aRect, const CCoeControl* aParent);
        static CInCallView* NewLC(const TRect& aRect, const CCoeControl* aParent);
        void ConstructL(const TRect& aRect);
        ~CInCallView();
        
        // Virtual function from MInCallEngineObserver
        virtual void HandleCallChangeL(const RCall::TStatus& aStatus);
        virtual void ShowPhoneNumber(HBufC * aPhoneNumber);

        // New method for this class
        void SetViewManager(CCegoViewManager* aViewManager);

        // For test purpose only
        void MakeCallL(const TDesC& aNumber);

        // Set the telephony engine
        inline void SetCallEngine(CCallEngine* _iEngine);
        
    private:
        // Constructor
        void ConstructL(const TRect& aRect, const CCoeControl* aParent);
        
        // Method from CCoeControl
        TInt CountComponentControls() const;
        CCoeControl* ComponentControl(TInt aIndex) const;
        void Draw(const TRect& aRect) const;
        void SizeChanged();
        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
        
        // New method for this class
        void CalculateRects();
        void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);

        // Attributes
        TRect iTopRect;
        TRect iBottomRect;
        CEikLabel* iTopCtrl;
        CEikLabel* iBottomCtrl;
        
        //
        CCallEngine* iCallEngine;

        CCegoViewManager* iViewManager;
        
        // Enumeration
        enum TComponentControls
            {
            ETop = 0,
            EBottom,
            ENumberOfControls
            };
    };

void CInCallView::SetCallEngine(CCallEngine * _iCallEngine) { iCallEngine = _iCallEngine; }
#endif

⌨️ 快捷键说明

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