33
|
1 |
|
|
2 |
/*
|
|
3 |
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
* All rights reserved.
|
|
5 |
* This component and the accompanying materials are made available
|
|
6 |
* under the terms of "Eclipse Public License v1.0"
|
|
7 |
* which accompanies this distribution, and is available
|
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
9 |
*
|
|
10 |
* Initial Contributors:
|
|
11 |
* Nokia Corporation - initial contribution.
|
|
12 |
*
|
|
13 |
* Contributors:
|
|
14 |
*
|
|
15 |
* Description: Methods for DmAdvancedView.
|
|
16 |
*
|
|
17 |
*/
|
38
|
18 |
#include <hbnamespace.h>
|
33
|
19 |
#include "dmadvancedview.h"
|
47
|
20 |
#include "dmfotaview.h"
|
36
|
21 |
#include "serversettingsview.h"
|
56
|
22 |
#include "customviewitem.h"
|
33
|
23 |
|
47
|
24 |
DmAdvancedView::DmAdvancedView(HbMainWindow *mainWindow,DMFotaView *mainView, DmInfo *info, QGraphicsItem *parent):HbView(parent),
|
33
|
25 |
bluetooth(":/icons/qgn_prop_sml_bt.svg"),
|
|
26 |
internet(":/icons/qgn_prop_sml_http.svg"),
|
|
27 |
defaultprofileicon(":/icons/qtg_large_avatar.svg")
|
|
28 |
{
|
47
|
29 |
qDebug("omadm DeviceManagerUi::DmAdvancedView >>");
|
33
|
30 |
iMainWindow = mainWindow;
|
|
31 |
serverSetView = NULL;
|
|
32 |
iMainView = mainView;
|
47
|
33 |
if(info==NULL)
|
|
34 |
{
|
|
35 |
dminfo = new DmInfo(this);
|
|
36 |
}
|
|
37 |
else
|
|
38 |
dminfo = info;
|
33
|
39 |
currentdefaultprofile = -1;
|
|
40 |
currentview = 0;
|
|
41 |
connectionRequested = false;
|
|
42 |
backbehaviorset = false;
|
38
|
43 |
currentselecteditem = -1;
|
47
|
44 |
qDebug("omadm DeviceManagerUi::DmAdvancedView >>");
|
33
|
45 |
}
|
|
46 |
|
|
47 |
DmAdvancedView::~DmAdvancedView()
|
|
48 |
{
|
|
49 |
qDebug("omadm DmAdvancedView::~DmAdvancedView");
|
|
50 |
if(docmlLoader)
|
|
51 |
delete docmlLoader;
|
|
52 |
if(dminfo)
|
|
53 |
delete dminfo;
|
|
54 |
qDebug("omadm DmAdvancedView::~DmAdvancedView end");
|
|
55 |
}
|
|
56 |
|
|
57 |
void DmAdvancedView::handleLongPress(HbAbstractViewItem* item , QPointF coOrdinates)
|
|
58 |
{
|
47
|
59 |
qDebug("omadm DeviceManagerUi::handleLongPress >>");
|
|
60 |
if(connectionRequested)
|
33
|
61 |
return;
|
38
|
62 |
if (item)
|
33
|
63 |
{
|
38
|
64 |
modelItem = model->itemFromIndex(item->modelIndex());
|
|
65 |
currentselecteditem = modelItem->row();
|
56
|
66 |
if(currentselecteditem == dminfo->profilescount())//Button item pressed
|
|
67 |
return;
|
38
|
68 |
HbMenu *csmenu = new HbMenu();
|
|
69 |
csmenu->setAttribute( Qt::WA_DeleteOnClose);
|
|
70 |
HbAction *defaultprofileAction = 0;
|
|
71 |
HbAction *deleteaction = 0;
|
|
72 |
HbAction *connectaction = 0;
|
|
73 |
if (!dminfo->Isdefaultprofile(currentselecteditem))
|
33
|
74 |
{
|
38
|
75 |
defaultprofileAction = csmenu->addAction(hbTrId(
|
|
76 |
"txt_device_update_menu_set_as_default"));
|
|
77 |
connect(defaultprofileAction, SIGNAL(triggered()), this,
|
|
78 |
SLOT(defaultMenuItemSelected()));
|
33
|
79 |
}
|
49
|
80 |
if (!dminfo->Isprofilelocked(currentselecteditem) &&
|
|
81 |
dminfo->isProfileDeleteAllowed(currentselecteditem) )
|
33
|
82 |
{
|
38
|
83 |
deleteaction = csmenu->addAction(hbTrId(
|
|
84 |
"txt_device_update_menu_delete"));
|
|
85 |
connect(deleteaction, SIGNAL(triggered()), this,
|
|
86 |
SLOT(deleteMenuItemSelected()));
|
33
|
87 |
}
|
38
|
88 |
connectaction = csmenu->addAction(hbTrId(
|
|
89 |
"txt_device_update_menu_connect"));
|
|
90 |
connect(connectaction, SIGNAL(triggered()), this,
|
|
91 |
SLOT(connectMenuItemSelected()));
|
|
92 |
csmenu->setPreferredPos(coOrdinates);
|
|
93 |
csmenu->open();
|
33
|
94 |
}
|
47
|
95 |
qDebug("omadm DeviceManagerUi::handleLongPress >>");
|
33
|
96 |
}
|
|
97 |
|
|
98 |
|
|
99 |
void DmAdvancedView::handleClicked(QModelIndex index)
|
|
100 |
{
|
47
|
101 |
qDebug("omadm DeviceManagerUi::handleClicked >>");
|
33
|
102 |
if(connectionRequested)
|
|
103 |
return;
|
56
|
104 |
int itemnum = 0;
|
38
|
105 |
QStandardItem *selectedItem = model->itemFromIndex(index);
|
56
|
106 |
itemnum = selectedItem->row();
|
|
107 |
if(itemnum == dminfo->profilescount())//Button item pressed
|
|
108 |
{
|
|
109 |
qDebug("omadm create new server profile button clicked");
|
|
110 |
return;
|
|
111 |
}
|
|
112 |
//Stop listening DB events for profile addition
|
|
113 |
dminfo->DisableDbNotifications(true);
|
33
|
114 |
if(itemnum >= 0 && !dminfo->Isprofilelocked(itemnum))
|
|
115 |
{
|
|
116 |
//read profile items
|
|
117 |
QStringList itemdata;
|
|
118 |
bool sessmode = 0;
|
|
119 |
QStringList iaplist;
|
|
120 |
int curriap = 0;
|
|
121 |
int portnum = 0;
|
|
122 |
bool nwauth = false ;
|
|
123 |
dminfo->getProfiledata(itemnum, itemdata, sessmode,iaplist,curriap,portnum, nwauth);
|
|
124 |
QString editserverprof(itemdata[0]);
|
|
125 |
if(!serverSetView)
|
|
126 |
{
|
|
127 |
serverSetView = new ServerSettingsView(iMainWindow, this , editserverprof);
|
|
128 |
}
|
|
129 |
else // view already created
|
|
130 |
{
|
|
131 |
//Just update the setting items as per this profile
|
|
132 |
serverSetView->makeviewItemsVisible(editserverprof);
|
|
133 |
}
|
|
134 |
serverSetView->setProfileValues(itemdata,sessmode,iaplist,curriap,portnum,nwauth);
|
|
135 |
iMainWindow->setCurrentView(serverSetView);
|
|
136 |
|
|
137 |
}
|
47
|
138 |
qDebug("omadm DeviceManagerUi::handleClicked >>");
|
33
|
139 |
}
|
|
140 |
|
|
141 |
bool DmAdvancedView::displayItems()
|
|
142 |
{
|
47
|
143 |
qDebug("omadm DeviceManagerUi::displayItems >>");
|
33
|
144 |
docmlLoader = new HbDocumentLoader;
|
|
145 |
bool ok ;
|
|
146 |
docmlLoader->load( DOCML_FILE_NAME, &ok );
|
|
147 |
if(ok)
|
|
148 |
{
|
|
149 |
if(iMainWindow->orientation() == Qt::Vertical)
|
|
150 |
docmlLoader->load( DOCML_FILE_NAME, PORTRAIT,&ok );
|
|
151 |
else
|
|
152 |
docmlLoader->load( DOCML_FILE_NAME, LANDSCAPE,&ok );
|
|
153 |
}
|
|
154 |
else
|
|
155 |
{
|
|
156 |
qDebug("omadm docml loading failed");
|
|
157 |
return ok;
|
|
158 |
}
|
|
159 |
if(ok)
|
|
160 |
{
|
|
161 |
connect(iMainWindow, SIGNAL(orientationChanged(Qt::Orientation)),
|
|
162 |
this, SLOT(reLayout(Qt::Orientation)));
|
|
163 |
viewwidget = qobject_cast<HbView *>(docmlLoader->findWidget( VIEW_NAME ) );
|
|
164 |
Q_ASSERT_X(viewwidget != 0, "OMADM View not found","Not found");
|
|
165 |
viewspecificmenu = new HbMenu();
|
|
166 |
help = viewspecificmenu->addAction(hbTrId("txt_common_menu_help"));
|
|
167 |
exit = viewspecificmenu->addAction(hbTrId("txt_common_menu_exit"));
|
|
168 |
connect(exit, SIGNAL(triggered()), QCoreApplication::instance(), SLOT(quit()));
|
|
169 |
setMenu(viewspecificmenu);
|
|
170 |
serversListGroup = qobject_cast<HbGroupBox *>(docmlLoader->findWidget( GROUP ) );
|
|
171 |
serversListGroup->setHeading(hbTrId("txt_device_update_setlabel_device_update_services"));
|
|
172 |
serversListGroup->setCollapsable( true );
|
|
173 |
connect(serversListGroup, SIGNAL(toggled(bool)), this, SLOT(serversListGroupClicked(bool)));
|
|
174 |
otherDetailsGroup = qobject_cast<HbGroupBox *>(docmlLoader->findWidget( OTHERDETAILSGROUP ) );
|
|
175 |
connect(otherDetailsGroup, SIGNAL(toggled(bool)), this, SLOT(otherDetailsGroupClicked(bool)));
|
|
176 |
otherDetailsGroup->setHeading(hbTrId("txt_device_update_setlabel_other_details"));
|
|
177 |
otherDetailsGroup->setCollapsable( true );
|
|
178 |
otherDetailsGroup->setCollapsed( true );
|
|
179 |
list = qobject_cast<HbListView *>(docmlLoader->findWidget( LIST_NAME ) );
|
56
|
180 |
|
|
181 |
list->listItemPrototype()->setGraphicsSize(HbListViewItem::LargeIcon);
|
|
182 |
list->listItemPrototype()->setSecondaryTextRowCount(1,2);
|
|
183 |
list->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
|
|
184 |
|
33
|
185 |
dminfo->refreshProfileList();
|
|
186 |
int IndicatorCount =dminfo->profilescount();
|
56
|
187 |
model = new QStandardItemModel();
|
|
188 |
QList<HbAbstractViewItem *> prototypes ;
|
|
189 |
prototypes.append(list->listItemPrototype());
|
|
190 |
CustomViewItem *prototype2 = new CustomViewItem(this,list);
|
|
191 |
prototypes.append(prototype2);
|
|
192 |
list->setItemPrototypes(prototypes);
|
|
193 |
list->setModel(model);
|
|
194 |
int i;
|
|
195 |
for (i = 0; IndicatorCount > 0 && i < IndicatorCount; ++i) {
|
33
|
196 |
QStringList liststr;
|
|
197 |
bool lock = false;
|
|
198 |
int icon = 0;
|
|
199 |
int ret = dminfo->profileinfo(i,liststr,icon, lock);
|
|
200 |
if(ret <= 0)
|
|
201 |
{
|
|
202 |
break;
|
|
203 |
}
|
|
204 |
QStandardItem* item ;
|
|
205 |
item = new QStandardItem();
|
|
206 |
HbIcon icon1;
|
|
207 |
icon1.setIconName(":/icons/qgn_prop_sml_http.svg");
|
|
208 |
HbIcon icon2;
|
|
209 |
icon2.setIconName(":/icons/qgn_prop_sml_bt.svg");
|
|
210 |
HbIcon icon3;
|
|
211 |
icon3.setIconName(":/icons/qgn_indi_sett_protected_add.svg");
|
|
212 |
HbIcon defaultprofile;
|
|
213 |
defaultprofile.setIconName(":/icons/qtg_large_avatar.svg");
|
|
214 |
QList<QVariant> Iconl;
|
|
215 |
if(icon == 0)//Internet
|
|
216 |
Iconl.insert(0,icon1);
|
|
217 |
else if(icon == 1)//Bluetooth
|
|
218 |
Iconl.insert(0,icon2);
|
|
219 |
else
|
|
220 |
{
|
|
221 |
Iconl.insert(0,defaultprofile);
|
|
222 |
currentdefaultprofile = i;
|
|
223 |
}
|
|
224 |
icon = 0;
|
|
225 |
if(lock)
|
|
226 |
{
|
|
227 |
Iconl.insert(1,icon3);
|
|
228 |
lock = false;
|
|
229 |
}
|
|
230 |
QVariant iconlist(Iconl);
|
|
231 |
iconlist.setValue(Iconl);
|
|
232 |
item->setData(liststr , Qt::DisplayRole);
|
|
233 |
item->setData(iconlist , Qt::DecorationRole);
|
|
234 |
model->setItem(i, item);
|
|
235 |
}
|
56
|
236 |
list->setItemRecycling(false);
|
|
237 |
QStandardItem* customitem = new QStandardItem();
|
|
238 |
customitem->setData(Hb::ItemType_Last + 1001,Hb::ItemTypeRole);
|
|
239 |
model->setItem(i, customitem);
|
33
|
240 |
connect(list, SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
|
|
241 |
this, SLOT(handleLongPress(HbAbstractViewItem*,QPointF)));
|
|
242 |
|
|
243 |
connect(list, SIGNAL(activated(QModelIndex)), this, SLOT(handleClicked(QModelIndex)));
|
|
244 |
|
|
245 |
qDebug("omadm launching other details list");
|
|
246 |
otherdetailslist = qobject_cast<HbListView *>(docmlLoader->findWidget( LISTOTHERDETAILS ) );
|
|
247 |
otherdetailslist->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
|
|
248 |
otherdetailslist->setLongPressEnabled(EFalse);
|
|
249 |
qDebug("omadm launching other details list done");
|
56
|
250 |
mainCalltoUpdateView();
|
33
|
251 |
label = qobject_cast<HbLabel *>(docmlLoader->findWidget(LABEL));
|
|
252 |
label->setPlainText(hbTrId("txt_device_update_subhead_advanced_device_updates"));
|
|
253 |
|
|
254 |
setWidget(viewwidget);
|
|
255 |
}
|
|
256 |
else
|
|
257 |
{
|
|
258 |
qDebug("omadm docml section loading failed");
|
|
259 |
}
|
47
|
260 |
qDebug("omadm DeviceManagerUi::displayItems >>");
|
33
|
261 |
return ok;
|
|
262 |
}
|
|
263 |
|
|
264 |
void DmAdvancedView::updateEarlierdefaultProfileIcon()
|
|
265 |
{
|
47
|
266 |
qDebug("omadm DeviceManagerUi::updateEarlierdefaultProfileIcon >>");
|
33
|
267 |
if(currentdefaultprofile >= 0)
|
|
268 |
{
|
38
|
269 |
QStandardItem *earlierDefaultProfile = model->item(currentdefaultprofile);
|
33
|
270 |
//Find the transport type & set the icon
|
|
271 |
int transporttype = 0;
|
|
272 |
dminfo->profileTransport(currentdefaultprofile,transporttype);
|
|
273 |
if(transporttype == 0)//Internet
|
|
274 |
{
|
38
|
275 |
earlierDefaultProfile->setIcon(internet);
|
33
|
276 |
}
|
|
277 |
else
|
|
278 |
{
|
38
|
279 |
earlierDefaultProfile->setIcon(bluetooth);
|
33
|
280 |
}
|
|
281 |
}
|
47
|
282 |
qDebug("omadm DeviceManagerUi::updateEarlierdefaultProfileIcon >>");
|
33
|
283 |
}
|
|
284 |
|
|
285 |
void DmAdvancedView::createNewProfile()
|
|
286 |
{
|
47
|
287 |
qDebug("omadm DeviceManagerUi::createNewProfile >>");
|
33
|
288 |
if(dminfo->createNewprofile())
|
|
289 |
{
|
|
290 |
//Open server settings view
|
|
291 |
QString newserverprof(hbTrId("txt_device_update_setlabel_new_server_profile"));
|
|
292 |
if(!serverSetView)
|
|
293 |
{
|
|
294 |
serverSetView = new ServerSettingsView(iMainWindow, this, newserverprof);
|
|
295 |
}
|
|
296 |
else // view already created
|
|
297 |
{
|
|
298 |
//Just update the setting items as per this profile
|
|
299 |
serverSetView->makeviewItemsVisible(newserverprof);
|
|
300 |
}
|
|
301 |
QStringList serveritems;
|
|
302 |
serveritems<< "" <<"" <<"" <<"" <<""<<""<<""<<"";
|
|
303 |
bool sessmode = true;
|
|
304 |
bool nauth = true;
|
|
305 |
QStringList apdata;
|
|
306 |
int currap =-1;
|
|
307 |
int destap = 0;
|
|
308 |
dminfo->getIaplist(apdata,currap,destap);
|
|
309 |
int portnum = 8080;
|
|
310 |
serverSetView->setProfileValues(serveritems,sessmode,apdata,currap,portnum,nauth);
|
|
311 |
iMainWindow->setCurrentView(serverSetView);
|
|
312 |
}
|
|
313 |
else // profile not getting created
|
|
314 |
{
|
|
315 |
qDebug("OMADM New server profile creation failed");
|
|
316 |
}
|
47
|
317 |
qDebug("omadm DeviceManagerUi::createNewProfile >>");
|
33
|
318 |
}
|
|
319 |
|
|
320 |
void DmAdvancedView::saveProfile(QStringList& itemdata, bool& sessmode, QString& currap,unsigned int& portnum, bool& nauth )
|
|
321 |
{
|
47
|
322 |
qDebug("omadm DeviceManagerUi::saveProfile >>");
|
33
|
323 |
dminfo->DisableDbNotifications(true);
|
|
324 |
dminfo->saveProfile(itemdata,sessmode,currap,portnum,nauth);
|
|
325 |
updateListview();
|
|
326 |
dminfo->DisableDbNotifications(false);
|
47
|
327 |
qDebug("omadm DeviceManagerUi::saveProfile >>");
|
33
|
328 |
}
|
|
329 |
|
|
330 |
void DmAdvancedView::updateListview()
|
|
331 |
{
|
47
|
332 |
qDebug("omadm DeviceManagerUi::updateListview >>");
|
33
|
333 |
model->clear();
|
|
334 |
int IndicatorCount =dminfo->profilescount();
|
56
|
335 |
int i;
|
|
336 |
for ( i = 0; IndicatorCount > 0 && i < IndicatorCount; ++i) {
|
33
|
337 |
QStringList liststr;
|
|
338 |
bool lock = false;
|
|
339 |
int icon = 0;
|
|
340 |
int ret = dminfo->profileinfo(i,liststr,icon, lock);
|
|
341 |
if(ret <= 0)
|
|
342 |
{
|
|
343 |
break;
|
|
344 |
}
|
|
345 |
QStandardItem* item ;
|
|
346 |
item = new QStandardItem();
|
|
347 |
HbIcon icon1;
|
|
348 |
icon1.setIconName(":/icons/qgn_prop_sml_http.svg");
|
|
349 |
HbIcon icon2;
|
|
350 |
icon2.setIconName(":/icons/qgn_prop_sml_bt.svg");
|
|
351 |
HbIcon icon3;
|
|
352 |
icon3.setIconName(":/icons/qgn_indi_sett_protected_add.svg");
|
|
353 |
HbIcon defaultprofile;
|
|
354 |
defaultprofile.setIconName(":/icons/qtg_large_avatar.svg");
|
|
355 |
QList<QVariant> Iconl;
|
|
356 |
if(icon == 0)//Internet
|
|
357 |
Iconl.insert(0,icon1);
|
|
358 |
else if(icon == 1)//Bluetooth
|
|
359 |
Iconl.insert(0,icon2);
|
|
360 |
else //Default profile
|
|
361 |
{
|
|
362 |
Iconl.insert(0,defaultprofile);
|
|
363 |
currentdefaultprofile = i;
|
|
364 |
}
|
|
365 |
icon = 0;
|
|
366 |
if(lock)
|
|
367 |
{
|
|
368 |
Iconl.insert(1,icon3);
|
|
369 |
lock = false;
|
|
370 |
}
|
|
371 |
QVariant iconlist(Iconl);
|
|
372 |
iconlist.setValue(Iconl);
|
|
373 |
item->setData(liststr , Qt::DisplayRole);
|
|
374 |
item->setData(iconlist , Qt::DecorationRole);
|
|
375 |
model->setItem(i, item);
|
|
376 |
}
|
56
|
377 |
QStandardItem* item = new QStandardItem();
|
|
378 |
item->setData(Hb::ItemType_Last + 1001,Hb::ItemTypeRole);
|
|
379 |
model->setItem(i, item);
|
33
|
380 |
}
|
|
381 |
|
|
382 |
void DmAdvancedView::serversListGroupClicked(bool state)
|
|
383 |
{
|
47
|
384 |
qDebug("omadm DeviceManagerUi::serversListGroupClicked >>");
|
33
|
385 |
Q_UNUSED(state);
|
|
386 |
if(serversListGroup->isCollapsed())
|
|
387 |
otherDetailsGroup->setCollapsed(false);
|
|
388 |
else
|
|
389 |
otherDetailsGroup->setCollapsed(true);
|
47
|
390 |
qDebug("omadm DeviceManagerUi::serversListGroupClicked >>");
|
33
|
391 |
}
|
|
392 |
|
|
393 |
void DmAdvancedView::otherDetailsGroupClicked(bool state)
|
|
394 |
{
|
47
|
395 |
qDebug("omadm DeviceManagerUi::otherDetailsGroupClicked >>");
|
33
|
396 |
Q_UNUSED(state);
|
|
397 |
if(otherDetailsGroup->isCollapsed())
|
|
398 |
serversListGroup->setCollapsed(false);
|
|
399 |
else
|
|
400 |
serversListGroup->setCollapsed(true);
|
47
|
401 |
qDebug("omadm DeviceManagerUi::otherDetailsGroupClicked >>");
|
33
|
402 |
}
|
|
403 |
|
|
404 |
bool DmAdvancedView::checkServerId(QString& serverid)
|
|
405 |
{
|
47
|
406 |
qDebug("omadm DeviceManagerUi::CheckforUpdate >>");
|
33
|
407 |
return dminfo->checksrvid(serverid);
|
47
|
408 |
qDebug("omadm DeviceManagerUi::CheckforUpdate >>");
|
33
|
409 |
}
|
|
410 |
|
|
411 |
void DmAdvancedView::reLayout(Qt::Orientation orientation)
|
47
|
412 |
{
|
|
413 |
qDebug("OMADM servers view DmAdvancedView::reLayout <<");
|
33
|
414 |
if(orientation == Qt::Horizontal)
|
|
415 |
{
|
|
416 |
qDebug("OMADM servers view landscape");
|
|
417 |
docmlLoader->load(DOCML_FILE_NAME,LANDSCAPE);
|
|
418 |
}
|
|
419 |
else
|
|
420 |
{
|
|
421 |
qDebug("OMADM servers view portrait");
|
|
422 |
bool ok;
|
|
423 |
docmlLoader->load( DOCML_FILE_NAME, PORTRAIT, &ok );
|
|
424 |
}
|
47
|
425 |
qDebug("OMADM servers view DmAdvancedView::reLayout >>");
|
33
|
426 |
}
|
|
427 |
|
|
428 |
void DmAdvancedView::setBackBehavior()
|
|
429 |
{
|
47
|
430 |
qDebug("OMADM servers view DmAdvancedView::setBackBehavior <<");
|
33
|
431 |
if (!backbehaviorset)
|
|
432 |
{
|
|
433 |
qDebug("OMADM servers view back behavior setting");
|
|
434 |
backaction = new HbAction(Hb::BackNaviAction, this);
|
|
435 |
connect(backaction, SIGNAL(triggered()), this,
|
|
436 |
SLOT(backButtonClicked()));
|
|
437 |
setNavigationAction(backaction);
|
|
438 |
backbehaviorset = true;
|
|
439 |
}
|
47
|
440 |
qDebug("OMADM servers view back behavior setting done setBackBehavior >>");
|
33
|
441 |
}
|
|
442 |
|
|
443 |
void DmAdvancedView::backButtonClicked()
|
|
444 |
{
|
47
|
445 |
qDebug("OMADM servers view DmAdvancedView::backButtonClicked <<");
|
33
|
446 |
QList <HbView*> views = iMainWindow->views();
|
|
447 |
if(iMainWindow->orientation()==Qt::Vertical)
|
|
448 |
{
|
|
449 |
iMainWindow->setCurrentView(views[0]);
|
|
450 |
}
|
|
451 |
else
|
|
452 |
{
|
|
453 |
iMainWindow->setCurrentView(views[1]);
|
|
454 |
}
|
47
|
455 |
qDebug("OMADM servers view DmAdvancedView::backButtonClicked >>");
|
33
|
456 |
}
|
|
457 |
|
47
|
458 |
void DmAdvancedView::addVersionInfo()
|
|
459 |
{
|
|
460 |
qDebug("OMADM servers view DmAdvancedView::addVersionInfo <<");
|
33
|
461 |
QStringList liststr;
|
|
462 |
QStandardItem* item;
|
|
463 |
QString val;
|
|
464 |
QString str;
|
47
|
465 |
TInt runtimesupport(0);
|
|
466 |
CRepository* cenrep = NULL;
|
|
467 |
TRAPD( error, cenrep = CRepository::NewL( KCRUidNSmlDMSyncApp ) );
|
|
468 |
if(error)
|
|
469 |
{
|
|
470 |
FLOG( "[OMADM] CNSmlDMFotaContainer::FormatListboxL() cenrep problem" );
|
|
471 |
}
|
|
472 |
if ( cenrep )
|
|
473 |
{
|
|
474 |
cenrep->Get( KNsmlDmRuntimeVerSupport, runtimesupport );
|
|
475 |
delete cenrep; cenrep = NULL;
|
|
476 |
}
|
|
477 |
//Browser version
|
|
478 |
Swi::RSisRegistrySession sisses ;
|
|
479 |
TInt r( sisses.Connect() );
|
|
480 |
CleanupClosePushL( sisses );
|
|
481 |
if (r== KErrNone && runtimesupport)
|
|
482 |
{
|
|
483 |
Swi::RSisRegistryEntry sientry;
|
|
484 |
TInt oerr = sientry.Open(sisses, browseruid);
|
|
485 |
TVersion bversion;
|
|
486 |
TBuf <255> browserversion;
|
|
487 |
if(oerr == KErrNone)
|
|
488 |
{
|
|
489 |
TRAPD(err2,bversion= sientry.VersionL());
|
|
490 |
if (err2 == KErrNone)
|
|
491 |
{
|
|
492 |
browserversion.AppendNum(bversion.iMajor);
|
|
493 |
browserversion.Append(_L("."));
|
|
494 |
browserversion.AppendNum(bversion.iMinor);
|
|
495 |
if( browserversion.Length()>0 )
|
|
496 |
{
|
|
497 |
str = QString::fromUtf16(browserversion.Ptr(), browserversion.Length());
|
|
498 |
item = new QStandardItem();
|
|
499 |
val = hbTrId("txt_device_update_dblist_browser_version");
|
|
500 |
liststr.clear();
|
|
501 |
liststr << val;
|
|
502 |
liststr << str;
|
|
503 |
item->setData(liststr , Qt::DisplayRole);
|
|
504 |
//m_otherdetailsmodel->setItem(i++, item);
|
|
505 |
m_otherdetailsmodel->appendRow(item);
|
|
506 |
}
|
|
507 |
}
|
|
508 |
}
|
|
509 |
}
|
|
510 |
|
|
511 |
//flash version
|
|
512 |
if (r== KErrNone&& runtimesupport)
|
|
513 |
{
|
|
514 |
Swi::RSisRegistryEntry sientry;
|
|
515 |
TInt oerr = sientry.Open(sisses, flashuid);
|
|
516 |
TVersion fversion;
|
|
517 |
TBuf <255> flashversion;
|
|
518 |
if(oerr == KErrNone)
|
|
519 |
{
|
|
520 |
TRAPD(err2,fversion= sientry.VersionL());
|
|
521 |
if (err2 == KErrNone)
|
|
522 |
{
|
|
523 |
flashversion.AppendNum(fversion.iMajor);
|
|
524 |
flashversion.Append(_L("."));
|
|
525 |
flashversion.AppendNum(fversion.iMinor);
|
|
526 |
if( flashversion.Length()>0 )
|
|
527 |
{
|
|
528 |
str = QString::fromUtf16(flashversion.Ptr(), flashversion.Length());
|
|
529 |
item = new QStandardItem();
|
|
530 |
val = hbTrId("txt_device_update_dblist_flash_version");
|
|
531 |
liststr.clear();
|
|
532 |
liststr << val;
|
|
533 |
liststr << str;
|
|
534 |
item->setData(liststr , Qt::DisplayRole);
|
|
535 |
//m_otherdetailsmodel->setItem(i++, item);
|
|
536 |
m_otherdetailsmodel->appendRow(item);
|
|
537 |
}
|
|
538 |
}
|
|
539 |
}
|
|
540 |
}
|
|
541 |
|
|
542 |
if (r== KErrNone&& runtimesupport)
|
|
543 |
{
|
|
544 |
Swi::RSisRegistryEntry sientry;
|
|
545 |
TInt oerr = sientry.Open(sisses, javauid);
|
|
546 |
TVersion jversion;
|
|
547 |
TBuf <255> javaversion;
|
|
548 |
if(oerr == KErrNone)
|
|
549 |
{
|
|
550 |
TRAPD(err2,jversion= sientry.VersionL());
|
|
551 |
if (err2 == KErrNone)
|
|
552 |
{
|
|
553 |
javaversion.AppendNum(jversion.iMajor);
|
|
554 |
javaversion.Append(_L("."));
|
|
555 |
javaversion.AppendNum(jversion.iMinor);
|
|
556 |
if( javaversion.Length()>0 )
|
|
557 |
{
|
|
558 |
str = QString::fromUtf16(javaversion.Ptr(), javaversion.Length());
|
|
559 |
item = new QStandardItem();
|
|
560 |
val = hbTrId("txt_device_update_dblist_java_version");
|
|
561 |
liststr.clear();
|
|
562 |
liststr << val;
|
|
563 |
liststr << str;
|
|
564 |
item->setData(liststr , Qt::DisplayRole);
|
|
565 |
m_otherdetailsmodel->appendRow(item);
|
|
566 |
}
|
|
567 |
}
|
|
568 |
}
|
|
569 |
}
|
|
570 |
CleanupStack::PopAndDestroy(1);
|
|
571 |
qDebug("OMADM servers view DmAdvancedView::addVersionInfo >>");
|
|
572 |
}
|
|
573 |
|
|
574 |
void DmAdvancedView::addOtherDetails()
|
33
|
575 |
{
|
47
|
576 |
qDebug("OMADM servers view DmAdvancedView::addOtherDetails >>");
|
|
577 |
TRequestStatus status;
|
|
578 |
QStringList liststr;
|
|
579 |
QStandardItem* item;
|
|
580 |
QString val;
|
|
581 |
QString str;
|
|
582 |
TInt error(iServer.Connect());
|
|
583 |
if ( error != KErrNone )
|
|
584 |
return;
|
|
585 |
iServer.GetPhoneInfo(0, info);
|
|
586 |
error = imobPhone.Open(iServer, info.iName);
|
|
587 |
if ( error != KErrNone )
|
|
588 |
{
|
|
589 |
iServer.Close();
|
|
590 |
return;
|
|
591 |
}
|
|
592 |
//Bands supported
|
|
593 |
|
|
594 |
RMobilePhone::TMobilePhoneNetworkInfoV1 nwInfov1;
|
|
595 |
RMobilePhone::TMobilePhoneNetworkInfoV1Pckg nwInfov1Pckg(nwInfov1);
|
|
596 |
imobPhone.GetCurrentNetwork(status, nwInfov1Pckg);
|
|
597 |
User::WaitForRequest( status );
|
|
598 |
status = KRequestPending;
|
|
599 |
nwInfov1 = nwInfov1Pckg();
|
|
600 |
NetworkBand(nwInfov1.iBandInfo, str);
|
|
601 |
item = new QStandardItem();
|
62
|
602 |
val = hbTrId("txt_deviceupdate_dblist_network_band_supported");
|
47
|
603 |
liststr.clear();
|
|
604 |
liststr << val;
|
|
605 |
liststr << str;
|
|
606 |
item->setData(liststr , Qt::DisplayRole);
|
|
607 |
m_otherdetailsmodel->appendRow(item);
|
|
608 |
|
|
609 |
//Packet Service
|
|
610 |
|
|
611 |
TInt packetsrvc =0;
|
|
612 |
RMobilePhone::TMobilePhoneNetworkInfoV5 nwInfov5;
|
|
613 |
RMobilePhone::TMobilePhoneNetworkInfoV5Pckg nwInfov5Pckg(nwInfov5);
|
|
614 |
imobPhone.GetCurrentNetwork( status, nwInfov5Pckg );
|
33
|
615 |
User::WaitForRequest( status );
|
|
616 |
status = KRequestPending;
|
47
|
617 |
nwInfov5 = nwInfov5Pckg();
|
|
618 |
|
|
619 |
if(nwInfov5.iHsdpaAvailableIndicator) packetsrvc =1;
|
|
620 |
|
|
621 |
if(nwInfov5.iEgprsAvailableIndicator) packetsrvc =2;
|
|
622 |
|
|
623 |
if(!packetsrvc)
|
33
|
624 |
{
|
47
|
625 |
RMobilePhone::TMobilePhoneNetworkInfoV8 nwInfov8;
|
|
626 |
RMobilePhone::TMobilePhoneNetworkInfoV8Pckg nwInfov8Pckg(nwInfov8);
|
|
627 |
imobPhone.GetCurrentNetwork( status, nwInfov8Pckg );
|
|
628 |
User::WaitForRequest( status );
|
|
629 |
status = KRequestPending;
|
|
630 |
nwInfov8 = nwInfov8Pckg();
|
|
631 |
if(nwInfov8.iHsupaAvailableIndicator) packetsrvc =3;
|
|
632 |
}
|
|
633 |
liststr.clear();
|
62
|
634 |
val = hbTrId("txt_deviceupdate_dblist_data_service_supported");
|
47
|
635 |
liststr << val;
|
|
636 |
item = new QStandardItem();
|
|
637 |
PacketService(packetsrvc, str);
|
|
638 |
liststr << str;
|
|
639 |
item->setData(liststr , Qt::DisplayRole);
|
|
640 |
m_otherdetailsmodel->appendRow(item);
|
|
641 |
|
|
642 |
// Ciphering
|
|
643 |
|
|
644 |
liststr.clear();
|
|
645 |
item = new QStandardItem();
|
62
|
646 |
val = hbTrId("txt_deviceupdate_dblist_network_security_level");
|
47
|
647 |
liststr << val;
|
|
648 |
imobPhone.GetNetworkSecurityLevel(status,idispSecurity);
|
|
649 |
User::WaitForRequest( status );
|
|
650 |
NetworkCiphering(idispSecurity, str);
|
|
651 |
liststr << str;
|
|
652 |
item->setData(liststr, Qt::DisplayRole);
|
|
653 |
m_otherdetailsmodel->appendRow(item);
|
|
654 |
|
|
655 |
// WLAN MAC
|
|
656 |
|
67
|
657 |
TBuf8<KWlanMacAddrLength> address;
|
|
658 |
// Fetch WLAN MAC address
|
|
659 |
RProperty::Get(KPSUidWlan,KPSWlanMacAddress,address);
|
|
660 |
TBuf<KWlanMacAddrLength> wlanMACAddress;
|
|
661 |
for ( TInt i = 0; i < address.Length(); i++ )
|
|
662 |
{
|
|
663 |
TUint16 addbyte = address[i];
|
|
664 |
wlanMACAddress.AppendFormat(_L("%02X:"), addbyte);
|
|
665 |
}
|
|
666 |
if ( wlanMACAddress.Length() ) // remove trailing ':'
|
|
667 |
{
|
|
668 |
wlanMACAddress.Delete(wlanMACAddress.Length()-1, 1);
|
|
669 |
}
|
47
|
670 |
liststr.clear();
|
|
671 |
item = new QStandardItem();
|
|
672 |
val = hbTrId("txt_device_update_dblist_wlan_mac_address");
|
|
673 |
liststr << val;
|
|
674 |
str = QString::fromUtf16(wlanMACAddress.Ptr(), wlanMACAddress.Length());
|
|
675 |
liststr << str;
|
|
676 |
item->setData(liststr, Qt::DisplayRole);
|
|
677 |
m_otherdetailsmodel->appendRow(item);
|
|
678 |
|
|
679 |
// BT MAC
|
|
680 |
|
|
681 |
TBuf<KBTAddrLength> addressBuffer;
|
|
682 |
// Fetch from Cenrep
|
|
683 |
CRepository* repository = NULL;
|
|
684 |
TRAPD( err, repository = CRepository::NewL( KCRUidBluetoothLocalDeviceAddress ) );
|
|
685 |
if ( err == KErrNone )
|
|
686 |
{
|
|
687 |
qDebug("KCRUidBluetoothLocalDeviceAddress errnone");
|
|
688 |
err = repository->Get( KBTLocalDeviceAddress, addressBuffer );
|
|
689 |
|
|
690 |
if (err == KErrNone)
|
|
691 |
qDebug("KBTLocalDeviceAddress errnone");
|
|
692 |
else
|
|
693 |
qDebug("KBTLocalDeviceAddress Error");
|
|
694 |
|
|
695 |
delete repository;
|
|
696 |
}
|
|
697 |
else
|
|
698 |
{
|
|
699 |
qDebug("KCRUidBluetoothLocalDeviceAddress Error openin cenrep");
|
33
|
700 |
}
|
47
|
701 |
liststr.clear();
|
|
702 |
val = hbTrId("txt_device_update_dblist_bt_mac_address");
|
|
703 |
liststr << val;
|
|
704 |
item = new QStandardItem();
|
|
705 |
str = QString::fromUtf16(addressBuffer.Ptr(), addressBuffer.Length());
|
|
706 |
liststr << str;
|
|
707 |
item->setData(liststr , Qt::DisplayRole);
|
|
708 |
m_otherdetailsmodel->appendRow(item);
|
|
709 |
|
|
710 |
imobPhone.Close();
|
|
711 |
iServer.Close();
|
|
712 |
|
|
713 |
}
|
|
714 |
void DmAdvancedView::mainCalltoUpdateView()
|
|
715 |
{
|
|
716 |
qDebug("OMADM servers view DmAdvancedView::mainCalltoUpdateView >>");
|
|
717 |
m_otherdetailsmodel = new QStandardItemModel();
|
|
718 |
TInt i=0;
|
|
719 |
|
|
720 |
QStringList liststr;
|
|
721 |
QStandardItem* item;
|
|
722 |
QString val;
|
|
723 |
QString str;
|
|
724 |
//1. Device Updated
|
|
725 |
|
|
726 |
|
|
727 |
addVersionInfo();
|
|
728 |
|
|
729 |
addOtherDetails();
|
|
730 |
|
|
731 |
//sw version date
|
|
732 |
TBuf< KSysUtilVersionTextLength > swversiondate;
|
|
733 |
TBuf< KSysUtilVersionTextLength > version;
|
|
734 |
version.Zero();
|
|
735 |
swversiondate.Zero();
|
|
736 |
if( SysUtil::GetSWVersion(version)==KErrNone)
|
33
|
737 |
{
|
47
|
738 |
TInt len= version.Length();
|
|
739 |
TInt pos1 = version.Find(KSmlEOL);
|
|
740 |
if( pos1 != KErrNotFound && len > pos1 )
|
|
741 |
{
|
|
742 |
TBuf<KSysUtilVersionTextLength> version1;
|
|
743 |
version1.Zero();
|
|
744 |
version1.Append( version.Right( len-pos1-1 ));
|
|
745 |
len= version1.Length();
|
|
746 |
pos1 = version1.Find(KSmlEOL);
|
|
747 |
if( pos1 != KErrNotFound && len > pos1 )
|
|
748 |
{
|
|
749 |
swversiondate.Append(version1.Left( pos1 ));
|
|
750 |
}
|
|
751 |
}
|
|
752 |
val = hbTrId("txt_device_update_dblist_sw_version_date");
|
|
753 |
item = new QStandardItem();
|
|
754 |
str = QString::fromUtf16(swversiondate.Ptr(), swversiondate.Length());
|
|
755 |
liststr.clear();
|
|
756 |
liststr << val;
|
|
757 |
liststr << str;
|
|
758 |
item->setData(liststr , Qt::DisplayRole);
|
|
759 |
m_otherdetailsmodel->appendRow(item);
|
|
760 |
}
|
|
761 |
|
|
762 |
//Custom version and date
|
|
763 |
//SysVersionInfo::TVersionInfoType x = SysVersionInfo::EOPVersion;
|
|
764 |
TBuf< KNSmlMaxTextLength64 > customsw;
|
|
765 |
TBuf< KNSmlMaxTextLength64 > customswdate;
|
|
766 |
version.Zero();
|
|
767 |
if( SysVersionInfo::GetVersionInfo(SysVersionInfo::EOPVersion,version) == KErrNone )
|
|
768 |
{
|
|
769 |
TInt len= version.Length();
|
|
770 |
TInt pos1 = version.Find(KSmlEOL);
|
|
771 |
if( pos1 != KErrNotFound && len > pos1 )
|
|
772 |
{
|
|
773 |
customsw.Append( version.Left(pos1));
|
|
774 |
customswdate.Append( version.Right( len-pos1-1 ));
|
|
775 |
}
|
|
776 |
}
|
|
777 |
|
|
778 |
if(customsw.Length()>0)
|
|
779 |
{
|
|
780 |
str = QString::fromUtf16(customsw.Ptr(), customsw.Length());
|
|
781 |
item = new QStandardItem();
|
|
782 |
val = hbTrId("txt_device_update_dblist_custom_version");
|
|
783 |
liststr.clear();
|
|
784 |
liststr << val;
|
|
785 |
liststr << str;
|
|
786 |
item->setData(liststr , Qt::DisplayRole);
|
|
787 |
m_otherdetailsmodel->appendRow(item);
|
33
|
788 |
}
|
47
|
789 |
if(customswdate.Length()>0)
|
|
790 |
{
|
|
791 |
str = QString::fromUtf16(customswdate.Ptr(), customswdate.Length());
|
|
792 |
item = new QStandardItem();
|
|
793 |
val = hbTrId("txt_device_update_dblist_custom_version_date");
|
|
794 |
liststr.clear();
|
|
795 |
liststr << val;
|
|
796 |
liststr << str;
|
|
797 |
item->setData(liststr , Qt::DisplayRole);
|
|
798 |
m_otherdetailsmodel->appendRow(item);
|
|
799 |
}
|
|
800 |
|
43
|
801 |
TBuf<KSysUtilVersionTextLength> Langversion;
|
|
802 |
TBuf<KSysUtilVersionTextLength> lversion;
|
47
|
803 |
if( SysUtil::GetLangVersion(Langversion ) == KErrNone )
|
|
804 |
{
|
|
805 |
str = QString::fromUtf16(Langversion.Ptr(), Langversion.Length());
|
|
806 |
item = new QStandardItem();
|
|
807 |
val = hbTrId("txt_device_update_dblist_language_set");
|
|
808 |
liststr.clear();
|
|
809 |
liststr << val;
|
|
810 |
liststr << str;
|
|
811 |
item->setData(liststr , Qt::DisplayRole);
|
|
812 |
m_otherdetailsmodel->appendRow(item);
|
|
813 |
}
|
|
814 |
|
43
|
815 |
|
47
|
816 |
//lang variant version
|
43
|
817 |
Langversion.Zero();
|
|
818 |
if( SysUtil::GetLangSWVersion(Langversion ) == KErrNone )
|
|
819 |
{
|
|
820 |
int len = Langversion.Length();
|
|
821 |
TInt pos1 = Langversion.Find( KSmlEOL );
|
|
822 |
if( pos1 != KErrNotFound && len > pos1 )
|
|
823 |
{
|
|
824 |
lversion.Zero();
|
|
825 |
lversion.Append( Langversion.Left( pos1 ) );
|
|
826 |
}
|
|
827 |
str = QString::fromUtf16(lversion.Ptr(), lversion.Length());
|
|
828 |
item = new QStandardItem();
|
|
829 |
val = hbTrId("txt_device_update_dblist_language_variant_version");
|
|
830 |
liststr.clear();
|
|
831 |
liststr << val;
|
|
832 |
liststr << str;
|
|
833 |
item->setData(liststr , Qt::DisplayRole);
|
47
|
834 |
m_otherdetailsmodel->appendRow(item);
|
43
|
835 |
}
|
47
|
836 |
|
|
837 |
otherdetailslist->setModel(m_otherdetailsmodel);
|
|
838 |
qDebug("OMADM servers view DmAdvancedView::mainCalltoUpdateView <<");
|
33
|
839 |
|
|
840 |
}
|
|
841 |
|
|
842 |
void DmAdvancedView::PacketService(TInt val, QString& string)
|
|
843 |
{
|
47
|
844 |
qDebug("OMADM servers view DmAdvancedView::PacketService >>");
|
33
|
845 |
switch (val)
|
|
846 |
{
|
|
847 |
case (0):
|
62
|
848 |
string = hbTrId("txt_deviceupdate_dblist_data_srvce_suppo_val_GPRS");
|
33
|
849 |
break;
|
|
850 |
case (1):
|
62
|
851 |
string = hbTrId("txt_deviceupdate_dblist_data_srvce_suppo_val_HSDPA");
|
33
|
852 |
break;
|
|
853 |
case (2):
|
62
|
854 |
string = hbTrId("txt_deviceupdate_dblist_data_srvce_suppo_val_HSUPA");
|
33
|
855 |
break;
|
|
856 |
case (3):
|
62
|
857 |
string = hbTrId("txt_deviceupdate_dblist_data_srvce_suppo_val_EGPRS");
|
33
|
858 |
break;
|
|
859 |
case (4):
|
62
|
860 |
string = hbTrId("txt_deviceupdate_dblist_ntwrk_secu_lvl_val_CDMA");
|
33
|
861 |
break;
|
|
862 |
case (5):
|
|
863 |
default :
|
62
|
864 |
string = hbTrId("txt_deviceupdate_dblist_data_srvce_suppo_val_Unknow");
|
33
|
865 |
break;
|
|
866 |
}
|
47
|
867 |
qDebug("OMADM servers view DmAdvancedView::PacketService <<");
|
33
|
868 |
}
|
|
869 |
|
|
870 |
|
|
871 |
void DmAdvancedView::NetworkCiphering(RMobilePhone::TMobilePhoneNetworkSecurity val, QString& string)
|
|
872 |
{
|
47
|
873 |
qDebug("OMADM servers view DmAdvancedView::NetworkCiphering >>");
|
33
|
874 |
switch (val)
|
|
875 |
{
|
|
876 |
case (RMobilePhone::ECipheringGSM):
|
62
|
877 |
string = hbTrId("txt_deviceupdate_dblist_ntwrk_secu_lvl_val_GSM");
|
33
|
878 |
break;
|
|
879 |
case (RMobilePhone::ECipheringWCDMA):
|
62
|
880 |
string = hbTrId("txt_deviceupdate_dblist_ntwrk_secu_lvl_val_WCDMA");
|
33
|
881 |
break;
|
|
882 |
case (RMobilePhone::ECipheringCDMA):
|
62
|
883 |
string = hbTrId("txt_deviceupdate_dblist_ntwrk_secu_lvl_val_CDMA");
|
33
|
884 |
break;
|
|
885 |
case (RMobilePhone::ECipheringOff):
|
|
886 |
default :
|
62
|
887 |
string = hbTrId("txt_deviceupdate_dblist_ntwrk_secu_lvl_val_none");
|
33
|
888 |
break;
|
|
889 |
}
|
47
|
890 |
qDebug("OMADM servers view DmAdvancedView::NetworkCiphering <<");
|
33
|
891 |
}
|
|
892 |
|
|
893 |
void DmAdvancedView::NetworkBand(RMobilePhone::TMobilePhoneNetworkBandInfo val, QString& string)
|
|
894 |
{
|
47
|
895 |
qDebug("OMADM servers view DmAdvancedView::NetworkBand >>");
|
33
|
896 |
switch (val)
|
|
897 |
{
|
|
898 |
case (RMobilePhone::E800BandA):
|
62
|
899 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__800BA");
|
33
|
900 |
break;
|
|
901 |
case (RMobilePhone::E800BandB):
|
62
|
902 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__800BB");
|
33
|
903 |
break;
|
|
904 |
case (RMobilePhone::E800BandC):
|
62
|
905 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__800BC");
|
33
|
906 |
break;
|
|
907 |
case (RMobilePhone::E1900BandA):
|
62
|
908 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__1900BA");
|
33
|
909 |
break;
|
|
910 |
case (RMobilePhone::E1900BandB):
|
62
|
911 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__1900BB");
|
33
|
912 |
break;
|
|
913 |
case (RMobilePhone::E1900BandC):
|
62
|
914 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__1900BC");
|
33
|
915 |
break;
|
|
916 |
case (RMobilePhone::E1900BandD):
|
62
|
917 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__1900BD");
|
33
|
918 |
break;
|
|
919 |
case (RMobilePhone::E1900BandE):
|
62
|
920 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__1900BE");
|
33
|
921 |
break;
|
|
922 |
case (RMobilePhone::E1900BandF):
|
62
|
923 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val__1900BF");
|
33
|
924 |
break;
|
|
925 |
case (RMobilePhone::EBandUnknown):
|
|
926 |
default :
|
62
|
927 |
string = hbTrId("txt_deviceupdate_dblist_netwrk_bnd_spp_val_unknown");
|
33
|
928 |
break;
|
|
929 |
}
|
47
|
930 |
qDebug("OMADM servers view DmAdvancedView::NetworkBand <<");
|
33
|
931 |
}
|
|
932 |
|
|
933 |
void DmAdvancedView::syncCompleted(int jobstatus)
|
|
934 |
{
|
47
|
935 |
qDebug("OMADM servers view DmAdvancedView::syncCompleted >>");
|
33
|
936 |
Q_UNUSED(jobstatus);
|
|
937 |
connectionRequested = false;
|
|
938 |
updateListview();
|
47
|
939 |
iMainView->enableButtons();
|
|
940 |
qDebug("OMADM servers view DmAdvancedView::syncCompleted <<");
|
33
|
941 |
}
|
|
942 |
|
38
|
943 |
void DmAdvancedView::defaultMenuItemSelected()
|
|
944 |
{
|
47
|
945 |
qDebug("OMADM servers view DmAdvancedView::defaultMenuItemSelected >>");
|
38
|
946 |
dminfo->setDefaultProfile(currentselecteditem);
|
|
947 |
updateEarlierdefaultProfileIcon();
|
|
948 |
modelItem->setIcon(defaultprofileicon);
|
|
949 |
currentdefaultprofile = currentselecteditem;
|
47
|
950 |
qDebug("OMADM servers view DmAdvancedView::defaultMenuItemSelected <<");
|
38
|
951 |
}
|
|
952 |
|
|
953 |
void DmAdvancedView::deleteMenuItemSelected()
|
|
954 |
{
|
47
|
955 |
qDebug("OMADM servers view DmAdvancedView::deleteMenuItemSelected >>");
|
38
|
956 |
dminfo->DisableDbNotifications(true);
|
|
957 |
//check currentdefaultprofile is current item
|
|
958 |
if(currentselecteditem == currentdefaultprofile) // deleting default profile
|
|
959 |
currentdefaultprofile = -1;
|
|
960 |
if(dminfo->DeleteProfile(currentselecteditem) >=0 )
|
|
961 |
{
|
|
962 |
//Update the profile list
|
|
963 |
model->removeRow(currentselecteditem);
|
|
964 |
}
|
|
965 |
dminfo->DisableDbNotifications(false);
|
47
|
966 |
qDebug("OMADM servers view DmAdvancedView::deleteMenuItemSelected <<");
|
38
|
967 |
}
|
|
968 |
|
|
969 |
void DmAdvancedView::connectMenuItemSelected()
|
|
970 |
{
|
47
|
971 |
qDebug("OMADM servers view DmAdvancedView::connectMenuItemSelected >>");
|
|
972 |
iMainView->displayNoteAndDisableButtons();
|
|
973 |
backButtonClicked();
|
|
974 |
dminfo->synchronize(currentselecteditem);
|
38
|
975 |
connectionRequested = true;
|
47
|
976 |
qDebug("OMADM servers view DmAdvancedView::connectMenuItemSelected <<");
|
38
|
977 |
}
|
|
978 |
|