homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hsallcollectionsstate.h
changeset 63 52b0f64eeb51
parent 62 341166945d65
child 69 87476091b3f5
equal deleted inserted replaced
62:341166945d65 63:52b0f64eeb51
    16  */
    16  */
    17 
    17 
    18 #ifndef HSALLCOLLECTIONSSTATE_H
    18 #ifndef HSALLCOLLECTIONSSTATE_H
    19 #define HSALLCOLLECTIONSSTATE_H
    19 #define HSALLCOLLECTIONSSTATE_H
    20 
    20 
    21 #include <qstate.h>
    21 #include <QState>
    22 #include <QModelIndex>
       
    23 #include <QPointF>
    22 #include <QPointF>
    24 #include <QPointer>
       
    25 
    23 
    26 #include "hsbaseviewstate.h"
    24 #include "hsbaseviewstate.h"
    27 #include "hsmenumodewrapper.h"
    25 #include "hsmenumodewrapper.h"
    28 
    26 
    29 HS_STATES_TEST_CLASS(MenuStatesTest)
    27 HS_STATES_TEST_CLASS(MenuStatesTest)
    30 
    28 
    31 class HbMenu;
       
    32 class HsMenuViewBuilder;
    29 class HsMenuViewBuilder;
    33 class HbAbstractViewItem;
    30 class HbAbstractViewItem;
    34 class HbAction;
    31 class HbAction;
    35 class HbMainWindow;
    32 class HbMainWindow;
    36 class HsMenuItemModel;
    33 class HsMenuItemModel;
    47                           HsMainWindow &mainWindow,
    44                           HsMainWindow &mainWindow,
    48                           QState *parent = 0);
    45                           QState *parent = 0);
    49     ~HsAllCollectionsState();
    46     ~HsAllCollectionsState();
    50 protected:
    47 protected:
    51 signals:
    48 signals:
    52     void sortOrderChanged(HsSortAttribute sortAttribute);
       
    53     void toAppLibraryState();
    49     void toAppLibraryState();
    54 
    50 
    55 public slots:
       
    56     void scrollToBeginning();
       
    57 private slots:
    51 private slots:
    58     bool openTaskSwitcher();
       
    59     void listItemActivated(const QModelIndex &index);
       
    60     void addActivated(const QModelIndex &index);
    52     void addActivated(const QModelIndex &index);
    61     void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords);
       
    62     void addLongPressed(HbAbstractViewItem *item, const QPointF &coords);
    53     void addLongPressed(HbAbstractViewItem *item, const QPointF &coords);
    63     void createNewCollection();
    54     void createNewCollection();
    64     void createArrangeCollection();
    55     void createArrangeCollection();
    65     void customMenuAction();
       
    66     void ascendingMenuAction();
       
    67     void descendingMenuAction();
       
    68     void stateEntered();
       
    69     void addModeEntered();
       
    70     void normalModeEntered();
    56     void normalModeEntered();
    71     void normalModeExited();
    57     void normalModeExited();
    72     void stateExited();
    58     void stateExited();
    73     void contextMenuAction(HbAction *action);
    59     void contextMenuAction(HbAction *action);
    74 private:
    60 private:
    75     void construct();
    61     void construct();
    76     void setMenuOptions();
    62     void setMenuOptions();
    77 private:
    63     void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags);
    78     HbAction *mSecondarySoftkeyAction;
       
    79     HsSortAttribute mSortAttribute;
       
    80     HsMenuView mMenuView;
       
    81     HsMenuModeWrapper &mMenuMode;
       
    82     HsMenuItemModel *mAllCollectionsModel;
       
    83     HsMainWindow &mMainWindow;
       
    84     QModelIndex mContextModelIndex;
       
    85     QPointer<HbMenu> mContextMenu;
       
    86 };
    64 };
    87 
    65 
    88 #endif // HSALLCOLLECTIONSSTATE_H
    66 #endif // HSALLCOLLECTIONSSTATE_H