homescreenapp/stateplugins/hsapplibrarystateplugin/src/hsinstalledappsstate.cpp
changeset 51 4785f57bf3d4
parent 46 23b5d6a29cce
child 55 03646e8da489
equal deleted inserted replaced
46:23b5d6a29cce 51:4785f57bf3d4
    32 #include "cadefs.h"
    32 #include "cadefs.h"
    33 #include "hsinstalledappsstate.h"
    33 #include "hsinstalledappsstate.h"
    34 #include "hsaddappstocollectionstate.h"
    34 #include "hsaddappstocollectionstate.h"
    35 #include "hsapp_defs.h"
    35 #include "hsapp_defs.h"
    36 #include "hsmenumodetransition.h"
    36 #include "hsmenumodetransition.h"
       
    37 #include "hsmainwindow.h"
    37 
    38 
    38 /*!
    39 /*!
    39  \class HsInstalledAppsState
    40  \class HsInstalledAppsState
    40  \ingroup group_hsapplibrarystateplugin
    41  \ingroup group_hsapplibrarystateplugin
    41  \brief Manages displaying installed applications
    42  \brief Manages displaying installed applications
    73  Constructor.
    74  Constructor.
    74  \param menuViewBuilder Menu view builder.
    75  \param menuViewBuilder Menu view builder.
    75  \param parent Owner.
    76  \param parent Owner.
    76  */
    77  */
    77 HsInstalledAppsState::HsInstalledAppsState(HsMenuViewBuilder &menuViewBuilder,
    78 HsInstalledAppsState::HsInstalledAppsState(HsMenuViewBuilder &menuViewBuilder,
       
    79         HsMainWindow &mainWindow,
    78         QState *parent):
    80         QState *parent):
    79     QState(parent),
    81     QState(parent),
    80     mMenuView(menuViewBuilder, HsInstalledAppsContext),
    82     mMenuView(menuViewBuilder, HsInstalledAppsContext),
    81     mInstalledAppsModel(0),
    83     mInstalledAppsModel(0),
    82     mSecondarySoftkeyAction(new HbAction(Hb::BackNaviAction, this)),
    84     mSecondarySoftkeyAction(new HbAction(Hb::BackNaviAction, this)),
       
    85     mMainWindow(mainWindow),
    83     mContextModelIndex(),mContextMenu(0)
    86     mContextModelIndex(),mContextMenu(0)
    84 {
    87 {
    85     construct();
    88     construct();
    86 }
    89 }
    87 
    90 
   144 void HsInstalledAppsState::stateEntered()
   147 void HsInstalledAppsState::stateEntered()
   145 {
   148 {
   146     qDebug("AllAppsState::stateEntered()");
   149     qDebug("AllAppsState::stateEntered()");
   147     HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::stateEntered");
   150     HSMENUTEST_FUNC_ENTRY("HsInstalledAppsState::stateEntered");
   148 
   151 
       
   152     mMainWindow.setCurrentView(mMenuView);
   149     mMenuView.activate();
   153     mMenuView.activate();
   150 
   154 
   151     if (!mInstalledAppsModel) {
   155     if (!mInstalledAppsModel) {
   152         mInstalledAppsModel
   156         mInstalledAppsModel
   153         = HsMenuService::getInstalledModel(AscendingNameHsSortAttribute);
   157         = HsMenuService::getInstalledModel(AscendingNameHsSortAttribute);