39
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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:
|
|
15 |
* Test application for wizards.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#include "myappmainwindow.h"
|
|
20 |
#include "myappengine.h"
|
|
21 |
#include "firstview.h"
|
|
22 |
|
|
23 |
// ViewManager Constructor
|
|
24 |
MyAppMainWindow::MyAppMainWindow()
|
|
25 |
{
|
|
26 |
|
|
27 |
// Add the views to the main window
|
|
28 |
addFirstView();
|
|
29 |
// show the main window (which will display the last view that was added)
|
|
30 |
toFirstView();
|
|
31 |
show();
|
|
32 |
}
|
|
33 |
|
|
34 |
// Destructor
|
|
35 |
MyAppMainWindow::~MyAppMainWindow()
|
|
36 |
{
|
|
37 |
}
|
|
38 |
|
|
39 |
// Methods to add views to the main window
|
|
40 |
void MyAppMainWindow::addFirstView()
|
|
41 |
{
|
|
42 |
mFirstView = new FirstView();
|
|
43 |
addView(mFirstView);
|
|
44 |
}
|
|
45 |
|
|
46 |
|
|
47 |
// Slots to handle view change
|
|
48 |
void MyAppMainWindow::toFirstView()
|
|
49 |
{
|
|
50 |
setCurrentView(mFirstView);
|
|
51 |
}
|
|
52 |
|