annotate base/PlayParameterRepository.h @ 313:29485aa03da4

* Make drop behave more sensibly (replace current pane)
author Chris Cannam
date Wed, 17 Oct 2007 12:58:45 +0000
parents 41d64b873d87
children 5858cc462d0a
rev   line source
Chris@49 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@28 2
Chris@28 3 /*
Chris@52 4 Sonic Visualiser
Chris@52 5 An audio file viewer and annotation editor.
Chris@52 6 Centre for Digital Music, Queen Mary, University of London.
Chris@52 7 This file copyright 2006 Chris Cannam.
Chris@28 8
Chris@52 9 This program is free software; you can redistribute it and/or
Chris@52 10 modify it under the terms of the GNU General Public License as
Chris@52 11 published by the Free Software Foundation; either version 2 of the
Chris@52 12 License, or (at your option) any later version. See the file
Chris@52 13 COPYING included with this distribution for more information.
Chris@28 14 */
Chris@28 15
Chris@28 16 #ifndef _PLAY_PARAMETER_REPOSITORY_H_
Chris@28 17 #define _PLAY_PARAMETER_REPOSITORY_H_
Chris@28 18
Chris@28 19 class PlayParameters;
Chris@28 20 class Model;
Chris@28 21
Chris@28 22 #include <map>
Chris@28 23
Chris@29 24 #include <QObject>
Chris@29 25
Chris@29 26 class PlayParameterRepository : public QObject
Chris@28 27 {
Chris@29 28 Q_OBJECT
Chris@29 29
Chris@28 30 public:
Chris@145 31 static PlayParameterRepository *getInstance();
Chris@28 32
Chris@28 33 virtual ~PlayParameterRepository();
Chris@28 34
Chris@30 35 void addModel(const Model *model);
Chris@30 36 void removeModel(const Model *model);
Chris@284 37 void copyParameters(const Model *from, const Model *to);
Chris@30 38
Chris@284 39 PlayParameters *getPlayParameters(const Model *model);
Chris@28 40
Chris@28 41 void clear();
Chris@28 42
Chris@29 43 signals:
Chris@29 44 void playParametersChanged(PlayParameters *);
Chris@57 45 void playPluginIdChanged(const Model *, QString);
Chris@57 46 void playPluginConfigurationChanged(const Model *, QString);
Chris@29 47
Chris@29 48 protected slots:
Chris@29 49 void playParametersChanged();
Chris@57 50 void playPluginIdChanged(QString);
Chris@57 51 void playPluginConfigurationChanged(QString);
Chris@29 52
Chris@28 53 protected:
Chris@57 54 typedef std::map<const Model *, PlayParameters *> ModelParameterMap;
Chris@57 55 ModelParameterMap m_playParameters;
Chris@28 56
Chris@28 57 static PlayParameterRepository *m_instance;
Chris@28 58 };
Chris@28 59
Chris@28 60 #endif