logexampleappui.h

来自「Log Engine的使用」· C头文件 代码 · 共 127 行

H
127
字号
/*
* ============================================================================
*  Name     : CLogExampleAppUi from LogExampleAppui.h
*  Part of  : LogExample
*  Created  : 26.05.2005 by Forum Nokia 
*  Description:
*     Declares UI class for application.
*  Version  : 1.0
*  Copyright: Nokia Corporation 
* ============================================================================
*/

#ifndef __LOGEXAMPLEAPPUI_H__
#define __LOGEXAMPLEAPPUI_H__

// INCLUDE FILES
#include "DatabaseObserver.h"

#include <aknviewappui.h>
#include <akntabgrp.h>
#include <aknnavide.h>
#include <akntabobserver.h>

// FORWARD DECLARATIONS
class CLogExampleContainer;
class CLogExEngine;
class CLogExampleLogDatabaseObserver;


// CLASS DECLARATION

/**
* Application UI class.
* Provides support for the following features:
* - EIKON control architecture
* - view architecture
* - status pane
* 
*/
class CLogExampleAppUi : 	public CAknViewAppUi, 
							public MAknTabObserver,
							public MDatabaseObserver
	{
public: // Constructors and destructor

	/**
	* Two phased constructer
	*/	
    void ConstructL();

    /**
    * Destructor.
    */      
    ~CLogExampleAppUi();
    
public: // New functions
    
    /**
    * Returns model
    * @return model
    */
    CLogExEngine* Model();
        
public: // Functions from base classes

	/**
    * From MAknTabObserver.
    * @param aIndex tab index
    */
	void TabChangedL(TInt aIndex);
		
	/**
	* From MDatabaseObserver
	* called by CLogExampleLogDatabaseObserver
	* through MDatabaseObserver interface
	*/
	void NotifyChangeL();
			
private:
    
    /**
    * From MEikMenuObserver
    *
    * @param aResourceId
    * @param aMenuPane
    */
    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
	
	/**
	* SetTitleL()
	* Sets the title text of the title pane
	* @param aTitle text to set
	*/
	void SetTitleL(const TDesC& aTitle); 

private: //Data members
    
    CAknNavigationControlContainer* iNaviPane;
    CAknTabGroup*                   iTabGroup;
    CAknNavigationDecorator*        iDecoratedTabGroup;
    CLogExEngine* 					iLogEngine;
    CLogExampleLogDatabaseObserver* iLogDatabaseObserver;
	};

#endif

// End of File

⌨️ 快捷键说明

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