diff widgets/AudioDial.cpp @ 189:5b7472db612b

* Add large chunks of context help in the optional status bar * Add an extra overlay mode in which even the centre frame is disabled * Fixes to FTP retrieval
author Chris Cannam
date Fri, 19 Jan 2007 13:13:14 +0000
parents e7cf6044c2a0
children 53835534a9d3
line wrap: on
line diff
--- a/widgets/AudioDial.cpp	Fri Jan 12 21:52:56 2007 +0000
+++ b/widgets/AudioDial.cpp	Fri Jan 19 13:13:14 2007 +0000
@@ -66,6 +66,9 @@
 #define AUDIO_DIAL_RANGE (AUDIO_DIAL_MAX - AUDIO_DIAL_MIN)
 
 
+static int dialsExtant = 0;
+
+
 // Constructor.
 AudioDial::AudioDial(QWidget *parent) :
     QDial(parent),
@@ -79,6 +82,7 @@
 {
     m_mouseDial = false;
     m_mousePressed = false;
+    ++dialsExtant;
 }
 
 
@@ -86,11 +90,14 @@
 AudioDial::~AudioDial (void)
 {
     delete m_rangeMapper;
+    --dialsExtant;
 }
 
 
 void AudioDial::setRangeMapper(RangeMapper *mapper)
 {
+    std::cerr << "AudioDial[" << this << "][\"" << objectName().toStdString() << "\"::setRangeMapper(" << mapper << ") [current is " << m_rangeMapper << "] (have " << dialsExtant << " dials extant)" << std::endl;
+
     if (m_rangeMapper == mapper) return;
 
     if (!m_rangeMapper && mapper) {
@@ -515,6 +522,20 @@
     }
 }
 
+void
+AudioDial::enterEvent(QEvent *e)
+{
+    QDial::enterEvent(e);
+    emit mouseEntered();
+}
+
+void
+AudioDial::leaveEvent(QEvent *e)
+{
+    QDial::enterEvent(e);
+    emit mouseLeft();
+}
+
 #ifdef INCLUDE_MOCFILES
 #include "AudioDial.moc.cpp"
 #endif