cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
child 62 bb1f80fb7db2
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
     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(
       
    48         const QString &name,
       
    49         QSharedPointer<CmDestinationShim> dest);
       
    50     void deleteDestination(int destId);
       
    51     CpBearerApPluginInterface *findBearerPlugin(int apId);
       
    52     
       
    53 signals:
       
    54     
       
    55 public slots:
       
    56     void updateDestinationInformation();
       
    57     
       
    58 protected:
       
    59     
       
    60 protected slots:
       
    61         
       
    62 private: 
       
    63     void createUncategorisedDestination();
       
    64     void fetchDestinations(QList<QSharedPointer<CmDestinationShim> > &destinationList);
       
    65     void loadBearerPlugins();
       
    66 	QString getDestinationAdditionalText(QSharedPointer<CmDestinationShim> destination);
       
    67 	QString getDestinationAdditionalText(int destinationId);
       
    68 	QString resolveDestinationIcon(QSharedPointer<CmDestinationShim> destination) const; 
       
    69 	
       
    70 private slots:
       
    71 
       
    72 private: // data
       
    73 
       
    74     //! Helper for connecting signals to underlying widgets
       
    75     CpItemDataHelper                    *mItemDataHelper;
       
    76     //! True is uncategorised "destination" is currently shown
       
    77     bool                                mUncategorisedShown;
       
    78     //! Pointer to CmManager for commsdat operations
       
    79     CmManagerShim                       *mCmManager;
       
    80     /*! List of plugins that implement views for access points 
       
    81      *  according to bearer type
       
    82      */
       
    83     QList<CpBearerApPluginInterface *>  *mBearerPlugins;
       
    84 };
       
    85 
       
    86 #endif // CPDESTINATIONGROUP_H