本文整理汇总了C++中CEikButtonGroupContainer类的典型用法代码示例。如果您正苦于以下问题:C++ CEikButtonGroupContainer类的具体用法?C++ CEikButtonGroupContainer怎么用?C++ CEikButtonGroupContainer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CEikButtonGroupContainer类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
// ---------------------------------------------------------
// CAppSoftkeysObserver::UpdateSoftkeyL
// ---------------------------------------------------------
//
void
CAppSoftkeysObserver::UpdateSoftkeyL(TBrCtlKeySoftkey /*aKeySoftkey*/,
const TDesC& /*aLabel*/,
TUint32 /*aCommandId*/,
TBrCtlSoftkeyChangeReason /*aBrCtlSoftkeyChangeReason*/)
{
CBrCtlInterface* brCtl = iAppView->BrCtlInterface();
TBrCtlDefs::TBrCtlElementType type = brCtl->FocusedElementType();
CEikButtonGroupContainer* current = CEikButtonGroupContainer::Current();
switch (type)
{
case TBrCtlDefs::EElementActivatedObjectBox:
case TBrCtlDefs::EElementActivatedInputBox:
current->SetCommandSetL( R_AVKON_SOFTKEYS_CANCEL );
break;
default:
current->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK );
break;
}
current->DrawNow();
}
示例2: SetFileListL
// Activates this view, called by framework
void CAafAppFileBrowserView::ViewActivatedL(const TVwsViewId &/*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8 &/*aCustomMessage*/)
{
// Set files to be displayed
SetFileListL(iBrowserEngine->GetCurrentDirectory());
// Set menubar and CBA
CEikonEnv* eikonEnv = CEikonEnv::Static();
MEikAppUiFactory* appUiFactory = eikonEnv->AppUiFactory();
CEikMenuBar* menuBar = appUiFactory->MenuBar();
CEikButtonGroupContainer* cba = appUiFactory->Cba();
// If any menubar is displayed - stop displaying
if (menuBar)
menuBar->StopDisplayingMenuBar();
menuBar->SetMenuTitleResourceId(R_AAF_FILEBROWSER_MENUBAR);
cba->SetCommandSetL(R_AAF_CBA_STANDART);
cba->DrawDeferred();
// Bring this view to the top of windows stack
Window().SetOrdinalPosition(0);
// Restore listbox item selection (if it's not empty)
if (iListBox->Model()->NumberOfItems())
iListBox->SetCurrentItemIndex(iCurrentItemIndex);
// Set view visible
MakeVisible(ETrue);
}
示例3: SetupStatusPaneL
/**
* Handles user actions during activation of the view,
* such as initializing the content.
*/
void Csymbian_ua_guiSettingItemListView::DoActivateL(
const TVwsViewId& aPrevViewId,
TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/ )
{
previousView = aPrevViewId.iViewUid;
SetupStatusPaneL();
CEikButtonGroupContainer* cba = AppUi()->Cba();
if ( cba != NULL )
{
cba->MakeVisible( EFalse );
}
if ( iSymbian_ua_guiSettingItemList == NULL )
{
iSettings = TSymbian_ua_guiSettingItemListSettings::NewL();
CVoIPDocument* doc = static_cast<CVoIPDocument*>(CEikonEnv::Static()->EikAppUi()->Document());
doc->LoadSettingValuesL(*iSettings);
iSymbian_ua_guiSettingItemList = new ( ELeave ) CSymbian_ua_guiSettingItemList( *iSettings, this );
iSymbian_ua_guiSettingItemList->SetMopParent( this );
iSymbian_ua_guiSettingItemList->ConstructFromResourceL( R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_SYMBIAN_UA_GUI_SETTING_ITEM_LIST );
iSymbian_ua_guiSettingItemList->ActivateL();
//iSymbian_ua_guiSettingItemList->LoadSettingValuesL();
iSymbian_ua_guiSettingItemList->LoadSettingsL();
AppUi()->AddToStackL( *this, iSymbian_ua_guiSettingItemList );
}
// ]]] end generated region [Generated Contents]
}
示例4: SetupStatusPaneL
/**
* Handles user actions during activation of the view,
* such as initializing the content.
*/
void Csymbian_ua_guiSettingItemListView::DoActivateL (
const TVwsViewId& /*aPrevViewId*/,
TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
// [[[ begin generated region: do not modify [Generated Contents]
SetupStatusPaneL();
CEikButtonGroupContainer* cba = AppUi()->Cba();
if (cba != NULL) {
cba->MakeVisible (EFalse);
}
if (iSymbian_ua_guiSettingItemList == NULL) {
iSettings = TSymbian_ua_guiSettingItemListSettings::NewL();
iSymbian_ua_guiSettingItemList = new (ELeave) CSymbian_ua_guiSettingItemList (*iSettings, this);
iSymbian_ua_guiSettingItemList->SetMopParent (this);
iSymbian_ua_guiSettingItemList->ConstructFromResourceL (R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_SYMBIAN_UA_GUI_SETTING_ITEM_LIST);
iSymbian_ua_guiSettingItemList->ActivateL();
iSymbian_ua_guiSettingItemList->LoadSettingValuesL();
iSymbian_ua_guiSettingItemList->LoadSettingsL();
AppUi()->AddToStackL (*this, iSymbian_ua_guiSettingItemList);
}
// ]]] end generated region [Generated Contents]
}
示例5: Cba
void CZXingBarcodeReaderAppUi::UseOptionsBackCbaL()
{
CEikButtonGroupContainer* cba = Cba();
if (cba)
{
cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);
cba->DrawNow();
}
}
示例6: AssertTrueL
// ---------------------------------------------------------------------------
// CBCTestMix50Case::TestCEikCbaCaseL()
// ( menu item -6.1- )
// ---------------------------------------------------------------------------
//
void CBCTestMix50Case::TestCEikCbaCaseL()
{
CEikButtonGroupContainer* btnGroupContainer =
CEikButtonGroupContainer::Current();
CEikCba *eikcba = static_cast<CEikCba*>( btnGroupContainer->ButtonGroup() );
eikcba->HandleControlEventL(eikcba, MCoeControlObserver::EEventStateChanged);
_LIT(KHandleControlEvent, "CCoeControl::HandleControlEventL");
AssertTrueL(ETrue, KHandleControlEvent);
}
示例7: AppViewFromStack
void CPingAppUi::ShowSettingViewL()
{
iAppView->MakeVisible( EFalse );
AppViewFromStack();
SettingViewToStackL();
iSettingView->MakeVisible( ETrue );
iSettingView->DrawNow();
CEikButtonGroupContainer *cba = ((CAknAppUi*)CEikonEnv::Static()->EikAppUi())->Cba();
cba->SetCommandSetL(R_SETTINGS_CBA);
cba->DrawDeferred();
// Make sure that scroll bars are shown if needed
iSettingView->ListBox()->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto);
iSettingView->ListBox()->UpdateScrollBarsL();
}
示例8: SettingViewFromStack
void CPingAppUi::ShowAppViewL()
{
iSettingView->MakeVisible( EFalse );
SettingViewFromStack();
AppViewToStackL();
iAppView->MakeVisible( ETrue );
iAppView->DrawNow();
CEikButtonGroupContainer *cba = ((CAknAppUi*)CEikonEnv::Static()->EikAppUi())->Cba();
cba->SetCommandSetL(R_PING_CBA);
cba->DrawDeferred();
// Make sure that setting view's scroll indicators are not shown in the app view
iSettingView->ListBox()->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff);
iSettingView->ListBox()->UpdateScrollBarsL();
}
示例9: __LOGSTR_TOFILE
// Activates this view, called by framework
void CAafAppCameraView::ViewActivatedL(const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage)
{
__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() ends");
if (!iContainer)
{
__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() iContainer initialization begins");
iContainer = CAafCameraContainer::NewL( Rect() );
iContainer->SetContainerWindowL( *this );
iContainer->ActivateL();
__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() iContainer initialization ends");
}
else
{
iContainer->ActivateL();
iContainer->InitCameraL();
}
// Set menubar and CBA
CEikonEnv* eikonEnv = CEikonEnv::Static();
MEikAppUiFactory* appUiFactory = eikonEnv->AppUiFactory();
CEikMenuBar* menuBar = appUiFactory->MenuBar();
CEikButtonGroupContainer* cba = appUiFactory->Cba();
// If any menubar is displayed - stop displaying
if (menuBar)
menuBar->StopDisplayingMenuBar();
menuBar->SetMenuTitleResourceId(R_AAF_CAMERA_VIEW_MENUBAR);
cba->SetCommandSetL(R_AAF_CBA_STANDART);
cba->DrawDeferred();
// Bring this view to the top of windows stack
Window().SetOrdinalPosition(0);
MakeVisible(ETrue);
__LOGSTR_TOFILE("CAafAppCameraView::ViewActivatedL() ends");
}
示例10:
void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonGroupContainer &cba)
{
RDrawableWindow *cbaWindow = cba.DrawableWindow();
Q_ASSERT_X(cbaWindow, Q_FUNC_INFO, "Native CBA does not have window!");
// CBA comes on top of new option menu
int pos = 0;
if(cba.ButtonGroupType()== SLafButtonGroupContainer::ECba)
pos = 1;
cbaWindow->SetOrdinalPosition(pos);
// Qt shares same CBA instance between top-level widgets,
// make sure we are not faded by underlying window.
cbaWindow->SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren);
// Modal dialogs capture pointer events, but shared cba instance
// shall stay responsive. Raise pointer capture priority to keep
// softkeys responsive in modal dialogs
cbaWindow->SetPointerCapturePriority(1);
}
示例11: switch
// ---------------------------------------------------------
// CBrCtlSampleAppSoftkeysObserver::UpdateSoftkeyL
// ---------------------------------------------------------
//
void
CBrCtlSampleAppSoftkeysObserver::UpdateSoftkeyL(TBrCtlKeySoftkey /*aKeySoftkey*/,
const TDesC& /*aLabel*/,
TUint32 /*aCommandId*/,
TBrCtlSoftkeyChangeReason /*aBrCtlSoftkeyChangeReason*/)
{
CBrCtlInterface* brCtl = iContainer->BrCtlInterface();
TBrCtlDefs::TBrCtlElementType type = brCtl->FocusedElementType();
CEikButtonGroupContainer* current = CEikButtonGroupContainer::Current();
switch (type)
{
case TBrCtlDefs::EElementInputBox:
// current->SetCommandSetL( R_INPUT_ELEMENT_BUTTONS );
break;
default:
// current->SetCommandSetL( R_BROWSER_DEFAULT_BUTTONS );
break;
}
current->DrawNow();
}
示例12: CleanupStatusPane
void Csymbian_ua_guiSettingItemListView::DoDeactivate()
{
// [[[ begin generated region: do not modify [Generated Contents]
CleanupStatusPane();
CEikButtonGroupContainer* cba = AppUi()->Cba();
if ( cba != NULL )
{
cba->MakeVisible( ETrue );
cba->DrawDeferred();
}
if ( iSymbian_ua_guiSettingItemList != NULL )
{
AppUi()->RemoveFromStack( iSymbian_ua_guiSettingItemList );
delete iSymbian_ua_guiSettingItemList;
iSymbian_ua_guiSettingItemList = NULL;
delete iSettings;
iSettings = NULL;
}
// ]]] end generated region [Generated Contents]
}
示例13: _LIT
// ---------------------------------------------------------------------------
// CBCTestMix50Case::TestCEikButtonGroupContainerCaseL()
// ( menu item -6- )
// ---------------------------------------------------------------------------
//
void CBCTestMix50Case::TestCEikButtonGroupContainerCaseL()
{
TInt pos = 0;
TBCTestCommandObserver cmdObserver;
CEikButtonGroupContainer* btnGroupContainer =
CEikButtonGroupContainer::Current();
btnGroupContainer->UpdateCommandObserverL( pos, cmdObserver );
_LIT( KTxtUpdateCommandObserverL,
"CEikButtonGroupContainer::UpdateCommandObserverL" );
AssertTrueL( ETrue, KTxtUpdateCommandObserverL );
btnGroupContainer->UpdatedCommandObserverExists(
CEikButtonGroupContainer::ELeftSoftkeyPosition );
_LIT( KTxtUpdatedCommandObserverExists,
"CEikButtonGroupContainer::UpdatedCommandObserverExists" );
AssertTrueL( ETrue, KTxtUpdatedCommandObserverExists );
btnGroupContainer->RemoveCommandObserver( pos );
_LIT( KTxtRemoveCommandObserver,
"CEikButtonGroupContainer::RemoveCommandObserver" );
AssertTrueL( ETrue, KTxtRemoveCommandObserver );
}
示例14: __ASSERT_DEBUG
// ---------------------------------------------------------------------------
// CAknMemorySelectionDialogMultiDrive::ExecuteL
// ---------------------------------------------------------------------------
//
EXPORT_C CAknCommonDialogsBase::TReturnKey
CAknMemorySelectionDialogMultiDrive::ExecuteL(
TDriveNumber& aSelectedDrive, TDes* aRootPath, TDes* aDefaultFolder )
{
__ASSERT_DEBUG( iTitle && iLeftSoftkey && iRightSoftkey,
User::Panic( KCFDPanicText, ECFDPanicTitleOrSoftkeyNotSet ) );
iModel->UpdateItemsL();
TBool doubleStyle( AknCFDUtility::DirectoriesOnly( iDialogType ) );
CEikFormattedCellListBox* listBox = NULL;
if( doubleStyle )
{
listBox = new( ELeave ) CAknDoubleLargeGraphicPopupMenuStyleListBox();
}
else
{
listBox = new( ELeave ) CAknSingleGraphicPopupMenuStyleListBox();
}
CleanupStack::PushL( listBox );
AknPopupLayouts::TAknPopupLayouts layout( doubleStyle ?
AknPopupLayouts::EMenuDoubleLargeGraphicWindow :
AknPopupLayouts::EMenuGraphicWindow );
TBool isEndKeyPress = EFalse;
CAknCommonDialogsPopupList* popupList =
CAknCommonDialogsPopupList::NewL(
*iEventHandler, listBox, layout, isEndKeyPress );
CleanupStack::PushL( popupList );
listBox->ConstructL( popupList, 0 );
listBox->CreateScrollBarFrameL( ETrue ); // Create scroll indicator
listBox->ScrollBarFrame()->SetScrollBarVisibilityL(
CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
listBox->Model()->SetItemTextArray( iModel );
// Set model ownership type
listBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
// Icons:
// Granularity, 5 icons
CAknIconArray* iconArray = new( ELeave ) CAknIconArray( 5 );
CleanupStack::PushL( iconArray );
LoadIconsL( iconArray, doubleStyle );
listBox->ItemDrawer()->FormattedCellData()->SetIconArrayL( iconArray );
CleanupStack::Pop(); // iconArray
popupList->SetTitleL( *iTitle ); // Set title
CEikButtonGroupContainer* cba = popupList->ButtonGroupContainer();
MEikButtonGroup* buttonGroup = cba->ButtonGroup();
cba->SetCommandL( buttonGroup->CommandId( 0 ), *iLeftSoftkey );
cba->SetCommandL( buttonGroup->CommandId( 2 ), *iRightSoftkey );
// Set listener for popuplist anytime.
TBool hasRemoteDrive =
( iIncludedMedias & AknCommonDialogsDynMem::EMemoryTypeRemote );
iEventHandler->StartNotifyDisk( popupList, hasRemoteDrive );
TInt selectedIndex = FindIndexByDrive( aSelectedDrive );
if( selectedIndex == KErrNotFound )
{
selectedIndex = 0; // The first index
}
listBox->View()->SetCurrentItemIndex( selectedIndex );
// Update CAB show.
iEventHandler->HandleEventL(
MAknCommonDialogsEventObserver::EFocusChange,
selectedIndex,
selectedIndex,
popupList->ButtonGroupContainer() );
CleanupStack::Pop(); // popupList (deleted in ExecuteLD)
// Execute the popup dialog
TBool returnValue = EFalse;
TRAPD( err, returnValue = popupList->ExecuteLD() );
if ( iEventHandler )
{
iEventHandler->StopNotifyDisk();
}
if( returnValue )
{
selectedIndex = listBox->CurrentItemIndex();
GetDrivePaths( selectedIndex, aRootPath, aDefaultFolder );
aSelectedDrive = FindDriveByIndex( selectedIndex );
}
else if ( err )
{
User::Leave( err );
}
CleanupStack::PopAndDestroy(); // listBox
return TReturnKey( returnValue );
}