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