diff --git a/include/AutomationPattern.h b/include/AutomationPattern.h index ffe44318f..b6259b3c5 100644 --- a/include/AutomationPattern.h +++ b/include/AutomationPattern.h @@ -38,7 +38,7 @@ class MidiTime; -class EXPORT AutomationPattern : public trackContentObject +class EXPORT AutomationPattern : public TrackContentObject { Q_OBJECT public: @@ -148,7 +148,7 @@ public: void processMidiTime( const MidiTime & _time ); - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); static bool isAutomated( const AutomatableModel * _m ); diff --git a/include/AutomationPatternView.h b/include/AutomationPatternView.h index 23f68b559..2c2a6c96b 100644 --- a/include/AutomationPatternView.h +++ b/include/AutomationPatternView.h @@ -30,7 +30,7 @@ class AutomationPattern; -class AutomationPatternView : public trackContentObjectView +class AutomationPatternView : public TrackContentObjectView { Q_OBJECT @@ -39,7 +39,7 @@ class AutomationPatternView : public trackContentObjectView Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - AutomationPatternView( AutomationPattern * _pat, trackView * _parent ); + AutomationPatternView( AutomationPattern * _pat, TrackView * _parent ); virtual ~AutomationPatternView(); public slots: @@ -59,7 +59,7 @@ protected: virtual void resizeEvent( QResizeEvent * _re ) { m_needsUpdate = true; - trackContentObjectView::resizeEvent( _re ); + TrackContentObjectView::resizeEvent( _re ); } virtual void dragEnterEvent( QDragEnterEvent * _dee ); virtual void dropEvent( QDropEvent * _de ); diff --git a/include/AutomationTrack.h b/include/AutomationTrack.h index 84bb618da..e9af8e9f6 100644 --- a/include/AutomationTrack.h +++ b/include/AutomationTrack.h @@ -44,8 +44,8 @@ public: return "automationtrack"; } - virtual trackView * createView( TrackContainerView* ); - virtual trackContentObject * createTCO( const MidiTime & _pos ); + virtual TrackView * createView( TrackContainerView* ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ); @@ -58,7 +58,7 @@ private: -class AutomationTrackView : public trackView +class AutomationTrackView : public TrackView { public: AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv ); diff --git a/include/bb_track.h b/include/BBTrack.h similarity index 79% rename from include/bb_track.h rename to include/BBTrack.h index 6017e9bd5..b822c8e2b 100644 --- a/include/bb_track.h +++ b/include/BBTrack.h @@ -1,5 +1,5 @@ /* - * bb_track.h - class bbTrack, a wrapper for using bbEditor + * BBTrack.h - class BBTrack, a wrapper for using bbEditor * (which is a singleton-class) as track * * Copyright (c) 2004-2014 Tobias Doerffel @@ -36,11 +36,11 @@ class TrackLabelButton; class TrackContainer; -class bbTCO : public trackContentObject +class BBTCO : public TrackContentObject { public: - bbTCO( Track * _track ); - virtual ~bbTCO(); + BBTCO( Track * _track ); + virtual ~BBTCO(); virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); virtual void loadSettings( const QDomElement & _this ); @@ -71,25 +71,25 @@ public: int bbTrackIndex(); - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); private: QColor m_color; bool m_useStyleColor; - friend class bbTCOView; + friend class BBTCOView; } ; -class bbTCOView : public trackContentObjectView +class BBTCOView : public TrackContentObjectView { Q_OBJECT public: - bbTCOView( trackContentObject * _tco, trackView * _tv ); - virtual ~bbTCOView(); + BBTCOView( TrackContentObject * _tco, TrackView * _tv ); + virtual ~BBTCOView(); QColor color() const { @@ -113,30 +113,30 @@ protected: private: - bbTCO * m_bbTCO; + BBTCO * m_bbTCO; } ; -class EXPORT bbTrack : public Track +class EXPORT BBTrack : public Track { Q_OBJECT public: - bbTrack( TrackContainer* tc ); - virtual ~bbTrack(); + BBTrack( TrackContainer* tc ); + virtual ~BBTrack(); virtual bool play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _tco_num = -1 ); - virtual trackView * createView( TrackContainerView* tcv ); - virtual trackContentObject * createTCO( const MidiTime & _pos ); + virtual TrackView * createView( TrackContainerView* tcv ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ); virtual void loadTrackSpecificSettings( const QDomElement & _this ); - static bbTrack * findBBTrack( int _bb_num ); + static BBTrack * findBBTrack( int _bb_num ); static void swapBBTracks( Track * _track1, Track * _track2 ); int index() @@ -188,27 +188,27 @@ protected: private: QList m_disabledTracks; - typedef QMap infoMap; + typedef QMap infoMap; static infoMap s_infoMap; static QColor * s_lastTCOColor; - friend class bbTrackView; + friend class BBTrackView; } ; -class bbTrackView : public trackView +class BBTrackView : public TrackView { Q_OBJECT public: - bbTrackView( bbTrack* bbt, TrackContainerView* tcv ); - virtual ~bbTrackView(); + BBTrackView( BBTrack* bbt, TrackContainerView* tcv ); + virtual ~BBTrackView(); virtual bool close(); - const bbTrack * getBBTrack() const + const BBTrack * getBBTrack() const { return( m_bbTrack ); } @@ -219,7 +219,7 @@ public slots: private: - bbTrack * m_bbTrack; + BBTrack * m_bbTrack; TrackLabelButton * m_trackLabel; } ; diff --git a/include/BBTrackContainer.h b/include/BBTrackContainer.h index 203b877b1..a224495f0 100644 --- a/include/BBTrackContainer.h +++ b/include/BBTrackContainer.h @@ -58,7 +58,7 @@ public: void swapBB( int _bb1, int _bb2 ); - void updateBBTrack( trackContentObject * _tco ); + void updateBBTrack( TrackContentObject * _tco ); void fixIncorrectPositions(); void createTCOsForBB( int _bb ); diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index 3aeb6f6ae..04b93997f 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -125,10 +125,10 @@ public: virtual bool play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _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 ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); // called by track @@ -269,7 +269,7 @@ private: -class InstrumentTrackView : public trackView +class InstrumentTrackView : public TrackView { Q_OBJECT public: diff --git a/include/Pattern.h b/include/Pattern.h index 584966c87..163b3429b 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -46,7 +46,7 @@ class SampleBuffer; -class EXPORT Pattern : public trackContentObject +class EXPORT Pattern : public TrackContentObject { Q_OBJECT public: @@ -110,7 +110,7 @@ public: bool empty(); - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); using Model::dataChanged; @@ -148,7 +148,7 @@ signals: -class PatternView : public trackContentObjectView +class PatternView : public TrackContentObjectView { Q_OBJECT @@ -156,7 +156,7 @@ class PatternView : public trackContentObjectView Q_PROPERTY( QColor fgColor READ fgColor WRITE setFgColor ) Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - PatternView( Pattern* pattern, trackView* parent ); + PatternView( Pattern* pattern, TrackView* parent ); virtual ~PatternView(); @@ -179,7 +179,7 @@ protected: virtual void resizeEvent( QResizeEvent * _re ) { m_needsUpdate = true; - trackContentObjectView::resizeEvent( _re ); + TrackContentObjectView::resizeEvent( _re ); } virtual void wheelEvent( QWheelEvent * _we ); diff --git a/include/SamplePlayHandle.h b/include/SamplePlayHandle.h index d77f9cef9..847277a5b 100644 --- a/include/SamplePlayHandle.h +++ b/include/SamplePlayHandle.h @@ -29,7 +29,7 @@ #include "SampleBuffer.h" #include "AutomatableModel.h" -class bbTrack; +class BBTrack; class SampleTCO; class Track; class AudioPort; @@ -64,7 +64,7 @@ public: m_doneMayReturnTrue = _enable; } - void setBBTrack( bbTrack * _bb_track ) + void setBBTrack( BBTrack * _bb_track ) { m_bbTrack = _bb_track; } @@ -88,7 +88,7 @@ private: FloatModel * m_volumeModel; Track * m_track; - bbTrack * m_bbTrack; + BBTrack * m_bbTrack; } ; diff --git a/include/SampleRecordHandle.h b/include/SampleRecordHandle.h index 4d3626cb6..b6a444396 100644 --- a/include/SampleRecordHandle.h +++ b/include/SampleRecordHandle.h @@ -32,7 +32,7 @@ #include "Mixer.h" #include "SampleBuffer.h" -class bbTrack; +class BBTrack; class SampleTCO; class Track; @@ -62,7 +62,7 @@ private: MidiTime m_minLength; Track * m_track; - bbTrack * m_bbTrack; + BBTrack * m_bbTrack; SampleTCO * m_tco; } ; diff --git a/include/SampleTrack.h b/include/SampleTrack.h index 4912f90e3..440b10e7e 100644 --- a/include/SampleTrack.h +++ b/include/SampleTrack.h @@ -35,7 +35,7 @@ class Knob; class SampleBuffer; -class SampleTCO : public trackContentObject +class SampleTCO : public TrackContentObject { Q_OBJECT mapPropertyFromModel(bool,isRecord,setRecord,m_recordModel); @@ -60,7 +60,7 @@ public: MidiTime sampleLength() const; - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); public slots: @@ -85,7 +85,7 @@ signals: -class SampleTCOView : public trackContentObjectView +class SampleTCOView : public TrackContentObjectView { Q_OBJECT @@ -94,7 +94,7 @@ class SampleTCOView : public trackContentObjectView Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - SampleTCOView( SampleTCO * _tco, trackView * _tv ); + SampleTCOView( SampleTCO * _tco, TrackView * _tv ); virtual ~SampleTCOView(); @@ -127,8 +127,8 @@ public: virtual bool play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _tco_num = -1 ); - virtual trackView * createView( TrackContainerView* tcv ); - virtual trackContentObject * createTCO( const MidiTime & _pos ); + virtual TrackView * createView( TrackContainerView* tcv ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, @@ -157,7 +157,7 @@ private: -class SampleTrackView : public trackView +class SampleTrackView : public TrackView { Q_OBJECT public: diff --git a/include/Track.h b/include/Track.h index 778e422b2..8c7e05f23 100644 --- a/include/Track.h +++ b/include/Track.h @@ -47,11 +47,11 @@ class QPushButton; class PixmapButton; class TextFloat; class Track; -class trackContentObjectView; +class TrackContentObjectView; class TrackContainer; class TrackContainerView; -class trackContentWidget; -class trackView; +class TrackContentWidget; +class TrackView; typedef QWidget trackSettingsWidget; @@ -73,15 +73,15 @@ const int DEFAULT_TRACK_HEIGHT = 32; const int TCO_BORDER_WIDTH = 2; -class trackContentObject : public Model, public JournallingObject +class TrackContentObject : public Model, public JournallingObject { Q_OBJECT MM_OPERATORS mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel); mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel); public: - trackContentObject( Track * _track ); - virtual ~trackContentObject(); + TrackContentObject( Track * _track ); + virtual ~TrackContentObject(); inline Track * getTrack() const { @@ -124,7 +124,7 @@ public: virtual void movePosition( const MidiTime & _pos ); virtual void changeLength( const MidiTime & _length ); - virtual trackContentObjectView * createView( trackView * _tv ) = 0; + virtual TrackContentObjectView * createView( TrackView * _tv ) = 0; inline void selectViewOnCreate( bool select ) { @@ -168,13 +168,13 @@ private: bool m_selectViewOnCreate; - friend class trackContentObjectView; + friend class TrackContentObjectView; } ; -class trackContentObjectView : public selectableObject, public ModelView +class TrackContentObjectView : public selectableObject, public ModelView { Q_OBJECT @@ -183,12 +183,12 @@ class trackContentObjectView : public selectableObject, public ModelView Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - trackContentObjectView( trackContentObject * _tco, trackView * _tv ); - virtual ~trackContentObjectView(); + TrackContentObjectView( TrackContentObject * _tco, TrackView * _tv ); + virtual ~TrackContentObjectView(); bool fixedTCOs(); - inline trackContentObject * getTrackContentObject() + inline TrackContentObject * getTrackContentObject() { return m_tco; } @@ -219,12 +219,12 @@ protected: void setAutoResizeEnabled( bool _e = false ); float pixelsPerTact(); - inline trackView * getTrackView() + inline TrackView * getTrackView() { return m_trackView; } - DataFile createTCODataFiles(const QVector & tcos) const; + DataFile createTCODataFiles(const QVector & tcos) const; protected slots: @@ -245,8 +245,8 @@ private: static TextFloat * s_textFloat; - trackContentObject * m_tco; - trackView * m_trackView; + TrackContentObject * m_tco; + TrackView * m_trackView; Actions m_action; bool m_autoResize; QPoint m_initialMousePos; @@ -274,7 +274,7 @@ private: -class trackContentWidget : public QWidget, public JournallingObject +class TrackContentWidget : public QWidget, public JournallingObject { Q_OBJECT @@ -283,14 +283,14 @@ class trackContentWidget : public QWidget, public JournallingObject Q_PROPERTY( QBrush lighterColor READ lighterColor WRITE setLighterColor ) public: - trackContentWidget( trackView * _parent ); - virtual ~trackContentWidget(); + TrackContentWidget( TrackView * _parent ); + virtual ~TrackContentWidget(); /*! \brief Updates the background tile pixmap. */ void updateBackground(); - void addTCOView( trackContentObjectView * _tcov ); - void removeTCOView( trackContentObjectView * _tcov ); + void addTCOView( TrackContentObjectView * _tcov ); + void removeTCOView( TrackContentObjectView * _tcov ); void removeTCOView( int _tco_num ) { if( _tco_num >= 0 && _tco_num < m_tcoViews.size() ) @@ -345,9 +345,9 @@ private: Track * getTrack(); MidiTime getPosition( int _mouse_x ); - trackView * m_trackView; + TrackView * m_trackView; - typedef QVector tcoViewVector; + typedef QVector tcoViewVector; tcoViewVector m_tcoViews; QPixmap m_background; @@ -361,12 +361,12 @@ private: -class trackOperationsWidget : public QWidget +class TrackOperationsWidget : public QWidget { Q_OBJECT public: - trackOperationsWidget( trackView * _parent ); - ~trackOperationsWidget(); + TrackOperationsWidget( TrackView * _parent ); + ~TrackOperationsWidget(); protected: @@ -385,17 +385,17 @@ private slots: private: static QPixmap * s_grip; - trackView * m_trackView; + TrackView * m_trackView; QPushButton * m_trackOps; PixmapButton * m_muteBtn; PixmapButton * m_soloBtn; - friend class trackView; + friend class TrackView; signals: - void trackRemovalScheduled( trackView * _t ); + void trackRemovalScheduled( TrackView * _t ); } ; @@ -411,7 +411,7 @@ class EXPORT Track : public Model, public JournallingObject mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel); mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel); public: - typedef QVector tcoVector; + typedef QVector tcoVector; enum TrackTypes { @@ -444,8 +444,8 @@ public: const f_cnt_t _frame_base, int _tco_num = -1 ) = 0; - virtual trackView * createView( TrackContainerView * _view ) = 0; - virtual trackContentObject * createTCO( const MidiTime & _pos ) = 0; + virtual TrackView * createView( TrackContainerView * _view ) = 0; + virtual TrackContentObject * createTCO( const MidiTime & _pos ) = 0; virtual void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ) = 0; @@ -460,15 +460,15 @@ public: m_simpleSerializingMode = true; } - // -- for usage by trackContentObject only --------------- - trackContentObject * addTCO( trackContentObject * _tco ); - void removeTCO( trackContentObject * _tco ); + // -- for usage by TrackContentObject only --------------- + TrackContentObject * addTCO( TrackContentObject * _tco ); + void removeTCO( TrackContentObject * _tco ); // ------------------------------------------------------- void deleteTCOs(); int numOfTCOs(); - trackContentObject * getTCO( int _tco_num ); - int getTCONum( trackContentObject * _tco ); + TrackContentObject * getTCO( int _tco_num ); + int getTCONum( TrackContentObject * _tco ); const tcoVector & getTCOs() const { @@ -549,25 +549,25 @@ private: QMutex m_processingLock; - friend class trackView; + friend class TrackView; signals: void destroyedTrack(); void nameChanged(); - void trackContentObjectAdded( trackContentObject * ); + void trackContentObjectAdded( TrackContentObject * ); } ; -class trackView : public QWidget, public ModelView, public JournallingObject +class TrackView : public QWidget, public ModelView, public JournallingObject { Q_OBJECT public: - trackView( Track * _track, TrackContainerView* tcv ); - virtual ~trackView(); + TrackView( Track * _track, TrackContainerView* tcv ); + virtual ~TrackView(); inline const Track * getTrack() const { @@ -584,7 +584,7 @@ public: return m_trackContainerView; } - inline trackOperationsWidget * getTrackOperationsWidget() + inline TrackOperationsWidget * getTrackOperationsWidget() { return( &m_trackOperationsWidget ); } @@ -594,7 +594,7 @@ public: return( &m_trackSettingsWidget ); } - inline trackContentWidget * getTrackContentWidget() + inline TrackContentWidget * getTrackContentWidget() { return( &m_trackContentWidget ); } @@ -651,9 +651,9 @@ private: Track * m_track; TrackContainerView * m_trackContainerView; - trackOperationsWidget m_trackOperationsWidget; + TrackOperationsWidget m_trackOperationsWidget; trackSettingsWidget m_trackSettingsWidget; - trackContentWidget m_trackContentWidget; + TrackContentWidget m_trackContentWidget; Actions m_action; @@ -662,7 +662,7 @@ private: private slots: - void createTCOView( trackContentObject * _tco ); + void createTCOView( TrackContentObject * _tco ); } ; diff --git a/include/TrackContainerView.h b/include/TrackContainerView.h index f4762f873..2745f86a4 100644 --- a/include/TrackContainerView.h +++ b/include/TrackContainerView.h @@ -73,7 +73,7 @@ public: void setPixelsPerTact( int _ppt ); - const trackView * trackViewAt( const int _y ) const; + const TrackView * trackViewAt( const int _y ) const; virtual bool allowRubberband() const; @@ -102,12 +102,12 @@ public: return m_tc; } - void moveTrackViewUp( trackView * _tv ); - void moveTrackViewDown( trackView * _tv ); + void moveTrackViewUp( TrackView * _tv ); + void moveTrackViewDown( TrackView * _tv ); // -- for usage by trackView only --------------- - trackView * addTrackView( trackView * _tv ); - void removeTrackView( trackView * _tv ); + TrackView * addTrackView( TrackView * _tv ); + void removeTrackView( TrackView * _tv ); // ------------------------------------------------------- void clearAllTracks(); @@ -121,13 +121,13 @@ public: public slots: void realignTracks(); void createTrackView( Track * _t ); - void deleteTrackView( trackView * _tv ); + void deleteTrackView( TrackView * _tv ); protected: static const int DEFAULT_PIXELS_PER_TACT = 16; - const QList & trackViews() const + const QList & trackViews() const { return( m_trackViews ); } @@ -164,7 +164,7 @@ private: } ; TrackContainer* m_tc; - typedef QList trackViewList; + typedef QList trackViewList; trackViewList m_trackViews; scrollArea * m_scrollArea; diff --git a/include/TrackLabelButton.h b/include/TrackLabelButton.h index 5dcb9ad13..7af8f495e 100644 --- a/include/TrackLabelButton.h +++ b/include/TrackLabelButton.h @@ -29,14 +29,14 @@ #include -class trackView; +class TrackView; class TrackLabelButton : public QToolButton { Q_OBJECT public: - TrackLabelButton( trackView * _tv, QWidget * _parent ); + TrackLabelButton( TrackView * _tv, QWidget * _parent ); virtual ~TrackLabelButton(); @@ -53,7 +53,7 @@ protected: private: - trackView * m_trackView; + TrackView * m_trackView; QString m_iconName; } ; diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 6cfe648d8..f86cdffd7 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -15,7 +15,7 @@ #include "Note.h" #include "Pattern.h" #include "Track.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "Instrument.h" @@ -305,8 +305,8 @@ bool HydrogenImport::readSong() patternId = ( QDomNode ) patternId.nextSiblingElement( "patternID" ); int i = pattern_id[patId]+song_num_tracks; - Track *t = ( bbTrack * ) s->tracks().at( i ); - trackContentObject *tco = t->createTCO( pos ); + Track *t = ( BBTrack * ) s->tracks().at( i ); + TrackContentObject *tco = t->createTCO( pos ); tco->movePosition( pos ); diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index cbd0100a2..499bfb646 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -33,7 +33,7 @@ #include "NotePlayHandle.h" #include "AutomationPattern.h" #include "basic_filters.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "ComboBox.h" #include "ConfigManager.h" @@ -1434,13 +1434,13 @@ else int cur_progress = 0; // create BB tracks - QList bb_tracks; + QList bb_tracks; QList i_tracks; while( Engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns ) { const int cur_pat = bb_tracks.size(); - bbTrack * bbt = dynamic_cast( + BBTrack * bbt = dynamic_cast( Track::create( Track::BBTrack, Engine::getSong() ) ); if( p.patternNames.contains( cur_pat ) ) { @@ -1752,7 +1752,7 @@ p->putValue( jt->pos, value, false ); { continue; } - trackContentObject * tco = bb_tracks[it->pattern]->createTCO( MidiTime() ); + TrackContentObject * tco = bb_tracks[it->pattern]->createTCO( MidiTime() ); tco->movePosition( it->position ); if( it->length != DefaultTicksPerTact ) { diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index 514dce55c..9164e733d 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -44,7 +44,7 @@ const float AutomationPattern::DEFAULT_MAX_VALUE = 1; AutomationPattern::AutomationPattern( AutomationTrack * _auto_track ) : - trackContentObject( _auto_track ), + TrackContentObject( _auto_track ), m_autoTrack( _auto_track ), m_objects(), m_tension( 1.0 ), @@ -60,7 +60,7 @@ AutomationPattern::AutomationPattern( AutomationTrack * _auto_track ) : AutomationPattern::AutomationPattern( const AutomationPattern & _pat_to_copy ) : - trackContentObject( _pat_to_copy.m_autoTrack ), + TrackContentObject( _pat_to_copy.m_autoTrack ), m_autoTrack( _pat_to_copy.m_autoTrack ), m_objects( _pat_to_copy.m_objects ), m_tension( _pat_to_copy.m_tension ), @@ -387,7 +387,7 @@ float *AutomationPattern::valuesAfter( const MidiTime & _time ) const void AutomationPattern::saveSettings( QDomDocument & _doc, QDomElement & _this ) { _this.setAttribute( "pos", startPosition() ); - _this.setAttribute( "len", trackContentObject::length() ); + _this.setAttribute( "len", TrackContentObject::length() ); _this.setAttribute( "name", name() ); _this.setAttribute( "prog", QString::number( progressionType() ) ); _this.setAttribute( "tens", QString::number( getTension() ) ); @@ -459,9 +459,9 @@ void AutomationPattern::loadSettings( const QDomElement & _this ) const QString AutomationPattern::name() const { - if( !trackContentObject::name().isEmpty() ) + if( !TrackContentObject::name().isEmpty() ) { - return trackContentObject::name(); + return TrackContentObject::name(); } if( !m_objects.isEmpty() && m_objects.first() != NULL ) { @@ -511,7 +511,7 @@ void AutomationPattern::processMidiTime( const MidiTime & time ) -trackContentObjectView * AutomationPattern::createView( trackView * _tv ) +TrackContentObjectView * AutomationPattern::createView( TrackView * _tv ) { return new AutomationPatternView( this, _tv ); } diff --git a/src/core/BBTrackContainer.cpp b/src/core/BBTrackContainer.cpp index e7d0f3246..7bf59f1d7 100644 --- a/src/core/BBTrackContainer.cpp +++ b/src/core/BBTrackContainer.cpp @@ -24,7 +24,7 @@ #include "BBTrackContainer.h" -#include "bb_track.h" +#include "BBTrack.h" #include "ComboBox.h" #include "embed.h" #include "Engine.h" @@ -152,9 +152,9 @@ void BBTrackContainer::swapBB( int _bb1, int _bb2 ) -void BBTrackContainer::updateBBTrack( trackContentObject * _tco ) +void BBTrackContainer::updateBBTrack( TrackContentObject * _tco ) { - bbTrack * t = bbTrack::findBBTrack( _tco->startPosition() / + BBTrack * t = BBTrack::findBBTrack( _tco->startPosition() / DefaultTicksPerTact ); if( t != NULL ) { @@ -211,7 +211,7 @@ void BBTrackContainer::updateComboBox() for( int i = 0; i < numOfBBs(); ++i ) { - bbTrack * bbt = bbTrack::findBBTrack( i ); + BBTrack * bbt = BBTrack::findBBTrack( i ); m_bbComboBoxModel.addItem( bbt->name() ); } setCurrentBB( cur_bb ); @@ -253,7 +253,7 @@ void BBTrackContainer::createTCOsForBB( int _bb ) while( tl[i]->numOfTCOs() < _bb + 1 ) { MidiTime position = MidiTime( tl[i]->numOfTCOs(), 0 ); - trackContentObject * tco = tl[i]->createTCO( position ); + TrackContentObject * tco = tl[i]->createTCO( position ); tco->movePosition( position ); tco->changeLength( MidiTime( 1, 0 ) ); } diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 3eec74935..ff0bf0d9b 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -43,7 +43,7 @@ #include "base64.h" // bbTCO::defaultColor() -#include "bb_track.h" +#include "BBTrack.h" diff --git a/src/core/SamplePlayHandle.cpp b/src/core/SamplePlayHandle.cpp index e1b9d99dd..a881a5f8e 100644 --- a/src/core/SamplePlayHandle.cpp +++ b/src/core/SamplePlayHandle.cpp @@ -24,7 +24,7 @@ #include "SamplePlayHandle.h" #include "AudioPort.h" -#include "bb_track.h" +#include "BBTrack.h" #include "Engine.h" #include "InstrumentTrack.h" #include "Pattern.h" diff --git a/src/core/SampleRecordHandle.cpp b/src/core/SampleRecordHandle.cpp index abfb78051..dc850cb70 100644 --- a/src/core/SampleRecordHandle.cpp +++ b/src/core/SampleRecordHandle.cpp @@ -24,7 +24,7 @@ #include "SampleRecordHandle.h" -#include "bb_track.h" +#include "BBTrack.h" #include "Engine.h" #include "InstrumentTrack.h" #include "Pattern.h" diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 8bc7f5c80..12f66ec7f 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -34,7 +34,7 @@ #include "AutomationTrack.h" #include "AutomationEditor.h" #include "BBEditor.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "ConfigManager.h" #include "ControllerRackView.h" @@ -220,7 +220,7 @@ void Song::processNextBuffer() { tco_num = Engine::getBBTrackContainer()-> currentBB(); - track_list.push_back( bbTrack::findBBTrack( + track_list.push_back( BBTrack::findBBTrack( tco_num ) ); } break; @@ -673,7 +673,7 @@ void Song::removeBar() void Song::addBBTrack() { Track * t = Track::create( Track::BBTrack, this ); - Engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); + Engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); } diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 663eb98ad..188d57e08 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -50,7 +50,7 @@ #include "AutomationPattern.h" #include "AutomationTrack.h" #include "BBEditor.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "ConfigManager.h" #include "Clipboard.h" @@ -87,19 +87,19 @@ const int TRACK_OP_BTN_HEIGHT = 14; * beside the cursor as you move or resize elements of a track about. * This pointer keeps track of it, as you only ever need one at a time. */ -TextFloat * trackContentObjectView::s_textFloat = NULL; +TextFloat * TrackContentObjectView::s_textFloat = NULL; // =========================================================================== -// trackContentObject +// TrackContentObject // =========================================================================== -/*! \brief Create a new trackContentObject +/*! \brief Create a new TrackContentObject * * Creates a new track content object for the given track. * * \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 ), @@ -121,12 +121,12 @@ trackContentObject::trackContentObject( Track * _track ) : -/*! \brief Destroy a trackContentObject +/*! \brief Destroy a TrackContentObject * * Destroys the given track content object. * */ -trackContentObject::~trackContentObject() +TrackContentObject::~TrackContentObject() { emit destroyedTCO(); @@ -139,14 +139,14 @@ trackContentObject::~trackContentObject() -/*! \brief Move this trackContentObject's position in time +/*! \brief Move this TrackContentObject's position in time * * If the track content object has moved, update its position. We * also add a journal entry for undo and update the display. * * \param _pos The new position of the track content object. */ -void trackContentObject::movePosition( const MidiTime & _pos ) +void TrackContentObject::movePosition( const MidiTime & _pos ) { if( m_startPosition != _pos ) { @@ -159,14 +159,14 @@ void trackContentObject::movePosition( const MidiTime & _pos ) -/*! \brief Change the length of this trackContentObject +/*! \brief Change the length of this TrackContentObject * * If the track content object's length has chaanged, update it. We * also add a journal entry for undo and update the display. * * \param _length The new length of the track content object. */ -void trackContentObject::changeLength( const MidiTime & _length ) +void TrackContentObject::changeLength( const MidiTime & _length ) { if( m_length != _length ) { @@ -179,11 +179,11 @@ void trackContentObject::changeLength( const MidiTime & _length ) -/*! \brief Copy this trackContentObject to the clipboard. +/*! \brief Copy this TrackContentObject to the clipboard. * * Copies this track content object to the clipboard. */ -void trackContentObject::copy() +void TrackContentObject::copy() { Clipboard::copy( this ); } @@ -191,13 +191,13 @@ void trackContentObject::copy() -/*! \brief Pastes this trackContentObject into a track. +/*! \brief Pastes this TrackContentObject into a track. * * Pastes this track content object into a track. * * \param _je The journal entry to undo */ -void trackContentObject::paste() +void TrackContentObject::paste() { if( Clipboard::getContent( nodeName() ) != NULL ) { @@ -210,7 +210,7 @@ void trackContentObject::paste() -/*! \brief Mutes this trackContentObject +/*! \brief Mutes this TrackContentObject * * Restore the previous state of this track content object. This will * restore the position or the length of the track content object @@ -218,7 +218,7 @@ void trackContentObject::paste() * * \param _je The journal entry to undo */ -void trackContentObject::toggleMute() +void TrackContentObject::toggleMute() { m_mutedModel.setValue( !m_mutedModel.value() ); emit dataChanged(); @@ -241,8 +241,8 @@ void trackContentObject::toggleMute() * \param _tco The track content object to be displayed * \param _tv The track view that will contain the new object */ -trackContentObjectView::trackContentObjectView( trackContentObject * _tco, - trackView * _tv ) : +TrackContentObjectView::TrackContentObjectView( TrackContentObject * _tco, + TrackView * _tv ) : selectableObject( _tv->getTrackContentWidget() ), ModelView( NULL, this ), m_tco( _tco ), @@ -290,7 +290,7 @@ trackContentObjectView::trackContentObjectView( trackContentObject * _tco, * Destroys the given track content object view. * */ -trackContentObjectView::~trackContentObjectView() +TrackContentObjectView::~TrackContentObjectView() { delete m_hint; // we have to give our track-container the focus because otherwise the @@ -311,7 +311,7 @@ trackContentObjectView::~trackContentObjectView() * \todo What the hell is a TCO here - track content object? And in * what circumstance are they fixed? */ -bool trackContentObjectView::fixedTCOs() +bool TrackContentObjectView::fixedTCOs() { return m_trackView->trackContainerView()->fixedTCOs(); } @@ -320,19 +320,19 @@ bool trackContentObjectView::fixedTCOs() // qproperty access functions, to be inherited & used by TCOviews //! \brief CSS theming qproperty access method -QColor trackContentObjectView::fgColor() const +QColor TrackContentObjectView::fgColor() const { return m_fgColor; } //! \brief CSS theming qproperty access method -QColor trackContentObjectView::textColor() const +QColor TrackContentObjectView::textColor() const { return m_textColor; } //! \brief CSS theming qproperty access method -void trackContentObjectView::setFgColor( const QColor & _c ) +void TrackContentObjectView::setFgColor( const QColor & _c ) { m_fgColor = QColor( _c ); } //! \brief CSS theming qproperty access method -void trackContentObjectView::setTextColor( const QColor & _c ) +void TrackContentObjectView::setTextColor( const QColor & _c ) { m_textColor = QColor( _c ); } @@ -343,7 +343,7 @@ void trackContentObjectView::setTextColor( const QColor & _c ) * * \return Boolean state of whether the QWidget was able to close. */ -bool trackContentObjectView::close() +bool TrackContentObjectView::close() { m_trackView->getTrackContentWidget()->removeTCOView( this ); return QWidget::close(); @@ -359,7 +359,7 @@ bool trackContentObjectView::close() * scheduled for later deletion rather than closed immediately. * */ -void trackContentObjectView::remove() +void TrackContentObjectView::remove() { m_trackView->getTrack()->addJournalCheckPoint(); @@ -376,7 +376,7 @@ void trackContentObjectView::remove() * Perform the 'cut' action of the clipboard - copies the track content * object to the clipboard and then removes it from the track. */ -void trackContentObjectView::cut() +void TrackContentObjectView::cut() { m_tco->copy(); remove(); @@ -392,7 +392,7 @@ void trackContentObjectView::cut() * the track content object's length in pixels adding in the border. * */ -void trackContentObjectView::updateLength() +void TrackContentObjectView::updateLength() { if( fixedTCOs() ) { @@ -418,7 +418,7 @@ void trackContentObjectView::updateLength() * view's length. * */ -void trackContentObjectView::updatePosition() +void TrackContentObjectView::updatePosition() { m_trackView->getTrackContentWidget()->changePosition(); // moving a TCO can result in change of song-length etc., @@ -436,9 +436,9 @@ void trackContentObjectView::updatePosition() * * \param _dee The QDragEnterEvent to watch. */ -void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) { - trackContentWidget * tcw = getTrackView()->getTrackContentWidget(); + TrackContentWidget * tcw = getTrackView()->getTrackContentWidget(); MidiTime tcoPos = MidiTime( m_tco->startPosition().getTact(), 0 ); if( tcw->canPasteSelection( tcoPos, _dee->mimeData() ) == false ) { @@ -463,7 +463,7 @@ void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) * * \param _de The QDropEvent to handle. */ -void trackContentObjectView::dropEvent( QDropEvent * _de ) +void TrackContentObjectView::dropEvent( QDropEvent * _de ) { QString type = StringPairDrag::decodeKey( _de ); QString value = StringPairDrag::decodeValue( _de ); @@ -477,7 +477,7 @@ void trackContentObjectView::dropEvent( QDropEvent * _de ) // Defer to rubberband paste if we're in that mode if( m_trackView->trackContainerView()->allowRubberband() == true ) { - trackContentWidget * tcw = getTrackView()->getTrackContentWidget(); + TrackContentWidget * tcw = getTrackView()->getTrackContentWidget(); MidiTime tcoPos = MidiTime( m_tco->startPosition().getTact(), 0 ); if( tcw->pasteSelection( tcoPos, _de ) == true ) { @@ -489,7 +489,7 @@ void trackContentObjectView::dropEvent( QDropEvent * _de ) // Don't allow pasting a tco into itself. QObject* qwSource = _de->source(); if( qwSource != NULL && - dynamic_cast( qwSource ) == this ) + dynamic_cast( qwSource ) == this ) { return; } @@ -511,7 +511,7 @@ void trackContentObjectView::dropEvent( QDropEvent * _de ) * * \param _e The QEvent to watch. */ -void trackContentObjectView::leaveEvent( QEvent * _e ) +void TrackContentObjectView::leaveEvent( QEvent * _e ) { while( QApplication::overrideCursor() != NULL ) { @@ -532,15 +532,15 @@ void trackContentObjectView::leaveEvent( QEvent * _e ) * * \param tcos The trackContectObjects to save in a DataFile */ -DataFile trackContentObjectView::createTCODataFiles( - const QVector & tcoViews) const +DataFile TrackContentObjectView::createTCODataFiles( + const QVector & tcoViews) const { Track * t = m_trackView->getTrack(); TrackContainer * tc = t->trackContainer(); DataFile dataFile( DataFile::DragNDropData ); QDomElement tcoParent = dataFile.createElement( "tcos" ); - typedef QVector tcoViewVector; + typedef QVector tcoViewVector; for( tcoViewVector::const_iterator it = tcoViews.begin(); it != tcoViews.end(); ++it ) { @@ -587,7 +587,7 @@ DataFile trackContentObjectView::createTCODataFiles( * * \param _me The QMouseEvent to handle. */ -void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) +void TrackContentObjectView::mousePressEvent( QMouseEvent * _me ) { setInitialMousePos( _me->pos() ); if( m_trackView->trackContainerView()->allowRubberband() == true && @@ -621,7 +621,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) _me->modifiers() & Qt::ControlModifier ) { // start drag-action - QVector tcoViews; + QVector tcoViews; tcoViews.push_back( this ); DataFile dataFile = createTCODataFiles( tcoViews ); QPixmap thumbnail = QPixmap::grabWidget( this ).scaled( @@ -714,7 +714,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) * \param _me The QMouseEvent to handle. * \todo what does the final else case do here? */ -void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) +void TrackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) { if( m_action == CopySelection ) { @@ -728,14 +728,14 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) m_action = NoAction; // Collect all selected TCOs - QVector tcoViews; + QVector tcoViews; QVector so = m_trackView->trackContainerView()->selectedObjects(); for( QVector::iterator it = so.begin(); it != so.end(); ++it ) { - trackContentObjectView * tcov = - dynamic_cast( *it ); + TrackContentObjectView * tcov = + dynamic_cast( *it ); if( tcov != NULL ) { tcoViews.push_back( tcov ); @@ -789,27 +789,27 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) const int dx = _me->x() - m_initialMousePos.x(); QVector so = m_trackView->trackContainerView()->selectedObjects(); - QVector tcos; + QVector tcos; MidiTime smallest_pos, t; // find out smallest position of all selected objects for not // moving an object before zero for( QVector::iterator it = so.begin(); it != so.end(); ++it ) { - trackContentObjectView * tcov = - dynamic_cast( *it ); + TrackContentObjectView * tcov = + dynamic_cast( *it ); if( tcov == NULL ) { continue; } - trackContentObject * tco = tcov->m_tco; + TrackContentObject * tco = tcov->m_tco; tcos.push_back( tco ); smallest_pos = qMin( smallest_pos, (int)tco->startPosition() + static_cast( dx * MidiTime::ticksPerTact() / ppt ) ); } - for( QVector::iterator it = tcos.begin(); + for( QVector::iterator it = tcos.begin(); it != tcos.end(); ++it ) { t = ( *it )->startPosition() + @@ -877,7 +877,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) * * \param _me The QMouseEvent to handle. */ -void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me ) +void TrackContentObjectView::mouseReleaseEvent( QMouseEvent * _me ) { // If the CopySelection was chosen as the action due to mouse movement, // it will have been cleared. At this point Toggle is the desired action. @@ -911,7 +911,7 @@ void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me ) * * \param _cme The QContextMenuEvent to add the actions to. */ -void trackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme ) +void TrackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme ) { if( _cme->modifiers() ) { @@ -949,7 +949,7 @@ void trackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme ) * * \return the number of pixels per tact (bar). */ -float trackContentObjectView::pixelsPerTact() +float TrackContentObjectView::pixelsPerTact() { return m_trackView->trackContainerView()->pixelsPerTact(); } @@ -962,7 +962,7 @@ float trackContentObjectView::pixelsPerTact() * \param _e The boolean state of whether this track content object view * is allowed to resize. */ -void trackContentObjectView::setAutoResizeEnabled( bool _e ) +void TrackContentObjectView::setAutoResizeEnabled( bool _e ) { m_autoResize = _e; } @@ -975,7 +975,7 @@ void trackContentObjectView::setAutoResizeEnabled( bool _e ) * \param _me The QMouseEvent. * \param distance The threshold distance that the mouse has moved to return true. */ -bool trackContentObjectView::mouseMovedDistance( QMouseEvent * _me, int distance ) +bool TrackContentObjectView::mouseMovedDistance( QMouseEvent * _me, int distance ) { QPoint dPos = mapToGlobal( _me->pos() ) - m_initialMouseGlobalPos; const int pixelsMoved = dPos.manhattanLength(); @@ -996,7 +996,7 @@ bool trackContentObjectView::mouseMovedDistance( QMouseEvent * _me, int distance * * \param _track The parent track. */ -trackContentWidget::trackContentWidget( trackView * _parent ) : +TrackContentWidget::TrackContentWidget( TrackView * _parent ) : QWidget( _parent ), m_trackView( _parent ) { @@ -1018,14 +1018,14 @@ trackContentWidget::trackContentWidget( trackView * _parent ) : * * Destroys the trackContentWidget. */ -trackContentWidget::~trackContentWidget() +TrackContentWidget::~TrackContentWidget() { } -void trackContentWidget::updateBackground() +void TrackContentWidget::updateBackground() { const int tactsPerBar = 4; const TrackContainerView * tcv = m_trackView->trackContainerView(); @@ -1074,9 +1074,9 @@ void trackContentWidget::updateBackground() * * \param _tcov The trackContentObjectView to add. */ -void trackContentWidget::addTCOView( trackContentObjectView * _tcov ) +void TrackContentWidget::addTCOView( TrackContentObjectView * _tcov ) { - trackContentObject * tco = _tcov->getTrackContentObject(); + TrackContentObject * tco = _tcov->getTrackContentObject(); m_tcoViews.push_back( _tcov ); @@ -1094,7 +1094,7 @@ void trackContentWidget::addTCOView( trackContentObjectView * _tcov ) * * \param _tcov The trackContentObjectView to add. */ -void trackContentWidget::removeTCOView( trackContentObjectView * _tcov ) +void TrackContentWidget::removeTCOView( TrackContentObjectView * _tcov ) { tcoViewVector::iterator it = qFind( m_tcoViews.begin(), m_tcoViews.end(), @@ -1112,7 +1112,7 @@ void trackContentWidget::removeTCOView( trackContentObjectView * _tcov ) /*! \brief Update ourselves by updating all the tCOViews attached. * */ -void trackContentWidget::update() +void TrackContentWidget::update() { for( tcoViewVector::iterator it = m_tcoViews.begin(); it != m_tcoViews.end(); ++it ) @@ -1132,7 +1132,7 @@ void trackContentWidget::update() * * \param _new_pos The MIDI time to move to. */ -void trackContentWidget::changePosition( const MidiTime & _new_pos ) +void TrackContentWidget::changePosition( const MidiTime & _new_pos ) { if( m_trackView->trackContainerView() == Engine::getBBEditor() ) { @@ -1183,8 +1183,8 @@ void trackContentWidget::changePosition( const MidiTime & _new_pos ) for( tcoViewVector::iterator it = m_tcoViews.begin(); it != m_tcoViews.end(); ++it ) { - trackContentObjectView * tcov = *it; - trackContentObject * tco = tcov->getTrackContentObject(); + TrackContentObjectView * tcov = *it; + TrackContentObject * tco = tcov->getTrackContentObject(); tco->changeLength( tco->length() ); @@ -1220,7 +1220,7 @@ void trackContentWidget::changePosition( const MidiTime & _new_pos ) * * \param _mouse_x the mouse's current X position in pixels. */ -MidiTime trackContentWidget::getPosition( int _mouse_x ) +MidiTime TrackContentWidget::getPosition( int _mouse_x ) { TrackContainerView * tv = m_trackView->trackContainerView(); return MidiTime( tv->currentPosition() + @@ -1236,7 +1236,7 @@ MidiTime trackContentWidget::getPosition( int _mouse_x ) * * \param _dee the Drag Enter Event to respond to */ -void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) { MidiTime tcoPos = MidiTime( getPosition( _dee->pos().x() ).getTact(), 0 ); if( canPasteSelection( tcoPos, _dee->mimeData() ) == false ) @@ -1258,7 +1258,7 @@ void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) * \param tcoPos the position of the TCO slot being pasted on * \param _de the DropEvent generated */ -bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData ) +bool TrackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData ) { Track * t = getTrack(); QString type = StringPairDrag::decodeMimeKey( mimeData ); @@ -1328,7 +1328,7 @@ bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * m * \param tcoPos the position of the TCO slot being pasted on * \param _de the DropEvent generated */ -bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) +bool TrackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) { if( canPasteSelection( tcoPos, _de->mimeData() ) == false ) { @@ -1393,7 +1393,7 @@ bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) MidiTime delta = offset + ( oldTact - grabbedTCOTact ); MidiTime pos = tcoPos + delta; - trackContentObject * tco = t->createTCO( pos ); + TrackContentObject * tco = t->createTCO( pos ); tco->restoreState( tcoElement ); tco->movePosition( pos ); if( allowRubberband == true ) @@ -1412,7 +1412,7 @@ bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) * * \param _de the Drop Event to respond to */ -void trackContentWidget::dropEvent( QDropEvent * _de ) +void TrackContentWidget::dropEvent( QDropEvent * _de ) { MidiTime tcoPos = MidiTime( getPosition( _de->pos().x() ).getTact(), 0 ); if( pasteSelection( tcoPos, _de ) == true ) @@ -1428,7 +1428,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de ) * * \param _me the mouse press event to respond to */ -void trackContentWidget::mousePressEvent( QMouseEvent * _me ) +void TrackContentWidget::mousePressEvent( QMouseEvent * _me ) { if( m_trackView->trackContainerView()->allowRubberband() == true ) { @@ -1443,7 +1443,7 @@ void trackContentWidget::mousePressEvent( QMouseEvent * _me ) { const MidiTime pos = getPosition( _me->x() ).getTact() * MidiTime::ticksPerTact(); - trackContentObject * tco = getTrack()->createTCO( pos ); + TrackContentObject * tco = getTrack()->createTCO( pos ); tco->saveJournallingState( false ); tco->movePosition( pos ); @@ -1459,7 +1459,7 @@ void trackContentWidget::mousePressEvent( QMouseEvent * _me ) * * \param _pe the Paint Event to respond to */ -void trackContentWidget::paintEvent( QPaintEvent * _pe ) +void TrackContentWidget::paintEvent( QPaintEvent * _pe ) { // Assume even-pixels-per-tact. Makes sense, should be like this anyways const TrackContainerView * tcv = m_trackView->trackContainerView(); @@ -1480,7 +1480,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) * * \param resizeEvent the resize event to pass to base class */ -void trackContentWidget::resizeEvent( QResizeEvent * resizeEvent ) +void TrackContentWidget::resizeEvent( QResizeEvent * resizeEvent ) { // Update backgroud updateBackground(); @@ -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(); } @@ -1506,7 +1506,7 @@ Track * trackContentWidget::getTrack() * * \param _pos_start the starting position of the Widget (from getPosition()) */ -MidiTime trackContentWidget::endPosition( const MidiTime & _pos_start ) +MidiTime TrackContentWidget::endPosition( const MidiTime & _pos_start ) { const float ppt = m_trackView->trackContainerView()->pixelsPerTact(); const int w = width(); @@ -1518,19 +1518,19 @@ MidiTime trackContentWidget::endPosition( const MidiTime & _pos_start ) // qproperty access methods //! \brief CSS theming qproperty access method -QBrush trackContentWidget::darkerColor() const +QBrush TrackContentWidget::darkerColor() const { return m_darkerColor; } //! \brief CSS theming qproperty access method -QBrush trackContentWidget::lighterColor() const +QBrush TrackContentWidget::lighterColor() const { return m_lighterColor; } //! \brief CSS theming qproperty access method -void trackContentWidget::setDarkerColor( const QBrush & c ) +void TrackContentWidget::setDarkerColor( const QBrush & c ) { m_darkerColor = c; } //! \brief CSS theming qproperty access method -void trackContentWidget::setLighterColor( const QBrush & c ) +void TrackContentWidget::setLighterColor( const QBrush & c ) { m_lighterColor = c; } @@ -1540,7 +1540,7 @@ void trackContentWidget::setLighterColor( const QBrush & c ) // =========================================================================== -QPixmap * trackOperationsWidget::s_grip = NULL; /*!< grip pixmap */ +QPixmap * TrackOperationsWidget::s_grip = NULL; /*!< grip pixmap */ /*! \brief Create a new trackOperationsWidget @@ -1549,7 +1549,7 @@ QPixmap * trackOperationsWidget::s_grip = NULL; /*!< grip pixmap */ * * \param _parent the trackView to contain this widget */ -trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : +TrackOperationsWidget::TrackOperationsWidget( TrackView * _parent ) : QWidget( _parent ), /*!< The parent widget */ m_trackView( _parent ) /*!< The parent track view */ { @@ -1605,9 +1605,9 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : m_soloBtn->show(); ToolTip::add( m_soloBtn, tr( "Solo" ) ); - connect( this, SIGNAL( trackRemovalScheduled( trackView * ) ), + connect( this, SIGNAL( trackRemovalScheduled( TrackView * ) ), m_trackView->trackContainerView(), - SLOT( deleteTrackView( trackView * ) ), + SLOT( deleteTrackView( TrackView * ) ), Qt::QueuedConnection ); } @@ -1617,7 +1617,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : /*! \brief Destroy an existing trackOperationsWidget * */ -trackOperationsWidget::~trackOperationsWidget() +TrackOperationsWidget::~TrackOperationsWidget() { } @@ -1634,7 +1634,7 @@ trackOperationsWidget::~trackOperationsWidget() * * \param _me The mouse event to respond to. */ -void trackOperationsWidget::mousePressEvent( QMouseEvent * _me ) +void TrackOperationsWidget::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton && _me->modifiers() & Qt::ControlModifier && @@ -1670,7 +1670,7 @@ void trackOperationsWidget::mousePressEvent( QMouseEvent * _me ) * \todo Flesh this out a bit - is it correct? * \param _pe The paint event to respond to */ -void trackOperationsWidget::paintEvent( QPaintEvent * _pe ) +void TrackOperationsWidget::paintEvent( QPaintEvent * _pe ) { QPainter p( this ); p.fillRect( rect(), palette().brush(QPalette::Background) ); @@ -1695,14 +1695,14 @@ void trackOperationsWidget::paintEvent( QPaintEvent * _pe ) /*! \brief Clone this track * */ -void trackOperationsWidget::cloneTrack() +void TrackOperationsWidget::cloneTrack() { m_trackView->getTrack()->clone(); } /*! \brief Clear this track - clears all TCOs from the track */ -void trackOperationsWidget::clearTrack() +void TrackOperationsWidget::clearTrack() { Track * t = m_trackView->getTrack(); t->lock(); @@ -1715,7 +1715,7 @@ void trackOperationsWidget::clearTrack() /*! \brief Remove this track from the track list * */ -void trackOperationsWidget::removeTrack() +void TrackOperationsWidget::removeTrack() { emit trackRemovalScheduled( m_trackView ); } @@ -1731,7 +1731,7 @@ void trackOperationsWidget::removeTrack() * on all TCOs (same should be added for sample tracks when * sampletrack recording is implemented) */ -void trackOperationsWidget::updateMenu() +void TrackOperationsWidget::updateMenu() { QMenu * to_menu = m_trackOps->menu(); to_menu->clear(); @@ -1761,7 +1761,7 @@ void trackOperationsWidget::updateMenu() } -void trackOperationsWidget::recordingOn() +void TrackOperationsWidget::recordingOn() { AutomationTrackView * atv = dynamic_cast( m_trackView ); if( atv ) @@ -1777,7 +1777,7 @@ void trackOperationsWidget::recordingOn() } -void trackOperationsWidget::recordingOff() +void TrackOperationsWidget::recordingOff() { AutomationTrackView * atv = dynamic_cast( m_trackView ); if( atv ) @@ -1831,7 +1831,7 @@ Track::Track( TrackTypes _type, TrackContainer * _tc ) : * If the track container is a Beat+Bassline container, step through * its list of tracks and remove us. * - * Then delete the trackContentObject's contents, remove this track from + * Then delete the TrackContentObject's contents, remove this track from * the track container. * * Finally step through this track's automation and forget all of them. @@ -1865,7 +1865,7 @@ Track * Track::create( TrackTypes _tt, TrackContainer * _tc ) switch( _tt ) { case InstrumentTrack: t = new ::InstrumentTrack( _tc ); break; - case BBTrack: t = new bbTrack( _tc ); break; + case BBTrack: t = new ::BBTrack( _tc ); break; case SampleTrack: t = new ::SampleTrack( _tc ); break; // case EVENT_TRACK: // case VIDEO_TRACK: @@ -1971,7 +1971,7 @@ void Track::saveSettings( QDomDocument & _doc, QDomElement & _this ) /*! \brief Load the settings from a file * * We load the track's type and muted state and solo state, then clear out our - * current trackContentObject. + * current TrackContentObject. * * Then we step through the QDomElement's children and load the * track-specific settings and trackContentObjects states from it @@ -2028,7 +2028,7 @@ void Track::loadSettings( const QDomElement & _this ) else if( !node.toElement().attribute( "metadata" ).toInt() ) { - trackContentObject * tco = createTCO( + TrackContentObject * tco = createTCO( MidiTime( 0 ) ); tco->restoreState( node.toElement() ); saveJournallingState( false ); @@ -2048,11 +2048,11 @@ void Track::loadSettings( const QDomElement & _this ) -/*! \brief Add another trackContentObject into this track +/*! \brief Add another TrackContentObject into this track * - * \param _tco The trackContentObject to attach to this track. + * \param _tco The TrackContentObject to attach to this track. */ -trackContentObject * Track::addTCO( trackContentObject * _tco ) +TrackContentObject * Track::addTCO( TrackContentObject * _tco ) { m_trackContentObjects.push_back( _tco ); @@ -2064,11 +2064,11 @@ trackContentObject * Track::addTCO( trackContentObject * _tco ) -/*! \brief Remove a given trackContentObject from this track +/*! \brief Remove a given TrackContentObject from this track * - * \param _tco The trackContentObject to remove from this track. + * \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(), @@ -2107,19 +2107,19 @@ int Track::numOfTCOs() -/*! \brief Get a trackContentObject by number +/*! \brief Get a TrackContentObject by number * * If the TCO number is less than our TCO array size then fetch that * numbered object from the array. Otherwise we warn the user that * we've somehow requested a TCO that is too large, and create a new * TCO for them. - * \param _tco_number The number of the trackContentObject to fetch. - * \return the given trackContentObject or a new one if out of range. + * \param _tco_number The number of the TrackContentObject to fetch. + * \return the given TrackContentObject or a new one if out of range. * \todo reject TCO numbers less than zero. * \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() ) { @@ -2134,12 +2134,12 @@ trackContentObject * Track::getTCO( int _tco_num ) -/*! \brief Determine the given trackContentObject's number in our array. +/*! \brief Determine the given TrackContentObject's number in our array. * - * \param _tco The trackContentObject to search for. + * \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(), @@ -2179,7 +2179,7 @@ void Track::getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start, for( tcoVector::iterator it_o = m_trackContentObjects.begin(); it_o != m_trackContentObjects.end(); ++it_o ) { - trackContentObject * tco = ( *it_o ); + TrackContentObject * tco = ( *it_o ); int s = tco->startPosition(); int e = tco->endPosition(); if( ( s <= _end ) && ( e >= _start ) ) @@ -2215,8 +2215,8 @@ void Track::getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start, * First, we arrange to swap the positions of the two TCOs in the * trackContentObjects list. Then we swap their start times as well. * - * \param _tco_num1 The first trackContentObject to swap. - * \param _tco_num2 The second trackContentObject to swap. + * \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 ) { @@ -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 */ @@ -2404,8 +2404,8 @@ trackView::trackView( Track * _track, TrackContainerView * _tcv ) : connect( m_track, SIGNAL( destroyedTrack() ), this, SLOT( close() ) ); connect( m_track, - SIGNAL( trackContentObjectAdded( trackContentObject * ) ), - this, SLOT( createTCOView( trackContentObject * ) ), + SIGNAL( trackContentObjectAdded( TrackContentObject * ) ), + this, SLOT( createTCOView( TrackContentObject * ) ), Qt::QueuedConnection ); connect( &m_track->m_mutedModel, SIGNAL( dataChanged() ), @@ -2430,7 +2430,7 @@ trackView::trackView( Track * _track, TrackContainerView * _tcv ) : /*! \brief Destroy this track View. * */ -trackView::~trackView() +TrackView::~TrackView() { } @@ -2441,7 +2441,7 @@ trackView::~trackView() * * \param _re the Resize Event to handle. */ -void trackView::resizeEvent( QResizeEvent * _re ) +void TrackView::resizeEvent( QResizeEvent * _re ) { if( ConfigManager::inst()->value( "ui", "compacttrackbuttons" ).toInt() ) @@ -2463,7 +2463,7 @@ void trackView::resizeEvent( QResizeEvent * _re ) /*! \brief Update this track View and all its content objects. * */ -void trackView::update() +void TrackView::update() { m_trackContentWidget.update(); if( !m_trackContainerView->fixedTCOs() ) @@ -2479,7 +2479,7 @@ void trackView::update() /*! \brief Close this track View. * */ -bool trackView::close() +bool TrackView::close() { m_trackContainerView->removeTrackView( this ); return QWidget::close(); @@ -2491,7 +2491,7 @@ bool trackView::close() /*! \brief Register that the model of this track View has changed. * */ -void trackView::modelChanged() +void TrackView::modelChanged() { m_track = castModel(); assert( m_track != NULL ); @@ -2509,7 +2509,7 @@ void trackView::modelChanged() * * \param _dee the DragEnterEvent to start. */ -void trackView::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackView::dragEnterEvent( QDragEnterEvent * _dee ) { StringPairDrag::processDragEnterEvent( _dee, "track_" + QString::number( m_track->type() ) ); @@ -2526,7 +2526,7 @@ void trackView::dragEnterEvent( QDragEnterEvent * _dee ) * * \param _de the DropEvent to handle. */ -void trackView::dropEvent( QDropEvent * _de ) +void TrackView::dropEvent( QDropEvent * _de ) { QString type = StringPairDrag::decodeKey( _de ); QString value = StringPairDrag::decodeValue( _de ); @@ -2558,7 +2558,7 @@ void trackView::dropEvent( QDropEvent * _de ) * * \param _me the MouseEvent to handle. */ -void trackView::mousePressEvent( QMouseEvent * _me ) +void TrackView::mousePressEvent( QMouseEvent * _me ) { // If previously dragged too small, restore on shift-leftclick if( height() < DEFAULT_TRACK_HEIGHT && @@ -2622,7 +2622,7 @@ void trackView::mousePressEvent( QMouseEvent * _me ) * * \param _me the MouseEvent to handle. */ -void trackView::mouseMoveEvent( QMouseEvent * _me ) +void TrackView::mouseMoveEvent( QMouseEvent * _me ) { if( m_trackContainerView->allowRubberband() == true ) @@ -2633,7 +2633,7 @@ void trackView::mouseMoveEvent( QMouseEvent * _me ) { // look which track-widget the mouse-cursor is over const int y_pos = m_trackContainerView->contentWidget()->mapFromGlobal( _me->globalPos() ).y(); - const trackView * track_at_y = m_trackContainerView->trackViewAt( y_pos ); + const TrackView * track_at_y = m_trackContainerView->trackViewAt( y_pos ); // debug code // qDebug( "y position %d", y_pos ); @@ -2671,7 +2671,7 @@ void trackView::mouseMoveEvent( QMouseEvent * _me ) * * \param _me the MouseEvent to handle. */ -void trackView::mouseReleaseEvent( QMouseEvent * _me ) +void TrackView::mouseReleaseEvent( QMouseEvent * _me ) { m_action = NoAction; while( QApplication::overrideCursor() != NULL ) @@ -2690,7 +2690,7 @@ void trackView::mouseReleaseEvent( QMouseEvent * _me ) * * \param _pe the PaintEvent to start. */ -void trackView::paintEvent( QPaintEvent * _pe ) +void TrackView::paintEvent( QPaintEvent * _pe ) { QStyleOption opt; opt.initFrom( this ); @@ -2701,14 +2701,14 @@ void trackView::paintEvent( QPaintEvent * _pe ) -/*! \brief Create a trackContentObject View in this track View. +/*! \brief Create a TrackContentObject View in this track View. * - * \param _tco the trackContentObject to create the view for. + * \param _tco the TrackContentObject to create the view for. * \todo is this a good description for what this method does? */ -void trackView::createTCOView( trackContentObject * _tco ) +void TrackView::createTCOView( TrackContentObject * _tco ) { - trackContentObjectView * tv = _tco->createView( this ); + TrackContentObjectView * tv = _tco->createView( this ); if( _tco->getSelectViewOnCreate() == true ) { tv->setSelected( true ); diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index 0760e1242..17fbb559f 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -41,8 +41,8 @@ QPixmap * AutomationPatternView::s_pat_rec = NULL; AutomationPatternView::AutomationPatternView( AutomationPattern * _pattern, - trackView * _parent ) : - trackContentObjectView( _pattern, _parent ), + TrackView * _parent ) : + TrackContentObjectView( _pattern, _parent ), m_pat( _pattern ), m_paintPixmap(), m_needsUpdate( true ) @@ -82,7 +82,7 @@ void AutomationPatternView::update() { m_pat->changeLength( m_pat->length() ); } - trackContentObjectView::update(); + TrackContentObjectView::update(); } @@ -364,7 +364,7 @@ void AutomationPatternView::dragEnterEvent( QDragEnterEvent * _dee ) StringPairDrag::processDragEnterEvent( _dee, "automatable_model" ); if( !_dee->isAccepted() ) { - trackContentObjectView::dragEnterEvent( _dee ); + TrackContentObjectView::dragEnterEvent( _dee ); } } @@ -394,7 +394,7 @@ void AutomationPatternView::dropEvent( QDropEvent * _de ) } else { - trackContentObjectView::dropEvent( _de ); + TrackContentObjectView::dropEvent( _de ); } } diff --git a/src/gui/BBEditor.cpp b/src/gui/BBEditor.cpp index 1115a2614..d57da6441 100644 --- a/src/gui/BBEditor.cpp +++ b/src/gui/BBEditor.cpp @@ -183,7 +183,7 @@ void BBEditor::dropEvent( QDropEvent * de ) void BBEditor::removeBBView( int _bb ) { - foreach( trackView* view, trackViews() ) + foreach( TrackView* view, trackViews() ) { view->getTrackContentWidget()->removeTCOView( _bb ); } diff --git a/src/gui/ExportProjectDialog.cpp b/src/gui/ExportProjectDialog.cpp index 9d95c1b73..2133729fb 100644 --- a/src/gui/ExportProjectDialog.cpp +++ b/src/gui/ExportProjectDialog.cpp @@ -31,7 +31,7 @@ #include "Engine.h" #include "MainWindow.h" #include "BBTrackContainer.h" -#include "bb_track.h" +#include "BBTrack.h" ExportProjectDialog::ExportProjectDialog( const QString & _file_name, diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index 4f78aad78..94c72d278 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -33,7 +33,7 @@ #include "TrackContainerView.h" #include "TrackContainer.h" -#include "bb_track.h" +#include "BBTrack.h" #include "MainWindow.h" #include "debug.h" #include "FileBrowser.h" @@ -120,7 +120,7 @@ void TrackContainerView::loadSettings( const QDomElement & _this ) -trackView * TrackContainerView::addTrackView( trackView * _tv ) +TrackView * TrackContainerView::addTrackView( TrackView * _tv ) { m_trackViews.push_back( _tv ); m_scrollLayout->addWidget( _tv ); @@ -134,7 +134,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 ) @@ -155,14 +155,14 @@ void TrackContainerView::removeTrackView( trackView * _tv ) -void TrackContainerView::moveTrackViewUp( trackView * _tv ) +void TrackContainerView::moveTrackViewUp( TrackView * _tv ) { for( int i = 1; i < m_trackViews.size(); ++i ) { - trackView * t = m_trackViews[i]; + TrackView * t = m_trackViews[i]; if( t == _tv ) { - bbTrack::swapBBTracks( t->getTrack(), + BBTrack::swapBBTracks( t->getTrack(), m_trackViews[i - 1]->getTrack() ); m_scrollLayout->removeWidget( t ); m_scrollLayout->insertWidget( i - 1, t ); @@ -177,14 +177,14 @@ 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 ) { - trackView * t = m_trackViews[i]; + TrackView * t = m_trackViews[i]; if( t == _tv ) { - bbTrack::swapBBTracks( t->getTrack(), + BBTrack::swapBBTracks( t->getTrack(), m_trackViews[i + 1]->getTrack() ); m_scrollLayout->removeWidget( t ); m_scrollLayout->insertWidget( i + 1, t ); @@ -228,7 +228,7 @@ void TrackContainerView::createTrackView( Track * _t ) -void TrackContainerView::deleteTrackView( trackView * _tv ) +void TrackContainerView::deleteTrackView( TrackView * _tv ) { //m_tc->addJournalCheckPoint(); @@ -242,7 +242,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->verticalScrollBar()->value(); int y_cnt = 0; @@ -293,7 +293,7 @@ void TrackContainerView::clearAllTracks() { while( !m_trackViews.empty() ) { - trackView * tv = m_trackViews.takeLast(); + TrackView * tv = m_trackViews.takeLast(); Track * t = tv->getTrack(); delete tv; delete t; diff --git a/src/gui/widgets/TrackLabelButton.cpp b/src/gui/widgets/TrackLabelButton.cpp index 5f3e359ba..150300564 100644 --- a/src/gui/widgets/TrackLabelButton.cpp +++ b/src/gui/widgets/TrackLabelButton.cpp @@ -38,7 +38,7 @@ -TrackLabelButton::TrackLabelButton( trackView * _tv, QWidget * _parent ) : +TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : QToolButton( _parent ), m_trackView( _tv ), m_iconName() diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index b05f3fe69..baf3f1ec7 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -61,7 +61,7 @@ bool AutomationTrack::play( const MidiTime & _start, const fpp_t _frames, tcoVector tcos; if( _tco_num >= 0 ) { - trackContentObject * tco = getTCO( _tco_num ); + TrackContentObject * tco = getTCO( _tco_num ); tcos.push_back( tco ); } else @@ -90,7 +90,7 @@ 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 ); } @@ -98,7 +98,7 @@ trackView * AutomationTrack::createView( TrackContainerView* tcv ) -trackContentObject * AutomationTrack::createTCO( const MidiTime & ) +TrackContentObject * AutomationTrack::createTCO( const MidiTime & ) { return new AutomationPattern( this ); } @@ -128,7 +128,7 @@ void AutomationTrack::loadTrackSpecificSettings( const QDomElement & _this ) AutomationTrackView::AutomationTrackView( AutomationTrack * _at, TrackContainerView* tcv ) : - trackView( _at, tcv ) + TrackView( _at, tcv ) { setFixedHeight( 32 ); TrackLabelButton * tlb = new TrackLabelButton( this, @@ -181,7 +181,7 @@ void AutomationTrackView::dropEvent( QDropEvent * _de ) pos.setTicks( 0 ); } - trackContentObject * tco = getTrack()->createTCO( pos ); + TrackContentObject * tco = getTrack()->createTCO( pos ); AutomationPattern * pat = dynamic_cast( tco ); pat->addObject( mod ); pat->movePosition( pos ); diff --git a/src/tracks/bb_track.cpp b/src/tracks/BBTrack.cpp similarity index 82% rename from src/tracks/bb_track.cpp rename to src/tracks/BBTrack.cpp index 2d4903c50..5a76d56a0 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/BBTrack.cpp @@ -1,5 +1,5 @@ /* - * bb_track.cpp - implementation of class bbTrack and bbTCO + * BBTrack.cpp - implementation of class BBTrack and bbTCO * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -28,7 +28,7 @@ #include #include "BBEditor.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "embed.h" #include "Engine.h" @@ -43,11 +43,11 @@ -bbTrack::infoMap bbTrack::s_infoMap; +BBTrack::infoMap BBTrack::s_infoMap; -bbTCO::bbTCO( Track * _track ) : - trackContentObject( _track ), +BBTCO::BBTCO( Track * _track ) : + TrackContentObject( _track ), m_color( 128, 128, 128 ), m_useStyleColor( true ) { @@ -63,14 +63,14 @@ bbTCO::bbTCO( Track * _track ) : -bbTCO::~bbTCO() +BBTCO::~BBTCO() { } -void bbTCO::saveSettings( QDomDocument & doc, QDomElement & element ) +void BBTCO::saveSettings( QDomDocument & doc, QDomElement & element ) { element.setAttribute( "name", name() ); if( element.parentNode().nodeName() == "clipboard" ) @@ -98,7 +98,7 @@ void bbTCO::saveSettings( QDomDocument & doc, QDomElement & element ) -void bbTCO::loadSettings( const QDomElement & element ) +void BBTCO::loadSettings( const QDomElement & element ) { setName( element.attribute( "name" ) ); if( element.attribute( "pos" ).toInt() >= 0 ) @@ -142,16 +142,16 @@ void bbTCO::loadSettings( const QDomElement & element ) -int bbTCO::bbTrackIndex() +int BBTCO::bbTrackIndex() { - return dynamic_cast( getTrack() )->index(); + return dynamic_cast( getTrack() )->index(); } -trackContentObjectView * bbTCO::createView( trackView * _tv ) +TrackContentObjectView * BBTCO::createView( TrackView * _tv ) { - return new bbTCOView( this, _tv ); + return new BBTCOView( this, _tv ); } @@ -163,23 +163,23 @@ trackContentObjectView * bbTCO::createView( trackView * _tv ) -bbTCOView::bbTCOView( trackContentObject * _tco, trackView * _tv ) : - trackContentObjectView( _tco, _tv ), - m_bbTCO( dynamic_cast( _tco ) ) +BBTCOView::BBTCOView( TrackContentObject * _tco, TrackView * _tv ) : + TrackContentObjectView( _tco, _tv ), + m_bbTCO( dynamic_cast( _tco ) ) { } -bbTCOView::~bbTCOView() +BBTCOView::~BBTCOView() { } -void bbTCOView::constructContextMenu( QMenu * _cm ) +void BBTCOView::constructContextMenu( QMenu * _cm ) { QAction * a = new QAction( embed::getIconPixmap( "bb_track" ), tr( "Open in Beat+Bassline-Editor" ), @@ -203,7 +203,7 @@ void bbTCOView::constructContextMenu( QMenu * _cm ) -void bbTCOView::mouseDoubleClickEvent( QMouseEvent * ) +void BBTCOView::mouseDoubleClickEvent( QMouseEvent * ) { openInBBEditor(); } @@ -211,7 +211,7 @@ void bbTCOView::mouseDoubleClickEvent( QMouseEvent * ) -void bbTCOView::paintEvent( QPaintEvent * ) +void BBTCOView::paintEvent( QPaintEvent * ) { QPainter p( this ); @@ -271,7 +271,7 @@ void bbTCOView::paintEvent( QPaintEvent * ) -void bbTCOView::openInBBEditor() +void BBTCOView::openInBBEditor() { Engine::getBBTrackContainer()->setCurrentBB( m_bbTCO->bbTrackIndex() ); @@ -281,7 +281,7 @@ void bbTCOView::openInBBEditor() -void bbTCOView::resetName() +void BBTCOView::resetName() { m_bbTCO->setName( m_bbTCO->getTrack()->name() ); } @@ -289,7 +289,7 @@ void bbTCOView::resetName() -void bbTCOView::changeName() +void BBTCOView::changeName() { QString s = m_bbTCO->name(); RenameDialog rename_dlg( s ); @@ -300,7 +300,7 @@ void bbTCOView::changeName() -void bbTCOView::changeColor() +void BBTCOView::changeColor() { QColor new_color = QColorDialog::getColor( m_bbTCO->m_color ); if( ! new_color.isValid() ) @@ -315,7 +315,7 @@ void bbTCOView::changeColor() selected.begin(); it != selected.end(); ++it ) { - bbTCOView * bb_tcov = dynamic_cast( *it ); + BBTCOView * bb_tcov = dynamic_cast( *it ); if( bb_tcov ) { bb_tcov->setColor( new_color ); @@ -330,7 +330,7 @@ void bbTCOView::changeColor() /** \brief Makes the BB pattern use the colour defined in the stylesheet */ -void bbTCOView::resetColor() +void BBTCOView::resetColor() { if( ! m_bbTCO->m_useStyleColor ) { @@ -338,12 +338,12 @@ void bbTCOView::resetColor() Engine::getSong()->setModified(); update(); } - bbTrack::clearLastTCOColor(); + BBTrack::clearLastTCOColor(); } -void bbTCOView::setColor( QColor new_color ) +void BBTCOView::setColor( QColor new_color ) { if( new_color.rgb() != m_bbTCO->color() ) { @@ -352,17 +352,17 @@ void bbTCOView::setColor( QColor new_color ) Engine::getSong()->setModified(); update(); } - bbTrack::setLastTCOColor( new_color ); + BBTrack::setLastTCOColor( new_color ); } -QColor * bbTrack::s_lastTCOColor = NULL; +QColor * BBTrack::s_lastTCOColor = NULL; -bbTrack::bbTrack( TrackContainer* tc ) : - Track( BBTrack, tc ) +BBTrack::BBTrack( TrackContainer* tc ) : + Track( Track::BBTrack, tc ) { int bbNum = s_infoMap.size(); s_infoMap[this] = bbNum; @@ -378,7 +378,7 @@ bbTrack::bbTrack( TrackContainer* tc ) : -bbTrack::~bbTrack() +BBTrack::~BBTrack() { Engine::mixer()->removePlayHandles( this ); @@ -404,7 +404,7 @@ bbTrack::~bbTrack() // play _frames frames of given TCO within starting with _start -bool bbTrack::play( const MidiTime & _start, const fpp_t _frames, +bool BBTrack::play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _offset, int _tco_num ) { if( isMuted() ) @@ -447,17 +447,17 @@ 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 ); } -trackContentObject * bbTrack::createTCO( const MidiTime & _pos ) +TrackContentObject * BBTrack::createTCO( const MidiTime & _pos ) { - bbTCO * bbtco = new bbTCO( this ); + BBTCO * bbtco = new BBTCO( this ); if( s_lastTCOColor ) { bbtco->setColor( *s_lastTCOColor ); @@ -469,7 +469,7 @@ trackContentObject * bbTrack::createTCO( const MidiTime & _pos ) -void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc, +void BBTrack::saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _this ) { // _this.setAttribute( "icon", m_trackLabel->pixmapFile() ); @@ -491,7 +491,7 @@ void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc, -void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) +void BBTrack::loadTrackSpecificSettings( const QDomElement & _this ) { /* if( _this.attribute( "icon" ) != "" ) { @@ -526,7 +526,7 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) restoreState( node.toElement() ); } } -/* doesn't work yet because bbTrack-ctor also sets current bb so if +/* doesn't work yet because BBTrack-ctor also sets current bb so if bb-tracks are created after this function is called, this doesn't help at all.... if( _this.attribute( "current" ).toInt() ) @@ -538,8 +538,8 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) -// return pointer to bbTrack specified by _bb_num -bbTrack * bbTrack::findBBTrack( int _bb_num ) +// return pointer to BBTrack specified by _bb_num +BBTrack * BBTrack::findBBTrack( int _bb_num ) { for( infoMap::iterator it = s_infoMap.begin(); it != s_infoMap.end(); ++it ) @@ -555,10 +555,10 @@ bbTrack * bbTrack::findBBTrack( int _bb_num ) -void bbTrack::swapBBTracks( Track * _track1, Track * _track2 ) +void BBTrack::swapBBTracks( Track * _track1, Track * _track2 ) { - bbTrack * t1 = dynamic_cast( _track1 ); - bbTrack * t2 = dynamic_cast( _track2 ); + BBTrack * t1 = dynamic_cast( _track1 ); + BBTrack * t2 = dynamic_cast( _track2 ); if( t1 != NULL && t2 != NULL ) { qSwap( s_infoMap[t1], s_infoMap[t2] ); @@ -576,8 +576,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 ); @@ -597,24 +597,24 @@ bbTrackView::bbTrackView( bbTrack * _bbt, TrackContainerView* tcv ) : -bbTrackView::~bbTrackView() +BBTrackView::~BBTrackView() { - Engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); + Engine::getBBEditor()->removeBBView( BBTrack::s_infoMap[m_bbTrack] ); } -bool bbTrackView::close() +bool BBTrackView::close() { - Engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); - return trackView::close(); + Engine::getBBEditor()->removeBBView( BBTrack::s_infoMap[m_bbTrack] ); + return TrackView::close(); } -void bbTrackView::clickedTrackLabel() +void BBTrackView::clickedTrackLabel() { Engine::getBBTrackContainer()->setCurrentBB( m_bbTrack->index() ); Engine::getBBEditor()->show(); diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 17ac527f5..4e16bcae0 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -41,7 +41,7 @@ #include "InstrumentTrack.h" #include "AudioPort.h" #include "AutomationPattern.h" -#include "bb_track.h" +#include "BBTrack.h" #include "ConfigManager.h" #include "ControllerConnection.h" #include "debug.h" @@ -574,12 +574,12 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, const float frames_per_tick = Engine::framesPerTick(); tcoVector tcos; - bbTrack * bb_track = NULL; + ::BBTrack * bb_track = NULL; if( _tco_num >= 0 ) { - trackContentObject * tco = getTCO( _tco_num ); + TrackContentObject * tco = getTCO( _tco_num ); tcos.push_back( tco ); - bb_track = bbTrack::findBBTrack( _tco_num ); + bb_track = BBTrack::findBBTrack( _tco_num ); } else { @@ -667,7 +667,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, -trackContentObject * InstrumentTrack::createTCO( const MidiTime & ) +TrackContentObject * InstrumentTrack::createTCO( const MidiTime & ) { return new Pattern( this ); } @@ -675,7 +675,7 @@ trackContentObject * InstrumentTrack::createTCO( const MidiTime & ) -trackView * InstrumentTrack::createView( TrackContainerView* tcv ) +TrackView * InstrumentTrack::createView( TrackContainerView* tcv ) { return new InstrumentTrackView( this, tcv ); } @@ -814,7 +814,7 @@ QQueue InstrumentTrackView::s_windowCache; InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tcv ) : - trackView( _it, tcv ), + TrackView( _it, tcv ), m_window( NULL ), m_lastPos( -1, -1 ) { @@ -1040,7 +1040,7 @@ void InstrumentTrackView::dragEnterEvent( QDragEnterEvent * _dee ) InstrumentTrackWindow::dragEnterEventGeneric( _dee ); if( !_dee->isAccepted() ) { - trackView::dragEnterEvent( _dee ); + TrackView::dragEnterEvent( _dee ); } } @@ -1050,7 +1050,7 @@ void InstrumentTrackView::dragEnterEvent( QDragEnterEvent * _dee ) void InstrumentTrackView::dropEvent( QDropEvent * _de ) { getInstrumentTrackWindow()->dropEvent( _de ); - trackView::dropEvent( _de ); + TrackView::dropEvent( _de ); } diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index f9b65096f..5306b2185 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -59,7 +59,7 @@ QPixmap * PatternView::s_stepBtnOffLight = NULL; Pattern::Pattern( InstrumentTrack * _instrument_track ) : - trackContentObject( _instrument_track ), + TrackContentObject( _instrument_track ), m_instrumentTrack( _instrument_track ), m_patternType( BeatPattern ), m_steps( MidiTime::stepsPerTact() ) @@ -72,7 +72,7 @@ Pattern::Pattern( InstrumentTrack * _instrument_track ) : Pattern::Pattern( const Pattern& other ) : - trackContentObject( other.m_instrumentTrack ), + TrackContentObject( other.m_instrumentTrack ), m_instrumentTrack( other.m_instrumentTrack ), m_patternType( other.m_patternType ), m_steps( other.m_steps ) @@ -471,7 +471,7 @@ void Pattern::removeSteps() -trackContentObjectView * Pattern::createView( trackView * _tv ) +TrackContentObjectView * Pattern::createView( TrackView * _tv ) { return new PatternView( this, _tv ); } @@ -601,8 +601,8 @@ void Pattern::changeTimeSignature() -PatternView::PatternView( Pattern* pattern, trackView* parent ) : - trackContentObjectView( pattern, parent ), +PatternView::PatternView( Pattern* pattern, TrackView* parent ) : + TrackContentObjectView( pattern, parent ), m_pat( pattern ), m_paintPixmap(), m_needsUpdate( true ) @@ -660,7 +660,7 @@ void PatternView::update() { m_needsUpdate = true; m_pat->changeLength( m_pat->length() ); - trackContentObjectView::update(); + TrackContentObjectView::update(); } @@ -811,7 +811,7 @@ void PatternView::mousePressEvent( QMouseEvent * _me ) // if not in beat/bassline -mode, let parent class handle the event { - trackContentObjectView::mousePressEvent( _me ); + TrackContentObjectView::mousePressEvent( _me ); } } @@ -871,7 +871,7 @@ void PatternView::wheelEvent( QWheelEvent * _we ) } else { - trackContentObjectView::wheelEvent( _we ); + TrackContentObjectView::wheelEvent( _we ); } } diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index d25ab2806..da5c8caf4 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -50,7 +50,7 @@ SampleTCO::SampleTCO( Track * _track ) : - trackContentObject( _track ), + TrackContentObject( _track ), m_sampleBuffer( new SampleBuffer ) { saveJournallingState( false ); @@ -76,7 +76,7 @@ SampleTCO::~SampleTCO() void SampleTCO::changeLength( const MidiTime & _length ) { - trackContentObject::changeLength( qMax( static_cast( _length ), DefaultTicksPerTact ) ); + TrackContentObject::changeLength( qMax( static_cast( _length ), DefaultTicksPerTact ) ); } @@ -178,7 +178,7 @@ void SampleTCO::loadSettings( const QDomElement & _this ) -trackContentObjectView * SampleTCO::createView( trackView * _tv ) +TrackContentObjectView * SampleTCO::createView( TrackView * _tv ) { return new SampleTCOView( this, _tv ); } @@ -192,8 +192,8 @@ trackContentObjectView * SampleTCO::createView( trackView * _tv ) -SampleTCOView::SampleTCOView( SampleTCO * _tco, trackView * _tv ) : - trackContentObjectView( _tco, _tv ), +SampleTCOView::SampleTCOView( SampleTCO * _tco, TrackView * _tv ) : + TrackContentObjectView( _tco, _tv ), m_tco( _tco ) { // update UI and tooltip @@ -270,7 +270,7 @@ void SampleTCOView::dragEnterEvent( QDragEnterEvent * _dee ) if( StringPairDrag::processDragEnterEvent( _dee, "samplefile,sampledata" ) == false ) { - trackContentObjectView::dragEnterEvent( _dee ); + TrackContentObjectView::dragEnterEvent( _dee ); } } @@ -295,7 +295,7 @@ void SampleTCOView::dropEvent( QDropEvent * _de ) } else { - trackContentObjectView::dropEvent( _de ); + TrackContentObjectView::dropEvent( _de ); } } @@ -312,7 +312,7 @@ void SampleTCOView::mousePressEvent( QMouseEvent * _me ) } else { - trackContentObjectView::mousePressEvent( _me ); + TrackContentObjectView::mousePressEvent( _me ); } } @@ -429,7 +429,7 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames, for( int i = 0; i < numOfTCOs(); ++i ) { - trackContentObject * tco = getTCO( i ); + TrackContentObject * tco = getTCO( i ); if( tco->startPosition() != _start ) { continue; @@ -468,7 +468,7 @@ 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 ); } @@ -476,7 +476,7 @@ trackView * SampleTrack::createView( TrackContainerView* tcv ) -trackContentObject * SampleTrack::createTCO( const MidiTime & ) +TrackContentObject * SampleTrack::createTCO( const MidiTime & ) { return new SampleTCO( this ); } @@ -521,7 +521,7 @@ void SampleTrack::loadTrackSpecificSettings( const QDomElement & _this ) SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) : - trackView( _t, tcv ) + TrackView( _t, tcv ) { setFixedHeight( 32 ); @@ -594,7 +594,7 @@ void SampleTrackView::modelChanged() SampleTrack * st = castModel(); m_volumeKnob->setModel( &st->m_volumeModel ); - trackView::modelChanged(); + TrackView::modelChanged(); }