35 class HB_WIDGETS_EXPORT HbTumbleView : public HbListView |
35 class HB_WIDGETS_EXPORT HbTumbleView : public HbListView |
36 { |
36 { |
37 Q_OBJECT |
37 Q_OBJECT |
38 Q_PROPERTY(QStringList items READ items WRITE setItems) |
38 Q_PROPERTY(QStringList items READ items WRITE setItems) |
39 Q_PROPERTY(int selected READ selected WRITE setSelected) |
39 Q_PROPERTY(int selected READ selected WRITE setSelected) |
|
40 Q_PROPERTY(bool isLoopingEnabled READ isLoopingEnabled WRITE setLoopingEnabled) |
40 |
41 |
41 public: |
42 public: |
42 explicit HbTumbleView(QGraphicsItem *parent=0); |
43 explicit HbTumbleView(QGraphicsItem *parent=0); |
43 explicit HbTumbleView(const QStringList &list, QGraphicsItem *parent=0); |
44 explicit HbTumbleView(const QStringList &list, QGraphicsItem *parent=0); |
44 ~HbTumbleView(); |
45 ~HbTumbleView(); |
56 |
57 |
57 enum { Type = Hb::ItemType_TumbleView }; |
58 enum { Type = Hb::ItemType_TumbleView }; |
58 int type() const { return Type; } |
59 int type() const { return Type; } |
59 |
60 |
60 QGraphicsItem *primitive(HbStyle::Primitive) const; |
61 QGraphicsItem *primitive(HbStyle::Primitive) const; |
|
62 QGraphicsItem *primitive(const QString &itemName) const; |
61 |
63 |
62 public slots: |
64 public slots: |
63 |
|
64 void updatePrimitives(); |
65 void updatePrimitives(); |
65 |
66 |
66 signals: |
67 signals: |
67 void itemSelected(int index); |
68 void itemSelected(int index); |
|
69 |
68 protected slots: |
70 protected slots: |
69 void currentIndexChanged(const QModelIndex ¤t, const QModelIndex &previous); |
71 void currentIndexChanged(const QModelIndex ¤t, const QModelIndex &previous); |
70 void rowsAboutToBeRemoved(const QModelIndex &index, int start, int end); |
72 void rowsAboutToBeRemoved(const QModelIndex &index, int start, int end); |
71 void rowsRemoved(const QModelIndex &parent, int start, int end); |
73 void rowsRemoved(const QModelIndex &parent, int start, int end); |
72 void rowsAboutToBeInserted(const QModelIndex &index, int start, int end); |
74 void rowsAboutToBeInserted(const QModelIndex &index, int start, int end); |
73 void rowsInserted(const QModelIndex &parent, int start, int end); |
75 void rowsInserted(const QModelIndex &parent, int start, int end); |
|
76 |
74 protected: |
77 protected: |
75 HbTumbleView(HbTumbleViewPrivate &dd, QGraphicsItem *parent = 0); |
78 HbTumbleView(HbTumbleViewPrivate &dd, QGraphicsItem *parent = 0); |
76 void scrollTo(const QModelIndex &index, ScrollHint); |
79 void scrollTo(const QModelIndex &index, ScrollHint); |
77 void mousePressEvent(QGraphicsSceneMouseEvent *event); |
80 void mousePressEvent(QGraphicsSceneMouseEvent *event); |
78 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); |
81 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); |
84 private: |
87 private: |
85 Q_DECLARE_PRIVATE_D(d_ptr,HbTumbleView) |
88 Q_DECLARE_PRIVATE_D(d_ptr,HbTumbleView) |
86 Q_DISABLE_COPY(HbTumbleView) |
89 Q_DISABLE_COPY(HbTumbleView) |
87 Q_PRIVATE_SLOT(d_func(), void _q_scrollingStarted()) |
90 Q_PRIVATE_SLOT(d_func(), void _q_scrollingStarted()) |
88 Q_PRIVATE_SLOT(d_func(), void _q_scrollingEnded()) |
91 Q_PRIVATE_SLOT(d_func(), void _q_scrollingEnded()) |
|
92 Q_PRIVATE_SLOT(d_func(), void _q_delayedSelectCurrent()) |
89 }; |
93 }; |
90 |
94 |
91 #endif |
95 #endif |
92 |
96 |