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

#include <MidiClipView.h>

Inheritance diagram for lmms::gui::MidiClipView:
lmms::gui::ClipView lmms::gui::selectableObject lmms::gui::ModelView

Public Slots

lmms::MidiClipgetMidiClip ()
void update () override
Public Slots inherited from lmms::gui::ClipView
virtual bool close ()
 Close a ClipView.
void remove ()
 Removes a ClipView from its track view.
void update () override
 Update a ClipView.
void selectColor ()
void randomizeColor ()
void resetColor ()
Public Slots inherited from lmms::gui::selectableObject
virtual void update ()

Public Member Functions

 MidiClipView (MidiClip *clip, TrackView *parent)
 ~MidiClipView () override=default
QColor constgetNoteFillColor () const
void setNoteFillColor (QColor const &color)
QColor constgetNoteBorderColor () const
void setNoteBorderColor (QColor const &color)
QColor constgetMutedNoteFillColor () const
void setMutedNoteFillColor (QColor const &color)
QColor constgetMutedNoteBorderColor () const
void setMutedNoteBorderColor (QColor const &color)
Public Member Functions inherited from lmms::gui::ClipView
 ClipView (Clip *clip, TrackView *tv)
 Create a new ClipView.
 ~ClipView () override
 Destroy a ClipView.
bool fixedClips ()
 Does this ClipView have a fixed Clip?
ClipgetClip ()
TrackViewgetTrackView ()
QColor mutedColor () const
 CSS theming qproperty access method.
QColor mutedBackgroundColor () const
QColor selectedColor () const
QColor textColor () const
QColor textBackgroundColor () const
QColor textShadowColor () const
QColor patternClipBackground () const
QColor markerColor () const
bool gradient () const
void setMutedColor (const QColor &c)
 CSS theming qproperty access method.
void setMutedBackgroundColor (const QColor &c)
void setSelectedColor (const QColor &c)
void setTextColor (const QColor &c)
void setTextBackgroundColor (const QColor &c)
void setTextShadowColor (const QColor &c)
void setPatternClipBackground (const QColor &c)
void setGradient (const bool &b)
void setMarkerColor (const QColor &c)
bool needsUpdate ()
void setNeedsUpdate (bool b)
QVector< ClipView * > getClickedClips ()
void copy (QVector< ClipView * > clipvs)
void cut (QVector< ClipView * > clipvs)
void paste ()
void toggleSelectedAutoResize ()
QColor getColorForDisplay (QColor)
void setMarkerPos (int x)
void setMarkerEnabled (bool e)
Public Member Functions inherited from lmms::gui::selectableObject
 selectableObject (QWidget *_parent)
 ~selectableObject () override=default
void setSelected (bool selected)
bool isSelected () const
Public Member Functions inherited from lmms::gui::ModelView
 ModelView (Model *model, QWidget *widget)
virtual ~ModelView ()
virtual void setModel (Model *model, bool isOldModelValid=true)
virtual void unsetModel ()
Modelmodel ()
const Modelmodel () const
template<class T>
T * castModel ()
template<class T>
const T * castModel () const

Static Public Member Functions

static bool canMergeSelection (QVector< ClipView * > clipvs)
static void mergeClips (QVector< ClipView * > clipvs)
static void bulkClearNotesOutOfBounds (QVector< ClipView * > clipvs)
Static Public Member Functions inherited from lmms::gui::ClipView
static void remove (QVector< ClipView * > clipvs)
static void toggleMute (QVector< ClipView * > clipvs)

Protected Slots

void openInPianoRoll ()
void setGhostInPianoRoll ()
void setGhostInAutomationEditor ()
void resetName ()
void changeName ()
void transposeSelection ()
void clearNotesOutOfBounds ()
Protected Slots inherited from lmms::gui::ClipView
void updateLength ()
 Updates a ClipView's length.
void updatePosition ()
 Updates a ClipView's position.

Protected Member Functions

void constructContextMenu (QMenu *) override
void mousePressEvent (QMouseEvent *_me) override
void mouseDoubleClickEvent (QMouseEvent *_me) override
void paintEvent (QPaintEvent *pe) override
void wheelEvent (QWheelEvent *_we) override
Protected Member Functions inherited from lmms::gui::ClipView
void contextMenuEvent (QContextMenuEvent *cme) override
 Set up the context menu for this ClipView.
void contextMenuAction (ContextMenuAction action)
void dragEnterEvent (QDragEnterEvent *dee) override
 Change the ClipView's display when something being dragged enters it.
void dropEvent (QDropEvent *de) override
 Handle something being dropped on this ClipObjectView.
void mousePressEvent (QMouseEvent *me) override
 Handle a mouse press on this ClipView.
void mouseMoveEvent (QMouseEvent *me) override
 Handle a mouse movement (drag) on this ClipView.
void mouseReleaseEvent (QMouseEvent *me) override
 Handle a mouse release on this ClipView.
void resizeEvent (QResizeEvent *re) override
bool unquantizedModHeld (QMouseEvent *me)
TimePos quantizeSplitPos (TimePos)
float pixelsPerBar ()
 How many pixels a bar takes for this ClipView.
DataFile createClipDataFiles (const QVector< ClipView * > &clips) const
 Create a DataFile suitable for copying multiple clips.
virtual void paintTextLabel (QString const &text, QPainter &painter)
auto hasCustomColor () const -> bool
Protected Member Functions inherited from lmms::gui::ModelView
virtual void modelChanged ()
QWidget * widget ()
virtual void doConnections ()

Properties

QColor noteFillColor
QColor noteBorderColor
QColor mutedNoteFillColor
QColor mutedNoteBorderColor
Properties inherited from lmms::gui::ClipView
QColor mutedColor
QColor mutedBackgroundColor
QColor selectedColor
QColor textColor
QColor textBackgroundColor
QColor textShadowColor
QColor patternClipBackground
bool gradient
QColor markerColor

Private Member Functions

bool isResizableBeforeStart () override
 Returns whether the user can left-resize this clip so that the start of the clip bounds is before the start of the clip content.
bool destructiveSplitClip (const TimePos pos) override

Private Attributes

QPixmap m_stepBtnOn0 = embed::getIconPixmap("step_btn_on_0")
QPixmap m_stepBtnOn200 = embed::getIconPixmap("step_btn_on_200")
QPixmap m_stepBtnOff = embed::getIconPixmap("step_btn_off")
QPixmap m_stepBtnOffLight = embed::getIconPixmap("step_btn_off_light")
QPixmap m_stepBtnHighlight = embed::getIconPixmap("step_btn_highlight")
MidiClipm_clip
QPixmap m_paintPixmap
QColor m_noteFillColor
QColor m_noteBorderColor
QColor m_mutedNoteFillColor
QColor m_mutedNoteBorderColor
QStaticText m_staticTextName
bool m_legacySEPattern

Additional Inherited Members

Static Public Attributes inherited from lmms::gui::ClipView
static const int BORDER_WIDTH = 2
Protected Types inherited from lmms::gui::ClipView
enum class  ContextMenuAction {
  Remove , Cut , Copy , Paste ,
  Mute
}
Protected Attributes inherited from lmms::gui::ClipView
TrackViewm_trackView
TimePos m_initialClipPos
TimePos m_initialClipEnd
bool m_marker = false
int m_markerPos = 0

Constructor & Destructor Documentation

◆ MidiClipView()

lmms::gui::MidiClipView::MidiClipView ( MidiClip * clip,
TrackView * parent )

◆ ~MidiClipView()

lmms::gui::MidiClipView::~MidiClipView ( )
overridedefault

Member Function Documentation

◆ bulkClearNotesOutOfBounds()

void lmms::gui::MidiClipView::bulkClearNotesOutOfBounds ( QVector< ClipView * > clipvs)
static

◆ canMergeSelection()

bool lmms::gui::MidiClipView::canMergeSelection ( QVector< ClipView * > clipvs)
static

◆ changeName

void lmms::gui::MidiClipView::changeName ( )
protectedslot

◆ clearNotesOutOfBounds

void lmms::gui::MidiClipView::clearNotesOutOfBounds ( )
protectedslot

◆ constructContextMenu()

void lmms::gui::MidiClipView::constructContextMenu ( QMenu * _cm)
overrideprotectedvirtual

Reimplemented from lmms::gui::ClipView.

◆ destructiveSplitClip()

bool lmms::gui::MidiClipView::destructiveSplitClip ( const TimePos pos)
overrideprivatevirtual

Destructively split this Clip into two clips. If the clip type does not implement this feature, it will default to normal splitting.

Parameters
posthe position of the split, relative to the start of the clip
Returns
true if the clip could be split

Reimplemented from lmms::gui::ClipView.

◆ getMidiClip

MidiClip * lmms::gui::MidiClipView::getMidiClip ( )
slot

◆ getMutedNoteBorderColor()

QColor const & lmms::gui::MidiClipView::getMutedNoteBorderColor ( ) const
inline

◆ getMutedNoteFillColor()

QColor const & lmms::gui::MidiClipView::getMutedNoteFillColor ( ) const
inline

◆ getNoteBorderColor()

QColor const & lmms::gui::MidiClipView::getNoteBorderColor ( ) const
inline

◆ getNoteFillColor()

QColor const & lmms::gui::MidiClipView::getNoteFillColor ( ) const
inline

◆ isResizableBeforeStart()

bool lmms::gui::MidiClipView::isResizableBeforeStart ( )
inlineoverrideprivatevirtual

Returns whether the user can left-resize this clip so that the start of the clip bounds is before the start of the clip content.

Reimplemented from lmms::gui::ClipView.

◆ mergeClips()

void lmms::gui::MidiClipView::mergeClips ( QVector< ClipView * > clipvs)
static

◆ mouseDoubleClickEvent()

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

◆ mousePressEvent()

void lmms::gui::MidiClipView::mousePressEvent ( QMouseEvent * _me)
overrideprotected

◆ openInPianoRoll

void lmms::gui::MidiClipView::openInPianoRoll ( )
protectedslot

◆ paintEvent()

void lmms::gui::MidiClipView::paintEvent ( QPaintEvent * pe)
overrideprotected

◆ resetName

void lmms::gui::MidiClipView::resetName ( )
protectedslot

◆ setGhostInAutomationEditor

void lmms::gui::MidiClipView::setGhostInAutomationEditor ( )
protectedslot

◆ setGhostInPianoRoll

void lmms::gui::MidiClipView::setGhostInPianoRoll ( )
protectedslot

◆ setMutedNoteBorderColor()

void lmms::gui::MidiClipView::setMutedNoteBorderColor ( QColor const & color)
inline

◆ setMutedNoteFillColor()

void lmms::gui::MidiClipView::setMutedNoteFillColor ( QColor const & color)
inline

◆ setNoteBorderColor()

void lmms::gui::MidiClipView::setNoteBorderColor ( QColor const & color)
inline

◆ setNoteFillColor()

void lmms::gui::MidiClipView::setNoteFillColor ( QColor const & color)
inline

◆ transposeSelection

void lmms::gui::MidiClipView::transposeSelection ( )
protectedslot

◆ update

void lmms::gui::MidiClipView::update ( )
overrideslot

◆ wheelEvent()

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

Member Data Documentation

◆ m_clip

MidiClip* lmms::gui::MidiClipView::m_clip
private

◆ m_legacySEPattern

bool lmms::gui::MidiClipView::m_legacySEPattern
private

◆ m_mutedNoteBorderColor

QColor lmms::gui::MidiClipView::m_mutedNoteBorderColor
private

◆ m_mutedNoteFillColor

QColor lmms::gui::MidiClipView::m_mutedNoteFillColor
private

◆ m_noteBorderColor

QColor lmms::gui::MidiClipView::m_noteBorderColor
private

◆ m_noteFillColor

QColor lmms::gui::MidiClipView::m_noteFillColor
private

◆ m_paintPixmap

QPixmap lmms::gui::MidiClipView::m_paintPixmap
private

◆ m_staticTextName

QStaticText lmms::gui::MidiClipView::m_staticTextName
private

◆ m_stepBtnHighlight

QPixmap lmms::gui::MidiClipView::m_stepBtnHighlight = embed::getIconPixmap("step_btn_highlight")
private

◆ m_stepBtnOff

QPixmap lmms::gui::MidiClipView::m_stepBtnOff = embed::getIconPixmap("step_btn_off")
private

◆ m_stepBtnOffLight

QPixmap lmms::gui::MidiClipView::m_stepBtnOffLight = embed::getIconPixmap("step_btn_off_light")
private

◆ m_stepBtnOn0

QPixmap lmms::gui::MidiClipView::m_stepBtnOn0 = embed::getIconPixmap("step_btn_on_0")
private

◆ m_stepBtnOn200

QPixmap lmms::gui::MidiClipView::m_stepBtnOn200 = embed::getIconPixmap("step_btn_on_200")
private

Property Documentation

◆ mutedNoteBorderColor

QColor lmms::gui::MidiClipView::mutedNoteBorderColor
readwrite

◆ mutedNoteFillColor

QColor lmms::gui::MidiClipView::mutedNoteFillColor
readwrite

◆ noteBorderColor

QColor lmms::gui::MidiClipView::noteBorderColor
readwrite

◆ noteFillColor

QColor lmms::gui::MidiClipView::noteFillColor
readwrite

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