SongEditor: renamed class and file name to match current coding style

This commit is contained in:
Tobias Doerffel
2014-03-09 23:25:38 +01:00
parent 24a9ef01f9
commit 0674e1434c
31 changed files with 80 additions and 83 deletions

View File

@@ -37,7 +37,7 @@
#include "config_mgr.h"
#include "project_version.h"
#include "song_editor.h"
#include "SongEditor.h"
#include "Effect.h"
#include "lmmsversion.h"
@@ -95,8 +95,8 @@ DataFile::DataFile( const QString & _fileName ) :
if( !inFile.open( QIODevice::ReadOnly ) )
{
QMessageBox::critical( NULL,
songEditor::tr( "Could not open file" ),
songEditor::tr( "Could not open file %1. You probably "
SongEditor::tr( "Could not open file" ),
SongEditor::tr( "Could not open file %1. You probably "
"have no permissions to read this "
"file.\n Please make sure to have at "
"least read permissions to the file "
@@ -190,8 +190,8 @@ bool DataFile::writeFile( const QString& filename )
if( !outfile.open( QIODevice::WriteOnly | QIODevice::Truncate ) )
{
QMessageBox::critical( NULL,
songEditor::tr( "Could not write file" ),
songEditor::tr( "Could not open %1 for writing. You probably are not permitted to "
SongEditor::tr( "Could not write file" ),
SongEditor::tr( "Could not open %1 for writing. You probably are not permitted to "
"write to this file. Please make sure you have write-access to "
"the file and try again." ).arg( fullName ) );
return false;
@@ -731,8 +731,8 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile )
{
qWarning() << "at line" << line << "column" << errorMsg;
QMessageBox::critical( NULL,
songEditor::tr( "Error in file" ),
songEditor::tr( "The file %1 seems to contain "
SongEditor::tr( "Error in file" ),
SongEditor::tr( "The file %1 seems to contain "
"errors and therefore can't be "
"loaded." ).
arg( _sourceFile ) );

View File

@@ -41,7 +41,7 @@
#include "ProjectJournal.h"
#include "project_notes.h"
#include "Plugin.h"
#include "song_editor.h"
#include "SongEditor.h"
#include "song.h"
@@ -54,7 +54,7 @@ FxMixerView * engine::s_fxMixerView = NULL;
MainWindow * engine::s_mainWindow = NULL;
bbTrackContainer * engine::s_bbTrackContainer = NULL;
song * engine::s_song = NULL;
songEditor * engine::s_songEditor = NULL;
SongEditor* engine::s_songEditor = NULL;
AutomationEditor * engine::s_automationEditor = NULL;
bbEditor * engine::s_bbEditor = NULL;
PianoRoll* engine::s_pianoRoll = NULL;
@@ -89,7 +89,7 @@ void engine::init( const bool _has_gui )
if( s_hasGUI )
{
s_mainWindow = new MainWindow;
s_songEditor = new songEditor( s_song );
s_songEditor = new SongEditor( s_song );
s_fxMixerView = new FxMixerView;
s_controllerRackView = new ControllerRackView;
s_projectNotes = new projectNotes;

View File

@@ -57,7 +57,7 @@
#include "project_notes.h"
#include "ProjectRenderer.h"
#include "rename_dialog.h"
#include "song_editor.h"
#include "SongEditor.h"
#include "templates.h"
#include "text_float.h"
#include "timeline.h"
@@ -726,9 +726,9 @@ void song::clearProject()
{
engine::getBBEditor()->clearAllTracks();
}
if( engine::getSongEditor() )
if( engine::songEditor() )
{
engine::getSongEditor()->clearAllTracks();
engine::songEditor()->clearAllTracks();
}
if( engine::fxMixerView() )
{

View File

@@ -102,7 +102,7 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt,
timeLine::~timeLine()
{
if( engine::getSongEditor() )
if( engine::songEditor() )
{
m_pos.m_timeLine = NULL;
}

View File

@@ -48,7 +48,7 @@
#include <math.h>
#include "song_editor.h"
#include "SongEditor.h"
#include "MainWindow.h"
#include "embed.h"
#include "engine.h"
@@ -2191,7 +2191,7 @@ void AutomationEditor::cutSelectedValues()
}
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
@@ -2213,7 +2213,7 @@ void AutomationEditor::pasteValues()
// least one value...
engine::getSong()->setModified();
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
}
@@ -2243,7 +2243,7 @@ void AutomationEditor::deleteSelectedValues()
{
engine::getSong()->setModified();
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
}

View File

@@ -37,7 +37,7 @@
#include "lmmsversion.h"
#include "MainWindow.h"
#include "bb_editor.h"
#include "song_editor.h"
#include "SongEditor.h"
#include "song.h"
#include "PianoRoll.h"
#include "embed.h"
@@ -867,7 +867,7 @@ void MainWindow::toggleBBEditorWin( bool forceShow )
void MainWindow::toggleSongEditorWin( void )
{
toggleWindow( engine::getSongEditor() );
toggleWindow( engine::songEditor() );
}

View File

@@ -62,7 +62,7 @@
#include "Piano.h"
#include "pixmap_button.h"
#include "song.h"
#include "song_editor.h"
#include "SongEditor.h"
#include "templates.h"
#include "text_float.h"
#include "timeline.h"
@@ -1021,7 +1021,7 @@ void PianoRoll::shiftSemiTone( int amount ) // shift notes by amount semitones
// we modified the song
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
@@ -1057,7 +1057,7 @@ void PianoRoll::shiftPos( int amount ) //shift notes pos by amount
// we modified the song
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
@@ -1745,7 +1745,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me )
// added new notes, so must update engine, song, etc
engine::getSong()->setModified();
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
}
@@ -3643,7 +3643,7 @@ void PianoRoll::cutSelectedNotes()
}
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
@@ -3689,7 +3689,7 @@ void PianoRoll::pasteNotes()
m_ctrlMode = ModeDraw;
m_drawButton->setChecked( true );
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
}
@@ -3732,7 +3732,7 @@ void PianoRoll::deleteSelectedNotes()
{
engine::getSong()->setModified();
update();
engine::getSongEditor()->update();
engine::songEditor()->update();
}
}

View File

@@ -1,5 +1,5 @@
/*
* song_editor.cpp - basic window for song-editing
* SongEditor.cpp - basic window for song-editing
*
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
@@ -35,7 +35,7 @@
#include <math.h>
#include "song_editor.h"
#include "SongEditor.h"
#include "automatable_slider.h"
#include "combobox.h"
#include "config_mgr.h"
@@ -75,7 +75,7 @@ void positionLine::paintEvent( QPaintEvent * _pe )
songEditor::songEditor( song * _song ) :
SongEditor::SongEditor( song * _song ) :
TrackContainerView( _song ),
m_s( _song ),
m_scrollBack( false ),
@@ -401,14 +401,14 @@ songEditor::songEditor( song * _song ) :
songEditor::~songEditor()
SongEditor::~SongEditor()
{
}
void songEditor::setHighQuality( bool _hq )
void SongEditor::setHighQuality( bool _hq )
{
engine::mixer()->changeQuality( Mixer::qualitySettings(
_hq ? Mixer::qualitySettings::Mode_HighQuality :
@@ -418,7 +418,7 @@ void songEditor::setHighQuality( bool _hq )
void songEditor::scrolled( int _new_pos )
void SongEditor::scrolled( int _new_pos )
{
update();
emit positionChanged( m_currentPosition = MidiTime( _new_pos, 0 ) );
@@ -427,7 +427,7 @@ void songEditor::scrolled( int _new_pos )
void songEditor::setPauseIcon( bool pause )
void SongEditor::setPauseIcon( bool pause )
{
if( pause == true )
{
@@ -442,7 +442,7 @@ void songEditor::setPauseIcon( bool pause )
void songEditor::play()
void SongEditor::play()
{
if( engine::getSong()->playMode() != song::Mode_PlaySong )
{
@@ -457,7 +457,7 @@ void songEditor::play()
void songEditor::record()
void SongEditor::record()
{
m_s->record();
}
@@ -465,7 +465,7 @@ void songEditor::record()
void songEditor::recordAccompany()
void SongEditor::recordAccompany()
{
m_s->playAndRecord();
}
@@ -473,7 +473,7 @@ void songEditor::recordAccompany()
void songEditor::stop()
void SongEditor::stop()
{
m_s->stop();
engine::pianoRoll()->stopRecording();
@@ -482,7 +482,7 @@ void songEditor::stop()
void songEditor::keyPressEvent( QKeyEvent * _ke )
void SongEditor::keyPressEvent( QKeyEvent * _ke )
{
if( /*_ke->modifiers() & Qt::ShiftModifier*/
engine::mainWindow()->isShiftPressed() == TRUE &&
@@ -536,7 +536,7 @@ void songEditor::keyPressEvent( QKeyEvent * _ke )
void songEditor::wheelEvent( QWheelEvent * _we )
void SongEditor::wheelEvent( QWheelEvent * _we )
{
if( engine::mainWindow()->isCtrlPressed() == TRUE )
{
@@ -578,7 +578,7 @@ void songEditor::wheelEvent( QWheelEvent * _we )
void songEditor::masterVolumeChanged( int _new_val )
void SongEditor::masterVolumeChanged( int _new_val )
{
masterVolumeMoved( _new_val );
if( m_mvsStatus->isVisible() == FALSE && m_s->m_loadingProject == FALSE
@@ -594,7 +594,7 @@ void songEditor::masterVolumeChanged( int _new_val )
void songEditor::masterVolumePressed( void )
void SongEditor::masterVolumePressed( void )
{
m_mvsStatus->moveGlobal( m_masterVolumeSlider,
QPoint( m_masterVolumeSlider->width() + 2, -2 ) );
@@ -605,7 +605,7 @@ void songEditor::masterVolumePressed( void )
void songEditor::masterVolumeMoved( int _new_val )
void SongEditor::masterVolumeMoved( int _new_val )
{
m_mvsStatus->setText( tr( "Value: %1%" ).arg( _new_val ) );
}
@@ -613,7 +613,7 @@ void songEditor::masterVolumeMoved( int _new_val )
void songEditor::masterVolumeReleased( void )
void SongEditor::masterVolumeReleased( void )
{
m_mvsStatus->hide();
}
@@ -621,7 +621,7 @@ void songEditor::masterVolumeReleased( void )
void songEditor::masterPitchChanged( int _new_val )
void SongEditor::masterPitchChanged( int _new_val )
{
masterPitchMoved( _new_val );
if( m_mpsStatus->isVisible() == FALSE && m_s->m_loadingProject == FALSE
@@ -636,7 +636,7 @@ void songEditor::masterPitchChanged( int _new_val )
void songEditor::masterPitchPressed( void )
void SongEditor::masterPitchPressed( void )
{
m_mpsStatus->moveGlobal( m_masterPitchSlider,
QPoint( m_masterPitchSlider->width() + 2, -2 ) );
@@ -647,7 +647,7 @@ void songEditor::masterPitchPressed( void )
void songEditor::masterPitchMoved( int _new_val )
void SongEditor::masterPitchMoved( int _new_val )
{
m_mpsStatus->setText( tr( "Value: %1 semitones").arg( _new_val ) );
@@ -656,7 +656,7 @@ void songEditor::masterPitchMoved( int _new_val )
void songEditor::masterPitchReleased( void )
void SongEditor::masterPitchReleased( void )
{
m_mpsStatus->hide();
}
@@ -664,7 +664,7 @@ void songEditor::masterPitchReleased( void )
void songEditor::updateScrollBar( int _len )
void SongEditor::updateScrollBar( int _len )
{
m_leftRightScroll->setMaximum( _len );
}
@@ -703,7 +703,7 @@ static inline void animateScroll( QScrollBar *scrollBar, int newVal, bool smooth
void songEditor::updatePosition( const MidiTime & _t )
void SongEditor::updatePosition( const MidiTime & _t )
{
int widgetWidth, trackOpWidth;
if( configManager::inst()->value( "ui", "compacttrackbuttons" ).toInt() )
@@ -758,7 +758,7 @@ void songEditor::updatePosition( const MidiTime & _t )
void songEditor::zoomingChanged()
void SongEditor::zoomingChanged()
{
const QString & zfac = m_zoomingComboBox->model()->currentText();
setPixelsPerTact( zfac.left( zfac.length() - 1 ).toInt() *
@@ -771,7 +771,7 @@ void songEditor::zoomingChanged()
void songEditor::adjustUiAfterProjectLoad()
void SongEditor::adjustUiAfterProjectLoad()
{
//if( isMaximized() )
{
@@ -787,7 +787,7 @@ void songEditor::adjustUiAfterProjectLoad()
bool songEditor::allowRubberband() const
bool SongEditor::allowRubberband() const
{
return( m_editModeButton->isChecked() );
}
@@ -795,7 +795,7 @@ bool songEditor::allowRubberband() const
#include "moc_song_editor.cxx"
#include "moc_SongEditor.cxx"
/* vim: set tw=0 noexpandtab: */

View File

@@ -37,7 +37,7 @@
#include "Mixer.h"
#include "rename_dialog.h"
#include "song.h"
#include "song_editor.h"
#include "SongEditor.h"
#include "templates.h"
#include "track_label_button.h"
@@ -264,7 +264,7 @@ void bbTCOView::changeColor()
if( isSelected() )
{
QVector<selectableObject *> selected =
engine::getSongEditor()->selectedObjects();
engine::songEditor()->selectedObjects();
for( QVector<selectableObject *>::iterator it =
selected.begin();
it != selected.end(); ++it )