1 /* |
|
2 * Copyright (c) 2005-2006 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: List box for the Location Setting View |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_LOCSYSUILBMODEL_H_ |
|
19 #define C_LOCSYSUILBMODEL_H_ |
|
20 |
|
21 // System Include |
|
22 #include <e32base.h> |
|
23 #include <bamdesca.h> // MDesCArray |
|
24 |
|
25 // Forward Declarations |
|
26 class CLocationSettings; |
|
27 |
|
28 // Class Declaration |
|
29 /** |
|
30 * Model for the Settings UI view container. Takes a Settings Description array |
|
31 * and creates a sorted array from it. |
|
32 * |
|
33 * @lib locsysuiview.lib |
|
34 * @since S60 v3.1 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CLocSysUiLBModel ): public CBase, |
|
37 public MDesCArray |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Two-phased constructor |
|
42 * @param aSettingsArray Reference to the Settings UI array. |
|
43 * @return CLocSysUiLBModel* Reference to the object created. |
|
44 */ |
|
45 static CLocSysUiLBModel* NewL( |
|
46 RPointerArray<CLocationSettings>& aSettingsArray ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CLocSysUiLBModel(); |
|
52 |
|
53 /** |
|
54 * Returns the Settings UI pertaining to a particular index value. |
|
55 * |
|
56 * @param aIndex Index of the Settings Ui. |
|
57 * @return CLocationSettings& Referrence to the Settings UI corresponding |
|
58 * to the index. |
|
59 */ |
|
60 CLocationSettings& SettingsUiL( TInt aIndex ); |
|
61 |
|
62 /** |
|
63 * Updates the List box contents |
|
64 * |
|
65 * @param aSettingsArray Reference to the Settings UI array. |
|
66 */ |
|
67 void UpdateListBoxContentsL( RPointerArray<CLocationSettings>& aSettingsArray ); |
|
68 |
|
69 protected: |
|
70 /** |
|
71 * Inherited from MDesCArray |
|
72 */ |
|
73 TInt MdcaCount() const; |
|
74 |
|
75 /** |
|
76 * Inherited from MDesCArray |
|
77 */ |
|
78 TPtrC16 MdcaPoint( TInt aIndex ) const; |
|
79 |
|
80 private: |
|
81 /** |
|
82 * C++ constructor. |
|
83 */ |
|
84 CLocSysUiLBModel( RPointerArray<CLocationSettings>& aSettingsArray ); |
|
85 |
|
86 /** |
|
87 * Second Phase constructor |
|
88 */ |
|
89 void ConstructL(); |
|
90 |
|
91 private: |
|
92 /** |
|
93 * Reference to the array of Settings UI. |
|
94 */ |
|
95 RPointerArray<CLocationSettings>& iSettingsArray; |
|
96 |
|
97 /** |
|
98 * Format conversion buffer |
|
99 * Owns |
|
100 */ |
|
101 HBufC* iBuffer; |
|
102 }; |
|
103 |
|
104 #endif // C_LOCSYSUILBMODEL_H_ |
|
105 |
|