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

#include <SongEditor.h>

Inheritance diagram for lmms::gui::SongEditor:
lmms::gui::TrackContainerView lmms::gui::ModelView lmms::JournallingObject lmms::SerializingObjectHook lmms::SerializingObject

Public Types

enum class  EditMode { Draw , Knife , Select }

Public Slots

void scrolled (int new_pos)
void selectRegionFromPixels (int xStart, int xEnd)
void stopSelectRegion ()
void updateRubberband ()
void setEditMode (lmms::gui::SongEditor::EditMode mode)
void setEditModeDraw ()
void setEditModeKnife ()
void setEditModeSelect ()
void toggleProportionalSnap ()
void updatePosition ()
void updatePositionLine ()
void selectAllClips (bool select)
Public Slots inherited from lmms::gui::TrackContainerView
void realignTracks ()
lmms::gui::TrackViewcreateTrackView (lmms::Track *_t)
void deleteTrackView (lmms::gui::TrackView *_tv)
void dropEvent (QDropEvent *_de) override
void dragEnterEvent (QDragEnterEvent *_dee) override
void stopRubberBand ()
 stopRubberBand Removes the rubber band from display when finished with.

Signals

void pixelsPerBarChanged (float)
void proportionalSnapChanged ()
Signals inherited from lmms::gui::TrackContainerView
void positionChanged (const lmms::TimePos &_pos)
void tracksRealigned ()

Public Member Functions

 SongEditor (Song *song)
 ~SongEditor () override=default
void saveSettings (QDomDocument &doc, QDomElement &element) override
void loadSettings (const QDomElement &element) override
ComboBoxModelsnappingModel () const
float getSnapSize () const
 Return grid size as number of bars.
QString getSnapSizeString () const
TimeLineWidgettimeLine () const
PositionLinepositionLine () const
Public Member Functions inherited from lmms::gui::TrackContainerView
 TrackContainerView (TrackContainer *tc)
 ~TrackContainerView () override
void saveSettings (QDomDocument &_doc, QDomElement &_this) override
void loadSettings (const QDomElement &_this) override
QScrollArea * contentWidget ()
const TimePoscurrentPosition () const
virtual bool fixedClips () const
float pixelsPerBar () const
void setPixelsPerBar (int ppb)
const TrackViewtrackViewAt (const int _y) const
bool rubberBandActive () const
QVector< selectableObject * > selectedObjects ()
TrackContainermodel ()
const TrackContainermodel () const
const QList< TrackView * > & trackViews () const
void moveTrackView (TrackView *trackView, int indexTo)
void moveTrackViewUp (TrackView *trackView)
void moveTrackViewDown (TrackView *trackView)
void scrollToTrackView (TrackView *_tv)
TrackViewaddTrackView (TrackView *_tv)
void removeTrackView (TrackView *_tv)
void clearAllTracks ()
QString nodeName () const override
unsigned int totalHeightOfTracks () const
RubberBandrubberBand () 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
Public Member Functions inherited from lmms::JournallingObject
 JournallingObject ()
 ~JournallingObject () override
jo_id_t id () const
void saveJournallingState (const bool newState)
void restoreJournallingState ()
void addJournalCheckPoint ()
QDomElement saveState (QDomDocument &_doc, QDomElement &_parent) override
void restoreState (const QDomElement &_this) override
bool isJournalling () const
void setJournalling (const bool _sr)
bool testAndSetJournalling (const bool newState)
bool isJournallingStateStackEmpty () const
Public Member Functions inherited from lmms::SerializingObject
 SerializingObject ()
virtual ~SerializingObject ()
void setHook (SerializingObjectHook *_hook)
SerializingObjectHookhook ()
Public Member Functions inherited from lmms::SerializingObjectHook
 SerializingObjectHook ()
virtual ~SerializingObjectHook ()

Protected Member Functions

void mousePressEvent (QMouseEvent *me) override
void mouseMoveEvent (QMouseEvent *me) override
void mouseReleaseEvent (QMouseEvent *me) override
Protected Member Functions inherited from lmms::gui::ModelView
virtual void modelChanged ()
QWidget * widget ()
virtual void doConnections ()
Protected Member Functions inherited from lmms::JournallingObject
void changeID (jo_id_t _id)

Private Slots

void setMasterVolume (int new_val)
void showMasterVolumeFloat ()
void updateMasterVolumeFloat (int new_val)
void hideMasterVolumeFloat ()
void setMasterPitch (int new_val)
void showMasterPitchFloat ()
void updateMasterPitchFloat (int new_val)
void hideMasterPitchFloat ()
void updateScrollBar (int len)
void zoomingChanged ()

Private Member Functions

void keyPressEvent (QKeyEvent *ke) override
void wheelEvent (QWheelEvent *we) override
bool allowRubberband () const override
bool knifeMode () const override
int calculatePixelsPerBar () const
 Convert zoom slider's value to bar width in pixels.
