comparison widgets/AudioDial.cpp @ 382:06b5f110c5d2

* Speed up spectrogram painting by releasing mutex in FFTDataServer while calculating data prior to writing it, and by adding whole-column value query methods to FFT objects * Add paint cache to Thumbwheel -- repaints of this widget were slowing down the whole spectrogram repaint * More uses of MutexLocker (named and with debug) and more profile points * Make startup much quicker some of the time, with OSC server in place
author Chris Cannam
date Thu, 08 May 2008 14:46:22 +0000
parents 832d246b327b
children 33c2f268c950
comparison
equal deleted inserted replaced
380:a6408c382616 382:06b5f110c5d2
48 #include <QColormap> 48 #include <QColormap>
49 #include <QMouseEvent> 49 #include <QMouseEvent>
50 #include <QPaintEvent> 50 #include <QPaintEvent>
51 #include <QInputDialog> 51 #include <QInputDialog>
52 52
53 #include "base/Profiler.h"
54
53 using std::endl; 55 using std::endl;
54 using std::cerr; 56 using std::cerr;
55 57
56 58
57 //!!! 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
113 } 115 }
114 116
115 117
116 void AudioDial::paintEvent(QPaintEvent *) 118 void AudioDial::paintEvent(QPaintEvent *)
117 { 119 {
120 Profiler profiler("AudioDial::paintEvent");
121
118 QPainter paint; 122 QPainter paint;
119 123
120 float angle = AUDIO_DIAL_MIN // offset 124 float angle = AUDIO_DIAL_MIN // offset
121 + (AUDIO_DIAL_RANGE * 125 + (AUDIO_DIAL_RANGE *
122 (float(QDial::value() - QDial::minimum()) / 126 (float(QDial::value() - QDial::minimum()) /