96 |
96 |
97 \sa selectionMode() |
97 \sa selectionMode() |
98 */ |
98 */ |
99 void HbSelectionDialog::setSelectionMode(HbAbstractItemView::SelectionMode mode) |
99 void HbSelectionDialog::setSelectionMode(HbAbstractItemView::SelectionMode mode) |
100 { |
100 { |
101 Q_D(HbSelectionDialog); |
101 Q_D(HbSelectionDialog); |
102 |
102 |
103 d->setSelectionMode(mode); |
103 d->setSelectionMode(mode); |
104 } |
104 } |
105 |
105 |
106 /*! |
106 /*! |
107 @beta |
107 @beta |
108 Returns current SelectionMode of the list.Default value is \a NoSelection. |
108 Returns current SelectionMode of the list.Default value is \a NoSelection. |
109 |
109 |
110 \sa setSelectionMode() |
110 \sa setSelectionMode() |
111 */ |
111 */ |
112 HbAbstractItemView::SelectionMode HbSelectionDialog::selectionMode() const |
112 HbAbstractItemView::SelectionMode HbSelectionDialog::selectionMode() const |
113 { |
113 { |
114 Q_D(const HbSelectionDialog); |
114 Q_D(const HbSelectionDialog); |
115 return d->mSelectionMode; |
115 return d->mSelectionMode; |
116 } |
116 } |
117 |
117 |
118 /*! |
118 /*! |
119 @beta |
119 @beta |
120 Sets the string list items to be displayed. |
120 Sets the string list items to be displayed. |
121 |
121 |
122 \param items. A items is the list of strings |
122 \param items. A items is the list of strings |
123 \param currentIndex. A currentIndex is the index of default selection |
123 \param currentIndex. A currentIndex is the index of default selection |
124 |
124 |
125 \sa stringItems() |
125 \sa stringItems() |
126 */ |
126 */ |
127 void HbSelectionDialog::setStringItems(const QStringList &items,int currentIndex) |
127 void HbSelectionDialog::setStringItems(const QStringList &items,int currentIndex) |
128 { |
128 { |
129 Q_D(HbSelectionDialog); |
129 Q_D(HbSelectionDialog); |
130 d->setStringItems(items,currentIndex); |
130 d->setStringItems(items,currentIndex); |
131 } |
131 } |
132 |
132 |
133 /*! |
133 /*! |
134 @beta |
134 @beta |
135 Returns list of string list items earlier set by setStringItems(). |
135 Returns list of string list items earlier set by setStringItems(). |
136 |
136 |
137 \sa setStringItems() |
137 \sa setStringItems() |
138 */ |
138 */ |
139 QStringList HbSelectionDialog::stringItems() const |
139 QStringList HbSelectionDialog::stringItems() const |
140 { |
140 { |
141 Q_D(const HbSelectionDialog); |
141 Q_D(const HbSelectionDialog); |
142 return d->stringItems(); |
142 return d->stringItems(); |
143 } |
143 } |
144 |
144 |
145 /*! |
145 /*! |
146 @beta |
146 @beta |
147 Returns list of selected indexes. List contains only one item if |
147 Returns list of selected indexes. List contains only one item if |
151 \sa setSelectionMode(), |
151 \sa setSelectionMode(), |
152 \sa selectionMode() |
152 \sa selectionMode() |
153 */ |
153 */ |
154 QList<QVariant> HbSelectionDialog::selectedItems() const |
154 QList<QVariant> HbSelectionDialog::selectedItems() const |
155 { |
155 { |
156 Q_D(const HbSelectionDialog); |
156 Q_D(const HbSelectionDialog); |
157 return d->selectedItems(); |
157 return d->selectedItems(); |
158 } |
158 } |
159 |
159 |
160 /*! |
160 /*! |
161 @beta |
161 @beta |
162 set the item selected. |
162 set the item selected. |
182 \sa setSelectionMode(), |
182 \sa setSelectionMode(), |
183 \sa selectionMode() |
183 \sa selectionMode() |
184 */ |
184 */ |
185 QModelIndexList HbSelectionDialog::selectedModelIndexes() const |
185 QModelIndexList HbSelectionDialog::selectedModelIndexes() const |
186 { |
186 { |
187 Q_D(const HbSelectionDialog); |
187 Q_D(const HbSelectionDialog); |
188 return d->selectedModelIndexes(); |
188 return d->selectedModelIndexes(); |
189 } |
189 } |
190 |
190 |
191 /*! |
191 /*! |
192 @beta |
192 @beta |
193 Sets the list of custom list items to be displayed.\a items is the |
193 Sets the list of custom list items to be displayed.\a items is the |
199 \param items. items is the list of custom items |
199 \param items. items is the list of custom items |
200 \param transferOwnership. true or false |
200 \param transferOwnership. true or false |
201 \param currentIndex |
201 \param currentIndex |
202 |
202 |
203 \sa widgetItems(); |
203 \sa widgetItems(); |
204 */ |
204 */ |
205 void HbSelectionDialog::setWidgetItems(const QList<HbListWidgetItem*> &items,bool transferOwnership,int currentIndex) |
205 void HbSelectionDialog::setWidgetItems(const QList<HbListWidgetItem*> &items,bool transferOwnership,int currentIndex) |
206 { |
206 { |
207 Q_D(HbSelectionDialog); |
207 Q_D(HbSelectionDialog); |
208 d->setWidgetItems(items,transferOwnership,currentIndex); |
208 d->setWidgetItems(items,transferOwnership,currentIndex); |
209 } |
209 } |
210 |
210 |
211 /*! |
211 /*! |
212 @beta |
212 @beta |
213 Returns list of custom list items earlier set by setWidgetItems(). |
213 Returns list of custom list items earlier set by setWidgetItems(). |
214 |
214 |
215 \sa setWidgetItems(). |
215 \sa setWidgetItems(). |
216 */ |
216 */ |
217 QList<HbListWidgetItem*> HbSelectionDialog::widgetItems() const |
217 QList<HbListWidgetItem*> HbSelectionDialog::widgetItems() const |
218 { |
218 { |
219 Q_D(const HbSelectionDialog); |
219 Q_D(const HbSelectionDialog); |
220 return d->widgetItems(); |
220 return d->widgetItems(); |
221 } |
221 } |
222 |
222 |
223 /*! |
223 /*! |
224 @beta |
224 @beta |
225 Sets the Model containing data for the list items. |
225 Sets the Model containing data for the list items. |
226 |
226 |
227 \param model. |
227 \param model. |
228 |
228 |
229 \sa model() |
229 \sa model() |
230 */ |
230 */ |
231 void HbSelectionDialog::setModel(QAbstractItemModel* model) |
231 void HbSelectionDialog::setModel(QAbstractItemModel* model) |
232 { |
232 { |
233 Q_D(HbSelectionDialog); |
233 Q_D(HbSelectionDialog); |
234 d->setModel(model); |
234 d->setModel(model); |
235 } |
235 } |
236 |
236 |
237 /*! |
237 /*! |
238 @beta |
238 @beta |
239 Returns model eariler set by setModel(). |
239 Returns model eariler set by setModel(). |
240 |
240 |
241 \sa setModel() |
241 \sa setModel() |
242 */ |
242 */ |
243 QAbstractItemModel* HbSelectionDialog::model() const |
243 QAbstractItemModel* HbSelectionDialog::model() const |
244 { |
244 { |
245 Q_D(const HbSelectionDialog); |
245 Q_D(const HbSelectionDialog); |
246 return d->model(); |
246 return d->model(); |
247 } |
247 } |
248 |
248 |
249 |
249 |
250 #include "moc_hbselectiondialog.cpp" |
250 #include "moc_hbselectiondialog.cpp" |