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