23
|
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 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: View class for Video settings list view.*
|
|
15 |
*/
|
|
16 |
|
|
17 |
|
|
18 |
// Version : %version: 8 %
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
// INCLUDE FILES
|
|
23 |
#include <aknViewAppUi.h>
|
|
24 |
#include <MediaSettings.rsg>
|
|
25 |
#include <eikmenup.h>
|
|
26 |
#include <eiktxlbm.h>
|
|
27 |
#include <hlplch.h> // For HlpLauncher
|
|
28 |
#include <featmgr.h>
|
|
29 |
#include "mediasettings.hrh"
|
|
30 |
#include "MPSettingsNaviPaneController.h"
|
|
31 |
#include "MPSettingsVideoView.h"
|
|
32 |
#include "MPSettingsVideoContainer.h"
|
|
33 |
#include "MPSettingsConstants.h"
|
|
34 |
#include "MPSettingsModelForROP.h"
|
|
35 |
#include "mpxlog.h"
|
|
36 |
|
|
37 |
// ================= MEMBER FUNCTIONS =======================
|
|
38 |
|
|
39 |
// -----------------------------------------------------------------------------
|
|
40 |
// CMPSettingsVideoView::CMPSettingsVideoView
|
|
41 |
// C++ default constructor can NOT contain any code, that
|
|
42 |
// might leave.
|
|
43 |
// -----------------------------------------------------------------------------
|
|
44 |
//
|
|
45 |
CMPSettingsVideoView::CMPSettingsVideoView(CMPSettingsModelForROP* aModel)
|
|
46 |
: iModel( aModel)
|
|
47 |
{
|
|
48 |
MPX_FUNC("#MS# CMPSettingsVideoView::CMPSettingsVideoView()");
|
|
49 |
iNaviPaneContext = iNaviCntrl->MPTabGroup();
|
|
50 |
}
|
|
51 |
|
|
52 |
// ---------------------------------------------------------
|
|
53 |
// CMPSettingsVideoView::ConstructL(const TRect& aRect)
|
|
54 |
// Symbian OS two-phased constructor
|
|
55 |
// ---------------------------------------------------------
|
|
56 |
//
|
|
57 |
void CMPSettingsVideoView::ConstructL()
|
|
58 |
{
|
|
59 |
MPX_FUNC("#MS# CMPSettingsVideoView::ConstructL()");
|
|
60 |
BaseConstructL(R_MPSETT_VIDEO_VIEW);
|
|
61 |
}
|
|
62 |
|
|
63 |
// -----------------------------------------------------------------------------
|
|
64 |
// CMPSettingsVideoView::NewLC
|
|
65 |
// Two-phased constructor.
|
|
66 |
// -----------------------------------------------------------------------------
|
|
67 |
//
|
|
68 |
CMPSettingsVideoView* CMPSettingsVideoView::NewLC(CMPSettingsModelForROP* aModel)
|
|
69 |
{
|
|
70 |
MPX_FUNC("#MS# CMPSettingsVideoView::NewLC()");
|
|
71 |
CMPSettingsVideoView* self = new(ELeave) CMPSettingsVideoView(aModel);
|
|
72 |
|
|
73 |
CleanupStack::PushL(self);
|
|
74 |
self->ConstructL();
|
|
75 |
|
|
76 |
return self;
|
|
77 |
}
|
|
78 |
|
|
79 |
// ---------------------------------------------------------
|
|
80 |
// CMPSettingsVideoView::~CMPSettingsVideoView()
|
|
81 |
// Destructor
|
|
82 |
// ---------------------------------------------------------
|
|
83 |
//
|
|
84 |
CMPSettingsVideoView::~CMPSettingsVideoView()
|
|
85 |
{
|
|
86 |
MPX_FUNC("#MS# CMPSettingsVideoView::~CMPSettingsVideoView()");
|
|
87 |
}
|
|
88 |
|
|
89 |
// ---------------------------------------------------------
|
|
90 |
// TUid CMPSettingsVideoView::Id
|
|
91 |
// ---------------------------------------------------------
|
|
92 |
//
|
|
93 |
TUid CMPSettingsVideoView::Id() const
|
|
94 |
{
|
|
95 |
MPX_FUNC("#MS# CMPSettingsVideoView::Id()");
|
|
96 |
return KMPSettVideoViewId;
|
|
97 |
}
|
|
98 |
|
|
99 |
// ---------------------------------------------------------
|
|
100 |
// CMPSettingsVideoView::HandleCommandL
|
|
101 |
// ---------------------------------------------------------
|
|
102 |
//
|
|
103 |
void CMPSettingsVideoView::HandleCommandL(TInt aCommand)
|
|
104 |
{
|
|
105 |
MPX_DEBUG2(_L("#MS# CMPSettingsVideoView::HandleCommandL(%d)"),aCommand);
|
|
106 |
switch (aCommand)
|
|
107 |
{
|
|
108 |
case EMPSettCmdChange:
|
|
109 |
static_cast<CMPSettingsVideoContainer*>(iContainer)->EditCurrentItemFromMenuL(ETrue);
|
|
110 |
break;
|
|
111 |
|
|
112 |
case EMPMiddleSoftKeyChange:
|
|
113 |
static_cast<CMPSettingsVideoContainer*>(iContainer)->EditCurrentItemFromMenuL(EFalse);
|
|
114 |
break;
|
|
115 |
|
|
116 |
case EAknSoftkeyBack:
|
|
117 |
AppUi()->ActivateLocalViewL(KMPSettMainViewId);
|
|
118 |
break;
|
|
119 |
|
|
120 |
case EMPSettCmdHelp:
|
|
121 |
if( FeatureManager::FeatureSupported( KFeatureIdHelp ) )
|
|
122 |
{
|
|
123 |
HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
|
|
124 |
AppUi()->AppHelpContextL() );
|
|
125 |
}
|
|
126 |
break;
|
|
127 |
|
|
128 |
default:
|
|
129 |
AppUi()->HandleCommandL(aCommand);
|
|
130 |
break;
|
|
131 |
}
|
|
132 |
}
|
|
133 |
|
|
134 |
// ---------------------------------------------------------------------------
|
|
135 |
// CMPSettingsVideoView::NewContainerL
|
|
136 |
// ---------------------------------------------------------------------------
|
|
137 |
//
|
|
138 |
CMPSettingsBaseContainer* CMPSettingsVideoView::NewContainerL()
|
|
139 |
{
|
|
140 |
MPX_FUNC("#MS# CMPSettingsVideoView::NewContainerL()");
|
|
141 |
return new(ELeave) CMPSettingsVideoContainer(iModel);
|
|
142 |
}
|
|
143 |
|
|
144 |
// ---------------------------------------------------------------------------
|
|
145 |
// CMPSettingsVideoView::DynInitContainerL
|
|
146 |
// ---------------------------------------------------------------------------
|
|
147 |
//
|
|
148 |
void CMPSettingsVideoView::DynInitContainerL()
|
|
149 |
{
|
|
150 |
MPX_FUNC("#MS# CMPSettingsVideoView::DynInitContainerL()");
|
|
151 |
CEikTextListBox* listbox = iContainer->ListBox();
|
|
152 |
|
|
153 |
listbox->SetTopItemIndex(iTopItemIndex);
|
|
154 |
|
|
155 |
if (iCurrentItem >= 0 && iCurrentItem < listbox->Model()->NumberOfItems()) // magic
|
|
156 |
{
|
|
157 |
listbox->SetCurrentItemIndexAndDraw(iCurrentItem);
|
|
158 |
}
|
|
159 |
CMPSettingsBaseView::SetMiddleSoftKeyLabelL(R_MEDIASETTING_MSK_CHANGE,EMPMiddleSoftKeyChange);
|
|
160 |
}
|
|
161 |
|
|
162 |
// ---------------------------------------------------------------------------
|
|
163 |
// CMPSettingsVideoView::DynInitMenuPaneL
|
|
164 |
// ---------------------------------------------------------------------------
|
|
165 |
//
|
|
166 |
void CMPSettingsVideoView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
|
|
167 |
{
|
|
168 |
MPX_FUNC("#MS# CMPSettingsVideoView::DynInitMenuPaneL()");
|
|
169 |
|
|
170 |
CMPSettingsBaseView::DynInitMenuPaneL( aResourceId, aMenuPane );
|
|
171 |
}
|
|
172 |
|
|
173 |
// End of File
|
|
174 |
|