author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 11 Jun 2010 14:07:16 +0300 | |
changeset 27 | 7eb70891911c |
parent 19 | e44a8c097b15 |
child 31 | a2467631ae02 |
permissions | -rw-r--r-- |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
2 |
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
* |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
*/ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
// qt |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include <QString> |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
21 |
#include <QRegExp> |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
22 |
#include <QCoreApplication> |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
23 |
#include <hbinputdialog.h> |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <hblabel.h> |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <hbaction.h> |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <hbmessagebox.h> |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#include <hblineedit.h> |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
#include <hbinputeditorinterface.h> |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
29 |
#include <hbinputstandardfilters.h> |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
30 |
#include <hbinputfilter.h> |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#include <hblistwidget.h> |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
32 |
#include <dialogwaiter.h> |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
33 |
|
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
34 |
#include <cvoicemailboxentry.h> |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
35 |
#include <cvoicemailbox.h> |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
#include "vmbxqtuihandler.h" |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
#include "voicemailboxdefsinternal.h" |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
#include "vmbxlogger.h" |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
// ======== MEMBER FUNCTIONS ================================================== |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
// VmbxQtUiHandler::VmbxQtUiHandler |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
// (Constructor). |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
// |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
48 |
VmbxQtUiHandler::VmbxQtUiHandler(QObject* parent): QObject(parent), |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
49 |
iTranslator(0), iCommonTranslator(0), iQueryDialog(NULL) |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
{ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler") |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
52 |
init(); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler Exit") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
} |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
// VmbxQtUiHandler::~VmbxQtUiHandler |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
// (Destructor). |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
// |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
VmbxQtUiHandler::~VmbxQtUiHandler() |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
{ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler") |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
64 |
if ( iQueryDialog ) { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
65 |
delete iQueryDialog; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
66 |
iQueryDialog = NULL; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
67 |
VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler delete iQueryDialog") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
68 |
} |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler Exit") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
} |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
// ---------------------------------------------------------------------------- |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
73 |
// VmbxQtUiHandler::Init |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
74 |
// |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
75 |
// ---------------------------------------------------------------------------- |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
76 |
// |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
77 |
void VmbxQtUiHandler::init() |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
78 |
{ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
79 |
VMBLOGSTRING("VmbxQtUiHandler::init") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
80 |
QString lang = QLocale::system().name(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
81 |
VMBLOGSTRING2("VmbxQtUiHandler::init lang type %S", |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
82 |
lang.utf16()) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
83 |
QString path = "Z:/resource/qt/translations/"; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
84 |
bool translatorLoaded = iTranslator.load("vmbx_"+lang, path); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
85 |
VMBLOGSTRING2("VmbxQtUiHandler::init load vmbx result %d", |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
86 |
translatorLoaded) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
87 |
// Install vmbx localization |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
88 |
if (translatorLoaded) { |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
89 |
VMBLOGSTRING("VmbxQtUiHandler::init qApp !") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
90 |
qApp->installTranslator(&iTranslator); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
91 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
92 |
// Install common localization, for select type "cancel". |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
93 |
bool loaded = iCommonTranslator.load( "common_"+lang, path); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
94 |
VMBLOGSTRING2("VmbxQtUiHandler::init load common result %d", |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
95 |
loaded) |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
96 |
if (loaded) { |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
97 |
VMBLOGSTRING("VmbxQtUiHandler::init qApp !!") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
98 |
qApp->installTranslator(&iCommonTranslator); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
99 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
100 |
VMBLOGSTRING("VmbxQtUiHandler::init Exit") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
101 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
102 |
|
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
103 |
// ---------------------------------------------------------------------------- |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
// VmbxQtUiHandler::ShowVmbxQueryDialog |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
// (show query dialog). |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
// |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
void VmbxQtUiHandler::showVmbxQueryDialog(const TVmbxType& aType, |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
QString& aNumber, int& aResult) |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
{ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
QString header; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
if (EVmbxVoice == aType) { |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
114 |
header = hbTrId("txt_vmbx_title_voice_mailbox_number"); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
115 |
} else if (EVmbxVideo == aType) { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
116 |
// type of EVmbxVideo |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
117 |
header = hbTrId("txt_vmbx_title_video_mailbox_number"); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
} else { |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
119 |
aResult = KErrCancel; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
120 |
VMBLOGSTRING( "VmbxQtUiHandler::showVmbxQueryDialog type error" ) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
121 |
return; |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
} |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
123 |
if (iQueryDialog) { |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
124 |
delete iQueryDialog; |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
125 |
iQueryDialog = 0; |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
126 |
} |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
127 |
|
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
128 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
129 |
iQueryDialog = new HbInputDialog(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
130 |
iQueryDialog->setDismissPolicy(HbDialog::NoDismiss); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
131 |
iQueryDialog->setTimeout(HbDialog::NoTimeout); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
133 |
iQueryDialog->setModal(true); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
134 |
// Set heading content |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
135 |
iQueryDialog->setPromptText(header); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
137 |
// Set HbLineEdit Content |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
138 |
iQueryDialog->lineEdit()->setText(aNumber); // default text |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
139 |
iQueryDialog->lineEdit()->setMaxLength(KVmbxPhoneCharMaxLength); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
140 |
HbEditorInterface inputMode(iQueryDialog->lineEdit()); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
141 |
inputMode.setFilter(HbPhoneNumberFilter::instance()); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
142 |
bool ret = connect(iQueryDialog->lineEdit(), SIGNAL(textChanged(QString)), |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
143 |
this, SLOT(updatePrimaryAction(QString))); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
144 |
VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog connect textChanged %d", ret) |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
145 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
146 |
DialogWaiter waiter; |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
147 |
HbAction *primary = 0; |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
148 |
if (iQueryDialog->actions().count()>= 1) { |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
149 |
primary = qobject_cast<HbAction*>(iQueryDialog->actions().at(0)); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
150 |
} |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
151 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
152 |
iQueryDialog->open(&waiter, SLOT(done(HbAction *))); |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
153 |
iQueryDialog->lineEdit()->setFocus(); // Enable the VKB |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
154 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
155 |
HbAction *result = waiter.wait(); |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
156 |
if (result == primary) { |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
VMBLOGSTRING( "VmbxQtUiHandler::showVmbxQueryDialog select OK" ) |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
// asign OK KEY value |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
aResult = KErrNone; |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
160 |
aNumber = iQueryDialog->lineEdit()->text(); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
} else { |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
aResult = KErrCancel; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
} |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
164 |
|
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
165 |
disconnect(iQueryDialog->lineEdit(), SIGNAL(textChanged(QString)), |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
166 |
this, SLOT(updatePrimaryAction(QString))); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
167 |
|
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
168 |
|
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
169 |
// TODO Delete Operation will case panic on EM |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
170 |
delete iQueryDialog; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
171 |
iQueryDialog = 0; |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
172 |
|
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
VMBLOGSTRING2("VmbxQtUiHandler::showVmbxQueryDialog aResult = %d", aResult) |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog Exit") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
} |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
// VmbxQtUiHandler::showDefineSelectionDialog |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
// (Shoe define list dialog). |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
// |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
void VmbxQtUiHandler::showDefineSelectionDialog( |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
183 |
TVmbxType &aType, int &aResult) |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
{ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
186 |
HbDialog* defineListDialog = new HbDialog(); |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
187 |
defineListDialog->setDismissPolicy(HbDialog::NoDismiss); |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
defineListDialog->setTimeout(HbDialog::NoTimeout); |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
defineListDialog->setModal(true); |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
191 |
// Set heading widget,"Define number:" |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
192 |
defineListDialog->setHeadingWidget(new HbLabel( |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
193 |
hbTrId("txt_vmbx_title_select_mailbox"))); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
// Create a define list |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
HbListWidget *list = new HbListWidget(); |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
196 |
//Voice Mailbox |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
197 |
list->addItem(hbTrId("txt_vmbx_list_voice_mailbox")); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
198 |
//Video Mailbox |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
199 |
list->addItem(hbTrId("txt_vmbx_list_video_mailbox")); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
// Set content widget |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
defineListDialog->setContentWidget(list); |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
203 |
// Sets the "Cancel"-action/button |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
204 |
HbAction *cancelAction = |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
205 |
new HbAction(hbTrId("txt_common_button_cancel"),defineListDialog); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
206 |
defineListDialog->addAction(cancelAction); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
207 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
208 |
connect(list, SIGNAL(activated(HbListWidgetItem *)), |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
defineListDialog, SLOT(close())); |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
210 |
DialogWaiter waiter; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
211 |
defineListDialog->open(&waiter, SLOT(done(HbAction *))); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
212 |
HbAction *result = waiter.wait(); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
if (cancelAction == result){ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
aType = EVmbxNone; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
215 |
aResult = KErrCancel; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
} else { |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
217 |
// Select one item |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
aResult = KErrNone; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
219 |
int currentItem = list->row(list->currentItem()); |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog:\ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
currentItem %d", currentItem) |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
if (0 == currentItem) { |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
aType = EVmbxVoice; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
} else { |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
aType = EVmbxVideo; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
226 |
} |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
} |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog: aType%d", aType) |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
229 |
VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog: aResult%d", \ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
230 |
aResult) |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
231 |
|
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
232 |
|
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
233 |
// TODO Delete Operation will case panic on EM |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
delete defineListDialog; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
defineListDialog = 0; |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
236 |
|
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
237 |
VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog Exit") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
} |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
239 |
|
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
// ---------------------------------------------------------------------------- |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
241 |
// VmbxQtUiHandler::showCallSelectionDialog |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
242 |
// (show call selection dialog). |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
243 |
// ---------------------------------------------------------------------------- |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
244 |
// |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
245 |
void VmbxQtUiHandler::showCallSelectionDialog( |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
246 |
const QList<CVoiceMailboxEntry *> entryList, |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
247 |
TVoiceMailboxParams ¶ms, int &result ) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
248 |
{ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
249 |
VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
250 |
int count = entryList.count(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
251 |
VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog new before") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
252 |
HbDialog* callListDialog = new HbDialog(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
253 |
VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog new after") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
254 |
callListDialog->setDismissPolicy(HbDialog::NoDismiss); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
255 |
callListDialog->setTimeout(HbDialog::NoTimeout); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
256 |
callListDialog->setModal(true); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
257 |
// Set heading widget,"select mailbox" |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
258 |
callListDialog->setHeadingWidget(new HbLabel( |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
259 |
hbTrId("txt_vmbx_title_select_mailbox"))); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
260 |
// Create a call list |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
261 |
HbListWidget *list = new HbListWidget(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
262 |
// Set content widget |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
263 |
callListDialog->setContentWidget(list); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
264 |
|
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
265 |
QList<TVoiceMailboxParams> paramsList; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
266 |
TVoiceMailboxParams entryParams; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
267 |
for (int i = 0; i < count; i++) { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
268 |
TVmbxType vmbxType = entryList[i]->VoiceMailboxType(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
269 |
entryParams.iType = vmbxType; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
270 |
entryParams.iServiceId = entryList[i]->ServiceId(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
271 |
paramsList.append(entryParams); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
272 |
switch (vmbxType) { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
273 |
case EVmbxVoice: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
274 |
{ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
275 |
list->addItem(hbTrId("txt_vmbx_list_voice_mailbox")); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
276 |
break; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
277 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
278 |
case EVmbxVideo: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
279 |
{ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
280 |
list->addItem(hbTrId("txt_vmbx_list_video_mailbox")); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
281 |
break; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
282 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
283 |
case EVmbxVoip: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
284 |
{ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
285 |
// Get name |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
286 |
TPtrC vmbxName( KNullDesC ); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
287 |
int voipRes = entryList[i]->GetVmbxName(vmbxName); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
288 |
VMBLOGSTRING2( "VmbxQtUiHandler::showCallSelectionDialogL\ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
289 |
: voipRes=%I", voipRes ); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
290 |
if (KErrNone == voipRes) { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
291 |
QString voipName; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
292 |
if (vmbxName.Length() > 0) { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
293 |
voipName=QString::fromUtf16( |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
294 |
vmbxName.Ptr(), vmbxName.Length()); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
295 |
// add voip item |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
296 |
list->addItem(voipName); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
297 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
298 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
299 |
break; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
300 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
301 |
default: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
302 |
break; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
303 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
304 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
305 |
// Sets the "Cancel"-action/button |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
306 |
HbAction *cancelAction = |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
307 |
new HbAction(hbTrId("txt_common_button_cancel"),callListDialog); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
308 |
callListDialog->addAction(cancelAction); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
309 |
|
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
310 |
connect(list, SIGNAL(activated(HbListWidgetItem *)), |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
311 |
callListDialog, SLOT(close())); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
312 |
DialogWaiter waiter; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
313 |
callListDialog->open(&waiter, SLOT(done(HbAction *))); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
314 |
HbAction *action = waiter.wait(); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
315 |
if (cancelAction == action){ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
316 |
params.iType = EVmbxNone; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
317 |
params.iServiceId = KVmbxServiceIdNone; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
318 |
result = KErrCancel; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
319 |
} else { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
320 |
// Select one item |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
321 |
result = KErrNone; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
322 |
int currentItem = list->row(list->currentItem()); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
323 |
VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog:\ |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
324 |
currentItem %d", currentItem) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
325 |
params.iType = paramsList[currentItem].iType; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
326 |
params.iServiceId = paramsList[currentItem].iServiceId; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
327 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
328 |
VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog: params.iType %d", |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
329 |
params.iType) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
330 |
VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog: result%d", |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
331 |
result) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
332 |
delete callListDialog; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
333 |
callListDialog = 0; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
334 |
VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog Exit") |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
335 |
} |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
336 |
|
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
337 |
// ---------------------------------------------------------------------------- |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
338 |
// VmbxQtUiHandler::showInformationNote |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
339 |
// (show information note). |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
340 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
341 |
// |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
342 |
void VmbxQtUiHandler::showInformationNote(const TVmbxNoteType aType) |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
343 |
{ |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
344 |
VMBLOGSTRING("VmbxQtUiHandler::showInformationNote") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
345 |
QString noteText; |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
346 |
VMBLOGSTRING2("VmbxQtUiHandler::showInformationNote type =%d", aType) |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
347 |
switch (aType) { |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
348 |
case EInvalidNumber: |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
349 |
// Need to comfirm with ui designer |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
350 |
noteText = hbTrId("Invalid phone number."); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
351 |
break; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
352 |
case ENotAllowUserEditing: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
353 |
//User not allow to edit. |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
354 |
noteText = hbTrId("Number not provisioned"); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
355 |
break; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
356 |
case ESavedToPhoneMemory: |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
357 |
case ESavedToSimMemory: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
358 |
//Voice mailbox number saved to Phone memory. |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
359 |
noteText = hbTrId("txt_vmbx_dpopinfo_voice_mailbox_number_saved"); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
360 |
break; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
361 |
case EVideoNumberSaved: |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
362 |
//Video call mailbox saved. |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
363 |
noteText = hbTrId("txt_vmbx_dpopinfo_video_mailbox_number_saved"); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
364 |
break; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
365 |
case EDefineVoiceNumber: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
366 |
//Define voice mailbox. |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
367 |
noteText = hbTrId("txt_vmbx_dpopinfo_define_voice_mailbox_number"); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
368 |
break; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
369 |
case EDefineVideoNumber: |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
370 |
//Define video mailbox. |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
371 |
noteText = hbTrId("txt_vmbx_dpopinfo_define_video_mailbox_number"); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
372 |
break; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
373 |
default: |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
374 |
VMBLOGSTRING("VmbxQtUiHandler::ShowInformationNote default") |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
break; |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
376 |
} |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
377 |
HbMessageBox *msgBox = 0; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
378 |
if (EInvalidNumber == aType) { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
379 |
msgBox = new HbMessageBox(HbMessageBox::MessageTypeWarning); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
380 |
} else { |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
381 |
msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
382 |
} |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
383 |
msgBox->setText(noteText); |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
384 |
msgBox->setTimeout( HbDialog::StandardTimeout ); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
385 |
msgBox->clearActions(); |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
386 |
DialogWaiter waiter; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
387 |
msgBox->open(&waiter, SLOT(done(HbAction *))); |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
388 |
waiter.wait(); |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
389 |
delete msgBox; |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
390 |
msgBox = 0; |
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
391 |
VMBLOGSTRING("VmbxQtUiHandler::showInformationNote Exit") |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
392 |
} |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
393 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
394 |
// ---------------------------------------------------------------------------- |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
395 |
// VmbxQtUiHandler::updatePrimaryAction |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
396 |
// (show information note). |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
397 |
// ---------------------------------------------------------------------------- |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
398 |
// |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
399 |
void VmbxQtUiHandler::updatePrimaryAction(const QString &aInput) |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
400 |
{ |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
401 |
if (iQueryDialog) { |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
402 |
QAction *ok = iQueryDialog->actions().at(0); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
403 |
if (ok) { |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
404 |
if ( aInput.isEmpty() || aInput.contains(QRegExp("\\d\\d\\d"))){ |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
405 |
if (!ok->isEnabled()){ |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
406 |
ok->setEnabled(true); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
407 |
VMBLOGSTRING("VmbxQtUiHandler::updatePrimaryAction enable OK") |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
408 |
} |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
409 |
} else { |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
410 |
if (ok->isEnabled()){ |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
411 |
ok->setEnabled(false); |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
412 |
VMBLOGSTRING("VmbxQtUiHandler::updatePrimaryAction disable OK") |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
413 |
} |
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
414 |
} |
19
e44a8c097b15
Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
415 |
} |
27
7eb70891911c
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
416 |
} |
12
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
417 |
} |
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
418 |
|
ae8abd0db65c
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
419 |
//End of file |