|
lmms
Cross-platform music production software
|
#include <FloatModelEditorBase.h>
Public Types | |
| enum class | DirectionOfManipulation : bool { Vertical , Horizontal } |
Signals | |
| void | sliderPressed () |
| void | sliderReleased () |
| void | sliderMoved (float value) |
Public Member Functions | |
| FloatModelEditorBase (DirectionOfManipulation directionOfManipulation=DirectionOfManipulation::Vertical, QWidget *_parent=nullptr, const QString &_name=QString()) | |
| default ctor | |
| FloatModelEditorBase (const FloatModelEditorBase &other)=delete | |
| void | setHintText (const QString &txt_before, const QString &txt_after) |
| void | setToolTip (const QString &tip) |
| Sets the tooltip displayed when the mouse hovers over the control. | |
| QString | toolTip () const |
| void | unsetToolTip () |
| Public Member Functions inherited from lmms::gui::TypedModelView< FloatModel > | |
| TypedModelView (Model *model, QWidget *_this) | |
| FloatModel * | model () |
| const FloatModel * | model () const |
| Public Member Functions inherited from lmms::gui::AutomatableModelView | |
| AutomatableModelView (Model *model, QWidget *_this) | |
| ~AutomatableModelView () override=default | |
| AutomatableModel * | modelUntyped () |
| const AutomatableModel * | modelUntyped () const |
| void | setModel (Model *model, bool isOldModelValid=true) override |
| void | unsetModel () override |
| template<typename T> | |
| T | value () const |
| void | setDescription (const QString &desc) |
| void | setUnit (const QString &unit) |
| void | addDefaultActions (QMenu *menu) |
| void | setConversionFactor (float factor) |
| float | getConversionFactor () |
| Public Member Functions inherited from lmms::gui::ModelView | |
| ModelView (Model *model, QWidget *widget) | |
| virtual | ~ModelView () |
| Model * | model () |
| const Model * | model () const |
| template<class T> | |
| T * | castModel () |
| template<class T> | |
| const T * | castModel () const |
Protected Types | |
| enum class | InteractionType : std::uint8_t { None , MouseHover , MouseDrag , MouseWheel } |
| Types of user interaction with the control. More... | |
| enum class | FloatingTextType : std::uint8_t { None , Static , Dynamic } |
Protected Member Functions | |
| void | contextMenuEvent (QContextMenuEvent *me) override |
| void | dragEnterEvent (QDragEnterEvent *dee) override |
| void | dropEvent (QDropEvent *de) override |
| void | focusOutEvent (QFocusEvent *fe) override |
| void | mousePressEvent (QMouseEvent *me) override |
| void | mouseReleaseEvent (QMouseEvent *me) override |
| void | mouseMoveEvent (QMouseEvent *me) override |
| void | mouseDoubleClickEvent (QMouseEvent *me) override |
| void | paintEvent (QPaintEvent *me) override |
| void | wheelEvent (QWheelEvent *me) override |
| void | enterEvent (QEnterEvent *) override |
| void | leaveEvent (QEvent *event) override |
| virtual float | getValue (const QPoint &p) |
| virtual QString | currentValueToText () |
| virtual std::optional< QString > | currentValueToTextUpdate () |
| virtual QString | getDynamicFloatingText (const QString ¤tValue) const |
| Provides the text to be shown in dynamic floating text. | |
| void | doConnections () override |
| void | showTextFloat (int msecBeforeDisplay, int msecDisplayTime, bool forceTextUpdate=false) |
| void | showTextFloat (bool forceTextUpdate=false) |
| const SimpleTextFloat & | textFloat () const |
| void | setPosition (const QPoint &p) |
| float | pageSize () const |
| DirectionOfManipulation | directionOfManipulation () const |
| InteractionType | currentInteraction () const |
| void | updateInteractionState (QEvent *event) |
| Updates m_interaction based on the event and current state. | |
| FloatingTextType | floatingTextType () const |
| Protected Member Functions inherited from lmms::gui::ModelView | |
| virtual void | modelChanged () |
| QWidget * | widget () |
Protected Attributes | |
| QPoint | m_lastMousePos |
| mouse position in last mouseMoveEvent | |
| float | m_leftOver |
| Protected Attributes inherited from lmms::gui::AutomatableModelView | |
| QString | m_description |
| QString | m_unit |
| float | m_conversionFactor |
Private Slots | |
| virtual void | enterValue () |
| void | friendlyUpdate () |
| void | toggleScale () |
Private Member Functions | |
| void | initUi (const QString &name) |
| to be called by ctors | |
Private Attributes | |
| InteractionType | m_interaction = InteractionType::None |
| DirectionOfManipulation | m_directionOfManipulation |
| std::optional< QString > | m_staticToolTip |
Static Private Attributes | |
| static SimpleTextFloat * | s_textFloat = nullptr |
|
strong |
|
strongprotected |
|
strongprotected |
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. |
| lmms::gui::FloatModelEditorBase::FloatModelEditorBase | ( | DirectionOfManipulation | directionOfManipulation = DirectionOfManipulation::Vertical, |
| QWidget * | _parent = nullptr, | ||
| const QString & | _name = QString() ) |
default ctor
|
delete |
|
overrideprotected |
|
inlineprotected |
|
protectedvirtual |
Reimplemented in lmms::gui::VolumeKnob, and lmms::gui::VstPluginKnob.
|
inlineprotectedvirtual |
Reimplemented in lmms::gui::VstPluginKnob.
|
inlineprotected |
|
overrideprotectedvirtual |
Reimplemented from lmms::gui::ModelView.
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
privatevirtualslot |
Reimplemented in lmms::gui::VolumeKnob.
|
protected |
|
overrideprotected |
|
privateslot |
|
protectedvirtual |
Provides the text to be shown in dynamic floating text.
| currentValue | text from currentValueToText or currentValueToTextUpdate |
Reimplemented in lmms::gui::VolumeKnob.
|
protectedvirtual |
Reimplemented in lmms::gui::AudioFileProcessorWaveView::knob.
|
private |
to be called by ctors
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotectedvirtual |
Reimplemented from lmms::gui::AutomatableModelView.
|
overrideprotected |
|
inlineprotected |
|
overrideprotected |
|
inline |
|
protected |
|
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.
| tip | The static tooltip. If empty, neither a static nor dynamic tooltip will be displayed when the mouse hovers over the control. |
|
protected |
|
protected |
|
signal |
|
signal |
|
signal |
|
inlineprotected |
|
privateslot |
|
inline |
|
inline |
Removes the static tooltip set by a previous call to setToolTip(). The dynamic floating text will be used in its place.
|
protected |
Updates m_interaction based on the event and current state.
|
overrideprotected |
|
private |
|
private |
|
protected |
mouse position in last mouseMoveEvent
|
protected |
|
private |
|
staticprivate |