comparison widgets/AudioDial.cpp @ 706:97ea68f62c1f imaf_enc

Merge from default branch
author Chris Cannam
date Thu, 05 Dec 2013 09:47:02 +0000
parents 1a0dfcbffaf1
children d26545a2a02d
comparison
equal deleted inserted replaced
678:26c5f7fd4807 706:97ea68f62c1f
50 #include <QPaintEvent> 50 #include <QPaintEvent>
51 #include <QInputDialog> 51 #include <QInputDialog>
52 52
53 #include "base/Profiler.h" 53 #include "base/Profiler.h"
54 54
55 using std::endl; 55
56 using std::cerr; 56
57 57
58 58
59 //!!! Pedro updated his version to use my up/down response code from RG -- need to grab that code in preference to this version from Rui 59 //!!! Pedro updated his version to use my up/down response code from RG -- need to grab that code in preference to this version from Rui
60 60
61 61
97 } 97 }
98 98
99 99
100 void AudioDial::setRangeMapper(RangeMapper *mapper) 100 void AudioDial::setRangeMapper(RangeMapper *mapper)
101 { 101 {
102 // std::cerr << "AudioDial[" << this << "][\"" << objectName() << "\"::setRangeMapper(" << mapper << ") [current is " << m_rangeMapper << "] (have " << dialsExtant << " dials extant)" << std::endl; 102 // cerr << "AudioDial[" << this << "][\"" << objectName() << "\"::setRangeMapper(" << mapper << ") [current is " << m_rangeMapper << "] (have " << dialsExtant << " dials extant)" << endl;
103 103
104 if (m_rangeMapper == mapper) return; 104 if (m_rangeMapper == mapper) return;
105 105
106 if (!m_rangeMapper && mapper) { 106 if (!m_rangeMapper && mapper) {
107 connect(this, SIGNAL(valueChanged(int)), 107 connect(this, SIGNAL(valueChanged(int)),
181 } 181 }
182 182
183 // Tick notches... 183 // Tick notches...
184 184
185 if ( notchesVisible() ) { 185 if ( notchesVisible() ) {
186 // std::cerr << "Notches visible" << std::endl; 186 // cerr << "Notches visible" << endl;
187 pen.setColor(palette().dark().color()); 187 pen.setColor(palette().dark().color());
188 pen.setWidth(scale); 188 pen.setWidth(scale);
189 paint.setPen(pen); 189 paint.setPen(pen);
190 for (int i = 0; i < numTicks; ++i) { 190 for (int i = 0; i < numTicks; ++i) {
191 int div = numTicks; 191 int div = numTicks;
200 c = meterColor; 200 c = meterColor;
201 pen.setColor(c); 201 pen.setColor(c);
202 pen.setWidth(indent); 202 pen.setWidth(indent);
203 paint.setPen(pen); 203 paint.setPen(pen);
204 204
205 // std::cerr << "degrees " << degrees << ", gives us " << -(degrees - 45) * 16 << std::endl; 205 // cerr << "degrees " << degrees << ", gives us " << -(degrees - 45) * 16 << endl;
206 206
207 int arcLen = -(degrees - 45) * 16; 207 int arcLen = -(degrees - 45) * 16;
208 if (arcLen == 0) arcLen = -16; 208 if (arcLen == 0) arcLen = -16;
209 209
210 paint.drawArc(indent/2, indent/2, 210 paint.drawArc(indent/2, indent/2,