equal
deleted
inserted
replaced
150 int HbIndicatorMenuContent::indicatorCount() const |
150 int HbIndicatorMenuContent::indicatorCount() const |
151 { |
151 { |
152 return indicatorModel.rowCount(); |
152 return indicatorModel.rowCount(); |
153 } |
153 } |
154 |
154 |
|
155 void HbIndicatorMenuContent::handleAboutToShow() |
|
156 { |
|
157 for (int i = 0; i < mIndicatorList->model()->rowCount(); ++i) { |
|
158 HbIndicatorInterface *indicator = |
|
159 indicatorFromIndex(indicatorModel.item(i)->index()); |
|
160 if (indicator) { |
|
161 if (indicator->refreshData()) { |
|
162 setData(indicator, indicatorModel.item(i)->index()); |
|
163 } |
|
164 } |
|
165 } |
|
166 } |
|
167 |
155 void HbIndicatorMenuContent::updatePrimitives() |
168 void HbIndicatorMenuContent::updatePrimitives() |
156 { |
169 { |
157 repolish(); |
170 repolish(); |
158 } |
171 } |
159 |
172 |
231 void HbIndicatorMenuContent::indicatorRemoved(HbIndicatorInterface *indicatorRemoved) |
244 void HbIndicatorMenuContent::indicatorRemoved(HbIndicatorInterface *indicatorRemoved) |
232 { |
245 { |
233 int index = listIndexFromIndicator(indicatorRemoved); |
246 int index = listIndexFromIndicator(indicatorRemoved); |
234 if (index >= 0) { |
247 if (index >= 0) { |
235 indicatorModel.removeRow(index); |
248 indicatorModel.removeRow(index); |
236 } |
249 //update indices. |
237 //update indices. |
250 for(int i = indicatorRemoved->category()+1; i < IndicatorTypes;++i){ |
238 for(int i = indicatorRemoved->category()+1; i < IndicatorTypes;++i){ |
251 mGroupTypeIndeces[i]--; |
239 mGroupTypeIndeces[i]--; |
252 } |
240 } |
253 repolish(); |
241 repolish(); |
254 } |
242 } |
255 } |
243 |
256 |
244 //data changed inside indicator. |
257 //data changed inside indicator. |
245 void HbIndicatorMenuContent::indicatorUpdated() |
258 void HbIndicatorMenuContent::indicatorUpdated() |
246 { |
259 { |