Rename Timeline to TimeLineWidget

This commit is contained in:
Lukas W
2014-12-08 23:38:38 +01:00
parent 409e8f2700
commit 51f59293ce
11 changed files with 47 additions and 47 deletions

View File

@@ -44,7 +44,7 @@ class QScrollBar;
class ComboBox;
class NotePlayHandle;
class Timeline;
class TimeLineWidget;
@@ -226,7 +226,7 @@ private:
EditModes m_editMode;
Timeline * m_timeLine;
TimeLineWidget * m_timeLine;
bool m_scrollBack;
void drawCross(QPainter & p );

View File

@@ -28,7 +28,7 @@
#include <QMainWindow>
#include <QToolBar>
#include "Timeline.h"
#include "TimeLineWidget.h"
#include "ToolButton.h"
/// \brief Superclass for editors with a toolbar.

View File

@@ -48,7 +48,7 @@ class QSignalMapper;
class ComboBox;
class NotePlayHandle;
class Pattern;
class Timeline;
class TimeLineWidget;
class PianoRoll : public QWidget
{
@@ -317,7 +317,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;
TimeLineWidget * m_timeLine;
bool m_scrollBack;
void copy_to_clipboard( const NoteVector & _notes ) const;

View File

@@ -36,7 +36,7 @@
class AutomationTrack;
class Pattern;
class Timeline;
class TimeLineWidget;
const bpm_t MinTempo = 10;
@@ -83,7 +83,7 @@ public:
{
return m_currentFrame;
}
Timeline * m_timeLine;
TimeLineWidget * m_timeLine;
bool m_timeLineUpdate;
private:

View File

@@ -40,7 +40,7 @@ class LcdSpinBox;
class MeterDialog;
class Song;
class TextFloat;
class Timeline;
class TimeLineWidget;
class positionLine : public QWidget
{
@@ -108,7 +108,7 @@ private:
LcdSpinBox * m_tempoSpinBox;
Timeline * m_timeLine;
TimeLineWidget * m_timeLine;
MeterDialog * m_timeSigDisplay;
AutomatableSlider * m_masterVolumeSlider;

View File

@@ -1,5 +1,5 @@
/*
* Timeline.h - class timeLine, representing a time-line with position marker
* TimeLineWidget.h - class timeLine, representing a time-line with position marker
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -37,7 +37,7 @@ class NStateButton;
class TextFloat;
class Timeline : public QWidget, public JournallingObject
class TimeLineWidget : public QWidget, public JournallingObject
{
Q_OBJECT
public:
@@ -61,9 +61,9 @@ public:
} ;
Timeline( int _xoff, int _yoff, float _ppt, Song::playPos & _pos,
TimeLineWidget( int _xoff, int _yoff, float _ppt, Song::playPos & _pos,
const MidiTime & _begin, QWidget * _parent );
virtual ~Timeline();
virtual ~TimeLineWidget();
inline Song::playPos & pos()
{

View File

@@ -60,7 +60,7 @@
#include "SongEditor.h"
#include "templates.h"
#include "TextFloat.h"
#include "Timeline.h"
#include "TimeLineWidget.h"
#include "PeakController.h"
@@ -179,7 +179,7 @@ void Song::setTimeSignature()
void Song::savePos()
{
Timeline * tl = m_playPos[m_playMode].m_timeLine;
TimeLineWidget * 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;
TimeLineWidget * 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;
TimeLineWidget * 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 TimeLineWidget::BackToZero:
m_playPos[m_playMode].setTicks( 0 );
m_elapsedMilliSeconds = 0;
break;
case Timeline::BackToStart:
case TimeLineWidget::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 TimeLineWidget::KeepStopPosition:
default:
break;
}

View File

@@ -55,7 +55,7 @@
#include "PixmapButton.h"
#include "templates.h"
#include "gui_templates.h"
#include "Timeline.h"
#include "TimeLineWidget.h"
#include "ToolTip.h"
#include "TextFloat.h"
#include "ComboBox.h"
@@ -121,7 +121,7 @@ AutomationEditor::AutomationEditor() :
m_quantizeModel.setValue( m_quantizeModel.findText( "1/16" ) );
// add time-line
m_timeLine = new Timeline( VALUES_WIDTH, 0, m_ppt,
m_timeLine = new TimeLineWidget( VALUES_WIDTH, 0, m_ppt,
Engine::getSong()->getPlayPos(
Song::Mode_PlayAutomationPattern ),
m_currentPosition, this );

View File

@@ -65,7 +65,7 @@
#include "SongEditor.h"
#include "templates.h"
#include "TextFloat.h"
#include "Timeline.h"
#include "TimeLineWidget.h"
#include "TextFloat.h"
@@ -290,7 +290,7 @@ PianoRoll::PianoRoll() :
setAttribute( Qt::WA_OpaquePaintEvent, true );
// add time-line
m_timeLine = new Timeline( WHITE_KEY_WIDTH, 0, m_ppt,
m_timeLine = new TimeLineWidget( WHITE_KEY_WIDTH, 0, m_ppt,
Engine::getSong()->getPlayPos(
Song::Mode_PlayPattern ),
m_currentPosition, this );
@@ -3745,7 +3745,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() == TimeLineWidget::AutoScrollEnabled ) ||
m_scrollBack == true )
{
autoScroll( _t );

View File

@@ -45,7 +45,7 @@
#include "MainWindow.h"
#include "MeterDialog.h"
#include "TextFloat.h"
#include "Timeline.h"
#include "TimeLineWidget.h"
#include "ToolTip.h"
#include "VisualizationWidget.h"
#include "TimeDisplayWidget.h"
@@ -86,7 +86,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 TimeLineWidget( widgetTotal, 32,
pixelsPerTact(),
m_song->m_playPos[Song::Mode_PlaySong],
m_currentPosition, this );
@@ -525,7 +525,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() == TimeLineWidget::AutoScrollEnabled) ||
m_scrollBack == true )
{
const int w = width() - widgetWidth

View File

@@ -1,5 +1,5 @@
/*
* Timeline.cpp - class timeLine, representing a time-line with position marker
* TimeLineWidget.cpp - class timeLine, representing a time-line with position marker
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -32,7 +32,7 @@
#include <QToolBar>
#include "Timeline.h"
#include "TimeLineWidget.h"
#include "embed.h"
#include "Engine.h"
#include "templates.h"
@@ -46,12 +46,12 @@
#endif
QPixmap * Timeline::s_timeLinePixmap = NULL;
QPixmap * Timeline::s_posMarkerPixmap = NULL;
QPixmap * Timeline::s_loopPointBeginPixmap = NULL;
QPixmap * Timeline::s_loopPointEndPixmap = NULL;
QPixmap * TimeLineWidget::s_timeLinePixmap = NULL;
QPixmap * TimeLineWidget::s_posMarkerPixmap = NULL;
QPixmap * TimeLineWidget::s_loopPointBeginPixmap = NULL;
QPixmap * TimeLineWidget::s_loopPointEndPixmap = NULL;
Timeline::Timeline( const int _xoff, const int _yoff, const float _ppt,
TimeLineWidget::TimeLineWidget( const int _xoff, const int _yoff, const float _ppt,
Song::playPos & _pos, const MidiTime & _begin,
QWidget * _parent ) :
QWidget( _parent ),
@@ -110,7 +110,7 @@ Timeline::Timeline( const int _xoff, const int _yoff, const float _ppt,
Timeline::~Timeline()
TimeLineWidget::~TimeLineWidget()
{
if( Engine::songEditor() )
{
@@ -122,7 +122,7 @@ Timeline::~Timeline()
void Timeline::addToolButtons( QToolBar * _tool_bar )
void TimeLineWidget::addToolButtons( QToolBar * _tool_bar )
{
NStateButton * autoScroll = new NStateButton( _tool_bar );
autoScroll->setGeneralToolTip( tr( "Enable/disable auto-scrolling" ) );
@@ -161,7 +161,7 @@ void Timeline::addToolButtons( QToolBar * _tool_bar )
void Timeline::saveSettings( QDomDocument & _doc, QDomElement & _this )
void TimeLineWidget::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 TimeLineWidget::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 TimeLineWidget::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 TimeLineWidget::toggleAutoScroll( int _n )
{
m_autoScroll = static_cast<AutoScrollStates>( _n );
}
@@ -208,7 +208,7 @@ void Timeline::toggleAutoScroll( int _n )
void Timeline::toggleLoopPoints( int _n )
void TimeLineWidget::toggleLoopPoints( int _n )
{
m_loopPoints = static_cast<LoopPointStates>( _n );
update();
@@ -217,7 +217,7 @@ void Timeline::toggleLoopPoints( int _n )
void Timeline::toggleBehaviourAtStop( int _n )
void TimeLineWidget::toggleBehaviourAtStop( int _n )
{
m_behaviourAtStop = static_cast<BehaviourAtStopStates>( _n );
}
@@ -225,7 +225,7 @@ void Timeline::toggleBehaviourAtStop( int _n )
void Timeline::paintEvent( QPaintEvent * )
void TimeLineWidget::paintEvent( QPaintEvent * )
{
QPainter p( this );
@@ -274,7 +274,7 @@ void Timeline::paintEvent( QPaintEvent * )
void Timeline::mousePressEvent( QMouseEvent* event )
void TimeLineWidget::mousePressEvent( QMouseEvent* event )
{
if( event->x() < m_xOffset )
{
@@ -332,7 +332,7 @@ void Timeline::mousePressEvent( QMouseEvent* event )
void Timeline::mouseMoveEvent( QMouseEvent* event )
void TimeLineWidget::mouseMoveEvent( QMouseEvent* event )
{
const MidiTime t = m_begin + static_cast<int>( qMax( event->x() - m_xOffset - m_moveXOff, 0 ) * MidiTime::ticksPerTact() / m_ppt );
@@ -382,7 +382,7 @@ void Timeline::mouseMoveEvent( QMouseEvent* event )
void Timeline::mouseReleaseEvent( QMouseEvent* event )
void TimeLineWidget::mouseReleaseEvent( QMouseEvent* event )
{
delete m_hint;
m_hint = NULL;