int calculateZoomSliderValue (int pixelsPerBar) const
 Convert bar width in pixels to zoom slider value.
int trackIndexFromSelectionPoint (int yPos)
int indexOfTrackView (const TrackView *tv)
void adjustLeftRightScoll (int value)

Private Attributes

Songm_song
QScrollBar * m_leftRightScroll
LcdSpinBoxm_tempoSpinBox
TimeLineWidgetm_timeLine
PositionLinem_positionLine
MeterDialogm_timeSigDisplay
AutomatableSliderm_masterVolumeSlider
AutomatableSliderm_masterPitchSlider
TextFloatm_mvsStatus
TextFloatm_mpsStatus
IntModelm_zoomingModel
ComboBoxModelm_snappingModel
bool m_proportionalSnap
bool m_scrollBack
bool m_smoothScroll
EditMode m_mode
EditMode m_ctrlMode
QPoint m_origin
QPoint m_scrollPos
QPoint m_mousePos
int m_rubberBandStartTrackview
TimePos m_rubberbandStartTimePos
int m_rubberbandPixelsPerBar
 pixels per bar when selection starts
int m_trackHeadWidth
bool m_selectRegion

Friends

class SongEditorWindow

Additional Inherited Members

Protected Attributes inherited from lmms::gui::TrackContainerView
TimePos m_currentPosition
Static Protected Attributes inherited from lmms::gui::TrackContainerView
static const int DEFAULT_PIXELS_PER_BAR = 128

Member Enumeration Documentation

◆ EditMode

Enumerator
Draw 
Knife 
Select 

Constructor & Destructor Documentation

◆ SongEditor()

lmms::gui::SongEditor::SongEditor ( Song * song)

◆ ~SongEditor()

lmms::gui::SongEditor::~SongEditor ( )
overridedefault

Member Function Documentation

◆ adjustLeftRightScoll()

void lmms::gui::SongEditor::adjustLeftRightScoll ( int value)
private

◆ allowRubberband()

bool lmms::gui::SongEditor::allowRubberband ( ) const
overrideprivatevirtual

Reimplemented from lmms::gui::TrackContainerView.

◆ calculatePixelsPerBar()

int lmms::gui::SongEditor::calculatePixelsPerBar ( ) const
private

Convert zoom slider's value to bar width in pixels.

◆ calculateZoomSliderValue()

int lmms::gui::SongEditor::calculateZoomSliderValue ( int pixelsPerBar) const
private

Convert bar width in pixels to zoom slider value.

◆ getSnapSize()

float lmms::gui::SongEditor::getSnapSize ( ) const

Return grid size as number of bars.

◆ getSnapSizeString()

QString lmms::gui::SongEditor::getSnapSizeString ( ) const

◆ hideMasterPitchFloat

void lmms::gui::SongEditor::hideMasterPitchFloat ( void )
privateslot

◆ hideMasterVolumeFloat

void lmms::gui::SongEditor::hideMasterVolumeFloat ( void )
privateslot

◆ indexOfTrackView()

int lmms::gui::SongEditor::indexOfTrackView ( const TrackView * tv)
private

◆ keyPressEvent()

void lmms::gui::SongEditor::keyPressEvent ( QKeyEvent * ke)
overrideprivate

◆ knifeMode()

bool lmms::gui::SongEditor::knifeMode ( ) const
overrideprivatevirtual

Reimplemented from lmms::gui::TrackContainerView.

◆ loadSettings()

void lmms::gui::SongEditor::loadSettings ( const QDomElement & element)
overridevirtual

◆ mouseMoveEvent()

void lmms::gui::SongEditor::mouseMoveEvent ( QMouseEvent * me)
overrideprotected

◆ mousePressEvent()

void lmms::gui::SongEditor::mousePressEvent ( QMouseEvent * me)
overrideprotected

◆ mouseReleaseEvent()

void lmms::gui::SongEditor::mouseReleaseEvent ( QMouseEvent * me)
overrideprotected

◆ pixelsPerBarChanged

void lmms::gui::SongEditor::pixelsPerBarChanged ( float )
signal

◆ positionLine()

PositionLine * lmms::gui::SongEditor::positionLine ( ) const
inline

◆ proportionalSnapChanged

void lmms::gui::SongEditor::proportionalSnapChanged ( )
signal

◆ saveSettings()

void lmms::gui::SongEditor::saveSettings ( QDomDocument & doc,
QDomElement & element )
overridevirtual

◆ scrolled

void lmms::gui::SongEditor::scrolled ( int new_pos)
slot

◆ selectAllClips

void lmms::gui::SongEditor::selectAllClips ( bool select)
slot

◆ selectRegionFromPixels

void lmms::gui::SongEditor::selectRegionFromPixels ( int xStart,
int xEnd )
slot

◆ setEditMode

void lmms::gui::SongEditor::setEditMode ( lmms::gui::SongEditor::EditMode mode)
slot

◆ setEditModeDraw

