mpviewplugins/mpsettingsviewplugin/src/mpmpxasframeworkwrapper.cpp
changeset 20 82baf59ce8dd
equal deleted inserted replaced
19:4e84c994a771 20:82baf59ce8dd
       
     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: Framework wraper for Audio Settings.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "mpmpxasframeworkwrapper.h"
       
    19 #include "mpmpxasframeworkwrapper_p.h"
       
    20 #include "mptrace.h"
       
    21 
       
    22 /*!
       
    23     \class MpMpxAsFrameworkWrapper
       
    24     \brief Wrapper for mpx framework utilities.
       
    25 
       
    26     MPX framework wrapper provides Qt style interface to the MPX framework
       
    27     utilities. Its implementation is hidden using private class data pattern.
       
    28 */
       
    29 
       
    30 /*!
       
    31  Constructor.
       
    32  */
       
    33 MpMpxAsFrameworkWrapper::MpMpxAsFrameworkWrapper()
       
    34     :d_ptr( new MpMpxAsFrameworkWrapperPrivate() )
       
    35 {
       
    36     d_ptr->init();
       
    37 }
       
    38 
       
    39 /*!
       
    40  Destructor.
       
    41  */
       
    42 MpMpxAsFrameworkWrapper::~MpMpxAsFrameworkWrapper()
       
    43 {
       
    44     TX_ENTRY
       
    45     delete d_ptr;
       
    46     TX_EXIT
       
    47 }
       
    48 
       
    49 
       
    50 /*!
       
    51  Returns the current persistent balance.
       
    52  */
       
    53 int MpMpxAsFrameworkWrapper::balance()
       
    54 {
       
    55     TX_LOG
       
    56     return d_ptr->balance();
       
    57 }
       
    58 
       
    59 /*!
       
    60  Returns the current persistent loudness.
       
    61  */
       
    62 bool MpMpxAsFrameworkWrapper::loudness()
       
    63 {
       
    64     TX_LOG
       
    65     return d_ptr->loudness();
       
    66 }
       
    67 
       
    68 /*!
       
    69  Slot to handle a change to the balance.
       
    70  */
       
    71 void MpMpxAsFrameworkWrapper::setBalance( int balance )
       
    72 {
       
    73     TX_ENTRY
       
    74     d_ptr->setBalance( balance );
       
    75     TX_EXIT
       
    76 }
       
    77 
       
    78 /*!
       
    79  Slot to handle a change to the loudness.
       
    80  */
       
    81 void MpMpxAsFrameworkWrapper::setLoudness( bool mode )
       
    82 {
       
    83     TX_ENTRY
       
    84     d_ptr->setLoudness( mode );
       
    85     TX_EXIT
       
    86 }