亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? camtimer.cpp

?? symbian s60 2nd下的手機(jī)定時(shí)拍照
?? CPP
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
    bmp = NULL;
    }

/*
-------------------------------------------------------------------------------

    SaveImageL();

    Description: Save an image. This function starts an asynchronous series of
                 functions to save the image into a file.

    Return value: N/A

-------------------------------------------------------------------------------
*/

void CCamTimerFormView::SaveImageL()
    {

	// Delete old thumb nail-file
	RFs fsSession;
	User::LeaveIfError(fsSession.Connect());

	CFileMan* fileMan = CFileMan::NewL(fsSession);
    CleanupStack::PushL(fileMan);

	fileMan->Delete(KThumbnailFilename,0);
	
	CleanupStack::PopAndDestroy(); // FileMan
    fsSession.Close();

    // Be sure that we have an image to be saved  
    if(iContainer->iImageReady)
        {
        // gets path where to save the image
        TFileName newFilePathAndName(KCamTimerFilename);
        // Create Format and Codec
		// quality factor from 0 to 100 (55 used here)
        iFormat->iSettings.iQualityFactor = KJpgSavingQualityFactor; 
        iFormat->iSettings.iSampleScheme = 
			TMdaJpgSettings::TColorSampling(TMdaJpgSettings::EColor420);

        TMdaPackage* codec = NULL;
        CleanupStack::PushL(codec);

        // create a file to save the image into
        // this is done in an asynch function
        iFileSaver->CreateL( newFilePathAndName, iFormat, codec, NULL );

		// set flag, can't take new pictures when saving
        iSavingImage = ETrue; 

		// codec
        CleanupStack::PopAndDestroy(1); 
      
		// increase the "index" by one (not used for anything at the moment)
        iCurrentImage++; 
        }
    }

/*
-------------------------------------------------------------------------------

    MiuoCreateComplete();

    Description: This function is called when the asynch. function 
                 iFileSaver->CreateL() completes. The error value tells if the
                 creation was successful. If it was, we have created a file
                 into which we can now save the image.

    Return value: N/A

-------------------------------------------------------------------------------
*/
void CCamTimerFormView::MiuoCreateComplete(TInt aError)
    {
    if (( aError == KErrNone) && iFileSaver)
        {
        TRAP( aError, iFileSaver->ConvertL(*(iContainer->GetBmpForSaving()), 
			TRect(0,0,0,0), 0));
        }
    else 
        {
        User::Leave(aError);
        }
    }

/*
-------------------------------------------------------------------------------

    MiuoConvertComplete();

    Description: This function is called when the asynch. function 
                 iFileSaver->ConvertL() completes. Now the image saving has
                 completed.

    Return value: N/A

-------------------------------------------------------------------------------
*/
void CCamTimerFormView::MiuoConvertComplete(TInt /*aError*/)       
    {
	// set flag, can take new pictures 
    iSavingImage = EFalse;
    }

/*
-------------------------------------------------------------------------------

    MiuoOpenComplete();

    Description: From MMdaImageUtilObserver, implement this if you use this 
                 observer to open a imagefile.

    Return value: N/A

-------------------------------------------------------------------------------
*/
void CCamTimerFormView::MiuoOpenComplete(TInt /*aError*/)
    {
    }



//
// CCamTimerDialog class
// 

/*
-------------------------------------------------------------------------------

    CCamTimerDialog(TInt& aValue)

    Description: C++ Constructor.

    Return value: N/A

-------------------------------------------------------------------------------
*/

// C++ constructor, initialize data
CCamTimerDialog::CCamTimerDialog(TInt& aValue)                      
    : iEditorValue(&aValue) 
    {
    }

/*
-------------------------------------------------------------------------------

    PreLayoutDynInitL()

    Description: Function for doing pre layout events.

    Return value: N/A

-------------------------------------------------------------------------------
*/
void CCamTimerDialog::PreLayoutDynInitL()
	{
	// Make sure that editor's value is inside valid range
    CheckEditorValue();
	}

