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 "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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <aknviewappui.h> |
|
20 #include <bctestdomavkonpsln.rsg> |
|
21 |
|
22 #include "bctestdomavkonpsln.hrh" |
|
23 #include "bctestdomavkonpslnview.h" |
|
24 #include "bctestdomavkonpslncontainer.h" |
|
25 #include "bctestutil.h" |
|
26 |
|
27 |
|
28 // ======== MEMBER FUNCTIONS ======== |
|
29 |
|
30 // --------------------------------------------------------------------------- |
|
31 // Symbian 2nd static Constructor |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 CBCTestDomAvkonPslnView* CBCTestDomAvkonPslnView::NewL( CBCTestUtil* aUtil ) |
|
35 { |
|
36 CBCTestDomAvkonPslnView* self = new( ELeave ) CBCTestDomAvkonPslnView(); |
|
37 CleanupStack::PushL( self ); |
|
38 self->ConstructL( aUtil ); |
|
39 CleanupStack::Pop( self ); |
|
40 return self; |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // C++ default Constructor |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 CBCTestDomAvkonPslnView::CBCTestDomAvkonPslnView() |
|
48 { |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // Symbian 2nd Constructor |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 void CBCTestDomAvkonPslnView::ConstructL( CBCTestUtil* aUtil ) |
|
56 { |
|
57 BaseConstructL( R_BCTESTDOMAVKONPSLN_VIEW ); |
|
58 |
|
59 iContainer = new( ELeave ) CBCTestDomAvkonPslnContainer(); |
|
60 iContainer->SetMopParent( this ); |
|
61 iContainer->ConstructL( ClientRect() ); |
|
62 AppUi()->AddToStackL( *this, iContainer ); |
|
63 iContainer->MakeVisible( ETrue ); |
|
64 |
|
65 iTestUtil = aUtil; |
|
66 } |
|
67 |
|
68 // --------------------------------------------------------------------------- |
|
69 // Destructor |
|
70 // --------------------------------------------------------------------------- |
|
71 // |
|
72 CBCTestDomAvkonPslnView::~CBCTestDomAvkonPslnView() |
|
73 { |
|
74 if ( iContainer ) |
|
75 { |
|
76 AppUi()->RemoveFromStack( iContainer ); |
|
77 } |
|
78 delete iContainer; |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------------------------- |
|
82 // CBCTestDomAvkonPslnView::Id |
|
83 // --------------------------------------------------------------------------- |
|
84 // |
|
85 TUid CBCTestDomAvkonPslnView::Id() const |
|
86 { |
|
87 return KBCTestDomainViewId; |
|
88 } |
|
89 |
|
90 // --------------------------------------------------------------------------- |
|
91 // CBCTestDomAvkonPslnView::DoActivateL |
|
92 // --------------------------------------------------------------------------- |
|
93 // |
|
94 void CBCTestDomAvkonPslnView::DoActivateL( const TVwsViewId&, TUid, |
|
95 const TDesC8& ) |
|
96 { |
|
97 |
|
98 } |
|
99 |
|
100 // --------------------------------------------------------------------------- |
|
101 // CBCTestDomAvkonPslnView::DoDeactivate |
|
102 // --------------------------------------------------------------------------- |
|
103 // |
|
104 void CBCTestDomAvkonPslnView::DoDeactivate() |
|
105 { |
|
106 } |
|
107 |
|
108 // --------------------------------------------------------------------------- |
|
109 // CBCTestDomAvkonPslnView::Container |
|
110 // --------------------------------------------------------------------------- |
|
111 // |
|
112 CBCTestDomAvkonPslnContainer* CBCTestDomAvkonPslnView::Container() |
|
113 { |
|
114 return iContainer; |
|
115 } |
|
116 |
|
117 // --------------------------------------------------------------------------- |
|
118 // CBCTestDomAvkonPslnView::HandleCommandL |
|
119 // --------------------------------------------------------------------------- |
|
120 // |
|
121 void CBCTestDomAvkonPslnView::HandleCommandL( TInt aCommand ) |
|
122 { |
|
123 switch ( aCommand ) |
|
124 { |
|
125 case EProgCmdAutoTest: |
|
126 iTestUtil->RunL(); |
|
127 break; |
|
128 default: |
|
129 if ( aCommand > EBCTestCmdEmptyOutline && |
|
130 aCommand < EBCTestCmdMaxOutline ) |
|
131 { |
|
132 iTestUtil->RunL( aCommand ); |
|
133 } |
|
134 break; |
|
135 } |
|
136 } |
|
137 //end of file |
|