diff --git a/include/AutomationTrack.h b/include/AutomationTrack.h index 94dbe66f9..bf8cb5697 100644 --- a/include/AutomationTrack.h +++ b/include/AutomationTrack.h @@ -2,7 +2,7 @@ * AutomationTrack.h - declaration of class AutomationTrack, which handles * automation of objects without a track * - * Copyright (c) 2008-2010 Tobias Doerffel + * Copyright (c) 2008-2014 Tobias Doerffel * Copyright (c) 2006-2008 Javier Serrano Polo * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net @@ -33,7 +33,7 @@ class AutomationTrack : public track { public: - AutomationTrack( trackContainer * _tc, bool _hidden = false ); + AutomationTrack( TrackContainer* tc, bool _hidden = false ); virtual ~AutomationTrack(); virtual bool play( const midiTime & _start, const fpp_t _frames, @@ -45,7 +45,7 @@ public: return "automationtrack"; } - virtual trackView * createView( trackContainerView * ); + virtual trackView * createView( TrackContainerView* ); virtual trackContentObject * createTCO( const midiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, @@ -62,7 +62,7 @@ private: class AutomationTrackView : public trackView { public: - AutomationTrackView( AutomationTrack * _at, trackContainerView * _tcv ); + AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv ); virtual ~AutomationTrackView(); virtual void dragEnterEvent( QDragEnterEvent * _dee ); diff --git a/include/ImportFilter.h b/include/ImportFilter.h index 676114cbb..284dfe12b 100644 --- a/include/ImportFilter.h +++ b/include/ImportFilter.h @@ -2,7 +2,7 @@ * ImportFilter.h - declaration of class ImportFilter, the base-class for all * file import filters * - * Copyright (c) 2006-2009 Tobias Doerffel + * Copyright (c) 2006-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -31,7 +31,7 @@ #include "Plugin.h" -class trackContainer; +class TrackContainer; class EXPORT ImportFilter : public Plugin @@ -45,11 +45,11 @@ public: // tries to import given file to given track-container by having all // available import-filters to try to import the file static void import( const QString & _file_to_import, - trackContainer * _tc ); + TrackContainer* tc ); protected: - virtual bool tryImport( trackContainer * _tc ) = 0; + virtual bool tryImport( TrackContainer* tc ) = 0; const QFile & file() const { diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index 1dc4383c6..af1c79288 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -2,7 +2,7 @@ * InstrumentTrack.h - declaration of class InstrumentTrack, a track + window * which holds an instrument-plugin * - * Copyright (c) 2004-2012 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -64,7 +64,7 @@ class EXPORT InstrumentTrack : public track, public MidiEventProcessor Q_OBJECT mapPropertyFromModel(int,getVolume,setVolume,m_volumeModel); public: - InstrumentTrack( trackContainer * _tc ); + InstrumentTrack( TrackContainer* tc ); virtual ~InstrumentTrack(); // used by instrument @@ -123,7 +123,7 @@ public: const f_cnt_t _frame_base, Sint16 _tco_num = -1 ); // create new view for me - virtual trackView * createView( trackContainerView * _tcv ); + virtual trackView * createView( TrackContainerView* tcv ); // create new track-content-object = pattern virtual trackContentObject * createTCO( const midiTime & _pos ); @@ -254,7 +254,7 @@ class InstrumentTrackView : public trackView { Q_OBJECT public: - InstrumentTrackView( InstrumentTrack * _it, trackContainerView * _tc ); + InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tc ); virtual ~InstrumentTrackView(); InstrumentTrackWindow * getInstrumentTrackWindow(); diff --git a/include/track_container.h b/include/TrackContainer.h similarity index 83% rename from include/track_container.h rename to include/TrackContainer.h index 82c41464b..5918c59ea 100644 --- a/include/track_container.h +++ b/include/TrackContainer.h @@ -1,6 +1,6 @@ /* - * track_container.h - base-class for all track-containers like Song-Editor, - * BB-Editor... + * TrackContainer.h - base-class for all track-containers like Song-Editor, + * BB-Editor... * * Copyright (c) 2004-2009 Tobias Doerffel * @@ -34,17 +34,17 @@ class AutomationPattern; class InstrumentTrack; -class trackContainerView; +class TrackContainerView; -class EXPORT trackContainer : public Model, public JournallingObject +class EXPORT TrackContainer : public Model, public JournallingObject { Q_OBJECT public: - typedef QVector trackList; + typedef QVector TrackList; - trackContainer(); - virtual ~trackContainer(); + TrackContainer(); + virtual ~TrackContainer(); virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); @@ -66,7 +66,7 @@ public: void clearAllTracks(); - const trackList & tracks() const + const TrackList & tracks() const { return m_tracks; } @@ -86,16 +86,16 @@ protected: mutable QReadWriteLock m_tracksMutex; private: - trackList m_tracks; + TrackList m_tracks; - friend class trackContainerView; + friend class TrackContainerView; friend class track; } ; -class DummyTrackContainer : public trackContainer +class DummyTrackContainer : public TrackContainer { public: DummyTrackContainer(); diff --git a/include/track_container_view.h b/include/TrackContainerView.h similarity index 87% rename from include/track_container_view.h rename to include/TrackContainerView.h index cace6bf8e..2203fb868 100644 --- a/include/track_container_view.h +++ b/include/TrackContainerView.h @@ -1,7 +1,7 @@ /* - * track_container_view.h - view-component for trackContainer + * TrackContainerView.h - view-component for TrackContainer * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -36,17 +36,17 @@ class QVBoxLayout; -class trackContainer; +class TrackContainer; -class trackContainerView : public QWidget, public ModelView, +class TrackContainerView : public QWidget, public ModelView, public JournallingObject, public SerializingObjectHook { Q_OBJECT public: - trackContainerView( trackContainer * _tc ); - virtual ~trackContainerView(); + TrackContainerView( TrackContainer* tc ); + virtual ~TrackContainerView(); virtual void saveSettings( QDomDocument & _doc, QDomElement & _this ); virtual void loadSettings( const QDomElement & _this ); @@ -92,14 +92,14 @@ public: } - trackContainer * model() + TrackContainer* model() { - return( m_tc ); + return m_tc; } - const trackContainer * model() const + const TrackContainer* model() const { - return( m_tc ); + return m_tc; } void moveTrackViewUp( trackView * _tv ); @@ -155,18 +155,18 @@ private: class scrollArea : public QScrollArea { public: - scrollArea( trackContainerView * _parent ); + scrollArea( TrackContainerView* parent ); virtual ~scrollArea(); protected: virtual void wheelEvent( QWheelEvent * _we ); private: - trackContainerView * m_trackContainerView; + TrackContainerView* m_trackContainerView; } ; - trackContainer * m_tc; + TrackContainer* m_tc; typedef QList trackViewList; trackViewList m_trackViews; diff --git a/include/bb_editor.h b/include/bb_editor.h index b7a91a704..200896718 100644 --- a/include/bb_editor.h +++ b/include/bb_editor.h @@ -1,7 +1,7 @@ /* * bb_editor.h - view-component of BB-Editor * - * Copyright (c) 2004-2008 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -26,7 +26,7 @@ #ifndef _BB_EDITOR_H #define _BB_EDITOR_H -#include "track_container_view.h" +#include "TrackContainerView.h" class bbTrackContainer; @@ -34,7 +34,7 @@ class comboBox; class toolButton; -class bbEditor : public trackContainerView +class bbEditor : public TrackContainerView { Q_OBJECT public: diff --git a/include/bb_track.h b/include/bb_track.h index d64c8e35b..020a59df9 100644 --- a/include/bb_track.h +++ b/include/bb_track.h @@ -2,7 +2,7 @@ * bb_track.h - class bbTrack, a wrapper for using bbEditor * (which is a singleton-class) as track * - * Copyright (c) 2004-2008 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -33,7 +33,7 @@ #include "track.h" class trackLabelButton; -class trackContainer; +class TrackContainer; class bbTCO : public trackContentObject @@ -106,14 +106,14 @@ class EXPORT bbTrack : public track { Q_OBJECT public: - bbTrack( trackContainer * _tc ); + bbTrack( TrackContainer* tc ); virtual ~bbTrack(); virtual bool play( const midiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, Sint16 _tco_num = -1 ); - virtual trackView * createView( trackContainerView * _tcv ); + virtual trackView * createView( TrackContainerView* tcv ); virtual trackContentObject * createTCO( const midiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, @@ -162,7 +162,7 @@ class bbTrackView : public trackView { Q_OBJECT public: - bbTrackView( bbTrack * _bbt, trackContainerView * _tcv ); + bbTrackView( bbTrack* bbt, TrackContainerView* tcv ); virtual ~bbTrackView(); virtual bool close(); diff --git a/include/bb_track_container.h b/include/bb_track_container.h index e600a3cd6..84d06f1fd 100644 --- a/include/bb_track_container.h +++ b/include/bb_track_container.h @@ -1,7 +1,7 @@ /* * bb_track_container.h - model-component of BB-Editor * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -26,11 +26,11 @@ #ifndef _BB_TRACK_CONTAINER_H #define _BB_TRACK_CONTAINER_H -#include "track_container.h" +#include "TrackContainer.h" #include "combobox.h" -class EXPORT bbTrackContainer : public trackContainer +class EXPORT bbTrackContainer : public TrackContainer { Q_OBJECT mapPropertyFromModel(int,currentBB,setCurrentBB,m_bbComboBoxModel); diff --git a/include/file_browser.h b/include/file_browser.h index 3830f6eed..6420ca3fe 100644 --- a/include/file_browser.h +++ b/include/file_browser.h @@ -1,7 +1,7 @@ /* * file_browser.h - include file for fileBrowser * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -40,7 +40,7 @@ class fileItem; class InstrumentTrack; class fileBrowserTreeWidget; class playHandle; -class trackContainer; +class TrackContainer; @@ -96,7 +96,7 @@ protected: private: void handleFile( fileItem * _fi, InstrumentTrack * _it ); - void openInNewInstrumentTrack( trackContainer * _tc ); + void openInNewInstrumentTrack( TrackContainer* tc ); bool m_mousePressed; diff --git a/include/sample_track.h b/include/sample_track.h index ca799c101..621484f37 100644 --- a/include/sample_track.h +++ b/include/sample_track.h @@ -2,7 +2,7 @@ * sample_track.h - class sampleTrack, a track which provides arrangement of * samples * - * Copyright (c) 2005-2010 Tobias Doerffel + * Copyright (c) 2005-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -119,13 +119,13 @@ class sampleTrack : public track { Q_OBJECT public: - sampleTrack( trackContainer * _tc ); + sampleTrack( TrackContainer* tc ); virtual ~sampleTrack(); virtual bool play( const midiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, Sint16 _tco_num = -1 ); - virtual trackView * createView( trackContainerView * _tcv ); + virtual trackView * createView( TrackContainerView* tcv ); virtual trackContentObject * createTCO( const midiTime & _pos ); @@ -159,7 +159,7 @@ class sampleTrackView : public trackView { Q_OBJECT public: - sampleTrackView( sampleTrack * _track, trackContainerView * _tcv ); + sampleTrackView( sampleTrack * _track, TrackContainerView* tcv ); virtual ~sampleTrackView(); diff --git a/include/song.h b/include/song.h index 6cc671cda..ed6c18872 100644 --- a/include/song.h +++ b/include/song.h @@ -28,7 +28,7 @@ #include #include -#include "track_container.h" +#include "TrackContainer.h" #include "AutomatableModel.h" #include "Controller.h" #include "MeterModel.h" @@ -45,7 +45,7 @@ const bpm_t MaxTempo = 999; const tick_t MaxSongLength = 9999 * DefaultTicksPerTact; -class EXPORT song : public trackContainer +class EXPORT song : public TrackContainer { Q_OBJECT mapPropertyFromModel(int,getTempo,setTempo,m_tempoModel); diff --git a/include/song_editor.h b/include/song_editor.h index f69530af3..989636790 100644 --- a/include/song_editor.h +++ b/include/song_editor.h @@ -2,7 +2,7 @@ * song_editor.h - declaration of class songEditor, a window where you can * setup your songs * - * Copyright (c) 2004-2011 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -27,7 +27,7 @@ #ifndef _SONG_EDITOR_H #define _SONG_EDITOR_H -#include "track_container_view.h" +#include "TrackContainerView.h" class QLabel; class QScrollBar; @@ -52,7 +52,7 @@ private: } ; -class songEditor : public trackContainerView +class songEditor : public TrackContainerView { Q_OBJECT public: diff --git a/include/track.h b/include/track.h index 1011c245d..e89e385ac 100644 --- a/include/track.h +++ b/include/track.h @@ -45,8 +45,8 @@ class pixmapButton; class textFloat; class track; class trackContentObjectView; -class trackContainer; -class trackContainerView; +class TrackContainer; +class TrackContainerView; class trackContentWidget; class trackView; @@ -364,12 +364,12 @@ public: NumTrackTypes } ; - track( TrackTypes _type, trackContainer * _tc ); + track( TrackTypes _type, TrackContainer * _tc ); virtual ~track(); - static track * create( TrackTypes _tt, trackContainer * _tc ); + static track * create( TrackTypes _tt, TrackContainer * _tc ); static track * create( const QDomElement & _this, - trackContainer * _tc ); + TrackContainer * _tc ); void clone(); @@ -384,7 +384,7 @@ public: Sint16 _tco_num = -1 ) = 0; - virtual trackView * createView( trackContainerView * _view ) = 0; + virtual trackView * createView( TrackContainerView * _view ) = 0; virtual trackContentObject * createTCO( const midiTime & _pos ) = 0; virtual void saveTrackSpecificSettings( QDomDocument & _doc, @@ -424,9 +424,9 @@ public: tact_t length() const; - inline trackContainer * getTrackContainer() const + inline TrackContainer* trackContainer() const { - return( m_trackContainer ); + return m_trackContainer; } // name-stuff @@ -461,7 +461,7 @@ public slots: private: - trackContainer * m_trackContainer; + TrackContainer* m_trackContainer; TrackTypes m_type; QString m_name; int m_height; @@ -492,7 +492,7 @@ 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 @@ -505,9 +505,9 @@ public: return( m_track ); } - inline trackContainerView * getTrackContainerView() + inline TrackContainerView* trackContainerView() { - return( m_trackContainerView ); + return m_trackContainerView; } inline trackOperationsWidget * getTrackOperationsWidget() @@ -566,7 +566,7 @@ private: } ; track * m_track; - trackContainerView * m_trackContainerView; + TrackContainerView * m_trackContainerView; trackOperationsWidget m_trackOperationsWidget; trackSettingsWidget m_trackSettingsWidget; diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 6390e4834..800c5ba6d 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -378,7 +378,7 @@ bool HydrogenImport::readSong() } return true; } -bool HydrogenImport::tryImport( trackContainer * _tc ) +bool HydrogenImport::tryImport( TrackContainer* tc ) { if( openFile() == false ) { diff --git a/plugins/HydrogenImport/HydrogenImport.h b/plugins/HydrogenImport/HydrogenImport.h index 10a1cba7c..6fe8e3c4c 100644 --- a/plugins/HydrogenImport/HydrogenImport.h +++ b/plugins/HydrogenImport/HydrogenImport.h @@ -21,7 +21,7 @@ public: return( NULL ); } private: - virtual bool tryImport( trackContainer * _tc ); + virtual bool tryImport( TrackContainer* tc ); }; #endif diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index dd539df00..2c8ccf851 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -1,7 +1,7 @@ /* * flp_import.cpp - support for importing FLP-files * - * Copyright (c) 2006-2009 Tobias Doerffel + * Copyright (c) 2006-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -51,7 +51,7 @@ #include "ProjectJournal.h" #include "project_notes.h" #include "song.h" -#include "track_container.h" +#include "TrackContainer.h" #include "embed.h" #include "lmmsconfig.h" @@ -586,7 +586,7 @@ FlpImport::~FlpImport() -bool FlpImport::tryImport( trackContainer * _tc ) +bool FlpImport::tryImport( TrackContainer* tc ) { const int mappedFilter[] = { @@ -711,9 +711,9 @@ bool FlpImport::tryImport( trackContainer * _tc ) } QProgressDialog progressDialog( - trackContainer::tr( "Importing FLP-file..." ), - trackContainer::tr( "Cancel" ), 0, p.numChannels ); - progressDialog.setWindowTitle( trackContainer::tr( "Please wait..." ) ); + TrackContainer::tr( "Importing FLP-file..." ), + TrackContainer::tr( "Cancel" ), 0, p.numChannels ); + progressDialog.setWindowTitle( TrackContainer::tr( "Please wait..." ) ); progressDialog.show(); bool valid = false; diff --git a/plugins/flp_import/FlpImport.h b/plugins/flp_import/FlpImport.h index e096f1301..df4be18d4 100644 --- a/plugins/flp_import/FlpImport.h +++ b/plugins/flp_import/FlpImport.h @@ -1,7 +1,7 @@ /* * FlpImport.h - support for importing FLP-files * - * Copyright (c) 2006-2009 Tobias Doerffel + * Copyright (c) 2006-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -50,7 +50,7 @@ public: private: - virtual bool tryImport( trackContainer * _tc ); + virtual bool tryImport( TrackContainer* tc ); void processPluginParams( FL_Channel * _ch ); diff --git a/plugins/midi_import/MidiImport.cpp b/plugins/midi_import/MidiImport.cpp index f69fa4b48..585c2f5eb 100644 --- a/plugins/midi_import/MidiImport.cpp +++ b/plugins/midi_import/MidiImport.cpp @@ -1,7 +1,7 @@ /* * MidiImport.cpp - support for importing MIDI files * - * Copyright (c) 2005-2009 Tobias Doerffel + * Copyright (c) 2005-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -30,7 +30,7 @@ #include #include "MidiImport.h" -#include "track_container.h" +#include "TrackContainer.h" #include "InstrumentTrack.h" #include "AutomationTrack.h" #include "AutomationPattern.h" @@ -87,7 +87,7 @@ MidiImport::~MidiImport() -bool MidiImport::tryImport( trackContainer * _tc ) +bool MidiImport::tryImport( TrackContainer* tc ) { if( openFile() == false ) { @@ -124,11 +124,11 @@ bool MidiImport::tryImport( trackContainer * _tc ) { case makeID( 'M', 'T', 'h', 'd' ): printf( "MidiImport::tryImport(): found MThd\n"); - return readSMF( _tc ); + return readSMF( tc ); case makeID( 'R', 'I', 'F', 'F' ): printf( "MidiImport::tryImport(): found RIFF\n"); - return readRIFF( _tc ); + return readRIFF( tc ); default: printf( "MidiImport::tryImport(): not a Standard MIDI " @@ -154,12 +154,11 @@ public: AutomationPattern * ap; midiTime lastPos; - smfMidiCC & create( trackContainer * _tc ) + smfMidiCC & create( TrackContainer* tc ) { if( !at ) { - at = dynamic_cast( - track::create( track::AutomationTrack, _tc ) ); + at = dynamic_cast( track::create( track::AutomationTrack, tc ) ); } return *this; } @@ -215,11 +214,10 @@ public: bool hasNotes; midiTime lastEnd; - smfMidiChannel * create( trackContainer * _tc ) + smfMidiChannel * create( TrackContainer* tc ) { if( !it ) { - it = dynamic_cast( - track::create( track::InstrumentTrack, _tc ) ); + it = dynamic_cast( track::create( track::InstrumentTrack, tc ) ); #ifdef LMMS_HAVE_FLUIDSYNTH it_inst = it->loadInstrument( "sf2player" ); @@ -262,15 +260,15 @@ public: }; -bool MidiImport::readSMF( trackContainer * _tc ) +bool MidiImport::readSMF( TrackContainer* tc ) { QString filename = file().fileName(); closeFile(); const int preTrackSteps = 2; - QProgressDialog pd( trackContainer::tr( "Importing MIDI-file..." ), - trackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() ); - pd.setWindowTitle( trackContainer::tr( "Please wait..." ) ); + QProgressDialog pd( TrackContainer::tr( "Importing MIDI-file..." ), + TrackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() ); + pd.setWindowTitle( TrackContainer::tr( "Please wait..." ) ); pd.setWindowModality(Qt::WindowModal); pd.setMinimumDuration( 0 ); @@ -318,7 +316,7 @@ bool MidiImport::readSMF( trackContainer * _tc ) pd.setValue( 2 ); // Tempo stuff - AutomationPattern * tap = _tc->tempoAutomationPattern(); + AutomationPattern * tap = tc->tempoAutomationPattern(); if( tap ) { tap->clear(); @@ -376,7 +374,7 @@ bool MidiImport::readSMF( trackContainer * _tc ) } else if( evt->is_note() && evt->chan < 256 ) { - smfMidiChannel * ch = chs[evt->chan].create( _tc ); + smfMidiChannel * ch = chs[evt->chan].create( tc ); Alg_note_ptr noteEvt = dynamic_cast( evt ); note n( noteEvt->get_duration() * ticksPerBeat, @@ -389,7 +387,7 @@ bool MidiImport::readSMF( trackContainer * _tc ) else if( evt->is_update() ) { - smfMidiChannel * ch = chs[evt->chan].create( _tc ); + smfMidiChannel * ch = chs[evt->chan].create( tc ); double time = evt->time*ticksPerBeat; QString update( evt->get_attribute() ); @@ -469,7 +467,7 @@ bool MidiImport::readSMF( trackContainer * _tc ) } else { - ccs[ccid].create( _tc ); + ccs[ccid].create( tc ); ccs[ccid].putValue( time, objModel, cc ); } } @@ -492,7 +490,7 @@ bool MidiImport::readSMF( trackContainer * _tc ) { printf(" Should remove empty track\n"); // must delete trackView first - but where is it? - //_tc->removeTrack( chs[c].it ); + //tc->removeTrack( chs[c].it ); //it->deleteLater(); } } @@ -503,7 +501,7 @@ bool MidiImport::readSMF( trackContainer * _tc ) -bool MidiImport::readRIFF( trackContainer * _tc ) +bool MidiImport::readRIFF( TrackContainer* tc ) { // skip file length skip( 4 ); @@ -543,7 +541,7 @@ data_not_found: { goto invalid_format; } - return readSMF( _tc ); + return readSMF( tc ); } diff --git a/plugins/midi_import/MidiImport.h b/plugins/midi_import/MidiImport.h index a6dd4dce2..e1d5bc947 100644 --- a/plugins/midi_import/MidiImport.h +++ b/plugins/midi_import/MidiImport.h @@ -1,7 +1,7 @@ /* * MidiImport.h - support for importing MIDI-files * - * Copyright (c) 2005-2009 Tobias Doerffel + * Copyright (c) 2005-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -46,10 +46,10 @@ public: private: - virtual bool tryImport( trackContainer * _tc ); + virtual bool tryImport( TrackContainer* tc ); - bool readSMF( trackContainer * _tc ); - bool readRIFF( trackContainer * _tc ); + bool readSMF( TrackContainer* tc ); + bool readRIFF( TrackContainer* tc ); bool readTrack( int _track_end, QString & _track_name ); void error( void ); diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index a29ee0025..25f4114b8 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -2,7 +2,7 @@ * AutomationPattern.cpp - implementation of class AutomationPattern which * holds dynamic values * - * Copyright (c) 2008-2013 Tobias Doerffel + * Copyright (c) 2008-2014 Tobias Doerffel * Copyright (c) 2006-2008 Javier Serrano Polo * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net @@ -449,10 +449,10 @@ trackContentObjectView * AutomationPattern::createView( trackView * _tv ) bool AutomationPattern::isAutomated( const AutomatableModel * _m ) { - trackContainer::trackList l = engine::getSong()->tracks() + + TrackContainer::TrackList l = engine::getSong()->tracks() + engine::getBBTrackContainer()->tracks(); l += engine::getSong()->globalAutomationTrack(); - for( trackContainer::trackList::const_iterator it = l.begin(); + for( TrackContainer::TrackList::const_iterator it = l.begin(); it != l.end(); ++it ) { if( ( *it )->type() == track::AutomationTrack || @@ -516,10 +516,10 @@ AutomationPattern * AutomationPattern::globalAutomationPattern( void AutomationPattern::resolveAllIDs() { - trackContainer::trackList l = engine::getSong()->tracks() + + TrackContainer::TrackList l = engine::getSong()->tracks() + engine::getBBTrackContainer()->tracks(); l += engine::getSong()->globalAutomationTrack(); - for( trackContainer::trackList::iterator it = l.begin(); + for( TrackContainer::TrackList::iterator it = l.begin(); it != l.end(); ++it ) { if( ( *it )->type() == track::AutomationTrack || diff --git a/src/core/ImportFilter.cpp b/src/core/ImportFilter.cpp index 04795afe1..e32149df8 100644 --- a/src/core/ImportFilter.cpp +++ b/src/core/ImportFilter.cpp @@ -1,7 +1,7 @@ /* * ImportFilter.cpp - base-class for all import-filters (MIDI, FLP etc) * - * Copyright (c) 2006-2009 Tobias Doerffel + * Copyright (c) 2006-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -27,7 +27,7 @@ #include "ImportFilter.h" #include "engine.h" -#include "track_container.h" +#include "TrackContainer.h" #include "ProjectJournal.h" @@ -50,7 +50,7 @@ ImportFilter::~ImportFilter() void ImportFilter::import( const QString & _file_to_import, - trackContainer * _tc ) + TrackContainer* tc ) { DescriptorList d; Plugin::getDescriptorsOfAvailPlugins( d ); @@ -70,8 +70,7 @@ void ImportFilter::import( const QString & _file_to_import, { Plugin * p = Plugin::instantiate( it->name, NULL, s ); if( dynamic_cast( p ) != NULL && - dynamic_cast( p )->tryImport( - _tc ) == true ) + dynamic_cast( p )->tryImport( tc ) == true ) { delete p; successful = true; @@ -88,8 +87,8 @@ void ImportFilter::import( const QString & _file_to_import, if( successful == false ) { QMessageBox::information( NULL, - trackContainer::tr( "Couldn't import file" ), - trackContainer::tr( "Couldn't find a filter for " + TrackContainer::tr( "Couldn't import file" ), + TrackContainer::tr( "Couldn't find a filter for " "importing file %1.\n" "You should convert this file " "into a format supported by " @@ -108,8 +107,8 @@ bool ImportFilter::openFile() if( m_file.open( QFile::ReadOnly ) == false ) { QMessageBox::critical( NULL, - trackContainer::tr( "Couldn't open file" ), - trackContainer::tr( "Couldn't open file %1 " + TrackContainer::tr( "Couldn't open file" ), + TrackContainer::tr( "Couldn't open file %1 " "for reading.\nPlease make " "sure you have read-" "permission to the file and " diff --git a/src/core/track_container.cpp b/src/core/TrackContainer.cpp similarity index 82% rename from src/core/track_container.cpp rename to src/core/TrackContainer.cpp index d9266f448..b2cb5df2a 100644 --- a/src/core/track_container.cpp +++ b/src/core/TrackContainer.cpp @@ -1,8 +1,8 @@ /* - * track_container.cpp - implementation of base-class for all track-containers - * like Song-Editor, BB-Editor... + * TrackContainer.cpp - implementation of base class for all trackcontainers + * like Song-Editor, BB-Editor... * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -28,14 +28,14 @@ #include #include -#include "track_container.h" +#include "TrackContainer.h" #include "InstrumentTrack.h" #include "engine.h" #include "MainWindow.h" #include "song.h" -trackContainer::trackContainer() : +TrackContainer::TrackContainer() : Model( NULL ), JournallingObject(), m_tracksMutex(), @@ -46,7 +46,7 @@ trackContainer::trackContainer() : -trackContainer::~trackContainer() +TrackContainer::~TrackContainer() { clearAllTracks(); } @@ -54,7 +54,7 @@ trackContainer::~trackContainer() -void trackContainer::saveSettings( QDomDocument & _doc, QDomElement & _this ) +void TrackContainer::saveSettings( QDomDocument & _doc, QDomElement & _this ) { _this.setTagName( classNodeName() ); _this.setAttribute( "type", nodeName() ); @@ -71,7 +71,7 @@ void trackContainer::saveSettings( QDomDocument & _doc, QDomElement & _this ) -void trackContainer::loadSettings( const QDomElement & _this ) +void TrackContainer::loadSettings( const QDomElement & _this ) { static QProgressDialog * pd = NULL; bool was_null = ( pd == NULL ); @@ -132,7 +132,7 @@ 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(); @@ -150,7 +150,7 @@ int trackContainer::countTracks( track::TrackTypes _tt ) const -void trackContainer::addTrack( track * _track ) +void TrackContainer::addTrack( track * _track ) { if( _track->type() != track::HiddenAutomationTrack ) { @@ -164,7 +164,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 ) @@ -183,14 +183,14 @@ void trackContainer::removeTrack( track * _track ) -void trackContainer::updateAfterTrackAdd() +void TrackContainer::updateAfterTrackAdd() { } -void trackContainer::clearAllTracks() +void TrackContainer::clearAllTracks() { //m_tracksMutex.lockForWrite(); while( !m_tracks.isEmpty() ) @@ -203,9 +203,9 @@ void trackContainer::clearAllTracks() -bool trackContainer::isEmpty() const +bool TrackContainer::isEmpty() const { - for( trackList::const_iterator it = m_tracks.begin(); + for( TrackList::const_iterator it = m_tracks.begin(); it != m_tracks.end(); ++it ) { if( !( *it )->getTCOs().isEmpty() ) @@ -222,7 +222,7 @@ bool trackContainer::isEmpty() const DummyTrackContainer::DummyTrackContainer() : - trackContainer(), + TrackContainer(), m_dummyInstrumentTrack( NULL ) { setJournalling( false ); @@ -235,5 +235,5 @@ DummyTrackContainer::DummyTrackContainer() : -#include "moc_track_container.cxx" +#include "moc_TrackContainer.cxx" diff --git a/src/core/bb_track_container.cpp b/src/core/bb_track_container.cpp index b016ac15f..58e58517d 100644 --- a/src/core/bb_track_container.cpp +++ b/src/core/bb_track_container.cpp @@ -1,7 +1,7 @@ /* * bb_track_container.cpp - model-component of BB-Editor * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -33,7 +33,7 @@ bbTrackContainer::bbTrackContainer() : - trackContainer(), + TrackContainer(), m_bbComboBoxModel( this ) { connect( &m_bbComboBoxModel, SIGNAL( dataChanged() ), @@ -66,8 +66,8 @@ bool bbTrackContainer::play( midiTime _start, fpp_t _frames, _start = _start % ( lengthOfBB( _tco_num ) * midiTime::ticksPerTact() ); - trackList tl = tracks(); - for( trackList::iterator it = tl.begin(); it != tl.end(); ++it ) + TrackList tl = tracks(); + for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) { if( ( *it )->play( _start, _frames, _offset, _tco_num ) ) { @@ -102,8 +102,8 @@ tact_t bbTrackContainer::lengthOfBB( int _bb ) { midiTime max_length = midiTime::ticksPerTact(); - const trackList & tl = tracks(); - for( trackList::const_iterator it = tl.begin(); it != tl.end(); ++it ) + const TrackList & tl = tracks(); + for( TrackList::const_iterator it = tl.begin(); it != tl.end(); ++it ) { max_length = qMax( max_length, ( *it )->getTCO( _bb )->length() ); @@ -125,8 +125,8 @@ int bbTrackContainer::numOfBBs() const void bbTrackContainer::removeBB( int _bb ) { - trackList tl = tracks(); - for( trackList::iterator it = tl.begin(); it != tl.end(); ++it ) + TrackList tl = tracks(); + for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) { delete ( *it )->getTCO( _bb ); ( *it )->removeTact( _bb * DefaultTicksPerTact ); @@ -142,8 +142,8 @@ void bbTrackContainer::removeBB( int _bb ) void bbTrackContainer::swapBB( int _bb1, int _bb2 ) { - trackList tl = tracks(); - for( trackList::iterator it = tl.begin(); it != tl.end(); ++it ) + TrackList tl = tracks(); + for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) { ( *it )->swapPositionOfTCOs( _bb1, _bb2 ); } @@ -168,8 +168,8 @@ void bbTrackContainer::updateBBTrack( trackContentObject * _tco ) void bbTrackContainer::fixIncorrectPositions() { - trackList tl = tracks(); - for( trackList::iterator it = tl.begin(); it != tl.end(); ++it ) + TrackList tl = tracks(); + for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) { for( int i = 0; i < numOfBBs(); ++i ) { @@ -228,8 +228,8 @@ void bbTrackContainer::currentBBChanged() // now update all track-labels (the current one has to become white, // the others gray) - trackList tl = engine::getSong()->tracks(); - for( trackList::iterator it = tl.begin(); it != tl.end(); ++it ) + TrackList tl = engine::getSong()->tracks(); + for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) { if( ( *it )->type() == track::BBTrack ) { @@ -248,7 +248,7 @@ void bbTrackContainer::createTCOsForBB( int _bb ) return; } - trackList tl = tracks(); + TrackList tl = tracks(); for( int i = 0; i < tl.size(); ++i ) { while( tl[i]->numOfTCOs() < _bb + 1 ) diff --git a/src/core/preset_preview_play_handle.cpp b/src/core/preset_preview_play_handle.cpp index fa9b2fd9f..09139ba21 100644 --- a/src/core/preset_preview_play_handle.cpp +++ b/src/core/preset_preview_play_handle.cpp @@ -35,12 +35,12 @@ #include "mmp.h" #include "note_play_handle.h" #include "ProjectJournal.h" -#include "track_container.h" +#include "TrackContainer.h" // invisible track-container which is needed as parent for preview-channels -class previewTrackContainer : public trackContainer +class previewTrackContainer : public TrackContainer { public: previewTrackContainer() : diff --git a/src/core/song.cpp b/src/core/song.cpp index 3316cebc9..a2c5457aa 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -81,7 +81,7 @@ tick_t midiTime::s_ticksPerTact = DefaultTicksPerTact; song::song() : - trackContainer(), + TrackContainer(), m_globalAutomationTrack( dynamic_cast( track::create( track::HiddenAutomationTrack, this ) ) ), @@ -399,7 +399,7 @@ void song::processNextBuffer() return; } - trackList track_list; + TrackList track_list; int tco_num = -1; switch( m_playMode ) @@ -742,7 +742,7 @@ void song::updateLength() { m_length = 0; m_tracksMutex.lockForRead(); - for( trackList::const_iterator it = tracks().begin(); + for( TrackList::const_iterator it = tracks().begin(); it != tracks().end(); ++it ) { const tact_t cur = ( *it )->length(); @@ -867,7 +867,7 @@ void song::stopExport() void song::insertBar() { m_tracksMutex.lockForRead(); - for( trackList::const_iterator it = tracks().begin(); + for( TrackList::const_iterator it = tracks().begin(); it != tracks().end(); ++it ) { ( *it )->insertTact( m_playPos[Mode_PlaySong] ); @@ -881,7 +881,7 @@ void song::insertBar() void song::removeBar() { m_tracksMutex.lockForRead(); - for( trackList::const_iterator it = tracks().begin(); + for( TrackList::const_iterator it = tracks().begin(); it != tracks().end(); ++it ) { ( *it )->removeTact( m_playPos[Mode_PlaySong] ); diff --git a/src/core/track.cpp b/src/core/track.cpp index 31ea31f67..c189dcd0c 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -2,7 +2,7 @@ * track.cpp - implementation of classes concerning tracks -> necessary for * all track-like objects (beat/bassline, sample-track...) * - * Copyright (c) 2004-2012 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -68,7 +68,7 @@ #include "templates.h" #include "text_float.h" #include "tooltip.h" -#include "track_container.h" +#include "TrackContainer.h" /*! The width of the resize grip in pixels @@ -336,7 +336,7 @@ trackContentObjectView::~trackContentObjectView() // op-buttons of our track-widgets could become focus and when the user // presses space for playing song, just one of these buttons is pressed // which results in unwanted effects - m_trackView->getTrackContainerView()->setFocus(); + m_trackView->trackContainerView()->setFocus(); } @@ -352,7 +352,7 @@ trackContentObjectView::~trackContentObjectView() */ bool trackContentObjectView::fixedTCOs() { - return m_trackView->getTrackContainerView()->fixedTCOs(); + return m_trackView->trackContainerView()->fixedTCOs(); } @@ -425,7 +425,7 @@ void trackContentObjectView::updateLength() midiTime::ticksPerTact() ) + TCO_BORDER_WIDTH * 2-1 ); } - m_trackView->getTrackContainerView()->update(); + m_trackView->trackContainerView()->update(); } @@ -443,7 +443,7 @@ void trackContentObjectView::updatePosition() m_trackView->getTrackContentWidget()->changePosition(); // moving a TCO can result in change of song-length etc., // therefore we update the track-container - m_trackView->getTrackContainerView()->update(); + m_trackView->trackContainerView()->update(); } @@ -532,11 +532,11 @@ void trackContentObjectView::leaveEvent( QEvent * _e ) */ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) { - if( m_trackView->getTrackContainerView()->allowRubberband() == true && + if( m_trackView->trackContainerView()->allowRubberband() == true && _me->button() == Qt::LeftButton ) { // if rubberband is active, we can be selected - if( !m_trackView->getTrackContainerView()->rubberBandActive() ) + if( !m_trackView->trackContainerView()->rubberBandActive() ) { if( _me->modifiers() & Qt::ControlModifier ) { @@ -650,12 +650,12 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) m_hint = NULL; } - const float ppt = m_trackView->getTrackContainerView()->pixelsPerTact(); + const float ppt = m_trackView->trackContainerView()->pixelsPerTact(); if( m_action == Move ) { const int x = mapToParent( _me->pos() ).x() - m_initialMouseX; midiTime t = qMax( 0, (int) - m_trackView->getTrackContainerView()->currentPosition()+ + m_trackView->trackContainerView()->currentPosition()+ static_cast( x * midiTime::ticksPerTact() / ppt ) ); if( ! ( _me->modifiers() & Qt::ControlModifier ) @@ -676,7 +676,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) { const int dx = _me->x() - m_initialMouseX; QVector so = - m_trackView->getTrackContainerView()->selectedObjects(); + m_trackView->trackContainerView()->selectedObjects(); QVector tcos; midiTime smallest_pos, t; // find out smallest position of all selected objects for not @@ -830,7 +830,7 @@ void trackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme ) */ float trackContentObjectView::pixelsPerTact() { - return m_trackView->getTrackContainerView()->pixelsPerTact(); + return m_trackView->trackContainerView()->pixelsPerTact(); } @@ -866,7 +866,7 @@ trackContentWidget::trackContentWidget( trackView * _parent ) : { setAcceptDrops( true ); - connect( _parent->getTrackContainerView(), + connect( _parent->trackContainerView(), SIGNAL( positionChanged( const midiTime & ) ), this, SLOT( changePosition( const midiTime & ) ) ); @@ -890,7 +890,7 @@ trackContentWidget::~trackContentWidget() void trackContentWidget::updateBackground() { const int tactsPerBar = 4; - const trackContainerView * tcv = m_trackView->getTrackContainerView(); + const TrackContainerView * tcv = m_trackView->trackContainerView(); // Assume even-pixels-per-tact. Makes sense, should be like this anyways int ppt = static_cast( tcv->pixelsPerTact() ); @@ -1019,7 +1019,7 @@ void trackContentWidget::update() */ void trackContentWidget::changePosition( const midiTime & _new_pos ) { - if( m_trackView->getTrackContainerView() == engine::getBBEditor() ) + if( m_trackView->trackContainerView() == engine::getBBEditor() ) { const int cur_bb = engine::getBBTrackContainer()->currentBB(); setUpdatesEnabled( false ); @@ -1057,12 +1057,12 @@ void trackContentWidget::changePosition( const midiTime & _new_pos ) midiTime pos = _new_pos; if( pos < 0 ) { - pos = m_trackView->getTrackContainerView()->currentPosition(); + pos = m_trackView->trackContainerView()->currentPosition(); } const int begin = pos; const int end = endPosition( pos ); - const float ppt = m_trackView->getTrackContainerView()->pixelsPerTact(); + const float ppt = m_trackView->trackContainerView()->pixelsPerTact(); setUpdatesEnabled( false ); for( tcoViewVector::iterator it = m_tcoViews.begin(); @@ -1123,7 +1123,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de ) QString type = stringPairDrag::decodeKey( _de ); QString value = stringPairDrag::decodeValue( _de ); if( type == ( "tco_" + QString::number( getTrack()->type() ) ) && - m_trackView->getTrackContainerView()->fixedTCOs() == false ) + m_trackView->trackContainerView()->fixedTCOs() == false ) { const midiTime pos = getPosition( _de->pos().x() ).toNearestTact(); @@ -1154,7 +1154,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de ) */ void trackContentWidget::mousePressEvent( QMouseEvent * _me ) { - if( m_trackView->getTrackContainerView()->allowRubberband() == true ) + if( m_trackView->trackContainerView()->allowRubberband() == true ) { QWidget::mousePressEvent( _me ); } @@ -1163,7 +1163,7 @@ void trackContentWidget::mousePressEvent( QMouseEvent * _me ) QWidget::mousePressEvent( _me ); } else if( _me->button() == Qt::LeftButton && - !m_trackView->getTrackContainerView()->fixedTCOs() ) + !m_trackView->trackContainerView()->fixedTCOs() ) { const midiTime pos = getPosition( _me->x() ).getTact() * midiTime::ticksPerTact(); @@ -1186,11 +1186,11 @@ void trackContentWidget::mousePressEvent( QMouseEvent * _me ) void trackContentWidget::paintEvent( QPaintEvent * _pe ) { // Assume even-pixels-per-tact. Makes sense, should be like this anyways - const trackContainerView * tcv = m_trackView->getTrackContainerView(); + const TrackContainerView * tcv = m_trackView->trackContainerView(); int ppt = static_cast( tcv->pixelsPerTact() ); QPainter p( this ); // Don't draw background on BB-Editor - if( m_trackView->getTrackContainerView() != engine::getBBEditor() ) + if( m_trackView->trackContainerView() != engine::getBBEditor() ) { p.drawTiledPixmap( rect(), m_background, QPoint( tcv->currentPosition().getTact() * ppt, 0 ) ); @@ -1297,11 +1297,11 @@ track * trackContentWidget::getTrack() */ midiTime trackContentWidget::getPosition( int _mouse_x ) { - return midiTime( m_trackView->getTrackContainerView()-> + return midiTime( m_trackView->trackContainerView()-> currentPosition() + _mouse_x * midiTime::ticksPerTact() / static_cast( m_trackView-> - getTrackContainerView()->pixelsPerTact() ) ); + trackContainerView()->pixelsPerTact() ) ); } @@ -1312,7 +1312,7 @@ midiTime trackContentWidget::getPosition( int _mouse_x ) */ midiTime trackContentWidget::endPosition( const midiTime & _pos_start ) { - const float ppt = m_trackView->getTrackContainerView()->pixelsPerTact(); + const float ppt = m_trackView->trackContainerView()->pixelsPerTact(); const int w = width(); return _pos_start + static_cast( w * midiTime::ticksPerTact() / ppt ); } @@ -1393,7 +1393,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : toolTip::add( m_soloBtn, tr( "Solo" ) ); connect( this, SIGNAL( trackRemovalScheduled( trackView * ) ), - m_trackView->getTrackContainerView(), + m_trackView->trackContainerView(), SLOT( deleteTrackView( trackView * ) ), Qt::QueuedConnection ); } @@ -1545,7 +1545,7 @@ void trackOperationsWidget::updateMenu() * * \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 */ @@ -1594,7 +1594,7 @@ 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; @@ -1619,12 +1619,12 @@ track * track::create( TrackTypes _tt, trackContainer * _tc ) -/*! \brief Create a track inside trackContainer from track type in a QDomElement and restore state from XML +/*! \brief Create a track inside TrackContainer from track type in a QDomElement and restore state from XML * * \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( static_cast( _this.attribute( "type" ).toInt() ), @@ -2039,10 +2039,10 @@ tact_t track::length() const */ void track::toggleSolo() { - const trackContainer::trackList & tl = m_trackContainer->tracks(); + const TrackContainer::TrackList & tl = m_trackContainer->tracks(); bool solo_before = false; - for( trackContainer::trackList::const_iterator it = tl.begin(); + for( TrackContainer::TrackList::const_iterator it = tl.begin(); it != tl.end(); ++it ) { if( *it != this ) @@ -2056,7 +2056,7 @@ void track::toggleSolo() } const bool solo = m_soloModel.value(); - for( trackContainer::trackList::const_iterator it = tl.begin(); + for( TrackContainer::TrackList::const_iterator it = tl.begin(); it != tl.end(); ++it ) { if( solo ) @@ -2097,7 +2097,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 */ diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index aef24e08c..55381d8b1 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -2,7 +2,7 @@ * AutomationEditor.cpp - implementation of AutomationEditor which is used for * actual setting of dynamic values * - * Copyright (c) 2008-2013 Tobias Doerffel + * Copyright (c) 2008-2014 Tobias Doerffel * Copyright (c) 2008-2013 Paul Giblock * Copyright (c) 2006-2008 Javier Serrano Polo * @@ -1848,8 +1848,7 @@ inline bool AutomationEditor::inBBEditor() { QMutexLocker m( &m_patternMutex ); return( validPattern() && - m_pattern->getTrack()->getTrackContainer() - == engine::getBBTrackContainer() ); + m_pattern->getTrack()->trackContainer() == engine::getBBTrackContainer() ); } diff --git a/src/gui/track_container_view.cpp b/src/gui/TrackContainerView.cpp similarity index 84% rename from src/gui/track_container_view.cpp rename to src/gui/TrackContainerView.cpp index 94c35dc5b..214d802a1 100644 --- a/src/gui/track_container_view.cpp +++ b/src/gui/TrackContainerView.cpp @@ -1,7 +1,7 @@ /* - * track_container_view.cpp - view-component for trackContainer + * TrackContainerView.cpp - view-component for TrackContainer * - * Copyright (c) 2004-2009 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -31,8 +31,8 @@ #include -#include "track_container_view.h" -#include "track_container.h" +#include "TrackContainerView.h" +#include "TrackContainer.h" #include "bb_track.h" #include "MainWindow.h" #include "debug.h" @@ -47,7 +47,7 @@ #include "track.h" -trackContainerView::trackContainerView( trackContainer * _tc ) : +TrackContainerView::TrackContainerView( TrackContainer * _tc ) : QWidget(), ModelView( NULL, this ), JournallingObject(), @@ -90,7 +90,7 @@ trackContainerView::trackContainerView( trackContainer * _tc ) : -trackContainerView::~trackContainerView() +TrackContainerView::~TrackContainerView() { while( !m_trackViews.empty() ) { @@ -102,7 +102,7 @@ trackContainerView::~trackContainerView() -void trackContainerView::saveSettings( QDomDocument & _doc, +void TrackContainerView::saveSettings( QDomDocument & _doc, QDomElement & _this ) { MainWindow::saveWidgetState( this, _this ); @@ -111,7 +111,7 @@ void trackContainerView::saveSettings( QDomDocument & _doc, -void trackContainerView::loadSettings( const QDomElement & _this ) +void TrackContainerView::loadSettings( const QDomElement & _this ) { MainWindow::restoreWidgetState( this, _this ); } @@ -119,7 +119,7 @@ void trackContainerView::loadSettings( const QDomElement & _this ) -trackView * trackContainerView::addTrackView( trackView * _tv ) +trackView * TrackContainerView::addTrackView( trackView * _tv ) { /* QMap map; map["id"] = _tv->getTrack()->id(); @@ -137,7 +137,7 @@ trackView * trackContainerView::addTrackView( trackView * _tv ) -void trackContainerView::removeTrackView( trackView * _tv ) +void TrackContainerView::removeTrackView( trackView * _tv ) { int index = m_trackViews.indexOf( _tv ); if( index != -1 ) @@ -165,7 +165,7 @@ void trackContainerView::removeTrackView( trackView * _tv ) -void trackContainerView::moveTrackViewUp( trackView * _tv ) +void TrackContainerView::moveTrackViewUp( trackView * _tv ) { for( int i = 1; i < m_trackViews.size(); ++i ) { @@ -187,7 +187,7 @@ void trackContainerView::moveTrackViewUp( trackView * _tv ) -void trackContainerView::moveTrackViewDown( trackView * _tv ) +void TrackContainerView::moveTrackViewDown( trackView * _tv ) { for( int i = 0; i < m_trackViews.size()-1; ++i ) { @@ -210,7 +210,7 @@ void trackContainerView::moveTrackViewDown( trackView * _tv ) -void trackContainerView::realignTracks() +void TrackContainerView::realignTracks() { QWidget * content = m_scrollArea->widget(); content->setFixedWidth( width() @@ -228,7 +228,7 @@ void trackContainerView::realignTracks() -void trackContainerView::createTrackView( track * _t ) +void TrackContainerView::createTrackView( track * _t ) { _t->createView( this ); } @@ -236,7 +236,7 @@ void trackContainerView::createTrackView( track * _t ) -void trackContainerView::deleteTrackView( trackView * _tv ) +void TrackContainerView::deleteTrackView( trackView * _tv ) { track * t = _tv->getTrack(); removeTrackView( _tv ); @@ -250,7 +250,7 @@ void trackContainerView::deleteTrackView( trackView * _tv ) -const trackView * trackContainerView::trackViewAt( const int _y ) const +const trackView * TrackContainerView::trackViewAt( const int _y ) const { const int abs_y = _y + m_scrollArea->viewport()->y(); int y_cnt = 0; @@ -270,7 +270,7 @@ const trackView * trackContainerView::trackViewAt( const int _y ) const -bool trackContainerView::allowRubberband() const +bool TrackContainerView::allowRubberband() const { return( false ); } @@ -278,7 +278,7 @@ bool trackContainerView::allowRubberband() const -void trackContainerView::setPixelsPerTact( int _ppt ) +void TrackContainerView::setPixelsPerTact( int _ppt ) { m_ppt = _ppt; @@ -293,7 +293,7 @@ void trackContainerView::setPixelsPerTact( int _ppt ) -void trackContainerView::clearAllTracks() +void TrackContainerView::clearAllTracks() { while( !m_trackViews.empty() ) { @@ -307,7 +307,7 @@ void trackContainerView::clearAllTracks() -void trackContainerView::undoStep( JournalEntry & _je ) +void TrackContainerView::undoStep( JournalEntry & _je ) { #if 0 saveJournallingState( false ); @@ -345,7 +345,7 @@ void trackContainerView::undoStep( JournalEntry & _je ) -void trackContainerView::redoStep( JournalEntry & _je ) +void TrackContainerView::redoStep( JournalEntry & _je ) { #if 0 switch( _je.actionID() ) @@ -365,7 +365,7 @@ void trackContainerView::redoStep( JournalEntry & _je ) -void trackContainerView::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee ) { stringPairDrag::processDragEnterEvent( _dee, QString( "presetfile,pluginpresetfile,samplefile,instrument," @@ -377,7 +377,7 @@ void trackContainerView::dragEnterEvent( QDragEnterEvent * _dee ) -void trackContainerView::dropEvent( QDropEvent * _de ) +void TrackContainerView::dropEvent( QDropEvent * _de ) { QString type = stringPairDrag::decodeKey( _de ); QString value = stringPairDrag::decodeValue( _de ); @@ -431,7 +431,7 @@ void trackContainerView::dropEvent( QDropEvent * _de ) -void trackContainerView::mousePressEvent( QMouseEvent * _me ) +void TrackContainerView::mousePressEvent( QMouseEvent * _me ) { if( allowRubberband() == true ) { @@ -445,7 +445,7 @@ void trackContainerView::mousePressEvent( QMouseEvent * _me ) -void trackContainerView::mouseMoveEvent( QMouseEvent * _me ) +void TrackContainerView::mouseMoveEvent( QMouseEvent * _me ) { if( rubberBandActive() == true ) { @@ -459,7 +459,7 @@ void trackContainerView::mouseMoveEvent( QMouseEvent * _me ) -void trackContainerView::mouseReleaseEvent( QMouseEvent * _me ) +void TrackContainerView::mouseReleaseEvent( QMouseEvent * _me ) { m_rubberBand->hide(); QWidget::mouseReleaseEvent( _me ); @@ -469,7 +469,7 @@ void trackContainerView::mouseReleaseEvent( QMouseEvent * _me ) -void trackContainerView::resizeEvent( QResizeEvent * _re ) +void TrackContainerView::resizeEvent( QResizeEvent * _re ) { realignTracks(); QWidget::resizeEvent( _re ); @@ -478,7 +478,7 @@ void trackContainerView::resizeEvent( QResizeEvent * _re ) -trackContainerView::scrollArea::scrollArea( trackContainerView * _parent ) : +TrackContainerView::scrollArea::scrollArea( TrackContainerView * _parent ) : QScrollArea( _parent ), m_trackContainerView( _parent ) { @@ -490,14 +490,14 @@ trackContainerView::scrollArea::scrollArea( trackContainerView * _parent ) : -trackContainerView::scrollArea::~scrollArea() +TrackContainerView::scrollArea::~scrollArea() { } -void trackContainerView::scrollArea::wheelEvent( QWheelEvent * _we ) +void TrackContainerView::scrollArea::wheelEvent( QWheelEvent * _we ) { // always pass wheel-event to parent-widget (song-editor // bb-editor etc.) because they might want to use it for zooming @@ -514,5 +514,5 @@ void trackContainerView::scrollArea::wheelEvent( QWheelEvent * _we ) -#include "moc_track_container_view.cxx" +#include "moc_TrackContainerView.cxx" diff --git a/src/gui/bb_editor.cpp b/src/gui/bb_editor.cpp index 9104e2e94..8045c8af1 100644 --- a/src/gui/bb_editor.cpp +++ b/src/gui/bb_editor.cpp @@ -38,9 +38,9 @@ -bbEditor::bbEditor( bbTrackContainer * _tc ) : - trackContainerView( _tc ), - m_bbtc( _tc ) +bbEditor::bbEditor( bbTrackContainer* tc ) : + TrackContainerView( tc ), + m_bbtc( tc ) { // create toolbar m_toolBar = new QWidget; @@ -108,7 +108,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) : m_bbComboBox = new comboBox( m_toolBar ); m_bbComboBox->setFixedSize( 200, 22 ); - m_bbComboBox->setModel( &_tc->m_bbComboBoxModel ); + m_bbComboBox->setModel( &tc->m_bbComboBoxModel ); tb_layout->addSpacing( 5 ); tb_layout->addWidget( m_playButton ); @@ -130,8 +130,8 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) : parentWidget()->show(); - setModel( _tc ); - connect( &_tc->m_bbComboBoxModel, SIGNAL( dataChanged() ), + setModel( tc ); + connect( &tc->m_bbComboBoxModel, SIGNAL( dataChanged() ), this, SLOT( updatePosition() ) ); } diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index 3b9dd2de4..2b3d8258d 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -186,10 +186,10 @@ void exportProjectDialog::multiRender() int x = 1; - const trackContainer::trackList & tl = engine::getSong()->tracks(); + const TrackContainer::TrackList & tl = engine::getSong()->tracks(); // Check for all unmuted tracks. Remember list. - for( trackContainer::trackList::ConstIterator it = tl.begin(); + for( TrackContainer::TrackList::ConstIterator it = tl.begin(); it != tl.end(); ++it ) { track* tk = (*it); @@ -213,8 +213,8 @@ void exportProjectDialog::multiRender() } - const trackContainer::trackList t2 = engine::getBBTrackContainer()->tracks(); - for( trackContainer::trackList::ConstIterator it = t2.begin(); it != t2.end(); ++it ) + const TrackContainer::TrackList t2 = engine::getBBTrackContainer()->tracks(); + for( TrackContainer::TrackList::ConstIterator it = t2.begin(); it != t2.end(); ++it ) { track* tk = (*it); if ( tk->isMuted() == false ) diff --git a/src/gui/file_browser.cpp b/src/gui/file_browser.cpp index cdfcb319a..f00863478 100644 --- a/src/gui/file_browser.cpp +++ b/src/gui/file_browser.cpp @@ -626,14 +626,14 @@ void fileBrowserTreeWidget::activateListItem( QTreeWidgetItem * _item, -void fileBrowserTreeWidget::openInNewInstrumentTrack( trackContainer * _tc ) +void fileBrowserTreeWidget::openInNewInstrumentTrack( TrackContainer* tc ) { if( m_contextMenuItem->handling() == fileItem::LoadAsPreset || m_contextMenuItem->handling() == fileItem::LoadByPlugin ) { engine::mixer()->lock(); InstrumentTrack * it = dynamic_cast( - track::create( track::InstrumentTrack, _tc ) ); + track::create( track::InstrumentTrack, tc ) ); handleFile( m_contextMenuItem, it ); engine::mixer()->unlock(); } diff --git a/src/gui/piano_roll.cpp b/src/gui/piano_roll.cpp index 238e3318b..76347441a 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/piano_roll.cpp @@ -3294,7 +3294,7 @@ int pianoRoll::getKey( int _y ) const song::PlayModes pianoRoll::desiredPlayModeForAccompany() const { - if( m_pattern->getTrack()->getTrackContainer() == + if( m_pattern->getTrack()->trackContainer() == engine::getBBTrackContainer() ) { return song::Mode_PlayBB; @@ -3357,7 +3357,7 @@ void pianoRoll::recordAccompany() m_recording = true; - if( m_pattern->getTrack()->getTrackContainer() == engine::getSong() ) + if( m_pattern->getTrack()->trackContainer() == engine::getSong() ) { engine::getSong()->playSong(); } diff --git a/src/gui/song_editor.cpp b/src/gui/song_editor.cpp index 65e9c889e..929bdd0c0 100644 --- a/src/gui/song_editor.cpp +++ b/src/gui/song_editor.cpp @@ -77,7 +77,7 @@ void positionLine::paintEvent( QPaintEvent * _pe ) songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) : - trackContainerView( _song ), + TrackContainerView( _song ), m_s( _song ), m_scrollBack( false ), m_smoothScroll( configManager::inst()->value( "ui", "smoothscroll" ).toInt() ) diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index 1f92533dd..fc7f50c7c 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -2,7 +2,7 @@ * AutomationTrack.cpp - AutomationTrack handles automation of objects without * a track * - * Copyright (c) 2008-2010 Tobias Doerffel + * Copyright (c) 2008-2014 Tobias Doerffel * Copyright (c) 2006-2008 Javier Serrano Polo * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net @@ -30,12 +30,12 @@ #include "embed.h" #include "ProjectJournal.h" #include "string_pair_drag.h" -#include "track_container_view.h" +#include "TrackContainerView.h" #include "track_label_button.h" -AutomationTrack::AutomationTrack( trackContainer * _tc, bool _hidden ) : - track( _hidden ? HiddenAutomationTrack : track::AutomationTrack, _tc ) +AutomationTrack::AutomationTrack( TrackContainer* tc, bool _hidden ) : + track( _hidden ? HiddenAutomationTrack : track::AutomationTrack, tc ) { setName( tr( "Automation track" ) ); } @@ -90,9 +90,9 @@ bool AutomationTrack::play( const midiTime & _start, const fpp_t _frames, -trackView * AutomationTrack::createView( trackContainerView * _tcv ) +trackView * AutomationTrack::createView( TrackContainerView* tcv ) { - return new AutomationTrackView( this, _tcv ); + return new AutomationTrackView( this, tcv ); } @@ -127,9 +127,8 @@ void AutomationTrack::loadTrackSpecificSettings( const QDomElement & _this ) -AutomationTrackView::AutomationTrackView( AutomationTrack * _at, - trackContainerView * _tcv ) : - trackView( _at, _tcv ) +AutomationTrackView::AutomationTrackView( AutomationTrack * _at, TrackContainerView* tcv ) : + trackView( _at, tcv ) { setFixedHeight( 32 ); trackLabelButton * tlb = new trackLabelButton( this, @@ -169,12 +168,12 @@ void AutomationTrackView::dropEvent( QDropEvent * _de ) journallingObject( val.toInt() ) ); if( mod != NULL ) { - midiTime pos = midiTime( getTrackContainerView()-> + midiTime pos = midiTime( trackContainerView()-> currentPosition() + ( _de->pos().x() - getTrackContentWidget()->x() ) * midiTime::ticksPerTact() / - static_cast( getTrackContainerView()->pixelsPerTact() ) ) + static_cast( trackContainerView()->pixelsPerTact() ) ) .toNearestTact(); if( pos.getTicks() < 0 ) diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 3387f585c..f5dadadb1 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -2,7 +2,7 @@ * InstrumentTrack.cpp - implementation of instrument-track-class * (window + data-structures) * - * Copyright (c) 2004-2013 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -91,8 +91,8 @@ const int INSTRUMENT_WINDOW_CACHE_SIZE = 8; // #### IT: -InstrumentTrack::InstrumentTrack( trackContainer * _tc ) : - track( track::InstrumentTrack, _tc ), +InstrumentTrack::InstrumentTrack( TrackContainer* tc ) : + track( track::InstrumentTrack, tc ), MidiEventProcessor(), m_audioPort( tr( "unnamed_track" ) ), m_midiPort( tr( "unnamed_track" ), engine::mixer()->midiClient(), @@ -744,9 +744,9 @@ trackContentObject * InstrumentTrack::createTCO( const midiTime & ) -trackView * InstrumentTrack::createView( trackContainerView * _tcv ) +trackView * InstrumentTrack::createView( TrackContainerView* tcv ) { - return new InstrumentTrackView( this, _tcv ); + return new InstrumentTrackView( this, tcv ); } @@ -909,9 +909,8 @@ QQueue InstrumentTrackView::s_windowCache; -InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, - trackContainerView * _tcv ) : - trackView( _it, _tcv ), +InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tcv ) : + trackView( _it, tcv ), m_window( NULL ), m_lastPos( -1, -1 ) { diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index 89caac6a9..93f3aa8c5 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -298,8 +298,8 @@ void bbTCOView::setColor( QColor _new_color ) -bbTrack::bbTrack( trackContainer * _tc ) : - track( BBTrack, _tc ) +bbTrack::bbTrack( TrackContainer* tc ) : + track( BBTrack, tc ) { int bbNum = s_infoMap.size(); s_infoMap[this] = bbNum; @@ -333,7 +333,7 @@ bbTrack::~bbTrack() // remove us from TC so bbTrackContainer::numOfBBs() returns a smaller // value and thus combobox-updating in bbTrackContainer works well - getTrackContainer()->removeTrack( this ); + trackContainer()->removeTrack( this ); engine::getBBTrackContainer()->updateComboBox(); } @@ -391,9 +391,9 @@ bool bbTrack::play( const midiTime & _start, const fpp_t _frames, -trackView * bbTrack::createView( trackContainerView * _tcv ) +trackView * bbTrack::createView( TrackContainerView* tcv ) { - return( new bbTrackView( this, _tcv ) ); + return new bbTrackView( this, tcv ); } @@ -454,11 +454,11 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) const int src = _this.attribute( "clonebbt" ).toInt(); const int dst = s_infoMap[this]; engine::getBBTrackContainer()->createTCOsForBB( dst ); - trackContainer::trackList tl = + TrackContainer::TrackList tl = engine::getBBTrackContainer()->tracks(); // copy TCOs of all tracks from source BB (at bar "src") to destination // TCOs (which are created if they do not exist yet) - for( trackContainer::trackList::iterator it = tl.begin(); + for( TrackContainer::TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) { ( *it )->getTCO( src )->copy(); @@ -470,7 +470,7 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) else { QDomNode node = _this.namedItem( - trackContainer::classNodeName() ); + TrackContainer::classNodeName() ); if( node.isElement() ) { ( (JournallingObject *)engine::getBBTrackContainer() )-> @@ -539,8 +539,8 @@ void bbTrack::swapBBTracks( track * _track1, track * _track2 ) -bbTrackView::bbTrackView( bbTrack * _bbt, trackContainerView * _tcv ) : - trackView( _bbt, _tcv ), +bbTrackView::bbTrackView( bbTrack * _bbt, TrackContainerView* tcv ) : + trackView( _bbt, tcv ), m_bbTrack( _bbt ) { setFixedHeight( 32 ); @@ -583,7 +583,7 @@ void bbTrackView::clickedTrackLabel() bbTrack::numOfBBTrack( m_bbTrack ) ); engine::getBBEditor()->show(); /* foreach( bbTrackView * tv, - getTrackContainerView()->findChildren() ) + trackContainerView()->findChildren() ) { tv->m_trackLabel->update(); }*/ diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp index 3a7f0ebca..7963d394f 100644 --- a/src/tracks/pattern.cpp +++ b/src/tracks/pattern.cpp @@ -1,7 +1,7 @@ /* * pattern.cpp - implementation of class pattern which holds notes * - * Copyright (c) 2004-2012 Tobias Doerffel + * Copyright (c) 2004-2014 Tobias Doerffel * Copyright (c) 2005-2007 Danny McRae * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net @@ -40,7 +40,7 @@ #include "embed.h" #include "engine.h" #include "piano_roll.h" -#include "track_container.h" +#include "TrackContainer.h" #include "rename_dialog.h" #include "sample_buffer.h" #include "AudioSampleRecorder.h" @@ -563,7 +563,7 @@ void pattern::ensureBeatNotes() void pattern::updateBBTrack() { - if( getTrack()->getTrackContainer() == engine::getBBTrackContainer() ) + if( getTrack()->trackContainer() == engine::getBBTrackContainer() ) { engine::getBBTrackContainer()->updateBBTrack( this ); } diff --git a/src/tracks/sample_track.cpp b/src/tracks/sample_track.cpp index bd3576247..1d5837414 100644 --- a/src/tracks/sample_track.cpp +++ b/src/tracks/sample_track.cpp @@ -2,7 +2,7 @@ * sample_track.cpp - implementation of class sampleTrack, a track which * provides arrangement of samples * - * Copyright (c) 2005-2010 Tobias Doerffel + * Copyright (c) 2005-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -385,8 +385,8 @@ void sampleTCOView::paintEvent( QPaintEvent * _pe ) -sampleTrack::sampleTrack( trackContainer * _tc ) : - track( SampleTrack, _tc ), +sampleTrack::sampleTrack( TrackContainer* tc ) : + track( SampleTrack, tc ), m_audioPort( tr( "Sample track" ) ), m_volumeModel( DefaultVolume, MinVolume, MaxVolume, 1.0, this, tr( "Volume" ) ) @@ -453,9 +453,9 @@ bool sampleTrack::play( const midiTime & _start, const fpp_t _frames, -trackView * sampleTrack::createView( trackContainerView * _tcv ) +trackView * sampleTrack::createView( TrackContainerView* tcv ) { - return new sampleTrackView( this, _tcv ); + return new sampleTrackView( this, tcv ); } @@ -505,8 +505,8 @@ void sampleTrack::loadTrackSpecificSettings( const QDomElement & _this ) -sampleTrackView::sampleTrackView( sampleTrack * _t, trackContainerView * _tcv ) : - trackView( _t, _tcv ) +sampleTrackView::sampleTrackView( sampleTrack * _t, TrackContainerView* tcv ) : + trackView( _t, tcv ) { setFixedHeight( 32 );