当前位置: 首页>>代码示例>>C++>>正文


C++ CAknMessageQueryDialog类代码示例

本文整理汇总了C++中CAknMessageQueryDialog的典型用法代码示例。如果您正苦于以下问题:C++ CAknMessageQueryDialog类的具体用法?C++ CAknMessageQueryDialog怎么用?C++ CAknMessageQueryDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CAknMessageQueryDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _LIT

// ---------------------------------------------------------------------------
// CBCTestMix50Case::TestCAknMessageQueryControlCaseL()
// ( menu item -4- )
// ---------------------------------------------------------------------------
//
void CBCTestMix50Case::TestCAknMessageQueryControlCaseL()
    {
    CAknMessageQueryDialog* msgQueryDlg =
    CAknMessageQueryDialog::NewL( ( TDesC& )KTitle, CAknQueryDialog::ENoTone );
    CleanupStack::PushL( msgQueryDlg );
    _LIT( KTxtCAknMessageQueryDialog, "CAknMessageQueryDialog::NewL" );
    AssertNotNullL( msgQueryDlg, KTxtCAknMessageQueryDialog );

    msgQueryDlg->PrepareLC( R_BCTESTMIX50_EIKDIALOG );
    _LIT( KTxtPrepareLC, "CAknMessageQueryDialog::PrepareLC" );
    AssertTrueL( ETrue, KTxtPrepareLC );

    CAknMessageQueryControl* msgCtrl = static_cast< CAknMessageQueryControl* >
                        ( msgQueryDlg->Control( EAknMessageQueryContentId ) );
    _LIT( KTxtCAknMessageQueryControl,
          "CAknMessageQueryControl static_cast< CAknMessageQueryControl* >" );
    AssertNotNullL( msgCtrl, KTxtCAknMessageQueryControl );

    msgCtrl->LinkHighLighted();
    _LIT( KTxtLinkHighLighted, "CAknMessageQueryControl::LinkHighLighted" );
    AssertTrueL( ETrue, KTxtLinkHighLighted );

    CleanupStack::Pop( );   // PrepareLC
    CleanupStack::PopAndDestroy( msgQueryDlg );
    }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:30,代码来源:bctestmix50case.cpp

示例2: HandleCommandL

void CRhodesAppUi::HandleApplicationSpecificEventL(TInt aType, const TWsEvent& aEvent)
	{
		if ( aType == (EEventUser + ECmdAppHome))
		{ 
			if ( iSyncEngineWrap )
				iSyncEngineWrap->ResumeThread();
			HandleCommandL(ECmdAppHome);
		}
		else if ( aType == (EEventUser + ECmdShowDebugWindow))
		{
			CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
			dlg->PrepareLC(R_STAT_QUERY_DIALOG);
			
			TPtrC8 titleptr8((const TUint8 *)g_szSource);
			HBufC *title = HBufC::NewLC(titleptr8.Length());
			title->Des().Copy(titleptr8);
			dlg->QueryHeading()->SetTextL(*title);
			CleanupStack::PopAndDestroy(title);
			
			TPtrC8 msgptr8((const TUint8 *)g_szMessage);
			HBufC *msg = HBufC::NewLC(msgptr8.Length());
			msg->Des().Copy(msgptr8);
			dlg->SetMessageTextL(*msg);
			CleanupStack::PopAndDestroy(msg);
			
			dlg->RunLD();
		}
		else
		{
			// Call the base class implementation
	        CEikAppUi::HandleApplicationSpecificEventL(aType, aEvent);
		}
	}
开发者ID:bijukrishna,项目名称:rhodes,代码行数:33,代码来源:rhodesAppUi.cpp

示例3: switch

