|
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: |
|
15 * Main window of the messaging application. Activates the default view. |
|
16 * |
|
17 */ |
|
18 |
|
19 #include "msgmainwindow.h" |
|
20 |
|
21 #include "msgviewmanager.h" |
|
22 #include "msgserviceinterface.h" |
|
23 #include "msgsendserviceinterface.h" |
|
24 #include "conversationsengine.h" |
|
25 |
|
26 |
|
27 //--------------------------------------------------------------- |
|
28 // MsgMainWindow::MsgMainWindow |
|
29 // Constructor |
|
30 //--------------------------------------------------------------- |
|
31 MsgMainWindow::MsgMainWindow(bool serviceRequest, QWidget *parent) : |
|
32 HbMainWindow(parent), mMsgSI(0), mMsgSendSI(0) |
|
33 { |
|
34 hideItems(Hb::NaviPaneItem); |
|
35 MsgViewManager* viewManager = new MsgViewManager(serviceRequest,this,this); |
|
36 mMsgSI = new MsgServiceInterface(NULL,viewManager); |
|
37 mMsgSendSI = new MsgSendServiceInterface(NULL,viewManager); |
|
38 |
|
39 //Model creation |
|
40 ConversationsEngine::instance(); |
|
41 |
|
42 } |
|
43 |
|
44 //--------------------------------------------------------------- |
|
45 // MsgMainWindow::~MsgMainWindow |
|
46 // Constructor |
|
47 //--------------------------------------------------------------- |
|
48 MsgMainWindow::~MsgMainWindow() |
|
49 { |
|
50 if (mMsgSI) |
|
51 { |
|
52 delete mMsgSI; |
|
53 mMsgSI = NULL; |
|
54 } |
|
55 if (mMsgSendSI) |
|
56 { |
|
57 delete mMsgSendSI; |
|
58 mMsgSendSI = NULL; |
|
59 } |
|
60 |
|
61 delete ConversationsEngine::instance(); |
|
62 } |
|
63 |
|
64 // End of file |