deviceupdatesui/deviceupdates/inc/dmadvancedview.h
author hgs
Tue, 13 Jul 2010 03:51:25 +0530
changeset 46 b9b00b134b0d
parent 43 88e14c3d4c4f
child 47 d316aecb87fd
permissions -rw-r--r--
201023
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
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     3
* All rights reserved.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     8
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
     9
* Initial Contributors:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    11
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    12
* Contributors:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    13
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    14
* Description:  Launches Advanced view
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    15
*
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    16
*/
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    17
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    18
#ifndef DMADVANCEDVIEW_H
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    19
#define DMADVANCEDVIEW_H
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    20
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    21
#include <hbwidget.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    22
#include <QList>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    23
#include <hbinstance.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    24
#include <hbview.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    25
#include <hbaction.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    26
#include <hbgroupbox.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    27
#include <hblistview.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    28
#include <hbpushbutton.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    29
#include <hbmenu.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    30
#include <hblabel.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    31
#include <hbdocumentloader.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    32
#include <hblistviewitem.h>
36
hgs
parents: 33
diff changeset
    33
#include <hbanchorlayout.h>
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    34
#include <hbicon.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    35
#include <QStandardItem>
36
hgs
parents: 33
diff changeset
    36
#include <qtranslator.h>
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    37
#include <QSortFilterProxyModel>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    38
#include <QModelIndex>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    39
#include <wlansdkpskeys.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    40
#include <btengdomaincrkeys.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    41
#include <QStandardItemModel>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    42
#include <centralrepository.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    43
#include <hbglobal.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    44
#include <etelpckt.h>
36
hgs
parents: 33
diff changeset
    45
#include <etel3rdparty.h>
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    46
#include <etelmm.h>
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    47
#include <etel.h>
43
hgs
parents: 38
diff changeset
    48
#include <sysutil.h>
hgs
parents: 38
diff changeset
    49
#include <sysversioninfo.h>
hgs
parents: 38
diff changeset
    50
#include <swi/sisregistrypackage.h>
hgs
parents: 38
diff changeset
    51
#include <swi/sisregistryentry.h>
hgs
parents: 38
diff changeset
    52
#include <swi/sisregistrysession.h>
hgs
parents: 38
diff changeset
    53
#include "nsmldmsyncprivatecrkeys.h"
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    54
#include "serversettingsview.h"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    55
#include "dminforetrieval.h"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    56
#define DOCML_FILE_NAME ":xml/serversview.docml"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    57
#define VIEW_NAME "view"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    58
#define LIST_NAME "listView"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    59
#define GROUP "groupBox"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    60
#define BANNER_NAME "banner"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    61
#define NEWSERVERBUTTON "pushButton"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    62
#define WIDGET "content"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    63
#define LABEL "label"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    64
#define LISTOTHERDETAILS "listView_1"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    65
#define OTHERDETAILSGROUP "groupBox_1"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    66
#define LANDSCAPE "landscape"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    67
#define PORTRAIT "portrait"
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    68
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    69
const TInt KWlanMacAddrLength = 100;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    70
const TInt KBTAddrLength = 64; 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    71
class DmAdvancedView : public HbView
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    72
{
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    73
    Q_OBJECT
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    74
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    75
public:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    76
    explicit DmAdvancedView(HbMainWindow *mainWindow, HbView *mainView, QGraphicsItem *parent=0);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    77
    virtual ~DmAdvancedView();   
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    78
    bool displayItems();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    79
    void saveProfile(QStringList& itemdata, bool& sessmode, QString& currap,unsigned int& portnum, bool& nauth );
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    80
    bool checkServerId(QString& serverid);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    81
    void setBackBehavior();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    82
    void syncCompleted(int jobstatus);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    83
    void PacketService(TInt val, QString& string);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    84
    void NetworkBand(RMobilePhone::TMobilePhoneNetworkBandInfo val, QString& string); 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    85
    void NetworkCiphering(RMobilePhone::TMobilePhoneNetworkSecurity val, QString& string);  
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    86
    void mainCalltoUpdateView();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    87
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    88
private:
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    89
    void updateEarlierdefaultProfileIcon();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    90
    void updateListview();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    91
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    92
public slots:        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    93
    void handleLongPress(HbAbstractViewItem* item,QPointF coOrdinates);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    94
    void handleClicked(QModelIndex index);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    95
    void createNewProfile();
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    96
    void otherDetailsGroupClicked(bool state);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    97
    void serversListGroupClicked(bool state);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    98
    void reLayout(Qt::Orientation layoutType);
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
    99
    void backButtonClicked();
38
hgs
parents: 36
diff changeset
   100
    void defaultMenuItemSelected();
hgs
parents: 36
diff changeset
   101
    void deleteMenuItemSelected();
hgs
parents: 36
diff changeset
   102
    void connectMenuItemSelected();
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   103
    
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   104
private:        
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   105
    HbGroupBox *serversListGroup;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   106
    HbGroupBox *otherDetailsGroup;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   107
    HbListView* list;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   108
    HbListView* otherdetailslist;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   109
    HbLabel *label; 
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   110
    HbMenu* viewspecificmenu;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   111
    HbAction* help;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   112
    HbAction* exit;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   113
    HbWidget* viewwidget;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   114
    HbDocumentLoader *docmlLoader;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   115
    HbPushButton* newserverprofile;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   116
    int count;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   117
    QTranslator *translator;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   118
    DmInfo* dminfo;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   119
    QStandardItemModel *model;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   120
    QStandardItemModel *otherdetailsmodel;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   121
    int currentdefaultprofile;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   122
    bool connectionRequested;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   123
    bool backbehaviorset;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   124
    QIcon bluetooth;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   125
    QIcon internet;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   126
    QIcon defaultprofileicon;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   127
    HbMainWindow *iMainWindow;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   128
    ServerSettingsView* serverSetView;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   129
    HbAnchorLayout* layout;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   130
    int currentview;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   131
    HbView* iMainView;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   132
    HbAction* backaction;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   133
    RMobilePhone imobPhone;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   134
    RTelServer iServer;
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   135
    RTelServer::TPhoneInfo info;	
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   136
	RMobilePhone::TMobilePhoneNetworkSecurity idispSecurity;
38
hgs
parents: 36
diff changeset
   137
	int currentselecteditem;
hgs
parents: 36
diff changeset
   138
	//This item should not be deleted,it just refer an item and deletion
hgs
parents: 36
diff changeset
   139
	//will be taken care by List view
hgs
parents: 36
diff changeset
   140
	QStandardItem *modelItem;
33
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   141
};
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   142
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   143
#endif // DMADVANCEDVIEW_H
7464c1e21dae 201008_internal
hgs
parents:
diff changeset
   144