deviceupdatesui/deviceupdates/src/dmadvancedview.cpp
author hgs
Fri, 19 Mar 2010 04:28:07 +0530
changeset 33 7464c1e21dae
child 36 9eefb50e711a
permissions -rw-r--r--
201008_internal
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     1
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     2
/*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     3
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     4
* All rights reserved.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     5
* This component and the accompanying materials are made available
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     6
* under the terms of "Eclipse Public License v1.0"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     7
* which accompanies this distribution, and is available
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     8
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     9
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    10
* Initial Contributors:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    11
* Nokia Corporation - initial contribution.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    12
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    13
* Contributors:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    14
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    15
* Description:  Methods for DmAdvancedView.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    16
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    17
*/
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    18
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    19
#include "dmadvancedview.h"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    20
#include "ServerSettingsView.h"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    21
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    22
DmAdvancedView::DmAdvancedView(HbMainWindow *mainWindow, HbView *mainView, QGraphicsItem *parent):HbView(parent),
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    23
    bluetooth(":/icons/qgn_prop_sml_bt.svg"),
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    24
    internet(":/icons/qgn_prop_sml_http.svg"), 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    25
    defaultprofileicon(":/icons/qtg_large_avatar.svg")                
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    26
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    27
    iMainWindow = mainWindow;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    28
    serverSetView = NULL;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    29
    iMainView = mainView;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    30
    dminfo = new DmInfo(this);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    31
    currentdefaultprofile = -1;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    32
    currentview = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    33
    connectionRequested = false;    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    34
    backbehaviorset = false;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    35
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    36
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    37
DmAdvancedView::~DmAdvancedView()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    38
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    39
    qDebug("omadm DmAdvancedView::~DmAdvancedView");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    40
    if(docmlLoader)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    41
        delete docmlLoader;  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    42
    if(dminfo)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    43
        delete dminfo;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    44
    qDebug("omadm DmAdvancedView::~DmAdvancedView end"); 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    45
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    46
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    47
void DmAdvancedView::handleLongPress(HbAbstractViewItem* item , QPointF coOrdinates)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    48
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    49
    if(connectionRequested)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    50
        return;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    51
    int itemnum = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    52
    if (item) 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    53
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    54
    QStandardItem *modelItem = model->itemFromIndex(item->modelIndex());
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    55
    itemnum = modelItem->row();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    56
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    57
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    58
    csmenu = new HbMenu();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    59
    HbAction *defaultprofileAction = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    60
    HbAction *deleteaction= 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    61
    HbAction *connectaction= 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    62
    if(!dminfo->Isdefaultprofile(itemnum))
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    63
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    64
        defaultprofileAction = csmenu->addAction(hbTrId("txt_device_update_menu_set_as_default"));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    65
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    66
    if(!dminfo->Isprofilelocked(itemnum))
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    67
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    68
        deleteaction = csmenu->addAction(hbTrId("txt_device_update_menu_delete"));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    69
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    70
    connectaction = csmenu->addAction(hbTrId("txt_device_update_menu_connect"));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    71
    HbAction *selectedAction = csmenu->exec(coOrdinates);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    72
    if(selectedAction)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    73
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    74
        if(selectedAction == defaultprofileAction )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    75
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    76
            dminfo->setDefaultProfile(itemnum);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    77
            updateEarlierdefaultProfileIcon();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    78
            modelItem->setIcon(defaultprofileicon);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    79
            currentdefaultprofile = itemnum;        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    80
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    81
        else if (selectedAction == deleteaction )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    82
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    83
            dminfo->DisableDbNotifications(true);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    84
            //check currentdefaultprofile is current item
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    85
            if(itemnum == currentdefaultprofile) // deleting default profile
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    86
                currentdefaultprofile = -1;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    87
            if(dminfo->DeleteProfile(itemnum) >=0 )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    88
                {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    89
                //Update the profile list
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    90
                model->removeRow(itemnum);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    91
                }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    92
            dminfo->DisableDbNotifications(false);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    93
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    94
        else if( selectedAction == connectaction )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    95
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    96
            dminfo->synchronize(itemnum);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    97
            connectionRequested = true;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    98
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    99
        else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   100
            {    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   101
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   102
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   103
    delete csmenu;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   104
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   105
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   106
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   107
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   108
void DmAdvancedView::handleClicked(QModelIndex index)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   109
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   110
    if(connectionRequested)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   111
        return;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   112
    //Stop listening DB events for profile addition
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   113
    dminfo->DisableDbNotifications(true);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   114
    //If profile is not locked then take to edit server view
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   115
    int itemnum = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   116
    QStandardItem *modelItem = model->itemFromIndex(index);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   117
    itemnum = modelItem->row();                  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   118
    if(itemnum >= 0 && !dminfo->Isprofilelocked(itemnum))
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   119
        {        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   120
        //read profile items
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   121
        QStringList itemdata;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   122
        bool sessmode = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   123
        QStringList iaplist;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   124
        int curriap = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   125
        int portnum = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   126
        bool nwauth = false ;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   127
        dminfo->getProfiledata(itemnum, itemdata, sessmode,iaplist,curriap,portnum, nwauth);	
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   128
        QString editserverprof(itemdata[0]);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   129
        if(!serverSetView)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   130
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   131
            serverSetView = new ServerSettingsView(iMainWindow, this , editserverprof);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   132
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   133
        else // view already created
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   134
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   135
            //Just update the setting items as per this profile            
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   136
            serverSetView->makeviewItemsVisible(editserverprof);		  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   137
            }        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   138
        serverSetView->setProfileValues(itemdata,sessmode,iaplist,curriap,portnum,nwauth);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   139
        iMainWindow->setCurrentView(serverSetView);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   140
  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   141
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   142
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   143
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   144
bool DmAdvancedView::displayItems()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   145
    {    	
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   146
    docmlLoader = new HbDocumentLoader;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   147
    bool ok ;    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   148
    docmlLoader->load( DOCML_FILE_NAME,  &ok  );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   149
    if(ok)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   150
    	{
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   151
        if(iMainWindow->orientation() == Qt::Vertical)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   152
            docmlLoader->load( DOCML_FILE_NAME,  PORTRAIT,&ok  );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   153
        else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   154
            docmlLoader->load( DOCML_FILE_NAME, LANDSCAPE,&ok  );            
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   155
    	}
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   156
    else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   157
    	{
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   158
    	 qDebug("omadm docml loading failed");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   159
    	 return ok;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   160
    	}
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   161
    if(ok)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   162
        {        	
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   163
        connect(iMainWindow, SIGNAL(orientationChanged(Qt::Orientation)),
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   164
                this,  SLOT(reLayout(Qt::Orientation)));    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   165
        viewwidget = qobject_cast<HbView *>(docmlLoader->findWidget( VIEW_NAME ) );    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   166
        Q_ASSERT_X(viewwidget != 0, "OMADM View not found","Not found");        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   167
        viewspecificmenu = new HbMenu();    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   168
        help = viewspecificmenu->addAction(hbTrId("txt_common_menu_help")); 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   169
        exit = viewspecificmenu->addAction(hbTrId("txt_common_menu_exit"));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   170
        connect(exit, SIGNAL(triggered()), QCoreApplication::instance(), SLOT(quit()));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   171
        setMenu(viewspecificmenu);            
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   172
        serversListGroup = qobject_cast<HbGroupBox *>(docmlLoader->findWidget( GROUP ) );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   173
        serversListGroup->setHeading(hbTrId("txt_device_update_setlabel_device_update_services"));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   174
        serversListGroup->setCollapsable( true );        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   175
        connect(serversListGroup, SIGNAL(toggled(bool)), this, SLOT(serversListGroupClicked(bool)));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   176
        otherDetailsGroup = qobject_cast<HbGroupBox *>(docmlLoader->findWidget( OTHERDETAILSGROUP ) );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   177
        connect(otherDetailsGroup, SIGNAL(toggled(bool)), this, SLOT(otherDetailsGroupClicked(bool)));        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   178
        otherDetailsGroup->setHeading(hbTrId("txt_device_update_setlabel_other_details"));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   179
        otherDetailsGroup->setCollapsable( true );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   180
        otherDetailsGroup->setCollapsed( true );                            
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   181
        list = qobject_cast<HbListView *>(docmlLoader->findWidget( LIST_NAME ) );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   182
        HbListViewItem *prototype = list->listItemPrototype();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   183
        prototype->setGraphicsSize(HbListViewItem::LargeIcon);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   184
        prototype->setSecondaryTextRowCount(1,2);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   185
        prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   186
        dminfo->refreshProfileList();    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   187
        int IndicatorCount =dminfo->profilescount();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   188
        model = new QStandardItemModel();            
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   189
        for (int i = 0; IndicatorCount > 0 && i < IndicatorCount; ++i) {        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   190
        QStringList liststr;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   191
        bool lock = false;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   192
        int icon = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   193
        int ret = dminfo->profileinfo(i,liststr,icon, lock);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   194
        if(ret <= 0)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   195
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   196
            break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   197
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   198
        QStandardItem* item ;    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   199
        item = new QStandardItem();    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   200
        HbIcon icon1;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   201
        icon1.setIconName(":/icons/qgn_prop_sml_http.svg");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   202
        HbIcon icon2;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   203
        icon2.setIconName(":/icons/qgn_prop_sml_bt.svg");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   204
        HbIcon icon3;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   205
        icon3.setIconName(":/icons/qgn_indi_sett_protected_add.svg");   
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   206
        HbIcon defaultprofile;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   207
        defaultprofile.setIconName(":/icons/qtg_large_avatar.svg");            
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   208
        QList<QVariant> Iconl;    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   209
        if(icon == 0)//Internet
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   210
            Iconl.insert(0,icon1);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   211
        else if(icon == 1)//Bluetooth
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   212
            Iconl.insert(0,icon2); 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   213
        else 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   214
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   215
            Iconl.insert(0,defaultprofile);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   216
            currentdefaultprofile = i;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   217
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   218
        icon = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   219
        if(lock)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   220
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   221
            Iconl.insert(1,icon3);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   222
            lock = false; 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   223
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   224
        QVariant iconlist(Iconl);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   225
        iconlist.setValue(Iconl);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   226
        item->setData(liststr , Qt::DisplayRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   227
        item->setData(iconlist , Qt::DecorationRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   228
        model->setItem(i, item);    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   229
        }        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   230
        list->setModel(model,prototype);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   231
        list->setItemRecycling(false);    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   232
        connect(list, SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   233
                this,  SLOT(handleLongPress(HbAbstractViewItem*,QPointF)));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   234
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   235
        connect(list, SIGNAL(activated(QModelIndex)), this, SLOT(handleClicked(QModelIndex)));            
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   236
        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   237
        qDebug("omadm launching other details list");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   238
        otherdetailslist = qobject_cast<HbListView *>(docmlLoader->findWidget( LISTOTHERDETAILS ) );    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   239
        otherdetailslist->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   240
		otherdetailslist->setLongPressEnabled(EFalse);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   241
        qDebug("omadm launching other details list done");    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   242
        mainCalltoUpdateView();           
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   243
        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   244
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   245
        newserverprofile = qobject_cast<HbPushButton *>(docmlLoader->findWidget(NEWSERVERBUTTON));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   246
        newserverprofile->setText(hbTrId("txt_device_update_button_new_server_profile"));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   247
        connect(newserverprofile, SIGNAL(clicked()),this, SLOT(createNewProfile()));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   248
              
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   249
        label = qobject_cast<HbLabel *>(docmlLoader->findWidget(LABEL));        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   250
        label->setPlainText(hbTrId("txt_device_update_subhead_advanced_device_updates"));        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   251
        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   252
        setWidget(viewwidget);        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   253
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   254
    else 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   255
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   256
        qDebug("omadm docml section loading failed");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   257
        }    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   258
    return ok;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   259
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   260
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   261
void DmAdvancedView::updateEarlierdefaultProfileIcon()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   262
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   263
    if(currentdefaultprofile >= 0)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   264
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   265
        QStandardItem *modelItem = model->item(currentdefaultprofile);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   266
        //Find the transport type & set the icon
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   267
        int transporttype = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   268
        dminfo->profileTransport(currentdefaultprofile,transporttype);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   269
        if(transporttype == 0)//Internet
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   270
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   271
            modelItem->setIcon(internet);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   272
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   273
        else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   274
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   275
            modelItem->setIcon(bluetooth);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   276
            }        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   277
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   278
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   279
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   280
void DmAdvancedView::createNewProfile()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   281
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   282
    if(dminfo->createNewprofile())
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   283
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   284
        //Open server settings view    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   285
        QString newserverprof(hbTrId("txt_device_update_setlabel_new_server_profile"));    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   286
        if(!serverSetView)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   287
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   288
            serverSetView = new ServerSettingsView(iMainWindow, this, newserverprof);        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   289
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   290
        else // view already created
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   291
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   292
            //Just update the setting items as per this profile                
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   293
            serverSetView->makeviewItemsVisible(newserverprof);       
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   294
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   295
        QStringList serveritems;    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   296
        serveritems<< "" <<"" <<"" <<"" <<""<<""<<""<<"";
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   297
        bool sessmode = true;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   298
        bool nauth = true;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   299
        QStringList apdata;        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   300
        int currap =-1;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   301
        int destap = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   302
        dminfo->getIaplist(apdata,currap,destap);    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   303
        int portnum = 8080;    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   304
        serverSetView->setProfileValues(serveritems,sessmode,apdata,currap,portnum,nauth);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   305
        iMainWindow->setCurrentView(serverSetView);        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   306
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   307
    else // profile not getting created
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   308
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   309
        qDebug("OMADM New server profile creation failed");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   310
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   311
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   312
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   313
void DmAdvancedView::saveProfile(QStringList& itemdata, bool& sessmode, QString& currap,unsigned int& portnum, bool& nauth )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   314
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   315
    dminfo->DisableDbNotifications(true);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   316
    dminfo->saveProfile(itemdata,sessmode,currap,portnum,nauth);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   317
    updateListview();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   318
    dminfo->DisableDbNotifications(false);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   319
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   320
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   321
void DmAdvancedView::updateListview()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   322
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   323
    model->clear();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   324
    int IndicatorCount =dminfo->profilescount();    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   325
    for (int i = 0; IndicatorCount > 0 && i < IndicatorCount; ++i) {    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   326
    QStringList liststr;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   327
    bool lock = false;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   328
    int icon = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   329
    int ret = dminfo->profileinfo(i,liststr,icon, lock);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   330
    if(ret <= 0)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   331
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   332
        break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   333
        }    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   334
    QStandardItem* item ;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   335
    item = new QStandardItem();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   336
    HbIcon icon1;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   337
    icon1.setIconName(":/icons/qgn_prop_sml_http.svg");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   338
    HbIcon icon2;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   339
    icon2.setIconName(":/icons/qgn_prop_sml_bt.svg");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   340
    HbIcon icon3;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   341
    icon3.setIconName(":/icons/qgn_indi_sett_protected_add.svg");   
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   342
    HbIcon defaultprofile;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   343
    defaultprofile.setIconName(":/icons/qtg_large_avatar.svg");    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   344
    QList<QVariant> Iconl;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   345
    if(icon == 0)//Internet
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   346
        Iconl.insert(0,icon1);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   347
    else if(icon == 1)//Bluetooth
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   348
        Iconl.insert(0,icon2); 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   349
    else //Default profile
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   350
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   351
        Iconl.insert(0,defaultprofile);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   352
        currentdefaultprofile = i;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   353
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   354
    icon = 0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   355
    if(lock)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   356
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   357
        Iconl.insert(1,icon3);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   358
        lock = false; 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   359
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   360
    QVariant iconlist(Iconl);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   361
    iconlist.setValue(Iconl);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   362
    item->setData(liststr , Qt::DisplayRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   363
    item->setData(iconlist , Qt::DecorationRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   364
    model->setItem(i, item);    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   365
    }    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   366
    model->sort(0);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   367
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   368
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   369
void DmAdvancedView::serversListGroupClicked(bool state)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   370
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   371
    Q_UNUSED(state);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   372
    if(serversListGroup->isCollapsed())
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   373
        otherDetailsGroup->setCollapsed(false);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   374
    else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   375
        otherDetailsGroup->setCollapsed(true);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   376
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   377
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   378
void DmAdvancedView::otherDetailsGroupClicked(bool state)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   379
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   380
    Q_UNUSED(state);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   381
    if(otherDetailsGroup->isCollapsed())
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   382
        serversListGroup->setCollapsed(false);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   383
    else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   384
        serversListGroup->setCollapsed(true);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   385
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   386
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   387
bool DmAdvancedView::checkServerId(QString& serverid)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   388
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   389
    return dminfo->checksrvid(serverid);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   390
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   391
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   392
void DmAdvancedView::reLayout(Qt::Orientation orientation)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   393
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   394
    qDebug("OMADM servers view DmAdvancedView::reLayout");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   395
    if(orientation == Qt::Horizontal)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   396
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   397
        qDebug("OMADM servers view landscape");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   398
        docmlLoader->load(DOCML_FILE_NAME,LANDSCAPE); 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   399
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   400
    else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   401
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   402
        qDebug("OMADM servers view portrait");	        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   403
        bool ok;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   404
        docmlLoader->load( DOCML_FILE_NAME,  PORTRAIT, &ok  );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   405
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   406
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   407
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   408
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   409
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   410
void DmAdvancedView::setBackBehavior()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   411
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   412
    if (!backbehaviorset)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   413
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   414
        qDebug("OMADM servers view back behavior setting");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   415
        backaction = new HbAction(Hb::BackNaviAction, this);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   416
        connect(backaction, SIGNAL(triggered()), this,
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   417
                SLOT(backButtonClicked()));
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   418
        setNavigationAction(backaction);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   419
        backbehaviorset = true;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   420
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   421
    qDebug("OMADM servers view back behavior setting done");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   422
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   423
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   424
void DmAdvancedView::backButtonClicked()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   425
    {    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   426
    QList <HbView*> views = iMainWindow->views();    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   427
    if(iMainWindow->orientation()==Qt::Vertical)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   428
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   429
            iMainWindow->setCurrentView(views[0]);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   430
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   431
        else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   432
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   433
            iMainWindow->setCurrentView(views[1]);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   434
            }    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   435
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   436
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   437
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   438
void DmAdvancedView::mainCalltoUpdateView()
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   439
{   
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   440
    int IndicatorCount =6;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   441
    otherdetailsmodel = new QStandardItemModel(IndicatorCount,0);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   442
    TInt i=0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   443
    TRequestStatus status;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   444
    QStringList liststr;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   445
    QStandardItem* item;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   446
    QString val;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   447
    QString str;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   448
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   449
    iServer.Connect();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   450
    iServer.GetPhoneInfo(0, info);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   451
    imobPhone.Open(iServer, info.iName);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   452
    //Bands supported
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   453
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   454
    RMobilePhone::TMobilePhoneNetworkInfoV1 nwInfov1;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   455
    RMobilePhone::TMobilePhoneNetworkInfoV1Pckg nwInfov1Pckg(nwInfov1);						
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   456
    imobPhone.GetCurrentNetwork(status, nwInfov1Pckg);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   457
    User::WaitForRequest( status );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   458
    status = KRequestPending;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   459
    nwInfov1 = nwInfov1Pckg();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   460
    NetworkBand(nwInfov1.iBandInfo, str);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   461
    item = new QStandardItem();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   462
    val = hbTrId("txt_device_update_dblist_gsm_bands");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   463
    liststr << val;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   464
    liststr << str;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   465
    item->setData(liststr , Qt::DisplayRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   466
    otherdetailsmodel->setItem(i++, item);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   467
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   468
    //Packet Service
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   469
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   470
    TInt packetsrvc =0;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   471
    RMobilePhone::TMobilePhoneNetworkInfoV5 nwInfov5;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   472
    RMobilePhone::TMobilePhoneNetworkInfoV5Pckg nwInfov5Pckg(nwInfov5);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   473
    imobPhone.GetCurrentNetwork( status, nwInfov5Pckg );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   474
    User::WaitForRequest( status );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   475
    status = KRequestPending;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   476
    nwInfov5 = nwInfov5Pckg();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   477
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   478
    if(nwInfov5.iHsdpaAvailableIndicator) packetsrvc =1;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   479
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   480
    if(nwInfov5.iEgprsAvailableIndicator) packetsrvc =2;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   481
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   482
    if(!packetsrvc)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   483
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   484
        RMobilePhone::TMobilePhoneNetworkInfoV8 nwInfov8;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   485
        RMobilePhone::TMobilePhoneNetworkInfoV8Pckg nwInfov8Pckg(nwInfov8);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   486
        imobPhone.GetCurrentNetwork( status, nwInfov8Pckg );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   487
        User::WaitForRequest( status );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   488
        status = KRequestPending;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   489
        nwInfov8 = nwInfov8Pckg();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   490
        if(nwInfov8.iHsupaAvailableIndicator) packetsrvc =3;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   491
    }	  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   492
    liststr.clear();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   493
    val = hbTrId("txt_device_update_dblist_wcdma_uldl_data_rates");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   494
    liststr << val;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   495
    item = new QStandardItem();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   496
    PacketService(packetsrvc, str);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   497
    liststr << str;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   498
    item->setData(liststr , Qt::DisplayRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   499
    otherdetailsmodel->setItem(i++, item);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   500
				
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   501
    // Ciphering
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   502
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   503
    liststr.clear();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   504
    item = new QStandardItem();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   505
    val = hbTrId("txt_device_update_dblist_gsm_cipherings");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   506
    liststr << val;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   507
    imobPhone.GetNetworkSecurityLevel(status,idispSecurity);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   508
    User::WaitForRequest( status );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   509
    NetworkCiphering(idispSecurity, str);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   510
    liststr << str;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   511
    item->setData(liststr, Qt::DisplayRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   512
    otherdetailsmodel->setItem(i++, item);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   513
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   514
    // WLAN MAC
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   515
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   516
    TUint KPhoneWlanSeparator (':');
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   517
    _LIT( KWLanMACDataFormat, "%02x");  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   518
    // Fetch WLAN MAC address
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   519
    TBuf<KWlanMacAddrLength> address;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   520
    RProperty::Get( KPSUidWlan, KPSWlanMacAddress, address );   
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   521
    // Format fetched address
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   522
    TBuf<KWlanMacAddrLength> wlanMACAddress;        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   523
    for ( TInt i( 0 ); i < address.Length(); i++ )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   524
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   525
        // Set separator
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   526
        if( i > 0 )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   527
            {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   528
            wlanMACAddress.Append( KPhoneWlanSeparator );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   529
            }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   530
        // Set data
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   531
        TBuf<50> tmp;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   532
        tmp.Format( KWLanMACDataFormat, address[i] );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   533
        wlanMACAddress.Append( tmp );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   534
        } 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   535
    liststr.clear();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   536
    item = new QStandardItem();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   537
    val = hbTrId("txt_device_update_dblist_wlan_mac_address");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   538
    liststr << val;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   539
    str = QString::fromUtf16(wlanMACAddress.Ptr(), wlanMACAddress.Length());
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   540
    liststr << str;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   541
    item->setData(liststr, Qt::DisplayRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   542
    otherdetailsmodel->setItem(i++, item);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   543
      
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   544
    // BT MAC
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   545
      
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   546
    TBuf<KBTAddrLength> addressBuffer;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   547
    // Fetch from Cenrep
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   548
    CRepository* repository = NULL;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   549
    TRAPD( err, repository = CRepository::NewL( KCRUidBluetoothLocalDeviceAddress ) );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   550
    if ( err == KErrNone )
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   551
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   552
        qDebug("KCRUidBluetoothLocalDeviceAddress errnone");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   553
        err = repository->Get( KBTLocalDeviceAddress, addressBuffer );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   554
        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   555
        if (err == KErrNone)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   556
        	qDebug("KBTLocalDeviceAddress errnone");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   557
        else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   558
        	qDebug("KBTLocalDeviceAddress Error");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   559
        	
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   560
        delete repository;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   561
        }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   562
    else
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   563
    	{
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   564
    		qDebug("KCRUidBluetoothLocalDeviceAddress Error openin cenrep");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   565
    	}
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   566
    liststr.clear();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   567
    val = hbTrId("txt_device_update_dblist_bt_mac_address");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   568
    liststr << val;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   569
    item = new QStandardItem();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   570
    str = QString::fromUtf16(addressBuffer.Ptr(), addressBuffer.Length());
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   571
    liststr << str;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   572
    item->setData(liststr , Qt::DisplayRole);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   573
    otherdetailsmodel->setItem(i++, item);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   574
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   575
    otherdetailslist->setModel(otherdetailsmodel);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   576
		
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   577
}
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   578
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   579
void DmAdvancedView::PacketService(TInt val, QString& string)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   580
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   581
     switch (val)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   582
         {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   583
         case (0):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   584
                 string = hbTrId("txt_device_update_dblist_wcdma_uldl_data_val_l1");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   585
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   586
         case (1):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   587
                 string = hbTrId("txt_device_update_dblist_wcdma_uldl_data_val_l2");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   588
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   589
         case (2):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   590
                 string = hbTrId("txt_device_update_dblist_wcdma_uldl_data_val_l3");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   591
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   592
         case (3):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   593
                 string = hbTrId("txt_device_update_dblist_wcdma_uldl_data_val_l4");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   594
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   595
         case (4):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   596
                 string = hbTrId("txt_device_update_dblist_gsm_cipherings_val_l4");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   597
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   598
         case (5):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   599
         default :
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   600
                 string = hbTrId("txt_device_update_dblist_wcdma_uldl_data_val_l5");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   601
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   602
         }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   603
     }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   604
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   605
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   606
void DmAdvancedView::NetworkCiphering(RMobilePhone::TMobilePhoneNetworkSecurity val, QString& string)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   607
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   608
     switch (val)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   609
         {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   610
         case (RMobilePhone::ECipheringGSM):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   611
                 string = hbTrId("txt_device_update_dblist_gsm_cipherings_val_l2");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   612
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   613
         case (RMobilePhone::ECipheringWCDMA):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   614
                 string = hbTrId("txt_device_update_dblist_gsm_cipherings_val_l3");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   615
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   616
         case (RMobilePhone::ECipheringCDMA):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   617
                 string = hbTrId("txt_device_update_dblist_gsm_cipherings_val_l4");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   618
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   619
         case (RMobilePhone::ECipheringOff):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   620
         default :
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   621
                 string = hbTrId("txt_device_update_dblist_gsm_cipherings_val_l1");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   622
                 break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   623
         }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   624
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   625
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   626
void DmAdvancedView::NetworkBand(RMobilePhone::TMobilePhoneNetworkBandInfo val, QString& string)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   627
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   628
    switch (val)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   629
        {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   630
        case (RMobilePhone::E800BandA):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   631
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l2");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   632
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   633
        case (RMobilePhone::E800BandB):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   634
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l3");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   635
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   636
        case (RMobilePhone::E800BandC):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   637
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l4");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   638
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   639
        case (RMobilePhone::E1900BandA):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   640
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l5");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   641
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   642
        case (RMobilePhone::E1900BandB):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   643
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l6");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   644
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   645
        case (RMobilePhone::E1900BandC):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   646
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l7");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   647
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   648
        case (RMobilePhone::E1900BandD):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   649
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l8");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   650
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   651
        case (RMobilePhone::E1900BandE):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   652
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l9");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   653
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   654
        case (RMobilePhone::E1900BandF):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   655
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l10");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   656
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   657
        case (RMobilePhone::EBandUnknown):
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   658
        default :
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   659
                string = hbTrId("txt_device_update_dblist_gsm_bands_val_l1");
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   660
                break;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   661
        }   
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   662
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   663
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   664
void DmAdvancedView::syncCompleted(int jobstatus)
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   665
    {
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   666
    Q_UNUSED(jobstatus);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   667
    connectionRequested = false;    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   668
    updateListview();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   669
    }
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   670