|
hydrogen 1.2.3
|
Base class for active user input widget, which are not based on a high-level Qt widget. More...
#include <WidgetWithInput.h>
Signals | |
| void | valueChanged (WidgetWithInput *ref) |
Public Member Functions | |
| WidgetWithInput (QWidget *parent, bool bUseIntSteps, QString sBaseTooltip, int nScrollSpeed, int nScrollSpeedFast, float fMin, float fMax, bool bModifyOnChange) | |
| ~WidgetWithInput () | |
| QString | getBaseTooltip () const |
| float | getDefaultValue () const |
| bool | getIsActive () const |
| float | getMax () const |
| float | getMin () const |
| int | getScrollSpeed () const |
| int | getScrollSpeedFast () const |
| float | getValue () const |
| int | getWidgetHeight () const |
| int | getWidgetWidth () const |
| void | resetValueToDefault () |
| void | setBaseTooltip (const QString &sBaseTooltip) |
| void | setDefaultValue (float fDefaultValue) |
| void | setIsActive (bool bIsActive) |
| void | setMax (float fMax) |
| void | setMin (float fMin) |
| void | setScrollSpeed (int nScrollSpeed) const |
| void | setScrollSpeedFast (int nScrollSpeedFast) const |
| virtual void | setValue (float fValue, bool bTriggeredByUserInteraction=false) |
| void | setWidgetHeight (int nWidgetHeight) |
| void | setWidgetWidth (int nWidgetWidth) |
Public Member Functions inherited from MidiLearnable | |
| MidiLearnable () | |
| ~MidiLearnable () | |
| std::shared_ptr< Action > | getAction () const |
| void | midiMapChangedEvent () override |
| Update m_registeredMidiEvents since the underlying #H2Core::MidiMap changed. | |
| void | setAction (std::shared_ptr< Action > pAction) |
Protected Member Functions | |
| virtual void | enterEvent (QEvent *ev) |
| virtual void | keyPressEvent (QKeyEvent *ev) |
| virtual void | leaveEvent (QEvent *ev) |
| virtual void | mouseMoveEvent (QMouseEvent *ev) |
| virtual void | mousePressEvent (QMouseEvent *ev) |
| virtual void | mouseReleaseEvent (QMouseEvent *ev) |
| void | updateTooltip () override |
| Indicates child class to recalculate its tool tip in case m_registeredMidiEvents changed. | |
| virtual void | wheelEvent (QWheelEvent *ev) |
Protected Attributes | |
| bool | m_bEntered |
| bool | m_bIgnoreMouseMove |
| bool | m_bIsActive |
| bool | m_bModifyOnChange |
Whether Hydrogen::setIsModified() is invoked with true as soon as the value of the widget does change. | |
| bool | m_bUseIntSteps |
| float | m_fDefaultValue |
| float | m_fMax |
| float | m_fMin |
| float | m_fMousePressValue |
| float | m_fMousePressY |
| float | m_fValue |
| double | m_inputBufferTimeout |
| Number of seconds before m_sInputBuffer will be flushed (happens asynchronically whenever the next key input occurs.) | |
| timeval | m_inputBufferTimeval |
| int | m_nScrollSpeed |
| int | m_nScrollSpeedFast |
| Fast version used when the Control modifier is pressed. | |
| int | m_nWidgetHeight |
| int | m_nWidgetWidth |
| QString | m_sBaseTooltip |
| QString | m_sInputBuffer |
| All key input will be appended to this string. | |
Protected Attributes inherited from MidiLearnable | |
| std::shared_ptr< Action > | m_pAction |
| std::vector< std::pair< H2Core::MidiMessage::Event, int > > | m_registeredMidiEvents |
| Stores all MIDI events mapped to m_pAction. | |
Base class for active user input widget, which are not based on a high-level Qt widget.
The widgets can be set by click-drag, wheel event, and by keyboard. For the latter the widget has to be clicked first, in order for it to acquire focus. The derived class must indicate the presence of the focus in its paintEvent() using the H2Core::ColorTheme::m_highlightColor.
The widget will be reset to its default value of Ctrl-clicking it. It's MIDI learnable and the MIDI action - added by the parent - can be bound by the user by Shift-clicking it. The derived class must display an available MIDI action and a possible binding in its tooltip.
The current value of the derived class has to be displayed in the tooltip and when altering the value via mouse or keyboard a static tooltip must be used to indicate the new value.
For keyboard input a buffer is used to accumulate all provided numbers. After 2 seconds the input buffer is flushed and the next key press will fill a fresh buffer. Alternatively, the user can use the ESC key to immediately flush the input buffer.
Definition at line 59 of file WidgetWithInput.h.
| WidgetWithInput | ( | QWidget * | parent, |
| bool | bUseIntSteps, | ||
| QString | sBaseTooltip, | ||
| int | nScrollSpeed, | ||
| int | nScrollSpeedFast, | ||
| float | fMin, | ||
| float | fMax, | ||
| bool | bModifyOnChange ) |
Definition at line 37 of file WidgetWithInput.cpp.
| ~WidgetWithInput | ( | ) |
Definition at line 65 of file WidgetWithInput.cpp.
|
protectedvirtual |
Definition at line 256 of file WidgetWithInput.cpp.
|
inline |
Definition at line 157 of file WidgetWithInput.h.
|
inline |
Definition at line 151 of file WidgetWithInput.h.
|
inline |
Definition at line 154 of file WidgetWithInput.h.
|
inline |
Definition at line 148 of file WidgetWithInput.h.
|
inline |
Definition at line 145 of file WidgetWithInput.h.
|
inline |
Definition at line 166 of file WidgetWithInput.h.
|
inline |
Definition at line 169 of file WidgetWithInput.h.
|
inline |
Definition at line 142 of file WidgetWithInput.h.
|
inline |
Definition at line 163 of file WidgetWithInput.h.
|
inline |
Definition at line 160 of file WidgetWithInput.h.
|
protectedvirtual |
Definition at line 268 of file WidgetWithInput.cpp.
|
protectedvirtual |
Definition at line 262 of file WidgetWithInput.cpp.
|
protectedvirtual |
Reimplemented in Fader.
Definition at line 231 of file WidgetWithInput.cpp.
|
protectedvirtual |
Reimplemented in Fader.
Definition at line 154 of file WidgetWithInput.cpp.
|
protectedvirtual |
Definition at line 180 of file WidgetWithInput.cpp.
| void resetValueToDefault | ( | ) |
Definition at line 429 of file WidgetWithInput.cpp.
| void setBaseTooltip | ( | const QString & | sBaseTooltip | ) |
| void setDefaultValue | ( | float | fDefaultValue | ) |
Definition at line 404 of file WidgetWithInput.cpp.
| void setIsActive | ( | bool | bIsActive | ) |
Definition at line 105 of file WidgetWithInput.cpp.
| void setMax | ( | float | fMax | ) |
Definition at line 375 of file WidgetWithInput.cpp.
| void setMin | ( | float | fMin | ) |
Definition at line 347 of file WidgetWithInput.cpp.
| void setScrollSpeed | ( | int | nScrollSpeed | ) | const |
| void setScrollSpeedFast | ( | int | nScrollSpeedFast | ) | const |
|
virtual |
Definition at line 110 of file WidgetWithInput.cpp.
| void setWidgetHeight | ( | int | nWidgetHeight | ) |
| void setWidgetWidth | ( | int | nWidgetWidth | ) |
|
overrideprotectedvirtual |
Indicates child class to recalculate its tool tip in case m_registeredMidiEvents changed.
Reimplemented from MidiLearnable.
Definition at line 67 of file WidgetWithInput.cpp.
|
signal |
|
protectedvirtual |
Definition at line 193 of file WidgetWithInput.cpp.
|
protected |
Definition at line 124 of file WidgetWithInput.h.
|
protected |
Definition at line 126 of file WidgetWithInput.h.
|
protected |
Definition at line 123 of file WidgetWithInput.h.
|
protected |
Whether Hydrogen::setIsModified() is invoked with true as soon as the value of the widget does change.
Definition at line 139 of file WidgetWithInput.h.
|
protected |
Definition at line 108 of file WidgetWithInput.h.
|
protected |
Definition at line 121 of file WidgetWithInput.h.
|
protected |
Definition at line 119 of file WidgetWithInput.h.
|
protected |
Definition at line 118 of file WidgetWithInput.h.
|
protected |
Definition at line 127 of file WidgetWithInput.h.
|
protected |
Definition at line 128 of file WidgetWithInput.h.
|
protected |
Definition at line 120 of file WidgetWithInput.h.
|
protected |
Number of seconds before m_sInputBuffer will be flushed (happens asynchronically whenever the next key input occurs.)
Definition at line 135 of file WidgetWithInput.h.
|
protected |
Definition at line 132 of file WidgetWithInput.h.
|
protected |
Definition at line 114 of file WidgetWithInput.h.
|
protected |
Fast version used when the Control modifier is pressed.
Definition at line 116 of file WidgetWithInput.h.
|
protected |
Definition at line 112 of file WidgetWithInput.h.
|
protected |
Definition at line 111 of file WidgetWithInput.h.
|
protected |
Definition at line 109 of file WidgetWithInput.h.
|
protected |
All key input will be appended to this string.
Definition at line 131 of file WidgetWithInput.h.