|
lmms
Cross-platform music production software
|
#include <FadeButton.h>
Public Types | |
| enum class | State { Normal , Corrupted } |
Public Slots | |
| void | activate () |
| void | activateOnce () |
| void | noteEnd () |
Public Member Functions | |
| FadeButton (const QColor &inactiveColor, const QColor &normalColor, const QColor &corruptedColor, const QColor &mutedColor, const QColor &holdColor, QWidget *parent=nullptr) | |
| Creates a fade button with the given color palette. | |
| FadeButton (QWidget *parent=nullptr) | |
| Creates a fade button with the default application colors. | |
| ~FadeButton () override=default | |
| Destroys the fade button. | |
| auto | state () const -> State |
| auto | muted () const -> bool |
| void | setState (State state) |
| Set the state of the fade button to state. | |
| void | setMuted (bool mute) |
| Mute or unmute the fade button. | |
Private Member Functions | |
| void | paintEvent (QPaintEvent *pe) override |
| QColor | fadeToColor (QColor, QColor, QElapsedTimer, float) |
| QColor | activeColor () const |
Private Attributes | |
| State | m_state = State::Normal |
| QElapsedTimer | m_stateTimer |
| QElapsedTimer | m_releaseTimer |
| QColor | m_inactiveColor |
| QColor | m_normalColor |
| QColor | m_corruptedColor |
| QColor | m_mutedColor |
| QColor | m_holdColor |
| int | activeNotes |
| bool | m_muted = false |
|
strong |
| lmms::gui::FadeButton::FadeButton | ( | const QColor & | inactiveColor, |
| const QColor & | normalColor, | ||
| const QColor & | corruptedColor, | ||
| const QColor & | mutedColor, | ||
| const QColor & | holdColor, | ||
| QWidget * | parent = nullptr ) |
Creates a fade button with the given color palette.
| inactiveColor | The default color for the widget |
| normalColor | The color to use on activation when in the Normal state |
| corruptedColor | The color to use on activation when in the Corrupted state |
| mutedColor | The color to use when the fade button is muted |
| holdColor | The color after the "play" fade is done but a note is still playing |
| lmms::gui::FadeButton::FadeButton | ( | QWidget * | parent = nullptr | ) |
Creates a fade button with the default application colors.
|
overridedefault |
Destroys the fade button.
|
slot |
|
slot |
|
private |
|
private |
| auto lmms::gui::FadeButton::muted | ( | ) | const -> bool |
|
slot |
|
overrideprivate |
| void lmms::gui::FadeButton::setMuted | ( | bool | mute | ) |
Mute or unmute the fade button.
| void lmms::gui::FadeButton::setState | ( | State | state | ) |
Set the state of the fade button to state.
| auto lmms::gui::FadeButton::state | ( | ) | const -> State |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |