equal
deleted
inserted
replaced
21 #include <QAbstractItemView> |
21 #include <QAbstractItemView> |
22 #include <QObject> |
22 #include <QObject> |
23 #include <QModelIndex> |
23 #include <QModelIndex> |
24 #include <QScopedPointer> |
24 #include <QScopedPointer> |
25 #include <QSortFilterProxyModel> |
25 #include <QSortFilterProxyModel> |
|
26 #include <QPersistentModelIndex> |
26 #include <HbAbstractItemView> |
27 #include <HbAbstractItemView> |
27 #include "hsmenustates_global.h" |
28 #include "hsmenustates_global.h" |
28 #include "hsmenuviewbuilder.h" |
29 #include "hsmenuviewbuilder.h" |
29 #include "hssearchview.h" |
30 #include "hssearchview.h" |
30 #include "hsapp_defs.h" |
31 #include "hsapp_defs.h" |
48 { |
49 { |
49 Q_OBJECT |
50 Q_OBJECT |
50 |
51 |
51 public: |
52 public: |
52 HsMenuView(HsMenuViewBuilder &builder, HsStateContext stateContext, |
53 HsMenuView(HsMenuViewBuilder &builder, HsStateContext stateContext, |
53 HsMainWindow& mainWindow); |
54 HsMainWindow& mainWindow, |
|
55 HsOperationalContext operationalContext = HsItemViewContext); |
54 ~HsMenuView(); |
56 ~HsMenuView(); |
55 |
57 |
56 HbView *view() const; |
58 HbView *view() const; |
57 |
59 |
58 HbListView *listView() const; |
60 HbAbstractItemView *itemView() const; |
59 |
61 |
60 void activate(); |
62 void activate(); |
61 void inactivate(); |
63 void inactivate(); |
62 |
64 |
63 HbGroupBox *viewLabel() const; |
65 HbGroupBox *viewLabel() const; |
|
66 |
|
67 QPersistentModelIndex currentScrollPosition() const; |
64 |
68 |
65 void setModel(QAbstractItemModel *model); |
69 void setModel(QAbstractItemModel *model); |
66 QAbstractItemModel *model() const; |
70 QAbstractItemModel *model() const; |
67 |
71 |
68 void reset(HsOperationalContext operationalContext); |
72 void reset(HsOperationalContext operationalContext); |
96 const HsStateContext mStateContext; |
100 const HsStateContext mStateContext; |
97 HsOperationalContext mOperationalContext; |
101 HsOperationalContext mOperationalContext; |
98 HsMainWindow &mMainWindow; |
102 HsMainWindow &mMainWindow; |
99 |
103 |
100 HbView *mView; // once this is constructed it is not NULL |
104 HbView *mView; // once this is constructed it is not NULL |
101 HbListView *mListView; // may be NULL in some contexts |
105 HbAbstractItemView *mAbstractItemView; // may be NULL in some contexts |
102 HbGroupBox *mViewLabel; // may be NULL in some contexts |
106 HbGroupBox *mViewLabel; // may be NULL in some contexts |
103 |
107 |
104 QScopedPointer<HsSearchView> mHsSearchView; |
108 QScopedPointer<HsSearchView> mHsSearchView; |
105 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
109 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
106 }; |
110 }; |