248 // Construct layout from layout definition |
248 // Construct layout from layout definition |
249 retVal = mActions->createAnchorLayout(QString(), false); |
249 retVal = mActions->createAnchorLayout(QString(), false); |
250 for (int i = 0; retVal && i < layoutDef->anchorItems.count(); i++){ |
250 for (int i = 0; retVal && i < layoutDef->anchorItems.count(); i++){ |
251 const HbWidgetLoader::AnchorItem &item = layoutDef->anchorItems.at(i); |
251 const HbWidgetLoader::AnchorItem &item = layoutDef->anchorItems.at(i); |
252 HbXmlLengthValue minLength, prefLength, maxLength; |
252 HbXmlLengthValue minLength, prefLength, maxLength; |
253 minLength.mType = item.minType; |
253 |
254 minLength.mValue = item.minVal; |
254 |
255 minLength.mHashValue = item.minHashValue; |
255 for (int i=0; i<item.minVal.count(); i++) { |
256 minLength.mString = item.minText; |
256 minLength.mValues.append(item.minVal.at(i)); |
257 prefLength.mType = item.prefType; |
257 } |
258 prefLength.mValue = item.prefVal; |
258 for (int j=0; j<item.prefVal.count(); j++) { |
259 prefLength.mHashValue = item.prefHashValue; |
259 prefLength.mValues.append(item.prefVal.at(j)); |
260 prefLength.mString = item.prefText; |
260 } |
261 maxLength.mType = item.maxType; |
261 for (int k=0; k<item.maxVal.count(); k++) { |
262 maxLength.mValue = item.maxVal; |
262 maxLength.mValues.append(item.maxVal.at(k)); |
263 maxLength.mHashValue = item.maxHashValue; |
263 } |
264 maxLength.mString = item.maxText; |
264 |
265 QSizePolicy::Policy sizepolicy; |
265 QSizePolicy::Policy sizepolicy; |
266 QSizePolicy::Policy *sizepolicy_p = 0; |
266 QSizePolicy::Policy *sizepolicy_p = 0; |
267 if ( item.sizepolicy != -1 ) { |
267 if ( item.sizepolicy != -1 ) { |
268 sizepolicy = (QSizePolicy::Policy)item.sizepolicy; |
268 sizepolicy = (QSizePolicy::Policy)item.sizepolicy; |
269 sizepolicy_p = &sizepolicy; |
269 sizepolicy_p = &sizepolicy; |