cmmanager/cpwlanapplugin/inc/cpwlanapview.h
changeset 20 9c97ad6591ae
child 27 489cf6208544
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
       
     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 WLAN AP settings view header file.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef CPWLANAPVIEW_H
       
    20 #define CPWLANAPVIEW_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 CpWlanApPlugin;
       
    37 class CpWlanSecurityPluginInterface;
       
    38 
       
    39 // External data types
       
    40 
       
    41 // Constants
       
    42 
       
    43 // Class declaration
       
    44 class CpWlanApView : public CpBaseSettingView
       
    45 {
       
    46     Q_OBJECT
       
    47     
       
    48 public:
       
    49     CpWlanApView(
       
    50         CmConnectionMethodShim *cmConnectionMethod,
       
    51         QGraphicsItem *parent = 0);
       
    52     ~CpWlanApView();
       
    53     
       
    54 signals:
       
    55 
       
    56 public slots:
       
    57 
       
    58 protected:
       
    59 
       
    60 protected slots:
       
    61  
       
    62 private:
       
    63     void createAccessPointSettingsGroup();
       
    64     void updateAccessPointSettingsGroup();
       
    65     void loadSecurityPlugins();
       
    66     void updateSecurityGroup(int index);
       
    67     void showMessageBox(
       
    68         HbMessageBox::MessageBoxType type,
       
    69         const QString &text);
       
    70     bool tryUpdate();
       
    71     void handleUpdateError();
       
    72        
       
    73 private slots:
       
    74     void connectionNameChanged();
       
    75     void wlanNetworkNameChanged();
       
    76     void networkStatusChanged(int index);
       
    77     void networkModeChanged(int index);
       
    78     void securityModeChanged(int index);
       
    79     void homepageChanged();
       
    80     void menuActionTriggered(HbAction *action);
       
    81     void restoreCurrentView();
       
    82     void setEditorPreferences(const QModelIndex modelIndex);
       
    83     
       
    84 private: // data
       
    85     //! Dataform
       
    86     HbDataForm *mForm;
       
    87     //! Dataform model
       
    88     HbDataFormModel *mModel;
       
    89     //! Control Panel item data helper for WLAN security plugins
       
    90     CpItemDataHelper *mItemDataHelper;
       
    91     //! "Access point settings" group
       
    92     HbDataFormModelItem *mApSettingsGroupItem;
       
    93     //! "Connection name" setting item
       
    94     HbDataFormModelItem *mConnectionNameItem;
       
    95     //! "WLAN network name" setting item
       
    96     HbDataFormModelItem *mWlanNetworkNameItem;
       
    97     //! "Network status" setting item
       
    98     HbDataFormModelItem *mNetworkStatusItem;
       
    99     //! "Network mode" setting item
       
   100     HbDataFormModelItem *mNetworkModeItem;
       
   101     //! "Security mode" setting item
       
   102     HbDataFormModelItem *mSecurityModeItem;
       
   103     //! "Homepage" setting item
       
   104     HbDataFormModelItem *mHomepageItem;
       
   105     //! "Security settings" group
       
   106     HbDataFormModelItem *mSecuritySettingsGroupItem;
       
   107     //! "Advanced settings" action for view menu
       
   108     HbAction *mAdvancedSettingsAction;
       
   109     //! Connection Settings Shim connection method pointer
       
   110     CmConnectionMethodShim *mCmConnectionMethod;
       
   111     //! Message box for info notes
       
   112     QSharedPointer<HbMessageBox> mMessageBox;
       
   113     //! Maps network status combobox index to CMManagerShim::WlanScanSSID value
       
   114     QMap<int, bool> mNetworkStatusMap;
       
   115     //! Maps network mode combobox index to CMManagerShim::WlanConnectionMode value
       
   116     QMap<int, int> mNetworkModeMap;
       
   117     //! Maps security mode combobox index to corresponding security plugin pointer
       
   118     QMap<int, CpWlanSecurityPluginInterface *> mSecurityModeMap;
       
   119     
       
   120     // Friend classes
       
   121     friend class TestCpWlanApPlugin;
       
   122 };
       
   123 
       
   124 #endif // CPWLANAPVIEW_H