|
1 /* |
|
2 * Copyright (c) 2007-2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDES |
|
20 #include <AknUtils.h> |
|
21 #include <AknsDrawUtils.h> |
|
22 #include <AknsFrameBackgroundControlContext.h> |
|
23 #include <bldvariant.hrh> |
|
24 #include <GSRFSPluginRsc.rsg> |
|
25 #include <aknlists.h> |
|
26 #include <StringLoader.h> |
|
27 #include <csxhelp/cp.hlp.hrh> |
|
28 #include <gsfwviewuids.h> |
|
29 #include <gslistbox.h> |
|
30 #include <settingsinternalcrkeys.h> |
|
31 #include "GSRFSPluginContainer.h" |
|
32 #include "GSRFSPluginTraces.h" |
|
33 #include "GSRFSPlugin.h" |
|
34 #include "gsrfsplugin.hrh" |
|
35 |
|
36 |
|
37 // --------------------------------------------------------- |
|
38 // CGSRFSPluginContainer::CGSRFSPluginContainer() |
|
39 // --------------------------------------------------------- |
|
40 CGSRFSPluginContainer::CGSRFSPluginContainer( CGSRFSPlugin* aGSRFSPlugin ) |
|
41 :iGSRFSPlugin( aGSRFSPlugin ) |
|
42 { |
|
43 TRACES("CGSRFSPluginContainer::CGSRFSPluginContainer()"); |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CGSRFSPluginContainer::ConstructL |
|
48 // |
|
49 // ----------------------------------------------------------------------------- |
|
50 void CGSRFSPluginContainer::ConstructL(const TRect& aRect) |
|
51 { |
|
52 TRACES("CGSRFSPluginContainer::ConstructL()"); |
|
53 |
|
54 iListBox = new( ELeave ) CAknSettingStyleListBox; |
|
55 BaseConstructL( aRect, R_RFS_FACTORY_SETTINGS_TITLE, R_RFS_FACTORY_SETTINGS_LBX ); |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CGSRFSPluginContainer::~CGSRFSPluginContainer |
|
60 // |
|
61 // ----------------------------------------------------------------------------- |
|
62 CGSRFSPluginContainer::~CGSRFSPluginContainer() |
|
63 { |
|
64 TRACES("CGSRFSPluginContainer::~CGSRFSPluginContainer()"); |
|
65 delete iListboxItemArray; |
|
66 TRACES("CGSRFSPluginContainer::~CGSRFSPluginContainer(): End"); |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CGSRFSPluginContainer::CurrentFeatureId() |
|
71 // |
|
72 // Return the feature id of selected listitem |
|
73 // --------------------------------------------------------------------------- |
|
74 TInt CGSRFSPluginContainer::CurrentFeatureId( ) const |
|
75 { |
|
76 return iListboxItemArray->CurrentFeature( ); |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // CGSRFSPluginContainer::ConstructListBoxL() |
|
81 // |
|
82 // Construct the listbox from resource array. |
|
83 // --------------------------------------------------------------------------- |
|
84 void CGSRFSPluginContainer::ConstructListBoxL( TInt aResLbxId ) |
|
85 { |
|
86 iListBox->ConstructL( this, EAknListBoxSelectionList ); |
|
87 |
|
88 iListboxItemArray = CGSListBoxItemTextArray::NewL( aResLbxId, *iListBox, *iCoeEnv ); |
|
89 |
|
90 iListBox->Model()->SetItemTextArray( iListboxItemArray ); |
|
91 iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
92 } |
|
93 |
|
94 // --------------------------------------------------------------------------- |
|
95 // CGSRFSPluginContainer::GetHelpContext() const |
|
96 // |
|
97 // Gets help context |
|
98 // --------------------------------------------------------------------------- |
|
99 void CGSRFSPluginContainer::GetHelpContext( TCoeHelpContext& aContext ) const |
|
100 { |
|
101 aContext.iMajor = KUidGS; |
|
102 aContext.iContext = KSET_HLP_GENERAL_ORIG_SET; |
|
103 } |
|
104 |
|
105 // End of File |
|
106 |