equal
deleted
inserted
replaced
33 #include <lbsposition.h> // for TCoordinate |
33 #include <lbsposition.h> // for TCoordinate |
34 #include <glxsettingsmodel.h> // For Cenrep Keys |
34 #include <glxsettingsmodel.h> // For Cenrep Keys |
35 |
35 |
36 const TInt KBytesInKB = 1024; |
36 const TInt KBytesInKB = 1024; |
37 const TInt KBytesInMB = 1024 * 1024; |
37 const TInt KBytesInMB = 1024 * 1024; |
|
38 const TInt KBytesInGB = 1024 * 1024 * 1024; |
38 _LIT( KBlankText, " " ); |
39 _LIT( KBlankText, " " ); |
39 |
40 |
40 |
41 |
41 // ----------------------------------------------------------------------------- |
42 // ----------------------------------------------------------------------------- |
42 // Constructor |
43 // Constructor |
214 // --------------------------------------------------------------------------- |
215 // --------------------------------------------------------------------------- |
215 // |
216 // |
216 void CGlxUStringConverter::GetFormattedItemSizeL(const CGlxMedia& aMedia, HBufC*& aString) const |
217 void CGlxUStringConverter::GetFormattedItemSizeL(const CGlxMedia& aMedia, HBufC*& aString) const |
217 { |
218 { |
218 TRACER("CGlxUStringConverter::GetFormattedItemSizeL"); |
219 TRACER("CGlxUStringConverter::GetFormattedItemSizeL"); |
219 TInt size(0); |
220 TUint size(0); |
220 if(aMedia.GetValueTObject( size, KMPXMediaGeneralSize )) |
221 if(aMedia.GetValueTObject( size, KMPXMediaGeneralSize )) |
221 { |
222 { |
222 if(size >= KBytesInMB) |
223 if(size >= KBytesInGB) |
|
224 { |
|
225 TInt gbSize = size / KBytesInGB ; // Size in GB |
|
226 aString = StringLoader::LoadL(R_QTN_SIZE_GB, gbSize); |
|
227 } |
|
228 else if(size >= KBytesInMB) |
223 { |
229 { |
224 TInt mbSize = size / KBytesInMB ; // Size in MB |
230 TInt mbSize = size / KBytesInMB ; // Size in MB |
225 aString = StringLoader::LoadL(R_QTN_SIZE_MB, mbSize); |
231 aString = StringLoader::LoadL(R_QTN_SIZE_MB, mbSize); |
226 } |
232 } |
227 else if(size >= KBytesInKB) |
233 else if(size >= KBytesInKB) |