uiacceltk/hitchcock/coretoolkit/src/HuiGridLayout.cpp
branchRCL_3
changeset 19 e5af45d51884
parent 18 1801340c26a2
child 20 31fccae4f8a7
equal deleted inserted replaced
18:1801340c26a2 19:e5af45d51884
   271     {
   271     {
   272     TAxis& axis = iGridLayoutData->iAxes[EHuiGridColumn];
   272     TAxis& axis = iGridLayoutData->iAxes[EHuiGridColumn];
   273     axis.iWeights.Reset();
   273     axis.iWeights.Reset();
   274     for(TInt i = 0; i < aWeights.Count(); ++i)
   274     for(TInt i = 0; i < aWeights.Count(); ++i)
   275         {
   275         {
   276         TInt weightValue(aWeights[i]);
   276         THuiMetric weight(TReal32(aWeights[i]), EHuiUnitWeight);
   277         THuiMetric weight(TReal32(weightValue), EHuiUnitWeight); 
       
   278         User::LeaveIfError(axis.iWeights.Append(weight));
   277         User::LeaveIfError(axis.iWeights.Append(weight));
   279         }
   278         }
   280     }
   279     }
   281     
   280     
   282 EXPORT_C void CHuiGridLayout::SetRowsL(const RArray<TInt>& aWeights)
   281 EXPORT_C void CHuiGridLayout::SetRowsL(const RArray<TInt>& aWeights)
   283     {
   282     {
   284     TAxis& axis = iGridLayoutData->iAxes[EHuiGridRow];
   283     TAxis& axis = iGridLayoutData->iAxes[EHuiGridRow];
   285     axis.iWeights.Reset();
   284     axis.iWeights.Reset();
   286     for(TInt i = 0; i < aWeights.Count(); ++i)
   285     for(TInt i = 0; i < aWeights.Count(); ++i)
   287         {
   286         {
   288         TInt weightValue(aWeights[i]);
   287         THuiMetric weight(TReal32(aWeights[i]), EHuiUnitWeight);
   289         THuiMetric weight(TReal32(weightValue), EHuiUnitWeight); 
       
   290         User::LeaveIfError(axis.iWeights.Append(weight));
   288         User::LeaveIfError(axis.iWeights.Append(weight));
   291         }
   289         }
   292     }
   290     }
   293 
   291 
   294 EXPORT_C void CHuiGridLayout::FillWeightsL(THuiGridDimension aDim, TInt aCount, const THuiMetric& aWeight)
   292 EXPORT_C void CHuiGridLayout::FillWeightsL(THuiGridDimension aDim, TInt aCount, const THuiMetric& aWeight)