summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractaudioeffect.h
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-01-11 15:03:29 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-01-11 15:03:29 (GMT)
commit483893142dcec15c646ef997309dcede76466766 (patch)
treeaf4293d7b6caab658f07cabd52788cc01292871e /src/3rdparty/phonon/mmf/abstractaudioeffect.h
parente4f2a7f7aae733df87a60f0e9b32dd4d4f6ddcd0 (diff)
downloadQt-483893142dcec15c646ef997309dcede76466766.zip
Qt-483893142dcec15c646ef997309dcede76466766.tar.gz
Qt-483893142dcec15c646ef997309dcede76466766.tar.bz2
Modified effect parameter handling to improve user experience
This change is to work around a limitation in the Phonon::EffectWidget class. This widget only displays sliders for parameters with numeric values if the variant type of the parameter is QReal and the range is exactly -1.0 to +1.0; otherwise, a spinbox is displayed. This is rather inconvenient for many effects, such as the audio equalizer, for which a slider is a much more natural UI control. The MMF backend therefore reports the type of numeric parameters to be QReal, and the range to be -1.0 to +1.0. Internally, the integer range for the parameter is stored. Changes to the parameter value are converted from the client-side, floating point representation to the internal, integer representation. Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractaudioeffect.h')
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index df1d08a..4772eb8 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -24,9 +24,9 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <AudioEffectBase.h>
#include <Phonon/EffectInterface>
-#include <Phonon/EffectParameter>
#include "audioplayer.h"
+#include "effectparameter.h"
#include "mmf_medianode.h"
#include "mmf_videoplayer.h"
@@ -63,9 +63,10 @@ public:
AbstractAudioEffect(QObject *parent,
const QList<EffectParameter> &params);
- virtual QList<EffectParameter> parameters() const;
- virtual QVariant parameterValue(const EffectParameter &param) const;
- virtual void setParameterValue(const EffectParameter &,
+ // Phonon::EffectInterface
+ virtual QList<Phonon::EffectParameter> parameters() const;
+ virtual QVariant parameterValue(const Phonon::EffectParameter &param) const;
+ virtual void setParameterValue(const Phonon::EffectParameter &,
const QVariant &newValue);
protected:
@@ -81,10 +82,10 @@ protected:
protected:
QScopedPointer<CAudioEffect> m_effect;
+ const QList<EffectParameter> m_params;
private:
AbstractMediaPlayer * m_player;
- const QList<EffectParameter> m_params;
QHash<int, QVariant> m_values;
};