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: Declaration of Info Listbox Item Base class. |
|
15 * Adds support for comparison operator. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CAM_INFOLISTBOXITEMBASE_H |
|
21 #define CAM_INFOLISTBOXITEMBASE_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "mcaminfolistboxitem.h" |
|
25 |
|
26 // =========================================================================== |
|
27 // Forward declarations |
|
28 class CFbsBitmap; |
|
29 |
|
30 |
|
31 // =========================================================================== |
|
32 // Class declarations |
|
33 class CCamInfoListboxItemBase : public CBase, |
|
34 public MCamInfoListboxItem |
|
35 { |
|
36 // ======================================================= |
|
37 public: |
|
38 virtual ~CCamInfoListboxItemBase(); |
|
39 |
|
40 // ------------------------------------------------------- |
|
41 // from MCamInfoListboxItem |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Returns a pointer to the item text |
|
46 * @since 2.8 |
|
47 * @return Pointer to the item text |
|
48 */ |
|
49 virtual TPtrC ItemText() const; |
|
50 |
|
51 /** |
|
52 * Returns the item's value id |
|
53 * @since 2.8 |
|
54 * @return Value id |
|
55 */ |
|
56 virtual TInt ItemValue() const; |
|
57 |
|
58 /** |
|
59 * Returns a pointer to the item's bitmap |
|
60 * @since 2.8 |
|
61 * @return Pointer to the bitmap |
|
62 */ |
|
63 virtual CFbsBitmap* Bitmap() const; |
|
64 |
|
65 /** |
|
66 * Returns a pointer to the item's bitmap mask |
|
67 * @since 2.8 |
|
68 * @return Pointer to the bitmap mask |
|
69 */ |
|
70 virtual CFbsBitmap* BitmapMask() const; |
|
71 |
|
72 // ------------------------------------------------------- |
|
73 public: |
|
74 |
|
75 /** |
|
76 * Comparison operator that can be given as parameter to RPointerArray::Find. |
|
77 * @param aFirstItemId Pointer to setting value id of first item |
|
78 * @param aOtherItem Reference to the second item |
|
79 * @return Boolean value describing if the items are equal by ids. |
|
80 * |
|
81 */ |
|
82 static TBool EqualIds( const TInt* aFirstItemId, |
|
83 const CCamInfoListboxItemBase& aOtherItem ); |
|
84 |
|
85 // ======================================================= |
|
86 // Data |
|
87 protected: |
|
88 |
|
89 // The text to be displayed in the list controls |
|
90 HBufC* iListItemText; |
|
91 // The id of the setting value represented by this item |
|
92 TInt iSettingItemValueId; |
|
93 // The id of the bitmap |
|
94 TInt iBitmapId; |
|
95 // The bitmap |
|
96 CFbsBitmap* iBitmap; |
|
97 // The bitmap mask |
|
98 CFbsBitmap* iBitmapMask; |
|
99 |
|
100 // ======================================================= |
|
101 }; |
|
102 |
|
103 #endif // CAM_INFOLISTBOXITEMBASE_H |
|
104 |
|
105 // =========================================================================== |
|
106 // end of file |
|