// --------------------------------------------------------- // 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(); }
// 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); }
QT_BEGIN_NAMESPACE /*! \class QS60MainAppUi \since 4.6 \brief The QS60MainAppUi class is a helper class for S60 migration. \warning This class is provided only to get access to S60 specific functionality in the application framework classes. It is not portable. We strongly recommend against using it in new applications. The QS60MainAppUi provides a helper class for use in migrating from existing S60 based applications to Qt based applications. It is used in the exact same way as the \c CAknAppUi class from Symbian, but internally provides extensions used by Qt. When modifying old S60 applications that rely on implementing functions in \c CAknAppUi, the class should be modified to inherit from this class instead of \c CAknAppUi. Then the application can choose to override only certain functions. For more information on \c CAknAppUi, please see the S60 documentation. Unlike other Qt classes, QS60MainAppUi behaves like an S60 class, and can throw Symbian leaves. \sa QS60MainDocument, QS60MainApplication */ /*! * \brief Second phase Symbian constructor. * * Constructs all the elements of the class that can cause a leave to happen. * * If you override this function, you should call the base class implementation as well. */ void QS60MainAppUi::ConstructL() { // Cone's heap and handle checks on app destruction are not suitable for Qt apps, as many // objects can still exist in static data at that point. Instead we will print relevant information // so that comparative checks may be made for memory leaks, using ~SPrintExitInfo in corelib. iEikonEnv->DisableExitChecks(ETrue); // Initialise app UI with standard value. // ENoAppResourceFile and ENonStandardResourceFile makes UI to work without // resource files in most SDKs. S60 3rd FP1 public seems to require resource file // even these flags are defined TInt flags = CAknAppUi::EAknEnableSkin; if (QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)) { flags |= CAknAppUi::ENoScreenFurniture | CAknAppUi::ENonStandardResourceFile; } BaseConstructL(flags); if (!QApplication::testAttribute(Qt::AA_S60DontConstructApplicationPanes)) { CEikButtonGroupContainer* nativeContainer = Cba(); nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS); } }
void CZXingBarcodeReaderAppUi::UseOptionsBackCbaL() { CEikButtonGroupContainer* cba = Cba(); if (cba) { cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK); cba->DrawNow(); } }
// --------------------------------------------------------- // 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::EElementActivatedInputBox: current->SetCommandSetL( R_INPUT_ELEMENT_BUTTONS ); break; default: current->SetCommandSetL( R_BROWSER_DEFAULT_BUTTONS ); break; } current->DrawNow(); brCtl->SetRect(iAppView->Rect()); }
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(); }
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(); }
// 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"); }