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

#include <LcdSpinBox.h>

Inheritance diagram for lmms::gui::LcdSpinBox:
lmms::gui::LcdWidget lmms::gui::TypedModelView< IntModel > lmms::gui::AutomatableModelView lmms::gui::ModelView lmms::gui::MixerChannelLcdSpinBox

Public Slots

virtual void update ()
Public Slots inherited from lmms::gui::LcdWidget
virtual void setMarginWidth (int width)

Signals

void manualChange ()

Public Member Functions

 LcdSpinBox (int numDigits, QWidget *parent, const QString &name=QString())
 LcdSpinBox (int numDigits, const QString &style, QWidget *parent, const QString &name=QString())
 ~LcdSpinBox () override=default
void modelChanged () override
void setDisplayOffset (int offset)
int displayOffset () const
 Returns internal offset for displaying values.
Public Member Functions inherited from lmms::gui::LcdWidget
 LcdWidget (QWidget *parent, const QString &name=QString(), bool leadingZero=false)
 LcdWidget (int numDigits, QWidget *parent, const QString &name=QString(), bool leadingZero=false)
 LcdWidget (int numDigits, const QString &style, QWidget *parent, const QString &name=QString(), bool leadingZero=false)
void setValue (int value)
void setValue (float value)
void setLabel (const QString &label)
void addTextForValue (int value, const QString &text)
int numDigits () const
void setNumDigits (int n)
QColor textColor () const
void setTextColor (const QColor &c)
QColor textShadowColor () const
void setTextShadowColor (const QColor &c)
int cellHeight () const
void setSeamless (bool left, bool right)
Public Member Functions inherited from lmms::gui::TypedModelView< IntModel >
 TypedModelView (Model *model, QWidget *_this)
IntModelmodel ()
const IntModelmodel () 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 mousePressEvent (QMouseEvent *_me) override
void mouseMoveEvent (QMouseEvent *_me) override
void mouseReleaseEvent (QMouseEvent *_me) override
void wheelEvent (QWheelEvent *_we) override
void mouseDoubleClickEvent (QMouseEvent *_me) override
Protected Member Functions inherited from lmms::gui::LcdWidget
void paintEvent (QPaintEvent *pe) override
virtual void updateSize ()
Protected Member Functions inherited from lmms::gui::ModelView
QWidget * widget ()
virtual void doConnections ()

Private Member Functions

void enterValue ()

Private Attributes

float m_remainder
 floating offset of spinbox in [-0.5, 0.5]
bool m_mouseMoving
QPoint m_lastMousePos
 mouse position in last mouseMoveEvent
int m_displayOffset

Additional Inherited Members

Protected Attributes inherited from lmms::gui::AutomatableModelView
QString m_description
QString m_unit
float m_conversionFactor
Properties inherited from lmms::gui::LcdWidget
QColor textColor
QColor textShadowColor
int numDigits

Constructor & Destructor Documentation

◆ LcdSpinBox() [1/2]

lmms::gui::LcdSpinBox::LcdSpinBox ( int numDigits,
QWidget * parent,
const QString & name = QString() )

◆ LcdSpinBox() [2/2]

lmms::gui::LcdSpinBox::LcdSpinBox ( int numDigits,
const QString & style,
QWidget * parent,
const QString & name = QString() )

◆ ~LcdSpinBox()

lmms::gui::LcdSpinBox::~LcdSpinBox ( )
overridedefault

Member Function Documentation

◆ contextMenuEvent()

void lmms::gui::LcdSpinBox::contextMenuEvent ( QContextMenuEvent * _me)
overrideprotected

◆ displayOffset()

int lmms::gui::LcdSpinBox::displayOffset ( ) const
inline

Returns internal offset for displaying values.

◆ enterValue()

void lmms::gui::LcdSpinBox::enterValue ( )
private

◆ manualChange

void lmms::gui::LcdSpinBox::manualChange ( )
signal

◆ modelChanged()

void lmms::gui::LcdSpinBox::modelChanged ( )
inlineoverridevirtual

Reimplemented from lmms::gui::ModelView.

◆ mouseDoubleClickEvent()

void lmms::gui::LcdSpinBox::mouseDoubleClickEvent ( QMouseEvent * _me)
overrideprotected

◆ mouseMoveEvent()

void lmms::gui::LcdSpinBox::mouseMoveEvent ( QMouseEvent * _me)
overrideprotected

◆ mousePressEvent()

void lmms::gui::LcdSpinBox::mousePressEvent ( QMouseEvent * _me)
overrideprotectedvirtual

Reimplemented from lmms::gui::AutomatableModelView.

◆ mouseReleaseEvent()

void lmms::gui::LcdSpinBox::mouseReleaseEvent ( QMouseEvent * _me)
overrideprotected

◆ setDisplayOffset()

void lmms::gui::LcdSpinBox::setDisplayOffset ( int offset)
inline

Sets an offset which is always added to value of model so we can display values in a user-friendly way if they internally start at 0

◆ update

void lmms::gui::LcdSpinBox::update ( )
virtualslot

◆ wheelEvent()

void lmms::gui::LcdSpinBox::wheelEvent ( QWheelEvent * _we)
overrideprotected

Member Data Documentation

◆ m_displayOffset

int lmms::gui::LcdSpinBox::m_displayOffset
private

◆ m_lastMousePos

QPoint lmms::gui::LcdSpinBox::m_lastMousePos
private

mouse position in last mouseMoveEvent

◆ m_mouseMoving

bool lmms::gui::LcdSpinBox::m_mouseMoving
private

◆ m_remainder

float lmms::gui::LcdSpinBox::m_remainder
private

floating offset of spinbox in [-0.5, 0.5]


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