Rename TCO and related to Clip (#6226)

This PR renames

    TCO -> Clip
    Pattern -> MidiClip
    *TCO and *TCOView -> *Clip and *ClipView

The savefiles are not yet modified by this PR.
This commit is contained in:
Alexandre Almeida
2022-01-14 01:45:21 -03:00
committed by GitHub
parent bf323d2024
commit 55d361fb65
135 changed files with 5163 additions and 5175 deletions

View File

@@ -56,9 +56,6 @@ const int BYTES_PER_SURROUND_FRAME = sizeof( surroundSampleFrame );
const float OUTPUT_SAMPLE_MULTIPLIER = 32767.0f;
#include "PlayHandle.h"
class AudioEngineWorkerThread;

View File

@@ -1,6 +1,6 @@
/*
* AutomationPattern.h - declaration of class AutomationPattern, which contains
* all information about an automation pattern
* AutomationClip.h - declaration of class AutomationClip, which contains
* all information about an automation clip
*
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
@@ -24,14 +24,14 @@
*
*/
#ifndef AUTOMATION_PATTERN_H
#define AUTOMATION_PATTERN_H
#ifndef AUTOMATION_CLIP_H
#define AUTOMATION_CLIP_H
#include <QtCore/QMap>
#include <QtCore/QPointer>
#include "AutomationNode.h"
#include "TrackContentObject.h"
#include "Clip.h"
class AutomationTrack;
@@ -39,7 +39,7 @@ class TimePos;
class LMMS_EXPORT AutomationPattern : public TrackContentObject
class LMMS_EXPORT AutomationClip : public Clip
{
Q_OBJECT
public:
@@ -55,9 +55,9 @@ public:
using TimemapIterator = timeMap::const_iterator;
AutomationPattern( AutomationTrack * _auto_track );
AutomationPattern( const AutomationPattern & _pat_to_copy );
virtual ~AutomationPattern() = default;
AutomationClip( AutomationTrack * _auto_track );
AutomationClip( const AutomationClip & _clip_to_copy );
virtual ~AutomationClip() = default;
bool addObject( AutomatableModel * _obj, bool _search_dup = true );
@@ -149,15 +149,15 @@ public:
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
void loadSettings( const QDomElement & _this ) override;
static const QString classNodeName() { return "automationpattern"; }
static const QString classNodeName() { return "automationclip"; }
QString nodeName() const override { return classNodeName(); }
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
static bool isAutomated( const AutomatableModel * _m );
static QVector<AutomationPattern *> patternsForModel( const AutomatableModel * _m );
static AutomationPattern * globalAutomationPattern( AutomatableModel * _m );
static QVector<AutomationClip *> clipsForModel( const AutomatableModel * _m );
static AutomationClip * globalAutomationClip( AutomatableModel * _m );
static void resolveAllIDs();
bool isRecording() const { return m_isRecording; }
@@ -179,9 +179,9 @@ private:
void generateTangents(timeMap::iterator it, int numToGenerate);
float valueAt( timeMap::const_iterator v, int offset ) const;
// Mutex to make methods involving automation patterns thread safe
// Mutex to make methods involving automation clips thread safe
// Mutable so we can lock it from const objects
mutable QMutex m_patternMutex;
mutable QMutex m_clipMutex;
AutomationTrack * m_autoTrack;
QVector<jo_id_t> m_idsToResolve;
@@ -204,40 +204,40 @@ private:
static const float DEFAULT_MIN_VALUE;
static const float DEFAULT_MAX_VALUE;
friend class AutomationPatternView;
friend class AutomationClipView;
friend class AutomationNode;
} ;
//Short-hand functions to access node values in an automation pattern;
//Short-hand functions to access node values in an automation clip;
// replacement for CPP macros with the same purpose; could be refactored
// further in the future.
inline float INVAL(AutomationPattern::TimemapIterator it)
inline float INVAL(AutomationClip::TimemapIterator it)
{
return it->getInValue();
}
inline float OUTVAL(AutomationPattern::TimemapIterator it)
inline float OUTVAL(AutomationClip::TimemapIterator it)
{
return it->getOutValue();
}
inline float OFFSET(AutomationPattern::TimemapIterator it)
inline float OFFSET(AutomationClip::TimemapIterator it)
{
return it->getValueOffset();
}
inline float INTAN(AutomationPattern::TimemapIterator it)
inline float INTAN(AutomationClip::TimemapIterator it)
{
return it->getInTangent();
}
inline float OUTTAN(AutomationPattern::TimemapIterator it)
inline float OUTTAN(AutomationClip::TimemapIterator it)
{
return it->getOutTangent();
}
inline int POS(AutomationPattern::TimemapIterator it)
inline int POS(AutomationClip::TimemapIterator it)
{
return it.key();
}

View File

@@ -1,5 +1,5 @@
/*
* AutomationPatternView.h - declaration of class AutomationPatternView
* AutomationClipView.h - declaration of class AutomationClipView
*
* Copyright (c) 2008-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,28 +22,28 @@
*
*/
#ifndef AUTOMATION_PATTERN_VIEW_H
#define AUTOMATION_PATTERN_VIEW_H
#ifndef AUTOMATION_CLIP_VIEW_H
#define AUTOMATION_CLIP_VIEW_H
#include <QStaticText>
#include "AutomationPattern.h"
#include "AutomationClip.h"
#include "Song.h"
#include "SongEditor.h"
#include "TrackContentObjectView.h"
#include "ClipView.h"
class AutomationPatternView : public TrackContentObjectView
class AutomationClipView : public ClipView
{
Q_OBJECT
public:
AutomationPatternView( AutomationPattern * _pat, TrackView * _parent );
virtual ~AutomationPatternView();
AutomationClipView( AutomationClip * _clip, TrackView * _parent );
virtual ~AutomationClipView();
public slots:
/// Opens this view's pattern in the global automation editor
/// Opens this view's clip in the global automation editor
void openInAutomationEditor();
void update() override;
@@ -65,12 +65,12 @@ protected:
private:
AutomationPattern * m_pat;
AutomationClip * m_clip;
QPixmap m_paintPixmap;
QStaticText m_staticTextName;
static QPixmap * s_pat_rec;
static QPixmap * s_clip_rec;
void scaleTimemapToFit( float oldMin, float oldMax );
} ;

View File

@@ -34,7 +34,7 @@
#include "lmms_basics.h"
#include "JournallingObject.h"
#include "TimePos.h"
#include "AutomationPattern.h"
#include "AutomationClip.h"
#include "ComboBoxModel.h"
#include "Knob.h"
@@ -61,16 +61,16 @@ class AutomationEditor : public QWidget, public JournallingObject
Q_PROPERTY(QColor crossColor MEMBER m_crossColor)
Q_PROPERTY(QColor backgroundShade MEMBER m_backgroundShade)
public:
void setCurrentPattern(AutomationPattern * new_pattern);
void setCurrentClip(AutomationClip * new_clip);
inline const AutomationPattern * currentPattern() const
inline const AutomationClip * currentClip() const
{
return m_pattern;
return m_clip;
}
inline bool validPattern() const
inline bool validClip() const
{
return m_pattern != nullptr;
return m_clip != nullptr;
}
void saveSettings(QDomDocument & doc, QDomElement & parent) override;
@@ -89,11 +89,11 @@ public:
public slots:
void update();
void updateAfterPatternChange();
void updateAfterClipChange();
protected:
typedef AutomationPattern::timeMap timeMap;
typedef AutomationClip::timeMap timeMap;
void keyPressEvent(QKeyEvent * ke) override;
void leaveEvent(QEvent * e) override;
@@ -125,7 +125,7 @@ protected slots:
void setEditMode(AutomationEditor::EditModes mode);
void setEditMode(int mode);
void setProgressionType(AutomationPattern::ProgressionTypes type);
void setProgressionType(AutomationClip::ProgressionTypes type);
void setProgressionType(int type);
void setTension();
@@ -134,7 +134,7 @@ protected slots:
void zoomingXChanged();
void zoomingYChanged();
/// Updates the pattern's quantization using the current user selected value.
/// Updates the clip's quantization using the current user selected value.
void setQuantization();
private:
@@ -178,7 +178,7 @@ private:
FloatModel * m_tensionModel;
AutomationPattern * m_pattern;
AutomationClip * m_clip;
float m_minLevel;
float m_maxLevel;
float m_step;
@@ -234,7 +234,7 @@ private:
signals:
void currentPatternChanged();
void currentClipChanged();
void positionChanged( const TimePos & );
} ;
@@ -251,23 +251,23 @@ public:
AutomationEditorWindow();
~AutomationEditorWindow();
void setCurrentPattern(AutomationPattern* pattern);
const AutomationPattern* currentPattern();
void setCurrentClip(AutomationClip* clip);
const AutomationClip* currentClip();
void dropEvent( QDropEvent * _de ) override;
void dragEnterEvent( QDragEnterEvent * _dee ) override;
void open(AutomationPattern* pattern);
void open(AutomationClip* clip);
AutomationEditor* m_editor;
QSize sizeHint() const override;
public slots:
void clearCurrentPattern();
void clearCurrentClip();
signals:
void currentPatternChanged();
void currentClipChanged();
protected:
void focusInEvent(QFocusEvent * event) override;

View File

@@ -26,18 +26,18 @@
#ifndef AUTOMATION_NODE_H
#define AUTOMATION_NODE_H
class AutomationPattern;
class AutomationClip;
// Note: We use the default copy-assignment on the AutomationPattern constructor. It's
// Note: We use the default copy-assignment on the AutomationClip constructor. It's
// fine for now as we don't have dynamic allocated members, but if any are added we should
// have an user-defined one to perform a deep-copy.
class AutomationNode
{
public:
AutomationNode(); // Dummy constructor for the QMap
AutomationNode(AutomationPattern* pat, float value, int pos);
AutomationNode(AutomationPattern* pat, float inValue, float outValue, int pos);
AutomationNode(AutomationClip* clip, float value, int pos);
AutomationNode(AutomationClip* clip, float inValue, float outValue, int pos);
AutomationNode& operator+=(float f)
{
@@ -123,18 +123,18 @@ public:
}
/**
* @brief Sets the pattern this node belongs to
* @param AutomationPattern* pattern that m_pattern will be
* @brief Sets the clip this node belongs to
* @param AutomationClip* clip that m_clip will be
* set to
*/
inline void setPattern(AutomationPattern* pat)
inline void setClip(AutomationClip* clip)
{
m_pattern = pat;
m_clip = clip;
}
private:
// Pattern that this node belongs to
AutomationPattern* m_pattern;
// Clip that this node belongs to
AutomationClip* m_clip;
// Time position of this node (matches the timeMap key)
int m_pos;

View File

@@ -38,7 +38,7 @@ public:
virtual ~AutomationTrack() = default;
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
QString nodeName() const override
{
@@ -46,7 +46,7 @@ public:
}
TrackView * createView( TrackContainerView* ) override;
TrackContentObject* createTCO(const TimePos & pos) override;
Clip* createClip(const TimePos & pos) override;
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _parent ) override;

View File

@@ -1,5 +1,5 @@
/*
* BBTCO.h
* BBClip.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,31 +23,31 @@
*/
#ifndef BB_TCO_H
#define BB_TCO_H
#ifndef BB_CLIP_H
#define BB_CLIP_H
#include "TrackContentObjectView.h"
#include "ClipView.h"
class BBTCO : public TrackContentObject
class BBClip : public Clip
{
public:
BBTCO( Track * _track );
virtual ~BBTCO() = default;
BBClip( Track * _track );
virtual ~BBClip() = default;
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
void loadSettings( const QDomElement & _this ) override;
inline QString nodeName() const override
{
return( "bbtco" );
return( "bbclip" );
}
int bbTrackIndex();
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
private:
friend class BBTCOView;
friend class BBClipView;
} ;

View File

