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

📄 cameraappappui.h

📁 SYMBIAN camera 样例程序如果需要了解更多或缺少什么文件可以邮件联系我
💻 H
字号:
/*
* ============================================================================
*  Name     : CCameraAppAppUi from CameraAppAppUi.h
*  Part of  : CameraApp
*  Description:
*     Declares UI class for application.
*  Created  : 05/06/2006 by Forum Nokia
*  Version  : 2.0
*  Copyright: Nokia Corporation, 2006
* ============================================================================
*/

#ifndef __CAMERAAPP_APPUI_H__
#define __CAMERAAPP_APPUI_H__

#include <eikapp.h>
#include <eikdoc.h>
#include <e32std.h>
#include <coeccntx.h>
#include <aknviewappui.h>
#include <akntabgrp.h>
#include <aknnavide.h>

class CCameraAppContainer;
class CCameraAppController;

// The native Media Gallery application's UID in S60 platform 2nd Edition FP1 
// (Symbian OS v7.0s) and older 
#define KMediaGalleryUID3PreFP1            0x101f4d8f
// The native Media Gallery application's UID in S60 platform 2nd Edition FP2 
// (Symbian OS v8.0a) and newer, including 3rd Edition
#define KMediaGalleryUID3PostFP1           0x101f8599

#define KMediaGalleryListViewUID            0x00000001
#define KMediaGalleryCmdMoveFocusTo         0x00000001

#define EStdKeyCameraFocus                  0xe2        
#define EKeyCameraShutter                   0xf883        

#define KAppOrientationLandscape            0x00030000

enum TCameraMode
    {
    EIdle,
    EViewFinding,
    EImageSnapped
    };


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

        /**
        * Constructor.
        */
        CCameraAppAppUi();
        /**
        * Symbian OS 2nd phase constructor.
        */      
        void ConstructL();

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

    public: // Public methods
        /**
        * Returns a pointer to the decorated tab group owned by this AppUi
        */
        CAknNavigationDecorator* GetDecoratedTabGroup();
        
    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 methods
        /**
        * Returns KAppOrientationLandscape for devices where the 
        * camera is designed to work in landscape orientation, 0
        * for others.
        @return TUint32 (flag to be passed to CAknAppUi::BaseConstructL)
        */
        TUint32 ResolveCameraOrientation();

    private:
        /**
        * Prepare to snap the next image
        */
        void DoNewImageL();

        /**
        * Snap an image
        */
        void DoSnapL();

        /**
        * View images using Media Gallery application
        */
        void GoToMediaGalleryL();

    private: // Data
        CAknNavigationControlContainer* iNaviPane;
        CAknTabGroup*                   iTabGroup;
        CAknNavigationDecorator*        iDecoratedTabGroup;

        CCameraAppController*           iController;

        // Whether the camera is in viewfinding mode or in the 
        // image snapped mode
        TCameraMode iCameraMode;
        TInt iMediaGalleryUid3;
        
        TInt32 iCameraKeyHandle;
    };

#endif // __CAMERAAPP_APPUI_H__

⌨️ 快捷键说明

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