/*
-------------------------------------------------------------------------------

    OkToExitL(TInt aButtonId)

    Description: Function for doing on exit events

    Return value: N/A

-------------------------------------------------------------------------------
*/

TBool CCamTimerDialog::OkToExitL(TInt aButtonId)
    {
    switch (aButtonId)
		{
		// If cancel is hit
		case EAknSoftkeyCancel:
			// Return ETrue and kill the dialog window
		    return ETrue;
            break;
		// If ok button is hit
        case EAknSoftkeyOk:
			// Get editor's value and set it to external variable
            *iEditorValue=((CEikNumberEditor*)Control(ECamTimerNumberEditor))->Number();
            return ETrue;
            break;
		// If any other key is hit
        default:
			// Return EFalse and do nothing else
            return EFalse;
            break;
        }
    }

/*
-------------------------------------------------------------------------------

    CheckEditorValue()

    Description: Checks that the editor value is within given minimum and maximum

    Return value: N/A

-------------------------------------------------------------------------------
*/
void CCamTimerDialog::CheckEditorValue()
    {
    TInt min=1;
    TInt max=20;
	// Get the editor
    CEikNumberEditor* editor=static_cast<CEikNumberEditor*>(Control(ECamTimerNumberEditor));
	// Check if value to be set to editor is too high.
	if(*iEditorValue<min)
		// Set value to the editor's maximum value.
        *iEditorValue=min;
	// Check if value to be set to editor is too low.
	if(*iEditorValue>max)
		// Set value to the editor's minimum value.
        *iEditorValue=max;
	// Set value to editor.
    editor->SetNumber(*iEditorValue);
    }


//
//  CCamTimerAppUi class
//

/*
-------------------------------------------------------------------------------

    CCamTimerAppUi(TInt& aValue)

    Description: C++ constructor

    Return value: N/A

-------------------------------------------------------------------------------
*/

CCamTimerAppUi::CCamTimerAppUi(TInt& aValue)
    : iWaitingTime(&aValue)
    {
    }
    
/*
-------------------------------------------------------------------------------

    ConstructL();

    Description: 2nd phase Constructor. Setting up attributes, construction
                 continues in CompleteConstructL() below.

    Return value: N/A

-------------------------------------------------------------------------------
*/
void CCamTimerAppUi::ConstructL()
    {
    BaseConstructL();

    // Averell view launching
    CCamTimerFormView* view=new(ELeave)CCamTimerFormView(iWaitingTime);
    CleanupStack::PushL(view);
    view->ConstructL();
    
	// add created view to this AppUi
    AddViewL(view);    
    
	// view
    CleanupStack::Pop();

	// activate view
    ActivateLocalViewL( view->Id() ); 
    }

/*
-------------------------------------------------------------------------------

    ~CCamTimerAppUi

    Description: Destructor

    Return value: N/A

-------------------------------------------------------------------------------
*/
CCamTimerAppUi::~CCamTimerAppUi()
    {
    }


/*
-------------------------------------------------------------------------------

    HandleKeyEventL

    Description: Handles a key event (we are monitoring for the navibutton)

    Return value: N/A

-------------------------------------------------------------------------------
*/
TKeyResponse CCamTimerAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
    {
    TInt code = aKeyEvent.iCode;
    switch(code)
        {
		// navigator button is pressed
    	case EKeyOK:
			TInt temp;
			temp=*iWaitingTime;
			// Convert time to microseconds
			*iWaitingTime*=1000000;

            // Start the timing with preview pictures, take a picture and save it.
            static_cast<CCamTimerFormView*>(View(KCamTimerViewId))->TimerL();
			// Return the original waiting time in seconds
			*iWaitingTime=temp;
            return (EKeyWasConsumed);
            break;

        default:
            break;
        }

	// default return value
    return(EKeyWasNotConsumed); 
    }


