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

#include <LedCheckBox.h>

Inheritance diagram for lmms::gui::LedCheckBox:
lmms::gui::AutomatableButton lmms::gui::TypedModelView< BoolModel > lmms::gui::AutomatableModelView lmms::gui::ModelView

Public Types

enum class  LedColor { Yellow , Green , Red }

Public Member Functions

 LedCheckBox (const QString &_txt, QWidget *_parent, const QString &_name=QString(), LedColor _color=LedColor::Yellow, bool legacyMode=true)
 LedCheckBox (QWidget *_parent, const QString &_name=QString(), LedColor _color=LedColor::Yellow, bool legacyMode=true)
const QString & text ()
void setText (const QString &s)
Public Member Functions inherited from lmms::gui::AutomatableButton
 AutomatableButton (QWidget *_parent, const QString &_name=QString())
 ~AutomatableButton () override
void setCheckable (bool _on)
void modelChanged () override
Public Member Functions inherited from lmms::gui::TypedModelView< BoolModel >
 TypedModelView (Model *model, QWidget *_this)
BoolModelmodel ()
const BoolModelmodel () 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 paintEvent (QPaintEvent *_pe) override
Protected Member Functions inherited from lmms::gui::AutomatableButton
void contextMenuEvent (QContextMenuEvent *_me) override
void mousePressEvent (QMouseEvent *_me) override
void mouseReleaseEvent (QMouseEvent *_me) override
Protected Member Functions inherited from lmms::gui::ModelView
QWidget * widget ()
virtual void doConnections ()

Properties

QString text

Private Member Functions

void initUi (LedColor _color)
 to be called by ctors
void onTextUpdated ()
 to be called when you updated m_text
void paintLegacy (QPaintEvent *p)
void paintNonLegacy (QPaintEvent *p)

Private Attributes

QPixmap m_ledOnPixmap
QPixmap m_ledOffPixmap
QString m_text
bool m_legacyMode

Additional Inherited Members

Public Slots inherited from lmms::gui::AutomatableButton
virtual void update ()
virtual void toggle ()
virtual void setChecked (bool _on)
Protected Attributes inherited from lmms::gui::AutomatableModelView
QString m_description
QString m_unit
float m_conversionFactor

Member Enumeration Documentation

◆ LedColor

Enumerator
Yellow 
Green 
Red 

Constructor & Destructor Documentation

◆ LedCheckBox() [1/2]

lmms::gui::LedCheckBox::LedCheckBox ( const QString & _txt,
QWidget * _parent,
const QString & _name = QString(),
LedColor _color = LedColor::Yellow,
bool legacyMode = true )

◆ LedCheckBox() [2/2]

lmms::gui::LedCheckBox::LedCheckBox ( QWidget * _parent,
const QString & _name = QString(),
LedColor _color = LedColor::Yellow,
bool legacyMode = true )

Member Function Documentation

◆ initUi()

void lmms::gui::LedCheckBox::initUi ( LedColor _color)
private

to be called by ctors

◆ onTextUpdated()

void lmms::gui::LedCheckBox::onTextUpdated ( )
private

to be called when you updated m_text

◆ paintEvent()

void lmms::gui::LedCheckBox::paintEvent ( QPaintEvent * _pe)
overrideprotected

◆ paintLegacy()

void lmms::gui::LedCheckBox::paintLegacy ( QPaintEvent * p)
private

◆ paintNonLegacy()

void lmms::gui::LedCheckBox::paintNonLegacy ( QPaintEvent * p)
private

◆ setText()

void lmms::gui::LedCheckBox::setText ( const QString & s)

◆ text()

const QString & lmms::gui::LedCheckBox::text ( )
inline

Member Data Documentation

◆ m_ledOffPixmap

QPixmap lmms::gui::LedCheckBox::m_ledOffPixmap
private

◆ m_ledOnPixmap

QPixmap lmms::gui::LedCheckBox::m_ledOnPixmap
private

◆ m_legacyMode

bool lmms::gui::LedCheckBox::m_legacyMode
private

◆ m_text

QString lmms::gui::LedCheckBox::m_text
private

Property Documentation

◆ text

QString lmms::gui::LedCheckBox::text
readwrite

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