@@ -1,5 +1,5 @@
/*
* BBTCOView.h
* BBClipView.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,20 +23,20 @@
*/
#ifndef BB_TCO_VIEW_H
#define BB_TCO_VIEW_H
#ifndef BB_CLIP_VIEW_H
#define BB_CLIP_VIEW_H
#include "BBTCO.h"
#include "BBClip.h"
#include <QStaticText>
class BBTCOView : public TrackContentObjectView
class BBClipView : public ClipView
{
Q_OBJECT
public:
BBTCOView( TrackContentObject * _tco, TrackView * _tv );
virtual ~BBTCOView() = default;
BBClipView( Clip * _clip, TrackView * _tv );
virtual ~BBClipView() = default;
public slots:
@@ -55,7 +55,7 @@ protected:
private:
BBTCO * m_bbTCO;
BBClip * m_bbClip;
QPixmap m_paintPixmap;
QStaticText m_staticTextName;

View File

@@ -71,7 +71,7 @@ class BBTrackContainerView : public TrackContainerView
public:
BBTrackContainerView(BBTrackContainer* tc);
bool fixedTCOs() const override
bool fixedClips() const override
{
return true;
}
@@ -87,7 +87,7 @@ public slots:
void removeSteps();
void addSampleTrack();
void addAutomationTrack();
void clonePattern();
void cloneClip();
protected slots:
void dropEvent(QDropEvent * de ) override;

View File

@@ -30,7 +30,7 @@
#include <QtCore/QMap>
#include "BBTCOView.h"
#include "BBClipView.h"
#include "Track.h"
class TrackLabelButton;
@@ -45,9 +45,9 @@ public:
virtual ~BBTrack();
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
TrackView * createView( TrackContainerView* tcv ) override;
TrackContentObject* createTCO(const TimePos & pos) override;
Clip* createClip(const TimePos & pos) override;
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _parent ) override;

View File

@@ -38,7 +38,7 @@ public:
BBTrackContainer();
virtual ~BBTrackContainer();
virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int tcoNum = -1);
virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int clipNum = -1);
void updateAfterTrackAdd() override;
@@ -57,11 +57,11 @@ public:
void swapBB(int bb1, int bb2);
void updateBBTrack(TrackContentObject * tco);
void updateBBTrack(Clip * clip);
void fixIncorrectPositions();
void createTCOsForBB(int bb);
void createClipsForBB(int bb);
AutomatedValueMap automatedValuesAt(TimePos time, int tcoNum) const override;
AutomatedValueMap automatedValuesAt(TimePos time, int clipNum) const override;
public slots:
void play();

View File

