Merge https://github.com/LMMS/lmms into bugs_283_303
This commit is contained in:
@@ -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 ) );
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "engine.h"
|
||||
#include "config_mgr.h"
|
||||
#include "SamplePlayHandle.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.h"
|
||||
#include "MicroTimer.h"
|
||||
#include "atomic_int.h"
|
||||
|
||||
@@ -556,7 +556,7 @@ const surroundSampleFrame * Mixer::renderNextBuffer()
|
||||
song::playPos p = engine::getSong()->getPlayPos(
|
||||
song::Mode_PlayPattern );
|
||||
if( engine::getSong()->playMode() == song::Mode_PlayPattern &&
|
||||
engine::getPianoRoll()->isRecording() == true &&
|
||||
engine::pianoRoll()->isRecording() == true &&
|
||||
p != last_metro_pos && p.getTicks() %
|
||||
(DefaultTicksPerTact / 4 ) == 0 )
|
||||
{
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
#include "MainWindow.h"
|
||||
#include "Mixer.h"
|
||||
#include "pattern.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.h"
|
||||
#include "PresetPreviewPlayHandle.h"
|
||||
#include "ProjectJournal.h"
|
||||
#include "project_notes.h"
|
||||
#include "Plugin.h"
|
||||
#include "song_editor.h"
|
||||
#include "SongEditor.h"
|
||||
#include "song.h"
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@ 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;
|
||||
PianoRoll* engine::s_pianoRoll = NULL;
|
||||
projectNotes * engine::s_projectNotes = NULL;
|
||||
ProjectJournal * engine::s_projectJournal = NULL;
|
||||
ladspa2LMMS * engine::s_ladspaManager = NULL;
|
||||
@@ -89,12 +89,12 @@ 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;
|
||||
s_bbEditor = new bbEditor( s_bbTrackContainer );
|
||||
s_pianoRoll = new pianoRoll;
|
||||
s_pianoRoll = new PianoRoll;
|
||||
s_automationEditor = new AutomationEditor;
|
||||
|
||||
s_mainWindow->finalize();
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
#include "DataFile.h"
|
||||
#include "NotePlayHandle.h"
|
||||
#include "pattern.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.h"
|
||||
#include "ProjectJournal.h"
|
||||
#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() )
|
||||
{
|
||||
@@ -935,11 +935,9 @@ void song::loadProject( const QString & _file_name )
|
||||
engine::getControllerRackView()->
|
||||
restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() ==
|
||||
engine::getPianoRoll()->nodeName() )
|
||||
else if( node.nodeName() == engine::pianoRoll()->nodeName() )
|
||||
{
|
||||
engine::getPianoRoll()->restoreState(
|
||||
node.toElement() );
|
||||
engine::pianoRoll()->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() ==
|
||||
engine::automationEditor()->
|
||||
@@ -1015,7 +1013,7 @@ bool song::saveProjectFile( const QString & _filename )
|
||||
if( engine::hasGUI() )
|
||||
{
|
||||
engine::getControllerRackView()->saveState( dataFile, dataFile.content() );
|
||||
engine::getPianoRoll()->saveState( dataFile, dataFile.content() );
|
||||
engine::pianoRoll()->saveState( dataFile, dataFile.content() );
|
||||
engine::automationEditor()->saveState( dataFile, dataFile.content() );
|
||||
engine::getProjectNotes()->
|
||||
SerializingObject::saveState( dataFile, dataFile.content() );
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <math.h>
|
||||
|
||||
|
||||
#include "song_editor.h"
|
||||
#include "SongEditor.h"
|
||||
#include "MainWindow.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
@@ -61,7 +61,7 @@
|
||||
#include "text_float.h"
|
||||
#include "combobox.h"
|
||||
#include "bb_track_container.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.h"
|
||||
#include "debug.h"
|
||||
#include "MeterModel.h"
|
||||
|
||||
@@ -567,7 +567,7 @@ void AutomationEditor::update()
|
||||
// Note detuning?
|
||||
if( m_pattern && !m_pattern->getTrack() )
|
||||
{
|
||||
engine::getPianoRoll()->update();
|
||||
engine::pianoRoll()->update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1885,8 +1885,7 @@ void AutomationEditor::play()
|
||||
if( engine::getSong()->playMode() != song::Mode_PlayPattern )
|
||||
{
|
||||
engine::getSong()->stop();
|
||||
engine::getSong()->playPattern( (pattern *)
|
||||
engine::getPianoRoll()->currentPattern() );
|
||||
engine::getSong()->playPattern( (pattern *) engine::pianoRoll()->currentPattern() );
|
||||
}
|
||||
else if( engine::getSong()->isStopped() == false )
|
||||
{
|
||||
@@ -1894,8 +1893,7 @@ void AutomationEditor::play()
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getSong()->playPattern( (pattern *)
|
||||
engine::getPianoRoll()->currentPattern() );
|
||||
engine::getSong()->playPattern( (pattern *) engine::pianoRoll()->currentPattern() );
|
||||
}
|
||||
}
|
||||
else if( inBBEditor() )
|
||||
@@ -2197,7 +2195,7 @@ void AutomationEditor::cutSelectedValues()
|
||||
}
|
||||
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
}
|
||||
|
||||
|
||||
@@ -2219,7 +2217,7 @@ void AutomationEditor::pasteValues()
|
||||
// least one value...
|
||||
engine::getSong()->setModified();
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2249,7 +2247,7 @@ void AutomationEditor::deleteSelectedValues()
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* main_window.cpp - implementation of LMMS-main-window
|
||||
* MainWindow.cpp - implementation of LMMS-main-window
|
||||
*
|
||||
* Copyright (c) 2004-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -37,9 +37,9 @@
|
||||
#include "lmmsversion.h"
|
||||
#include "MainWindow.h"
|
||||
#include "bb_editor.h"
|
||||
#include "song_editor.h"
|
||||
#include "SongEditor.h"
|
||||
#include "song.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "FxMixerView.h"
|
||||
@@ -867,7 +867,7 @@ void MainWindow::toggleBBEditorWin( bool forceShow )
|
||||
|
||||
void MainWindow::toggleSongEditorWin( void )
|
||||
{
|
||||
toggleWindow( engine::getSongEditor() );
|
||||
toggleWindow( engine::songEditor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ void MainWindow::toggleProjectNotesWin( void )
|
||||
|
||||
void MainWindow::togglePianoRollWin( void )
|
||||
{
|
||||
toggleWindow( engine::getPianoRoll() );
|
||||
toggleWindow( engine::pianoRoll() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* piano_roll.cpp - implementation of piano-roll which is used for actual
|
||||
* PianoRoll.cpp - implementation of piano roll which is used for actual
|
||||
* writing of melodies
|
||||
*
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "config_mgr.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.h"
|
||||
#include "bb_track_container.h"
|
||||
#include "Clipboard.h"
|
||||
#include "combobox.h"
|
||||
@@ -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"
|
||||
@@ -114,20 +114,20 @@ const int NUM_TRIPLET_LENGTHS = 5;
|
||||
|
||||
|
||||
|
||||
QPixmap * pianoRoll::s_whiteKeySmallPm = NULL;
|
||||
QPixmap * pianoRoll::s_whiteKeySmallPressedPm = NULL;
|
||||
QPixmap * pianoRoll::s_whiteKeyBigPm = NULL;
|
||||
QPixmap * pianoRoll::s_whiteKeyBigPressedPm = NULL;
|
||||
QPixmap * pianoRoll::s_blackKeyPm = NULL;
|
||||
QPixmap * pianoRoll::s_blackKeyPressedPm = NULL;
|
||||
QPixmap * pianoRoll::s_toolDraw = NULL;
|
||||
QPixmap * pianoRoll::s_toolErase = NULL;
|
||||
QPixmap * pianoRoll::s_toolSelect = NULL;
|
||||
QPixmap * pianoRoll::s_toolMove = NULL;
|
||||
QPixmap * pianoRoll::s_toolOpen = NULL;
|
||||
QPixmap * PianoRoll::s_whiteKeySmallPm = NULL;
|
||||
QPixmap * PianoRoll::s_whiteKeySmallPressedPm = NULL;
|
||||
QPixmap * PianoRoll::s_whiteKeyBigPm = NULL;
|
||||
QPixmap * PianoRoll::s_whiteKeyBigPressedPm = NULL;
|
||||
QPixmap * PianoRoll::s_blackKeyPm = NULL;
|
||||
QPixmap * PianoRoll::s_blackKeyPressedPm = NULL;
|
||||
QPixmap * PianoRoll::s_toolDraw = NULL;
|
||||
QPixmap * PianoRoll::s_toolErase = NULL;
|
||||
QPixmap * PianoRoll::s_toolSelect = NULL;
|
||||
QPixmap * PianoRoll::s_toolMove = NULL;
|
||||
QPixmap * PianoRoll::s_toolOpen = NULL;
|
||||
|
||||
// used for drawing of piano
|
||||
pianoRoll::pianoRollKeyTypes pianoRoll::prKeyOrder[] =
|
||||
PianoRoll::PianoRollKeyTypes PianoRoll::prKeyOrder[] =
|
||||
{
|
||||
PR_WHITE_KEY_SMALL, PR_BLACK_KEY, PR_WHITE_KEY_BIG, PR_BLACK_KEY,
|
||||
PR_WHITE_KEY_SMALL, PR_WHITE_KEY_SMALL, PR_BLACK_KEY, PR_WHITE_KEY_BIG,
|
||||
@@ -138,7 +138,7 @@ pianoRoll::pianoRollKeyTypes pianoRoll::prKeyOrder[] =
|
||||
const int DEFAULT_PR_PPT = KEY_LINE_HEIGHT * DefaultStepsPerTact;
|
||||
|
||||
|
||||
pianoRoll::pianoRoll() :
|
||||
PianoRoll::PianoRoll() :
|
||||
m_nemStr( QVector<QString>() ),
|
||||
m_noteEditMenu( NULL ),
|
||||
m_semiToneMarkerMenu( NULL ),
|
||||
@@ -641,14 +641,14 @@ pianoRoll::pianoRoll() :
|
||||
}
|
||||
|
||||
|
||||
void pianoRoll::changeNoteEditMode( int i )
|
||||
void PianoRoll::changeNoteEditMode( int i )
|
||||
{
|
||||
m_noteEditMode = (noteEditMode) i;
|
||||
repaint();
|
||||
}
|
||||
|
||||
|
||||
void pianoRoll::markSemiTone( int i )
|
||||
void PianoRoll::markSemiTone( int i )
|
||||
{
|
||||
const int key = getKey( mapFromGlobal( m_semiToneMarkerMenu->pos() ).y() );
|
||||
const InstrumentFunctionNoteStacking::Chord * chord = 0;
|
||||
@@ -715,12 +715,12 @@ void pianoRoll::markSemiTone( int i )
|
||||
}
|
||||
|
||||
|
||||
pianoRoll::~pianoRoll()
|
||||
PianoRoll::~PianoRoll()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void pianoRoll::setCurrentPattern( pattern * _new_pattern )
|
||||
void PianoRoll::setCurrentPattern( pattern * _new_pattern )
|
||||
{
|
||||
if( validPattern() )
|
||||
{
|
||||
@@ -784,7 +784,7 @@ void pianoRoll::setCurrentPattern( pattern * _new_pattern )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
void PianoRoll::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
{
|
||||
MainWindow::saveWidgetState( this, _this );
|
||||
}
|
||||
@@ -792,7 +792,7 @@ void pianoRoll::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::loadSettings( const QDomElement & _this )
|
||||
void PianoRoll::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
MainWindow::restoreWidgetState( this, _this );
|
||||
}
|
||||
@@ -800,7 +800,7 @@ void pianoRoll::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::setPauseIcon( bool pause )
|
||||
void PianoRoll::setPauseIcon( bool pause )
|
||||
{
|
||||
if( pause == true )
|
||||
{
|
||||
@@ -815,7 +815,7 @@ void pianoRoll::setPauseIcon( bool pause )
|
||||
|
||||
|
||||
|
||||
inline void pianoRoll::drawNoteRect( QPainter & _p, int _x, int _y,
|
||||
inline void PianoRoll::drawNoteRect( QPainter & _p, int _x, int _y,
|
||||
int _width, note * _n )
|
||||
{
|
||||
++_x;
|
||||
@@ -904,7 +904,7 @@ inline void pianoRoll::drawNoteRect( QPainter & _p, int _x, int _y,
|
||||
|
||||
|
||||
|
||||
inline void pianoRoll::drawDetuningInfo( QPainter & _p, note * _n, int _x,
|
||||
inline void PianoRoll::drawDetuningInfo( QPainter & _p, note * _n, int _x,
|
||||
int _y )
|
||||
{
|
||||
int middle_y = _y + KEY_LINE_HEIGHT / 2;
|
||||
@@ -953,7 +953,7 @@ inline void pianoRoll::drawDetuningInfo( QPainter & _p, note * _n, int _x,
|
||||
|
||||
|
||||
|
||||
void pianoRoll::removeSelection()
|
||||
void PianoRoll::removeSelection()
|
||||
{
|
||||
m_selectStartTick = 0;
|
||||
m_selectedTick = 0;
|
||||
@@ -966,7 +966,7 @@ void pianoRoll::removeSelection()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::clearSelectedNotes()
|
||||
void PianoRoll::clearSelectedNotes()
|
||||
{
|
||||
if( m_pattern != NULL )
|
||||
{
|
||||
@@ -987,7 +987,7 @@ void pianoRoll::clearSelectedNotes()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::closeEvent( QCloseEvent * _ce )
|
||||
void PianoRoll::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
if( parentWidget() )
|
||||
@@ -1004,7 +1004,7 @@ void pianoRoll::closeEvent( QCloseEvent * _ce )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::shiftSemiTone( int amount ) // shift notes by amount semitones
|
||||
void PianoRoll::shiftSemiTone( int amount ) // shift notes by amount semitones
|
||||
{
|
||||
bool useAllNotes = ! isSelection();
|
||||
const NoteVector & notes = m_pattern->notes();
|
||||
@@ -1021,14 +1021,14 @@ void pianoRoll::shiftSemiTone( int amount ) // shift notes by amount semitones
|
||||
|
||||
// we modified the song
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void pianoRoll::shiftPos( int amount ) //shift notes pos by amount
|
||||
void PianoRoll::shiftPos( int amount ) //shift notes pos by amount
|
||||
{
|
||||
bool useAllNotes = ! isSelection();
|
||||
const NoteVector & notes = m_pattern->notes();
|
||||
@@ -1057,13 +1057,13 @@ void pianoRoll::shiftPos( int amount ) //shift notes pos by amount
|
||||
|
||||
// we modified the song
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool pianoRoll::isSelection() const // are any notes selected?
|
||||
bool PianoRoll::isSelection() const // are any notes selected?
|
||||
{
|
||||
const NoteVector & notes = m_pattern->notes();
|
||||
for( NoteVector::ConstIterator it = notes.begin(); it != notes.end(); ++it )
|
||||
@@ -1079,7 +1079,7 @@ bool pianoRoll::isSelection() const // are any notes selected?
|
||||
|
||||
|
||||
|
||||
int pianoRoll::selectionCount() const // how many notes are selected?
|
||||
int PianoRoll::selectionCount() const // how many notes are selected?
|
||||
{
|
||||
int sum = 0;
|
||||
|
||||
@@ -1097,7 +1097,7 @@ int pianoRoll::selectionCount() const // how many notes are selected?
|
||||
|
||||
|
||||
|
||||
void pianoRoll::keyPressEvent( QKeyEvent* event )
|
||||
void PianoRoll::keyPressEvent( QKeyEvent* event )
|
||||
{
|
||||
if( validPattern() && event->modifiers() == Qt::NoModifier )
|
||||
{
|
||||
@@ -1373,7 +1373,7 @@ void pianoRoll::keyPressEvent( QKeyEvent* event )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::keyReleaseEvent( QKeyEvent* event )
|
||||
void PianoRoll::keyReleaseEvent( QKeyEvent* event )
|
||||
{
|
||||
if( validPattern() && event->modifiers() == Qt::NoModifier )
|
||||
{
|
||||
@@ -1401,7 +1401,7 @@ void pianoRoll::keyReleaseEvent( QKeyEvent* event )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::leaveEvent( QEvent * _e )
|
||||
void PianoRoll::leaveEvent( QEvent * _e )
|
||||
{
|
||||
while( QApplication::overrideCursor() != NULL )
|
||||
{
|
||||
@@ -1414,7 +1414,7 @@ void pianoRoll::leaveEvent( QEvent * _e )
|
||||
|
||||
|
||||
|
||||
inline int pianoRoll::noteEditTop() const
|
||||
inline int PianoRoll::noteEditTop() const
|
||||
{
|
||||
return height() - PR_BOTTOM_MARGIN -
|
||||
m_notesEditHeight + NOTE_EDIT_RESIZE_BAR;
|
||||
@@ -1423,7 +1423,7 @@ inline int pianoRoll::noteEditTop() const
|
||||
|
||||
|
||||
|
||||
inline int pianoRoll::noteEditBottom() const
|
||||
inline int PianoRoll::noteEditBottom() const
|
||||
{
|
||||
return height() - PR_BOTTOM_MARGIN;
|
||||
}
|
||||
@@ -1431,7 +1431,7 @@ inline int pianoRoll::noteEditBottom() const
|
||||
|
||||
|
||||
|
||||
inline int pianoRoll::noteEditRight() const
|
||||
inline int PianoRoll::noteEditRight() const
|
||||
{
|
||||
return width() - PR_RIGHT_MARGIN;
|
||||
}
|
||||
@@ -1439,7 +1439,7 @@ inline int pianoRoll::noteEditRight() const
|
||||
|
||||
|
||||
|
||||
inline int pianoRoll::noteEditLeft() const
|
||||
inline int PianoRoll::noteEditLeft() const
|
||||
{
|
||||
return WHITE_KEY_WIDTH;
|
||||
}
|
||||
@@ -1447,7 +1447,7 @@ inline int pianoRoll::noteEditLeft() const
|
||||
|
||||
|
||||
|
||||
inline int pianoRoll::keyAreaTop() const
|
||||
inline int PianoRoll::keyAreaTop() const
|
||||
{
|
||||
return PR_TOP_MARGIN;
|
||||
}
|
||||
@@ -1455,7 +1455,7 @@ inline int pianoRoll::keyAreaTop() const
|
||||
|
||||
|
||||
|
||||
inline int pianoRoll::keyAreaBottom() const
|
||||
inline int PianoRoll::keyAreaBottom() const
|
||||
{
|
||||
return height() - PR_BOTTOM_MARGIN - m_notesEditHeight;
|
||||
}
|
||||
@@ -1463,7 +1463,7 @@ inline int pianoRoll::keyAreaBottom() const
|
||||
|
||||
|
||||
|
||||
void pianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
void PianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1837,7 +1837,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::mouseDoubleClickEvent( QMouseEvent * _me )
|
||||
void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -1855,11 +1855,11 @@ void pianoRoll::mouseDoubleClickEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::testPlayNote( note * n )
|
||||
void PianoRoll::testPlayNote( note * n )
|
||||
{
|
||||
m_lastKey = n->key();
|
||||
|
||||
//if( ! n->isPlaying() && ! m_recording && ! engine::getSong()->isPlaying() )
|
||||
if( n->isPlaying() == false && m_recording == false )
|
||||
{
|
||||
n->setIsPlaying( true );
|
||||
m_pattern->instrumentTrack()->pianoModel()->handleKeyPress( n->key(), n->midiVelocity() );
|
||||
@@ -1875,7 +1875,7 @@ void pianoRoll::testPlayNote( note * n )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::pauseTestNotes( bool _pause )
|
||||
void PianoRoll::pauseTestNotes( bool _pause )
|
||||
{
|
||||
const NoteVector & notes = m_pattern->notes();
|
||||
NoteVector::ConstIterator it = notes.begin();
|
||||
@@ -1903,7 +1903,7 @@ void pianoRoll::pauseTestNotes( bool _pause )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::testPlayKey( int key, int velocity, int pan )
|
||||
void PianoRoll::testPlayKey( int key, int velocity, int pan )
|
||||
{
|
||||
// turn off old key
|
||||
m_pattern->instrumentTrack()->pianoModel()->handleKeyRelease( m_lastKey );
|
||||
@@ -1918,7 +1918,7 @@ void pianoRoll::testPlayKey( int key, int velocity, int pan )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::computeSelectedNotes(bool shift)
|
||||
void PianoRoll::computeSelectedNotes(bool shift)
|
||||
{
|
||||
if( m_selectStartTick == 0 &&
|
||||
m_selectedTick == 0 &&
|
||||
@@ -1999,7 +1999,7 @@ void pianoRoll::computeSelectedNotes(bool shift)
|
||||
|
||||
|
||||
|
||||
void pianoRoll::mouseReleaseEvent( QMouseEvent * _me )
|
||||
void PianoRoll::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
bool mustRepaint = false;
|
||||
|
||||
@@ -2085,7 +2085,7 @@ void pianoRoll::mouseReleaseEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
void PianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -2518,7 +2518,7 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::dragNotes( int x, int y, bool alt, bool shift )
|
||||
void PianoRoll::dragNotes( int x, int y, bool alt, bool shift )
|
||||
{
|
||||
// dragging one or more notes around
|
||||
|
||||
@@ -2698,7 +2698,7 @@ static void printNoteHeights(QPainter& p, int bottom, int width, int startKey)
|
||||
}
|
||||
}
|
||||
|
||||
void pianoRoll::paintEvent( QPaintEvent * _pe )
|
||||
void PianoRoll::paintEvent( QPaintEvent * _pe )
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.initFrom( this );
|
||||
@@ -3202,7 +3202,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
|
||||
|
||||
|
||||
// responsible for moving/resizing scrollbars after window-resizing
|
||||
void pianoRoll::resizeEvent( QResizeEvent * )
|
||||
void PianoRoll::resizeEvent( QResizeEvent * )
|
||||
{
|
||||
m_leftRightScroll->setGeometry( WHITE_KEY_WIDTH, height() -
|
||||
SCROLLBAR_SIZE,
|
||||
@@ -3235,7 +3235,7 @@ void pianoRoll::resizeEvent( QResizeEvent * )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::wheelEvent( QWheelEvent * _we )
|
||||
void PianoRoll::wheelEvent( QWheelEvent * _we )
|
||||
{
|
||||
_we->accept();
|
||||
if( _we->modifiers() & Qt::ControlModifier )
|
||||
@@ -3274,7 +3274,7 @@ void pianoRoll::wheelEvent( QWheelEvent * _we )
|
||||
|
||||
|
||||
|
||||
int pianoRoll::getKey( int _y ) const
|
||||
int PianoRoll::getKey( int _y ) const
|
||||
{
|
||||
int key_line_y = keyAreaBottom() - 1;
|
||||
// pressed key on piano
|
||||
@@ -3298,7 +3298,7 @@ int pianoRoll::getKey( int _y ) const
|
||||
|
||||
|
||||
|
||||
song::PlayModes pianoRoll::desiredPlayModeForAccompany() const
|
||||
song::PlayModes PianoRoll::desiredPlayModeForAccompany() const
|
||||
{
|
||||
if( m_pattern->getTrack()->trackContainer() ==
|
||||
engine::getBBTrackContainer() )
|
||||
@@ -3311,7 +3311,7 @@ song::PlayModes pianoRoll::desiredPlayModeForAccompany() const
|
||||
|
||||
|
||||
|
||||
void pianoRoll::play()
|
||||
void PianoRoll::play()
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -3331,7 +3331,7 @@ void pianoRoll::play()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::record()
|
||||
void PianoRoll::record()
|
||||
{
|
||||
if( engine::getSong()->isPlaying() )
|
||||
{
|
||||
@@ -3350,7 +3350,7 @@ void pianoRoll::record()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::recordAccompany()
|
||||
void PianoRoll::recordAccompany()
|
||||
{
|
||||
if( engine::getSong()->isPlaying() )
|
||||
{
|
||||
@@ -3377,7 +3377,7 @@ void pianoRoll::recordAccompany()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::stop()
|
||||
void PianoRoll::stop()
|
||||
{
|
||||
engine::getSong()->stop();
|
||||
m_recording = false;
|
||||
@@ -3387,7 +3387,7 @@ void pianoRoll::stop()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::startRecordNote( const note & _n )
|
||||
void PianoRoll::startRecordNote( const note & _n )
|
||||
{
|
||||
if( m_recording == true && validPattern() == true &&
|
||||
engine::getSong()->isPlaying() &&
|
||||
@@ -3414,7 +3414,7 @@ void pianoRoll::startRecordNote( const note & _n )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::finishRecordNote( const note & _n )
|
||||
void PianoRoll::finishRecordNote( const note & _n )
|
||||
{
|
||||
if( m_recording == true && validPattern() == true &&
|
||||
engine::getSong()->isPlaying() &&
|
||||
@@ -3444,7 +3444,7 @@ void pianoRoll::finishRecordNote( const note & _n )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::horScrolled( int _new_pos )
|
||||
void PianoRoll::horScrolled( int _new_pos )
|
||||
{
|
||||
m_currentPosition = _new_pos;
|
||||
emit positionChanged( m_currentPosition );
|
||||
@@ -3454,7 +3454,7 @@ void pianoRoll::horScrolled( int _new_pos )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::verScrolled( int _new_pos )
|
||||
void PianoRoll::verScrolled( int _new_pos )
|
||||
{
|
||||
// revert value
|
||||
m_startKey = m_totalKeysToScroll - _new_pos;
|
||||
@@ -3465,7 +3465,7 @@ void pianoRoll::verScrolled( int _new_pos )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::drawButtonToggled()
|
||||
void PianoRoll::drawButtonToggled()
|
||||
{
|
||||
m_editMode = ModeDraw;
|
||||
update();
|
||||
@@ -3474,7 +3474,7 @@ void pianoRoll::drawButtonToggled()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::eraseButtonToggled()
|
||||
void PianoRoll::eraseButtonToggled()
|
||||
{
|
||||
m_editMode = ModeErase;
|
||||
update();
|
||||
@@ -3483,7 +3483,7 @@ void pianoRoll::eraseButtonToggled()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::selectButtonToggled()
|
||||
void PianoRoll::selectButtonToggled()
|
||||
{
|
||||
m_editMode = ModeSelect;
|
||||
update();
|
||||
@@ -3491,7 +3491,7 @@ void pianoRoll::selectButtonToggled()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::detuneButtonToggled()
|
||||
void PianoRoll::detuneButtonToggled()
|
||||
{
|
||||
m_editMode = ModeEditDetuning;
|
||||
update();
|
||||
@@ -3499,7 +3499,7 @@ void pianoRoll::detuneButtonToggled()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::selectAll()
|
||||
void PianoRoll::selectAll()
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -3557,7 +3557,7 @@ void pianoRoll::selectAll()
|
||||
|
||||
|
||||
// returns vector with pointers to all selected notes
|
||||
void pianoRoll::getSelectedNotes( NoteVector & _selected_notes )
|
||||
void PianoRoll::getSelectedNotes( NoteVector & _selected_notes )
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -3579,7 +3579,7 @@ void pianoRoll::getSelectedNotes( NoteVector & _selected_notes )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::copy_to_clipboard( const NoteVector & _notes ) const
|
||||
void PianoRoll::copy_to_clipboard( const NoteVector & _notes ) const
|
||||
{
|
||||
DataFile dataFile( DataFile::ClipboardData );
|
||||
QDomElement note_list = dataFile.createElement( "note-list" );
|
||||
@@ -3603,7 +3603,7 @@ void pianoRoll::copy_to_clipboard( const NoteVector & _notes ) const
|
||||
|
||||
|
||||
|
||||
void pianoRoll::copySelectedNotes()
|
||||
void PianoRoll::copySelectedNotes()
|
||||
{
|
||||
NoteVector selected_notes;
|
||||
getSelectedNotes( selected_notes );
|
||||
@@ -3617,7 +3617,7 @@ void pianoRoll::copySelectedNotes()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::cutSelectedNotes()
|
||||
void PianoRoll::cutSelectedNotes()
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -3643,13 +3643,13 @@ void pianoRoll::cutSelectedNotes()
|
||||
}
|
||||
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void pianoRoll::pasteNotes()
|
||||
void PianoRoll::pasteNotes()
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -3689,14 +3689,14 @@ void pianoRoll::pasteNotes()
|
||||
m_ctrlMode = ModeDraw;
|
||||
m_drawButton->setChecked( true );
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void pianoRoll::deleteSelectedNotes()
|
||||
void PianoRoll::deleteSelectedNotes()
|
||||
{
|
||||
if( validPattern() == false )
|
||||
{
|
||||
@@ -3732,7 +3732,7 @@ void pianoRoll::deleteSelectedNotes()
|
||||
{
|
||||
engine::getSong()->setModified();
|
||||
update();
|
||||
engine::getSongEditor()->update();
|
||||
engine::songEditor()->update();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3740,7 +3740,7 @@ void pianoRoll::deleteSelectedNotes()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::autoScroll( const MidiTime & _t )
|
||||
void PianoRoll::autoScroll( const MidiTime & _t )
|
||||
{
|
||||
const int w = width() - WHITE_KEY_WIDTH;
|
||||
if( _t > m_currentPosition + w * MidiTime::ticksPerTact() / m_ppt )
|
||||
@@ -3761,7 +3761,7 @@ void pianoRoll::autoScroll( const MidiTime & _t )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::updatePosition( const MidiTime & _t )
|
||||
void PianoRoll::updatePosition( const MidiTime & _t )
|
||||
{
|
||||
if( ( engine::getSong()->isPlaying() &&
|
||||
engine::getSong()->playMode() ==
|
||||
@@ -3776,7 +3776,7 @@ void pianoRoll::updatePosition( const MidiTime & _t )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::updatePositionAccompany( const MidiTime & _t )
|
||||
void PianoRoll::updatePositionAccompany( const MidiTime & _t )
|
||||
{
|
||||
song * s = engine::getSong();
|
||||
|
||||
@@ -3799,7 +3799,7 @@ void pianoRoll::updatePositionAccompany( const MidiTime & _t )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::zoomingChanged()
|
||||
void PianoRoll::zoomingChanged()
|
||||
{
|
||||
const QString & zfac = m_zoomingModel.currentText();
|
||||
m_ppt = zfac.left( zfac.length() - 1 ).toInt() * DEFAULT_PR_PPT / 100;
|
||||
@@ -3814,7 +3814,7 @@ void pianoRoll::zoomingChanged()
|
||||
|
||||
|
||||
|
||||
void pianoRoll::quantizeChanged()
|
||||
void PianoRoll::quantizeChanged()
|
||||
{
|
||||
if( m_quantizeModel.value() == 0 &&
|
||||
m_noteLenModel.value() == 0 )
|
||||
@@ -3827,7 +3827,7 @@ void pianoRoll::quantizeChanged()
|
||||
}
|
||||
|
||||
|
||||
int pianoRoll::quantization() const
|
||||
int PianoRoll::quantization() const
|
||||
{
|
||||
if( m_quantizeModel.value() == 0 )
|
||||
{
|
||||
@@ -3841,7 +3841,7 @@ int pianoRoll::quantization() const
|
||||
|
||||
|
||||
|
||||
void pianoRoll::updateSemiToneMarkerMenu()
|
||||
void PianoRoll::updateSemiToneMarkerMenu()
|
||||
{
|
||||
const InstrumentFunctionNoteStacking::Chord & scale = InstrumentFunctionNoteStacking::ChordTable::getInstance()
|
||||
.getScaleByName( m_scaleModel.currentText() );
|
||||
@@ -3856,7 +3856,7 @@ void pianoRoll::updateSemiToneMarkerMenu()
|
||||
|
||||
|
||||
|
||||
MidiTime pianoRoll::newNoteLen() const
|
||||
MidiTime PianoRoll::newNoteLen() const
|
||||
{
|
||||
if( m_noteLenModel.value() == 0 )
|
||||
{
|
||||
@@ -3870,7 +3870,7 @@ MidiTime pianoRoll::newNoteLen() const
|
||||
|
||||
|
||||
|
||||
bool pianoRoll::mouseOverNote()
|
||||
bool PianoRoll::mouseOverNote()
|
||||
{
|
||||
return validPattern() && noteUnderMouse() != NULL;
|
||||
}
|
||||
@@ -3878,7 +3878,7 @@ bool pianoRoll::mouseOverNote()
|
||||
|
||||
|
||||
|
||||
note * pianoRoll::noteUnderMouse()
|
||||
note * PianoRoll::noteUnderMouse()
|
||||
{
|
||||
QPoint pos = mapFromGlobal( QCursor::pos() );
|
||||
|
||||
@@ -3925,6 +3925,6 @@ note * pianoRoll::noteUnderMouse()
|
||||
|
||||
|
||||
|
||||
#include "moc_piano_roll.cxx"
|
||||
#include "moc_PianoRoll.cxx"
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "visualization_widget.h"
|
||||
#include "TimeDisplayWidget.h"
|
||||
#include "AudioDevice.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.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,16 +473,16 @@ void songEditor::recordAccompany()
|
||||
|
||||
|
||||
|
||||
void songEditor::stop()
|
||||
void SongEditor::stop()
|
||||
{
|
||||
m_s->stop();
|
||||
engine::getPianoRoll()->stopRecording();
|
||||
engine::pianoRoll()->stopRecording();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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: */
|
||||
@@ -61,7 +61,7 @@ bbEditor::bbEditor( bbTrackContainer* tc ) :
|
||||
tb_layout->setMargin( 0 );
|
||||
|
||||
|
||||
setWindowIcon( embed::getIconPixmap( "bb_track" ) );
|
||||
setWindowIcon( embed::getIconPixmap( "bb_track_btn" ) );
|
||||
setWindowTitle( tr( "Beat+Bassline Editor" ) );
|
||||
// TODO: Use style sheet
|
||||
if( configManager::inst()->value( "ui",
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "gui_templates.h"
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
#include "piano_roll.h"
|
||||
#include "PianoRoll.h"
|
||||
#include "TrackContainer.h"
|
||||
#include "rename_dialog.h"
|
||||
#include "SampleBuffer.h"
|
||||
@@ -169,9 +169,9 @@ MidiTime pattern::beatPatternLength() const
|
||||
note * pattern::addNote( const note & _new_note, const bool _quant_pos )
|
||||
{
|
||||
note * new_note = new note( _new_note );
|
||||
if( _quant_pos && engine::getPianoRoll() )
|
||||
if( _quant_pos && engine::pianoRoll() )
|
||||
{
|
||||
new_note->quantizePos( engine::getPianoRoll()->quantization() );
|
||||
new_note->quantizePos( engine::pianoRoll()->quantization() );
|
||||
}
|
||||
|
||||
engine::mixer()->lock();
|
||||
@@ -537,9 +537,9 @@ void pattern::updateBBTrack()
|
||||
engine::getBBTrackContainer()->updateBBTrack( this );
|
||||
}
|
||||
|
||||
if( engine::getPianoRoll()->currentPattern() == this )
|
||||
if( engine::pianoRoll()->currentPattern() == this )
|
||||
{
|
||||
engine::getPianoRoll()->update();
|
||||
engine::pianoRoll()->update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,9 +645,9 @@ patternView::patternView( pattern * _pattern, trackView * _parent ) :
|
||||
|
||||
patternView::~patternView()
|
||||
{
|
||||
if( engine::getPianoRoll()->currentPattern() == m_pat )
|
||||
if( engine::pianoRoll()->currentPattern() == m_pat )
|
||||
{
|
||||
engine::getPianoRoll()->setCurrentPattern( NULL );
|
||||
engine::pianoRoll()->setCurrentPattern( NULL );
|
||||
// we have to have the song-editor to stop playing if it played
|
||||
// us before
|
||||
if( engine::getSong()->isPlaying() &&
|
||||
@@ -675,9 +675,9 @@ void patternView::update()
|
||||
|
||||
void patternView::openInPianoRoll()
|
||||
{
|
||||
engine::getPianoRoll()->setCurrentPattern( m_pat );
|
||||
engine::getPianoRoll()->parentWidget()->show();
|
||||
engine::getPianoRoll()->setFocus();
|
||||
engine::pianoRoll()->setCurrentPattern( m_pat );
|
||||
engine::pianoRoll()->parentWidget()->show();
|
||||
engine::pianoRoll()->setFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -808,9 +808,9 @@ void patternView::mousePressEvent( QMouseEvent * _me )
|
||||
engine::getSong()->setModified();
|
||||
update();
|
||||
|
||||
if( engine::getPianoRoll()->currentPattern() == m_pat )
|
||||
if( engine::pianoRoll()->currentPattern() == m_pat )
|
||||
{
|
||||
engine::getPianoRoll()->update();
|
||||
engine::pianoRoll()->update();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -870,9 +870,9 @@ void patternView::wheelEvent( QWheelEvent * _we )
|
||||
|
||||
engine::getSong()->setModified();
|
||||
update();
|
||||
if( engine::getPianoRoll()->currentPattern() == m_pat )
|
||||
if( engine::pianoRoll()->currentPattern() == m_pat )
|
||||
{
|
||||
engine::getPianoRoll()->update();
|
||||
engine::pianoRoll()->update();
|
||||
}
|
||||
_we->accept();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user