// ----------------------------------------------------------------------------- // CThemeChangeAppUi::HandleCommandL() // Takes care of command handling. // ----------------------------------------------------------------------------- // void CThemeChangeAppUi::HandleCommandL(TInt aCommand) { switch (aCommand) { case EEikCmdExit: case EAknSoftkeyExit: Exit(); break; case ECommandExit: if (ShowConfirmationQueryL(R_TEXT_DLG_EXIT_CONFIRM)) Exit(); break; case EAbout: About(); break; case ECommandHelp: ActivateLocalViewL(TUid::Uid(EThemeChangeHelpView)); break; case ECommandSetting: ActivateLocalViewL(TUid::Uid(EThemeChangeSettingView)); break; default: Panic(EThemeChangeUi); break; } }
void CNormalSettingView::HandleCommandL(TInt aCommand) { switch (aCommand) { case EAknSoftkeyOk: if (iContainer) { iContainer->StoreSettingsL(); if (iContainer->IsChange()) { //¶Ô»°¿ò if (ShowConfirmationQueryL(R_CONFIRM_SAVE_CONFIG)) { TInt result = iContainer->SaveConfig(); if ( (result & KCfgChangeFrequency) != 0) OKCChangeView(EThemeChangeAppViewId,EThemeChangeSettingView,KMsgCfgChange); else OKCChangeView(EThemeChangeAppViewId); } } else OKCChangeView(EThemeChangeAppViewId); } break; case EAknSoftkeyBack: OKCChangeView(EThemeChangeAppViewId); break; default: AppUi()->HandleCommandL(aCommand); } }
TBool CRuleManager::Delete(const TInt& aIndex) { if (aIndex >=0 && aIndex < iRules->Count()) { if (ShowConfirmationQueryL(R_TEXT_CONFIRM_DELETE_RULE)) return DeleteRule(aIndex); } return EFalse; }
void CDPOFPrintingDevice::SubmitPrintJobL() { LOG("CDPOFPrintingDevice::SubmitPrintJobL begin"); if( iDPOF->AutoPrintFileExists() ) { ShowConfirmationQueryL(); } else { OverwriteExistingJobL (); } LOG("CDPOFPrintingDevice::SubmitPrintJobL end"); }
TBool CRuleManager::Confirm(const TInt& aIndex) { CRule* rule = (*iRules)[aIndex]; HBufC* confirm = StringLoader::LoadL(R_TEXT_RULE_CONFIRM); TPtrC rulename = rule->GetRuleName(); TPtrC appname = rule->GetName(); TInt type = rule->GetType(); TInt countdown = rule->GetCountDown(); TTime time = rule->GetClock(); TBuf<16> app; if (type == 0) { HBufC* txt = StringLoader::LoadL(R_TEXT_TYPE_COUNTDOWN); app.Format(txt->Des(),countdown); delete txt; } else { HBufC* txt = StringLoader::LoadL(R_TEXT_TYPE_CLOCKING); TBuf8<8> timetxt8; TBuf<8> timetxt; CRuleManager::TimeFormat(time,timetxt8); timetxt.Copy(timetxt8); app.Format(txt->Des(),&timetxt); delete txt; } TBuf<128> temp; temp.Format(confirm->Des(),&rulename,&appname,&app); delete confirm; return ShowConfirmationQueryL(temp); }
static TBool ShowYesNoQueryL(TInt aBodyTextResource) { return ShowConfirmationQueryL(R_YESNO_QUERY_DIALOG, aBodyTextResource) != 0; }
static TBool ShowOkCancelQueryL(TInt aBodyTextResource) { return ShowConfirmationQueryL(R_OKCANCEL_QUERY_DIALOG, aBodyTextResource) != 0; }