@@ -1,5 +1,5 @@
/*
* TrackConteintObject.h - declaration of TrackContentObject class
* TrackConteintObject.h - declaration of Clip class
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -32,20 +32,20 @@
class Track;
class TrackContentObjectView;
class ClipView;
class TrackContainer;
class TrackView;
class LMMS_EXPORT TrackContentObject : public Model, public JournallingObject
class LMMS_EXPORT Clip : public Model, public JournallingObject
{
Q_OBJECT
MM_OPERATORS
mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel);
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
public:
TrackContentObject( Track * track );
virtual ~TrackContentObject();
Clip( Track * track );
virtual ~Clip();
inline Track * getTrack() const
{
@@ -117,7 +117,7 @@ public:
virtual void movePosition( const TimePos & pos );
virtual void changeLength( const TimePos & length );
virtual TrackContentObjectView * createView( TrackView * tv ) = 0;
virtual ClipView * createView( TrackView * tv ) = 0;
inline void selectViewOnCreate( bool select )
{
@@ -130,13 +130,13 @@ public:
}
/// Returns true if and only if a->startPosition() < b->startPosition()
static bool comparePosition(const TrackContentObject* a, const TrackContentObject* b);
static bool comparePosition(const Clip* a, const Clip* b);
TimePos startTimeOffset() const;
void setStartTimeOffset( const TimePos &startTimeOffset );
// Will copy the state of a TCO to another TCO
static void copyStateTo( TrackContentObject *src, TrackContentObject *dst );
// Will copy the state of a clip to another clip
static void copyStateTo( Clip *src, Clip *dst );
public slots:
void toggleMute();
@@ -145,7 +145,7 @@ public slots:
signals:
void lengthChanged();
void positionChanged();
void destroyedTCO();
void destroyedClip();
void colorChanged();
@@ -173,7 +173,7 @@ private:
QColor m_color;
bool m_useCustomClipColor;
friend class TrackContentObjectView;
friend class ClipView;
} ;

View File

@@ -1,5 +1,5 @@
/*
* TrackContentObjectView.h - declaration of TrackContentObjectView class
* ClipView.h - declaration of ClipView class
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -30,7 +30,7 @@
#include "ModelView.h"
#include "Rubberband.h"
#include "TrackContentObject.h"
#include "Clip.h"
class QMenu;
@@ -38,11 +38,11 @@ class QContextMenuEvent;
class DataFile;
class TextFloat;
class TrackContentObject;
class Clip;
class TrackView;
class TrackContentObjectView : public selectableObject, public ModelView
class ClipView : public selectableObject, public ModelView
{
Q_OBJECT
@@ -53,7 +53,7 @@ class TrackContentObjectView : public selectableObject, public ModelView
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
Q_PROPERTY( QColor textBackgroundColor READ textBackgroundColor WRITE setTextBackgroundColor )
Q_PROPERTY( QColor textShadowColor READ textShadowColor WRITE setTextShadowColor )
Q_PROPERTY( QColor BBPatternBackground READ BBPatternBackground WRITE setBBPatternBackground )
Q_PROPERTY( QColor BBClipBackground READ BBClipBackground WRITE setBBClipBackground )
Q_PROPERTY( bool gradient READ gradient WRITE setGradient )
// We have to use a QSize here because using QPoint isn't supported.
// width -> x, height -> y
@@ -61,14 +61,14 @@ class TrackContentObjectView : public selectableObject, public ModelView
Q_PROPERTY( QSize mouseHotspotKnife MEMBER m_mouseHotspotKnife )
public:
TrackContentObjectView( TrackContentObject * tco, TrackView * tv );
virtual ~TrackContentObjectView();
ClipView( Clip * clip, TrackView * tv );
virtual ~ClipView();
bool fixedTCOs();
bool fixedClips();
inline TrackContentObject * getTrackContentObject()
inline Clip * getClip()
{
return m_tco;
return m_clip;
}
inline TrackView * getTrackView()
@@ -83,7 +83,7 @@ public:
QColor textColor() const;
QColor textBackgroundColor() const;
QColor textShadowColor() const;
QColor BBPatternBackground() const;
QColor BBClipBackground() const;
bool gradient() const;
void setMutedColor( const QColor & c );
void setMutedBackgroundColor( const QColor & c );
@@ -91,30 +91,30 @@ public:
void setTextColor( const QColor & c );
void setTextBackgroundColor( const QColor & c );
void setTextShadowColor( const QColor & c );
void setBBPatternBackground( const QColor & c );
void setBBClipBackground( const QColor & c );
void setGradient( const bool & b );
// access needsUpdate member variable
bool needsUpdate();
void setNeedsUpdate( bool b );
// Method to get a QVector of TCOs to be affected by a context menu action
QVector<TrackContentObjectView *> getClickedTCOs();
// Method to get a QVector of Clips to be affected by a context menu action
QVector<ClipView *> getClickedClips();
// Methods to remove, copy, cut, paste and mute a QVector of TCO views
void copy( QVector<TrackContentObjectView *> tcovs );
void cut( QVector<TrackContentObjectView *> tcovs );
// Methods to remove, copy, cut, paste and mute a QVector of Clip views
void copy( QVector<ClipView *> clipvs );
void cut( QVector<ClipView *> clipvs );
void paste();
// remove and toggleMute are static because they don't depend
// being called from a particular TCO view, but can be called anywhere as long
// as a valid TCO view list is given, while copy/cut require an instance for
// being called from a particular Clip view, but can be called anywhere as long
// as a valid Clip view list is given, while copy/cut require an instance for
// some metadata to be written to the clipboard.
static void remove( QVector<TrackContentObjectView *> tcovs );
static void toggleMute( QVector<TrackContentObjectView *> tcovs );
static void mergeTCOs(QVector<TrackContentObjectView*> tcovs);
static void remove( QVector<ClipView *> clipvs );
static void toggleMute( QVector<ClipView *> clipvs );
static void mergeClips(QVector<ClipView*> clipvs);
// Returns true if selection can be merged and false if not
static bool canMergeSelection(QVector<TrackContentObjectView*> tcovs);
static bool canMergeSelection(QVector<ClipView*> clipvs);
QColor getColorForDisplay( QColor );
@@ -142,8 +142,8 @@ protected:
};
TrackView * m_trackView;
TimePos m_initialTCOPos;
TimePos m_initialTCOEnd;
TimePos m_initialClipPos;
TimePos m_initialClipEnd;
bool m_marker = false;
int m_markerPos = 0;
@@ -171,7 +171,7 @@ protected:
float pixelsPerBar();
DataFile createTCODataFiles(const QVector<TrackContentObjectView *> & tcos) const;
DataFile createClipDataFiles(const QVector<ClipView *> & clips) const;
virtual void paintTextLabel(QString const & text, QPainter & painter);
@@ -196,7 +196,7 @@ private:
static TextFloat * s_textFloat;
TrackContentObject * m_tco;
Clip * m_clip;
Actions m_action;
QPoint m_initialMousePos;
QPoint m_initialMouseGlobalPos;
@@ -211,7 +211,7 @@ private:
QColor m_textColor;
QColor m_textBackgroundColor;
QColor m_textShadowColor;
QColor m_BBPatternBackground;
QColor m_BBClipBackground;
bool m_gradient;
QSize m_mouseHotspotHand; // QSize must be used because QPoint
QSize m_mouseHotspotKnife; // isn't supported by property system
@@ -224,17 +224,17 @@ private:
{
m_initialMousePos = pos;
m_initialMouseGlobalPos = mapToGlobal( pos );
m_initialTCOPos = m_tco->startPosition();
m_initialTCOEnd = m_initialTCOPos + m_tco->length();
m_initialClipPos = m_clip->startPosition();
m_initialClipEnd = m_initialClipPos + m_clip->length();
}
void setInitialOffsets();
bool mouseMovedDistance( QMouseEvent * me, int distance );
TimePos draggedTCOPos( QMouseEvent * me );
TimePos draggedClipPos( QMouseEvent * me );
int knifeMarkerPos( QMouseEvent * me );
void setColor(const QColor* color);
//! Return true iff TCO could be split. Currently only implemented for samples
virtual bool splitTCO( const TimePos pos ){ return false; };
//! Return true iff the clip could be split. Currently only implemented for samples
virtual bool splitClip( const TimePos pos ){ return false; };
void updateCursor(QMouseEvent * me);
} ;

View File

@@ -1,5 +1,5 @@
/*
* Clipboard.h - the clipboard for patterns, notes etc.
* Clipboard.h - the clipboard for clips, notes etc.
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*

View File

@@ -53,7 +53,7 @@ public:
ClipboardData,
JournalData,
EffectSettings,
NotePattern,
MidiClip,
TypeCount
} ;
typedef Types Type;

View File

@@ -26,7 +26,7 @@
#define INLINE_AUTOMATION_H
#include "AutomationNode.h"
#include "AutomationPattern.h"
#include "AutomationClip.h"
#include "shared_object.h"
@@ -36,15 +36,15 @@ public:
InlineAutomation() :
FloatModel(),
sharedObject(),
m_autoPattern( nullptr )
m_autoClip( nullptr )
{
}
virtual ~InlineAutomation()
{
if( m_autoPattern )
if( m_autoClip )
{
delete m_autoPattern;
delete m_autoClip;
}
}
@@ -52,16 +52,16 @@ public:
bool hasAutomation() const
{
if( m_autoPattern != nullptr && m_autoPattern->getTimeMap().isEmpty() == false )
if( m_autoClip != nullptr && m_autoClip->getTimeMap().isEmpty() == false )
{
// Prevent saving inline automation if there's just one node at the beginning of
// the pattern, which has a InValue equal to the value of model (which is going
// the clip, which has a InValue equal to the value of model (which is going
// to be saved anyways) and no offset between the InValue and OutValue
AutomationPattern::timeMap::const_iterator firstNode =
m_autoPattern->getTimeMap().begin();
AutomationClip::timeMap::const_iterator firstNode =
m_autoClip->getTimeMap().begin();
if (isAtInitValue()
&& m_autoPattern->getTimeMap().size() == 1
&& m_autoClip->getTimeMap().size() == 1
&& POS(firstNode) == 0
&& INVAL(firstNode) == value()
&& OFFSET(firstNode) == 0)
@@ -75,14 +75,14 @@ public:
return false;
}
AutomationPattern * automationPattern()
AutomationClip * automationClip()
{
if( m_autoPattern == nullptr )
if( m_autoClip == nullptr )
{
m_autoPattern = new AutomationPattern( nullptr );
m_autoPattern->addObject( this );
m_autoClip = new AutomationClip( nullptr );
m_autoClip->addObject( this );
}
return m_autoPattern;
return m_autoClip;
}
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
@@ -90,7 +90,7 @@ public:
private:
AutomationPattern * m_autoPattern;
AutomationClip * m_autoClip;
} ;

View File

@@ -111,12 +111,12 @@ public:
// play everything in given frame-range - creates note-play-handles
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
// create new view for me
TrackView * createView( TrackContainerView* tcv ) override;
// create new track-content-object = pattern
TrackContentObject* createTCO(const TimePos & pos) override;
// create new track-content-object = clip
Clip* createClip(const TimePos & pos) override;
// called by track

View File

@@ -1,6 +1,6 @@
/*
* Pattern.h - declaration of class Pattern, which contains all information
* about a pattern
* MidiClip.h - declaration of class MidiClip, which contains all information
* about a clip
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -23,32 +23,32 @@
*
*/
#ifndef PATTERN_H
#define PATTERN_H
#ifndef MIDI_CLIP_H
#define MIDI_CLIP_H
#include <QStaticText>
#include "Note.h"
#include "PatternView.h"
#include "TrackContentObjectView.h"
#include "MidiClipView.h"
#include "ClipView.h"
class InstrumentTrack;
class LMMS_EXPORT Pattern : public TrackContentObject
class LMMS_EXPORT MidiClip : public Clip
{
Q_OBJECT
public:
enum PatternTypes
enum MidiClipTypes
{
BeatPattern,
MelodyPattern
BeatClip,
MelodyClip
} ;
Pattern( InstrumentTrack* instrumentTrack );
Pattern( const Pattern& other );
virtual ~Pattern();
MidiClip( InstrumentTrack* instrumentTrack );
MidiClip( const MidiClip& other );
virtual ~MidiClip();
void init();
@@ -75,22 +75,23 @@ public:
// Split the list of notes on the given position
void splitNotes(NoteVector notes, TimePos pos);
// pattern-type stuff
inline PatternTypes type() const
// clip-type stuff
inline MidiClipTypes type() const
{
return m_patternType;
return m_clipType;
}
// next/previous track based on position in the containing track
Pattern * previousPattern() const;
Pattern * nextPattern() const;
MidiClip * previousMidiClip() const;
MidiClip * nextMidiClip() const;
// settings-management
void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override;
void loadSettings( const QDomElement & _this ) override;
inline QString nodeName() const override
{
//TODO: rename to "midiClip"
return "pattern";
}
@@ -102,7 +103,7 @@ public:
bool empty();
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
using Model::dataChanged;
@@ -121,29 +122,29 @@ protected slots:
private:
TimePos beatPatternLength() const;
TimePos beatClipLength() const;
void setType( PatternTypes _new_pattern_type );
void setType( MidiClipTypes _new_clip_type );
void checkType();
void resizeToFirstTrack();
InstrumentTrack * m_instrumentTrack;
PatternTypes m_patternType;
MidiClipTypes m_clipType;
// data-stuff
NoteVector m_notes;
int m_steps;
Pattern * adjacentPatternByOffset(int offset) const;
MidiClip * adjacentMidiClipByOffset(int offset) const;
friend class PatternView;
friend class MidiClipView;
friend class BBTrackContainerView;
signals:
void destroyedPattern( Pattern* );
void destroyedMidiClip( MidiClip* );
} ;

