|
1 /* |
|
2 * Copyright (c) 2009 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: This module contains the implementation of IAUpdateMainWindow |
|
15 * class member functions. |
|
16 * |
|
17 */ |
|
18 |
|
19 #include <hbdocumentloader.h> |
|
20 |
|
21 #include "iaupdatemainwindow.h" |
|
22 #include "iaupdateengine.h" |
|
23 #include "iaupdatemainview.h" |
|
24 #include "iaupdatehistoryview.h" |
|
25 |
|
26 |
|
27 // ViewManager Constructor |
|
28 IAUpdateMainWindow::IAUpdateMainWindow() |
|
29 { |
|
30 // Add the views to the main window |
|
31 //addHistoryView(); |
|
32 addMainView(); |
|
33 // show the main window (which will display the last view that was added) |
|
34 show(); //temp |
|
35 } |
|
36 |
|
37 // Destructor |
|
38 IAUpdateMainWindow::~IAUpdateMainWindow() |
|
39 { |
|
40 } |
|
41 |
|
42 // Methods to add views to the main window |
|
43 void IAUpdateMainWindow::addMainView() |
|
44 { |
|
45 mMainView = new IAUpdateMainView(); |
|
46 addView(mMainView); |
|
47 } |
|
48 |
|
49 void IAUpdateMainWindow::addHistoryView() |
|
50 { |
|
51 mHistoryView = new IAUpdateHistoryView(); |
|
52 addView(mHistoryView); |
|
53 } |
|
54 |
|
55 |
|
56 // Slots to handle view change |
|
57 void IAUpdateMainWindow::toMainView() |
|
58 { |
|
59 setCurrentView(mMainView); |
|
60 } |
|
61 |
|
62 void IAUpdateMainWindow::refreshMainView(const RPointerArray<MIAUpdateNode>& nodes, |
|
63 const RPointerArray<MIAUpdateFwNode>& fwNodes, |
|
64 int error) |
|
65 { |
|
66 mMainView->refresh(nodes,fwNodes,error); |
|
67 show(); |
|
68 } |
|
69 |
|
70 |
|
71 void IAUpdateMainWindow::toHistoryView() |
|
72 { |
|
73 setCurrentView(mHistoryView); |
|
74 } |
|
75 |
|
76 |
|
77 |