cmmanager/cppacketdataapplugin/inc/cppacketdataapview.h
branchRCL_3
changeset 57 05bc53fe583b
equal deleted inserted replaced
55:fc7b30ed2058 57:05bc53fe583b
       
     1 /*
       
     2 * Copyright (c) 2010 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:
       
    15 * Control Panel packet data AP settings view header file.  
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef CPPACKETDATAAPVIEW_H
       
    20 #define CPPACKETDATAAPVIEW_H
       
    21 
       
    22 // System includes
       
    23 #include <QSharedPointer>
       
    24 #include <QMap>
       
    25 #include <HbMessageBox>
       
    26 #include <cpbasesettingview.h>
       
    27 
       
    28 // User includes
       
    29 
       
    30 // Forward declarations
       
    31 class HbDataForm;
       
    32 class HbDataFormModel;
       
    33 class HbDataFormModelItem;
       
    34 class HbMessageBox;
       
    35 class CmConnectionMethodShim;
       
    36 class CpPacketDataApPlugin;
       
    37 
       
    38 // External data types
       
    39 
       
    40 // Constants
       
    41 
       
    42 // Class declaration
       
    43 class CpPacketDataApView : public CpBaseSettingView
       
    44 {
       
    45     Q_OBJECT
       
    46     
       
    47 public:
       
    48     CpPacketDataApView(
       
    49         CmConnectionMethodShim *cmConnectionMethod,
       
    50         QGraphicsItem *parent = 0);
       
    51     ~CpPacketDataApView();
       
    52     
       
    53 signals:
       
    54 
       
    55 public slots:
       
    56 
       
    57 protected:
       
    58 
       
    59 protected slots:
       
    60  
       
    61 private:
       
    62     Q_DISABLE_COPY(CpPacketDataApView)
       
    63     
       
    64     void createAccessPointSettingsGroup();
       
    65     void updateAccessPointSettingsGroup();
       
    66     void showMessageBox(
       
    67         HbMessageBox::MessageBoxType type,
       
    68         const QString &text);
       
    69     bool tryUpdate();
       
    70     void handleUpdateError();
       
    71     
       
    72 private slots:
       
    73     void connectionNameChanged();
       
    74     void accessPointNameChanged();
       
    75     void userNameChanged();
       
    76     void passwordChanged();
       
    77     void authenticationChanged(int index);
       
    78     void homepageChanged();
       
    79     void menuActionTriggered(HbAction *action);
       
    80     void restoreCurrentView();
       
    81     void setEditorPreferences(const QModelIndex modelIndex);
       
    82     
       
    83 private: // data
       
    84     //! Dataform
       
    85     HbDataForm *mForm;
       
    86     //! Dataform model
       
    87     HbDataFormModel *mModel;
       
    88     //! "Access point settings" group
       
    89     HbDataFormModelItem *mApSettingsGroupItem;
       
    90     //! "Connection name" setting item
       
    91     HbDataFormModelItem *mConnectionNameItem;
       
    92     //! "Access point name" setting item
       
    93     HbDataFormModelItem *mAccessPointNameItem;
       
    94     //! "User name" setting item
       
    95     HbDataFormModelItem *mUserNameItem;
       
    96     //! "Password" setting item
       
    97     HbDataFormModelItem *mPasswordItem;
       
    98     //! "Authentication" setting item
       
    99     HbDataFormModelItem *mAuthenticationItem;
       
   100     //! "Homepage" setting item
       
   101     HbDataFormModelItem *mHomepageItem;
       
   102     //! "Advanced settings" action for view menu
       
   103     HbAction *mAdvancedSettingsAction;
       
   104     //! Connection Settings Shim connection method pointer
       
   105     CmConnectionMethodShim *mCmConnectionMethod;
       
   106     //! Message box for info notes
       
   107     QSharedPointer<HbMessageBox> mMessageBox;
       
   108     //! Maps authentication combobox index to CMManagerShim::PacketDataDisablePlainTextAuth value
       
   109     QMap<int, bool> mAuthenticationMap;
       
   110     
       
   111     // Friend classes
       
   112     friend class TestCpPacketDataApPlugin;
       
   113 };
       
   114 
       
   115 #endif // CPPACKETDATAAPVIEW_H