Rename track class to Track

This commit is contained in:
Lukas W
2014-11-25 17:03:39 +01:00
parent 5d258cedf2
commit 9dfb1385cd
44 changed files with 191 additions and 191 deletions

View File

@@ -30,7 +30,7 @@
#include "track.h"
class AutomationTrack : public track
class AutomationTrack : public Track
{
public:
AutomationTrack( TrackContainer* tc, bool _hidden = false );

View File

@@ -38,7 +38,7 @@ class InstrumentView;
class MidiEvent;
class MidiTime;
class NotePlayHandle;
class track;
class Track;
class EXPORT Instrument : public Plugin
@@ -118,7 +118,7 @@ public:
static Instrument * instantiate( const QString & _plugin_name,
InstrumentTrack * _instrument_track );
virtual bool isFromTrack( const track * _track ) const;
virtual bool isFromTrack( const Track * _track ) const;
inline InstrumentTrack * instrumentTrack() const
{

View File

@@ -76,7 +76,7 @@ public:
return false;
}
virtual bool isFromTrack( const track* _track ) const
virtual bool isFromTrack( const Track* _track ) const
{
return m_instrument->isFromTrack( _track );
}

View File

@@ -57,7 +57,7 @@ class tabWidget;
class trackLabelButton;
class EXPORT InstrumentTrack : public track, public MidiEventProcessor
class EXPORT InstrumentTrack : public Track, public MidiEventProcessor
{
Q_OBJECT
MM_OPERATORS
@@ -136,7 +136,7 @@ public:
QDomElement & _parent );
virtual void loadTrackSpecificSettings( const QDomElement & _this );
using track::setJournalling;
using Track::setJournalling;
// load instrument whose name matches given one

View File

@@ -225,7 +225,7 @@ public:
return m_playHandles;
}
void removePlayHandles( track * _track, bool removeIPHs = true );
void removePlayHandles( Track * _track, bool removeIPHs = true );
bool hasNotePlayHandles();

View File

@@ -121,7 +121,7 @@ public:
fpp_t framesLeftForCurrentPeriod() const;
/*! Returns whether the play handle plays on a certain track */
virtual bool isFromTrack( const track* _track ) const;
virtual bool isFromTrack( const Track* _track ) const;
/*! Releases the note (and plays release frames */
void noteOff( const f_cnt_t offset = 0 );
@@ -211,7 +211,7 @@ public:
/*! returns list of note-play-handles belonging to given instrument track,
if allPlayHandles = true, also released note-play-handles are returned */
static ConstNotePlayHandleList nphsOfInstrumentTrack( const InstrumentTrack* track, bool allPlayHandles = false );
static ConstNotePlayHandleList nphsOfInstrumentTrack( const InstrumentTrack* Track, bool allPlayHandles = false );
/*! Returns whether given NotePlayHandle instance is equal to *this */
bool operator==( const NotePlayHandle & _nph ) const;
@@ -223,7 +223,7 @@ public:
}
/*! Sets attached BB track */
void setBBTrack( track* t )
void setBBTrack( Track* t )
{
m_bbTrack = t;
}
@@ -294,7 +294,7 @@ private:
NotePlayHandle * m_parent; // parent note
bool m_hadChildren;
bool m_muted; // indicates whether note is muted
track* m_bbTrack; // related BB track
Track* m_bbTrack; // related BB track
// tempo reaction
bpm_t m_origTempo; // original tempo

View File

