1 /* |
|
2 * Copyright (c) 2002 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: LandmarksUi Content File - Landmark editor field abstract class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 #ifndef __MLMKEDITORFIELD_H__ |
|
25 #define __MLMKEDITORFIELD_H__ |
|
26 |
|
27 // INCLUDES |
|
28 #include <e32def.h> |
|
29 #include <e32base.h> |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class MLmkFieldData; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Landmark editor field abstract class. |
|
38 */ |
|
39 class MLmkEditorField |
|
40 { |
|
41 public: // destructor |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~MLmkEditorField(){} |
|
46 |
|
47 public: // Interface |
|
48 /** |
|
49 * Return the dialog control id associated to this field. |
|
50 */ |
|
51 virtual TInt ControlId() const = 0; |
|
52 |
|
53 /** |
|
54 * Returns the id of this field. |
|
55 */ |
|
56 virtual TInt FieldId() const = 0; |
|
57 |
|
58 /** |
|
59 * Save editor control data to contact item field. |
|
60 * @return ETrue if success, EFalse otherwise |
|
61 */ |
|
62 virtual TBool SaveFieldL() = 0; |
|
63 |
|
64 /** |
|
65 * Returns the landmark item fields label. |
|
66 */ |
|
67 virtual TPtrC FieldLabel() const = 0; |
|
68 |
|
69 /** |
|
70 * Sets aLabel as the landmark item fields label |
|
71 * Takes ownership of the aLabel. |
|
72 */ |
|
73 virtual void SetFieldLabelL(HBufC* aLabel) = 0; |
|
74 |
|
75 /** |
|
76 * Returns the landmark item field. |
|
77 */ |
|
78 virtual MLmkFieldData& LandmarkItemField() const = 0; |
|
79 |
|
80 /** |
|
81 * Returns the text in the fields control. |
|
82 */ |
|
83 virtual HBufC* ControlTextL() const = 0; |
|
84 // code added -start- |
|
85 virtual TReal FieldValue() const = 0; |
|
86 //-end- |
|
87 /** |
|
88 * Activates the control. |
|
89 */ |
|
90 virtual void ActivateL() = 0; |
|
91 |
|
92 /** |
|
93 * Update field data. Default implementation is empty |
|
94 */ |
|
95 virtual void UpdateL(){} |
|
96 /** |
|
97 * Resets the field |
|
98 */ |
|
99 virtual void ResetL()=0; |
|
100 /** |
|
101 * if the control is added when form is created, its state is set |
|
102 * by the form, but, when the control is added dynamically |
|
103 * its state must be set at the time of creation,hence this |
|
104 * function is used to set the state. |
|
105 */ |
|
106 virtual void SetEditableL( TBool /*aEditable*/ ){} |
|
107 }; |
|
108 |
|
109 #endif // __MLMKEDITORFIELD_H__ |
|
110 |
|
111 // End of File |
|