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

📄 logexamplecontainer.h

📁 专业的用于查询手机通话记录的代码
💻 H
字号:
/*
 * ============================================================================
 *  Name     : CLogExampleContainer from LogExampleContainer.h
 *  Part of  : LogExample
 *  Created  : 26.05.2005 by Forum Nokia 
 *  Description:
 *     Declares container control for application.
 *  Version  : 1.0
 *  Copyright: Nokia Corporation
 * ============================================================================
 */

#ifndef __LOGEXAMPLECONTAINER_H__
#define __LOGEXAMPLECONTAINER_H__

// INCLUDE FILES
#include <coecntrl.h>
#include <eiklbo.h>  		// MEikListBoxObserver
#include <badesca.h> 		// CDescArray
#include <logwrap.h>

#include "EventsObserver.h" // MEventsObserver

// FORWARD DECLARATIONS
class CAknColumnListBox;

// CLASS DECLARATION

/**
 *  CLogExampleContainer  container control class.
 *  
 */
class CLogExampleContainer : public CCoeControl, MCoeControlObserver,
    public MEventsObserver, MEikListBoxObserver

    {
public:
    // Constructors and destructor

    /**
     * Symbian default constructor.
     * @param aRect Frame rectangle for container.
     */
    void ConstructL(const TRect& aRect);

    /**
     * Destructor.
     */
    ~CLogExampleContainer();

public:
    // New functions

    /**
     * Resets events
     */
    void ResetEventList();

    /**
     * Shows event's details
     */
    void ShowEventDetailsL();

    /**
     * Gets selected id
     * @param aSelectedId  
     */
    void GetSelectedId(TLogId& aSelectedId);

    /**
     * Returns items count
     * @return count of items in list box
     */
    TInt ListBoxItemCount();

public:
    // Functions from base classes (MEventsObserver)

    /**
     * Reads a notify
     * @param aEvent event to be read
     */
    void NotifyEventReadL(const CLogEvent& aEvent);

    /**
     * Reads a notify
     * @param aEvent event to be read
     */
    void NotifyEventAddedL(const CLogEvent& aEvent);

    /**
     * Notifies an event is deleted
     */
    void NotifyEventDeletedL();

private:
    // Functions from base classes

    /**
     * From CoeControl,SizeChanged.
     */
    void SizeChanged();

    /**
     * From CCoeControl.
     */
    void HandleResourceChange(TInt aType);

    /**
     * From CoeControl,CountComponentControls.
     */
    TInt CountComponentControls() const;

    /**
     * From CCoeControl,ComponentControl.
     * @param aIndex
     */
    CCoeControl* ComponentControl(TInt aIndex) const;

    /**
     * From CCoeControl,Draw.
     * @param aRect
     */
    void Draw(const TRect& aRect) const;

    /**
     * From MCoeControlObserver
     * Acts upon changes in the hosted control's state. 
     *
     * @param	aControl	The control changing its state
     * @param	aEventType	The type of control event 
     */
    void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);

    /**
     * From MEikListBoxObserver
     *
     * @param aListBox
     * @param aListBoxEvent    
     */
    void HandleListBoxEventL(CEikListBox* aListBox,
                             TListBoxEvent aListBoxEvent);

private:
    // New functions

    /**
     * GetListBoxModel()
     * @return Pointer to array of listbox model
     */
    CDesCArray* GetListBoxModel();

    /**
     * OfferKeyEventL
     *
     * Framework calls this method when a key event occurs.
     *
     * @param aKeyEvent
     * @param aType
     */
    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);

private:
    //Data members

    CAknColumnListBox* iEventsListBox; // events list
    CArrayPtrFlat<CLogEvent>* iLogEvents;
    TInt iDeleteIndex;
    };

#endif

// End of File

⌨️ 快捷键说明

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