Rename Timeline to TimeLineWidget
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user