1 /* |
|
2 * Copyright (c) 2009-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: 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 "iaupdatesettingdialog.h" |
|
25 |
|
26 |
|
27 // ViewManager Constructor |
|
28 IAUpdateMainWindow::IAUpdateMainWindow(IAUpdateEngine *engine) |
|
29 { |
|
30 // Add the views to the main window |
|
31 addMainView(engine); |
|
32 addSettingView(); |
|
33 |
|
34 // show the main window (which will display the last view that was added) |
|
35 show(); //temp |
|
36 } |
|
37 |
|
38 // Destructor |
|
39 IAUpdateMainWindow::~IAUpdateMainWindow() |
|
40 { |
|
41 } |
|
42 |
|
43 // Methods to add views to the main window |
|
44 void IAUpdateMainWindow::addMainView(IAUpdateEngine *engine) |
|
45 { |
|
46 mMainView = new IAUpdateMainView(engine); |
|
47 addView(mMainView); |
|
48 } |
|
49 |
|
50 |
|
51 void IAUpdateMainWindow::addSettingView() |
|
52 { |
|
53 |
|
54 mSettingView = new CIAUpdateSettingDialog(mMainView); |
|
55 addView(mSettingView); |
|
56 } |
|
57 |
|
58 // Slots to handle view change |
|
59 void IAUpdateMainWindow::toMainView() |
|
60 { |
|
61 setCurrentView(mMainView); |
|
62 } |
|
63 |
|
64 void IAUpdateMainWindow::toSettingView() |
|
65 { |
|
66 setCurrentView(mSettingView); |
|
67 } |
|
68 void IAUpdateMainWindow::refreshMainView(const RPointerArray<MIAUpdateNode>& nodes, |
|
69 const RPointerArray<MIAUpdateFwNode>& fwNodes, |
|
70 int error) |
|
71 { |
|
72 mMainView->refresh(nodes,fwNodes,error); |
|
73 show(); |
|
74 } |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 IAUpdateMainView* IAUpdateMainWindow::GetMainView() |
|
80 { |
|
81 return mMainView; |
|
82 } |
|
83 |
|
84 CIAUpdateSettingDialog* IAUpdateMainWindow::GetSettingView() |
|
85 { |
|
86 return mSettingView;} |
|
87 |
|
88 |
|