|
hydrogen 1.2.6
|
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) override |
| 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 40 of file WidgetWithInput.cpp.
| ~WidgetWithInput | ( | ) |
Definition at line 68 of file WidgetWithInput.cpp.
|
overrideprotectedvirtual |
Definition at line 265 of file WidgetWithInput.cpp.
|
inline |
Definition at line 161 of file WidgetWithInput.h.
|
inline |
Definition at line 155 of file WidgetWithInput.h.
|
inline |
Definition at line 158 of file WidgetWithInput.h.
|
inline |
Definition at line 152 of file WidgetWithInput.h.
|
inline |
Definition at line 149 of file WidgetWithInput.h.
|
inline |
Definition at line 170 of file WidgetWithInput.h.
|
inline |
Definition at line 173 of file WidgetWithInput.h.
|
inline |
Definition at line 146 of file WidgetWithInput.h.
|
inline |
Definition at line 167 of file WidgetWithInput.h.
|
inline |
Definition at line 164 of file WidgetWithInput.h.
|
protectedvirtual |
Definition at line 278 of file WidgetWithInput.cpp.
|
protectedvirtual |
Definition at line 272 of file WidgetWithInput.cpp.
|
protectedvirtual |
Reimplemented in Fader.
Definition at line 234 of file WidgetWithInput.cpp.
|
protectedvirtual |
Reimplemented in Fader.
Definition at line 157 of file WidgetWithInput.cpp.
|
protectedvirtual |
Definition at line 186 of file WidgetWithInput.cpp.
| void resetValueToDefault | ( | ) |
Definition at line 439 of file WidgetWithInput.cpp.
| void setBaseTooltip | ( | const QString & | sBaseTooltip | ) |
| void setDefaultValue | ( | float | fDefaultValue | ) |
Definition at line 414 of file WidgetWithInput.cpp.
| void setIsActive | ( | bool | bIsActive | ) |
Definition at line 108 of file WidgetWithInput.cpp.
| void setMax | ( | float | fMax | ) |
Definition at line 385 of file WidgetWithInput.cpp.
| void setMin | ( | float | fMin | ) |
Definition at line 357 of file WidgetWithInput.cpp.
| void setScrollSpeed | ( | int | nScrollSpeed | ) | const |
| void setScrollSpeedFast | ( | int | nScrollSpeedFast | ) | const |
|
virtual |
Definition at line 113 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 70 of file WidgetWithInput.cpp.
|
signal |
|
protectedvirtual |
Definition at line 199 of file WidgetWithInput.cpp.
|
protected |
Definition at line 128 of file WidgetWithInput.h.
|
protected |
Definition at line 130 of file WidgetWithInput.h.
|
protected |
Definition at line 127 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 143 of file WidgetWithInput.h.
|
protected |
Definition at line 112 of file WidgetWithInput.h.
|
protected |
Definition at line 125 of file WidgetWithInput.h.
|
protected |
Definition at line 123 of file WidgetWithInput.h.
|
protected |
Definition at line 122 of file WidgetWithInput.h.
|
protected |
Definition at line 131 of file WidgetWithInput.h.
|
protected |
Definition at line 132 of file WidgetWithInput.h.
|
protected |
Definition at line 124 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 139 of file WidgetWithInput.h.
|
protected |
Definition at line 136 of file WidgetWithInput.h.
|
protected |
Definition at line 118 of file WidgetWithInput.h.
|
protected |
Fast version used when the Control modifier is pressed.
Definition at line 120 of file WidgetWithInput.h.
|
protected |
Definition at line 116 of file WidgetWithInput.h.
|
protected |
Definition at line 115 of file WidgetWithInput.h.
|
protected |
Definition at line 113 of file WidgetWithInput.h.
|
protected |
All key input will be appended to this string.
Definition at line 135 of file WidgetWithInput.h.