#include <AudioDial.h>
Collaboration diagram for AudioDial:

Move the mouse up or right to increment the value, down or left to decrement it. AudioDial also responds to the mouse wheel.
The programming interface for this widget is compatible with QDial, with the addition of properties for the knob colour and meter colour and a boolean property mouseDial that determines whether to respond to radial mouse motion in the same way as QDial (the default is no).
Definition at line 59 of file AudioDial.h.
Public Slots | |
| void | setKnobColor (const QColor &color) |
| Set the colour of the knob. | |
| void | setMeterColor (const QColor &color) |
| Set the colour of the meter (the highlighted area around the knob that shows the current value). | |
| void | setMouseDial (bool mouseDial) |
| Specify that the dial should respond to radial mouse movements in the same way as QDial. | |
| void | setDefaultValue (int defaultValue) |
| void | setValue (int value) |
| void | setDefaultMappedValue (float mappedValue) |
| void | setMappedValue (float mappedValue) |
| void | setToDefault () |
Signals | |
| void | mouseEntered () |
| void | mouseLeft () |
Public Member Functions | |
| AudioDial (QWidget *parent=0) | |
| ~AudioDial () | |
| const QColor & | getKnobColor () const |
| const QColor & | getMeterColor () const |
| bool | getMouseDial () const |
| void | setRangeMapper (RangeMapper *mapper) |
| const RangeMapper * | rangeMapper () const |
| float | mappedValue () const |
| int | defaultValue () const |
| void | setShowToolTip (bool show) |
Protected Slots | |
| void | updateMappedValue (int value) |
Protected Member Functions | |
| void | drawTick (QPainter &paint, float angle, int size, bool internal) |
| virtual void | paintEvent (QPaintEvent *) |
| virtual void | mousePressEvent (QMouseEvent *pMouseEvent) |
| virtual void | mouseMoveEvent (QMouseEvent *pMouseEvent) |
| virtual void | mouseReleaseEvent (QMouseEvent *pMouseEvent) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *pMouseEvent) |
| virtual void | enterEvent (QEvent *) |
| virtual void | leaveEvent (QEvent *) |
Properties | |
| QColor | knobColor [] |
| QColor | meterColor [] |
| bool | mouseDial [] |
Private Attributes | |
| QColor | m_knobColor |
| QColor | m_meterColor |
| int | m_defaultValue |
| float | m_defaultMappedValue |
| float | m_mappedValue |
| bool | m_noMappedUpdate |
| bool | m_mouseDial |
| bool | m_mousePressed |
| QPoint | m_posMouse |
| bool | m_showTooltip |
| RangeMapper * | m_rangeMapper |
| AudioDial::AudioDial | ( | QWidget * | parent = 0 |
) |
| AudioDial::~AudioDial | ( | ) |
| const QColor& AudioDial::getKnobColor | ( | ) | const [inline] |
| const QColor& AudioDial::getMeterColor | ( | ) | const [inline] |
| bool AudioDial::getMouseDial | ( | ) | const [inline] |
| void AudioDial::setRangeMapper | ( | RangeMapper * | mapper | ) |
Definition at line 98 of file AudioDial.cpp.
References m_rangeMapper, and updateMappedValue().
Referenced by MainWindow::MainWindow(), PluginParameterBox::populate(), PropertyBox::populateViewPlayFrame(), and PropertyBox::updatePropertyEditor().
| const RangeMapper* AudioDial::rangeMapper | ( | ) | const [inline] |
Definition at line 75 of file AudioDial.h.
References m_rangeMapper.
Referenced by PluginParameterBox::dialChanged(), PluginParameterBox::spinBoxChanged(), and PropertyBox::updateContextHelp().
| float AudioDial::mappedValue | ( | ) | const |
Definition at line 386 of file AudioDial.cpp.
References m_mappedValue, and m_rangeMapper.
Referenced by PluginParameterBox::dialChanged(), MainWindow::playSpeedChanged(), and PropertyBox::updateContextHelp().
| int AudioDial::defaultValue | ( | ) | const [inline] |
Definition at line 78 of file AudioDial.h.
References m_defaultValue.
Referenced by MainWindow::restoreNormalPlayback().
| void AudioDial::setShowToolTip | ( | bool | show | ) |
Definition at line 377 of file AudioDial.cpp.
References m_noMappedUpdate, m_showTooltip, and updateMappedValue().
Referenced by MainWindow::MainWindow(), PluginParameterBox::populate(), PropertyBox::populateViewPlayFrame(), and PropertyBox::updatePropertyEditor().
| void AudioDial::mouseEntered | ( | ) | [signal] |
Referenced by enterEvent().
| void AudioDial::mouseLeft | ( | ) | [signal] |
Referenced by leaveEvent().
| void AudioDial::setKnobColor | ( | const QColor & | color | ) | [slot] |
Set the colour of the knob.
The default is to inherit the colour from the widget's palette.
Definition at line 315 of file AudioDial.cpp.
References m_knobColor.
| void AudioDial::setMeterColor | ( | const QColor & | color | ) | [slot] |
Set the colour of the meter (the highlighted area around the knob that shows the current value).
The default is to inherit the colour from the widget's palette.
Definition at line 322 of file AudioDial.cpp.
References m_meterColor.
Referenced by PropertyBox::populateViewPlayFrame().
| void AudioDial::setMouseDial | ( | bool | mouseDial | ) | [slot] |
Specify that the dial should respond to radial mouse movements in the same way as QDial.
Definition at line 329 of file AudioDial.cpp.
References m_mouseDial.
| void AudioDial::setDefaultValue | ( | int | defaultValue | ) | [slot] |
Definition at line 335 of file AudioDial.cpp.
References RangeMapper::getValueForPosition(), m_defaultMappedValue, m_defaultValue, and m_rangeMapper.
Referenced by MainWindow::MainWindow(), PluginParameterBox::populate(), PropertyBox::populateViewPlayFrame(), and PropertyBox::updatePropertyEditor().
| void AudioDial::setValue | ( | int | value | ) | [slot] |
Definition at line 343 of file AudioDial.cpp.
References updateMappedValue().
Referenced by MainWindow::MainWindow(), mouseDoubleClickEvent(), PluginParameterBox::populate(), MainWindow::restoreNormalPlayback(), setMappedValue(), setToDefault(), MainWindow::slowDownPlayback(), MainWindow::speedUpPlayback(), PluginParameterBox::spinBoxChanged(), and PropertyBox::updatePropertyEditor().
| void AudioDial::setDefaultMappedValue | ( | float | mappedValue | ) | [slot] |
Definition at line 349 of file AudioDial.cpp.
References RangeMapper::getPositionForValue(), m_defaultMappedValue, m_defaultValue, and m_rangeMapper.
| void AudioDial::setMappedValue | ( | float | mappedValue | ) | [slot] |
Definition at line 357 of file AudioDial.cpp.
References RangeMapper::getPositionForValue(), m_mappedValue, m_noMappedUpdate, m_rangeMapper, and setValue().
Referenced by MainWindow::handleOSCMessage(), mouseDoubleClickEvent(), setToDefault(), and PluginParameterBox::spinBoxChanged().
| void AudioDial::setToDefault | ( | ) | [slot] |
Definition at line 421 of file AudioDial.cpp.
References m_defaultMappedValue, m_defaultValue, m_rangeMapper, setMappedValue(), and setValue().
Referenced by mousePressEvent().
| void AudioDial::drawTick | ( | QPainter & | paint, | |
| float | angle, | |||
| int | size, | |||
| bool | internal | |||
| ) | [protected] |
| void AudioDial::paintEvent | ( | QPaintEvent * | ) | [protected, virtual] |
Definition at line 116 of file AudioDial.cpp.
References AUDIO_DIAL_MAX, AUDIO_DIAL_MIN, AUDIO_DIAL_RANGE, drawTick(), knobColor, m_knobColor, m_meterColor, and meterColor.
| void AudioDial::mousePressEvent | ( | QMouseEvent * | pMouseEvent | ) | [protected, virtual] |
Definition at line 434 of file AudioDial.cpp.
References m_mouseDial, m_mousePressed, m_posMouse, and setToDefault().
| void AudioDial::mouseMoveEvent | ( | QMouseEvent * | pMouseEvent | ) | [protected, virtual] |
Definition at line 523 of file AudioDial.cpp.
References m_mouseDial, m_mousePressed, and m_posMouse.
| void AudioDial::mouseReleaseEvent | ( | QMouseEvent * | pMouseEvent | ) | [protected, virtual] |
| void AudioDial::mouseDoubleClickEvent | ( | QMouseEvent * | pMouseEvent | ) | [protected, virtual] |
Definition at line 449 of file AudioDial.cpp.
References RangeMapper::getUnit(), RangeMapper::getValueForPosition(), m_mappedValue, m_mouseDial, m_rangeMapper, setMappedValue(), and setValue().
| void AudioDial::enterEvent | ( | QEvent * | ) | [protected, virtual] |
| void AudioDial::leaveEvent | ( | QEvent * | ) | [protected, virtual] |
| void AudioDial::updateMappedValue | ( | int | value | ) | [protected, slot] |
Definition at line 396 of file AudioDial.cpp.
References RangeMapper::getUnit(), m_mappedValue, m_noMappedUpdate, m_rangeMapper, and m_showTooltip.
Referenced by setRangeMapper(), setShowToolTip(), and setValue().
QColor AudioDial::m_knobColor [private] |
Definition at line 132 of file AudioDial.h.
Referenced by getKnobColor(), paintEvent(), and setKnobColor().
QColor AudioDial::m_meterColor [private] |
Definition at line 133 of file AudioDial.h.
Referenced by getMeterColor(), paintEvent(), and setMeterColor().
int AudioDial::m_defaultValue [private] |
Definition at line 135 of file AudioDial.h.
Referenced by defaultValue(), setDefaultMappedValue(), setDefaultValue(), and setToDefault().
float AudioDial::m_defaultMappedValue [private] |
Definition at line 136 of file AudioDial.h.
Referenced by setDefaultMappedValue(), setDefaultValue(), and setToDefault().
float AudioDial::m_mappedValue [private] |
Definition at line 137 of file AudioDial.h.
Referenced by mappedValue(), mouseDoubleClickEvent(), setMappedValue(), and updateMappedValue().
bool AudioDial::m_noMappedUpdate [private] |
Definition at line 138 of file AudioDial.h.
Referenced by setMappedValue(), setShowToolTip(), and updateMappedValue().
bool AudioDial::m_mouseDial [private] |
Definition at line 141 of file AudioDial.h.
Referenced by AudioDial(), getMouseDial(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and setMouseDial().
bool AudioDial::m_mousePressed [private] |
Definition at line 142 of file AudioDial.h.
Referenced by AudioDial(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
QPoint AudioDial::m_posMouse [private] |
bool AudioDial::m_showTooltip [private] |
Definition at line 145 of file AudioDial.h.
Referenced by setShowToolTip(), and updateMappedValue().
RangeMapper* AudioDial::m_rangeMapper [private] |
Definition at line 147 of file AudioDial.h.
Referenced by mappedValue(), mouseDoubleClickEvent(), rangeMapper(), setDefaultMappedValue(), setDefaultValue(), setMappedValue(), setRangeMapper(), setToDefault(), updateMappedValue(), and ~AudioDial().
QColor AudioDial::knobColor [read, write] |
QColor AudioDial::meterColor [read, write] |
bool AudioDial::mouseDial [read, write] |
Definition at line 64 of file AudioDial.h.
1.5.1