Exemple #1
0
/*!
 * \brief Dynamically initializes a menu pane.
 *
 * The resource associated with the menu is given in \a resourceId, and the actual menu pane is
 * passed in \a menuPane.
 *
 * If you override this function, you should call the base class implementation as well.
 */
void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane)
{
    if (resourceId == R_QT_WRAPPERAPP_MENU) {
        if (menuPane->NumberOfItemsInPane() <= 1)
            QT_TRYCATCH_LEAVING(qt_symbian_show_toplevel(menuPane));

    } else if (resourceId != R_AVKON_MENUPANE_FEP_DEFAULT
            && resourceId != R_AVKON_MENUPANE_EDITTEXT_DEFAULT
            && resourceId != R_AVKON_MENUPANE_LANGUAGE_DEFAULT) {
        QT_TRYCATCH_LEAVING(qt_symbian_show_submenu(menuPane, resourceId));
    }
}
Exemple #2
0
/*!
 * \brief Dynamically initializes a menu pane.
 *
 * The resource associated with the menu is given in \a resourceId, and the actual menu pane is
 * passed in \a menuPane.
 *
 * If you override this function, you should call the base class implementation as well.
 */
void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane)
{
#ifdef Q_WS_S60
    if (resourceId == R_AVKON_MENUPANE_EMPTY) {
        if (menuPane->NumberOfItemsInPane() <= 1)
            QT_TRYCATCH_LEAVING(qt_symbian_show_toplevel(menuPane));

    } else if (resourceId != R_AVKON_MENUPANE_FEP_DEFAULT
            && resourceId != R_AVKON_MENUPANE_EDITTEXT_DEFAULT
            && resourceId != R_AVKON_MENUPANE_LANGUAGE_DEFAULT) {
        QT_TRYCATCH_LEAVING(qt_symbian_show_submenu(menuPane, resourceId));
    }
#else
    QS60MainAppUiBase::DynInitMenuPaneL(resourceId, menuPane);
#endif
}