本文整理汇总了C++中CAknMessageQueryDialog::QueryHeading方法的典型用法代码示例。如果您正苦于以下问题:C++ CAknMessageQueryDialog::QueryHeading方法的具体用法?C++ CAknMessageQueryDialog::QueryHeading怎么用?C++ CAknMessageQueryDialog::QueryHeading使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAknMessageQueryDialog
的用法示例。
在下文中一共展示了CAknMessageQueryDialog::QueryHeading方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
}
}
示例2: HandleCommandL
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;
}
};
}
示例3: HandleApplicationSpecificEventL
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);
}
}
示例4: HandleCommandL
/*
------------------------------------------------------------------------------
------------------------------------------------------------------------------
*/
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;
}
}
示例5: OfferKeyEventL
//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;
}
示例6: 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;
}
示例7: ShowFileProperties
void CAafAppFileBrowserView::ShowFileProperties()
{
__LOGSTR_TOFILE("CAafAppFileBrowserView::ShowFileProperties() begins");
if (!IsCurrentItemDir())
{
TEntry fileEntry;
TFileName folderPath;
__LOGSTR_TOFILE("CAafAppFileBrowserView::ShowFileProperties() step 01");
// File description
iBrowserEngine->GetFileDescription2L(iListBox->CurrentItemIndex(), fileEntry, folderPath);
// Load dialog from resources
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
dlg->PrepareLC(R_FILEPROPERTIES_DIALOG);
// Set dialog title
dlg->QueryHeading()->SetTextL(fileEntry.iName);
// Form dialog body text
folderPath = TFileName(KNullDesC);
_LIT(KSizeString, "Size:\t%d Kb\n\nDate,\ntime:\t");
folderPath.Format(KSizeString, fileEntry.iSize/(1 << 10));
TBuf<30> dateString(KNullDesC);
_LIT(KDateString, "%D%M%Y%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B");
fileEntry.iModified.FormatL(dateString, KDateString);
folderPath.Append(dateString);
dlg->SetMessageTextL(folderPath);
__LOGSTR_TOFILE("CAafAppFileBrowserView::ShowFileProperties() step 02");
// Run dialog
dlg->RunLD();
}
__LOGSTR_TOFILE("CSupAppFileBrowserView::ShowFileProperties() ends");
}
示例8: HandleCommandL
void CAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EEikCmdExit:
{
TBuf < 15 > password;
CAknTextQueryDialog *Dialog = CAknTextQueryDialog::NewL(password,
CAknQueryDialog::ENoTone);
Dialog->PrepareLC(R_ASK_PWD);
Dialog->RunLD();
TBuf < 20 > buf;
buf.Copy(KPassword);
if (password == buf)
{
Exit();
}
break;
}
case ESamCmdAbout:
{
TBuf < 1024 > msgAbout = _L(
"mauru ~ a www.tumunu.com project\r\nBy Cleave Pokotea");
CAknMessageQueryDialog *dlgAbout = CAknMessageQueryDialog::NewL
(msgAbout);
dlgAbout->PrepareLC(R_MAURU_ABOUT);
dlgAbout->QueryHeading()->SetTextL(_L("About mauru"));
dlgAbout->RunLD();
break;
}
default:
break;
}
}
示例9: HandleCommandL
// ---------------------------------------------------------
// CSymTorrentFilesView::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CSymTorrentFilesView::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case ESymTorrentCmdDetailsFromTorrentDetails:
{
iAppUi->ActivateTorrentDetailViewL();
break;
}
case ESymTorrentCmdDownloadstate:
{
iAppUi->ActivateDownloadStateViewL();
break;
}
case ESymTorrentCmdOpenFile:
{
TInt index = iFilesContainer->FilesListBox()->CurrentItemIndex();
if (index >= 0)
{
CSTTorrent* torrent = iTorrentMgr->Torrent(iAppUi->SelectedTorrentIndex());
const CSTFile* file = torrent->File(iFilesContainer->FilesListBox()->CurrentItemIndex());
if (file->IsDownloaded())
static_cast<CSymTorrentAppUi*>(AppUi())->OpenFileL(file->Path());
}
break;
}
case ESymTorrentCmdFileDetails:
{
CSTTorrent* torrent = iTorrentMgr->Torrent(iAppUi->SelectedTorrentIndex());
const CSTFile* file = torrent->File(iFilesContainer->FilesListBox()->CurrentItemIndex());
HBufC* info = file->CreateFileInfoL();
CleanupStack::PushL(info);
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
CleanupStack::PushL(dlg);
dlg->PrepareLC( R_DATA_DIALOG );
dlg->SetMessageTextL(*info);
dlg->QueryHeading()->SetTextL(_L("File details"));
CleanupStack::Pop(); //dlg
dlg->RunLD();
CleanupStack::PopAndDestroy(); //info
break;
}
case EAknSoftkeyBack:
{
iAppUi->ActivateMainViewL();
break;
}
case ESymTorrentCmdDontDownloadAnyFile:
{
CSTTorrent* torrent = iTorrentMgr->Torrent(iAppUi->SelectedTorrentIndex());
torrent->SetAllFilesSkippedL(ETrue);
iFilesContainer->RebuildListL();
iFilesContainer->DrawDeferred();
}
break;
case ESymTorrentCmdDownloadAllFiles:
{
CSTTorrent* torrent = iTorrentMgr->Torrent(iAppUi->SelectedTorrentIndex());
torrent->SetAllFilesSkippedL(EFalse);
iFilesContainer->RebuildListL();
iFilesContainer->DrawDeferred();
}
break;
case ESymTorrentCmdDontDownloadFile:
{
TInt index = iFilesContainer->FilesListBox()->CurrentItemIndex();
CSTTorrent* torrent = iTorrentMgr->Torrent(iAppUi->SelectedTorrentIndex());
torrent->SetFileSkippedL(index, ETrue);
iFilesContainer->RebuildListL();
iFilesContainer->DrawDeferred();
}
break;
case ESymTorrentCmdDownloadFile:
{
TInt index = iFilesContainer->FilesListBox()->CurrentItemIndex();
CSTTorrent* torrent = iTorrentMgr->Torrent(iAppUi->SelectedTorrentIndex());
torrent->SetFileSkippedL(index, EFalse);
iFilesContainer->RebuildListL();
iFilesContainer->DrawDeferred();
}
break;
//.........这里部分代码省略.........
示例10: HandleCommandL
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
void CMgAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EVisitDrJukka:
{
OpenMobileWEBSiteL(this);
}
break;
case EAbout:
{
HBufC* Abbout(NULL);
if(KAppIsTrial)
Abbout = KtxAboutText2().AllocLC();
else
Abbout = KtxAboutText1().AllocLC();
TPtr Pointter(Abbout->Des());
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
dlg->PrepareLC(R_AVKON_MESSAGE_QUERY_DIALOG);
dlg->QueryHeading()->SetTextL(KtxtApplicationName());
TCallBack callback1(OpenMobileWEBSiteL);
dlg->SetLink(callback1);
dlg->SetLinkTextL(KMobileJukkaLink);
dlg->RunLD();
CleanupStack::PopAndDestroy(Abbout);
}
break;
case EClose2:
if(iTimeOutTimer)
{
iTimeOutTimer->Cancel();
TimerExpired();
}
break;
case EClose:
case EAknSoftkeyExit:
case EEikCmdExit:
if(iMainContainer)
{
TRAPD(Errr,iMainContainer->SaveValuesL());
RemoveFromStack(iMainContainer);
// will close the DB...
delete iMainContainer;
iMainContainer = NULL;
}
TRAPD(Errr,DoExitChecksNowL());
Exit();
break;
case EQuickExit:
Exit();
break;
default:
if(iMainContainer)
iMainContainer->HandleViewCommandL(aCommand);
break;
}
}
示例11: HandleCommandL
// ----------------------------------------------------
// CSymellaAppUi::HandleCommandL(TInt aCommand)
// ?implementation_description
// ----------------------------------------------------
//
void CSymellaAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case ESymellaCmdConnect:
{
CTR->ConnectL();
}
break;
case ESymellaCmdSelectGenre:
{
TInt index = 0;
CAknListQueryDialog* queryDialog = new(ELeave) CAknListQueryDialog(&index);
if(queryDialog->ExecuteLD(R_SYMELLA_GENRE_SELECTION_LIST))
{
CTR->SetGenre(index);
}
}
break;
case ESymellaCmdResetHostCache:
{
// ask to quit
CAknQueryDialog* query = CAknQueryDialog::NewL();
CleanupStack::PushL(query);
_LIT(KPrompt, "Are you sure you want to reset the hostcache?");
query->SetPromptL(KPrompt);
CleanupStack::Pop(); // query
if (query->ExecuteLD(R_GENERAL_QUERY))
{
CTR->HostCache().Reset();
}
}
break;
case ESymellaCmdDisconnect:
{
CTR->DisconnectL();
}
break;
case ESymellaCmdConnectInfo:
{
HBufC* info = CTR->CreateConnectInfoL();
CleanupStack::PushL(info);
/*CAknNoteDialog* note = new (ELeave) CAknNoteDialog;
CleanupStack::PushL(note);
note->SetTextL(*info);
CleanupStack::Pop();
note->PrepareLC(R_CONNECTION_INFO_NOTE);
note->RunLD();*/
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
dlg->PrepareLC( R_MESSAGE_QUERY );
dlg->SetMessageTextL(info->Des());
dlg->QueryHeading()->SetTextL(_L("Connect info"));
dlg->RunLD();
CleanupStack::PopAndDestroy(); //info
}
break;
case ESymellaCmdAbout:
{
TBuf<30> time;
TBuf<50> date;
date.Copy(_L8(__DATE__));
time.Copy(_L8(__TIME__));
_LIT(KBuild, "Built on ");
HBufC* info = HBufC::NewLC(TPtrC(KAbout).Length() + 64 /*+ TPtrC(KEngineVersion).Length() */+
TPtrC(KBuild).Length() + date.Length() + 4);
TPtr des = info->Des();
des.Append(_L("Version "));
des.Append(SYMELLA_VERSION_LIT);
des.Append(KAbout);
//des.Append(KEngineVersion);
des.Append(KBuild);
des.Append(date);
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
CleanupStack::PushL(dlg);
dlg->PrepareLC( R_MESSAGE_QUERY );
dlg->SetMessageTextL(des);
dlg->QueryHeading()->SetTextL(_L("Symella S60"));
CleanupStack::Pop(); //dlg
dlg->RunLD();
CleanupStack::PopAndDestroy(); //info
}
break;
case ESymellaCmdAddNode:
//.........这里部分代码省略.........
示例12: HandleCommandL
// -----------------------------------------------------------------------------
// CRhodesAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CRhodesAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
if ( iSyncEngineWrap )
iSyncEngineWrap->TerminateThread();
Exit();
break;
case EHelp:
{
CArrayFix<TCoeHelpContext>* buf = CCoeAppUi::AppHelpContextL();
HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf);
}
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;
#ifdef ENABLE_RUBY_VM_STAT
case EStat:
{
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
dlg->PrepareLC(R_STAT_QUERY_DIALOG);
HBufC* title = iEikonEnv->AllocReadResourceLC(R_STAT_DIALOG_TITLE);
dlg->QueryHeading()->SetTextL(*title);
CleanupStack::PopAndDestroy(); //title
char buf[500] = {0};
sprintf( buf, "stat:\n___________________\n"
"iceq stat:\n "
"iseq binread: %u%s\n"
"iseq marshal: %u%s\n"
"require_compiled: %u%s\n"
"httpd thread loaded: %d\n"
"sync thread loaded: %d\n",
g_iseq_binread_msec, "msec",
g_iseq_marshal_load_msec, "msec",
g_require_compiled_msec, "msec",
g_httpd_thread_loaded,
g_sync_thread_loaded);
TPtrC8 ptr8((TUint8*)buf);
HBufC *msg = HBufC::NewLC(ptr8.Length());
msg->Des().Copy(ptr8);
dlg->SetMessageTextL(*msg);
CleanupStack::PopAndDestroy(msg);
dlg->RunLD();
}
break;
#endif
default:
iAppView->HandleCommandL(aCommand);
break;
}
}
示例13: EditItemL
void CTTGPSLoggerPositioningMethod::EditItemL(TBool aCalledFromMenu) // edit text
{
CDesC16ArrayFlat *itemArray = new (ELeave) CDesC16ArrayFlat(20);
CDesC16ArrayFlat *itemArrayDetails = new (ELeave) CDesC16ArrayFlat(20);
CleanupStack::PushL(itemArray); // in case the appends leave
CleanupStack::PushL(itemArrayDetails); // in case the appends leave
RPositionServer iPositionServer;
RPositioner iPositioner;
User::LeaveIfError(iPositionServer.Connect());
User::LeaveIfError(iPositioner.Open(iPositionServer));
itemArray->AppendL(_L("(Info on all modules)"));
itemArray->AppendL(_L("(Default)"));
TUint aModules = 0;
TInt defaultModule=-1;
// Get the available numbers of modules
User::LeaveIfError(iPositionServer.GetNumModules(aModules));
TPositionModuleInfo info;
TPositionModuleId aModuleId;
iPositionServer.GetDefaultModuleId(aModuleId);
// Prepare itemArray and itemArrayDetails
for(TUint i = 0; i < aModules; i++)
{
if ((iPositionServer.GetModuleInfoByIndex(i,info) == KErrNone) && (info.IsAvailable()))
{
TBuf<200> smallBuffer;
smallBuffer.Zero();
info.GetModuleName(smallBuffer);
itemArray->AppendL(smallBuffer);
TBuf<200> buffer;
buffer.Zero();
info.GetModuleName(buffer);
buffer.Append(_L(" ("));
if (info.DeviceLocation() & TPositionModuleInfo::EDeviceExternal)
buffer.Append(_L("External "));
if (info.DeviceLocation() & TPositionModuleInfo::EDeviceInternal)
buffer.Append(_L("Internal "));
if (info.DeviceLocation() & TPositionModuleInfo::EDeviceUnknown)
buffer.Append(_L("Unknown "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyAssisted)
buffer.Append(_L("Assisted "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyTerminal)
buffer.Append(_L("GPS, "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyNetwork)
buffer.Append(_L("Network, "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyUnknown)
buffer.Append(_L("Unknown tech, "));
if (buffer.Mid(buffer.Length()-2, 2).Compare( _L(", ")) == KErrNone)
buffer.Replace(buffer.Length()-2, 2, _L(")"));
if (buffer.Mid(buffer.Length()-1, 1).Compare( _L(" ")) == KErrNone)
buffer.Replace(buffer.Length()-1, 1, _L(")"));
if ( info.ModuleId() == aModuleId)
{
buffer.Append(_L(" [Default]"));
defaultModule=i;
}
itemArrayDetails->AppendL(buffer);
}
}
iPositioner.Close();
iPositionServer.Close();
// Present list of positioning methods
TInt selectIndex;
selectIndex=iPosMethod+1;
HBufC* title = NULL;
title = CEikonEnv::Static()->AllocReadResourceLC(R_TTGP_TBUF32_DIALOG_POSITIONING_TITLE); // Select positioning method:
CAknListQueryDialog* dialog = new (ELeave) CAknListQueryDialog(&selectIndex);
dialog->PrepareLC(R_TTGP_DIALOG_LISTQUERY);
dialog->QueryHeading()->SetTextL(*title);
dialog->SetItemTextArray(itemArray);
dialog->SetOwnershipType(ELbmDoesNotOwnItemArray);
TInt answer = dialog->RunLD();
CleanupStack::PopAndDestroy(); // title
// Check answer
if (answer)
{
if (selectIndex==0) // (Info on all modules)
{
TBuf<1000> aText;
aText.Zero();
for (TInt i=0;i<itemArrayDetails->Count();i++)
{
aText.AppendFormat(_L("%d. "), i+1);
aText.Append(itemArrayDetails->MdcaPoint(i));
if (i<itemArrayDetails->Count()-1)
aText.Append(_L("\n"));
}
HBufC* title = CEikonEnv::Static()->AllocReadResourceLC(R_TTGP_TBUF32_AVAILABLEPOSITIONING_TITLE); // Available modules:
CAknMessageQueryDialog* dialog = new (ELeave) CAknMessageQueryDialog();
CleanupStack::PushL(dialog);
dialog->PrepareLC(R_TTGP_DIALOG_MESSAGEQUERY_OK);
dialog->QueryHeading()->SetTextL(*title);
dialog->SetMessageTextL(aText);
CleanupStack::Pop(); // dialog
dialog->RunLD();
CleanupStack::PopAndDestroy(); // title
}
//.........这里部分代码省略.........
示例14: HandleCommandL
//.........这里部分代码省略.........
#ifndef __S60V3__
// FIXME3RD
#ifndef __WINS__
# ifndef __S60V2__
auto_ptr<CDorisBrowserInterface> ido(CDorisBrowserInterface::NewL());
ido->AppendL(CDorisBrowserInterface::EOpenURL_STRING, url);
ido->ExecuteL();
# else
HBufC8* addr8=HBufC8::NewLC(url.Length());
TPtr8 addrp=addr8->Des();
CC()->ConvertFromUnicode(addrp, url);
TUid KUidOperaBrowserUid = {0x101F4DED};
TUid KUidOperaRenderViewUid = {0};
TVwsViewId viewId(KUidOperaBrowserUid, KUidOperaRenderViewUid);
CVwsSessionWrapper* vws;
vws=CVwsSessionWrapper::NewLC();
vws->ActivateView(viewId, KUidOperaRenderViewUid, *addr8);
CleanupStack::PopAndDestroy(2);
# endif
#endif
#endif
break;
}
case EContextContactsCmdDelete:
{
//note: this isn't the behaviour of original contact app
TInt idx = iContainer->get_current_item_idx();
TInt id = iItem->PbkFieldAt(idx).PbkFieldId();
TPbkContactItemField * field = iItem->FindField(id, idx);
TInt length = field->Label().Length() + field->Text().Length() + 10;
HBufC * header = CEikonEnv::Static()->AllocReadResourceL(R_DELETE);
CleanupStack::PushL(header);
HBufC * message= HBufC::NewL(length);
CleanupStack::PushL(message);
message->Des().Append(field->Label());
message->Des().Append(_L(" ("));
message->Des().Append(field->Text());
message->Des().Append(_L(") ?"));
CAknMessageQueryDialog * dlg = CAknMessageQueryDialog::NewL(*message);
CleanupStack::PushL(dlg);
dlg->PrepareLC(R_CONFIRMATION_QUERY);
dlg->QueryHeading()->SetTextL(*header);
CleanupStack::Pop(dlg);
if ( dlg->RunLD() )
{
CPbkContactItem * temp_item = pbkengine->OpenContactLCX(iViewState->FocusedContactId());
temp_item->RemoveField(iContainer->get_current_item_idx());
pbkengine->CommitContactL(*temp_item);
CleanupStack::PopAndDestroy(2);
}
CleanupStack::PopAndDestroy(2); //header, message
Refresh();
break;
}
#ifdef __S60V3__
case EContextContactsMenuMsgCurrent:
case EContextContactsMenuMsg:
{
HandleCreateMessageL();
}
break;
#endif
default:
{
#ifndef __S60V3__
//FIXME3RD
if (!iSendAppUi->CommandIsValidL(aCommand, TSendingCapabilities(0, 0, TSendingCapabilities::EAllMTMs)))
#endif
{
AppUi()->HandleCommandL( aCommand );
}
#ifndef __S60V3__
else
{
TUid mtm = iSendAppUi->MtmForCommand(aCommand);
CArrayFixFlat<TInt> * c = new CArrayFixFlat<TInt>(1);
CleanupStack::PushL(c);
c->AppendL(iViewState->FocusedContactId());
aPhoneHelper.send_as( mtm, c);
CleanupStack::PopAndDestroy(1); // c
}
#endif
break;
}
}
}
示例15: HandleCommandL
// ----------------------------------------------------
// CMobileOfficeAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CMobileOfficeAppUi::HandleCommandL(TInt aCommand)
{
CheckDemo();
switch ( aCommand )
{
case EAknSoftkeyExit:
case EEikCmdExit:
{
if (iDoorObserver)
iDoorObserver->NotifyExit( MApaEmbeddedDocObserver::ENoChanges );
#ifndef FREEVERSION
licMan.End();
#endif
Exit();
break;
}
case EMobileOfficeCmdAppAbout:
{
HBufC* messageText = StringLoader::LoadLC( R_MOBILESEARCH_ABOUT );
/*
TBuf<500> nein;
nein.Copy(*messageText);
nein.Append(_L("\r\n"));
nein.Append(_L("\r\n"));
nein.Append(_L("Application: 1.1"));
nein.Append(_L("\r\n"));
*/
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( *messageText );
dlg->PrepareLC(R_MESSAGE_QUERY);
HBufC* aboutTitleText = StringLoader::LoadLC( R_MOBILESEARCH_ABOUTTITLE );
dlg->QueryHeading()->SetTextL( *aboutTitleText );
CleanupStack::PopAndDestroy( aboutTitleText );
dlg->RunLD();
CleanupStack::PopAndDestroy( messageText );
break;
}
case EMobileOfficeCmdOpen:
{
TUid viewID = KEditorViewViewId;
ActivateLocalViewL(viewID);
//SendFileL(iOpenDocument->Filename());
break;
}
case EMobileOfficeCmdList:
{
TUid viewID = KViewId;
ActivateLocalViewL(viewID);
break;
}
case EMobileOfficeCmdProp:
{
TUid viewID = KView2Id;
ActivateLocalViewL(viewID);
break;
}
#ifndef FREEVERSION
case EMobileOfficeCmdRegister:
{
Register();
break;
}
#endif
case EMobileOfficeCmdPicture:
{
TUid viewID = KViewImageViewId;
ActivateLocalViewL(viewID);
break;
}
case EMobileOfficeCmdNewText:
{
TUid viewID = KEditorViewViewId;
OpenDocument()->SetNextViewID(viewID);
OpenDocument()->SetEditable(ETrue);
ActivateLocalViewL(viewID);
break;
}
case EMobileOfficeCmdBack:
{
ActivateLocalViewL(OpenDocument()->NextViewID());
break;
}
case EMobileOfficeCmdHelp:
//.........这里部分代码省略.........