View File

@@ -1,5 +1,5 @@
/*
* PatternView.h
* MidiClipView.h
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,22 +22,22 @@
*
*/
#ifndef PATTERN_VIEW_H
#define PATTERN_VIEW_H
#ifndef MIDI_CLIP_VIEW_H
#define MIDI_CLIP_VIEW_H
#include "Pattern.h"
#include "TrackContentObjectView.h"
#include "MidiClip.h"
#include "ClipView.h"
class Pattern;
class MidiClip;
class PatternView : public TrackContentObjectView
class MidiClipView : public ClipView
{
Q_OBJECT
public:
PatternView( Pattern* pattern, TrackView* parent );
virtual ~PatternView() = default;
MidiClipView( MidiClip* clip, TrackView* parent );
virtual ~MidiClipView() = default;
Q_PROPERTY(QColor noteFillColor READ getNoteFillColor WRITE setNoteFillColor)
Q_PROPERTY(QColor noteBorderColor READ getNoteBorderColor WRITE setNoteBorderColor)
@@ -57,7 +57,7 @@ public:
void setMutedNoteBorderColor(QColor const & color) { m_mutedNoteBorderColor = color; }
public slots:
Pattern* getPattern();
MidiClip* getMidiClip();
void update() override;
@@ -83,7 +83,7 @@ private:
static QPixmap * s_stepBtnOff;
static QPixmap * s_stepBtnOffLight;
Pattern* m_pat;
MidiClip* m_clip;
QPixmap m_paintPixmap;
QColor m_noteFillColor;
@@ -98,4 +98,4 @@ private:
#endif
#endif

View File

@@ -55,7 +55,7 @@ public:
// specifies origin of NotePlayHandle
enum Origins
{
OriginPattern, /*! playback of a note from a pattern */
OriginMidiClip, /*! playback of a note from a MIDI clip */
OriginMidiInput, /*! playback of a MIDI note input event */
OriginNoteStacking, /*! created by note stacking instrument function */
OriginArpeggio, /*! created by arpeggio instrument function */
@@ -69,7 +69,7 @@ public:
const Note& noteToPlay,
NotePlayHandle* parent = nullptr,
int midiEventChannel = -1,
Origin origin = OriginPattern );
Origin origin = OriginMidiClip );
virtual ~NotePlayHandle();
void * operator new ( size_t size, void * p )
@@ -249,7 +249,7 @@ public:
/*! Updates total length (m_frames) depending on a new tempo */
void resize( const bpm_t newTempo );
/*! Set song-global offset (relative to containing pattern) in order to properly perform the note detuning */
/*! Set song-global offset (relative to containing MIDI clip) in order to properly perform the note detuning */
void setSongGlobalParentOffset( const TimePos& offset )
{
m_songGlobalParentOffset = offset;
@@ -346,7 +346,7 @@ public:
const Note& noteToPlay,
NotePlayHandle* parent = nullptr,
int midiEventChannel = -1,
NotePlayHandle::Origin origin = NotePlayHandle::OriginPattern );
NotePlayHandle::Origin origin = NotePlayHandle::OriginMidiClip );
static void release( NotePlayHandle * nph );
static void extend( int i );
static void free();

