|
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: Base item behavior declearation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IPSSETUIITEMBASE_H |
|
20 #define IPSSETUIITEMBASE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "ipssetutilsconsts.h" |
|
25 #include "ipssetutilsflags.h" |
|
26 |
|
27 class CIpsSetUiItem; |
|
28 |
|
29 typedef CArrayPtrFlat<CIpsSetUiItem> CIpsSetUiBaseItemArray; |
|
30 |
|
31 |
|
32 /** |
|
33 * Base class for all setting items. |
|
34 * |
|
35 * @lib IpsSosSettings.lib |
|
36 * @since FS v1.0 |
|
37 */ |
|
38 class CIpsSetUiItem : public CBase |
|
39 { |
|
40 public: |
|
41 |
|
42 // Constructors and Destructor |
|
43 |
|
44 /** |
|
45 * Destructor |
|
46 */ |
|
47 virtual ~CIpsSetUiItem(); |
|
48 |
|
49 /** |
|
50 * @return New base item. |
|
51 */ |
|
52 static CIpsSetUiItem* NewL(); |
|
53 |
|
54 /** |
|
55 * @return New base item. |
|
56 */ |
|
57 static CIpsSetUiItem* NewLC(); |
|
58 |
|
59 // Operators |
|
60 |
|
61 /** |
|
62 * Copy operator |
|
63 * |
|
64 * @param aBaseItem Item, which values are copied. |
|
65 */ |
|
66 CIpsSetUiItem& operator=( |
|
67 const CIpsSetUiItem& aBaseItem ); |
|
68 |
|
69 // New virtual functions |
|
70 |
|
71 /** |
|
72 * @return Type of the item. |
|
73 */ |
|
74 virtual inline TIpsSetUiSettingsType Type() const; |
|
75 |
|
76 /** |
|
77 * @return Numeric user value. |
|
78 */ |
|
79 virtual inline TInt64 Value() const; |
|
80 |
|
81 /** |
|
82 * @param aValue Sets the numeric user value. |
|
83 */ |
|
84 virtual inline void SetValue( const TInt64 aValue ); |
|
85 |
|
86 /** |
|
87 * @return Read-only reference to textual user data. |
|
88 */ |
|
89 virtual inline const TDesC& Text() const; |
|
90 |
|
91 /** |
|
92 * @param aText Sets the textual user data. |
|
93 */ |
|
94 virtual inline void SetText( const TDesC& aText ); |
|
95 |
|
96 /** |
|
97 * @return ETrue, if the item has got container for setting items. |
|
98 */ |
|
99 virtual inline TBool HasLinkArray() const; |
|
100 |
|
101 protected: |
|
102 |
|
103 // Constructors |
|
104 |
|
105 /** |
|
106 * Constructor |
|
107 */ |
|
108 CIpsSetUiItem(); |
|
109 |
|
110 /** |
|
111 * 2nd-phase constructor |
|
112 */ |
|
113 void ConstructL(); |
|
114 |
|
115 public: |
|
116 |
|
117 // Data |
|
118 |
|
119 /** |
|
120 * Container for flags. |
|
121 */ |
|
122 TIpsSetUtilsFlags iItemFlags; |
|
123 |
|
124 /** |
|
125 * Type of the item. |
|
126 */ |
|
127 TIpsSetUiSettingsType iItemType; |
|
128 |
|
129 /** |
|
130 * Text to be shown in the item list. |
|
131 * Owned. |
|
132 */ |
|
133 TIpsSetUtilsTextPlain* iItemLabel; |
|
134 |
|
135 /** |
|
136 * Unique ID of the item. |
|
137 */ |
|
138 TUid iItemId; |
|
139 |
|
140 /** |
|
141 * Resource the item belongs to. |
|
142 */ |
|
143 TInt iItemResourceId; |
|
144 }; |
|
145 |
|
146 #include "ipssetuiitembase.inl" |
|
147 |
|
148 #endif //IPSSETUIITEMBASE_H |
|
149 |
|
150 // End of file |