@@ -32,7 +32,7 @@
#include "ThreadableJob.h"
#include "lmms_basics.h"
class track;
class Track;
class AudioPort;
class PlayHandle : public ThreadableJob
@@ -111,7 +111,7 @@ public:
}
virtual bool isFromTrack( const track * _track ) const = 0;
virtual bool isFromTrack( const Track * _track ) const = 0;
bool usesBuffer() const
{

View File

@@ -41,7 +41,7 @@ public:
virtual void play( sampleFrame* buffer );
virtual bool isFinished() const;
virtual bool isFromTrack( const track * _track ) const;
virtual bool isFromTrack( const Track * _track ) const;
static void init();
static void cleanup();

View File

@@ -31,7 +31,7 @@
class bbTrack;
class SampleTCO;
class track;
class Track;
class AudioPort;
@@ -52,7 +52,7 @@ public:
virtual void play( sampleFrame * buffer );
virtual bool isFinished() const;
virtual bool isFromTrack( const track * _track ) const;
virtual bool isFromTrack( const Track * _track ) const;
f_cnt_t totalFrames() const;
inline f_cnt_t framesDone() const
@@ -86,7 +86,7 @@ private:
FloatModel m_defaultVolumeModel;
FloatModel * m_volumeModel;
track * m_track;
Track * m_track;
bbTrack * m_bbTrack;

View File

@@ -34,7 +34,7 @@
class bbTrack;
class SampleTCO;
class track;
class Track;
class SampleRecordHandle : public PlayHandle
@@ -46,7 +46,7 @@ public:
virtual void play( sampleFrame * _working_buffer );
virtual bool isFinished() const;
virtual bool isFromTrack( const track * _track ) const;
virtual bool isFromTrack( const Track * _track ) const;
f_cnt_t framesRecorded() const;
void createSampleBuffer( SampleBuffer * * _sample_buf );
@@ -61,7 +61,7 @@ private:
f_cnt_t m_framesRecorded;
MidiTime m_minLength;
track * m_track;
Track * m_track;
bbTrack * m_bbTrack;
SampleTCO * m_tco;

View File

@@ -40,7 +40,7 @@ class SampleTCO : public trackContentObject
Q_OBJECT
mapPropertyFromModel(bool,isRecord,setRecord,m_recordModel);
public:
SampleTCO( track * _track );
SampleTCO( Track * _track );
virtual ~SampleTCO();
virtual void changeLength( const MidiTime & _length );
@@ -118,7 +118,7 @@ private:
class SampleTrack : public track
class SampleTrack : public Track
{
Q_OBJECT
public:
@@ -161,7 +161,7 @@ class SampleTrackView : public trackView
{
Q_OBJECT
public:
SampleTrackView( SampleTrack* track, TrackContainerView* tcv );
SampleTrackView( SampleTrack* Track, TrackContainerView* tcv );
virtual ~SampleTrackView();

View File

@@ -41,7 +41,7 @@ class EXPORT TrackContainer : public Model, public JournallingObject
{
Q_OBJECT
public:
typedef QVector<track *> TrackList;
typedef QVector<Track *> TrackList;
TrackContainer();
virtual ~TrackContainer();
@@ -56,11 +56,11 @@ public:
return NULL;
}
int countTracks( track::TrackTypes _tt = track::NumTrackTypes ) const;
int countTracks( Track::TrackTypes _tt = Track::NumTrackTypes ) const;
void addTrack( track * _track );
void removeTrack( track * _track );
void addTrack( Track * _track );
void removeTrack( Track * _track );
virtual void updateAfterTrackAdd();
@@ -80,7 +80,7 @@ public:
signals:
void trackAdded( track * _track );
void trackAdded( Track * _track );
protected:
mutable QReadWriteLock m_tracksMutex;
@@ -90,7 +90,7 @@ private:
friend class TrackContainerView;
friend class track;
friend class Track;
} ;

View File

@@ -120,7 +120,7 @@ public:
public slots:
void realignTracks();
void createTrackView( track * _t );
void createTrackView( Track * _t );
void deleteTrackView( trackView * _tv );

View File

@@ -39,7 +39,7 @@ class TrackContainer;
class bbTCO : public trackContentObject
{
public:
bbTCO( track * _track );
bbTCO( Track * _track );
virtual ~bbTCO();
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
@@ -120,7 +120,7 @@ private:
class EXPORT bbTrack : public track
class EXPORT bbTrack : public Track
{
Q_OBJECT
public:
@@ -137,22 +137,22 @@ public:
virtual void loadTrackSpecificSettings( const QDomElement & _this );
static bbTrack * findBBTrack( int _bb_num );
static void swapBBTracks( track * _track1, track * _track2 );
static void swapBBTracks( Track * _track1, Track * _track2 );
int index()
{
return s_infoMap[this];
}
bool automationDisabled( track * _track )
bool automationDisabled( Track * _track )
{
return( m_disabledTracks.contains( _track ) );
}
void disableAutomation( track * _track )
void disableAutomation( Track * _track )
{
m_disabledTracks.append( _track );
}
void enableAutomation( track * _track )
void enableAutomation( Track * _track )
{
m_disabledTracks.removeAll( _track );
}
@@ -186,7 +186,7 @@ protected:
private:
QList<track *> m_disabledTracks;
QList<Track *> m_disabledTracks;
typedef QMap<bbTrack *, int> infoMap;
static infoMap s_infoMap;

View File

@@ -64,7 +64,7 @@ private:
RenderVector m_renderers;
bool m_multiExport;
typedef QVector<track*> TrackVector;
typedef QVector<Track*> TrackVector;
TrackVector m_unmuted;
TrackVector m_unmutedBB;
ProjectRenderer::ExportFileFormats m_ft;

View File

@@ -261,7 +261,7 @@ public slots:
void playSong();
void record();
void playAndRecord();
void playTrack( track * _trackToPlay );
void playTrack( Track * _trackToPlay );
void playBB();
void playPattern( Pattern* patternToPlay, bool _loop = true );
void togglePause();
@@ -353,7 +353,7 @@ private:
playPos m_playPos[Mode_Count];
tact_t m_length;
track * m_trackToPlay;
Track * m_trackToPlay;
Pattern* m_patternToPlay;
bool m_loopPattern;

View File

@@ -46,7 +46,7 @@ class QPushButton;
class pixmapButton;
class textFloat;
class track;
class Track;
class trackContentObjectView;
class TrackContainer;
class TrackContainerView;
@@ -80,10 +80,10 @@ class trackContentObject : public Model, public JournallingObject
mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel);
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
public:
trackContentObject( track * _track );
trackContentObject( Track * _track );
virtual ~trackContentObject();
inline track * getTrack() const
inline Track * getTrack() const
{
return m_track;
}
@@ -157,7 +157,7 @@ private:
Resize
} ;
track * m_track;
Track * m_track;
QString m_name;
MidiTime m_startPosition;
@@ -342,7 +342,7 @@ protected:
private:
track * getTrack();
Track * getTrack();
MidiTime getPosition( int _mouse_x );
trackView * m_trackView;
@@ -404,7 +404,7 @@ signals:
// base-class for all tracks
class EXPORT track : public Model, public JournallingObject
class EXPORT Track : public Model, public JournallingObject
{
Q_OBJECT
MM_OPERATORS
@@ -425,11 +425,11 @@ public:
NumTrackTypes
} ;
track( TrackTypes _type, TrackContainer * _tc );
virtual ~track();
Track( TrackTypes _type, TrackContainer * _tc );
virtual ~Track();
static track * create( TrackTypes _tt, TrackContainer * _tc );
static track * create( const QDomElement & _this,
static Track * create( TrackTypes _tt, TrackContainer * _tc );
static Track * create( const QDomElement & _this,
TrackContainer * _tc );
void clone();
@@ -566,15 +566,15 @@ class trackView : public QWidget, public ModelView, public JournallingObject
{
Q_OBJECT
public:
trackView( track * _track, TrackContainerView* tcv );
trackView( Track * _track, TrackContainerView* tcv );
virtual ~trackView();
inline const track * getTrack() const
inline const Track * getTrack() const
{
return( m_track );
}
inline track * getTrack()
inline Track * getTrack()
{
return( m_track );
}
@@ -648,7 +648,7 @@ private:
ResizeTrack
} ;
track * m_track;
Track * m_track;
TrackContainerView * m_trackContainerView;
trackOperationsWidget m_trackOperationsWidget;

View File

@@ -213,7 +213,7 @@ bool HydrogenImport::readSong()
if ( nLayer == 0 )
{
drum_track[sId] = ( InstrumentTrack * ) track::create( track::InstrumentTrack,engine::getBBTrackContainer() );
drum_track[sId] = ( InstrumentTrack * ) Track::create( Track::InstrumentTrack,engine::getBBTrackContainer() );
drum_track[sId]->volumeModel()->setValue( fVolume * 100 );
drum_track[sId]->panningModel()->setValue( ( fPan_R - fPan_L ) * 100 );
ins = drum_track[sId]->loadInstrument( "audiofileprocessor" );
@@ -305,7 +305,7 @@ bool HydrogenImport::readSong()
patternId = ( QDomNode ) patternId.nextSiblingElement( "patternID" );
int i = pattern_id[patId]+song_num_tracks;
track *t = ( bbTrack * ) s->tracks().at( i );
Track *t = ( bbTrack * ) s->tracks().at( i );
trackContentObject *tco = t->createTCO( pos );
tco->movePosition( pos );

View File

@@ -159,7 +159,7 @@ public:
{
if( !at )
{
at = dynamic_cast<AutomationTrack *>( track::create( track::AutomationTrack, tc ) );
at = dynamic_cast<AutomationTrack *>( Track::create( Track::AutomationTrack, tc ) );
}
return *this;
}
@@ -218,7 +218,7 @@ public:
smfMidiChannel * create( TrackContainer* tc )
{
if( !it ) {
it = dynamic_cast<InstrumentTrack *>( track::create( track::InstrumentTrack, tc ) );
it = dynamic_cast<InstrumentTrack *>( Track::create( Track::InstrumentTrack, tc ) );
#ifdef LMMS_HAVE_FLUIDSYNTH
it_inst = it->loadInstrument( "sf2player" );

View File

@@ -610,7 +610,7 @@ void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee )
QString txt = _dee->mimeData()->data(
stringPairDrag::mimeType() );
if( txt.section( ':', 0, 0 ) == QString( "tco_%1" ).arg(
track::SampleTrack ) )
Track::SampleTrack ) )
{
_dee->acceptProposedAction();
}
@@ -642,7 +642,7 @@ void AudioFileProcessorView::dropEvent( QDropEvent * _de )
_de->accept();
return;
}
else if( type == QString( "tco_%1" ).arg( track::SampleTrack ) )
else if( type == QString( "tco_%1" ).arg( Track::SampleTrack ) )
{
DataFile dataFile( value.toUtf8() );
castModel<audioFileProcessor>()->setAudioFile( dataFile.content().firstChild().toElement().attribute( "src" ) );

View File

@@ -1441,7 +1441,7 @@ else
{
const int cur_pat = bb_tracks.size();
bbTrack * bbt = dynamic_cast<bbTrack *>(
track::create( track::BBTrack, engine::getSong() ) );
Track::create( Track::BBTrack, engine::getSong() ) );
if( p.patternNames.contains( cur_pat ) )
{
bbt->setName( p.patternNames[cur_pat] );
@@ -1456,7 +1456,7 @@ else
it != p.channels.end(); ++it )
{
InstrumentTrack * t = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack,
Track::create( Track::InstrumentTrack,
engine::getBBTrackContainer() ) );
engine::getBBTrackContainer()->updateAfterTrackAdd();
i_tracks.push_back( t );

View File

@@ -201,7 +201,7 @@ MidiTime AutomationPattern::putValue( const MidiTime & _time,
// we need to maximize our length in case we're part of a hidden
// automation track as the user can't resize this pattern
if( getTrack() && getTrack()->type() == track::HiddenAutomationTrack )
if( getTrack() && getTrack()->type() == Track::HiddenAutomationTrack )
{
changeLength( length() );
}
@@ -234,7 +234,7 @@ void AutomationPattern::removeValue( const MidiTime & _time,
generateTangents(it, 3);
if( getTrack() &&
getTrack()->type() == track::HiddenAutomationTrack )
getTrack()->type() == Track::HiddenAutomationTrack )
{
changeLength( length() );
}
@@ -529,11 +529,11 @@ bool AutomationPattern::isAutomated( const AutomatableModel * _m )
for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it )
{
if( ( *it )->type() == track::AutomationTrack ||
( *it )->type() == track::HiddenAutomationTrack )
if( ( *it )->type() == Track::AutomationTrack ||
( *it )->type() == Track::HiddenAutomationTrack )
{
const track::tcoVector & v = ( *it )->getTCOs();
for( track::tcoVector::ConstIterator j = v.begin(); j != v.end(); ++j )
const Track::tcoVector & v = ( *it )->getTCOs();
for( Track::tcoVector::ConstIterator j = v.begin(); j != v.end(); ++j )
{
const AutomationPattern * a = dynamic_cast<const AutomationPattern *>( *j );
if( a && a->hasAutomation() )
@@ -568,13 +568,13 @@ QVector<AutomationPattern *> AutomationPattern::patternsForModel( const Automata
for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it )
{
// we want only automation tracks...
if( ( *it )->type() == track::AutomationTrack ||
( *it )->type() == track::HiddenAutomationTrack )
if( ( *it )->type() == Track::AutomationTrack ||
( *it )->type() == Track::HiddenAutomationTrack )
{
// get patterns in those tracks....
const track::tcoVector & v = ( *it )->getTCOs();
const Track::tcoVector & v = ( *it )->getTCOs();
// go through all the patterns...
for( track::tcoVector::ConstIterator j = v.begin(); j != v.end(); ++j )
for( Track::tcoVector::ConstIterator j = v.begin(); j != v.end(); ++j )
{
AutomationPattern * a = dynamic_cast<AutomationPattern *>( *j );
// check that the pattern has automation
@@ -605,8 +605,8 @@ AutomationPattern * AutomationPattern::globalAutomationPattern(
AutomatableModel * _m )
{
AutomationTrack * t = engine::getSong()->globalAutomationTrack();
track::tcoVector v = t->getTCOs();
for( track::tcoVector::const_iterator j = v.begin(); j != v.end(); ++j )
Track::tcoVector v = t->getTCOs();
for( Track::tcoVector::const_iterator j = v.begin(); j != v.end(); ++j )
{
AutomationPattern * a = dynamic_cast<AutomationPattern *>( *j );
if( a )
@@ -638,11 +638,11 @@ void AutomationPattern::resolveAllIDs()
for( TrackContainer::TrackList::iterator it = l.begin();
it != l.end(); ++it )
{
if( ( *it )->type() == track::AutomationTrack ||
( *it )->type() == track::HiddenAutomationTrack )
if( ( *it )->type() == Track::AutomationTrack ||
( *it )->type() == Track::HiddenAutomationTrack )
{
track::tcoVector v = ( *it )->getTCOs();
for( track::tcoVector::iterator j = v.begin();
Track::tcoVector v = ( *it )->getTCOs();
for( Track::tcoVector::iterator j = v.begin();
j != v.end(); ++j )
{
AutomationPattern * a = dynamic_cast<AutomationPattern *>( *j );

View File

@@ -292,9 +292,9 @@ void FxMixer::deleteChannel( int index )
tracks += engine::getSong()->tracks();
tracks += engine::getBBTrackContainer()->tracks();
foreach( track* t, tracks )
foreach( Track* t, tracks )
{
if( t->type() == track::InstrumentTrack )
if( t->type() == Track::InstrumentTrack )
{
InstrumentTrack* inst = dynamic_cast<InstrumentTrack *>( t );
int val = inst->effectChannelModel()->value(0);
@@ -345,16 +345,16 @@ void FxMixer::moveChannelLeft( int index )
int a = index - 1, b = index;
// go through every instrument and adjust for the channel index change
QVector<track *> songTrackList = engine::getSong()->tracks();
QVector<track *> bbTrackList = engine::getBBTrackContainer()->tracks();
QVector<Track *> songTrackList = engine::getSong()->tracks();
QVector<Track *> bbTrackList = engine::getBBTrackContainer()->tracks();
QVector<track *> trackLists[] = {songTrackList, bbTrackList};
QVector<Track *> trackLists[] = {songTrackList, bbTrackList};
for(int tl=0; tl<2; ++tl)
{
QVector<track *> trackList = trackLists[tl];
QVector<Track *> trackList = trackLists[tl];
for(int i=0; i<trackList.size(); ++i)
{
if( trackList[i]->type() == track::InstrumentTrack )
if( trackList[i]->type() == Track::InstrumentTrack )
{
InstrumentTrack * inst = (InstrumentTrack *) trackList[i];
int val = inst->effectChannelModel()->value(0);

View File

@@ -89,7 +89,7 @@ Instrument * Instrument::instantiate( const QString & _plugin_name,
bool Instrument::isFromTrack( const track * _track ) const
bool Instrument::isFromTrack( const Track * _track ) const
{
return( m_instrumentTrack == _track );
}

View File

@@ -680,7 +680,7 @@ void Mixer::removePlayHandle( PlayHandle * _ph )
void Mixer::removePlayHandles( track * _track, bool removeIPHs )
void Mixer::removePlayHandles( Track * _track, bool removeIPHs )
{
lockPlayHandleRemoval();
PlayHandleList::Iterator it = m_playHandles.begin();

View File

@@ -353,7 +353,7 @@ fpp_t NotePlayHandle::framesLeftForCurrentPeriod() const
bool NotePlayHandle::isFromTrack( const track * _track ) const
bool NotePlayHandle::isFromTrack( const Track * _track ) const
{
return m_instrumentTrack == _track || m_bbTrack == _track;
}

View File

@@ -48,7 +48,7 @@ public:
m_dataMutex()
{
setJournalling( false );
m_previewInstrumentTrack = dynamic_cast<InstrumentTrack *>( track::create( track::InstrumentTrack, this ) );
m_previewInstrumentTrack = dynamic_cast<InstrumentTrack *>( Track::create( Track::InstrumentTrack, this ) );
m_previewInstrumentTrack->setJournalling( false );
}
@@ -208,7 +208,7 @@ bool PresetPreviewPlayHandle::isFinished() const
bool PresetPreviewPlayHandle::isFromTrack( const track * _track ) const
bool PresetPreviewPlayHandle::isFromTrack( const Track * _track ) const
{
return s_previewTC->previewInstrumentTrack() == _track;
}

View File

@@ -143,7 +143,7 @@ bool SamplePlayHandle::isFinished() const
bool SamplePlayHandle::isFromTrack( const track * _track ) const
bool SamplePlayHandle::isFromTrack( const Track * _track ) const
{
return m_track == _track || m_bbTrack == _track;
}

View File

@@ -92,7 +92,7 @@ bool SampleRecordHandle::isFinished() const
bool SampleRecordHandle::isFromTrack( const track * _track ) const
bool SampleRecordHandle::isFromTrack( const Track * _track ) const
{
return( m_track == _track || m_bbTrack == _track );
}

View File

@@ -119,7 +119,7 @@ void TrackContainer::loadSettings( const QDomElement & _this )
if( node.isElement() &&
!node.toElement().attribute( "metadata" ).toInt() )
{
track::create( node.toElement(), this );
Track::create( node.toElement(), this );
}
node = node.nextSibling();
}
@@ -138,13 +138,13 @@ void TrackContainer::loadSettings( const QDomElement & _this )
int TrackContainer::countTracks( track::TrackTypes _tt ) const
int TrackContainer::countTracks( Track::TrackTypes _tt ) const
{
int cnt = 0;
m_tracksMutex.lockForRead();
for( int i = 0; i < m_tracks.size(); ++i )
{
if( m_tracks[i]->type() == _tt || _tt == track::NumTrackTypes )
if( m_tracks[i]->type() == _tt || _tt == Track::NumTrackTypes )
{
++cnt;
}
@@ -156,9 +156,9 @@ int TrackContainer::countTracks( track::TrackTypes _tt ) const
void TrackContainer::addTrack( track * _track )
void TrackContainer::addTrack( Track * _track )
{
if( _track->type() != track::HiddenAutomationTrack )
if( _track->type() != Track::HiddenAutomationTrack )
{
_track->lock();
m_tracksMutex.lockForWrite();
@@ -172,7 +172,7 @@ void TrackContainer::addTrack( track * _track )
void TrackContainer::removeTrack( track * _track )
void TrackContainer::removeTrack( Track * _track )
{
int index = m_tracks.indexOf( _track );
if( index != -1 )
@@ -239,7 +239,7 @@ DummyTrackContainer::DummyTrackContainer() :
{
setJournalling( false );
m_dummyInstrumentTrack = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack,
Track::create( Track::InstrumentTrack,
this ) );
m_dummyInstrumentTrack->setJournalling( false );
}

View File

@@ -116,7 +116,7 @@ tact_t bbTrackContainer::lengthOfBB( int _bb )
int bbTrackContainer::numOfBBs() const
{
return engine::getSong()->countTracks( track::BBTrack );
return engine::getSong()->countTracks( Track::BBTrack );
}
@@ -230,7 +230,7 @@ void bbTrackContainer::currentBBChanged()
TrackList tl = engine::getSong()->tracks();
for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it )
{
if( ( *it )->type() == track::BBTrack )
if( ( *it )->type() == Track::BBTrack )
{
( *it )->dataChanged();
}

View File

@@ -71,7 +71,7 @@ tick_t MidiTime::s_ticksPerTact = DefaultTicksPerTact;
song::song() :
TrackContainer(),
m_globalAutomationTrack( dynamic_cast<AutomationTrack *>(
track::create( track::HiddenAutomationTrack,
Track::create( Track::HiddenAutomationTrack,
this ) ) ),
m_tempoModel( DefaultTempo, MinTempo, MaxTempo, this, tr( "Tempo" ) ),
m_timeSigModel( this ),
@@ -430,7 +430,7 @@ void song::playAndRecord()
void song::playTrack( track * _trackToPlay )
void song::playTrack( Track * _trackToPlay )
{
if( isStopped() == false )
{
@@ -672,7 +672,7 @@ void song::removeBar()
void song::addBBTrack()
{
track * t = track::create( track::BBTrack, this );
Track * t = Track::create( Track::BBTrack, this );
engine::getBBTrackContainer()->setCurrentBB( dynamic_cast<bbTrack *>( t )->index() );
}
@@ -681,7 +681,7 @@ void song::addBBTrack()
void song::addSampleTrack()
{
(void) track::create( track::SampleTrack, this );
(void) Track::create( Track::SampleTrack, this );
}
@@ -689,7 +689,7 @@ void song::addSampleTrack()
void song::addAutomationTrack()
{
(void) track::create( track::AutomationTrack, this );
(void) Track::create( Track::AutomationTrack, this );
}
@@ -820,17 +820,17 @@ void song::createNewProject()
m_fileName = m_oldFileName = "";
track * t;
t = track::create( track::InstrumentTrack, this );
Track * t;
t = Track::create( Track::InstrumentTrack, this );
dynamic_cast<InstrumentTrack * >( t )->loadInstrument(
"tripleoscillator" );
t = track::create( track::InstrumentTrack,
t = Track::create( Track::InstrumentTrack,
engine::getBBTrackContainer() );
dynamic_cast<InstrumentTrack * >( t )->loadInstrument(
"kicker" );
track::create( track::SampleTrack, this );
track::create( track::BBTrack, this );
track::create( track::AutomationTrack, this );
Track::create( Track::SampleTrack, this );
Track::create( Track::BBTrack, this );
Track::create( Track::AutomationTrack, this );
m_tempoModel.setInitValue( DefaultTempo );
m_timeSigModel.reset();

View File

@@ -99,7 +99,7 @@ textFloat * trackContentObjectView::s_textFloat = NULL;
*
* \param _track The track that will contain the new object
*/
trackContentObject::trackContentObject( track * _track ) :
trackContentObject::trackContentObject( Track * _track ) :
Model( _track ),
m_track( _track ),
m_name( QString::null ),
@@ -535,7 +535,7 @@ void trackContentObjectView::leaveEvent( QEvent * _e )
DataFile trackContentObjectView::createTCODataFiles(
const QVector<trackContentObjectView *> & tcoViews) const
{
track * t = m_trackView->getTrack();
Track * t = m_trackView->getTrack();
TrackContainer * tc = t->trackContainer();
DataFile dataFile( DataFile::DragNDropData );
QDomElement tcoParent = dataFile.createElement( "tcos" );
@@ -1260,7 +1260,7 @@ void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee )
*/
bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData )
{
track * t = getTrack();
Track * t = getTrack();
QString type = stringPairDrag::decodeMimeKey( mimeData );
QString value = stringPairDrag::decodeMimeValue( mimeData );
@@ -1312,8 +1312,8 @@ bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * m
}
// Track must be of the same type
track * startTrack = tracks.at( trackIndex );
track * endTrack = tracks.at( finalTrackIndex );
Track * startTrack = tracks.at( trackIndex );
Track * endTrack = tracks.at( finalTrackIndex );
if( startTrack->type() != endTrack->type() )
{
return false;
@@ -1383,7 +1383,7 @@ bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de )
int trackIndex = outerTCOElement.attributeNode( "trackIndex" ).value().toInt();
int finalTrackIndex = trackIndex + ( currentTrackIndex - initialTrackIndex );
track * t = tracks.at( finalTrackIndex );
Track * t = tracks.at( finalTrackIndex );
// Compute the final position by moving the tco's pos by
// the number of tacts between the first TCO and the mouse drop TCO
@@ -1494,7 +1494,7 @@ void trackContentWidget::resizeEvent( QResizeEvent * resizeEvent )
/*! \brief Return the track shown by the trackContentWidget
*
*/
track * trackContentWidget::getTrack()
Track * trackContentWidget::getTrack()
{
return m_trackView->getTrack();
}
@@ -1638,7 +1638,7 @@ void trackOperationsWidget::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton &&
_me->modifiers() & Qt::ControlModifier &&
m_trackView->getTrack()->type() != track::BBTrack )
m_trackView->getTrack()->type() != Track::BBTrack )
{
DataFile dataFile( DataFile::DragNDropData );
m_trackView->getTrack()->saveState( dataFile, dataFile.content() );
@@ -1704,7 +1704,7 @@ void trackOperationsWidget::cloneTrack()
/*! \brief Clear this track - clears all TCOs from the track */
void trackOperationsWidget::clearTrack()
{
track * t = m_trackView->getTrack();
Track * t = m_trackView->getTrack();
t->lock();
t->deleteTCOs();
t->unlock();
@@ -1766,8 +1766,8 @@ void trackOperationsWidget::recordingOn()
AutomationTrackView * atv = dynamic_cast<AutomationTrackView *>( m_trackView );
if( atv )
{
const track::tcoVector & tcov = atv->getTrack()->getTCOs();
for( track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); it++ )
const Track::tcoVector & tcov = atv->getTrack()->getTCOs();
for( Track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); it++ )
{
AutomationPattern * ap = dynamic_cast<AutomationPattern *>( *it );
if( ap ) { ap->setRecording( true ); }
@@ -1782,8 +1782,8 @@ void trackOperationsWidget::recordingOff()
AutomationTrackView * atv = dynamic_cast<AutomationTrackView *>( m_trackView );
if( atv )
{
const track::tcoVector & tcov = atv->getTrack()->getTCOs();
for( track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); it++ )
const Track::tcoVector & tcov = atv->getTrack()->getTCOs();
for( Track::tcoVector::const_iterator it = tcov.begin(); it != tcov.end(); it++ )
{
AutomationPattern * ap = dynamic_cast<AutomationPattern *>( *it );
if( ap ) { ap->setRecording( false ); }
@@ -1807,7 +1807,7 @@ void trackOperationsWidget::recordingOff()
*
* \todo check the definitions of all the properties - are they OK?
*/
track::track( TrackTypes _type, TrackContainer * _tc ) :
Track::Track( TrackTypes _type, TrackContainer * _tc ) :
Model( _tc ), /*!< The track Model */
m_trackContainer( _tc ), /*!< The track container object */
m_type( _type ), /*!< The track type */
@@ -1836,7 +1836,7 @@ track::track( TrackTypes _type, TrackContainer * _tc ) :
*
* Finally step through this track's automation and forget all of them.
*/
track::~track()
Track::~Track()
{
lock();
emit destroyedTrack();
@@ -1858,9 +1858,9 @@ track::~track()
* \param _tt The type of track to create
* \param _tc The track container to attach to
*/
track * track::create( TrackTypes _tt, TrackContainer * _tc )
Track * Track::create( TrackTypes _tt, TrackContainer * _tc )
{
track * t = NULL;
Track * t = NULL;
switch( _tt )
{
@@ -1888,9 +1888,9 @@ track * track::create( TrackTypes _tt, TrackContainer * _tc )
* \param _this The QDomElement containing the type of track to create
* \param _tc The track container to attach to
*/
track * track::create( const QDomElement & _this, TrackContainer * _tc )
Track * Track::create( const QDomElement & _this, TrackContainer * _tc )
{
track * t = create(
Track * t = create(
static_cast<TrackTypes>( _this.attribute( "type" ).toInt() ),
_tc );
if( t != NULL )
@@ -1906,7 +1906,7 @@ track * track::create( const QDomElement & _this, TrackContainer * _tc )
/*! \brief Clone a track from this track
*
*/
void track::clone()
void Track::clone()
{
QDomDocument doc;
QDomElement parent = doc.createElement( "clone" );
@@ -1930,7 +1930,7 @@ void track::clone()
* \todo Does this accurately describe the parameters? I think not!?
* \todo Save the track height
*/
void track::saveSettings( QDomDocument & _doc, QDomElement & _this )
void Track::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
if( !m_simpleSerializingMode )
{
@@ -1980,7 +1980,7 @@ void track::saveSettings( QDomDocument & _doc, QDomElement & _this )
* \param _this the QDomElement to load track settings from
* \todo Load the track height.
*/
void track::loadSettings( const QDomElement & _this )
void Track::loadSettings( const QDomElement & _this )
{
if( _this.attribute( "type" ).toInt() != type() )
{
@@ -2052,7 +2052,7 @@ void track::loadSettings( const QDomElement & _this )
*
* \param _tco The trackContentObject to attach to this track.
*/
trackContentObject * track::addTCO( trackContentObject * _tco )
trackContentObject * Track::addTCO( trackContentObject * _tco )
{
m_trackContentObjects.push_back( _tco );
@@ -2068,7 +2068,7 @@ trackContentObject * track::addTCO( trackContentObject * _tco )
*
* \param _tco The trackContentObject to remove from this track.
*/
void track::removeTCO( trackContentObject * _tco )
void Track::removeTCO( trackContentObject * _tco )
{
tcoVector::iterator it = qFind( m_trackContentObjects.begin(),
m_trackContentObjects.end(),
@@ -2086,7 +2086,7 @@ void track::removeTCO( trackContentObject * _tco )
/*! \brief Remove all TCOs from this track */
void track::deleteTCOs()
void Track::deleteTCOs()
{
while( ! m_trackContentObjects.isEmpty() )
{
@@ -2099,7 +2099,7 @@ void track::deleteTCOs()
*
* \return the number of trackContentObjects we currently contain.
*/
int track::numOfTCOs()
int Track::numOfTCOs()
{
return m_trackContentObjects.size();
}
@@ -2119,13 +2119,13 @@ int track::numOfTCOs()
* \todo if we create a TCO here, should we somehow attach it to the
* track?
*/
trackContentObject * track::getTCO( int _tco_num )
trackContentObject * Track::getTCO( int _tco_num )
{
if( _tco_num < m_trackContentObjects.size() )
{
return m_trackContentObjects[_tco_num];
}
printf( "called track::getTCO( %d ), "
printf( "called Track::getTCO( %d ), "
"but TCO %d doesn't exist\n", _tco_num, _tco_num );
return createTCO( _tco_num * MidiTime::ticksPerTact() );
@@ -2139,7 +2139,7 @@ trackContentObject * track::getTCO( int _tco_num )
* \param _tco The trackContentObject to search for.
* \return its number in our array.
*/
int track::getTCONum( trackContentObject * _tco )
int Track::getTCONum( trackContentObject * _tco )
{
// for( int i = 0; i < getTrackContentWidget()->numOfTCOs(); ++i )
tcoVector::iterator it = qFind( m_trackContentObjects.begin(),
@@ -2153,7 +2153,7 @@ int track::getTCONum( trackContentObject * _tco )
}*/
return it - m_trackContentObjects.begin();
}
qWarning( "track::getTCONum(...) -> _tco not found!\n" );
qWarning( "Track::getTCONum(...) -> _tco not found!\n" );
return 0;
}
@@ -2173,7 +2173,7 @@ int track::getTCONum( trackContentObject * _tco )
* \param _start The MIDI start time of the range.
* \param _end The MIDI endi time of the range.
*/
void track::getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start,
void Track::getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start,
const MidiTime & _end )
{
for( tcoVector::iterator it_o = m_trackContentObjects.begin();
@@ -2218,7 +2218,7 @@ void track::getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start,
* \param _tco_num1 The first trackContentObject to swap.
* \param _tco_num2 The second trackContentObject to swap.
*/
void track::swapPositionOfTCOs( int _tco_num1, int _tco_num2 )
void Track::swapPositionOfTCOs( int _tco_num1, int _tco_num2 )
{
qSwap( m_trackContentObjects[_tco_num1],
m_trackContentObjects[_tco_num2] );
@@ -2240,7 +2240,7 @@ void track::swapPositionOfTCOs( int _tco_num1, int _tco_num2 )
* in ascending order by TCO time, once we hit a TCO that was earlier
* than the insert time, we could fall out of the loop early.
*/
void track::insertTact( const MidiTime & _pos )
void Track::insertTact( const MidiTime & _pos )
{
// we'll increase the position of every TCO, positioned behind _pos, by
// one tact
@@ -2262,7 +2262,7 @@ void track::insertTact( const MidiTime & _pos )
*
* \param _pos The time at which we want to remove the bar.
*/
void track::removeTact( const MidiTime & _pos )
void Track::removeTact( const MidiTime & _pos )
{
// we'll decrease the position of every TCO, positioned behind _pos, by
// one tact
@@ -2286,7 +2286,7 @@ void track::removeTact( const MidiTime & _pos )
* keeping track of the latest time found in ticks. Then we return
* that in bars by dividing by the number of ticks per bar.
*/
tact_t track::length() const
tact_t Track::length() const
{
// find last end-position
tick_t last = 0;
@@ -2311,7 +2311,7 @@ tact_t track::length() const
* is already soloed. Then we have to save the mute state of all tracks,
* and set our mute state to on and all the others to off.
*/
void track::toggleSolo()
void Track::toggleSolo()
{
const TrackContainer::TrackList & tl = m_trackContainer->tracks();
@@ -2371,7 +2371,7 @@ void track::toggleSolo()
* \param _tcv The track Container View for us to be displayed in.
* \todo Is my description of these properties correct?
*/
trackView::trackView( track * _track, TrackContainerView * _tcv ) :
trackView::trackView( Track * _track, TrackContainerView * _tcv ) :
QWidget( _tcv->contentWidget() ), /*!< The Track Container View's content widget. */
ModelView( NULL, this ), /*!< The model view of this track */
m_track( _track ), /*!< The track we're displaying */
@@ -2414,7 +2414,7 @@ trackView::trackView( track * _track, TrackContainerView * _tcv ) :
connect( &m_track->m_soloModel, SIGNAL( dataChanged() ),
m_track, SLOT( toggleSolo() ) );
// create views for already existing TCOs
for( track::tcoVector::iterator it =
for( Track::tcoVector::iterator it =
m_track->m_trackContentObjects.begin();
it != m_track->m_trackContentObjects.end(); ++it )
{
@@ -2493,7 +2493,7 @@ bool trackView::close()
*/
void trackView::modelChanged()
{
m_track = castModel<track>();
m_track = castModel<Track>();
assert( m_track != NULL );
connect( m_track, SIGNAL( destroyedTrack() ), this, SLOT( close() ) );
m_trackOperationsWidget.m_muteBtn->setModel( &m_track->m_mutedModel );

View File

@@ -617,7 +617,7 @@ void FileBrowserTreeWidget::activateListItem(QTreeWidgetItem * item,
{
// engine::mixer()->lock();
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack,
Track::create( Track::InstrumentTrack,
engine::getBBTrackContainer() ) );
handleFile( f, it );
// engine::mixer()->unlock();
@@ -634,7 +634,7 @@ void FileBrowserTreeWidget::openInNewInstrumentTrack( TrackContainer* tc )
{
// engine::mixer()->lock();
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack, tc ) );
Track::create( Track::InstrumentTrack, tc ) );
handleFile( m_contextMenuItem, it );
// engine::mixer()->unlock();
}

View File

@@ -228,16 +228,16 @@ void FxMixerView::refreshDisplay()
// update the and max. channel number for every instrument
void FxMixerView::updateMaxChannelSelector()
{
QVector<track *> songTrackList = engine::getSong()->tracks();
QVector<track *> bbTrackList = engine::getBBTrackContainer()->tracks();
QVector<Track *> songTrackList = engine::getSong()->tracks();
QVector<Track *> bbTrackList = engine::getBBTrackContainer()->tracks();
QVector<track *> trackLists[] = {songTrackList, bbTrackList};
QVector<Track *> trackLists[] = {songTrackList, bbTrackList};
for(int tl=0; tl<2; ++tl)
{
QVector<track *> trackList = trackLists[tl];
QVector<Track *> trackList = trackLists[tl];
for(int i=0; i<trackList.size(); ++i)
{
if( trackList[i]->type() == track::InstrumentTrack )
if( trackList[i]->type() == Track::InstrumentTrack )
{
InstrumentTrack * inst = (InstrumentTrack *) trackList[i];
inst->effectChannelModel()->setRange(0,

View File

@@ -83,8 +83,8 @@ TrackContainerView::TrackContainerView( TrackContainer * _tc ) :
connect( engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ),
this, SLOT( realignTracks() ) );
connect( m_tc, SIGNAL( trackAdded( track * ) ),
this, SLOT( createTrackView( track * ) ),
connect( m_tc, SIGNAL( trackAdded( Track * ) ),
this, SLOT( createTrackView( Track * ) ),
Qt::QueuedConnection );
}
@@ -218,7 +218,7 @@ void TrackContainerView::realignTracks()
void TrackContainerView::createTrackView( track * _t )
void TrackContainerView::createTrackView( Track * _t )
{
//m_tc->addJournalCheckPoint();
@@ -232,7 +232,7 @@ void TrackContainerView::deleteTrackView( trackView * _tv )
{
//m_tc->addJournalCheckPoint();
track * t = _tv->getTrack();
Track * t = _tv->getTrack();
removeTrackView( _tv );
delete _tv;
@@ -294,7 +294,7 @@ void TrackContainerView::clearAllTracks()
while( !m_trackViews.empty() )
{
trackView * tv = m_trackViews.takeLast();
track * t = tv->getTrack();
Track * t = tv->getTrack();
delete tv;
delete t;
}
@@ -309,8 +309,8 @@ void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee )
QString( "presetfile,pluginpresetfile,samplefile,instrument,"
"importedproject,soundfontfile,vstpluginfile,"
"track_%1,track_%2" ).
arg( track::InstrumentTrack ).
arg( track::SampleTrack ) );
arg( Track::InstrumentTrack ).
arg( Track::SampleTrack ) );
}
@@ -323,7 +323,7 @@ void TrackContainerView::dropEvent( QDropEvent * _de )
if( type == "instrument" )
{
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack,
Track::create( Track::InstrumentTrack,
m_tc ) );
it->loadInstrument( value );
//it->toggledInstrumentTrackButton( true );
@@ -333,7 +333,7 @@ void TrackContainerView::dropEvent( QDropEvent * _de )
|| type == "soundfontfile" || type == "vstpluginfile")
{
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack,
Track::create( Track::InstrumentTrack,
m_tc ) );
Instrument * i = it->loadInstrument(
engine::pluginFileHandling()[FileItem::extension(
@@ -346,7 +346,7 @@ void TrackContainerView::dropEvent( QDropEvent * _de )
{
DataFile dataFile( value );
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
track::create( track::InstrumentTrack,
Track::create( Track::InstrumentTrack,
m_tc ) );
it->setSimpleSerializing();
it->loadSettings( dataFile.content().toElement() );
@@ -361,7 +361,7 @@ void TrackContainerView::dropEvent( QDropEvent * _de )
else if( type.left( 6 ) == "track_" )
{
DataFile dataFile( value.toUtf8() );
track::create( dataFile.content().firstChild().toElement(), m_tc );
Track::create( dataFile.content().firstChild().toElement(), m_tc );
_de->accept();
}
}

View File

@@ -167,7 +167,7 @@ void bbEditor::dropEvent( QDropEvent * de )
if( type.left( 6 ) == "track_" )
{
DataFile dataFile( value.toUtf8() );
track * t = track::create( dataFile.content().firstChild().toElement(), model() );
Track * t = Track::create( dataFile.content().firstChild().toElement(), model() );
t->deleteTCOs();
m_bbtc->updateAfterTrackAdd();
@@ -241,7 +241,7 @@ void bbEditor::updatePosition()
void bbEditor::addAutomationTrack()
{
(void) track::create( track::AutomationTrack, model() );
(void) Track::create( Track::AutomationTrack, model() );
}
@@ -254,7 +254,7 @@ void bbEditor::addSteps()
for( TrackContainer::TrackList::iterator it = tl.begin();
it != tl.end(); ++it )
{
if( ( *it )->type() == track::InstrumentTrack )
if( ( *it )->type() == Track::InstrumentTrack )
{
Pattern* p = static_cast<Pattern *>( ( *it )->getTCO( m_bbtc->currentBB() ) );
p->addSteps();
@@ -272,7 +272,7 @@ void bbEditor::removeSteps()
for( TrackContainer::TrackList::iterator it = tl.begin();
it != tl.end(); ++it )
{
if( ( *it )->type() == track::InstrumentTrack )
if( ( *it )->type() == Track::InstrumentTrack )
{
Pattern* p = static_cast<Pattern *>( ( *it )->getTCO( m_bbtc->currentBB() ) );
p->removeSteps();

View File

@@ -127,7 +127,7 @@ void exportProjectDialog::accept()
// If done, then reset mute states
while( m_unmuted.isEmpty() == false )
{
track* restoreTrack = m_unmuted.back();
Track* restoreTrack = m_unmuted.back();
m_unmuted.pop_back();
restoreTrack->setMuted( false );
}
@@ -163,7 +163,7 @@ void exportProjectDialog::popRender()
{
if( m_multiExport && m_tracksToRender.isEmpty() == false )
{
track* renderTrack = m_tracksToRender.back();
Track* renderTrack = m_tracksToRender.back();
m_tracksToRender.pop_back();
// Set must states for song tracks
@@ -202,11 +202,11 @@ void exportProjectDialog::multiRender()
for( TrackContainer::TrackList::ConstIterator it = tl.begin();
it != tl.end(); ++it )
{
track* tk = (*it);
track::TrackTypes type = tk->type();
Track* tk = (*it);
Track::TrackTypes type = tk->type();
// Don't mute automation tracks
if ( tk->isMuted() == false &&
( type == track::InstrumentTrack || type == track::SampleTrack ) )
( type == Track::InstrumentTrack || type == Track::SampleTrack ) )
{
m_unmuted.push_back(tk);
QString nextName = tk->name();
@@ -215,7 +215,7 @@ void exportProjectDialog::multiRender()
m_fileName = QDir(m_dirName).filePath(name);
prepRender();
}
else if (! tk->isMuted() && type == track::BBTrack )
else if (! tk->isMuted() && type == Track::BBTrack )
{
m_unmutedBB.push_back(tk);
}
@@ -226,7 +226,7 @@ void exportProjectDialog::multiRender()
const TrackContainer::TrackList t2 = engine::getBBTrackContainer()->tracks();
for( TrackContainer::TrackList::ConstIterator it = t2.begin(); it != t2.end(); ++it )
{
track* tk = (*it);
Track* tk = (*it);
if ( tk->isMuted() == false )
{
m_unmuted.push_back(tk);

View File

@@ -378,7 +378,7 @@ void EnvelopeAndLfoView::dragEnterEvent( QDragEnterEvent * _dee )
{
stringPairDrag::processDragEnterEvent( _dee,
QString( "samplefile,tco_%1" ).arg(
track::SampleTrack ) );
Track::SampleTrack ) );
}
@@ -395,7 +395,7 @@ void EnvelopeAndLfoView::dropEvent( QDropEvent * _de )
m_userLfoBtn->model()->setValue( true );
_de->accept();
}
else if( type == QString( "tco_%1" ).arg( track::SampleTrack ) )
else if( type == QString( "tco_%1" ).arg( Track::SampleTrack ) )
{
DataFile dataFile( value.toUtf8() );
m_params->m_userWave.setAudioFile( dataFile.content().firstChild().toElement(). attribute( "src" ) );

View File

@@ -131,7 +131,7 @@ void trackLabelButton::mouseDoubleClickEvent( QMouseEvent * _me )
void trackLabelButton::paintEvent( QPaintEvent * _pe )
{
if( m_trackView->getTrack()->type() == track::InstrumentTrack )
if( m_trackView->getTrack()->type() == Track::InstrumentTrack )
{
InstrumentTrack * it =
dynamic_cast<InstrumentTrack *>(

View File

@@ -35,7 +35,7 @@
AutomationTrack::AutomationTrack( TrackContainer* tc, bool _hidden ) :
track( _hidden ? HiddenAutomationTrack : track::AutomationTrack, tc )
Track( _hidden ? HiddenAutomationTrack : Track::AutomationTrack, tc )
{
setName( tr( "Automation track" ) );
}

View File

@@ -93,7 +93,7 @@ const int INSTRUMENT_WINDOW_CACHE_SIZE = 8;
// #### IT:
InstrumentTrack::InstrumentTrack( TrackContainer* tc ) :
track( track::InstrumentTrack, tc ),
Track( Track::InstrumentTrack, tc ),
MidiEventProcessor(),
m_midiPort( tr( "unnamed_track" ), engine::mixer()->midiClient(),
this, this ),
@@ -497,7 +497,7 @@ void InstrumentTrack::setName( const QString & _new_name )
}
}
track::setName( _new_name );
Track::setName( _new_name );
m_midiPort.setName( name() );
m_audioPort.setName( name() );

View File

@@ -49,7 +49,7 @@
#include "ConfigManager.h"
SampleTCO::SampleTCO( track * _track ) :
SampleTCO::SampleTCO( Track * _track ) :
trackContentObject( _track ),
m_sampleBuffer( new SampleBuffer )
{
@@ -402,7 +402,7 @@ void SampleTCOView::paintEvent( QPaintEvent * _pe )
SampleTrack::SampleTrack( TrackContainer* tc ) :
track( track::SampleTrack, tc ),
Track( Track::SampleTrack, tc ),
m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 1.0, this,
tr( "Volume" ) ),
m_audioPort( tr( "Sample track" ), true, &m_volumeModel, NULL )

View File

@@ -46,7 +46,7 @@
bbTrack::infoMap bbTrack::s_infoMap;
bbTCO::bbTCO( track * _track ) :
bbTCO::bbTCO( Track * _track ) :
trackContentObject( _track ),
m_color( 128, 128, 128 ),
m_useStyleColor( true )
@@ -362,7 +362,7 @@ void bbTCOView::setColor( QColor new_color )
QColor * bbTrack::s_lastTCOColor = NULL;
bbTrack::bbTrack( TrackContainer* tc ) :
track( BBTrack, tc )
Track( BBTrack, tc )
{
int bbNum = s_infoMap.size();
s_infoMap[this] = bbNum;
@@ -555,7 +555,7 @@ bbTrack * bbTrack::findBBTrack( int _bb_num )
void bbTrack::swapBBTracks( track * _track1, track * _track2 )
void bbTrack::swapBBTracks( Track * _track1, Track * _track2 )
{
bbTrack * t1 = dynamic_cast<bbTrack *>( _track1 );
bbTrack * t2 = dynamic_cast<bbTrack *>( _track2 );