Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename timeLine to Timeline
  • Loading branch information
lukas-w committed Nov 26, 2014
commit ac95123d417583e25151ee35f3145af0d85271f0
4 changes: 2 additions & 2 deletions include/AutomationEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class QScrollBar;

class comboBox;
class NotePlayHandle;
class timeLine;
class Timeline;
class toolButton;


Expand Down Expand Up @@ -258,7 +258,7 @@ protected slots:
editModes m_editMode;


timeLine * m_timeLine;
Timeline * m_timeLine;
bool m_scrollBack;

void drawCross( QPainter & _p );
Expand Down
4 changes: 2 additions & 2 deletions include/PianoRoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class QSignalMapper;
class comboBox;
class NotePlayHandle;
class Pattern;
class timeLine;
class Timeline;
class toolButton;

class PianoRoll : public QWidget, public SerializingObject
Expand Down Expand Up @@ -350,7 +350,7 @@ protected slots:
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;
Expand Down
4 changes: 2 additions & 2 deletions include/Song.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

class AutomationTrack;
class Pattern;
class timeLine;
class Timeline;


const bpm_t MinTempo = 10;
Expand Down Expand Up @@ -83,7 +83,7 @@ class EXPORT Song : public TrackContainer
{
return m_currentFrame;
}
timeLine * m_timeLine;
Timeline * m_timeLine;
bool m_timeLineUpdate;

private:
Expand Down
4 changes: 2 additions & 2 deletions include/SongEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LcdSpinBox;
class MeterDialog;
class Song;
class textFloat;
class timeLine;
class Timeline;
class toolButton;

class positionLine : public QWidget
Expand Down Expand Up @@ -110,7 +110,7 @@ private slots:
toolButton * m_stopButton;
LcdSpinBox * m_tempoSpinBox;

timeLine * m_timeLine;
Timeline * m_timeLine;

MeterDialog * m_timeSigDisplay;
automatableSlider * m_masterVolumeSlider;
Expand Down
8 changes: 4 additions & 4 deletions include/timeline.h → include/Timeline.h
Original file line number Diff line number Diff line change
@@ -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 <tobydox/at/users.sourceforge.net>
*
Expand Down Expand Up @@ -36,7 +36,7 @@ class nStateButton;
class textFloat;


class timeLine : public QWidget, public JournallingObject
class Timeline : public QWidget, public JournallingObject
{
Q_OBJECT
public:
Expand All @@ -60,9 +60,9 @@ class timeLine : public QWidget, public JournallingObject
} ;


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()
{
Expand Down
14 changes: 7 additions & 7 deletions src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#include "SongEditor.h"
#include "templates.h"
#include "text_float.h"
#include "timeline.h"
#include "Timeline.h"
#include "PeakController.h"


Expand Down Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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;
Expand All @@ -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() );
Expand All @@ -589,7 +589,7 @@ void Song::stop()
}
break;

case timeLine::KeepStopPosition:
case Timeline::KeepStopPosition:
default:
break;
}
Expand Down
38 changes: 19 additions & 19 deletions src/core/timeline.cpp → src/core/Timeline.cpp
Original file line number Diff line number Diff line change
@@ -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 <tobydox/at/users.sourceforge.net>
*
Expand Down Expand Up @@ -31,7 +31,7 @@
#include <QPainter>


#include "timeline.h"
#include "Timeline.h"
#include "embed.h"
#include "Engine.h"
#include "templates.h"
Expand All @@ -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 ),
Expand Down Expand Up @@ -109,7 +109,7 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt,



timeLine::~timeLine()
Timeline::~Timeline()
{
if( Engine::songEditor() )
{
Expand All @@ -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" ) );
Expand Down Expand Up @@ -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() );
Expand All @@ -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();
Expand All @@ -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 );

Expand All @@ -200,15 +200,15 @@ void timeLine::updatePosition( const MidiTime & )



void timeLine::toggleAutoScroll( int _n )
void Timeline::toggleAutoScroll( int _n )
{
m_autoScroll = static_cast<AutoScrollStates>( _n );
}




void timeLine::toggleLoopPoints( int _n )
void Timeline::toggleLoopPoints( int _n )
{
m_loopPoints = static_cast<LoopPointStates>( _n );
update();
Expand All @@ -217,15 +217,15 @@ void timeLine::toggleLoopPoints( int _n )



void timeLine::toggleBehaviourAtStop( int _n )
void Timeline::toggleBehaviourAtStop( int _n )
{
m_behaviourAtStop = static_cast<BehaviourAtStopStates>( _n );
}




void timeLine::paintEvent( QPaintEvent * )
void Timeline::paintEvent( QPaintEvent * )
{
QPainter p( this );

Expand Down Expand Up @@ -274,7 +274,7 @@ void timeLine::paintEvent( QPaintEvent * )



void timeLine::mousePressEvent( QMouseEvent* event )
void Timeline::mousePressEvent( QMouseEvent* event )
{
if( event->x() < m_xOffset )
{
Expand Down Expand Up @@ -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<int>( qMax( event->x() - m_xOffset - m_moveXOff, 0 ) * MidiTime::ticksPerTact() / m_ppt );

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 );
Expand Down
6 changes: 3 additions & 3 deletions src/gui/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down
6 changes: 3 additions & 3 deletions src/gui/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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
Expand Down