57
|
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: Declares UI class for application.*
|
|
15 |
*/
|
|
16 |
|
|
17 |
|
|
18 |
// Version : %version: 6 %
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef MPSETTINGSAPPUI_H
|
|
23 |
#define MPSETTINGSAPPUI_H
|
|
24 |
|
|
25 |
// INCLUDES
|
|
26 |
#include <eikapp.h>
|
|
27 |
#include <eikdoc.h>
|
|
28 |
#include <e32std.h>
|
|
29 |
#include <coeccntx.h>
|
|
30 |
#include <aknViewAppUi.h>
|
|
31 |
#include <akntabgrp.h>
|
|
32 |
#include <aknnavide.h>
|
|
33 |
#include <AknTabObserver.h>
|
|
34 |
|
|
35 |
|
|
36 |
#include "MPSettingsNaviPaneController.h"
|
|
37 |
|
|
38 |
// FORWARD DECLARATIONS
|
|
39 |
class CAknNavigationDecorator;
|
|
40 |
class CMPSettingsMainView;
|
|
41 |
|
|
42 |
// CLASS DECLARATION
|
|
43 |
class CMPSettingsModel;
|
|
44 |
class CMPMediaPlayerSettings;
|
|
45 |
class CMPSettingsModelForROP;
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Application UI class.
|
|
49 |
* Provides support for the following features:
|
|
50 |
* - EIKON control architecture
|
|
51 |
* - view architecture
|
|
52 |
* - status pane
|
|
53 |
*
|
|
54 |
* @lib MediaSettings.app
|
|
55 |
* @since 2.0
|
|
56 |
*/
|
|
57 |
class CMPSettingsAppUi : public CAknViewAppUi,
|
|
58 |
public MAknTabObserver,
|
|
59 |
public MMPSettingsNaviPaneController
|
|
60 |
{
|
|
61 |
public: // // Constructors and destructor
|
|
62 |
|
|
63 |
/*
|
|
64 |
* C++ constructor.
|
|
65 |
*/
|
|
66 |
CMPSettingsAppUi();
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Symbian OS 2nd phase constructor.
|
|
70 |
*/
|
|
71 |
void ConstructL();
|
|
72 |
|
|
73 |
/**
|
|
74 |
* Destructor.
|
|
75 |
*/
|
|
76 |
virtual ~CMPSettingsAppUi();
|
|
77 |
|
|
78 |
public: // Functions from base classes
|
|
79 |
|
|
80 |
/**
|
|
81 |
* From CEikAppUi, takes care of command handling.
|
|
82 |
* @param aCommand command to be handled
|
|
83 |
*/
|
|
84 |
void HandleCommandL(TInt aCommand);
|
|
85 |
|
|
86 |
/**
|
|
87 |
* From CEikAppUi, takes care of resource handling.
|
|
88 |
* @param aType resource to be handled
|
|
89 |
*/
|
|
90 |
void HandleResourceChangeL( TInt aType );
|
|
91 |
|
|
92 |
/**
|
|
93 |
* From MAknTabObserver, takes care of tab handling.
|
|
94 |
* @param aIndex tab to be handled
|
|
95 |
*/
|
|
96 |
void TabChangedL(TInt aIndex);
|
|
97 |
|
|
98 |
/**
|
|
99 |
* From MMPSettingsNaviPaneController, returns pointer
|
|
100 |
* to MP's Navi pane object.
|
|
101 |
* @return CAknNavigationControlContainer.
|
|
102 |
*/
|
|
103 |
CAknNavigationControlContainer* NaviContainer() const;
|
|
104 |
|
|
105 |
/**
|
|
106 |
* From MMPSettingsNaviPaneController, returns pointer
|
|
107 |
* to MP's tab group object.
|
|
108 |
* @return CAknNavigationDecorator.
|
|
109 |
*/
|
|
110 |
CAknNavigationDecorator* MPTabGroup() const;
|
|
111 |
|
|
112 |
/**
|
|
113 |
* From MMPSettingsNaviPaneController, updates tab group
|
|
114 |
* according to active view.
|
|
115 |
*/
|
|
116 |
void UpdateTabIndex();
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Activates view.
|
|
120 |
* @param aViewId View Id
|
|
121 |
*/
|
|
122 |
void ActivateLocalViewL( TUid aViewId );
|
|
123 |
|
|
124 |
private:
|
|
125 |
|
|
126 |
/**
|
|
127 |
* From MEikMenuObserver, dynamically initialises menu pane.
|
|
128 |
* @param aResourceId Resource ID identifying the menu pane
|
|
129 |
* to initialise.
|
|
130 |
* @param aMenuPane Pointer to the menu pane.
|
|
131 |
*/
|
|
132 |
void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
|
|
133 |
|
|
134 |
/**
|
|
135 |
* From CEikAppUi, handles key events.
|
|
136 |
* @param aKeyEvent Event to handled.
|
|
137 |
* @param aType Type of the key event.
|
|
138 |
* @return Response code (EKeyWasConsumed, EKeyWasNotConsumed).
|
|
139 |
*/
|
|
140 |
TKeyResponse HandleKeyEventL(
|
|
141 |
const TKeyEvent& aKeyEvent,TEventCode aType);
|
|
142 |
|
|
143 |
private: // new functions
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Create tab to tabgroup with possibly skinned icon (with mask)
|
|
147 |
* @param aID Skin ID for the icon
|
|
148 |
* @param aMbmFile Full path to MBM file which contains the default icon
|
|
149 |
* @param aBitmapId Id for the default icon in the MBM file
|
|
150 |
* @param aMaskId Id for the default icon mask in the MBM file
|
|
151 |
* @param aTabId Id for tab
|
|
152 |
*/
|
|
153 |
void AddTabSettingsL(
|
|
154 |
const TAknsItemID& aID,
|
|
155 |
const TDesC& aMbmFile,
|
|
156 |
TInt aBitmapId,
|
|
157 |
TInt aMaskId,
|
|
158 |
TInt aTabId );
|
|
159 |
|
|
160 |
/**
|
|
161 |
* Create navigation pane tabgroup
|
|
162 |
*/
|
|
163 |
void AddTabSettingsGroupL();
|
|
164 |
|
|
165 |
/**
|
|
166 |
* Check whether or not the Contrast settings item should be drawn
|
|
167 |
* @return ETrue, if contrast item should be visible.
|
|
168 |
*/
|
|
169 |
TBool VideoContrastIsSupportedL();
|
|
170 |
|
|
171 |
private: //Data
|
|
172 |
|
|
173 |
/**
|
|
174 |
* Navi pane. Not own.
|
|
175 |
*/
|
|
176 |
CAknNavigationControlContainer* iNaviPane;
|
|
177 |
|
|
178 |
/**
|
|
179 |
* Tab group. Not own.
|
|
180 |
*/
|
|
181 |
CAknTabGroup* iTabGroup;
|
|
182 |
|
|
183 |
/**
|
|
184 |
* Decorated tab group. Own.
|
|
185 |
*/
|
|
186 |
CAknNavigationDecorator* iDecoratedTabGroup;
|
|
187 |
|
|
188 |
CArrayFix<TUid>* iViewIds;
|
|
189 |
CMPSettingsMainView* iMainView;
|
|
190 |
RImplInfoPtrArray iImplInfoArray;
|
|
191 |
|
|
192 |
CMPSettingsModel* iModel;
|
|
193 |
CMPSettingsModelForROP* iRopModel;
|
|
194 |
|
|
195 |
/**
|
|
196 |
* Video view availability status.
|
|
197 |
*/
|
|
198 |
TBool iVideoViewAvailable;
|
|
199 |
};
|
|
200 |
|
|
201 |
#endif
|
|
202 |
|
|
203 |
// End of File
|