#include <FloatModelEditorBase.h>
◆ DirectionOfManipulation
| Enumerator |
|---|
| Vertical | |
| Horizontal | |
◆ FloatingTextType
| Enumerator |
|---|
| None | No floating text.
|
| Static | Traditional static tooltip.
|
| Dynamic | Dynamic floating text.
|
◆ InteractionType
Types of user interaction with the control.
| Enumerator |
|---|
| None | The user is not interacting with the control. No floating text is shown.
|
| MouseHover | The mouse is hovering over the control without any other interaction. If a static tooltip is set (see setToolTip), it will be displayed, otherwise dynamic floating text will be displayed.
|
| MouseDrag | The user is dragging the control to adjust the model's value. This always results in dynamic floating text, not a static tooltip.
|
| MouseWheel | The user is using the mouse wheel on the control to adjust the model's value. This always results in dynamic floating text, not a static tooltip.
|
◆ FloatModelEditorBase() [1/2]
◆ FloatModelEditorBase() [2/2]
| lmms::gui::FloatModelEditorBase::FloatModelEditorBase |
( |
const FloatModelEditorBase & | other | ) |
|
|
delete |
◆ contextMenuEvent()
| void lmms::gui::FloatModelEditorBase::contextMenuEvent |
( |
QContextMenuEvent * | me | ) |
|
|
overrideprotected |
◆ currentInteraction()
| InteractionType lmms::gui::FloatModelEditorBase::currentInteraction |
( |
| ) |
const |
|
inlineprotected |
- Returns
- how the user is interacting with the control
◆ currentValueToText()
| QString lmms::gui::FloatModelEditorBase::currentValueToText |
( |
| ) |
|
|
protectedvirtual |
- Returns
- the current value of the model as a string
- Note
- This method is called just prior to displaying dynamic floating text in order to set its value. If the currentValueToTextUpdate method is not overridden, this method is also called to periodically update the floating text.
Reimplemented in lmms::gui::VolumeKnob, and lmms::gui::VstPluginKnob.
◆ currentValueToTextUpdate()
| virtual std::optional< QString > lmms::gui::FloatModelEditorBase::currentValueToTextUpdate |
( |
| ) |
|
|
inlineprotectedvirtual |
- Returns
- the current value of the model as a string, or std::nullopt to indicate the previous value should continue being used
- Note
- This method is called periodically while dynamic floating text is visible and the value of the float model is changing, allowing dynamic updates of the floating text.
Reimplemented in lmms::gui::VstPluginKnob.
◆ directionOfManipulation()
◆ doConnections()
| void lmms::gui::FloatModelEditorBase::doConnections |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ dragEnterEvent()
| void lmms::gui::FloatModelEditorBase::dragEnterEvent |
( |
QDragEnterEvent * | dee | ) |
|
|
overrideprotected |
◆ dropEvent()
| void lmms::gui::FloatModelEditorBase::dropEvent |
( |
QDropEvent * | de | ) |
|
|
overrideprotected |
◆ enterEvent()
| void lmms::gui::FloatModelEditorBase::enterEvent |
( |
QEnterEvent * | event | ) |
|
|
overrideprotected |
◆ enterValue
| void lmms::gui::FloatModelEditorBase::enterValue |
( |
| ) |
|
|
privatevirtualslot |
◆ floatingTextType()
| auto lmms::gui::FloatModelEditorBase::floatingTextType |
( |
| ) |
const |
|
protected |
- Returns
- which type of floating text is currently being displayed based on how the user is interacting with the control and whether a static tooltip has been set for the control.
◆ focusOutEvent()
| void lmms::gui::FloatModelEditorBase::focusOutEvent |
( |
QFocusEvent * | fe | ) |
|
|
overrideprotected |
◆ friendlyUpdate
| void lmms::gui::FloatModelEditorBase::friendlyUpdate |
( |
| ) |
|
|
privateslot |
◆ getDynamicFloatingText()
| QString lmms::gui::FloatModelEditorBase::getDynamicFloatingText |
( |
const QString & | currentValue | ) |
const |
|
protectedvirtual |
Provides the text to be shown in dynamic floating text.
- Parameters
-
- Returns
- formatted text to display in dynamic floating text
- Note
- The default format is: "[description] [current value][unit]"
Reimplemented in lmms::gui::VolumeKnob.
◆ getValue()
| float lmms::gui::FloatModelEditorBase::getValue |
( |
const QPoint & | p | ) |
|
|
protectedvirtual |
◆ initUi()
| void lmms::gui::FloatModelEditorBase::initUi |
( |
const QString & | name | ) |
|
|
private |
◆ leaveEvent()
| void lmms::gui::FloatModelEditorBase::leaveEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
◆ mouseDoubleClickEvent()
| void lmms::gui::FloatModelEditorBase::mouseDoubleClickEvent |
( |
QMouseEvent * | me | ) |
|
|
overrideprotected |
◆ mouseMoveEvent()
| void lmms::gui::FloatModelEditorBase::mouseMoveEvent |
( |
QMouseEvent * | me | ) |
|
|
overrideprotected |
◆ mousePressEvent()
| void lmms::gui::FloatModelEditorBase::mousePressEvent |
( |
QMouseEvent * | me | ) |
|
|
overrideprotectedvirtual |
◆ mouseReleaseEvent()
| void lmms::gui::FloatModelEditorBase::mouseReleaseEvent |
( |
QMouseEvent * | me | ) |
|
|
overrideprotected |
◆ pageSize()
| float lmms::gui::FloatModelEditorBase::pageSize |
( |
| ) |
const |
|
inlineprotected |
◆ paintEvent()
| void lmms::gui::FloatModelEditorBase::paintEvent |
( |
QPaintEvent * | me | ) |
|
|
overrideprotected |
◆ setHintText()
| void lmms::gui::FloatModelEditorBase::setHintText |
( |
const QString & | txt_before, |
|
|
const QString & | txt_after ) |
|
inline |
◆ setPosition()
| void lmms::gui::FloatModelEditorBase::setPosition |
( |
const QPoint & | p | ) |
|
|
protected |
◆ setToolTip()
| void lmms::gui::FloatModelEditorBase::setToolTip |
( |
const QString & | tip | ) |
|
|
inline |
Sets the tooltip displayed when the mouse hovers over the control.
Unlike the dynamic floating text from getDynamicFloatingText which represents the current value of the model, this is static text intended to provide a helpful description of the control. That is, it's just a traditional tooltip, though it uses SimpleTextFloat rather than QWidget's own tooltip for consistency with the dynamic floating text.
If no static tooltip is set (when this method is not called), dynamic floating text is used in its place. See InteractionType for more information.
- Parameters
-
| tip | The static tooltip. If empty, neither a static nor dynamic tooltip will be displayed when the mouse hovers over the control. |
◆ showTextFloat() [1/2]
| void lmms::gui::FloatModelEditorBase::showTextFloat |
( |
bool | forceTextUpdate = false | ) |
|
|
protected |
◆ showTextFloat() [2/2]
| void lmms::gui::FloatModelEditorBase::showTextFloat |
( |
int | msecBeforeDisplay, |
|
|
int | msecDisplayTime, |
|
|
bool | forceTextUpdate = false ) |
|
protected |
◆ sliderMoved
| void lmms::gui::FloatModelEditorBase::sliderMoved |
( |
float | value | ) |
|
|
signal |
◆ sliderPressed
| void lmms::gui::FloatModelEditorBase::sliderPressed |
( |
| ) |
|
|
signal |
◆ sliderReleased
| void lmms::gui::FloatModelEditorBase::sliderReleased |
( |
| ) |
|
|
signal |
◆ textFloat()
◆ toggleScale
| void lmms::gui::FloatModelEditorBase::toggleScale |
( |
| ) |
|
|
privateslot |
◆ toolTip()
| QString lmms::gui::FloatModelEditorBase::toolTip |
( |
| ) |
const |
|
inline |
◆ unsetToolTip()
| void lmms::gui::FloatModelEditorBase::unsetToolTip |
( |
| ) |
|
|
inline |
Removes the static tooltip set by a previous call to setToolTip(). The dynamic floating text will be used in its place.
- Note
- This is currently unused.
◆ updateInteractionState()
| void lmms::gui::FloatModelEditorBase::updateInteractionState |
( |
QEvent * | event | ) |
|
|
protected |
Updates m_interaction based on the event and current state.
◆ wheelEvent()
| void lmms::gui::FloatModelEditorBase::wheelEvent |
( |
QWheelEvent * | me | ) |
|
|
overrideprotected |
◆ m_directionOfManipulation
◆ m_interaction
◆ m_lastMousePos
| QPoint lmms::gui::FloatModelEditorBase::m_lastMousePos |
|
protected |
mouse position in last mouseMoveEvent
◆ m_leftOver
| float lmms::gui::FloatModelEditorBase::m_leftOver |
|
protected |
◆ m_staticToolTip
| std::optional<QString> lmms::gui::FloatModelEditorBase::m_staticToolTip |
|
private |
◆ s_textFloat
The documentation for this class was generated from the following files: