|
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 the License "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: Video on Demand schedule settings item class.* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDES |
|
21 #include <StringLoader.h> |
|
22 |
|
23 #include <vcxnsscheduleview.rsg> |
|
24 #include "vcxnsscheduleview.hrh" |
|
25 |
|
26 #include "CVcxNsScheduleSettingsSettingItem.h" |
|
27 #include "CVcxNsScheduleSettingsList.h" |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // CVcxNsScheduleSettingsSettingItem::CVcxNsScheduleSettingsSettingItem |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CVcxNsScheduleSettingsSettingItem::CVcxNsScheduleSettingsSettingItem( |
|
34 CVcxNsScheduleSettingsViewContainer* aParent ) |
|
35 : iParent( aParent ) |
|
36 { |
|
37 |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // Destructor |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 CVcxNsScheduleSettingsSettingItem::~CVcxNsScheduleSettingsSettingItem() |
|
45 { |
|
46 delete iListbox; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CVcxNsScheduleSettingsSettingItem::NewL |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 CVcxNsScheduleSettingsSettingItem* CVcxNsScheduleSettingsSettingItem::NewL( |
|
54 CVcxNsScheduleSettingsViewContainer* aParent, |
|
55 CVcxNsServiceSettings& aScheduleSettings ) |
|
56 { |
|
57 CVcxNsScheduleSettingsSettingItem* self = |
|
58 new (ELeave) CVcxNsScheduleSettingsSettingItem( aParent ); |
|
59 CleanupStack::PushL( self ); |
|
60 self->ConstructL( aScheduleSettings ); |
|
61 CleanupStack::Pop( self ); |
|
62 return self; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CVcxNsScheduleSettingsSettingItem::ConstructL |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 void CVcxNsScheduleSettingsSettingItem::ConstructL( |
|
70 CVcxNsServiceSettings& aScheduleSettings ) |
|
71 { |
|
72 iListbox = new (ELeave) CVcxNsScheduleSettingsList( aScheduleSettings ); |
|
73 iListbox->SetContainerWindowL( *iParent ); |
|
74 iListbox->SetMopParent( iParent ); |
|
75 iListbox->ConstructFromResourceL( |
|
76 R_VCXNS_SCHEDULE_SCHEDULESETTINGSVIEW_SETTING_ITEM_LIST ); |
|
77 iListbox->SetRect( iParent->Rect() ); |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CVcxNsScheduleSettingsSettingItem::ActivateL |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 void CVcxNsScheduleSettingsSettingItem::ActivateL() |
|
85 { |
|
86 iListbox->MakeVisible( ETrue ); |
|
87 iListbox->DrawNow(); |
|
88 } |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CVcxNsScheduleSettingsSettingItem::Deactivate |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 void CVcxNsScheduleSettingsSettingItem::Deactivate() |
|
95 { |
|
96 iListbox->MakeVisible( EFalse ); |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // CVcxNsScheduleSettingsSettingItem::ChangeSelectedItemL |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 void CVcxNsScheduleSettingsSettingItem::ChangeSelectedItemL() |
|
104 { |
|
105 iListbox->ChangeSelectedItemL(); |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // CVcxNsScheduleSettingsSettingItem::Listbox |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 CVcxNsScheduleSettingsList* CVcxNsScheduleSettingsSettingItem::Listbox() |
|
113 { |
|
114 return iListbox; |
|
115 } |
|
116 |
|
117 // End of File |