void lmms::gui::SongEditor::setEditModeDraw ( )
slot

◆ setEditModeKnife

void lmms::gui::SongEditor::setEditModeKnife ( )
slot

◆ setEditModeSelect

void lmms::gui::SongEditor::setEditModeSelect ( )
slot

◆ setMasterPitch

void lmms::gui::SongEditor::setMasterPitch ( int new_val)
privateslot

◆ setMasterVolume

void lmms::gui::SongEditor::setMasterVolume ( int new_val)
privateslot

◆ showMasterPitchFloat

void lmms::gui::SongEditor::showMasterPitchFloat ( void )
privateslot

◆ showMasterVolumeFloat

void lmms::gui::SongEditor::showMasterVolumeFloat ( void )
privateslot

◆ snappingModel()

ComboBoxModel * lmms::gui::SongEditor::snappingModel ( ) const

◆ stopSelectRegion

void lmms::gui::SongEditor::stopSelectRegion ( )
slot

◆ timeLine()

TimeLineWidget * lmms::gui::SongEditor::timeLine ( ) const
inline

◆ toggleProportionalSnap

void lmms::gui::SongEditor::toggleProportionalSnap ( )
slot

◆ trackIndexFromSelectionPoint()

int lmms::gui::SongEditor::trackIndexFromSelectionPoint ( int yPos)
private

◆ updateMasterPitchFloat

void lmms::gui::SongEditor::updateMasterPitchFloat ( int new_val)
privateslot

◆ updateMasterVolumeFloat

void lmms::gui::SongEditor::updateMasterVolumeFloat ( int new_val)
privateslot

◆ updatePosition

void lmms::gui::SongEditor::updatePosition ( )
slot

◆ updatePositionLine

void lmms::gui::SongEditor::updatePositionLine ( )
slot

◆ updateRubberband

void lmms::gui::SongEditor::updateRubberband ( )
slot

◆ updateScrollBar

void lmms::gui::SongEditor::updateScrollBar ( int len)
privateslot

◆ wheelEvent()

void lmms::gui::SongEditor::wheelEvent ( QWheelEvent * we)
overrideprivate

◆ zoomingChanged

void lmms::gui::SongEditor::zoomingChanged ( )
privateslot

◆ SongEditorWindow

friend class SongEditorWindow
friend

Member Data Documentation

◆ m_ctrlMode

EditMode lmms::gui::SongEditor::m_ctrlMode
private

◆ m_leftRightScroll

QScrollBar* lmms::gui::SongEditor::m_leftRightScroll
private

◆ m_masterPitchSlider

AutomatableSlider* lmms::gui::SongEditor::m_masterPitchSlider
private

◆ m_masterVolumeSlider

AutomatableSlider* lmms::gui::SongEditor::m_masterVolumeSlider
private

◆ m_mode

EditMode lmms::gui::SongEditor::m_mode
private

◆ m_mousePos

QPoint lmms::gui::SongEditor::m_mousePos
private

◆ m_mpsStatus

TextFloat* lmms::gui::SongEditor::m_mpsStatus
private

◆ m_mvsStatus

TextFloat* lmms::gui::SongEditor::m_mvsStatus
private

◆ m_origin

QPoint lmms::gui::SongEditor::m_origin
private

◆ m_positionLine

PositionLine* lmms::gui::SongEditor::m_positionLine
private

◆ m_proportionalSnap

bool lmms::gui::SongEditor::m_proportionalSnap
private

◆ m_rubberbandPixelsPerBar

int lmms::gui::SongEditor::m_rubberbandPixelsPerBar
private

pixels per bar when selection starts

◆ m_rubberbandStartTimePos

TimePos lmms::gui::SongEditor::m_rubberbandStartTimePos
private

◆ m_rubberBandStartTrackview

int lmms::gui::SongEditor::m_rubberBandStartTrackview
private

◆ m_scrollBack

bool lmms::gui::SongEditor::m_scrollBack
private

◆ m_scrollPos

QPoint lmms::gui::SongEditor::m_scrollPos
private

◆ m_selectRegion

bool lmms::gui::SongEditor::m_selectRegion
private

◆ m_smoothScroll

bool lmms::gui::SongEditor::m_smoothScroll
private

◆ m_snappingModel

ComboBoxModel* lmms::gui::SongEditor::m_snappingModel
private

◆ m_song

Song* lmms::gui::SongEditor::m_song
private

◆ m_tempoSpinBox

LcdSpinBox* lmms::gui::SongEditor::m_tempoSpinBox
private

◆ m_timeLine

TimeLineWidget* lmms::gui::SongEditor::m_timeLine
private

◆ m_timeSigDisplay

MeterDialog* lmms::gui::SongEditor::m_timeSigDisplay
private

◆ m_trackHeadWidth

int lmms::gui::SongEditor::m_trackHeadWidth
private

◆ m_zoomingModel

IntModel* lmms::gui::SongEditor::m_zoomingModel
private

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