|
lmms
Cross-platform music production software
|
#include <ClipView.h>
Public Slots | |
| 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 | |
| ClipView (Clip *clip, TrackView *tv) | |
| Creates a new clip view for the given clip in the given track view. | |
| ~ClipView () override | |
| Destroys the given ClipView. | |
| bool | fixedClips () |
| Checks if the containing trackView has fixed Clips. | |
| Clip * | getClip () |
| TrackView * | getTrackView () |
| QColor | mutedColor () const |
| QColor | mutedBackgroundColor () const |
| QColor | selectedColor () const |
| QColor | textColor () const |
| QColor | textBackgroundColor () const |
| QColor | textShadowColor () const |
| QColor | patternClipBackground () const |
| bool | gradient () const |
| QColor | markerColor () const |
| void | setMutedColor (const QColor &c) |
| 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 () const |
| 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 () |
| Model * | model () |
| const Model * | model () const |
| template<class T> | |
| T * | castModel () |
| template<class T> | |
| const T * | castModel () const |
Static Public Member Functions | |
| static void | remove (QVector< ClipView * > clipvs) |
| static void | toggleMute (QVector< ClipView * > clipvs) |
Static Public Attributes | |
| static const int | BORDER_WIDTH = 2 |
Protected Types | |
| enum class | ContextMenuAction { Remove , Cut , Copy , Paste , Mute } |
Protected Slots | |
| void | updateLength () |
| Updates a ClipView's length. | |
| void | updatePosition () |
| Updates a ClipView's position. | |
Protected Member Functions | |
| virtual void | constructContextMenu (QMenu *) |
| 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 () const |
| 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 () |
Protected Attributes | |
| TrackView * | m_trackView |
| TimePos | m_initialClipPos |
| TimePos | m_initialClipEnd |
| bool | m_marker = false |
| int | m_markerPos = 0 |
Properties | |
| QColor | mutedColor |
| QColor | mutedBackgroundColor |
| QColor | selectedColor |
| QColor | textColor |
| QColor | textBackgroundColor |
| QColor | textShadowColor |
| QColor | patternClipBackground |
| bool | gradient |
| QColor | markerColor |
Private Types | |
| enum class | Action { None , Move , MoveSelection , Resize , ResizeLeft , Split , CopySelection , ToggleSelected } |
Private Member Functions | |
| void | setInitialPos (QPoint pos) |
| void | setInitialOffsets () |
| Save the offsets between all selected tracks and a clicked track. | |
| bool | mouseMovedDistance (QMouseEvent *me, int distance) |
| Detect whether the mouse moved more than n pixels on screen. | |
| TimePos | draggedClipPos (QMouseEvent *me) |
| Calculate the new position of a dragged Clip from a mouse event. | |
| int | knifeMarkerPos (QMouseEvent *me) |
| void | setColor (const std::optional< QColor > &color) |
| Change color of all selected clips. | |
| int | resizeGripWidth () const |
| virtual bool | isResizableBeforeStart () |
| bool | splitClip (const TimePos pos) |
| Split this Clip into two clips. | |
| virtual bool | destructiveSplitClip (const TimePos pos) |
| Destructively split this Clip into two clips. | |
| void | updateCursor (QMouseEvent *me) |
| Chooses the correct cursor to be displayed on the widget. | |
Private Attributes | |
| Clip * | m_clip |
| Action | m_action |
| QPoint | m_initialMousePos |
| QPoint | m_initialMouseGlobalPos |
| QVector< TimePos > | m_initialOffsets |
| TextFloat * | m_hint |
| QColor | m_mutedColor |
| QColor | m_mutedBackgroundColor |
| QColor | m_selectedColor |
| QColor | m_textColor |
| QColor | m_textBackgroundColor |
| QColor | m_textShadowColor |
| QColor | m_patternClipBackground |
| bool | m_gradient |
| QColor | m_markerColor |
| bool | m_needsUpdate |
Static Private Attributes | |
| static TextFloat * | s_textFloat = nullptr |
| A pointer for the text bubble used when moving segments, etc. | |
|
strongprivate |
|
strongprotected |
Creates a new clip view for the given clip in the given track view.
| clip | The clip to be displayed |
| tv | The track view that will contain the new object |
|
override |
Destroys the given ClipView.
|
virtualslot |
|
inlineprotectedvirtual |
Reimplemented in lmms::gui::AutomationClipView, lmms::gui::MidiClipView, lmms::gui::PatternClipView, and lmms::gui::SampleClipView.
|
protected |
|
overrideprotected |
| void lmms::gui::ClipView::copy | ( | QVector< ClipView * > | clipvs | ) |
|
protected |
Create a DataFile suitable for copying multiple clips.
Clips in the vector are written to the "clips" node in the DataFile. The ClipView's initial mouse position is written to the "initialMouseX" node in the DataFile. When dropped on a track, this is used to create copies of the Clips.
| clips | The trackContectObjects to save in a DataFile |
| void lmms::gui::ClipView::cut | ( | QVector< ClipView * > | clipvs | ) |
|
inlineprivatevirtual |
Destructively split this Clip into two clips.
If the clip type does not implement this feature, it will default to normal splitting.
| pos | the position of the split, relative to the start of the clip |
Reimplemented in lmms::gui::MidiClipView.
|
overrideprotected |
Change the ClipView's display when something being dragged enters it.
We need to notify Qt to change our display if something being dragged has entered our 'airspace'.
| dee | The QDragEnterEvent to watch. |
|
private |
Calculate the new position of a dragged Clip from a mouse event.
| me | The QMouseEvent |
|
overrideprotected |
Handle something being dropped on this ClipObjectView.
When something has been dropped on this ClipView, and it's a clip, then use an instance of our dataFile reader to take the xml of the clip and turn it into something we can write over our current state.
| de | The QDropEvent to handle. |
| bool lmms::gui::ClipView::fixedClips | ( | ) |
Checks if the containing trackView has fixed Clips.
| QVector< ClipView * > lmms::gui::ClipView::getClickedClips | ( | ) |
|
inline |
| QColor lmms::gui::ClipView::getColorForDisplay | ( | QColor | defaultColor | ) |
|
inline |
|
inline |
|
protected |
|
inlineprivatevirtual |
Reimplemented in lmms::gui::AutomationClipView, and lmms::gui::MidiClipView.
|
private |
|
inline |
|
private |
Detect whether the mouse moved more than n pixels on screen.
| me | The QMouseEvent. |
| distance | The threshold distance that the mouse has moved to return true. |
|
overrideprotected |
Handle a mouse movement (drag) on this ClipView.
Handles the various ways in which a ClipView can be used with a mouse drag.
| me | The QMouseEvent to handle. |
|
overrideprotected |
Handle a mouse press on this ClipView.
Handles the various ways in which a ClipView can be used with a click of a mouse button.
| me | The QMouseEvent to handle. |
|
overrideprotected |
Handle a mouse release on this ClipView.
If we're in move or resize mode, journal the change as appropriate. Then tidy up.
| me | The QMouseEvent to handle. |
|
inline |
|
inline |
|
inline |
|
protectedvirtual |
| void lmms::gui::ClipView::paste | ( | ) |
|
inline |
|
protected |
How many pixels a bar takes for this ClipView.
|
slot |
|
slot |
|
static |
|
slot |
|
inlineoverrideprotected |
|
private |
|
slot |
|
inline |
|
private |
Change color of all selected clips.
| color | The new color, if any. |
|
inline |
|
private |
Save the offsets between all selected tracks and a clicked track.
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Split this Clip into two clips.
| pos | the position of the split, relative to the start of the clip |
|
inline |
|
inline |
|
inline |
|
static |
| void lmms::gui::ClipView::toggleSelectedAutoResize | ( | ) |
|
protected |
|
overrideslot |
|
private |
Chooses the correct cursor to be displayed on the widget.
| me | The QMouseEvent that is triggering the cursor change |
|
protectedslot |
|
protectedslot |
Updates a ClipView's position.
Ask our track view to change our position. Then make sure that the track view is updated in case this position has changed the track view's length.
|
static |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
staticprivate |
A pointer for the text bubble used when moving segments, etc.
In a number of situations, LMMS displays a floating text bubble beside the cursor as you move or resize elements of a track about. This pointer keeps track of it, as you only ever need one at a time.
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |