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