/*
-------------------------------------------------------------------------------

    HandleCommandL

    Description: Handles a given command

    Return value: N/A

-------------------------------------------------------------------------------
*/
void CCamTimerAppUi::HandleCommandL(TInt aCommand)
    {
	// A switch statement that will be controlled by the command id get from 
	// the OfferKayEvent
    switch (aCommand)	
		{
		// If the exit command is selected from the softkeys
        case EAknSoftkeyExit:  

		// If the exit command is given by the framework
		case EEikCmdExit:				

		// If the exit command is selected from the menu
        case EClose:
		// Call the CBaActiveScheduler's Exit function that stops 
		// the application's thread and destroys it.
		CBaActiveScheduler::Exit();	
		break;

        // "Start timing" was selected from the Options menu
        case ECamTimerStartTiming:
			TInt temp1;
			temp1=*iWaitingTime;
			// Convert time to microseconds
			*iWaitingTime*=1000000;	
			// Start timing the picturetaking
            static_cast<CCamTimerFormView*>(View(KCamTimerViewId))->TimerL();
			// Return the waiting time value in seconds
			*iWaitingTime=temp1;
            break;

        // "Set time" was selected from the Options menu
        case ECamTimerSetTime:
			// Start the dialog to ask the number of seconds desired for 
			// the timing.
			// Call CmdDlgL function with the selection's resource id as argument. 
			// This will execute the dialog
			CmdDlgL(R_CAMTIMER_DIALOG);	
            break;

        case ECamTimerLaunchPhotoAlbum:
			// Start the photo album application to rename and send your picture 
			// via IR/BT/MMS.
			CCoeAppUi::ActivateViewL(TVwsViewId(KPhotoAlbumUid, TUid::Uid(1)));
            break;

		// If the menu command is none of the above do nothing
        default:    
            break;
		}

    }



// This function creates the dialog for settings.
void CCamTimerAppUi::CmdDlgL(TInt aResourceId)
	{
	// If the resource id of the dialog to be executed is R_CAMTIMER_DIALOG 
	// do the following.
	if(aResourceId == R_CAMTIMER_DIALOG)
		// There can be multiple id comparisons here like this causing 
		// launching of different dialogs.
		{		
		// Allocate memory for a new dialog of class CCamTimerDialog
        CCamTimerDialog* dialog=new(ELeave)CCamTimerDialog(*iWaitingTime);
		// Set the dialog to execution by calling its ExecuteLD function. 
		// The dialog will be deleted on return
		dialog->ExecuteLD(R_CAMTIMER_DIALOG);                  
        }
	}

//
//  CCamTimerDocument class
//

/*
-----------------------------------------------------------------------------

    CCamTimerDocument

    Creates new CamTimer document.

    Return Values:  N/A

-----------------------------------------------------------------------------
*/
CCamTimerDocument::CCamTimerDocument(CAknApplication& aApp)
    : CAknDocument(aApp)
    {
	}



/*
-----------------------------------------------------------------------------

    CreateAppUiL

    Creates new CCamTimerAppUi and returns a pointer to it.

    Return Values:  pointer to CCamTimerAppUi

-----------------------------------------------------------------------------
*/
CEikAppUi* CCamTimerDocument::CreateAppUiL()
    {	 
	// Initialise the waiting time
    iWaitingTime=KInitialValue;

    CCamTimerAppUi* appui = new (ELeave) CCamTimerAppUi(iWaitingTime);
	// Return the application ui that has been created
    return appui;

    }	



//
//  CCamTimerApplication class
//

/*
-----------------------------------------------------------------------------

    CreateDocumentL()

    Description: Creates new CamTimer document.

    Return Values:  pointer to new CCamTimerDocument object

-----------------------------------------------------------------------------
*/
CApaDocument* CCamTimerApplication::CreateDocumentL()
    {
    return new (ELeave) CCamTimerDocument(*this);
    }


