|
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: Wrapper for equalizer framework. |
|
15 * |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include <QStringList> |
|
20 #include <QDebug> |
|
21 |
|
22 // User includes |
|
23 #include "mpequalizerframeworkwrapper.h" |
|
24 #include "mpequalizerframeworkwrapper_p.h" |
|
25 #include "mptrace.h" |
|
26 |
|
27 /*! |
|
28 \class MpEqualizerFrameworkWrapper |
|
29 \ingroup musicplayer |
|
30 \brief Wrapper for equalizer framework. |
|
31 \since 10.1 |
|
32 |
|
33 Equalizer wrapper provides Qt style interface to the audio equalizer |
|
34 utilities. Its implementation is hidden using private class data pattern. |
|
35 |
|
36 This class defines several APIs that are needed from \a MpPlaybackView |
|
37 and other components in \a mpplaybackviewplugin. |
|
38 |
|
39 \sa MpEqualizerFrameworkWrapperPrivate |
|
40 */ |
|
41 |
|
42 /*! |
|
43 \fn MpEqualizerFrameworkWrapper::equalizerReady() |
|
44 |
|
45 This signal will be emitted when Audio Eqalizer is initialized. This is |
|
46 when all APIs, like \a applyPreset, are ready to be used. |
|
47 |
|
48 \sa MpEqualizerFrameworkWrapperPrivate::MapcInitComplete |
|
49 */ |
|
50 |
|
51 /*! |
|
52 Constructs a new MpEqualizerFrameworkWrapper with \a parent and initializes |
|
53 private imaplementation. |
|
54 |
|
55 */ |
|
56 MpEqualizerFrameworkWrapper::MpEqualizerFrameworkWrapper( QObject *parent ) |
|
57 : QObject(parent) |
|
58 { |
|
59 TX_ENTRY |
|
60 |
|
61 d_ptr = new MpEqualizerFrameworkWrapperPrivate(this); |
|
62 d_ptr->init(); |
|
63 |
|
64 TX_EXIT |
|
65 } |
|
66 |
|
67 /*! |
|
68 Destructs the class and its private imaplementation. |
|
69 |
|
70 */ |
|
71 MpEqualizerFrameworkWrapper::~MpEqualizerFrameworkWrapper() |
|
72 { |
|
73 TX_LOG |
|
74 |
|
75 delete d_ptr; |
|
76 } |
|
77 |
|
78 /*! |
|
79 Get the preset name key by giving \a presetIndex. The command then |
|
80 relays to its private implementation. |
|
81 |
|
82 */ |
|
83 int MpEqualizerFrameworkWrapper::getPresetNameKey( int presetIndex ) |
|
84 { |
|
85 TX_LOG_ARGS( "Preset index: " << presetIndex ); |
|
86 |
|
87 return d_ptr->getPresetNameKey( presetIndex ); |
|
88 } |
|
89 |
|
90 /*! |
|
91 Get the preset index by giving \a presetNameKey. The command then |
|
92 relays to its private implementation. |
|
93 |
|
94 */ |
|
95 int MpEqualizerFrameworkWrapper::getPresetIndex( int presetNameKey ) |
|
96 { |
|
97 TX_LOG_ARGS( "Preset name key: " << presetNameKey ); |
|
98 |
|
99 return d_ptr->getPresetIndex( presetNameKey ); |
|
100 } |
|
101 |
|
102 /*! |
|
103 Returning the list of availale preset names. The command then relays to its |
|
104 private implementation. |
|
105 |
|
106 */ |
|
107 QStringList MpEqualizerFrameworkWrapper::presetNames() |
|
108 { |
|
109 return d_ptr->presetNames(); |
|
110 } |
|
111 |
|
112 //End of File |