cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h
changeset 20 9c97ad6591ae
child 40 c5b848e6c7d1
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 *   CpDestinationGroup contains all destination UI items as well as 
       
    16 *   items for uncategorized access points and adding new destinations.
       
    17 */
       
    18  
       
    19 #ifndef CPDESTINATIONGROUP_H
       
    20 #define CPDESTINATIONGROUP_H
       
    21 
       
    22 // System includes
       
    23 #include <QSharedPointer>
       
    24 #include <cpsettingformitemdata.h>
       
    25 
       
    26 // User includes
       
    27 #include "cpbearerapplugininterface.h"
       
    28 
       
    29 // Forward declarations
       
    30 class CpDestinationEntryItemData;
       
    31 class CmDestinationShim;
       
    32 class CmManagerShim;
       
    33 
       
    34 // External data types
       
    35 
       
    36 // Constants
       
    37 
       
    38 // Class declaration
       
    39 class CpDestinationGroup : public CpSettingFormItemData
       
    40 {
       
    41     Q_OBJECT
       
    42     
       
    43 public:
       
    44     CpDestinationGroup(CpItemDataHelper &itemDataHelper);
       
    45     ~CpDestinationGroup();
       
    46     
       
    47     void addDestination(const QString &dest, int destId);
       
    48     void deleteDestination(int destId);
       
    49     CpBearerApPluginInterface *findBearerPlugin(int apId);
       
    50     
       
    51 signals:
       
    52     
       
    53 public slots:
       
    54     void updateDestinationInformation();
       
    55     
       
    56 protected:
       
    57     
       
    58 protected slots:
       
    59         
       
    60 private: 
       
    61     void createUncategorisedDestination();
       
    62     void fetchDestinations(QList<QSharedPointer<CmDestinationShim> > &destinationList);
       
    63     void loadBearerPlugins();
       
    64 	QString getDestinationAdditionalText(int iapCount);
       
    65 	
       
    66 private slots:
       
    67 
       
    68 private: // data
       
    69 
       
    70     //! Helper for connecting signals to underlying widgets
       
    71     CpItemDataHelper                    *mItemDataHelper;
       
    72     //! True is uncategorised "destination" is currently shown
       
    73     bool                                mUncategorisedShown;
       
    74     //! Pointer to CmManager for commsdat operations
       
    75     CmManagerShim                       *mCmManager;
       
    76     /*! List of plugins that implement views for access points 
       
    77      *  according to bearer type
       
    78      */
       
    79     QList<CpBearerApPluginInterface *>  *mBearerPlugins;
       
    80 };
       
    81 
       
    82 #endif // CPDESTINATIONGROUP_H