PlayParameterRepository.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_PARAMETER_REPOSITORY_H_
00017 #define _PLAY_PARAMETER_REPOSITORY_H_
00018 
00019 class PlayParameters;
00020 class Model;
00021 
00022 #include <map>
00023 
00024 #include <QObject>
00025 
00026 class PlayParameterRepository : public QObject
00027 {
00028     Q_OBJECT
00029 
00030 public:
00031     static PlayParameterRepository *getInstance();
00032 
00033     virtual ~PlayParameterRepository();
00034 
00035     void addModel(const Model *model);
00036     void removeModel(const Model *model);
00037     void copyParameters(const Model *from, const Model *to);
00038 
00039     PlayParameters *getPlayParameters(const Model *model);
00040 
00041     void clear();
00042 
00043 signals:
00044     void playParametersChanged(PlayParameters *);
00045     void playPluginIdChanged(const Model *, QString);
00046     void playPluginConfigurationChanged(const Model *, QString);
00047 
00048 protected slots:
00049     void playParametersChanged();
00050     void playPluginIdChanged(QString);
00051     void playPluginConfigurationChanged(QString);
00052 
00053 protected:
00054     typedef std::map<const Model *, PlayParameters *> ModelParameterMap;
00055     ModelParameterMap m_playParameters;
00056 
00057     static PlayParameterRepository *m_instance;
00058 };
00059 
00060 #endif

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