1 /* |
|
2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementations of Info Listbox Item Base class methods. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // =========================================================================== |
|
21 // Includes |
|
22 #include <fbs.h> |
|
23 |
|
24 #include "camlogging.h" |
|
25 #include "caminfolistboxitembase.h" |
|
26 |
|
27 |
|
28 // =========================================================================== |
|
29 // Class methods |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // CCamCaptureSetupListItem destructor |
|
33 // |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 CCamInfoListboxItemBase::~CCamInfoListboxItemBase() |
|
37 { |
|
38 PRINT( _L("Camera => ~CCamInfoListboxItemBase") ); |
|
39 delete iListItemText; iListItemText = NULL; |
|
40 delete iBitmap; iBitmap = NULL; |
|
41 delete iBitmapMask; iBitmapMask = NULL; |
|
42 PRINT( _L("Camera <= ~CCamInfoListboxItemBase") ); |
|
43 } |
|
44 |
|
45 // =========================================================================== |
|
46 // from MCamInfoListboxItem |
|
47 |
|
48 // --------------------------------------------------------------------------- |
|
49 // CCamInfoListboxItemBase::ItemText |
|
50 // Return a pointer to the item text |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 TPtrC CCamInfoListboxItemBase::ItemText() const |
|
54 { |
|
55 return *iListItemText; |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // CCamInfoListboxItemBase::ItemValue |
|
60 // Return the id of the setting value represented by this item |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 TInt CCamInfoListboxItemBase::ItemValue() const |
|
64 { |
|
65 return iSettingItemValueId; |
|
66 } |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 // CCamInfoListboxItemBase::Bitmap |
|
70 // Return a pointer to the bitmap |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 CFbsBitmap* CCamInfoListboxItemBase::Bitmap() const |
|
74 { |
|
75 return iBitmap; |
|
76 } |
|
77 |
|
78 // --------------------------------------------------------------------------- |
|
79 // CCamInfoListboxItemBase::BitmapMask |
|
80 // Return a pointer to the bitmap mask |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 CFbsBitmap* CCamInfoListboxItemBase::BitmapMask() const |
|
84 { |
|
85 return iBitmapMask; |
|
86 } |
|
87 |
|
88 |
|
89 // =========================================================================== |
|
90 // new methods |
|
91 |
|
92 // --------------------------------------------------------------------------- |
|
93 // <<static>> |
|
94 // |
|
95 // --------------------------------------------------------------------------- |
|
96 // |
|
97 TBool |
|
98 CCamInfoListboxItemBase::EqualIds( const TInt* aSettingValueId, |
|
99 const CCamInfoListboxItemBase& aOther ) |
|
100 { |
|
101 PRINT1( _L("Camera => CCamInfoListboxItemBase::EqualIds, pointer:%d"), aSettingValueId ); |
|
102 TBool match( EFalse ); |
|
103 if( aSettingValueId ) |
|
104 { |
|
105 PRINT2( _L("Camera <> CCamInfoListboxItemBase: %d =?= %d"), *aSettingValueId, aOther.ItemValue() ); |
|
106 match = aOther.ItemValue() == *aSettingValueId; |
|
107 } |
|
108 PRINT1( _L("Camera <= CCamInfoListboxItemBase::EqualIds, return:%d"), match ); |
|
109 return match; |
|
110 } |
|
111 |
|
112 |
|
113 // =========================================================================== |
|
114 // end of file |
|