equal
deleted
inserted
replaced
17 |
17 |
18 #ifndef HSALLAPPSSTATE_H |
18 #ifndef HSALLAPPSSTATE_H |
19 #define HSALLAPPSSTATE_H |
19 #define HSALLAPPSSTATE_H |
20 |
20 |
21 #include <QState> |
21 #include <QState> |
|
22 #include <qvaluespacepublisher.h> |
|
23 #include <qvaluespacesubscriber.h> |
22 #include "hsbaseviewstate.h" |
24 #include "hsbaseviewstate.h" |
23 #include "hsmenumodewrapper.h" |
25 #include "hsmenumodewrapper.h" |
24 |
26 |
25 |
27 |
26 |
28 |
32 class HsMenuViewBuilder; |
34 class HsMenuViewBuilder; |
33 class HsMenuItemModel; |
35 class HsMenuItemModel; |
34 class HsMenuModeWrapper; |
36 class HsMenuModeWrapper; |
35 class HsMainWindow; |
37 class HsMainWindow; |
36 |
38 |
|
39 QTM_USE_NAMESPACE |
|
40 |
37 class HsAllAppsState: public HsBaseViewState |
41 class HsAllAppsState: public HsBaseViewState |
38 { |
42 { |
39 Q_OBJECT |
43 Q_OBJECT |
40 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
44 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
41 public: |
45 public: |
44 HsMainWindow &mainWindow, |
48 HsMainWindow &mainWindow, |
45 QState *parent = 0); |
49 QState *parent = 0); |
46 ~HsAllAppsState(); |
50 ~HsAllAppsState(); |
47 void scrollToBeginning(); |
51 void scrollToBeginning(); |
48 void setModel(Hs::HsMenuMode menuMode); |
52 void setModel(Hs::HsMenuMode menuMode); |
49 |
53 |
50 signals: |
54 signals: |
51 void toAppLibraryState(); |
55 void toAppLibraryState(); |
52 |
56 |
53 private slots: |
57 private slots: |
54 void addToCollection(); |
58 void addToCollection(); |
55 void ascendingMenuAction(); |
59 void ascendingMenuAction(); |
56 void descendingMenuAction(); |
60 void descendingMenuAction(); |
|
61 void listMenuAction(); |
|
62 void gridMenuAction(); |
|
63 void orientationChanged(Qt::Orientation orientation, bool ifActivate = true); |
57 void normalModeEntered(); |
64 void normalModeEntered(); |
58 void stateExited(); |
65 void stateExited(); |
59 void updateLabel(); |
66 void updateLabel(); |
|
67 void stateEntered(); |
|
68 void orientationGoingToBeChanged(); |
60 |
69 |
61 private: |
70 private: |
62 void construct(); |
71 void construct(); |
63 void setMenuOptions(); |
72 void setMenuOptions(); |
64 void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags); |
73 void setContextMenuOptions(HbAbstractViewItem *item, EntryFlags flags); |
66 private: |
75 private: |
67 HsAddModeProxyModel *mAddModeProxyModel; |
76 HsAddModeProxyModel *mAddModeProxyModel; |
68 Hs::HsSortAttribute mSortAttribute; |
77 Hs::HsSortAttribute mSortAttribute; |
69 HbAction *mAscendingMenuAction; //not own |
78 HbAction *mAscendingMenuAction; //not own |
70 HbAction *mDescendingMenuAction; //not own |
79 HbAction *mDescendingMenuAction; //not own |
|
80 HbAction *mListMenuAction; //not own |
|
81 HbAction *mGridMenuAction; //not own |
|
82 HbMainWindow *mMainWindow; //not own |
|
83 |
|
84 //Grid request publisher |
|
85 QValueSpacePublisher *mPublisher; |
|
86 //Grid status request subscriber |
|
87 QValueSpaceSubscriber *mSubscriber; |
|
88 bool mGrid; |
|
89 QPersistentModelIndex mCurrentVisibleItemIndex; |
71 }; |
90 }; |
72 |
91 |
73 #endif // HSALLAPPSSTATE_H |
92 #endif // HSALLAPPSSTATE_H |