comparison base/PlayParameterRepository.cpp @ 117:c30728d5625c sv1-v0.9rc1

* Make vertical scale alignment modes work in note layer as well as time-value layer, and several significant fixes to it * Make it possible to draw notes properly on the note layer * Show units (and frequencies etc in note layer's case) in the time-value and note layer description boxes * Minor fix to item edit dialog layout * Some minor menu rearrangement * Comment out a lot of debug output * Add SV website and reference URLs to Help menu, and add code to (attempt to) open them in the user's preferred browser
author Chris Cannam
date Fri, 12 May 2006 14:40:43 +0000
parents b2067aff8cd6
children 82f529a08cf3
comparison
equal deleted inserted replaced
116:a08718723b20 117:c30728d5625c
37 } 37 }
38 38
39 void 39 void
40 PlayParameterRepository::addModel(const Model *model) 40 PlayParameterRepository::addModel(const Model *model)
41 { 41 {
42 std::cerr << "PlayParameterRepository:addModel " << model << std::endl; 42 // std::cerr << "PlayParameterRepository:addModel " << model << std::endl;
43 43
44 if (!getPlayParameters(model)) { 44 if (!getPlayParameters(model)) {
45 45
46 // Give all models the same type of play parameters for the 46 // Give all models the same type of play parameters for the
47 // moment, provided they can be played at all 47 // moment, provided they can be played at all
48 48
49 if (AudioGenerator::canPlay(model)) { 49 if (AudioGenerator::canPlay(model)) {
50 50
51 std::cerr << "PlayParameterRepository: Adding play parameters for " << model << std::endl; 51 // std::cerr << "PlayParameterRepository: Adding play parameters for " << model << std::endl;
52 52
53 PlayParameters *params = new PlayParameters; 53 PlayParameters *params = new PlayParameters;
54 m_playParameters[model] = params; 54 m_playParameters[model] = params;
55 55
56 params->setPlayPluginId 56 params->setPlayPluginId
66 this, SLOT(playPluginIdChanged(QString))); 66 this, SLOT(playPluginIdChanged(QString)));
67 67
68 connect(params, SIGNAL(playPluginConfigurationChanged(QString)), 68 connect(params, SIGNAL(playPluginConfigurationChanged(QString)),
69 this, SLOT(playPluginConfigurationChanged(QString))); 69 this, SLOT(playPluginConfigurationChanged(QString)));
70 70
71 std::cerr << "Connected play parameters " << params << " for model " 71 // std::cerr << "Connected play parameters " << params << " for model "
72 << model << " to this " << this << std::endl; 72 // << model << " to this " << this << std::endl;
73 73
74 } else { 74 } else {
75 75
76 std::cerr << "PlayParameterRepository: Model " << model << " not playable" << std::endl; 76 // std::cerr << "PlayParameterRepository: Model " << model << " not playable" << std::endl;
77 } 77 }
78 } 78 }
79 } 79 }
80 80
81 void 81 void
114 114
115 void 115 void
116 PlayParameterRepository::playPluginConfigurationChanged(QString config) 116 PlayParameterRepository::playPluginConfigurationChanged(QString config)
117 { 117 {
118 PlayParameters *params = dynamic_cast<PlayParameters *>(sender()); 118 PlayParameters *params = dynamic_cast<PlayParameters *>(sender());
119 std::cerr << "PlayParameterRepository::playPluginConfigurationChanged" << std::endl; 119 // std::cerr << "PlayParameterRepository::playPluginConfigurationChanged" << std::endl;
120 for (ModelParameterMap::iterator i = m_playParameters.begin(); 120 for (ModelParameterMap::iterator i = m_playParameters.begin();
121 i != m_playParameters.end(); ++i) { 121 i != m_playParameters.end(); ++i) {
122 if (i->second == params) { 122 if (i->second == params) {
123 emit playPluginConfigurationChanged(i->first, config); 123 emit playPluginConfigurationChanged(i->first, config);
124 return; 124 return;
127 } 127 }
128 128
129 void 129 void
130 PlayParameterRepository::clear() 130 PlayParameterRepository::clear()
131 { 131 {
132 std::cerr << "PlayParameterRepository: PlayParameterRepository::clear" << std::endl; 132 // std::cerr << "PlayParameterRepository: PlayParameterRepository::clear" << std::endl;
133 while (!m_playParameters.empty()) { 133 while (!m_playParameters.empty()) {
134 delete m_playParameters.begin()->second; 134 delete m_playParameters.begin()->second;
135 m_playParameters.erase(m_playParameters.begin()); 135 m_playParameters.erase(m_playParameters.begin());
136 } 136 }
137 } 137 }