mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-19 12:16:16 -04:00
Merge pull request #1622 from M374LX/coding
Progressive coding conventions update (new branch)
This commit is contained in:
@@ -81,36 +81,37 @@ const float MaxDetuning = 4 * 12.0f;
|
||||
class EXPORT Note : public SerializingObject
|
||||
{
|
||||
public:
|
||||
Note( const MidiTime & _length = MidiTime( 0 ),
|
||||
const MidiTime & _pos = MidiTime( 0 ),
|
||||
Note( const MidiTime & length = MidiTime( 0 ),
|
||||
const MidiTime & pos = MidiTime( 0 ),
|
||||
int key = DefaultKey,
|
||||
volume_t _volume = DefaultVolume,
|
||||
panning_t _panning = DefaultPanning,
|
||||
DetuningHelper * _detuning = NULL );
|
||||
Note( const Note & _note );
|
||||
volume_t volume = DefaultVolume,
|
||||
panning_t panning = DefaultPanning,
|
||||
DetuningHelper * detuning = NULL );
|
||||
Note( const Note & note );
|
||||
virtual ~Note();
|
||||
|
||||
// used by GUI
|
||||
inline void setSelected( const bool _selected ) { m_selected = _selected; }
|
||||
inline void setOldKey( const int _oldKey ) { m_oldKey = _oldKey; }
|
||||
inline void setOldPos( const MidiTime & _oldPos ) { m_oldPos = _oldPos; }
|
||||
inline void setOldLength( const MidiTime & _oldLength )
|
||||
inline void setSelected( const bool selected ) { m_selected = selected; }
|
||||
inline void setOldKey( const int oldKey ) { m_oldKey = oldKey; }
|
||||
inline void setOldPos( const MidiTime & oldPos ) { m_oldPos = oldPos; }
|
||||
|
||||
inline void setOldLength( const MidiTime & oldLength )
|
||||
{
|
||||
m_oldLength = _oldLength;
|
||||
m_oldLength = oldLength;
|
||||
}
|
||||
inline void setIsPlaying( const bool _isPlaying )
|
||||
inline void setIsPlaying( const bool isPlaying )
|
||||
{
|
||||
m_isPlaying = _isPlaying;
|
||||
m_isPlaying = isPlaying;
|
||||
}
|
||||
|
||||
|
||||
void setLength( const MidiTime & _length );
|
||||
void setPos( const MidiTime & _pos );
|
||||
void setKey( const int _key );
|
||||
void setLength( const MidiTime & length );
|
||||
void setPos( const MidiTime & pos );
|
||||
void setKey( const int key );
|
||||
virtual void setVolume( volume_t volume );
|
||||
virtual void setPanning( panning_t panning );
|
||||
void quantizeLength( const int _q_grid );
|
||||
void quantizePos( const int _q_grid );
|
||||
void quantizeLength( const int qGrid );
|
||||
void quantizePos( const int qGrid );
|
||||
|
||||
static inline bool lessThan( Note * &lhs, Note * &rhs )
|
||||
{
|
||||
@@ -160,9 +161,9 @@ public:
|
||||
return m_pos;
|
||||
}
|
||||
|
||||
inline MidiTime pos( MidiTime _base_pos ) const
|
||||
inline MidiTime pos( MidiTime basePos ) const
|
||||
{
|
||||
const int bp = _base_pos;
|
||||
const int bp = basePos;
|
||||
return m_pos - bp;
|
||||
}
|
||||
|
||||
@@ -196,7 +197,7 @@ public:
|
||||
return classNodeName();
|
||||
}
|
||||
|
||||
static MidiTime quantized( const MidiTime & _m, const int _q_grid );
|
||||
static MidiTime quantized( const MidiTime & m, const int qGrid );
|
||||
|
||||
DetuningHelper * detuning() const
|
||||
{
|
||||
@@ -208,8 +209,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
virtual void saveSettings( QDomDocument & doc, QDomElement & parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
|
||||
@@ -234,4 +234,3 @@ typedef QVector<Note *> NoteVector;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -85,19 +85,19 @@ public:
|
||||
{
|
||||
typedef QMap<QString, QString> AttributeMap;
|
||||
|
||||
inline Key( const Plugin::Descriptor * _desc = NULL,
|
||||
const QString & _name = QString(),
|
||||
const AttributeMap & _am = AttributeMap() )
|
||||
inline Key( const Plugin::Descriptor * desc = NULL,
|
||||
const QString & name = QString(),
|
||||
const AttributeMap & am = AttributeMap() )
|
||||
:
|
||||
desc( _desc ),
|
||||
name( _name ),
|
||||
attributes( _am )
|
||||
desc( desc ),
|
||||
name( name ),
|
||||
attributes( am )
|
||||
{
|
||||
}
|
||||
|
||||
Key( const QDomElement & _key );
|
||||
Key( const QDomElement & key );
|
||||
|
||||
QDomElement saveXML( QDomDocument & _doc ) const;
|
||||
QDomElement saveXML( QDomDocument & doc ) const;
|
||||
|
||||
inline bool isValid() const
|
||||
{
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
const Plugin::PluginTypes m_type;
|
||||
} ;
|
||||
|
||||
SubPluginFeatures *subPluginFeatures;
|
||||
SubPluginFeatures * subPluginFeatures;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -142,15 +142,15 @@ public:
|
||||
typedef QList<Descriptor> DescriptorList;
|
||||
|
||||
// contructor of a plugin
|
||||
Plugin( const Descriptor* descriptor, Model* parent );
|
||||
Plugin( const Descriptor * descriptor, Model * parent );
|
||||
virtual ~Plugin();
|
||||
|
||||
// returns display-name out of descriptor
|
||||
virtual QString displayName() const
|
||||
{
|
||||
return Model::displayName().isEmpty()
|
||||
? m_descriptor->displayName
|
||||
: Model::displayName();
|
||||
? m_descriptor->displayName
|
||||
: Model::displayName();
|
||||
}
|
||||
|
||||
// return plugin-type
|
||||
@@ -160,41 +160,41 @@ public:
|
||||
}
|
||||
|
||||
// return plugin-descriptor for further information
|
||||
inline const Descriptor* descriptor() const
|
||||
inline const Descriptor * descriptor() const
|
||||
{
|
||||
return m_descriptor;
|
||||
}
|
||||
|
||||
// can be called if a file matching supportedFileTypes should be
|
||||
// loaded/processed with the help of this plugin
|
||||
virtual void loadFile( const QString& file );
|
||||
virtual void loadFile( const QString & file );
|
||||
|
||||
// Called if external source needs to change something but we cannot
|
||||
// reference the class header. Should return null if not key not found.
|
||||
virtual AutomatableModel* childModel( const QString& modelName );
|
||||
virtual AutomatableModel* childModel( const QString & modelName );
|
||||
|
||||
// returns an instance of a plugin whose name matches to given one
|
||||
// if specified plugin couldn't be loaded, it creates a dummy-plugin
|
||||
static Plugin * instantiate( const QString& pluginName, Model *parent, void * data );
|
||||
static Plugin * instantiate( const QString& pluginName, Model * parent, void * data );
|
||||
|
||||
// fills given list with descriptors of all available plugins
|
||||
static void getDescriptorsOfAvailPlugins( DescriptorList& pluginDescriptors );
|
||||
static void getDescriptorsOfAvailPlugins( DescriptorList & pluginDescriptors );
|
||||
|
||||
// create a view for the model
|
||||
PluginView* createView( QWidget* parent );
|
||||
PluginView * createView( QWidget * parent );
|
||||
|
||||
|
||||
protected:
|
||||
// create a view for the model
|
||||
virtual PluginView* instantiateView( QWidget* ) = 0;
|
||||
void collectErrorForUI( QString err_msg );
|
||||
virtual PluginView* instantiateView( QWidget * ) = 0;
|
||||
void collectErrorForUI( QString errMsg );
|
||||
|
||||
|
||||
private:
|
||||
const Descriptor* m_descriptor;
|
||||
const Descriptor * m_descriptor;
|
||||
|
||||
// pointer to instantiation-function in plugin
|
||||
typedef Plugin * ( * InstantiationHook )( Model*, void* );
|
||||
typedef Plugin * ( * InstantiationHook )( Model * , void * );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ private:
|
||||
CompareType m_compareType;
|
||||
} ;
|
||||
|
||||
|
||||
/*
|
||||
* ProjectVersion v. ProjectVersion
|
||||
*/
|
||||
@@ -72,5 +71,4 @@ inline bool operator>=(const ProjectVersion & v1, const ProjectVersion & v2) { r
|
||||
inline bool operator==(const ProjectVersion & v1, const ProjectVersion & v2) { return ProjectVersion::compare(v1, v2) == 0; }
|
||||
inline bool operator!=(const ProjectVersion & v1, const ProjectVersion & v2) { return ProjectVersion::compare(v1, v2) != 0; }
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,10 +49,9 @@ const tick_t MaxSongLength = 9999 * DefaultTicksPerTact;
|
||||
class EXPORT Song : public TrackContainer
|
||||
{
|
||||
Q_OBJECT
|
||||
mapPropertyFromModel(int,getTempo,setTempo,m_tempoModel);
|
||||
mapPropertyFromModel(int,masterPitch,setMasterPitch,m_masterPitchModel);
|
||||
mapPropertyFromModel(int,masterVolume,setMasterVolume,
|
||||
m_masterVolumeModel);
|
||||
mapPropertyFromModel( int,getTempo,setTempo,m_tempoModel );
|
||||
mapPropertyFromModel( int,masterPitch,setMasterPitch,m_masterPitchModel );
|
||||
mapPropertyFromModel( int,masterVolume,setMasterVolume, m_masterVolumeModel );
|
||||
public:
|
||||
enum PlayModes
|
||||
{
|
||||
@@ -70,19 +69,19 @@ public:
|
||||
bool hasErrors();
|
||||
QString* errorSummary();
|
||||
|
||||
class playPos : public MidiTime
|
||||
class PlayPos : public MidiTime
|
||||
{
|
||||
public:
|
||||
playPos( const int _abs = 0 ) :
|
||||
MidiTime( _abs ),
|
||||
PlayPos( const int abs = 0 ) :
|
||||
MidiTime( abs ),
|
||||
m_timeLine( NULL ),
|
||||
m_timeLineUpdate( true ),
|
||||
m_currentFrame( 0.0f )
|
||||
{
|
||||
}
|
||||
inline void setCurrentFrame( const float _f )
|
||||
inline void setCurrentFrame( const float f )
|
||||
{
|
||||
m_currentFrame = _f;
|
||||
m_currentFrame = f;
|
||||
}
|
||||
inline float currentFrame() const
|
||||
{
|
||||
@@ -104,9 +103,9 @@ public:
|
||||
{
|
||||
return m_elapsedMilliSeconds;
|
||||
}
|
||||
inline void setMilliSeconds( float _ellapsedMilliSeconds )
|
||||
inline void setMilliSeconds( float ellapsedMilliSeconds )
|
||||
{
|
||||
m_elapsedMilliSeconds = (_ellapsedMilliSeconds);
|
||||
m_elapsedMilliSeconds = ellapsedMilliSeconds;
|
||||
}
|
||||
inline int getTacts() const
|
||||
{
|
||||
@@ -123,14 +122,14 @@ public:
|
||||
// Returns the beat position inside the bar, 0-based
|
||||
inline int getBeat() const
|
||||
{
|
||||
return (currentTick() - currentTact()*ticksPerTact()) /
|
||||
(ticksPerTact() / m_timeSigModel.getNumerator() );
|
||||
return ( currentTick() - currentTact() * ticksPerTact() ) /
|
||||
( ticksPerTact() / m_timeSigModel.getNumerator() );
|
||||
}
|
||||
// the remainder after bar and beat are removed
|
||||
inline int getBeatTicks() const
|
||||
{
|
||||
return (currentTick() - currentTact()*ticksPerTact()) %
|
||||
(ticksPerTact() / m_timeSigModel.getNumerator() );
|
||||
return ( currentTick() - currentTact() * ticksPerTact() ) %
|
||||
( ticksPerTact() / m_timeSigModel.getNumerator() );
|
||||
}
|
||||
inline int getTicks() const
|
||||
{
|
||||
@@ -151,7 +150,7 @@ public:
|
||||
|
||||
inline bool isPlaying() const
|
||||
{
|
||||
return m_playing && m_exporting == false;
|
||||
return m_playing == true && m_exporting == false;
|
||||
}
|
||||
|
||||
inline bool isStopped() const
|
||||
@@ -186,9 +185,9 @@ public:
|
||||
return m_playMode;
|
||||
}
|
||||
|
||||
inline playPos & getPlayPos( PlayModes _pm )
|
||||
inline PlayPos & getPlayPos( PlayModes pm )
|
||||
{
|
||||
return m_playPos[_pm];
|
||||
return m_playPos[pm];
|
||||
}
|
||||
|
||||
void updateLength();
|
||||
@@ -208,11 +207,11 @@ public:
|
||||
|
||||
// file management
|
||||
void createNewProject();
|
||||
void createNewProjectFromTemplate( const QString & _template );
|
||||
void loadProject( const QString & _filename );
|
||||
void createNewProjectFromTemplate( const QString & templ );
|
||||
void loadProject( const QString & filename );
|
||||
bool guiSaveProject();
|
||||
bool guiSaveProjectAs( const QString & _filename );
|
||||
bool saveProjectFile( const QString & _filename );
|
||||
bool guiSaveProjectAs( const QString & filename );
|
||||
bool saveProjectFile( const QString & filename );
|
||||
|
||||
const QString & projectFileName() const
|
||||
{
|
||||
@@ -239,8 +238,8 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
void addController( Controller * _c );
|
||||
void removeController( Controller * _c );
|
||||
void addController( Controller * c );
|
||||
void removeController( Controller * c );
|
||||
|
||||
|
||||
const ControllerVector & controllers() const
|
||||
@@ -259,14 +258,14 @@ public slots:
|
||||
void playSong();
|
||||
void record();
|
||||
void playAndRecord();
|
||||
void playTrack( Track * _trackToPlay );
|
||||
void playTrack( Track * trackToPlay );
|
||||
void playBB();
|
||||
void playPattern(const Pattern* patternToPlay, bool _loop = true );
|
||||
void playPattern( const Pattern * patternToPlay, bool loop = true );
|
||||
void togglePause();
|
||||
void stop();
|
||||
|
||||
void importProject();
|
||||
void exportProject(bool multiExport=false);
|
||||
void exportProject( bool multiExport = false );
|
||||
void exportProjectTracks();
|
||||
void exportProjectMidi();
|
||||
|
||||
@@ -316,13 +315,14 @@ private:
|
||||
|
||||
inline f_cnt_t currentFrame() const
|
||||
{
|
||||
return m_playPos[m_playMode].getTicks() * Engine::framesPerTick() + m_playPos[m_playMode].currentFrame();
|
||||
return m_playPos[m_playMode].getTicks() * Engine::framesPerTick() +
|
||||
m_playPos[m_playMode].currentFrame();
|
||||
}
|
||||
|
||||
void setPlayPos( tick_t _ticks, PlayModes _play_mode );
|
||||
void setPlayPos( tick_t ticks, PlayModes playMode );
|
||||
|
||||
void saveControllerStates( QDomDocument & _doc, QDomElement & _this );
|
||||
void restoreControllerStates( const QDomElement & _this );
|
||||
void saveControllerStates( QDomDocument & doc, QDomElement & element );
|
||||
void restoreControllerStates( const QDomElement & element );
|
||||
|
||||
|
||||
AutomationTrack * m_globalAutomationTrack;
|
||||
@@ -352,7 +352,7 @@ private:
|
||||
QList<QString> * m_errors;
|
||||
|
||||
PlayModes m_playMode;
|
||||
playPos m_playPos[Mode_Count];
|
||||
PlayPos m_playPos[Mode_Count];
|
||||
tact_t m_length;
|
||||
|
||||
Track * m_trackToPlay;
|
||||
@@ -375,10 +375,9 @@ signals:
|
||||
void projectLoaded();
|
||||
void playbackStateChanged();
|
||||
void playbackPositionChanged();
|
||||
void lengthChanged( int _tacts );
|
||||
void tempoChanged( bpm_t _new_bpm );
|
||||
void timeSignatureChanged( int _old_ticks_per_tact,
|
||||
int _ticks_per_tact );
|
||||
void lengthChanged( int tacts );
|
||||
void tempoChanged( bpm_t newBPM );
|
||||
void timeSignatureChanged( int oldTicksPerTact, int ticksPerTact );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -62,11 +62,11 @@ public:
|
||||
} ;
|
||||
|
||||
|
||||
TimeLineWidget( int _xoff, int _yoff, float _ppt, Song::playPos & _pos,
|
||||
const MidiTime & _begin, QWidget * _parent );
|
||||
TimeLineWidget( int xoff, int yoff, float ppt, Song::PlayPos & pos,
|
||||
const MidiTime & begin, QWidget * parent );
|
||||
virtual ~TimeLineWidget();
|
||||
|
||||
inline Song::playPos & pos()
|
||||
inline Song::PlayPos & pos()
|
||||
{
|
||||
return( m_pos );
|
||||
}
|
||||
@@ -169,7 +169,7 @@ private:
|
||||
int m_xOffset;
|
||||
int m_posMarkerX;
|
||||
float m_ppt;
|
||||
Song::playPos & m_pos;
|
||||
Song::PlayPos & m_pos;
|
||||
const MidiTime & m_begin;
|
||||
MidiTime m_loopPos[2];
|
||||
|
||||
|
||||
174
include/Track.h
174
include/Track.h
@@ -81,7 +81,7 @@ class TrackContentObject : public Model, public JournallingObject
|
||||
mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel);
|
||||
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
|
||||
public:
|
||||
TrackContentObject( Track * _track );
|
||||
TrackContentObject( Track * track );
|
||||
virtual ~TrackContentObject();
|
||||
|
||||
inline Track * getTrack() const
|
||||
@@ -94,9 +94,9 @@ public:
|
||||
return m_name;
|
||||
}
|
||||
|
||||
inline void setName( const QString & _name )
|
||||
inline void setName( const QString & name )
|
||||
{
|
||||
m_name = _name;
|
||||
m_name = name;
|
||||
emit dataChanged();
|
||||
}
|
||||
|
||||
@@ -122,9 +122,9 @@ public:
|
||||
return m_length;
|
||||
}
|
||||
|
||||
inline void setAutoResize( const bool _r )
|
||||
inline void setAutoResize( const bool r )
|
||||
{
|
||||
m_autoResize = _r;
|
||||
m_autoResize = r;
|
||||
}
|
||||
|
||||
inline const bool getAutoResize() const
|
||||
@@ -132,10 +132,10 @@ public:
|
||||
return m_autoResize;
|
||||
}
|
||||
|
||||
virtual void movePosition( const MidiTime & _pos );
|
||||
virtual void changeLength( const MidiTime & _length );
|
||||
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 )
|
||||
{
|
||||
@@ -195,7 +195,7 @@ class TrackContentObjectView : public selectableObject, public ModelView
|
||||
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
|
||||
|
||||
public:
|
||||
TrackContentObjectView( TrackContentObject * _tco, TrackView * _tv );
|
||||
TrackContentObjectView( TrackContentObject * tco, TrackView * tv );
|
||||
virtual ~TrackContentObjectView();
|
||||
|
||||
bool fixedTCOs();
|
||||
@@ -207,8 +207,8 @@ public:
|
||||
// qproperty access func
|
||||
QColor fgColor() const;
|
||||
QColor textColor() const;
|
||||
void setFgColor( const QColor & _c );
|
||||
void setTextColor( const QColor & _c );
|
||||
void setFgColor( const QColor & c );
|
||||
void setTextColor( const QColor & c );
|
||||
|
||||
public slots:
|
||||
virtual bool close();
|
||||
@@ -220,13 +220,13 @@ protected:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _cme );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void leaveEvent( QEvent * _e );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void contextMenuEvent( QContextMenuEvent * cme );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * dee );
|
||||
virtual void dropEvent( QDropEvent * de );
|
||||
virtual void leaveEvent( QEvent * e );
|
||||
virtual void mousePressEvent( QMouseEvent * me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * me );
|
||||
|
||||
float pixelsPerTact();
|
||||
|
||||
@@ -276,7 +276,7 @@ private:
|
||||
m_initialMouseGlobalPos = mapToGlobal( pos );
|
||||
}
|
||||
|
||||
bool mouseMovedDistance( QMouseEvent * _me, int distance );
|
||||
bool mouseMovedDistance( QMouseEvent * me, int distance );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -293,46 +293,46 @@ class TrackContentWidget : public QWidget, public JournallingObject
|
||||
Q_PROPERTY( QBrush lighterColor READ lighterColor WRITE setLighterColor )
|
||||
|
||||
public:
|
||||
TrackContentWidget( TrackView * _parent );
|
||||
TrackContentWidget( TrackView * parent );
|
||||
virtual ~TrackContentWidget();
|
||||
|
||||
/*! \brief Updates the background tile pixmap. */
|
||||
void updateBackground();
|
||||
|
||||
void addTCOView( TrackContentObjectView * _tcov );
|
||||
void removeTCOView( TrackContentObjectView * _tcov );
|
||||
void removeTCOView( int _tco_num )
|
||||
void addTCOView( TrackContentObjectView * tcov );
|
||||
void removeTCOView( TrackContentObjectView * tcov );
|
||||
void removeTCOView( int tcoNum )
|
||||
{
|
||||
if( _tco_num >= 0 && _tco_num < m_tcoViews.size() )
|
||||
if( tcoNum >= 0 && tcoNum < m_tcoViews.size() )
|
||||
{
|
||||
removeTCOView( m_tcoViews[_tco_num] );
|
||||
removeTCOView( m_tcoViews[tcoNum] );
|
||||
}
|
||||
}
|
||||
|
||||
bool canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData );
|
||||
bool pasteSelection( MidiTime tcoPos, QDropEvent * _de );
|
||||
bool pasteSelection( MidiTime tcoPos, QDropEvent * de );
|
||||
|
||||
MidiTime endPosition( const MidiTime & _pos_start );
|
||||
MidiTime endPosition( const MidiTime & posStart );
|
||||
|
||||
// qproperty access methods
|
||||
|
||||
QBrush darkerColor() const;
|
||||
QBrush lighterColor() const;
|
||||
|
||||
void setDarkerColor( const QBrush & _c );
|
||||
void setLighterColor( const QBrush & _c );
|
||||
void setDarkerColor( const QBrush & c );
|
||||
void setLighterColor( const QBrush & c );
|
||||
|
||||
public slots:
|
||||
void update();
|
||||
void changePosition( const MidiTime & _new_pos = MidiTime( -1 ) );
|
||||
void changePosition( const MidiTime & newPos = MidiTime( -1 ) );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void resizeEvent( QResizeEvent * _re );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * dee );
|
||||
virtual void dropEvent( QDropEvent * de );
|
||||
virtual void mousePressEvent( QMouseEvent * me );
|
||||
virtual void paintEvent( QPaintEvent * pe );
|
||||
virtual void resizeEvent( QResizeEvent * re );
|
||||
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
@@ -353,7 +353,7 @@ protected:
|
||||
|
||||
private:
|
||||
Track * getTrack();
|
||||
MidiTime getPosition( int _mouse_x );
|
||||
MidiTime getPosition( int mouseX );
|
||||
|
||||
TrackView * m_trackView;
|
||||
|
||||
@@ -375,13 +375,13 @@ class TrackOperationsWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TrackOperationsWidget( TrackView * _parent );
|
||||
TrackOperationsWidget( TrackView * parent );
|
||||
~TrackOperationsWidget();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void mousePressEvent( QMouseEvent * me );
|
||||
virtual void paintEvent( QPaintEvent * pe );
|
||||
|
||||
|
||||
private slots:
|
||||
@@ -405,7 +405,7 @@ private:
|
||||
friend class TrackView;
|
||||
|
||||
signals:
|
||||
void trackRemovalScheduled( TrackView * _t );
|
||||
void trackRemovalScheduled( TrackView * t );
|
||||
|
||||
} ;
|
||||
|
||||
@@ -435,12 +435,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( const QDomElement & _this,
|
||||
TrackContainer * _tc );
|
||||
static Track * create( TrackTypes tt, TrackContainer * tc );
|
||||
static Track * create( const QDomElement & element,
|
||||
TrackContainer * tc );
|
||||
void clone();
|
||||
|
||||
|
||||
@@ -450,20 +450,20 @@ public:
|
||||
return m_type;
|
||||
}
|
||||
|
||||
virtual bool play( const MidiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 ) = 0;
|
||||
virtual bool play( const MidiTime & start, const fpp_t frames,
|
||||
const f_cnt_t frameBase, int tcoNum = -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;
|
||||
virtual void loadTrackSpecificSettings( const QDomElement & _this ) = 0;
|
||||
virtual void saveTrackSpecificSettings( QDomDocument & doc,
|
||||
QDomElement & parent ) = 0;
|
||||
virtual void loadTrackSpecificSettings( const QDomElement & element ) = 0;
|
||||
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual void saveSettings( QDomDocument & doc, QDomElement & element );
|
||||
virtual void loadSettings( const QDomElement & element );
|
||||
|
||||
void setSimpleSerializing()
|
||||
{
|
||||
@@ -471,26 +471,26 @@ public:
|
||||
}
|
||||
|
||||
// -- for usage by TrackContentObject only ---------------
|
||||
TrackContentObject * addTCO( TrackContentObject * _tco );
|
||||
void removeTCO( TrackContentObject * _tco );
|
||||
TrackContentObject * addTCO( TrackContentObject * tco );
|
||||
void removeTCO( TrackContentObject * tco );
|
||||
// -------------------------------------------------------
|
||||
void deleteTCOs();
|
||||
|
||||
int numOfTCOs();
|
||||
TrackContentObject * getTCO( int _tco_num );
|
||||
int getTCONum(const TrackContentObject* _tco );
|
||||
TrackContentObject * getTCO( int tcoNum );
|
||||
int getTCONum(const TrackContentObject* tco );
|
||||
|
||||
const tcoVector & getTCOs() const
|
||||
{
|
||||
return( m_trackContentObjects );
|
||||
return m_trackContentObjects;
|
||||
}
|
||||
void getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start,
|
||||
const MidiTime & _end );
|
||||
void swapPositionOfTCOs( int _tco_num1, int _tco_num2 );
|
||||
void getTCOsInRange( tcoVector & tcoV, const MidiTime & start,
|
||||
const MidiTime & end );
|
||||
void swapPositionOfTCOs( int tcoNum1, int tcoNum2 );
|
||||
|
||||
|
||||
void insertTact( const MidiTime & _pos );
|
||||
void removeTact( const MidiTime & _pos );
|
||||
void insertTact( const MidiTime & pos );
|
||||
void removeTact( const MidiTime & pos );
|
||||
|
||||
tact_t length() const;
|
||||
|
||||
@@ -503,21 +503,25 @@ public:
|
||||
// name-stuff
|
||||
virtual const QString & name() const
|
||||
{
|
||||
return( m_name );
|
||||
return m_name;
|
||||
}
|
||||
|
||||
virtual QString displayName() const
|
||||
{
|
||||
return( name() );
|
||||
return name();
|
||||
}
|
||||
|
||||
using Model::dataChanged;
|
||||
|
||||
inline int getHeight() {
|
||||
return ( m_height >= MINIMAL_TRACK_HEIGHT ? m_height : DEFAULT_TRACK_HEIGHT );
|
||||
inline int getHeight()
|
||||
{
|
||||
return m_height >= MINIMAL_TRACK_HEIGHT
|
||||
? m_height
|
||||
: DEFAULT_TRACK_HEIGHT;
|
||||
}
|
||||
inline void setHeight( int _height ) {
|
||||
m_height = _height;
|
||||
inline void setHeight( int height )
|
||||
{
|
||||
m_height = height;
|
||||
}
|
||||
|
||||
void lock()
|
||||
@@ -534,9 +538,9 @@ public:
|
||||
}
|
||||
|
||||
public slots:
|
||||
virtual void setName( const QString & _new_name )
|
||||
virtual void setName( const QString & newName )
|
||||
{
|
||||
m_name = _new_name;
|
||||
m_name = newName;
|
||||
emit nameChanged();
|
||||
}
|
||||
|
||||
@@ -583,12 +587,12 @@ public:
|
||||
|
||||
inline const Track * getTrack() const
|
||||
{
|
||||
return( m_track );
|
||||
return m_track;
|
||||
}
|
||||
|
||||
inline Track * getTrack()
|
||||
{
|
||||
return( m_track );
|
||||
return m_track;
|
||||
}
|
||||
|
||||
inline TrackContainerView* trackContainerView()
|
||||
@@ -598,22 +602,22 @@ public:
|
||||
|
||||
inline TrackOperationsWidget * getTrackOperationsWidget()
|
||||
{
|
||||
return( &m_trackOperationsWidget );
|
||||
return &m_trackOperationsWidget;
|
||||
}
|
||||
|
||||
inline trackSettingsWidget * getTrackSettingsWidget()
|
||||
{
|
||||
return( &m_trackSettingsWidget );
|
||||
return &m_trackSettingsWidget;
|
||||
}
|
||||
|
||||
inline TrackContentWidget * getTrackContentWidget()
|
||||
{
|
||||
return( &m_trackContentWidget );
|
||||
return &m_trackContentWidget;
|
||||
}
|
||||
|
||||
bool isMovingTrack() const
|
||||
{
|
||||
return( m_action == MoveTrack );
|
||||
return m_action == MoveTrack;
|
||||
}
|
||||
|
||||
virtual void update();
|
||||
@@ -643,13 +647,13 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void resizeEvent( QResizeEvent * _re );
|
||||
virtual void dragEnterEvent( QDragEnterEvent * dee );
|
||||
virtual void dropEvent( QDropEvent * de );
|
||||
virtual void mousePressEvent( QMouseEvent * me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * me );
|
||||
virtual void paintEvent( QPaintEvent * pe );
|
||||
virtual void resizeEvent( QResizeEvent * re );
|
||||
|
||||
|
||||
private:
|
||||
@@ -674,7 +678,7 @@ private:
|
||||
|
||||
|
||||
private slots:
|
||||
void createTCOView( TrackContentObject * _tco );
|
||||
void createTCOView( TrackContentObject * tco );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user