diff --git a/data/locale/ca.ts b/data/locale/ca.ts index 9d3313d43..d1c3c09a5 100644 --- a/data/locale/ca.ts +++ b/data/locale/ca.ts @@ -5137,7 +5137,7 @@ usa la roda del ratolí per a ajustar el volum d'un pas - pianoRoll + PianoRoll Cut selected notes (Ctrl+X) Talla les notes seleccionades (Ctrl+X) diff --git a/data/locale/cs.ts b/data/locale/cs.ts index 07b30a56f..5f8bce501 100644 --- a/data/locale/cs.ts +++ b/data/locale/cs.ts @@ -5138,7 +5138,7 @@ k nastavení zesílení kroku použijte kolečko myši - pianoRoll + PianoRoll Play/pause current pattern (Space) Přehrát nebo pozastavit přehrávání aktuálního patternu (mezerník) diff --git a/data/locale/de.ts b/data/locale/de.ts index 12b5840c9..26a0a5b57 100644 --- a/data/locale/de.ts +++ b/data/locale/de.ts @@ -5126,7 +5126,7 @@ Lautstärke eines Steps kann mit Mausrad geändert werden - pianoRoll + PianoRoll Cut selected notes (Ctrl+X) Ausgewählte Noten ausschneiden (Strg+X) diff --git a/data/locale/en.ts b/data/locale/en.ts index ba34d3613..cd160f1af 100644 --- a/data/locale/en.ts +++ b/data/locale/en.ts @@ -5118,7 +5118,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Play/pause current pattern (Space) diff --git a/data/locale/es.ts b/data/locale/es.ts index 9e1d10373..d73635f56 100644 --- a/data/locale/es.ts +++ b/data/locale/es.ts @@ -5119,7 +5119,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Cut selected notes (Ctrl+X) Cortar las notas seleccionadas (Ctrl+X) diff --git a/data/locale/fa.ts b/data/locale/fa.ts index 4c71a2f93..6ff08c5c7 100644 --- a/data/locale/fa.ts +++ b/data/locale/fa.ts @@ -5118,7 +5118,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Cut selected notes (Ctrl+X) برش نت های انتخاب شده(Ctrl+X) diff --git a/data/locale/fr.ts b/data/locale/fr.ts index 854a11fce..f5b60e696 100644 --- a/data/locale/fr.ts +++ b/data/locale/fr.ts @@ -5150,7 +5150,7 @@ utilisez la molette de la souris pour régler le volume d'un pas - pianoRoll + PianoRoll Play/pause current pattern (Space) Jouer/Mettre en pause le motif (Barre d'espace) diff --git a/data/locale/gl.ts b/data/locale/gl.ts index b5f7b19c5..55b5983eb 100644 --- a/data/locale/gl.ts +++ b/data/locale/gl.ts @@ -5151,7 +5151,7 @@ empregue a roda do rato para modificar o volume un paso - pianoRoll + PianoRoll Play/pause current pattern (Space) Reproducir/Deter o padrón actual (Espazo) diff --git a/data/locale/it.ts b/data/locale/it.ts index 0326dfbc2..6a95d92c8 100644 --- a/data/locale/it.ts +++ b/data/locale/it.ts @@ -5150,7 +5150,7 @@ la rotellina del mouse impostare il volume delle note - pianoRoll + PianoRoll Play/pause current pattern (Space) Riproduci/metti in pausa questo pattern (Spazio) diff --git a/data/locale/ja.ts b/data/locale/ja.ts index 3f65d1986..24379e4cb 100644 --- a/data/locale/ja.ts +++ b/data/locale/ja.ts @@ -5150,7 +5150,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Play/pause current pattern (Space) 現在のパターンの再生/ポーズ (Space) diff --git a/data/locale/ko.ts b/data/locale/ko.ts index a5ebe600f..6013094d9 100644 --- a/data/locale/ko.ts +++ b/data/locale/ko.ts @@ -5121,7 +5121,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Play/pause current pattern (Space) 현재 패턴 재생/잠시 중지 (Space) diff --git a/data/locale/nl.ts b/data/locale/nl.ts index 17566d728..ea4e59a97 100644 --- a/data/locale/nl.ts +++ b/data/locale/nl.ts @@ -5122,7 +5122,7 @@ volume van de steps is met het muiswiel te veranderen - pianoRoll + PianoRoll Cut selected notes (Ctrl+X) Knip geselecteerde noten (Ctrl+X) diff --git a/data/locale/pl.ts b/data/locale/pl.ts index 860de4454..f5bd68aef 100644 --- a/data/locale/pl.ts +++ b/data/locale/pl.ts @@ -5157,7 +5157,7 @@ użyj kółka myszy aby ustawić głośność poszczególnych kroków - pianoRoll + PianoRoll Play/pause current pattern (Space) Odtwórz/zatrzymaj aktualny pattern (Spacja) diff --git a/data/locale/pt_br.ts b/data/locale/pt_br.ts index 53b0ee890..84b23a3d9 100644 --- a/data/locale/pt_br.ts +++ b/data/locale/pt_br.ts @@ -5120,7 +5120,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Play/pause current pattern (Space) Tocar/pausar padrão atual (Espaço) diff --git a/data/locale/ru.ts b/data/locale/ru.ts index eeb616069..c4dd37af3 100644 --- a/data/locale/ru.ts +++ b/data/locale/ru.ts @@ -5154,7 +5154,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Cut selected notes (Ctrl+X) Переместить выделенные ноты в буфер (Ctrl+X) diff --git a/data/locale/sv.ts b/data/locale/sv.ts index a14a8d5e1..94bf7bf86 100644 --- a/data/locale/sv.ts +++ b/data/locale/sv.ts @@ -5121,7 +5121,7 @@ use mouse wheel to set volume of a step - pianoRoll + PianoRoll Play/pause current pattern (Space) Spela/pausa aktuellt mönster (mellanslag) diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 2bd7ad126..63f007fe1 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -90,7 +90,7 @@ QMenu::indicator:selected { background-color: #747474; } -pianoRoll { +PianoRoll { background-color: rgb(0, 0, 0); } diff --git a/include/piano_roll.h b/include/PianoRoll.h similarity index 95% rename from include/piano_roll.h rename to include/PianoRoll.h index 05993c27f..c4ef75ddf 100644 --- a/include/piano_roll.h +++ b/include/PianoRoll.h @@ -1,10 +1,10 @@ /* - * piano_roll.h - declaration of class pianoRoll which is a window where you - * can set and edit notes in an easy way + * PianoRoll.h - declaration of class PianoRoll which is a window where you + * can set and edit notes in an easy way * * Copyright (c) 2004-2014 Tobias Doerffel * Copyright (c) 2008 Andrew Kelley - * + * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * * This program is free software; you can redistribute it and/or @@ -24,7 +24,6 @@ * */ - #ifndef _PIANO_ROLL_H #define _PIANO_ROLL_H @@ -50,7 +49,7 @@ class pattern; class timeLine; class toolButton; -class pianoRoll : public QWidget, public SerializingObject +class PianoRoll : public QWidget, public SerializingObject { Q_OBJECT public: @@ -186,7 +185,7 @@ private: stmaMarkCurrentChord, }; - enum pianoRollKeyTypes + enum PianoRollKeyTypes { PR_WHITE_KEY_SMALL, PR_WHITE_KEY_BIG, @@ -199,9 +198,9 @@ private: QList m_markedSemiTones; QMenu * m_semiToneMarkerMenu; // when you right click on the key area - pianoRoll(); - pianoRoll( const pianoRoll & ); - virtual ~pianoRoll(); + PianoRoll(); + PianoRoll( const PianoRoll & ); + virtual ~PianoRoll(); void autoScroll( const MidiTime & _t ); @@ -239,7 +238,7 @@ private: static QPixmap * s_toolMove; static QPixmap * s_toolOpen; - static pianoRollKeyTypes prKeyOrder[]; + static PianoRollKeyTypes prKeyOrder[]; QWidget * m_toolBar; diff --git a/include/engine.h b/include/engine.h index 0d52d040d..66a63f929 100644 --- a/include/engine.h +++ b/include/engine.h @@ -41,7 +41,7 @@ class FxMixerView; class ProjectJournal; class MainWindow; class Mixer; -class pianoRoll; +class PianoRoll; class projectNotes; class song; class songEditor; @@ -117,7 +117,7 @@ public: return s_bbEditor; } - static pianoRoll * getPianoRoll() + static PianoRoll* pianoRoll() { return s_pianoRoll; } @@ -191,7 +191,7 @@ private: static songEditor * s_songEditor; static AutomationEditor * s_automationEditor; static bbEditor * s_bbEditor; - static pianoRoll * s_pianoRoll; + static PianoRoll* s_pianoRoll; static projectNotes * s_projectNotes; static ladspa2LMMS * s_ladspaManager; diff --git a/src/core/Mixer.cpp b/src/core/Mixer.cpp index 2ec521b6f..b853c9d80 100644 --- a/src/core/Mixer.cpp +++ b/src/core/Mixer.cpp @@ -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 ) { diff --git a/src/core/engine.cpp b/src/core/engine.cpp index 2f2402747..fab2f6e77 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -36,7 +36,7 @@ #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" @@ -57,7 +57,7 @@ song * engine::s_song = 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; @@ -94,7 +94,7 @@ void engine::init( const bool _has_gui ) 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(); diff --git a/src/core/song.cpp b/src/core/song.cpp index ecfcb6387..d54fc7ed6 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -52,7 +52,7 @@ #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" @@ -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() ); diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index aa360d730..0e80e88b3 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -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" @@ -566,7 +566,7 @@ void AutomationEditor::update() // Note detuning? if( m_pattern && !m_pattern->getTrack() ) { - engine::getPianoRoll()->update(); + engine::pianoRoll()->update(); } } @@ -1881,8 +1881,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 ) { @@ -1890,8 +1889,7 @@ void AutomationEditor::play() } else { - engine::getSong()->playPattern( (pattern *) - engine::getPianoRoll()->currentPattern() ); + engine::getSong()->playPattern( (pattern *) engine::pianoRoll()->currentPattern() ); } } else if( inBBEditor() ) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index f09024fd1..588e93bbb 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -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 + * Copyright (c) 2004-2014 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -39,7 +39,7 @@ #include "bb_editor.h" #include "song_editor.h" #include "song.h" -#include "piano_roll.h" +#include "PianoRoll.h" #include "embed.h" #include "engine.h" #include "FxMixerView.h" @@ -883,7 +883,7 @@ void MainWindow::toggleProjectNotesWin( void ) void MainWindow::togglePianoRollWin( void ) { - toggleWindow( engine::getPianoRoll() ); + toggleWindow( engine::pianoRoll() ); } diff --git a/src/gui/piano_roll.cpp b/src/gui/PianoRoll.cpp similarity index 96% rename from src/gui/piano_roll.cpp rename to src/gui/PianoRoll.cpp index 966e199de..66ac82942 100644 --- a/src/gui/piano_roll.cpp +++ b/src/gui/PianoRoll.cpp @@ -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 @@ -46,7 +46,7 @@ #include #include "config_mgr.h" -#include "piano_roll.h" +#include "PianoRoll.h" #include "bb_track_container.h" #include "Clipboard.h" #include "combobox.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() ), 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(); @@ -1028,7 +1028,7 @@ void pianoRoll::shiftSemiTone( int amount ) // shift notes by amount semitones -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(); @@ -1063,7 +1063,7 @@ void pianoRoll::shiftPos( int amount ) //shift notes pos by amount -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 ) { @@ -1837,7 +1837,7 @@ void pianoRoll::mousePressEvent( QMouseEvent * _me ) -void pianoRoll::mouseDoubleClickEvent( QMouseEvent * _me ) +void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me ) { if( validPattern() == false ) { @@ -1855,7 +1855,7 @@ void pianoRoll::mouseDoubleClickEvent( QMouseEvent * _me ) -void pianoRoll::testPlayNote( note * n ) +void PianoRoll::testPlayNote( note * n ) { m_lastKey = n->key(); @@ -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 ) { @@ -3649,7 +3649,7 @@ void pianoRoll::cutSelectedNotes() -void pianoRoll::pasteNotes() +void PianoRoll::pasteNotes() { if( validPattern() == false ) { @@ -3696,7 +3696,7 @@ void pianoRoll::pasteNotes() -void pianoRoll::deleteSelectedNotes() +void PianoRoll::deleteSelectedNotes() { if( validPattern() == false ) { @@ -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" diff --git a/src/gui/song_editor.cpp b/src/gui/song_editor.cpp index 5ba03914d..ff9f6c066 100644 --- a/src/gui/song_editor.cpp +++ b/src/gui/song_editor.cpp @@ -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" @@ -476,7 +476,7 @@ void songEditor::recordAccompany() void songEditor::stop() { m_s->stop(); - engine::getPianoRoll()->stopRecording(); + engine::pianoRoll()->stopRecording(); } diff --git a/src/tracks/pattern.cpp b/src/tracks/pattern.cpp index 8ac83c90c..4dea0b155 100644 --- a/src/tracks/pattern.cpp +++ b/src/tracks/pattern.cpp @@ -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(); }