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 - |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 // INCLUDE FILES |
|
26 #include "CLmkMultiSelectionLBModel.h" |
|
27 #include "CLmkListProviderBase.h" |
|
28 #include "CLmkSelectorCache.h" |
|
29 #include "CLmkUiItemBase.h" |
|
30 #include <EPos_Landmarks.h> |
|
31 #include <e32keys.h> |
|
32 // CONSTANTS |
|
33 /// Unnamed namespace for local definitions |
|
34 namespace { |
|
35 const TInt KCheckboxOffIcon = 1; |
|
36 } // namespace |
|
37 // ============================ MEMBER FUNCTIONS =============================== |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // CLmkMultiSelectionLBModel::CLmkMultiSelectionLBModel |
|
41 // C++ default constructor can NOT contain any code, that |
|
42 // might leave. |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 CLmkMultiSelectionLBModel::CLmkMultiSelectionLBModel() |
|
46 { |
|
47 |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CLmkMultiSelectionLBModel::ConstructL |
|
52 // Symbian 2nd phase constructor can leave. |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 void CLmkMultiSelectionLBModel::ConstructL( |
|
56 CLmkListProviderBase& aListProvider ) |
|
57 { |
|
58 BaseConstructL( aListProvider ); |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CLmkMultiSelectionLBModel::NewL |
|
63 // Two-phased constructor. |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 CLmkMultiSelectionLBModel* CLmkMultiSelectionLBModel::NewL( |
|
67 CLmkListProviderBase& aListProvider ) |
|
68 { |
|
69 CLmkMultiSelectionLBModel* self = new( ELeave ) CLmkMultiSelectionLBModel; |
|
70 |
|
71 CleanupStack::PushL( self ); |
|
72 self->ConstructL( aListProvider ); |
|
73 CleanupStack::Pop(); |
|
74 |
|
75 return self; |
|
76 } |
|
77 |
|
78 // ---------------------------------------------------- |
|
79 // CLmkMultiSelectionLBModel::~CLmkMultiSelectionLBModel |
|
80 // ---------------------------------------------------- |
|
81 // |
|
82 CLmkMultiSelectionLBModel::~CLmkMultiSelectionLBModel() |
|
83 { |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // CLmkMultiSelectionLBModel::MdcaPointL |
|
88 // ?implementation_description |
|
89 // (other items were commented in a header). |
|
90 // ----------------------------------------------------------------------------- |
|
91 // |
|
92 void CLmkMultiSelectionLBModel::MdcaPointL( TInt aIndex ) const |
|
93 { |
|
94 CLmkUiItemBase& item = iCache->ItemAtL( aIndex ); |
|
95 TPtr16 modBuffer = iBuffer->Des(); |
|
96 modBuffer.Zero(); |
|
97 modBuffer.AppendNum( KCheckboxOffIcon ); |
|
98 modBuffer.Append( EKeyTab ); |
|
99 modBuffer.Append( item.Text() ); |
|
100 } |
|
101 |
|
102 // End of File |
|