author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:32:06 +0100 | |
branch | GCC_SURGE |
changeset 47 | 5b14749788d7 |
parent 27 | e4592d119491 |
parent 43 | 35b64624a9e7 |
permissions | -rw-r--r-- |
31 | 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 |
//--------------------------------------------------------------- |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
31 |
MsgMainWindow::MsgMainWindow(bool serviceRequest,int activityMsgId,QWidget *parent) : |
31 | 32 |
HbMainWindow(parent), mMsgSI(0), mMsgSendSI(0) |
33 |
{ |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
34 |
mViewManager = new MsgViewManager(serviceRequest,this,this,activityMsgId); |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
35 |
mMsgSI = new MsgServiceInterface(NULL,mViewManager); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
36 |
mMsgSendSI = new MsgSendServiceInterface(NULL,mViewManager); |
31 | 37 |
|
38 |
//Model creation |
|
39 |
ConversationsEngine::instance(); |
|
40 |
||
41 |
} |
|
42 |
||
43 |
//--------------------------------------------------------------- |
|
44 |
// MsgMainWindow::~MsgMainWindow |
|
45 |
// Constructor |
|
46 |
//--------------------------------------------------------------- |
|
47 |
MsgMainWindow::~MsgMainWindow() |
|
48 |
{ |
|
49 |
if (mMsgSI) |
|
50 |
{ |
|
51 |
delete mMsgSI; |
|
52 |
mMsgSI = NULL; |
|
53 |
} |
|
54 |
if (mMsgSendSI) |
|
55 |
{ |
|
56 |
delete mMsgSendSI; |
|
57 |
mMsgSendSI = NULL; |
|
58 |
} |
|
59 |
||
60 |
delete ConversationsEngine::instance(); |
|
61 |
} |
|
62 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
63 |
//--------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
64 |
// MsgMainWindow::viewManager |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
65 |
// Constructor |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
66 |
//--------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
67 |
MsgViewManager* MsgMainWindow::viewManager() |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
68 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
69 |
return mViewManager; |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
70 |
} |
31 | 71 |
// End of file |