View File

@@ -51,7 +51,7 @@ class QToolButton;
class ComboBox;
class NotePlayHandle;
class Pattern;
class MidiClip;
class TimeLineWidget;
class PianoRoll : public QWidget
@@ -110,8 +110,8 @@ public:
void showVolTextFloat(volume_t vol, const QPoint &pos, int timeout=-1);
void showPanTextFloat(panning_t pan, const QPoint &pos, int timeout=-1);
void setCurrentPattern( Pattern* newPattern );
void setGhostPattern( Pattern* newPattern );
void setCurrentMidiClip( MidiClip* newMidiClip );
void setGhostMidiClip( MidiClip* newMidiClip );
void loadGhostNotes( const QDomElement & de );
void loadMarkedSemiTones(const QDomElement & de);
@@ -130,14 +130,14 @@ public:
return m_stepRecorder.isRecording();
}
const Pattern* currentPattern() const
const MidiClip* currentMidiClip() const
{
return m_pattern;
return m_midiClip;
}
bool hasValidPattern() const
bool hasValidMidiClip() const
{
return m_pattern != nullptr;
return m_midiClip != nullptr;
}
Song::PlayModes desiredPlayModeForAccompany() const;
@@ -215,11 +215,11 @@ protected slots:
void changeNoteEditMode( int i );
void markSemiTone(int i, bool fromMenu = true);
void hidePattern( Pattern* pattern );
void hideMidiClip( MidiClip* clip );
void selectRegionFromPixels( int xStart, int xEnd );
void clearGhostPattern();
void clearGhostClip();
void glueNotes();
void fitNoteLengths(bool fill);
void constrainNoteLengths(bool constrainMax);
@@ -228,8 +228,8 @@ protected slots:
signals:
void currentPatternChanged();
void ghostPatternSet(bool);
void currentMidiClipChanged();
void ghostClipSet(bool);
void semiToneMarkerMenuScaleSetEnabled(bool);
void semiToneMarkerMenuChordSetEnabled(bool);
@@ -349,7 +349,7 @@ private:
static const QVector<float> m_zoomLevels;
static const QVector<float> m_zoomYLevels;
Pattern* m_pattern;
MidiClip* m_midiClip;
NoteVector m_ghostNotes;
inline const NoteVector & ghostNotes() const
@@ -496,9 +496,9 @@ class PianoRollWindow : public Editor, SerializingObject
public:
PianoRollWindow();
const Pattern* currentPattern() const;
void setCurrentPattern( Pattern* pattern );
void setGhostPattern( Pattern* pattern );
const MidiClip* currentMidiClip() const;
void setCurrentMidiClip( MidiClip* clip );
void setGhostMidiClip( MidiClip* clip );
int quantization() const;
@@ -528,17 +528,17 @@ public:
bool hasFocus() const;
signals:
void currentPatternChanged();
void currentMidiClipChanged();
private slots:
void updateAfterPatternChange();
void ghostPatternSet( bool state );
void exportPattern();
void importPattern();
void updateAfterMidiClipChange();
void ghostClipSet( bool state );
void exportMidiClip();
void importMidiClip();
private:
void patternRenamed();
void clipRenamed();
void focusInEvent(QFocusEvent * event) override;
void stopStepRecording();
void updateStepRecordingIcon();

View File

