mediasettings/videosettingsplugin/inc/videosettingsaccesspointentry.h
changeset 46 adbe7d5ba2f5
child 67 72c709219fcd
equal deleted inserted replaced
28:c48470be1ba7 46:adbe7d5ba2f5
       
     1 /*
       
     2  * Copyright (c) 2009 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  *
       
    16  */
       
    17 #ifndef VIDEOSETTINGSACCESSPOINTENTRY_H
       
    18 #define VIDEOSETTINGSACCESSPOINTENTRY_H
       
    19 
       
    20 #include <cpsettingformentryitemdata.h>
       
    21 #include <cmapplsettingsui.h>
       
    22 
       
    23 class VideoSettingsGroup;
       
    24 class CmConnectionMethodShim;
       
    25 class CmManagerShim;
       
    26 
       
    27 class VideoSettingsAccessPointEntry : public CpSettingFormEntryItemData
       
    28 {
       
    29     Q_OBJECT
       
    30 public:
       
    31     
       
    32     /**
       
    33      * Constructor
       
    34      */
       
    35     VideoSettingsAccessPointEntry(CpItemDataHelper &itemDataHelper, 
       
    36         const QString& text = QString(),
       
    37         VideoSettingsGroup *parent = 0);
       
    38     
       
    39     /**
       
    40      * Destructor
       
    41      */
       
    42     ~VideoSettingsAccessPointEntry();
       
    43     
       
    44     /**
       
    45      * sets the iap id.
       
    46      * 
       
    47      * @param apId The iap id.
       
    48      */
       
    49     void setIapId(const uint& apId);
       
    50     
       
    51 private:
       
    52     
       
    53     /**
       
    54      * From CpSettingFormEntryItemData. 
       
    55      * 
       
    56      * Creates a view for this, if needed. In our case always 
       
    57      * returns 0 as we don't want a new view.
       
    58      */
       
    59     virtual CpBaseSettingView *createSettingView() const;
       
    60     
       
    61     /**
       
    62      * Convinience method for fetching a connection method
       
    63      * with a given id.
       
    64      * 
       
    65      * @param id Connection method id.
       
    66      * @return The connection method object.
       
    67      */
       
    68     CmConnectionMethodShim* getConnectionMethod(const uint& id);
       
    69     
       
    70     /**
       
    71      * Fetches the connection name from the given connection method
       
    72      * and sets it as the description for this.
       
    73      */
       
    74     void setAccessPointName(CmConnectionMethodShim* connMethod);
       
    75     
       
    76 private slots:
       
    77     
       
    78     /**
       
    79      * Slot that is called when the button is pressed.
       
    80      * Opens the access point selection dialog.
       
    81      */
       
    82     void openSelectionDialogSlot();
       
    83     
       
    84     /**
       
    85      * Slot that is called when the access point selection
       
    86      * dialog closes.
       
    87      * 
       
    88      * @param error Possible error code. One from enum
       
    89      *      CmApplSettingsUi::ApplSettingsError.
       
    90      */
       
    91     void accessPointDialogFinished(uint error);
       
    92     
       
    93 private:
       
    94     
       
    95     /**
       
    96      * The VideoSettingsGroup.
       
    97      */
       
    98     VideoSettingsGroup* mParent;
       
    99     
       
   100     /**
       
   101      * The access point selection dialog.
       
   102      */
       
   103     CmApplSettingsUi* mApplSettings;
       
   104     
       
   105     /**
       
   106      * The current access point selection.
       
   107      */
       
   108     CmApplSettingsUi::SettingSelection mSelection;
       
   109     
       
   110     /**
       
   111      * The manager that handles all destinations and connection methods.
       
   112      * Used for getting the connection methods.
       
   113      */
       
   114     CmManagerShim* mCmManager;
       
   115 
       
   116 };
       
   117 
       
   118 #endif // VIDEOSETTINGSACCESSPOINTENTRY_H