56
|
1 |
/*
|
|
2 |
* Copyright (c) 2004-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 "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: Psln application base view class.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef C_PSLNBASEVIEW_H
|
|
20 |
#define C_PSLNBASEVIEW_H
|
|
21 |
|
|
22 |
#include <aknview.h>
|
|
23 |
#include <eikclb.h>
|
|
24 |
|
|
25 |
#include "psln.hrh"
|
|
26 |
#include "PslnConst.h"
|
|
27 |
|
|
28 |
class CPslnBaseContainer;
|
|
29 |
class CPslnUi;
|
|
30 |
class CPslnModel;
|
|
31 |
class CAknNavigationDecorator;
|
|
32 |
|
|
33 |
/**
|
|
34 |
* CPslnBaseView base view class.
|
|
35 |
*
|
|
36 |
*/
|
|
37 |
class CPslnBaseView : public CAknView, public MEikListBoxObserver
|
|
38 |
{
|
|
39 |
public: // Constructors and destructor
|
|
40 |
|
|
41 |
/**
|
|
42 |
* C++ default constructor
|
|
43 |
*/
|
|
44 |
CPslnBaseView();
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Destructor.
|
|
48 |
*/
|
|
49 |
~CPslnBaseView();
|
|
50 |
|
|
51 |
protected:
|
|
52 |
|
|
53 |
/**
|
|
54 |
* From MEikListBoxObserver.
|
|
55 |
* Handles listbox events.
|
|
56 |
* @param aListBox Listbox where the event occurred.
|
|
57 |
* @param aEventType Event type.
|
|
58 |
*/
|
|
59 |
void HandleListBoxEventL( CEikListBox* aListBox,
|
|
60 |
TListBoxEvent aEventType );
|
|
61 |
|
|
62 |
/**
|
|
63 |
* From CAknView.
|
|
64 |
* Called when view is activated.
|
|
65 |
* @param aPrevViewId previous view id.
|
|
66 |
* @param aCustomMessageId custom message id.
|
|
67 |
* @param aCustomMessage custom message content.
|
|
68 |
*/
|
|
69 |
void DoActivateL(
|
|
70 |
const TVwsViewId& aPrevViewId,
|
|
71 |
TUid aCustomMessageId,
|
|
72 |
const TDesC8& aCustomMessage );
|
|
73 |
|
|
74 |
/**
|
|
75 |
* From CAknView.
|
|
76 |
* Called when view is deactivated.
|
|
77 |
*/
|
|
78 |
void DoDeactivate();
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Creates container for this view.
|
|
82 |
*/
|
|
83 |
virtual void CreateContainerL();
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Creates a new container for this view.
|
|
87 |
* Sub-class should implement this, as this is called by this
|
|
88 |
* base class from DoActivateL.
|
|
89 |
*/
|
|
90 |
virtual void NewContainerL() = 0;
|
|
91 |
|
|
92 |
/**
|
|
93 |
* Sets navi pane for the view.
|
|
94 |
*/
|
|
95 |
virtual void SetNaviPaneL();
|
|
96 |
|
|
97 |
/**
|
|
98 |
* Called by HandleListBoxEventL.
|
|
99 |
* Handles list box selections.
|
|
100 |
*/
|
|
101 |
virtual void HandleListBoxSelectionL() = 0;
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Adds given resource text as MSK to CBA.
|
|
105 |
*
|
|
106 |
* @param aResourceId middle softkey label.
|
|
107 |
* @param aCommandId command that should be performed when MSK
|
|
108 |
* is pressed.
|
|
109 |
* @since S60 v3.1
|
|
110 |
*/
|
|
111 |
virtual void SetMiddleSoftKeyLabelL(
|
|
112 |
const TInt aResourceId,
|
|
113 |
const TInt aCommandId );
|
|
114 |
|
|
115 |
/**
|
|
116 |
* From MEikMenuObserver.
|
|
117 |
* Changes MenuPane dynamically.
|
|
118 |
*/
|
|
119 |
virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Sets title pane to a view.
|
|
123 |
* @since 5.0
|
|
124 |
*/
|
|
125 |
virtual void SetTitlePaneL( TInt& aResourceId ) = 0;
|
|
126 |
|
|
127 |
/**
|
|
128 |
*Get the resorce id for CBA, The derived view change the CBA resource by overriding
|
|
129 |
*this function.
|
|
130 |
* @since 5.0
|
|
131 |
*/
|
|
132 |
virtual TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId );
|
|
133 |
|
|
134 |
private:
|
|
135 |
|
|
136 |
/* Remove container. */
|
|
137 |
void RemoveContainer();
|
|
138 |
|
|
139 |
protected: // Data
|
|
140 |
|
|
141 |
/**
|
|
142 |
* Container.
|
|
143 |
* Not own.
|
|
144 |
*/
|
|
145 |
CPslnBaseContainer* iContainer;
|
|
146 |
|
|
147 |
/**
|
|
148 |
* Application UI.
|
|
149 |
* Not own.
|
|
150 |
*/
|
|
151 |
CPslnUi* iPslnUi;
|
|
152 |
|
|
153 |
/**
|
|
154 |
* Model.
|
|
155 |
* Not own.
|
|
156 |
*/
|
|
157 |
CPslnModel* iModel;
|
|
158 |
|
|
159 |
/**
|
|
160 |
* Currently selected item.
|
|
161 |
*/
|
|
162 |
TInt iCurrentItem;
|
|
163 |
|
|
164 |
/**
|
|
165 |
* Navi pane.
|
|
166 |
* Own.
|
|
167 |
*/
|
|
168 |
CAknNavigationDecorator* iNaviPaneContext;
|
|
169 |
};
|
|
170 |
|
|
171 |
#endif // C_PSLNBASEVIEW_H
|
|
172 |
|
|
173 |
// End of File
|