16 */ |
16 */ |
17 |
17 |
18 #ifndef HSALLAPPSSTATE_H |
18 #ifndef HSALLAPPSSTATE_H |
19 #define HSALLAPPSSTATE_H |
19 #define HSALLAPPSSTATE_H |
20 |
20 |
21 #include <qstate.h> |
21 #include <QState> |
22 #include <QModelIndex> |
|
23 #include <QPointer> |
|
24 |
|
25 #include "hsbaseviewstate.h" |
22 #include "hsbaseviewstate.h" |
26 #include "hsmenumodewrapper.h" |
23 #include "hsmenumodewrapper.h" |
27 |
24 |
28 |
25 |
29 HS_STATES_TEST_CLASS(MenuStatesTest) |
26 HS_STATES_TEST_CLASS(MenuStatesTest) |
30 |
27 |
31 class HbView; |
28 class HbView; |
32 class HbAction; |
|
33 class HbMenu; |
|
34 class HbAbstractViewItem; |
29 class HbAbstractViewItem; |
35 class QPointF; |
30 class QPointF; |
36 class HsMenuViewBuilder; |
31 class HsMenuViewBuilder; |
37 class HsMenuItemModel; |
32 class HsMenuItemModel; |
38 class HsMenuModeWrapper; |
33 class HsMenuModeWrapper; |
50 ~HsAllAppsState(); |
45 ~HsAllAppsState(); |
51 |
46 |
52 signals: |
47 signals: |
53 void toAppLibraryState(); |
48 void toAppLibraryState(); |
54 |
49 |
55 public slots: |
|
56 void scrollToBeginning(); |
|
57 void collectionsSortOrder(HsSortAttribute sortAttribute); |
|
58 private slots: |
50 private slots: |
59 bool openTaskSwitcher(); |
|
60 int checkSoftwareUpdates(); |
|
61 void listItemActivated(const QModelIndex &index); |
|
62 void addActivated(const QModelIndex &index); |
51 void addActivated(const QModelIndex &index); |
63 void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords); |
|
64 void addLongPressed(HbAbstractViewItem *item, const QPointF &coords); |
52 void addLongPressed(HbAbstractViewItem *item, const QPointF &coords); |
65 void addToCollection(); |
53 void addToCollection(); |
66 void openInstalledView(); |
54 void openInstalledView(); |
67 void ascendingMenuAction(); |
55 void ascendingMenuAction(); |
68 void descendingMenuAction(); |
56 void descendingMenuAction(); |
69 void stateEntered(); |
|
70 void addModeEntered(); |
|
71 void normalModeEntered(); |
57 void normalModeEntered(); |
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 void addToHomeScreen(const QModelIndex &index); |
63 void addToHomeScreen(const QModelIndex &index); |
|
64 void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags); |
|
65 |
78 private: |
66 private: |
79 HbAction *mSecondarySoftkeyAction; |
|
80 HsSortAttribute mSortAttribute; |
67 HsSortAttribute mSortAttribute; |
81 HsSortAttribute mCollectionsSortAttribute; |
|
82 HsMenuView mMenuView; |
|
83 HsMenuModeWrapper &mMenuMode; |
|
84 HsMenuItemModel *mAllAppsModel; |
|
85 HsMainWindow &mMainWindow; |
|
86 QModelIndex mContextModelIndex; |
|
87 QPointer<HbMenu> mContextMenu; |
|
88 |
|
89 }; |
68 }; |
90 |
69 |
91 #endif // HSALLAPPSSTATE_H |
70 #endif // HSALLAPPSSTATE_H |