comparison widgets/AudioDial.cpp @ 212:e554ab9a4408

* Make audio file reader factory try for a reader based on the file's extension, before trying all readers * Remove some debug output
author Chris Cannam
date Thu, 01 Mar 2007 12:15:08 +0000
parents 6969f21da18a
children 1fff998ae4a9
comparison
equal deleted inserted replaced
211:e2baee498ec8 212:e554ab9a4408
64 #define AUDIO_DIAL_MIN (0.25 * M_PI) 64 #define AUDIO_DIAL_MIN (0.25 * M_PI)
65 #define AUDIO_DIAL_MAX (1.75 * M_PI) 65 #define AUDIO_DIAL_MAX (1.75 * M_PI)
66 #define AUDIO_DIAL_RANGE (AUDIO_DIAL_MAX - AUDIO_DIAL_MIN) 66 #define AUDIO_DIAL_RANGE (AUDIO_DIAL_MAX - AUDIO_DIAL_MIN)
67 67
68 68
69 static int dialsExtant = 0; 69 //static int dialsExtant = 0;
70 70
71 71
72 // Constructor. 72 // Constructor.
73 AudioDial::AudioDial(QWidget *parent) : 73 AudioDial::AudioDial(QWidget *parent) :
74 QDial(parent), 74 QDial(parent),
80 m_showTooltip(true), 80 m_showTooltip(true),
81 m_rangeMapper(0) 81 m_rangeMapper(0)
82 { 82 {
83 m_mouseDial = false; 83 m_mouseDial = false;
84 m_mousePressed = false; 84 m_mousePressed = false;
85 ++dialsExtant; 85 // ++dialsExtant;
86 } 86 }
87 87
88 88
89 // Destructor. 89 // Destructor.
90 AudioDial::~AudioDial (void) 90 AudioDial::~AudioDial (void)
91 { 91 {
92 delete m_rangeMapper; 92 delete m_rangeMapper;
93 --dialsExtant; 93 // --dialsExtant;
94 } 94 }
95 95
96 96
97 void AudioDial::setRangeMapper(RangeMapper *mapper) 97 void AudioDial::setRangeMapper(RangeMapper *mapper)
98 { 98 {
99 std::cerr << "AudioDial[" << this << "][\"" << objectName().toStdString() << "\"::setRangeMapper(" << mapper << ") [current is " << m_rangeMapper << "] (have " << dialsExtant << " dials extant)" << std::endl; 99 // std::cerr << "AudioDial[" << this << "][\"" << objectName().toStdString() << "\"::setRangeMapper(" << mapper << ") [current is " << m_rangeMapper << "] (have " << dialsExtant << " dials extant)" << std::endl;
100 100
101 if (m_rangeMapper == mapper) return; 101 if (m_rangeMapper == mapper) return;
102 102
103 if (!m_rangeMapper && mapper) { 103 if (!m_rangeMapper && mapper) {
104 connect(this, SIGNAL(valueChanged(int)), 104 connect(this, SIGNAL(valueChanged(int)),