equal
deleted
inserted
replaced
28 //forward declaration |
28 //forward declaration |
29 class HbIconItem; |
29 class HbIconItem; |
30 class HbMainWindow; |
30 class HbMainWindow; |
31 class QAbstractItemModel; |
31 class QAbstractItemModel; |
32 |
32 |
|
33 class QGestureEvent; |
33 typedef enum |
34 typedef enum |
34 { |
35 { |
35 NO_MOVE, |
36 NO_MOVE, |
36 TAP_MOVE, |
37 TAP_MOVE, |
37 LEFT_MOVE, |
38 LEFT_MOVE, |
44 TAP_EVENT, //send the signal when user tap on full screen |
45 TAP_EVENT, //send the signal when user tap on full screen |
45 PANNING_START_EVENT, //send the signal when panning of full screen start |
46 PANNING_START_EVENT, //send the signal when panning of full screen start |
46 EMPTY_ROW_EVENT //send the signal when model have no data |
47 EMPTY_ROW_EVENT //send the signal when model have no data |
47 } GlxCoverFlowEvent; |
48 } GlxCoverFlowEvent; |
48 |
49 |
49 class GlxCoverFlow : public HbScrollArea |
50 class GlxCoverFlow : public HbWidget |
50 { |
51 { |
51 Q_OBJECT |
52 Q_OBJECT |
52 |
53 |
53 public : |
54 public : |
54 GlxCoverFlow (QGraphicsItem *parent = NULL); |
55 GlxCoverFlow (QGraphicsItem *parent = NULL); |
57 void setModel (QAbstractItemModel *model); |
58 void setModel (QAbstractItemModel *model); |
58 void indexChanged (int index); |
59 void indexChanged (int index); |
59 void setUiOn(bool uiOn) { mUiOn = uiOn; } |
60 void setUiOn(bool uiOn) { mUiOn = uiOn; } |
60 void partiallyClean(); |
61 void partiallyClean(); |
61 void partiallyCreate(QAbstractItemModel *model, QSize itemSize); |
62 void partiallyCreate(QAbstractItemModel *model, QSize itemSize); |
62 void rotateImage(); |
63 void setCoverFlow(); |
63 void setCoverFlow(); |
|
64 void ClearCoverFlow(); |
64 void ClearCoverFlow(); |
65 |
65 |
66 public slots: |
66 public slots: |
67 void rotationEffectFinished( const HbEffect::EffectStatus &status ); |
|
68 |
67 |
69 signals : |
68 signals : |
70 void coverFlowEvent(GlxCoverFlowEvent e); |
69 void coverFlowEvent(GlxCoverFlowEvent e); |
71 void changeSelectedIndex(const QModelIndex &index); |
70 void changeSelectedIndex(const QModelIndex &index); |
72 void autoLeftMoveSignal(); |
71 void autoLeftMoveSignal(); |
82 void rowsRemoved(const QModelIndex &parent, int start, int end); |
81 void rowsRemoved(const QModelIndex &parent, int start, int end); |
83 void autoLeftMove(); |
82 void autoLeftMove(); |
84 void autoRightMove(); |
83 void autoRightMove(); |
85 |
84 |
86 protected: |
85 protected: |
87 void mousePressEvent(QGraphicsSceneMouseEvent *event); |
86 void gestureEvent(QGestureEvent *event); |
88 void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) ; |
|
89 |
87 |
90 void move(int value); |
88 void move(int value); |
91 |
89 |
92 void setRows() ; |
90 void setRows() ; |
93 void setStripLen(); |
91 void setStripLen(); |
101 //add the connection to the model |
99 //add the connection to the model |
102 void initializeNewModel(); |
100 void initializeNewModel(); |
103 //reset all the data of cover flow |
101 //reset all the data of cover flow |
104 void resetCoverFlow(); |
102 void resetCoverFlow(); |
105 int getSubState(); |
103 int getSubState(); |
106 private slots: |
|
107 |
104 |
108 private: |
105 private: |
109 HbIconItem *mIconItem[NBR_ICON_ITEM]; //at most contain only five item |
106 HbIconItem *mIconItem[NBR_ICON_ITEM]; //at most contain only five item |
110 qint16 mSelItemIndex; // current full screen index |
107 qint16 mSelItemIndex; // current full screen index |
111 qint16 mRows; // total number of item |
108 qint16 mRows; // total number of item |
115 qint32 mCurrentPos; //current postion in the virtual strip |
112 qint32 mCurrentPos; //current postion in the virtual strip |
116 QSize mItemSize; //hb icon item size |
113 QSize mItemSize; //hb icon item size |
117 bool mUiOn; |
114 bool mUiOn; |
118 int mBounceBackDeltaX; |
115 int mBounceBackDeltaX; |
119 QAbstractItemModel *mModel; |
116 QAbstractItemModel *mModel; |
120 GlxUserMove mMoveDir; //arun_goel3 may be remove later or change later |
117 GlxUserMove mMoveDir; |
121 int rotAngle; |
118 int mSpeed; |
122 |
|
123 }; |
119 }; |
124 |
120 |
125 #endif /* GLXCOVERFLOW_H_ */ |
121 #endif /* GLXCOVERFLOW_H_ */ |