mediasettings/videosettingsplugin/inc/videosettingsgroup.h
changeset 46 adbe7d5ba2f5
child 41 229f037ce963
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 VIDEOSETTINGSGROUP_H
       
    18 #define VIDEOSETTINGSGROUP_H
       
    19 
       
    20 #include <cpsettingformitemdata.h>
       
    21 #include <qabstractitemmodel.h>
       
    22 
       
    23 class CpItemDataHelper;
       
    24 class CMPSettingsModel;
       
    25 class VideoSettingsAccessPointEntry;
       
    26 
       
    27 class VideoSettingsGroup : public CpSettingFormItemData
       
    28 {
       
    29     Q_OBJECT
       
    30 public:
       
    31     
       
    32     /**
       
    33      * Constructor
       
    34      */
       
    35     VideoSettingsGroup(CpItemDataHelper &itemDataHelper);
       
    36     
       
    37     /**
       
    38      * Destructor
       
    39      */
       
    40     ~VideoSettingsGroup();
       
    41     
       
    42     /**
       
    43      * Getter for the default access point id.
       
    44      * 
       
    45      * @return Default access point id.
       
    46      */
       
    47     uint getAccessPointId();
       
    48     
       
    49     /**
       
    50      * Setter for the default access point id.
       
    51      * 
       
    52      * @param defaultAp Access point id.
       
    53      */
       
    54     void setAccessPointId(const uint& defaultAp);
       
    55     
       
    56 private slots:
       
    57     
       
    58     /**
       
    59      * Slot for when mLowestUDPPortItem editing finishes.
       
    60      */
       
    61     void lowestUdpPortEditingFinished();
       
    62     
       
    63     /**
       
    64      * Slot for when mHighestUDPPortItem editing finishes.
       
    65      */
       
    66     void highestUdpPortEditingFinished();
       
    67     
       
    68     /**
       
    69      * Slot for when mUseProxyItem editing finishes.
       
    70      */
       
    71     void useProxyToggled(int state);
       
    72     
       
    73     /**
       
    74      * Slot for when mProxyServerItem editing finishes.
       
    75      */
       
    76     void proxyServerEditingFinished();
       
    77     
       
    78     /**
       
    79      * Slot for when mProxyPortItem editing finishes.
       
    80      */
       
    81     void proxyPortEditingFinished();
       
    82     
       
    83     /**
       
    84      * Called when item is shown. Connected to the form's
       
    85      * itemShown signal.
       
    86      */
       
    87     void itemShown(const QModelIndex& index);
       
    88 
       
    89 private:
       
    90     
       
    91     /**
       
    92      * Initializes the mSettingsModel.
       
    93      */
       
    94     void InitSettingsModelL();
       
    95     
       
    96     /**
       
    97      * Loads all settings data from the mSettingsModel to items.
       
    98      */
       
    99     void loadSettings();
       
   100     
       
   101 private:
       
   102     
       
   103     /**
       
   104      * Item data helper given by the CP framework.
       
   105      */
       
   106     CpItemDataHelper& mItemDataHelper;
       
   107     
       
   108     /**
       
   109      * The settings model where settings are loaded and saved.
       
   110      */
       
   111     CMPSettingsModel* mSettingsModel;
       
   112     
       
   113     /**
       
   114      * The access point multiselect item.
       
   115      */
       
   116     VideoSettingsAccessPointEntry *mAccessPointItem;
       
   117     
       
   118     /**
       
   119      * The lowest UDP port text item.
       
   120      */
       
   121     CpSettingFormItemData *mLowestUDPPortItem;
       
   122     
       
   123     /**
       
   124      * The highest UDP port text item.
       
   125      */
       
   126     CpSettingFormItemData *mHighestUDPPortItem;
       
   127     
       
   128     /**
       
   129      * The use proxy checkbox item.
       
   130      */
       
   131     CpSettingFormItemData *mUseProxyItem;
       
   132     
       
   133     /**
       
   134      * The proxy server text item.
       
   135      */
       
   136     CpSettingFormItemData *mProxyServerItem;
       
   137     
       
   138     /**
       
   139      * The proxy port text item.
       
   140      */
       
   141     CpSettingFormItemData *mProxyPortItem;
       
   142 };
       
   143 
       
   144 #endif // VIDEOSETTINGSGROUP_H