homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallappsstate.h
branchRCL_3
changeset 82 5f0182e07bfb
equal deleted inserted replaced
79:f00a6757af32 82:5f0182e07bfb
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: Menu All Applications state.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef HSALLAPPSSTATE_H
       
    19 #define HSALLAPPSSTATE_H
       
    20 
       
    21 #include <QState>
       
    22 #include "hsbaseviewstate.h"
       
    23 #include "hsmenumodewrapper.h"
       
    24 
       
    25 
       
    26 
       
    27 HS_STATES_TEST_CLASS(MenuStatesTest)
       
    28 
       
    29 class HbView;
       
    30 class HbAbstractViewItem;
       
    31 class QPointF;
       
    32 class HsMenuViewBuilder;
       
    33 class HsMenuItemModel;
       
    34 class HsMenuModeWrapper;
       
    35 class HsMainWindow;
       
    36 
       
    37 class HsAllAppsState: public HsBaseViewState
       
    38 {
       
    39     Q_OBJECT
       
    40     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
       
    41 public:
       
    42     HsAllAppsState(HsMenuViewBuilder &menuViewBuilder,
       
    43                    HsMenuModeWrapper &menuMode,
       
    44                    HsMainWindow &mainWindow,
       
    45                    QState *parent = 0);
       
    46     ~HsAllAppsState();
       
    47     void scrollToBeginning();
       
    48     void setModel(Hs::HsMenuMode menuMode);
       
    49     
       
    50 signals:
       
    51     void toAppLibraryState();
       
    52 
       
    53 private slots:
       
    54     void addToCollection();
       
    55     void openInstalledView();
       
    56     void ascendingMenuAction();
       
    57     void descendingMenuAction();
       
    58     void normalModeEntered();
       
    59     void stateExited();
       
    60 private:
       
    61     void construct();
       
    62     void setMenuOptions();
       
    63     void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags);
       
    64 
       
    65 private:
       
    66     HsAddModeProxyModel *mAddModeProxyModel;
       
    67     Hs::HsSortAttribute mSortAttribute;
       
    68 };
       
    69 
       
    70 #endif // HSALLAPPSSTATE_H