void CZXingBarcodeReaderAppUi::HandleCommandL (TInt aCommand )
    {
    switch (aCommand )
        {
        case EEikCmdExit:
        case EAknSoftkeyExit:
            {
            Exit();
            break;
            }
        case EAknSoftkeyBack:
            {
            iAppView->CancelCapturedPicture();
            UseOptionsExitCbaL();
            break;
            }
        case EAbout:
            {
            CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog ();
            dlg->PrepareLC (R_ABOUT_QUERY_DIALOG );
            HBufC* title = iEikonEnv->AllocReadResourceLC (R_ABOUT_DIALOG_TITLE );
            dlg->QueryHeading ()->SetTextL (*title );
            CleanupStack::PopAndDestroy (); //title
            HBufC* msg = iEikonEnv->AllocReadResourceLC (R_ABOUT_DIALOG_TEXT );
            dlg->SetMessageTextL (*msg );
            CleanupStack::PopAndDestroy (); //msg
            dlg->RunLD();
            break;
            }
        default:
            {
            break;
            }
        };
    }
开发者ID:Android9001,项目名称:zxing,代码行数:35,代码来源:ZXingBarcodeReaderAppUi.cpp

示例4: switch

void CYBrowserFileHandler1::HandleCommandL(TInt aCommand)
{
	switch (aCommand)
    { 
    case EAbout:
    	{
    		HBufC* Abbout = KtxAbbout().AllocLC();
			TPtr Pointter(Abbout->Des());
			CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
			dlg->PrepareLC(R_ABOUT_HEADING_PANE);
			dlg->SetHeaderTextL(KtxApplicationName);  
			dlg->RunLD();
			
			CleanupStack::PopAndDestroy(Abbout);
    	}
    	break;
    case EBacktoYBrowser:
    	if(iFileHandlerUtils)
    	{
    		iFileHandlerUtils->HandleExitL(this,MYBrowserFileHandlerUtils::ENoChangesMade);	
    	}
    	break; 
	default:
		break;
    };
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:26,代码来源:YTools_filehand.cpp

示例5: DeleteItemL

	void DeleteItemL() {
		TInt idx=ListBox()->CurrentItemIndex();

		auto_ptr<HBufC> message(HBufC::NewL(256));
		message->Des()=_L("Really delete ");
		MListBoxModel* lbmodel=ListBox()->Model();
		CAknFilteredTextListBoxModel* model = STATIC_CAST( CAknFilteredTextListBoxModel*, lbmodel);

		TPtrC item=model->ItemText( idx );
		message->Des().Append( item.Mid(2) );
		message->Des().Append(_L("?"));

		{
			TPtrC16 m=message->Des();
			CAknMessageQueryDialog * dlg = CAknMessageQueryDialog::NewL(m);
			CleanupStack::PushL(dlg);
			dlg->PrepareLC(R_CONFIRMATION_QUERY);
			dlg->QueryHeading()->SetTextL(_L("Delete?"));
			CleanupStack::Pop(dlg);
			
			if ( dlg->RunLD() )
			{
				TInt realidx=model->Filter()->FilteredItemIndex(idx);
				iTagStorage->DeleteItemL(realidx);
				ListBox()->HandleItemRemovalL();
			}
		}	
	}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:28,代码来源:cm_taglist.cpp

示例6: switch

/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMgAppUi::HandleCommandL(TInt aCommand)
    {
    switch (aCommand)
    {
    case EChangeLayout:
    	#ifdef __SERIES60_3X__
    	{
    		if(Orientation() == EAppUiOrientationLandscape)
    		{
    			SetOrientationL(EAppUiOrientationPortrait);	
    		}
    		else
    		{
    			SetOrientationL(EAppUiOrientationLandscape);
    		}
    	}
    	#else

		#endif
    	break;

    case EAbout:
		{	
		#ifdef __SERIES60_3X__		
			HBufC* Abbout = KtxAboutText().AllocLC();
			TPtr Pointter(Abbout->Des());
			
			CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
			dlg->PrepareLC(R_ABOUT_HEADING_PANE);
			dlg->SetHeaderTextL(_L("About"));  
			dlg->RunLD();
				
			CleanupStack::PopAndDestroy(1);//,Abbout
		#else
		
		#endif
		}
    	break;
    case EClose:
    	{
    		// splash screen do nothing..
    	}
    	break;
#ifdef __SERIES60_3X__
    case EAknSoftkeyExit:
#endif
//    case EEikCmdExit:
		Exit();
        break;
    default:
    	if(iMainContainer)
    	{
    		iMainContainer->HandleViewCommandL(aCommand);
    	}
        break;
        }
    }
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:61,代码来源:YTools_A000257B.cpp

示例7: LeaveIfError

 /*
  * Save Form data, function to be executed when save option is selected. 
  * Creates the second form which allows for selecting the category.
  */
 TBool CYPagesForm1::SaveFormDataL()
{  
    CAknPopupFieldText* popupFieldText = static_cast <CAknPopupFieldText*> (ControlOrNull(EYPagesPopup));
 	if (popupFieldText) {		
		TInt categoryIndex = popupFieldText->CurrentValueIndex();
		TBuf <30> KMyTextFile;
		KMyTextFile.Format(_L("D:\\YPages\\%d%d.txt"), iColor, categoryIndex);
		
		RFs fileServer;
 	    User :: LeaveIfError (fileServer.Connect());
 	    RFile file;
 	    User::LeaveIfError(file.Open(fileServer, KMyTextFile, EFileRead|EFileStreamText));
 	    CleanupClosePushL(file);
 	    
 	    TFileText fileText;
 	    fileText.Set(file);
 	    
 	    TBuf<100> buffer;
 	    buffer = _L("");

 	    RBuf rBuf;
 	    rBuf.Create(buffer);
 	    rBuf.CleanupClosePushL();
 	    
 	  
 	    TInt err = KErrNone;
 	    while(err != KErrEof) {
 			err = fileText.Read(buffer);
 	    
 			if ((err != KErrNone) && (err != KErrEof)) {
 				User :: Leave(err);
 			}
 			if (KErrNone == err) {
 				rBuf.ReAllocL(rBuf.Length() + buffer.Length()+2);
 				rBuf.Append(buffer);
 				rBuf.Append(_L("\n"));
 			}
 	    }
 	    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(rBuf);
 	    dlg->PrepareLC(R_ABOUT_HEADING_PANE);
   	    dlg->SetHeaderTextL(_L(""));  
   	    dlg->RunLD();
 	    		     
 	    CleanupStack::PopAndDestroy(&rBuf);
 	    CleanupStack::PopAndDestroy(&file);
 	    
 	    fileServer.Close();

 	
 	}

        

 	return ETrue;
 }
开发者ID:pulkit110,项目名称:Yellow-Pages-Symbian,代码行数:59,代码来源:YPagesForm1.cpp

示例8: CurrentSelected

void CCdlExplorerContainer::PropertiesL()
	{
	CCdlExplorable* selected = CurrentSelected();
	if (selected)
		{
		TBuf<256> buf;
		selected->Properties(buf);
		CAknMessageQueryDialog* dialog = new (ELeave) CAknMessageQueryDialog;
		dialog->SetMessageTextL(buf);
		dialog->ExecuteLD(R_PROPERTIES_MESSAGE_QUERY);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:12,代码来源:CdlExplorerContainer.cpp

示例9: switch

void CYBrowserFileHandler1::HandleCommandL(TInt aCommand)
{
	if(iDebugFile.SubSessionHandle())
	{	
		iDebugFile.Write(_L8("cmd, "));
	}
	
	switch (aCommand)
    { 
	case EPlugAppHelpBack:
		{
			delete iMyHelpContainer;
			iMyHelpContainer = NULL;
		}
		SetMenuL();
		DrawNow();
		break;
	case EPlugAppHelp:
		{
			delete iMyHelpContainer;
			iMyHelpContainer = NULL;    		
			iMyHelpContainer = CMyHelpContainer::NewL();
		}
		SetMenuL();
		DrawNow();    		
		break;
    case EPlugAbout:
    	{			
    		HBufC* Abbout = KMailAbbout().AllocLC();
			TPtr Pointter(Abbout->Des());
			CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
			dlg->PrepareLC(R_ABOUT_HEADING_PANE);
			dlg->SetHeaderTextL(KMailAbboutName);  
			dlg->RunLD();
			
			CleanupStack::PopAndDestroy(Abbout);
    	}
    	break;
    case EBacktoYBrowser:
    	if(iFileHandlerUtils)
    	{
    		iFileHandlerUtils->HandleExitL(this,MYBrowserFileHandlerUtils::EChangesMade);	
    	}
    	break; 
	default:
		if(iMailBoxContainer)
		{
			iMailBoxContainer->HandleViewCommandL(aCommand);
		}
		break;
    };
}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:52,代码来源:YToolsMailFolders.cpp

示例10: switch

//handle keys
TKeyResponse CSymellaTransfersContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,	TEventCode aType)
{
if (aType == EEventKey) 
	{
		switch (aKeyEvent.iCode) 
		{
			case EKeyUpArrow:
			case EKeyDownArrow:
				return iListBox->OfferKeyEventL(aKeyEvent, aType);

			case EKeyDevice3: //EKeyOk
				{
					TInt index = iListBox->CurrentItemIndex();
					if ( index >= 0)
					{
						if (CTR->DlManager()->GetDownloadState(index) == CSADownload::EComplete)
						{
							iView->HandleCommandL(ESymellaCmdOpenWithApp);
						}
						else
						{
							HBufC* info = CTR->DlManager()->CreateDownloadStatusInfoL(index);
							CleanupStack::PushL(info);
							
							CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
							CleanupStack::PushL(dlg);
							dlg->PrepareLC( R_MESSAGE_QUERY );
							dlg->SetMessageTextL(info->Des());
							dlg->QueryHeading()->SetTextL(_L("Download info"));
							CleanupStack::Pop();
							dlg->RunLD();

							CleanupStack::PopAndDestroy();
						}
					}
				}
				break;

			case EKeyBackspace:
			case EKeyDelete:
				{
					iView->HandleCommandL(ESymellaCmdRemoveDownload);
				}
				break;

			default:;
		}
	}

	return EKeyWasNotConsumed;
}
开发者ID:imrekel,项目名称:Symella,代码行数:52,代码来源:SymellaTransfersContainer.cpp

示例11: HandleItemSelectionL

void CBuddycloudCommunitiesContainer::HandleCommandL(TInt aCommand) {
	if(aCommand == EMenuEditItemCommand) {
		HandleItemSelectionL(iList->CurrentItemIndex());
	}
	else if(aCommand == EMenuDeleteCommand) {
		CAknMessageQueryDialog* aDialog = new (ELeave) CAknMessageQueryDialog();

		if(aDialog->ExecuteLD(R_DELETE_DIALOG) != 0) {
			iBuddycloudLogic->GetDescSetting(ESettingItemTwitterUsername).Zero();
			iBuddycloudLogic->GetDescSetting(ESettingItemTwitterPassword).Zero();
			
			iBuddycloudLogic->SendCommunityCredentials(ECommunityTwitter);
		}
	}
}
开发者ID:Persepoliss,项目名称:symbian-client,代码行数:15,代码来源:BuddycloudCommunitiesContainer.cpp

示例12: ShowModalAboutDlgL

TBool ShowModalAboutDlgL(const TInt& aTextHeaderId,const TDesC& aDes)
	{
	CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog();
	
	dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
	
	HBufC* title = StringLoader::LoadLC(aTextHeaderId);
	dlg->QueryHeading()->SetTextL(*title);
	CleanupStack::PopAndDestroy(); //title
		
	dlg->SetMessageTextL(aDes);
		
	dlg->RunLD();
		
	return ETrue;
	}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:16,代码来源:QueryDlgUtil.cpp

示例13: ReadandSendData

void CPhotoListView::StoreFolder()
{
	int answer;
	TInt Index;
	if(iFolderStatus>=0)
	{
		TInt compareflag;
	    TBuf<160> folderName;
	
	    folderName.FillZ();
		folderName.Zero();
		folderName.SetLength(0);
		CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL(folderName, CAknQueryDialog::ENoTone );
		answer=( dlg->ExecuteLD( R_FOLDER_NAME_QUERY ) ); // new folder name
		if(answer)
		{
			iFolderStatus=0;			
			
			compareflag=iPhotosAppUi->CheckAndSaveFolderToDB(folderName);
	
			if(compareflag!=1)
			{
				comment.Copy(folderName);
				iNewFolder = 1;
				ReadandSendData();
			}
			else
			{
				CDesCArray* folderexist = iPhotosAppUi->FolderExist();
				//CEikonEnv::Static ()->AlertWin (folderexist->MdcaPoint(0)) ;
				TBuf<100> msg;
				msg.Copy(folderexist->MdcaPoint(0));
				CAknMessageQueryDialog* verdlg = CAknMessageQueryDialog::NewL(msg);	
				verdlg->PrepareLC(R_ABOUT_QUERY);
				verdlg->RunLD();				
				folderexist->Reset();
			}
		}
		else
		{
			Index=0;				
			iFolderStatus=0;
			iPublic_Photo=EFalse;

		}
	}
}	
开发者ID:deepakprabhakara,项目名称:ripplevault,代码行数:47,代码来源:photolistview.cpp

示例14: new

void CBuddycloudCommunitiesContainer::HandleItemSelectionL(TInt aIndex) {
	if(aIndex == ECommunityFacebook) {
		CAknMessageQueryDialog* aMessageDialog = new (ELeave) CAknMessageQueryDialog();
		aMessageDialog->PrepareLC(R_EXIT_DIALOG);
		
		HBufC* aFacebookText = iEikonEnv->AllocReadResourceLC(R_LOCALIZED_STRING_SETTINGS_FACEBOOK_TEXT);
		aMessageDialog->SetHeaderTextL(_L("Facebook"));
		aMessageDialog->SetMessageTextL(*aFacebookText);
		CleanupStack::PopAndDestroy(); // aFacebookText

		TCallBack aCallback(FacebookLaunchCallback);
		aMessageDialog->SetLink(aCallback);
		aMessageDialog->SetLinkTextL(_L("http://apps.facebook.com/buddycloud"));
		
		if(aMessageDialog->RunLD() != 0) {		
			aCallback.CallBack();
		}
	}
	else if(aIndex == ECommunityTwitter) {
		CAknMultiLineDataQueryDialog* aDialog = 
					CAknMultiLineDataQueryDialog::NewL(iBuddycloudLogic->GetDescSetting(ESettingItemTwitterUsername), 
					iBuddycloudLogic->GetDescSetting(ESettingItemTwitterPassword));

		if(aDialog->ExecuteLD(R_CREDENTIALS_DIALOG) != 0) {
			iBuddycloudLogic->SendCommunityCredentials(ECommunityTwitter);
		}
	}
}
开发者ID:Persepoliss,项目名称:symbian-client,代码行数:28,代码来源:BuddycloudCommunitiesContainer.cpp

示例15: switch

/*
------------------------------------------------------------------------------
------------------------------------------------------------------------------
*/
void CMovingBallAppUi::HandleCommandL( TInt aCommand )
	{
	switch( aCommand )
		{
		case EResset:
			if(iAppView)
			{
				iAppView->Reset();
			}
			break;
		case EBGLOff:
			if(iAppView)
			{
				iAppView->SetLights(EFalse);
			}
			break;
		case EBGLOn:
			if(iAppView)
			{
				iAppView->SetLights(ETrue);
			}
			break;
		case EClose:
			// do nothing..
			break;
		case EEikCmdExit:
		case EAknSoftkeyExit:
			Exit();
			break;
	    case EVisitDrJukka:
	    	{
				OpenMobileWEBSiteL(this);
	    	}
	    	break;			
		case EAbout:
			{	
				HBufC* Abbout = KtxAbbout().AllocLC();
					
				CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog(); 
				dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
				dlg->QueryHeading()->SetTextL(_L("About"));
				dlg->SetMessageTextL(*Abbout);
				
				TCallBack callback1(OpenMobileWEBSiteL);
				dlg->SetLink(callback1);
				dlg->SetLinkTextL(KMobileJukkaLink);
				
				dlg->RunLD(); 
				
				CleanupStack::PopAndDestroy(); //Abbout
			}
			break;
		default:
			if(iAppView)
			{
				iAppView->HandleViewCommandL(aCommand);
			}
			break;
		}
	}
开发者ID:DrJukka,项目名称:Symbian_Codes,代码行数:64,代码来源:YApp_E887600D.cpp


注:本文中的CAknMessageQueryDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。