From ac95123d417583e25151ee35f3145af0d85271f0 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:18:07 +0100 Subject: [PATCH] Rename timeLine to Timeline --- include/AutomationEditor.h | 4 +-- include/PianoRoll.h | 4 +-- include/Song.h | 4 +-- include/SongEditor.h | 4 +-- include/{timeline.h => Timeline.h} | 8 +++--- src/core/Song.cpp | 14 ++++----- src/core/{timeline.cpp => Timeline.cpp} | 38 ++++++++++++------------- src/gui/AutomationEditor.cpp | 4 +-- src/gui/PianoRoll.cpp | 6 ++-- src/gui/SongEditor.cpp | 6 ++-- 10 files changed, 46 insertions(+), 46 deletions(-) rename include/{timeline.h => Timeline.h} (94%) rename src/core/{timeline.cpp => Timeline.cpp} (90%) diff --git a/include/AutomationEditor.h b/include/AutomationEditor.h index 1479ca1b9..be0157ccc 100644 --- a/include/AutomationEditor.h +++ b/include/AutomationEditor.h @@ -43,7 +43,7 @@ class QScrollBar; class comboBox; class NotePlayHandle; -class timeLine; +class Timeline; class toolButton; @@ -258,7 +258,7 @@ private: editModes m_editMode; - timeLine * m_timeLine; + Timeline * m_timeLine; bool m_scrollBack; void drawCross( QPainter & _p ); diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 817ebde33..eec6ba2fb 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -47,7 +47,7 @@ class QSignalMapper; class comboBox; class NotePlayHandle; class Pattern; -class timeLine; +class Timeline; class toolButton; class PianoRoll : public QWidget, public SerializingObject @@ -350,7 +350,7 @@ private: bool m_mouseDownLeft; //true if left click is being held down bool m_mouseDownRight; //true if right click is being held down - timeLine * m_timeLine; + Timeline * m_timeLine; bool m_scrollBack; void copy_to_clipboard( const NoteVector & _notes ) const; diff --git a/include/Song.h b/include/Song.h index 70c226c46..d0dac5a9c 100644 --- a/include/Song.h +++ b/include/Song.h @@ -36,7 +36,7 @@ class AutomationTrack; class Pattern; -class timeLine; +class Timeline; const bpm_t MinTempo = 10; @@ -83,7 +83,7 @@ public: { return m_currentFrame; } - timeLine * m_timeLine; + Timeline * m_timeLine; bool m_timeLineUpdate; private: diff --git a/include/SongEditor.h b/include/SongEditor.h index 439c8d6b7..b1651bc01 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -38,7 +38,7 @@ class LcdSpinBox; class MeterDialog; class Song; class textFloat; -class timeLine; +class Timeline; class toolButton; class positionLine : public QWidget @@ -110,7 +110,7 @@ private: toolButton * m_stopButton; LcdSpinBox * m_tempoSpinBox; - timeLine * m_timeLine; + Timeline * m_timeLine; MeterDialog * m_timeSigDisplay; automatableSlider * m_masterVolumeSlider; diff --git a/include/timeline.h b/include/Timeline.h similarity index 94% rename from include/timeline.h rename to include/Timeline.h index bfde02b4e..b1811bb6a 100644 --- a/include/timeline.h +++ b/include/Timeline.h @@ -1,5 +1,5 @@ /* - * timeline.h - class timeLine, representing a time-line with position marker + * Timeline.h - class timeLine, representing a time-line with position marker * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -36,7 +36,7 @@ class nStateButton; class textFloat; -class timeLine : public QWidget, public JournallingObject +class Timeline : public QWidget, public JournallingObject { Q_OBJECT public: @@ -60,9 +60,9 @@ public: } ; - timeLine( int _xoff, int _yoff, float _ppt, Song::playPos & _pos, + Timeline( int _xoff, int _yoff, float _ppt, Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ); - virtual ~timeLine(); + virtual ~Timeline(); inline Song::playPos & pos() { diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 930259c88..f150129a2 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -60,7 +60,7 @@ #include "SongEditor.h" #include "templates.h" #include "text_float.h" -#include "timeline.h" +#include "Timeline.h" #include "PeakController.h" @@ -179,7 +179,7 @@ void Song::setTimeSignature() void Song::savePos() { - timeLine * tl = m_playPos[m_playMode].m_timeLine; + Timeline * tl = m_playPos[m_playMode].m_timeLine; if( tl != NULL ) { @@ -246,7 +246,7 @@ void Song::processNextBuffer() } // check for looping-mode and act if necessary - timeLine * tl = m_playPos[m_playMode].m_timeLine; + Timeline * tl = m_playPos[m_playMode].m_timeLine; bool check_loop = tl != NULL && m_exporting == false && tl->loopPointsEnabled(); if( check_loop ) @@ -565,7 +565,7 @@ void Song::stop() return; } - timeLine * tl = m_playPos[m_playMode].m_timeLine; + Timeline * tl = m_playPos[m_playMode].m_timeLine; m_playing = false; m_paused = false; m_recording = true; @@ -575,12 +575,12 @@ void Song::stop() switch( tl->behaviourAtStop() ) { - case timeLine::BackToZero: + case Timeline::BackToZero: m_playPos[m_playMode].setTicks( 0 ); m_elapsedMilliSeconds = 0; break; - case timeLine::BackToStart: + case Timeline::BackToStart: if( tl->savedPos() >= 0 ) { m_playPos[m_playMode].setTicks( tl->savedPos().getTicks() ); @@ -589,7 +589,7 @@ void Song::stop() } break; - case timeLine::KeepStopPosition: + case Timeline::KeepStopPosition: default: break; } diff --git a/src/core/timeline.cpp b/src/core/Timeline.cpp similarity index 90% rename from src/core/timeline.cpp rename to src/core/Timeline.cpp index 9bc004df8..c48571c6a 100644 --- a/src/core/timeline.cpp +++ b/src/core/Timeline.cpp @@ -1,5 +1,5 @@ /* - * timeline.cpp - class timeLine, representing a time-line with position marker + * Timeline.cpp - class timeLine, representing a time-line with position marker * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -31,7 +31,7 @@ #include -#include "timeline.h" +#include "Timeline.h" #include "embed.h" #include "Engine.h" #include "templates.h" @@ -45,12 +45,12 @@ #endif -QPixmap * timeLine::s_timeLinePixmap = NULL; -QPixmap * timeLine::s_posMarkerPixmap = NULL; -QPixmap * timeLine::s_loopPointBeginPixmap = NULL; -QPixmap * timeLine::s_loopPointEndPixmap = NULL; +QPixmap * Timeline::s_timeLinePixmap = NULL; +QPixmap * Timeline::s_posMarkerPixmap = NULL; +QPixmap * Timeline::s_loopPointBeginPixmap = NULL; +QPixmap * Timeline::s_loopPointEndPixmap = NULL; -timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, +Timeline::Timeline( const int _xoff, const int _yoff, const float _ppt, Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ) : QWidget( _parent ), @@ -109,7 +109,7 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, -timeLine::~timeLine() +Timeline::~Timeline() { if( Engine::songEditor() ) { @@ -121,7 +121,7 @@ timeLine::~timeLine() -void timeLine::addToolButtons( QWidget * _tool_bar ) +void Timeline::addToolButtons( QWidget * _tool_bar ) { nStateButton * autoScroll = new nStateButton( _tool_bar ); autoScroll->setGeneralToolTip( tr( "Enable/disable auto-scrolling" ) ); @@ -161,7 +161,7 @@ void timeLine::addToolButtons( QWidget * _tool_bar ) -void timeLine::saveSettings( QDomDocument & _doc, QDomElement & _this ) +void Timeline::saveSettings( QDomDocument & _doc, QDomElement & _this ) { _this.setAttribute( "lp0pos", (int) loopBegin() ); _this.setAttribute( "lp1pos", (int) loopEnd() ); @@ -171,7 +171,7 @@ void timeLine::saveSettings( QDomDocument & _doc, QDomElement & _this ) -void timeLine::loadSettings( const QDomElement & _this ) +void Timeline::loadSettings( const QDomElement & _this ) { m_loopPos[0] = _this.attribute( "lp0pos" ).toInt(); m_loopPos[1] = _this.attribute( "lp1pos" ).toInt(); @@ -184,7 +184,7 @@ void timeLine::loadSettings( const QDomElement & _this ) -void timeLine::updatePosition( const MidiTime & ) +void Timeline::updatePosition( const MidiTime & ) { const int new_x = markerX( m_pos ); @@ -200,7 +200,7 @@ void timeLine::updatePosition( const MidiTime & ) -void timeLine::toggleAutoScroll( int _n ) +void Timeline::toggleAutoScroll( int _n ) { m_autoScroll = static_cast( _n ); } @@ -208,7 +208,7 @@ void timeLine::toggleAutoScroll( int _n ) -void timeLine::toggleLoopPoints( int _n ) +void Timeline::toggleLoopPoints( int _n ) { m_loopPoints = static_cast( _n ); update(); @@ -217,7 +217,7 @@ void timeLine::toggleLoopPoints( int _n ) -void timeLine::toggleBehaviourAtStop( int _n ) +void Timeline::toggleBehaviourAtStop( int _n ) { m_behaviourAtStop = static_cast( _n ); } @@ -225,7 +225,7 @@ void timeLine::toggleBehaviourAtStop( int _n ) -void timeLine::paintEvent( QPaintEvent * ) +void Timeline::paintEvent( QPaintEvent * ) { QPainter p( this ); @@ -274,7 +274,7 @@ void timeLine::paintEvent( QPaintEvent * ) -void timeLine::mousePressEvent( QMouseEvent* event ) +void Timeline::mousePressEvent( QMouseEvent* event ) { if( event->x() < m_xOffset ) { @@ -331,7 +331,7 @@ void timeLine::mousePressEvent( QMouseEvent* event ) -void timeLine::mouseMoveEvent( QMouseEvent* event ) +void Timeline::mouseMoveEvent( QMouseEvent* event ) { const MidiTime t = m_begin + static_cast( qMax( event->x() - m_xOffset - m_moveXOff, 0 ) * MidiTime::ticksPerTact() / m_ppt ); @@ -381,7 +381,7 @@ void timeLine::mouseMoveEvent( QMouseEvent* event ) -void timeLine::mouseReleaseEvent( QMouseEvent* event ) +void Timeline::mouseReleaseEvent( QMouseEvent* event ) { delete m_hint; m_hint = NULL; diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index b7c8c0845..1357dca3e 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -54,7 +54,7 @@ #include "pixmap_button.h" #include "templates.h" #include "gui_templates.h" -#include "timeline.h" +#include "Timeline.h" #include "tooltip.h" #include "tool_button.h" #include "text_float.h" @@ -132,7 +132,7 @@ AutomationEditor::AutomationEditor() : setAttribute( Qt::WA_OpaquePaintEvent, true ); // add time-line - m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt, + m_timeLine = new Timeline( VALUES_WIDTH, 32, m_ppt, Engine::getSong()->getPlayPos( Song::Mode_PlayAutomationPattern ), m_currentPosition, this ); diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 3e806c25b..1300aa72f 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -65,7 +65,7 @@ #include "SongEditor.h" #include "templates.h" #include "text_float.h" -#include "timeline.h" +#include "Timeline.h" #include "tool_button.h" #include "text_float.h" @@ -291,7 +291,7 @@ PianoRoll::PianoRoll() : setAttribute( Qt::WA_OpaquePaintEvent, true ); // add time-line - m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt, + m_timeLine = new Timeline( WHITE_KEY_WIDTH, 32, m_ppt, Engine::getSong()->getPlayPos( Song::Mode_PlayPattern ), m_currentPosition, this ); @@ -4166,7 +4166,7 @@ void PianoRoll::updatePosition( const MidiTime & _t ) if( ( Engine::getSong()->isPlaying() && Engine::getSong()->playMode() == Song::Mode_PlayPattern && - m_timeLine->autoScroll() == timeLine::AutoScrollEnabled ) || + m_timeLine->autoScroll() == Timeline::AutoScrollEnabled ) || m_scrollBack == true ) { autoScroll( _t ); diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index c19d1883b..4755afb64 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -45,7 +45,7 @@ #include "MainWindow.h" #include "MeterDialog.h" #include "text_float.h" -#include "timeline.h" +#include "Timeline.h" #include "tool_button.h" #include "tooltip.h" #include "visualization_widget.h" @@ -91,7 +91,7 @@ SongEditor::SongEditor( Song * _song ) : "compacttrackbuttons" ).toInt()==1 ? DEFAULT_SETTINGS_WIDGET_WIDTH_COMPACT + TRACK_OP_WIDTH_COMPACT : DEFAULT_SETTINGS_WIDGET_WIDTH + TRACK_OP_WIDTH; - m_timeLine = new timeLine( widgetTotal, 32, + m_timeLine = new Timeline( widgetTotal, 32, pixelsPerTact(), m_song->m_playPos[Song::Mode_PlaySong], m_currentPosition, this ); @@ -717,7 +717,7 @@ void SongEditor::updatePosition( const MidiTime & _t ) } if( ( m_song->isPlaying() && m_song->m_playMode == Song::Mode_PlaySong - && m_timeLine->autoScroll() == timeLine::AutoScrollEnabled) || + && m_timeLine->autoScroll() == Timeline::AutoScrollEnabled) || m_scrollBack == true ) { const int w = width() - widgetWidth