1 /* |
|
2 * Copyright (c) 2006 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: CMnrpNaviControl class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MNRP_NAVICONTROL_H |
|
20 #define MNRP_NAVICONTROL_H |
|
21 |
|
22 #include <coecntrl.h> |
|
23 #include "mnrpnavimodel.h" |
|
24 |
|
25 class CAknSingleHeadingStyleListBox; |
|
26 class CMnrpNaviView; |
|
27 |
|
28 /** Navigation view. |
|
29 * Shows list box with navigation information items: |
|
30 * destination name and coordinates, current position coordinates |
|
31 * distance and bearing to destination. |
|
32 */ |
|
33 class CMnrpNaviControl : public CCoeControl, public MNaviModelObserver |
|
34 { |
|
35 public: |
|
36 |
|
37 static CMnrpNaviControl* NewL( CMnrpNaviView& aView, const TRect& aRect, CMnrpEngine& aEngine ); |
|
38 virtual ~CMnrpNaviControl(); |
|
39 |
|
40 void UpdateModelL( CPosLandmark& aDestination ); |
|
41 |
|
42 protected: |
|
43 /** Creates list box */ |
|
44 void CreateListBoxL(); |
|
45 |
|
46 public: // from MNaviModelObserver |
|
47 void HandleModelUpdateL(); |
|
48 |
|
49 protected: // from CCoeControl |
|
50 TInt CountComponentControls() const; |
|
51 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
52 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
53 void SizeChanged(); |
|
54 void HandleResourceChange( TInt aType ); |
|
55 |
|
56 private: |
|
57 |
|
58 void ConstructL( const TRect& aRect, CMnrpEngine& aEngine ); |
|
59 CMnrpNaviControl( CMnrpNaviView& aView ); |
|
60 |
|
61 private: |
|
62 CMnrpNaviView& iView; |
|
63 |
|
64 CAknSingleHeadingStyleListBox* iListBox; |
|
65 CMnrpNaviModel* iModel; |
|
66 }; |
|
67 |
|
68 #endif // MNRP_NAVICONTROL_H |
|
69 |
|