|
1 /* |
|
2 * Copyright (c) 2005-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: Wrapper for selectable fields in add item dialog. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TPBK2ADDITEMWRAPPER_H |
|
20 #define TPBK2ADDITEMWRAPPER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> // CBase |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MPbk2FieldProperty; |
|
27 class CPbk2FieldPropertyGroup; |
|
28 class TPbk2IconId; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Wrapper for selectable fields in add item dialog. |
|
34 */ |
|
35 class TPbk2AddItemWrapper |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Constructor for creating a wrapper for CPbk2FieldProperty. |
|
41 * @param aFieldProperty Field property |
|
42 */ |
|
43 IMPORT_C TPbk2AddItemWrapper( |
|
44 const MPbk2FieldProperty& aFieldProperty ); |
|
45 |
|
46 /** |
|
47 * Constructor for creating a wrapper for CPbk2FieldPropertyGroup. |
|
48 * @param aPropertyGroup Property group |
|
49 */ |
|
50 IMPORT_C TPbk2AddItemWrapper( |
|
51 const CPbk2FieldPropertyGroup& aPropertyGroup ); |
|
52 |
|
53 public: // Interface |
|
54 |
|
55 /** |
|
56 * Returns the number of properties in this wrapper. |
|
57 * |
|
58 * @return Number of properties in this wrapper. |
|
59 */ |
|
60 IMPORT_C TInt PropertyCount() const; |
|
61 |
|
62 /** |
|
63 * Returns the field property at gíven index. |
|
64 * |
|
65 * @param aIndex The index of the field property. |
|
66 * @return Field property at gíven index. |
|
67 */ |
|
68 IMPORT_C const MPbk2FieldProperty& PropertyAt( |
|
69 TInt aIndex ) const; |
|
70 |
|
71 /** |
|
72 * Returns the label of the instance. |
|
73 * |
|
74 * @return Label. |
|
75 */ |
|
76 const TDesC& Label() const; |
|
77 |
|
78 /** |
|
79 * Returns the icon id of the instance. |
|
80 * |
|
81 * @return Icon id. |
|
82 */ |
|
83 const TPbk2IconId& IconId() const; |
|
84 |
|
85 /** |
|
86 * Returns the add item ordering value of the instance. |
|
87 * |
|
88 * @return Add item ordering value. |
|
89 */ |
|
90 TInt AddItemOrdering() const; |
|
91 /** |
|
92 * Returns group. |
|
93 * |
|
94 * @return Group if exist. |
|
95 */ |
|
96 const CPbk2FieldPropertyGroup* Group() const; |
|
97 |
|
98 private: // Data |
|
99 /// Ref: Single field property |
|
100 const MPbk2FieldProperty* iFieldProperty; |
|
101 /// Ref: Group of properties |
|
102 const CPbk2FieldPropertyGroup* iPropertyGroup; |
|
103 }; |
|
104 |
|
105 #endif // TPBK2ADDITEMWRAPPER_H |
|
106 |
|
107 // End of File |