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" |
|
24 |
27 |
25 |
28 |
26 |
29 HS_STATES_TEST_CLASS(MenuStatesTest) |
27 HS_STATES_TEST_CLASS(MenuStatesTest) |
30 |
28 |
31 class HbView; |
29 class HbView; |
32 class HbAction; |
|
33 class HbMenu; |
|
34 class HbAbstractViewItem; |
30 class HbAbstractViewItem; |
35 class QPointF; |
31 class QPointF; |
36 class HsMenuViewBuilder; |
32 class HsMenuViewBuilder; |
37 class HsMenuItemModel; |
33 class HsMenuItemModel; |
38 class HsMenuModeWrapper; |
34 class HsMenuModeWrapper; |
50 ~HsAllAppsState(); |
46 ~HsAllAppsState(); |
51 |
47 |
52 signals: |
48 signals: |
53 void toAppLibraryState(); |
49 void toAppLibraryState(); |
54 |
50 |
55 public slots: |
|
56 void scrollToBeginning(); |
|
57 void collectionsSortOrder(HsSortAttribute sortAttribute); |
|
58 private slots: |
51 private slots: |
59 bool openTaskSwitcher(); |
|
60 int checkSoftwareUpdates(); |
|
61 void listItemActivated(const QModelIndex &index); |
|
62 void addActivated(const QModelIndex &index); |
52 void addActivated(const QModelIndex &index); |
63 void listItemLongPressed(HbAbstractViewItem *item, const QPointF &coords); |
|
64 void addLongPressed(HbAbstractViewItem *item, const QPointF &coords); |
53 void addLongPressed(HbAbstractViewItem *item, const QPointF &coords); |
65 void addToCollection(); |
54 void addToCollection(); |
66 void openInstalledView(); |
55 void openInstalledView(); |
67 void ascendingMenuAction(); |
56 void ascendingMenuAction(); |
68 void descendingMenuAction(); |
57 void descendingMenuAction(); |
69 void stateEntered(); |
58 void normalModeEntered(); |
70 void addModeEntered(); |
59 void addModeEntered(); |
71 void normalModeEntered(); |
|
72 void stateExited(); |
60 void stateExited(); |
73 void contextMenuAction(HbAction *action); |
61 void contextMenuAction(HbAction *action); |
74 private: |
62 private: |
75 void construct(); |
63 void construct(); |
76 void setMenuOptions(); |
64 void setMenuOptions(); |
77 void addToHomeScreen(const QModelIndex &index); |
65 void addToHomeScreen(const QModelIndex &index); |
|
66 void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags); |
|
67 |
78 private: |
68 private: |
79 HbAction *mSecondarySoftkeyAction; |
69 HsAddModeProxyModel *mAddModeProxyModel; |
80 HsSortAttribute mSortAttribute; |
70 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 }; |
71 }; |
90 |
72 |
91 #endif // HSALLAPPSSTATE_H |
73 #endif // HSALLAPPSSTATE_H |