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

📄 camtimer.h

📁 symbian s60 2nd下的手机定时拍照
💻 H
字号:
/*

        CamTimer.H - header file for CamTimer application, Series 60
        C++ implementation


*/


#if !defined __CamTimer_H__
#define __CamTimer_H__

// FORWARD DECLARATIONS
class CFbsBitmap;
class CCamTimerFormView;


// CLASS DEFINITIONS

//
//  CCamTimerContainer
//
class CCamTimerContainer : public CCoeControl
    {
public:
    ~CCamTimerContainer();                                     
    void ConstructL(CCamTimerFormView& aFormView);                                          
    CFbsBitmap* GetBmp();
    CFbsBitmap* GetBmpForSaving();
       
private:
	// Construct the container control
    void ConstructContainerControlL();
	// Method for drawing the control area
    void Draw(const TRect& aRect) const;

public:
    TBool iImageReady;

private:
    CFbsBitmap* iBmp;
	// handle to the FormView object owning this container
    CCamTimerFormView* iFormView;
    };

//
// CCamTimerFormView
//
// image util is used to save or open images in async. calls
class CCamTimerFormView : public CAknView, public MMdaImageUtilObserver
    {
    enum TCamTimerImageQuality
        {
        ERCHigh,
        ERCLow
        };

public:
	// C++ constructor
	CCamTimerFormView(TInt* aValue);
    void ConstructL();
    ~CCamTimerFormView();

public:
    TUid Id() const;
    void TurnCameraOnL();
    void TurnCameraOffL();
    void TimerL();
	void HandleForegroundEventL(TBool);
	// default image quality = High
    void TakePictureL(TCamTimerImageQuality aQuality = ERCHigh);
    void SaveImageL();

public:	 // from MMdaImageUtilObserver
    virtual void MiuoOpenComplete(TInt aError);
    virtual void MiuoConvertComplete(TInt aError);
    virtual void MiuoCreateComplete(TInt aError);

private:
    void DoActivateL(const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, 
			const TDesC8& /*aCustomMessage*/);
    void DoDeactivate();

private:
	// client to the camera server
    RCameraServ* iCamserv;

    CCamTimerContainer* iContainer;
    TInt iCurrentImage;
	// flag that tells when saving is taking place
    TBool iSavingImage;
	// Saves an image to a file
    CMdaImageBitmapToFileUtility* iFileSaver;
	// for saving
    TMdaJfifClipFormat* iFormat;

	// pointer to waiting time, which is located in the document class
	TInt*	iWaitingTime;

	// For player
    CAknKeySoundSystem* iSoundPlayer;

    };


/////////////////////////////////////////////////////////////////////
//
// CCamTimerDialog class
// An one-control dialog.
// 
/////////////////////////////////////////////////////////////////////
	// CCamTimerDialog is derived from CAknDialog
class CCamTimerDialog : public CAknDialog
	{
	public:
		// Constructor that enables getting number editor's value
        CCamTimerDialog(TInt& aValue);
	private:
		// Function for doing events that have to be done before setting layout
        void PreLayoutDynInitL();
		// Function for handling exiting
		TBool OkToExitL(TInt aButtonId);
		// Function for checking editors value
        void CheckEditorValue();
    private:
		// Pointer to externally owned variable for editor value
        TInt* iEditorValue;
	};

//
//  CCamTimerAppUi
//
class CCamTimerAppUi : public CAknViewAppUi
    {
public:
	// C++ constructor
    CCamTimerAppUi(TInt& aValue);
    void ConstructL();
    ~CCamTimerAppUi();

public: 
    TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

protected:        // from CEikAppui 
    void HandleCommandL(TInt aCommand); 

private:      
	// The function that is the actual backbone of the application
	void CmdDlgL(TInt aResourceId);
	// Pointer to value
    TInt* iWaitingTime;
 
private:
    void CompleteConstructL();
    };	


//
//  CCamTimerDocument
//
class CCamTimerDocument : public CAknDocument 
    {
public:
    CCamTimerDocument(CAknApplication& aApp);
protected:	
    CEikAppUi* CreateAppUiL();
private:
	// Value used for the timer.
    TInt iWaitingTime;

    };

//
//  CCamTimerApplication
//
class CCamTimerApplication : public CAknApplication
    {
private:        //From CEikApplication
    CApaDocument* CreateDocumentL();
    TUid AppDllUid() const;
    };



#endif  //__CamTimer_H__
//End of File

⌨️ 快捷键说明

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