64 QAbstractItemModel* model() const; |
64 QAbstractItemModel* model() const; |
65 QItemSelectionModel* selectionModel() const; |
65 QItemSelectionModel* selectionModel() const; |
66 QModelIndexList selectedModelIndexes() const; |
66 QModelIndexList selectedModelIndexes() const; |
67 void clearItems(bool keepItems); |
67 void clearItems(bool keepItems); |
68 void showActions(HbAbstractItemView::SelectionMode selectionMode); |
68 void showActions(HbAbstractItemView::SelectionMode selectionMode); |
|
69 QString selectionTitle() const; |
|
70 void setSelectionTitle(const QString& title); |
69 public: |
71 public: |
70 bool bOwnItems; |
72 bool bOwnItems; |
71 HbAbstractItemView::SelectionMode mSelectionMode; |
73 HbAbstractItemView::SelectionMode mSelectionMode; |
72 void close(); |
74 void close(); |
|
75 void _p_SelectionChanged(); |
73 private: |
76 private: |
74 HbAction *action1; |
77 HbAction *action1; |
75 HbAction *action2; |
78 HbAction *action2; |
76 }; |
79 }; |
77 |
80 |
78 class HbSelectionDialogMarkWidget : public HbWidget |
81 class HbSelectionDialogMarkWidget : public HbWidget |
79 { |
82 { |
80 Q_OBJECT |
83 Q_OBJECT |
81 public: |
84 public: |
82 QGraphicsItem *mBackgroundItem; |
85 QGraphicsObject *mBackgroundItem; |
83 HbCheckBox* chkMark; |
86 HbCheckBox* chkMark; |
84 HbTextItem* lbCounter; |
87 QGraphicsObject* mLbCounter; |
85 HbSelectionDialogMarkWidget(QGraphicsItem *parent = 0); |
88 HbSelectionDialogMarkWidget(QGraphicsItem *parent = 0); |
86 ~HbSelectionDialogMarkWidget(); |
89 ~HbSelectionDialogMarkWidget(); |
87 void createPrimitives(); |
90 void createPrimitives(); |
88 void updatePrimitives(); |
91 void updatePrimitives(); |
|
92 void recreatePrimitives(); |
|
93 void initPrimitiveData(HbStylePrimitiveData *primitiveData, const QGraphicsObject *primitive); |
89 QVariant itemChange( GraphicsItemChange change, const QVariant &value ); |
94 QVariant itemChange( GraphicsItemChange change, const QVariant &value ); |
90 QGraphicsItem* primitive(HbStyle::Primitive primitive) const; |
95 QGraphicsItem* primitive(HbStyle::Primitive primitive) const; |
|
96 void updateCounter(const QString& text); |
|
97 QString mCounterText; |
91 }; |
98 }; |
92 |
99 |
93 class HB_AUTOTEST_EXPORT HbSelectionDialogContentWidget :public HbWidget |
100 class HB_AUTOTEST_EXPORT HbSelectionDialogContentWidget :public HbWidget |
94 { |
101 { |
95 Q_OBJECT |
102 Q_OBJECT |
110 bool multiSelection(){return bMultiSelection;}; |
117 bool multiSelection(){return bMultiSelection;}; |
111 void setMultiSelection(bool bValue){bMultiSelection = bValue;}; |
118 void setMultiSelection(bool bValue){bMultiSelection = bValue;}; |
112 bool bMultiSelection; |
119 bool bMultiSelection; |
113 void updateCounter(); |
120 void updateCounter(); |
114 void setModel(QAbstractItemModel* model); |
121 void setModel(QAbstractItemModel* model); |
|
122 QString selectionTitle() const; |
|
123 void setSelectionTitle(const QString& title); |
115 private: |
124 private: |
116 HbSelectionDialogMarkWidget* markWidget; |
125 HbSelectionDialogMarkWidget* markWidget; |
|
126 QString mSelectionTitle; |
117 private slots: |
127 private slots: |
118 void _q_listWidgetItemSelected(HbListWidgetItem *item); |
128 void _q_listWidgetItemSelected(HbListWidgetItem *item); |
119 void _q_listItemSelected(QModelIndex index); |
129 void _q_listItemSelected(QModelIndex index); |
120 void _q_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); |
130 void _q_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); |
121 void _q_checkboxclicked(int value); |
131 void _q_checkboxclicked(int value); |