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