PlayParameters.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file copyright 2006 Chris Cannam.
00008     
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef _PLAY_PARAMETERS_H_
00017 #define _PLAY_PARAMETERS_H_
00018 
00019 #include <QObject>
00020 
00021 #include "XmlExportable.h"
00022 
00023 class PlayParameters : public QObject, public XmlExportable
00024 {
00025     Q_OBJECT
00026 
00027 public:
00028     PlayParameters() : m_playMuted(false), m_playPan(0.0), m_playGain(1.0) { }
00029 
00030     virtual bool isPlayMuted() const { return m_playMuted; }
00031     virtual float getPlayPan() const { return m_playPan; } // -1.0 -> 1.0
00032     virtual float getPlayGain() const { return m_playGain; }
00033 
00034     virtual QString getPlayPluginId() const { return m_playPluginId; } 
00035     virtual QString getPlayPluginConfiguration() const { return m_playPluginConfiguration; }
00036 
00037     virtual void copyFrom(const PlayParameters *);
00038 
00039     virtual void toXml(QTextStream &stream,
00040                        QString indent = "",
00041                        QString extraAttributes = "") const;
00042 
00043 public slots:
00044     virtual void setPlayMuted(bool muted);
00045     virtual void setPlayAudible(bool nonMuted);
00046     virtual void setPlayPan(float pan);
00047     virtual void setPlayGain(float gain);
00048     virtual void setPlayPluginId(QString id);
00049     virtual void setPlayPluginConfiguration(QString configuration);
00050 
00051 signals:
00052     void playParametersChanged();
00053     void playMutedChanged(bool);
00054     void playAudibleChanged(bool);
00055     void playPanChanged(float);
00056     void playGainChanged(float);
00057     void playPluginIdChanged(QString);
00058     void playPluginConfigurationChanged(QString);
00059 
00060 protected:
00061     bool m_playMuted;
00062     float m_playPan;
00063     float m_playGain;
00064     QString m_playPluginId;
00065     QString m_playPluginConfiguration;
00066 
00067 private:
00068     PlayParameters(const PlayParameters &);
00069     PlayParameters &operator=(const PlayParameters &);
00070 };
00071 
00072 #endif
00073 
00074     
00075 
00076     

Generated on Wed Feb 20 15:45:27 2008 for SonicVisualiser by  doxygen 1.5.1