utilities/mpmediacontroller/inc/mpvolumeslider.h
changeset 47 4cc1412daed0
equal deleted inserted replaced
45:612c4815aebe 47:4cc1412daed0
       
     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: Music Player volume slider.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MPVOLUMESLIDER_H
       
    19 #define MPVOLUMESLIDER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include "mpcommondefs.h"
       
    23 
       
    24 class MpEngine;
       
    25 class HbVolumeSliderPopup;
       
    26 
       
    27 class MpVolumeSlider : public QObject
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32 
       
    33     explicit MpVolumeSlider( QObject *parent = 0 );
       
    34     virtual ~MpVolumeSlider();
       
    35     void showVolumeSlider();
       
    36 
       
    37 public slots:
       
    38 
       
    39     // To handle Engine signals
       
    40     void handleVolumeProperty( MpCommon::MpVolumeProperty property, int value );
       
    41 
       
    42     // To handle VolumeSlider signals
       
    43     void sliderPressed();
       
    44     void sliderReleased();
       
    45     void muteIconClicked();
       
    46     void volumeSliderChanged( int value );
       
    47 
       
    48 private:
       
    49 
       
    50     void initializeVolumeSliderPopup();
       
    51 
       
    52 private:
       
    53     Q_DISABLE_COPY(MpVolumeSlider)
       
    54 
       
    55     MpEngine                    *mMpEngine;             // not owned
       
    56     HbVolumeSliderPopup         *mVolumeSliderPopup;    // owned
       
    57     int                          mEngineVolumeMax;
       
    58     int                          mEngineVolumeLevel;
       
    59     bool                         mEngineMuted;
       
    60     int                          mEngineDataCompleted;  // 0x01 volume max, 0x02 volume level, 0x04 volume mute
       
    61     bool                         mSliderPressed;
       
    62     int                          mSliderStep;           // VolumeLevelMax / DefaultSteps
       
    63 };
       
    64 
       
    65 #endif // MPVOLUMESLIDER_H