/*
-----------------------------------------------------------------------------

    AppDllUid()

    Return the UID of CamTimer application.

    Return Values:  UID

-----------------------------------------------------------------------------
*/
TUid CCamTimerApplication::AppDllUid() const
    {
    return KUidCamTimerApp;
    }




//  OTHER EXPORTED FUNCTIONS
//=============================================================================


/*
-----------------------------------------------------------------------------

    NewApplication

    Creates new CCamTimerApplication application and returns a pointer to it.

    Return Values:  pointer to CApaApplication

-----------------------------------------------------------------------------
*/
EXPORT_C CApaApplication* NewApplication()
    {
    return new CCamTimerApplication;
    }



/*
-----------------------------------------------------------------------------

    E32Dll

    Called when the DLL is loaded.

    Return Values:  KErrNone

-----------------------------------------------------------------------------
*/
GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return KErrNone;
    }




//  End of File  

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美脚の诱脚舐め脚责91| 天天av天天翘天天综合网 | 韩日精品视频一区| 专区另类欧美日韩| 久久综合色婷婷| 色婷婷狠狠综合| 国产一区二区三区在线观看免费 | 337p亚洲精品色噜噜噜| 国产成人精品三级| 日韩激情视频网站| 亚洲欧美在线aaa| 2017欧美狠狠色| 欧美日韩免费观看一区二区三区| 国产电影精品久久禁18| 日本美女一区二区| 亚洲一区二区成人在线观看| 久久久久国产一区二区三区四区| 欧美精品vⅰdeose4hd| 99国产欧美久久久精品| 国产在线精品一区二区三区不卡| 亚洲成人资源在线| 亚洲色图视频网| 国产精品女同互慰在线看| 欧美成人精品高清在线播放| 欧美男同性恋视频网站| 色婷婷一区二区| 99精品国产99久久久久久白柏| 九一久久久久久| 免费人成网站在线观看欧美高清| 亚洲制服丝袜av| 亚洲日本中文字幕区| 中文字幕高清一区| 国产欧美日韩亚州综合| 亚洲精品一区二区三区蜜桃下载| 欧美一区二区在线视频| 欧美精品丝袜久久久中文字幕| 色噜噜狠狠色综合欧洲selulu| 不卡电影一区二区三区| 国产a精品视频| 丰满少妇在线播放bd日韩电影| 久久国产精品99久久久久久老狼| 美国三级日本三级久久99| 天天影视涩香欲综合网| 亚洲www啪成人一区二区麻豆| 一区二区三区四区蜜桃| 亚洲激情一二三区| 亚洲国产精品久久不卡毛片| 一区二区三区日韩精品视频| 亚洲国产综合在线| 日韩精品亚洲专区| 视频在线观看一区二区三区| 偷拍亚洲欧洲综合| 日韩国产欧美在线观看| 免费在线成人网| 激情成人午夜视频| 国产成人午夜99999| 盗摄精品av一区二区三区| jvid福利写真一区二区三区| 日本道免费精品一区二区三区| 色婷婷av一区| 欧美精品一卡二卡| 精品福利一二区| 国产欧美精品日韩区二区麻豆天美| 欧美激情一区二区三区不卡| 中文字幕一区二区三区乱码在线| 亚洲日本在线a| 天天av天天翘天天综合网 | 91精彩视频在线观看| 欧美少妇bbb| 日韩欧美色综合网站| 久久久久久久久蜜桃| 国产精品不卡在线| 亚洲丶国产丶欧美一区二区三区| 免费人成网站在线观看欧美高清| 国产成人免费在线观看不卡| 99re这里只有精品首页| 欧美日韩国产欧美日美国产精品| 日韩写真欧美这视频| 国产欧美一区二区精品仙草咪| 亚洲免费资源在线播放| 日本不卡在线视频| 成人深夜福利app| 欧美乱妇15p| 国产亚洲一区二区三区| 亚洲精品国产品国语在线app| 日本视频中文字幕一区二区三区| 国产成人免费视频网站| 欧美三片在线视频观看| 久久人人爽爽爽人久久久| 亚洲另类在线一区| 久久精品国产精品亚洲综合| 91免费视频观看| 欧美成人精品福利| 亚洲精品videosex极品| 国产精品综合网| 精品婷婷伊人一区三区三| 国产欧美综合在线| 丝袜亚洲另类欧美综合| av亚洲精华国产精华精华 | 日韩美女视频一区| 蜜臀精品一区二区三区在线观看| 成人高清视频免费观看| 91麻豆精品国产91久久久久 | 欧美电影免费观看完整版| 国产精品你懂的在线欣赏| 日韩电影免费在线| 色综合天天综合色综合av | 成人理论电影网| 91精品国产综合久久精品| 最新热久久免费视频| 狠狠色狠狠色综合系列| 欧美日韩日日摸| 亚洲素人一区二区| 国产精品一区二区在线观看不卡| 欧美日韩一区小说| 中文字幕在线不卡一区二区三区| 精品一区二区三区免费观看| 欧美另类一区二区三区| 亚洲综合色噜噜狠狠| 成人亚洲一区二区一| 2024国产精品| 久久av资源网| 欧美一区二区三区在线视频| 亚洲国产精品久久艾草纯爱| 91网上在线视频| 自拍偷拍亚洲欧美日韩| 99视频一区二区| 中文字幕免费观看一区| 国产成人免费av在线| 国产午夜精品一区二区三区四区| 久久99深爱久久99精品| 在线电影一区二区三区| 亚洲成人av在线电影| 在线免费观看日本欧美| 亚洲免费看黄网站| 色婷婷综合久久久久中文一区二区 | 91美女精品福利| 综合网在线视频| 色综合视频在线观看| 国产精品看片你懂得| 国产.欧美.日韩| 国产精品热久久久久夜色精品三区 | 色8久久人人97超碰香蕉987| 亚洲色欲色欲www在线观看| 91视频免费看| 一区二区三区不卡在线观看| 欧美亚洲免费在线一区| 五月天一区二区| 69久久夜色精品国产69蝌蚪网| 午夜精品久久久| 91精品国产入口| 国产在线精品一区二区| 久久精品亚洲精品国产欧美kt∨ | 国产视频911| 丁香激情综合五月| 亚洲欧美另类久久久精品 | 欧美成人一区二区三区| 激情文学综合丁香| 中文字幕高清不卡| 色狠狠色狠狠综合| 日日夜夜精品视频免费| 精品少妇一区二区三区免费观看| 国产在线一区二区| 中文字幕在线不卡| 欧美亚洲另类激情小说| 美女免费视频一区| 国产精品婷婷午夜在线观看| 91丨porny丨蝌蚪视频| 偷拍一区二区三区| 久久久99久久精品欧美| 色素色在线综合| 青草av.久久免费一区| 国产丝袜美腿一区二区三区| 色综合天天性综合| 日本欧美一区二区在线观看| 国产日韩欧美一区二区三区乱码 | 一区二区三区**美女毛片| 欧美一区二视频| 成人一道本在线| 亚洲成在人线免费| 国产日本欧洲亚洲| 欧美日韩在线播放一区| 国产成人免费高清| 午夜精品福利一区二区三区蜜桃| 精品国产乱码91久久久久久网站| hitomi一区二区三区精品| 偷拍一区二区三区四区| 国产精品久久久久久亚洲伦| 6080亚洲精品一区二区| 成人激情图片网| 男人的天堂亚洲一区| 中文字幕一区二区三区不卡在线| 日韩色视频在线观看| 91在线观看视频| 久久er99热精品一区二区| 亚洲资源中文字幕| 一色桃子久久精品亚洲| 日韩欧美不卡一区| 欧美一a一片一级一片| 国产成人日日夜夜|