@@ -1,5 +1,5 @@
/*
* SampleTCO.h
* SampleClip.h
*
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,24 +22,24 @@
*
*/
#ifndef SAMPLE_TCO_H
#define SAMPLE_TCO_H
#ifndef SAMPLE_CLIP_H
#define SAMPLE_CLIP_H
#include "SampleBuffer.h"
#include "SampleTrack.h"
#include "TrackContentObject.h"
#include "Clip.h"
class SampleTCO : public TrackContentObject
class SampleClip : public Clip
{
Q_OBJECT
mapPropertyFromModel(bool,isRecord,setRecord,m_recordModel);
public:
SampleTCO( Track * _track );
SampleTCO( const SampleTCO& orig );
virtual ~SampleTCO();
SampleClip( Track * _track );
SampleClip( const SampleClip& orig );
virtual ~SampleClip();
SampleTCO& operator=( const SampleTCO& that ) = delete;
SampleClip& operator=( const SampleClip& that ) = delete;
void changeLength( const TimePos & _length ) override;
const QString & sampleFile() const;
@@ -48,7 +48,7 @@ public:
void loadSettings( const QDomElement & _this ) override;
inline QString nodeName() const override
{
return "sampletco";
return "sampleclip";
}
SampleBuffer* sampleBuffer()
@@ -59,7 +59,7 @@ public:
TimePos sampleLength() const;
void setSampleStartFrame( f_cnt_t startFrame );
void setSamplePlayLength( f_cnt_t length );
TrackContentObjectView * createView( TrackView * _tv ) override;
ClipView * createView( TrackView * _tv ) override;
bool isPlaying() const;
@@ -71,7 +71,7 @@ public slots:
void updateLength();
void toggleRecord();
void playbackPositionChanged();
void updateTrackTcos();
void updateTrackClips();
private:
@@ -79,7 +79,7 @@ private:
BoolModel m_recordModel;
bool m_isPlaying;
friend class SampleTCOView;
friend class SampleClipView;
signals:

View File

@@ -1,5 +1,5 @@
/*
* SampleTCOView.h
* SampleClipView.h
*
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -22,21 +22,21 @@
*
*/
#ifndef SAMPLE_TCO_VIEW_H
#define SAMPLE_TCO_VIEW_H
#ifndef SAMPLE_CLIP_VIEW_H
#define SAMPLE_CLIP_VIEW_H
#include "SampleTCOView.h"
#include "SampleClipView.h"
#include "SampleTCO.h"
#include "TrackContentObjectView.h"
#include "SampleClip.h"
#include "ClipView.h"
class SampleTCOView : public TrackContentObjectView
class SampleClipView : public ClipView
{
Q_OBJECT
public:
SampleTCOView( SampleTCO * _tco, TrackView * _tv );
virtual ~SampleTCOView() = default;
SampleClipView( SampleClip * _clip, TrackView * _tv );
virtual ~SampleClipView() = default;
public slots:
void updateSample();
@@ -55,9 +55,9 @@ protected:
private:
SampleTCO * m_tco;
SampleClip * m_clip;
QPixmap m_paintPixmap;
bool splitTCO( const TimePos pos ) override;
bool splitClip( const TimePos pos ) override;
} ;

View File

@@ -31,7 +31,7 @@
#include "PlayHandle.h"
class BBTrack;
class SampleTCO;
class SampleClip;
class Track;
class AudioPort;
@@ -41,7 +41,7 @@ class SamplePlayHandle : public PlayHandle
public:
SamplePlayHandle( SampleBuffer* sampleBuffer , bool ownAudioPort = true );
SamplePlayHandle( const QString& sampleFile );
SamplePlayHandle( SampleTCO* tco );
SamplePlayHandle( SampleClip* clip );
virtual ~SamplePlayHandle();
inline bool affinityMatters() const override

View File

@@ -34,14 +34,14 @@
class BBTrack;
class SampleBuffer;
class SampleTCO;
class SampleClip;
class Track;
class SampleRecordHandle : public PlayHandle
{
public:
SampleRecordHandle( SampleTCO* tco );
SampleRecordHandle( SampleClip* clip );
virtual ~SampleRecordHandle();
void play( sampleFrame * _working_buffer ) override;
@@ -64,7 +64,7 @@ private:
Track * m_track;
BBTrack * m_bbTrack;
SampleTCO * m_tco;
SampleClip * m_clip;
} ;

View File

@@ -30,7 +30,7 @@
#include "AudioPort.h"
#include "FadeButton.h"
#include "Mixer.h"
#include "SampleTCO.h"
#include "SampleClip.h"
#include "SampleTrackView.h"
#include "Track.h"
@@ -43,9 +43,9 @@ public:
virtual ~SampleTrack();
virtual bool play( const TimePos & _start, const fpp_t _frames,
const f_cnt_t _frame_base, int _tco_num = -1 ) override;
const f_cnt_t _frame_base, int _clip_num = -1 ) override;
TrackView * createView( TrackContainerView* tcv ) override;
TrackContentObject* createTCO(const TimePos & pos) override;
Clip* createClip(const TimePos & pos) override;
virtual void saveTrackSpecificSettings( QDomDocument & _doc,
@@ -82,8 +82,8 @@ signals:
void playingChanged();
public slots:
void updateTcos();
void setPlayingTcos( bool isPlaying );
void updateClips();
void setPlayingClips( bool isPlaying );
void updateMixerChannel();
private:

View File

@@ -44,7 +44,7 @@
class AutomationTrack;
class Pattern;
class MidiClip;
class TimeLineWidget;
@@ -66,8 +66,8 @@ public:
Mode_None,
Mode_PlaySong,
Mode_PlayBB,
Mode_PlayPattern,
Mode_PlayAutomationPattern,
Mode_PlayMidiClip,
Mode_PlayAutomationClip,
Mode_Count
} ;
@@ -276,7 +276,7 @@ public:
bpm_t getTempo();
AutomationPattern * tempoAutomationPattern() override;
AutomationClip * tempoAutomationClip() override;
AutomationTrack * globalAutomationTrack()
{
@@ -284,7 +284,7 @@ public:
}
//TODO: Add Q_DECL_OVERRIDE when Qt4 is dropped
AutomatedValueMap automatedValuesAt(TimePos time, int tcoNum = -1) const override;
AutomatedValueMap automatedValuesAt(TimePos time, int clipNum = -1) const override;
// file management
void createNewProject();
@@ -325,7 +325,7 @@ public:
return "song";
}
virtual bool fixedTCOs() const
virtual bool fixedClips() const
{
return false;
}
@@ -364,7 +364,7 @@ public slots:
void record();
void playAndRecord();
void playBB();
void playPattern( const Pattern * patternToPlay, bool loop = true );
void playMidiClip( const MidiClip * midiClipToPlay, bool loop = true );
void togglePause();
void stop();
@@ -473,8 +473,8 @@ private:
PlayPos m_playPos[Mode_Count];
bar_t m_length;
const Pattern* m_patternToPlay;
bool m_loopPattern;
const MidiClip* m_midiClipToPlay;
bool m_loopMidiClip;
double m_elapsedMilliSeconds[Mode_Count];
tick_t m_elapsedTicks;

View File

@@ -84,7 +84,7 @@ public slots:
void updatePosition( const TimePos & t );
void updatePositionLine();
void selectAllTcos( bool select );
void selectAllClips( bool select );
protected:
void closeEvent( QCloseEvent * ce ) override;

View File

@@ -28,7 +28,7 @@
#include "Note.h"
#include "lmms_basics.h"
#include "Pattern.h"
#include "MidiClip.h"
class PianoRoll;
class StepRecorderWidget;
@@ -47,7 +47,7 @@ class StepRecorder : public QObject
void noteReleased(const Note & n);
bool keyPressEvent(QKeyEvent* ke);
bool mousePressEvent(QMouseEvent* ke);
void setCurrentPattern(Pattern* newPattern);
void setCurrentMidiClip(MidiClip* newMidiClip);
void setStepsLength(const TimePos& newLength);
QVector<Note*> getCurStepNotes();
@@ -93,7 +93,7 @@ class StepRecorder : public QObject
QTimer m_updateReleasedTimer;
Pattern* m_pattern;
MidiClip* m_midiClip;
class StepNote
{
@@ -133,7 +133,7 @@ class StepRecorder : public QObject
QElapsedTimer releasedTimer;
} ;
QVector<StepNote*> m_curStepNotes; // contains the current recorded step notes (i.e. while user still press the notes; before they are applied to the pattern)
QVector<StepNote*> m_curStepNotes; // contains the current recorded step notes (i.e. while user still press the notes; before they are applied to the clip)
StepNote* findCurStepNote(const int key);

View File

@@ -235,7 +235,7 @@ private:
MovePositionMarker,
MoveLoopBegin,
MoveLoopEnd,
SelectSongTCO,
SelectSongClip,
} m_action;
int m_moveXOff;

View File

