22 #define GLXGRIDVIEW_H |
22 #define GLXGRIDVIEW_H |
23 |
23 |
24 #include "glxview.h" |
24 #include "glxview.h" |
25 |
25 |
26 //Qt/Orbit forward declarations |
26 //Qt/Orbit forward declarations |
27 class HbGridView; |
|
28 class HbMainWindow; |
27 class HbMainWindow; |
29 class HbDocumentLoader; |
|
30 class QAbstractItemModel; |
28 class QAbstractItemModel; |
31 class HbAbstractViewItem; |
29 class HgWidget; |
32 |
30 class GlxModelWrapper; |
33 #define NBR_ROW 5 |
31 class HbPushButton; |
34 #define NBR_COL 3 |
32 class HbIconItem; |
35 #define NBR_PAGE NBR_ROW * NBR_COL |
|
36 |
33 |
37 class GlxGridView : public GlxView |
34 class GlxGridView : public GlxView |
38 { |
35 { |
39 Q_OBJECT |
36 Q_OBJECT |
40 |
37 |
52 QItemSelectionModel * getSelectionModel() ; |
49 QItemSelectionModel * getSelectionModel() ; |
53 QGraphicsItem * getAnimationItem(GlxEffect transitionEffect); |
50 QGraphicsItem * getAnimationItem(GlxEffect transitionEffect); |
54 |
51 |
55 public slots: |
52 public slots: |
56 void itemSelected(const QModelIndex & index); |
53 void itemSelected(const QModelIndex & index); |
57 void setVisvalWindowIndex(); |
54 void scrollingEnded(); |
58 /* |
55 void scrollingStarted(); |
59 * This loads the docml and retrives the widgets from the |
56 void orientationchanged(Qt::Orientation orient); |
60 * docml corresponding to the present orentation |
57 void visibleIndexChanged(const QModelIndex& current, const QModelIndex& previous); |
61 */ |
58 |
62 void loadGridView(Qt::Orientation orient); |
|
63 void itemDestroyed(); |
|
64 |
|
65 protected : |
59 protected : |
66 QVariant itemChange (GraphicsItemChange change, const QVariant &value) ; |
60 QVariant itemChange (GraphicsItemChange change, const QVariant &value) ; |
67 |
61 |
68 private slots: |
62 private slots: |
69 void indicateLongPress( HbAbstractViewItem *item, QPointF coords ); |
63 void indicateLongPress(const QModelIndex& index, QPointF coords); |
|
64 void uiButtonClicked(bool checked); |
70 |
65 |
71 private: |
66 private: |
72 void addViewConnection(); |
67 void addViewConnection(); |
73 void removeViewConnection(); |
68 void removeViewConnection(); |
74 void resetItemTransform(); |
69 void hideorshowitems(Qt::Orientation orient); |
|
70 void scrolltofocus(); |
|
71 void loadGridView(); |
75 |
72 |
76 private: |
73 HbMainWindow *mWindow; // no ownership |
77 HbGridView *mGridView; |
|
78 HbView *mView; |
|
79 HbMainWindow *mWindow; //no ownership |
|
80 QAbstractItemModel *mModel ; |
74 QAbstractItemModel *mModel ; |
81 int mVisualIndex; //first item index of the page //To:Do remove later |
75 HgWidget *mWidget; // HG Grid Widget |
82 HbAbstractViewItem *mItem; |
76 QItemSelectionModel *mSelectionModel; // Selected items model |
83 HbDocumentLoader *mDocLoader; //Docml loader to load the widgets from docml |
77 GlxModelWrapper *mModelWrapper; // Temp Model Wrapper, so That Role Change not a problem |
84 bool mIsLongPress; //to check the long press has happend or not |
78 HbPushButton *mUiOnButton; |
|
79 bool mScrolling; |
|
80 HbIconItem *mIconItem; |
85 }; |
81 }; |
86 |
82 |
87 #endif /* GLXGRIDVIEW_H_ */ |
83 #endif /* GLXGRIDVIEW_H_ */ |