mediasettings/videosettingsplugin/inc/videosettingsaccesspointentry.h
author hgs
Fri, 11 Jun 2010 09:44:20 +0300
changeset 40 13331705e488
child 67 72c709219fcd
permissions -rw-r--r--
201023
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
 * All rights reserved.
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0""
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
 *
hgs
parents:
diff changeset
     9
 * Initial Contributors:
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
 *
hgs
parents:
diff changeset
    12
 * Contributors:
hgs
parents:
diff changeset
    13
 *
hgs
parents:
diff changeset
    14
 * Description:  
hgs
parents:
diff changeset
    15
 *
hgs
parents:
diff changeset
    16
 */
hgs
parents:
diff changeset
    17
#ifndef VIDEOSETTINGSACCESSPOINTENTRY_H
hgs
parents:
diff changeset
    18
#define VIDEOSETTINGSACCESSPOINTENTRY_H
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#include <cpsettingformentryitemdata.h>
hgs
parents:
diff changeset
    21
#include <cmapplsettingsui.h>
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
class VideoSettingsGroup;
hgs
parents:
diff changeset
    24
class CmConnectionMethodShim;
hgs
parents:
diff changeset
    25
class CmManagerShim;
hgs
parents:
diff changeset
    26
hgs
parents:
diff changeset
    27
class VideoSettingsAccessPointEntry : public CpSettingFormEntryItemData
hgs
parents:
diff changeset
    28
{
hgs
parents:
diff changeset
    29
    Q_OBJECT
hgs
parents:
diff changeset
    30
public:
hgs
parents:
diff changeset
    31
    
hgs
parents:
diff changeset
    32
    /**
hgs
parents:
diff changeset
    33
     * Constructor
hgs
parents:
diff changeset
    34
     */
hgs
parents:
diff changeset
    35
    VideoSettingsAccessPointEntry(CpItemDataHelper &itemDataHelper, 
hgs
parents:
diff changeset
    36
        const QString& text = QString(),
hgs
parents:
diff changeset
    37
        VideoSettingsGroup *parent = 0);
hgs
parents:
diff changeset
    38
    
hgs
parents:
diff changeset
    39
    /**
hgs
parents:
diff changeset
    40
     * Destructor
hgs
parents:
diff changeset
    41
     */
hgs
parents:
diff changeset
    42
    ~VideoSettingsAccessPointEntry();
hgs
parents:
diff changeset
    43
    
hgs
parents:
diff changeset
    44
    /**
hgs
parents:
diff changeset
    45
     * sets the iap id.
hgs
parents:
diff changeset
    46
     * 
hgs
parents:
diff changeset
    47
     * @param apId The iap id.
hgs
parents:
diff changeset
    48
     */
hgs
parents:
diff changeset
    49
    void setIapId(const uint& apId);
hgs
parents:
diff changeset
    50
    
hgs
parents:
diff changeset
    51
private:
hgs
parents:
diff changeset
    52
    
hgs
parents:
diff changeset
    53
    /**
hgs
parents:
diff changeset
    54
     * From CpSettingFormEntryItemData. 
hgs
parents:
diff changeset
    55
     * 
hgs
parents:
diff changeset
    56
     * Creates a view for this, if needed. In our case always 
hgs
parents:
diff changeset
    57
     * returns 0 as we don't want a new view.
hgs
parents:
diff changeset
    58
     */
hgs
parents:
diff changeset
    59
    virtual CpBaseSettingView *createSettingView() const;
hgs
parents:
diff changeset
    60
    
hgs
parents:
diff changeset
    61
    /**
hgs
parents:
diff changeset
    62
     * Convinience method for fetching a connection method
hgs
parents:
diff changeset
    63
     * with a given id.
hgs
parents:
diff changeset
    64
     * 
hgs
parents:
diff changeset
    65
     * @param id Connection method id.
hgs
parents:
diff changeset
    66
     * @return The connection method object.
hgs
parents:
diff changeset
    67
     */
hgs
parents:
diff changeset
    68
    CmConnectionMethodShim* getConnectionMethod(const uint& id);
hgs
parents:
diff changeset
    69
    
hgs
parents:
diff changeset
    70
    /**
hgs
parents:
diff changeset
    71
     * Fetches the connection name from the given connection method
hgs
parents:
diff changeset
    72
     * and sets it as the description for this.
hgs
parents:
diff changeset
    73
     */
hgs
parents:
diff changeset
    74
    void setAccessPointName(CmConnectionMethodShim* connMethod);
hgs
parents:
diff changeset
    75
    
hgs
parents:
diff changeset
    76
private slots:
hgs
parents:
diff changeset
    77
    
hgs
parents:
diff changeset
    78
    /**
hgs
parents:
diff changeset
    79
     * Slot that is called when the button is pressed.
hgs
parents:
diff changeset
    80
     * Opens the access point selection dialog.
hgs
parents:
diff changeset
    81
     */
hgs
parents:
diff changeset
    82
    void openSelectionDialogSlot();
hgs
parents:
diff changeset
    83
    
hgs
parents:
diff changeset
    84
    /**
hgs
parents:
diff changeset
    85
     * Slot that is called when the access point selection
hgs
parents:
diff changeset
    86
     * dialog closes.
hgs
parents:
diff changeset
    87
     * 
hgs
parents:
diff changeset
    88
     * @param error Possible error code. One from enum
hgs
parents:
diff changeset
    89
     *      CmApplSettingsUi::ApplSettingsError.
hgs
parents:
diff changeset
    90
     */
hgs
parents:
diff changeset
    91
    void accessPointDialogFinished(uint error);
hgs
parents:
diff changeset
    92
    
hgs
parents:
diff changeset
    93
private:
hgs
parents:
diff changeset
    94
    
hgs
parents:
diff changeset
    95
    /**
hgs
parents:
diff changeset
    96
     * The VideoSettingsGroup.
hgs
parents:
diff changeset
    97
     */
hgs
parents:
diff changeset
    98
    VideoSettingsGroup* mParent;
hgs
parents:
diff changeset
    99
    
hgs
parents:
diff changeset
   100
    /**
hgs
parents:
diff changeset
   101
     * The access point selection dialog.
hgs
parents:
diff changeset
   102
     */
hgs
parents:
diff changeset
   103
    CmApplSettingsUi* mApplSettings;
hgs
parents:
diff changeset
   104
    
hgs
parents:
diff changeset
   105
    /**
hgs
parents:
diff changeset
   106
     * The current access point selection.
hgs
parents:
diff changeset
   107
     */
hgs
parents:
diff changeset
   108
    CmApplSettingsUi::SettingSelection mSelection;
hgs
parents:
diff changeset
   109
    
hgs
parents:
diff changeset
   110
    /**
hgs
parents:
diff changeset
   111
     * The manager that handles all destinations and connection methods.
hgs
parents:
diff changeset
   112
     * Used for getting the connection methods.
hgs
parents:
diff changeset
   113
     */
hgs
parents:
diff changeset
   114
    CmManagerShim* mCmManager;
hgs
parents:
diff changeset
   115
hgs
parents:
diff changeset
   116
};
hgs
parents:
diff changeset
   117
hgs
parents:
diff changeset
   118
#endif // VIDEOSETTINGSACCESSPOINTENTRY_H