@@ -37,7 +37,7 @@
class TimePos;
class TrackContainer;
class TrackContainerView;
class TrackContentObject;
class Clip;
class TrackView;
@@ -60,7 +60,7 @@ class LMMS_EXPORT Track : public Model, public JournallingObject
mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel);
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
public:
typedef QVector<TrackContentObject *> tcoVector;
typedef QVector<Clip *> clipVector;
enum TrackTypes
{
@@ -90,11 +90,11 @@ public:
}
virtual bool play( const TimePos & start, const fpp_t frames,
const f_cnt_t frameBase, int tcoNum = -1 ) = 0;
const f_cnt_t frameBase, int clipNum = -1 ) = 0;
virtual TrackView * createView( TrackContainerView * view ) = 0;
virtual TrackContentObject * createTCO( const TimePos & pos ) = 0;
virtual Clip * createClip( const TimePos & pos ) = 0;
virtual void saveTrackSpecificSettings( QDomDocument & doc,
QDomElement & parent ) = 0;
@@ -109,25 +109,25 @@ public:
m_simpleSerializingMode = true;
}
// -- for usage by TrackContentObject only ---------------
TrackContentObject * addTCO( TrackContentObject * tco );
void removeTCO( TrackContentObject * tco );
// -- for usage by Clip only ---------------
Clip * addClip( Clip * clip );
void removeClip( Clip * clip );
// -------------------------------------------------------
void deleteTCOs();
void deleteClips();
int numOfTCOs();
TrackContentObject * getTCO( int tcoNum );
int getTCONum(const TrackContentObject* tco );
int numOfClips();
Clip * getClip( int clipNum );
int getClipNum(const Clip* clip );
const tcoVector & getTCOs() const
const clipVector & getClips() const
{
return m_trackContentObjects;
return m_clips;
}
void getTCOsInRange( tcoVector & tcoV, const TimePos & start,
void getClipsInRange( clipVector & clipV, const TimePos & start,
const TimePos & end );
void swapPositionOfTCOs( int tcoNum1, int tcoNum2 );
void swapPositionOfClips( int clipNum1, int clipNum2 );
void createTCOsForBB( int bb );
void createClipsForBB( int bb );
void insertBar( const TimePos & pos );
@@ -226,7 +226,7 @@ private:
bool m_simpleSerializingMode;
tcoVector m_trackContentObjects;
clipVector m_clips;
QMutex m_processingLock;
@@ -239,7 +239,7 @@ private:
signals:
void destroyedTrack();
void nameChanged();
void trackContentObjectAdded( TrackContentObject * );
void clipAdded( Clip * );
void colorChanged();
} ;

View File

@@ -32,7 +32,7 @@
#include "JournallingObject.h"
class AutomationPattern;
class AutomationClip;
class InstrumentTrack;
class TrackContainerView;
@@ -56,7 +56,7 @@ public:
void loadSettings( const QDomElement & _this ) override;
virtual AutomationPattern * tempoAutomationPattern()
virtual AutomationClip * tempoAutomationClip()
{
return nullptr;
}
@@ -93,13 +93,13 @@ public:
return m_TrackContainerType;
}
virtual AutomatedValueMap automatedValuesAt(TimePos time, int tcoNum = -1) const;
virtual AutomatedValueMap automatedValuesAt(TimePos time, int clipNum = -1) const;
signals:
void trackAdded( Track * _track );
protected:
static AutomatedValueMap automatedValuesFromTracks(const TrackList &tracks, TimePos timeStart, int tcoNum = -1);
static AutomatedValueMap automatedValuesFromTracks(const TrackList &tracks, TimePos timeStart, int clipNum = -1);
mutable QReadWriteLock m_tracksMutex;

View File

@@ -65,7 +65,7 @@ public:
return m_currentPosition;
}
virtual bool fixedTCOs() const
virtual bool fixedClips() const
{
return false;
}

View File

@@ -34,7 +34,7 @@
class QMimeData;
class Track;
class TrackContentObjectView;
class ClipView;
class TrackView;
@@ -55,20 +55,20 @@ public:
/*! \brief Updates the background tile pixmap. */
void updateBackground();
void addTCOView( TrackContentObjectView * tcov );
void removeTCOView( TrackContentObjectView * tcov );
void removeTCOView( int tcoNum )
void addClipView( ClipView * clipv );
void removeClipView( ClipView * clipv );
void removeClipView( int clipNum )
{
if( tcoNum >= 0 && tcoNum < m_tcoViews.size() )
if( clipNum >= 0 && clipNum < m_clipViews.size() )
{
removeTCOView( m_tcoViews[tcoNum] );
removeClipView( m_clipViews[clipNum] );
}
}
bool canPasteSelection( TimePos tcoPos, const QDropEvent *de );
bool canPasteSelection( TimePos tcoPos, const QMimeData *md, bool allowSameBar = false );
bool pasteSelection( TimePos tcoPos, QDropEvent * de );
bool pasteSelection( TimePos tcoPos, const QMimeData * md, bool skipSafetyCheck = false );
bool canPasteSelection( TimePos clipPos, const QDropEvent *de );
bool canPasteSelection( TimePos clipPos, const QMimeData *md, bool allowSameBar = false );
bool pasteSelection( TimePos clipPos, QDropEvent * de );
bool pasteSelection( TimePos clipPos, const QMimeData * md, bool skipSafetyCheck = false );
TimePos endPosition( const TimePos & posStart );
@@ -126,8 +126,8 @@ private:
TrackView * m_trackView;
typedef QVector<TrackContentObjectView *> tcoViewVector;
tcoViewVector m_tcoViews;
typedef QVector<ClipView *> clipViewVector;
clipViewVector m_clipViews;
QPixmap m_background;

View File

@@ -53,7 +53,7 @@ private slots:
void selectTrackColor();
void randomizeTrackColor();
void resetTrackColor();
void resetTCOColors();
void resetClipColors();
void toggleRecording(bool on);
void recordingOn();
void recordingOff();

View File

@@ -40,7 +40,7 @@ class QMenu;
class FadeButton;
class Track;
class TrackContainerView;
class TrackContentObject;
class Clip;
const int DEFAULT_SETTINGS_WIDGET_WIDTH = 224;
@@ -50,7 +50,7 @@ const int TRACK_OP_WIDTH = 78;
const int DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT = 96;
const int TRACK_OP_WIDTH_COMPACT = 62;
const int TCO_BORDER_WIDTH = 2;
const int CLIP_BORDER_WIDTH = 2;
class TrackView : public QWidget, public ModelView, public JournallingObject
@@ -163,7 +163,7 @@ private:
private slots:
void createTCOView( TrackContentObject * tco );
void createClipView( Clip * clip );
void muteChanged();
} ;