LMMS
Loading...
Searching...
No Matches
lmms::gui::FloatModelEditorBase Class Reference

#include <FloatModelEditorBase.h>

Inheritance diagram for lmms::gui::FloatModelEditorBase:
lmms::gui::TypedModelView< FloatModel > lmms::gui::AutomatableModelView lmms::gui::ModelView lmms::gui::BarModelEditor lmms::gui::Draggable lmms::gui::Knob lmms::gui::TempoSyncBarModelEditor lmms::gui::AudioFileProcessorWaveView::knob lmms::gui::FreeBoyKnob lmms::gui::KickerKnob lmms::gui::KickerLargeKnob lmms::gui::OrganicKnob lmms::gui::Sf2Knob lmms::gui::SfxrKnob lmms::gui::TempoSyncKnob lmms::gui::TripleOscKnob lmms::gui::VolumeKnob lmms::gui::VstPluginKnob lmms::gui::XpressiveKnob lmms::gui::gigKnob lmms::gui::sidKnob

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)
Public Member Functions inherited from lmms::gui::TypedModelView< FloatModel >
 TypedModelView (Model *model, QWidget *_this)
FloatModelmodel ()
const FloatModelmodel () const
Public Member Functions inherited from lmms::gui::AutomatableModelView
 AutomatableModelView (Model *model, QWidget *_this)
 ~AutomatableModelView () override=default
AutomatableModelmodelUntyped ()
const AutomatableModelmodelUntyped () const
void setModel (Model *model, bool isOldModelValid=true) override
void unsetModel () override
template<typename 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 ()
Modelmodel ()
const Modelmodel () const
template<class T>
T * castModel ()
template<class T>
const T * castModel () const

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 getCustomFloatingText ()
virtual std::optional< QString > getCustomFloatingTextUpdate ()
void doConnections () override
void showTextFloat (int msecBeforeDisplay, int msecDisplayTime)
void showTextFloat ()
const SimpleTextFloattextFloat () const
void setPosition (const QPoint &p)
float pageSize () 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
bool m_buttonPressed
DirectionOfManipulation m_directionOfManipulation
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

Static Private Attributes

static SimpleTextFloats_textFloat = nullptr

Member Enumeration Documentation

◆ DirectionOfManipulation

Enumerator
Vertical 
Horizontal 

Constructor & Destructor Documentation

◆ FloatModelEditorBase() [1/2]

lmms::gui::FloatModelEditorBase::FloatModelEditorBase ( DirectionOfManipulation directionOfManipulation = DirectionOfManipulation::Vertical,
QWidget * _parent = nullptr,
const QString & _name = QString() )

default ctor

◆ FloatModelEditorBase() [2/2]

lmms::gui::FloatModelEditorBase::FloatModelEditorBase ( const FloatModelEditorBase & other)
delete

Member Function Documentation

◆ contextMenuEvent()

void lmms::gui::FloatModelEditorBase::contextMenuEvent ( QContextMenuEvent * me)
overrideprotected

◆ doConnections()

void lmms::gui::FloatModelEditorBase::doConnections ( )
overrideprotectedvirtual

Reimplemented from lmms::gui::ModelView.

◆ 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 * )
overrideprotected

◆ enterValue

void lmms::gui::FloatModelEditorBase::enterValue ( )
privatevirtualslot

Reimplemented in lmms::gui::VolumeKnob.

◆ focusOutEvent()

void lmms::gui::FloatModelEditorBase::focusOutEvent ( QFocusEvent * fe)
overrideprotected

◆ friendlyUpdate

void lmms::gui::FloatModelEditorBase::friendlyUpdate ( )
privateslot

◆ getCustomFloatingText()

QString lmms::gui::FloatModelEditorBase::getCustomFloatingText ( )
protectedvirtual

This method is called just prior to displaying the floating text in order to set its value. If the getCustomFloatingTextUpdate() method is not overridden, this method is also called to periodically update the floating text.

Floating text is displayed in the following format: "[description] [custom text][unit]"

This method controls only the "custom text" portion. To modify the other portions, call setDescription() or setUnit().

Reimplemented in lmms::gui::VolumeKnob, and lmms::gui::VstPluginKnob.

◆ getCustomFloatingTextUpdate()

virtual std::optional< QString > lmms::gui::FloatModelEditorBase::getCustomFloatingTextUpdate ( )
inlineprotectedvirtual

This method is called periodically while the floating text is visible and the value of the float model is changing, allowing dynamic updates of the floating text.

Floating text is displayed in the following format: "[description] [custom text][unit]"

This method controls only the "custom text" portion. To modify the other portions, call setDescription() or setUnit().

Returns
the up-to-date value for the floating text, or std::nullopt to indicate nothing changed and the previous floating text value should continue being used

Reimplemented in lmms::gui::VstPluginKnob.

◆ getValue()

float lmms::gui::FloatModelEditorBase::getValue ( const QPoint & p)
protectedvirtual

◆ initUi()

void lmms::gui::FloatModelEditorBase::initUi ( const QString & name)
private

to be called by ctors

◆ 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

Reimplemented from lmms::gui::AutomatableModelView.

◆ 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

◆ showTextFloat() [1/2]

void lmms::gui::FloatModelEditorBase::showTextFloat ( )
protected

◆ showTextFloat() [2/2]

void lmms::gui::FloatModelEditorBase::showTextFloat ( int msecBeforeDisplay,
int msecDisplayTime )
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()

const SimpleTextFloat & lmms::gui::FloatModelEditorBase::textFloat ( ) const
inlineprotected

◆ toggleScale

void lmms::gui::FloatModelEditorBase::toggleScale ( )
privateslot

◆ wheelEvent()

void lmms::gui::FloatModelEditorBase::wheelEvent ( QWheelEvent * me)
overrideprotected

Member Data Documentation

◆ m_buttonPressed

bool lmms::gui::FloatModelEditorBase::m_buttonPressed
protected

◆ m_directionOfManipulation

DirectionOfManipulation lmms::gui::FloatModelEditorBase::m_directionOfManipulation
protected

◆ m_lastMousePos

QPoint lmms::gui::FloatModelEditorBase::m_lastMousePos
protected

mouse position in last mouseMoveEvent

◆ m_leftOver

float lmms::gui::FloatModelEditorBase::m_leftOver
protected

◆ s_textFloat

SimpleTextFloat * lmms::gui::FloatModelEditorBase::s_textFloat = nullptr
staticprivate

The documentation for this class was generated from the following files: