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: Class for enumValue for attributes.. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ALFENUMVALUE_H |
|
20 #define ALFENUMVALUE_H |
|
21 |
|
22 //INCLUDES |
|
23 #include <osn/osndefines.h> |
|
24 #include <memory> |
|
25 #include "alf/alfattributevaluetype.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 using std::auto_ptr; |
|
30 |
|
31 namespace Alf |
|
32 { |
|
33 |
|
34 /** |
|
35 * A class for enum value type. |
|
36 * |
|
37 * @lib alfwidgetmodel.lib |
|
38 * @since S60 ?S60_version |
|
39 */ |
|
40 class AlfEnumValue : public AlfAttributeValueType |
|
41 { |
|
42 |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Constructor. |
|
47 * |
|
48 * @since S60 ?S60_version |
|
49 * @return New object. |
|
50 */ |
|
51 AlfEnumValue(int aValue, TAlfUnit aUnit = EAlfUnitPixel); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~AlfEnumValue(); |
|
57 |
|
58 /** |
|
59 * Gets the enum value. |
|
60 * |
|
61 * @since S60 ?S60_version |
|
62 * @return The enum value. |
|
63 */ |
|
64 int virtual enumValue() const; |
|
65 |
|
66 /** |
|
67 * Gets the type of the atrribute value. |
|
68 * |
|
69 * @since S60 ?S60_version |
|
70 * @return The type of the value. |
|
71 */ |
|
72 virtual Type type() const; |
|
73 |
|
74 /** |
|
75 * Gets the unit. |
|
76 * |
|
77 * @since S60 ?S60_version |
|
78 * @return The unit. |
|
79 */ |
|
80 virtual TAlfUnit unit() const; |
|
81 |
|
82 private: // data |
|
83 |
|
84 int mEnum; |
|
85 TAlfUnit mUnit; |
|
86 |
|
87 }; |
|
88 |
|
89 } // namespace Alf |
|
90 |
|
91 #endif // ALFENUMVALUE_H |
|