From 7d0e3945e53c87480c3c2a8abf5dc79735ffeaf7 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 00:44:41 +0100 Subject: [PATCH 01/21] Rename song to Song --- include/PianoRoll.h | 4 +- include/{song.h => Song.h} | 10 +-- include/SongEditor.h | 6 +- include/engine.h | 6 +- include/timeline.h | 8 +- plugins/Amplifier/AmplifierControls.cpp | 2 +- plugins/DualFilter/DualFilterControls.cpp | 2 +- plugins/HydrogenImport/HydrogenImport.cpp | 4 +- plugins/MidiImport/MidiImport.cpp | 2 +- plugins/VstEffect/VstEffect.cpp | 2 +- .../audio_file_processor.cpp | 2 +- plugins/bit_invader/bit_invader.cpp | 2 +- plugins/delay/delaycontrols.cpp | 2 +- .../dynamics_processor_controls.cpp | 2 +- plugins/flp_import/FlpImport.cpp | 2 +- plugins/monstro/Monstro.cpp | 2 +- plugins/nes/Nes.cpp | 2 +- plugins/patman/patman.cpp | 2 +- .../peak_controller_effect.cpp | 2 +- .../peak_controller_effect_controls.cpp | 2 +- plugins/sf2_player/sf2_player.cpp | 2 +- plugins/sfxr/sfxr.cpp | 2 +- plugins/vibed/vibed.cpp | 2 +- plugins/vst_base/VstPlugin.cpp | 2 +- plugins/watsyn/Watsyn.cpp | 2 +- plugins/waveshaper/waveshaper_controls.cpp | 2 +- src/core/AutomationPattern.cpp | 2 +- src/core/Controller.cpp | 2 +- src/core/ControllerConnection.cpp | 2 +- src/core/EffectChain.cpp | 2 +- src/core/FxMixer.cpp | 2 +- src/core/LfoController.cpp | 2 +- src/core/Mixer.cpp | 10 +-- src/core/NotePlayHandle.cpp | 2 +- src/core/PeakController.cpp | 2 +- src/core/ProjectJournal.cpp | 2 +- src/core/ProjectRenderer.cpp | 6 +- src/core/{song.cpp => Song.cpp} | 86 +++++++++---------- src/core/TempoSyncKnobModel.cpp | 2 +- src/core/Track.cpp | 2 +- src/core/TrackContainer.cpp | 2 +- src/core/bb_track_container.cpp | 4 +- src/core/engine.cpp | 6 +- src/core/main.cpp | 2 +- src/core/midi/MidiAlsaSeq.cpp | 2 +- src/core/midi/MidiController.cpp | 2 +- src/core/midi/MidiPort.cpp | 2 +- src/core/timeline.cpp | 2 +- src/gui/AutomationEditor.cpp | 8 +- src/gui/ControllerConnectionDialog.cpp | 2 +- src/gui/FileBrowser.cpp | 2 +- src/gui/FxMixerView.cpp | 2 +- src/gui/MainWindow.cpp | 10 +-- src/gui/PianoRoll.cpp | 36 ++++---- src/gui/SongEditor.cpp | 66 +++++++------- src/gui/TrackContainerView.cpp | 2 +- src/gui/bb_editor.cpp | 4 +- src/gui/export_project_dialog.cpp | 2 +- src/gui/widgets/ControllerRackView.cpp | 4 +- src/gui/widgets/TimeDisplayWidget.cpp | 4 +- src/gui/widgets/knob.cpp | 2 +- src/gui/widgets/project_notes.cpp | 2 +- src/gui/widgets/tempo_sync_knob.cpp | 2 +- src/gui/widgets/visualization_widget.cpp | 2 +- src/tracks/InstrumentTrack.cpp | 2 +- src/tracks/Pattern.cpp | 2 +- src/tracks/SampleTrack.cpp | 2 +- src/tracks/bb_track.cpp | 2 +- 68 files changed, 191 insertions(+), 191 deletions(-) rename include/{song.h => Song.h} (98%) rename src/core/{song.cpp => Song.cpp} (94%) diff --git a/include/PianoRoll.h b/include/PianoRoll.h index e5fb626c8..d4ef00776 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -34,7 +34,7 @@ #include "SerializingObject.h" #include "note.h" #include "lmms_basics.h" -#include "song.h" +#include "Song.h" #include "tooltip.h" class QPainter; @@ -83,7 +83,7 @@ public: return m_pattern != NULL; } - song::PlayModes desiredPlayModeForAccompany() const; + Song::PlayModes desiredPlayModeForAccompany() const; int quantization() const; diff --git a/include/song.h b/include/Song.h similarity index 98% rename from include/song.h rename to include/Song.h index 436318b8b..24afc4377 100644 --- a/include/song.h +++ b/include/Song.h @@ -1,5 +1,5 @@ /* - * song.h - class song - the root of the model-tree + * Song.h - class song - the root of the model-tree * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -45,7 +45,7 @@ const bpm_t MaxTempo = 999; const tick_t MaxSongLength = 9999 * DefaultTicksPerTact; -class EXPORT song : public TrackContainer +class EXPORT Song : public TrackContainer { Q_OBJECT mapPropertyFromModel(int,getTempo,setTempo,m_tempoModel); @@ -300,9 +300,9 @@ private slots: private: - song(); - song( const song & ); - virtual ~song(); + Song(); + Song( const Song & ); + virtual ~Song(); inline tact_t currentTact() const diff --git a/include/SongEditor.h b/include/SongEditor.h index ff540d221..439c8d6b7 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -36,7 +36,7 @@ class automatableSlider; class comboBox; class LcdSpinBox; class MeterDialog; -class song; +class Song; class textFloat; class timeLine; class toolButton; @@ -56,7 +56,7 @@ class SongEditor : public TrackContainerView { Q_OBJECT public: - SongEditor( song * _song ); + SongEditor( Song * _song ); virtual ~SongEditor(); void setPauseIcon( bool pause ); @@ -98,7 +98,7 @@ private: virtual bool allowRubberband() const; - song * m_s; + Song * m_song; QScrollBar * m_leftRightScroll; diff --git a/include/engine.h b/include/engine.h index 7ca7e78f2..263345162 100644 --- a/include/engine.h +++ b/include/engine.h @@ -44,7 +44,7 @@ class MainWindow; class Mixer; class PianoRoll; class projectNotes; -class song; +class Song; class SongEditor; class ladspa2LMMS; class ControllerRackView; @@ -82,7 +82,7 @@ public: return s_fxMixer; } - static song * getSong() + static Song * getSong() { return s_song; } @@ -178,7 +178,7 @@ private: // core static Mixer *s_mixer; static FxMixer * s_fxMixer; - static song * s_song; + static Song * s_song; static bbTrackContainer * s_bbTrackContainer; static ProjectJournal * s_projectJournal; static DummyTrackContainer * s_dummyTC; diff --git a/include/timeline.h b/include/timeline.h index 5eb280e45..bfde02b4e 100644 --- a/include/timeline.h +++ b/include/timeline.h @@ -28,7 +28,7 @@ #include -#include "song.h" +#include "Song.h" class QPixmap; @@ -60,11 +60,11 @@ public: } ; - timeLine( int _xoff, int _yoff, float _ppt, song::playPos & _pos, + timeLine( int _xoff, int _yoff, float _ppt, Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ); virtual ~timeLine(); - inline song::playPos & pos() + inline Song::playPos & pos() { return( m_pos ); } @@ -162,7 +162,7 @@ private: int m_xOffset; int m_posMarkerX; float m_ppt; - song::playPos & m_pos; + Song::playPos & m_pos; const MidiTime & m_begin; MidiTime m_loopPos[2]; diff --git a/plugins/Amplifier/AmplifierControls.cpp b/plugins/Amplifier/AmplifierControls.cpp index 33996a577..a18d0c5a8 100644 --- a/plugins/Amplifier/AmplifierControls.cpp +++ b/plugins/Amplifier/AmplifierControls.cpp @@ -29,7 +29,7 @@ #include "AmplifierControls.h" #include "Amplifier.h" #include "engine.h" -#include "song.h" +#include "Song.h" AmplifierControls::AmplifierControls( AmplifierEffect* effect ) : diff --git a/plugins/DualFilter/DualFilterControls.cpp b/plugins/DualFilter/DualFilterControls.cpp index 531fc1323..90a0b4792 100644 --- a/plugins/DualFilter/DualFilterControls.cpp +++ b/plugins/DualFilter/DualFilterControls.cpp @@ -29,7 +29,7 @@ #include "DualFilterControls.h" #include "DualFilter.h" #include "engine.h" -#include "song.h" +#include "Song.h" #include "basic_filters.h" #include "embed.h" diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 414e1c58b..076f21e6d 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -8,7 +8,7 @@ #include "LocalFileMng.h" #include "HydrogenImport.h" -#include "song.h" +#include "Song.h" #include "engine.h" #include "Instrument.h" #include "InstrumentTrack.h" @@ -143,7 +143,7 @@ bool HydrogenImport::readSong() QHash pattern_length; QHash pattern_id; - song *s = engine::getSong(); + Song *s = engine::getSong(); int song_num_tracks = s->tracks().size(); if ( QFile( filename ).exists() == false ) { diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index a5e8476e3..d50770553 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -41,7 +41,7 @@ #include "MidiTime.h" #include "debug.h" #include "embed.h" -#include "song.h" +#include "Song.h" #include "portsmf/allegro.h" diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index 718f78e00..8d0462cba 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -25,7 +25,7 @@ #include #include "VstEffect.h" -#include "song.h" +#include "Song.h" #include "text_float.h" #include "VstSubPluginFeatures.h" diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index e2da3d1e4..b5f4b06ae 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -33,7 +33,7 @@ #include "audio_file_processor.h" #include "engine.h" -#include "song.h" +#include "Song.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" #include "interpolation.h" diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 27bb5afb1..3978440ee 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -37,7 +37,7 @@ #include "pixmap_button.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "interpolation.h" #include "embed.cpp" diff --git a/plugins/delay/delaycontrols.cpp b/plugins/delay/delaycontrols.cpp index 938b90f05..ecc91e94d 100644 --- a/plugins/delay/delaycontrols.cpp +++ b/plugins/delay/delaycontrols.cpp @@ -27,7 +27,7 @@ #include "delaycontrols.h" #include "delayeffect.h" #include "engine.h" -#include "song.h" +#include "Song.h" DelayControls::DelayControls( DelayEffect* effect ): EffectControls( effect ), diff --git a/plugins/dynamics_processor/dynamics_processor_controls.cpp b/plugins/dynamics_processor/dynamics_processor_controls.cpp index 7298669cf..3a6619853 100644 --- a/plugins/dynamics_processor/dynamics_processor_controls.cpp +++ b/plugins/dynamics_processor/dynamics_processor_controls.cpp @@ -31,7 +31,7 @@ #include "base64.h" #include "graph.h" #include "engine.h" -#include "song.h" +#include "Song.h" #define onedB 1.1220184543019633f diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index 49fff2acd..ff5399544 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -52,7 +52,7 @@ #include "Piano.h" #include "ProjectJournal.h" #include "project_notes.h" -#include "song.h" +#include "Song.h" #include "TrackContainer.h" #include "embed.h" #include "lmmsconfig.h" diff --git a/plugins/monstro/Monstro.cpp b/plugins/monstro/Monstro.cpp index 139f0b7d6..e34c36039 100644 --- a/plugins/monstro/Monstro.cpp +++ b/plugins/monstro/Monstro.cpp @@ -31,7 +31,7 @@ #include "templates.h" #include "gui_templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "lmms_math.h" #include "interpolation.h" diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index b32dc25a3..b5ee3f5e2 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -30,7 +30,7 @@ #include "InstrumentTrack.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "lmms_math.h" #include "interpolation.h" #include "Oscillator.h" diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index bb9574ea2..8a97fc577 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -35,7 +35,7 @@ #include "InstrumentTrack.h" #include "NotePlayHandle.h" #include "pixmap_button.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "tooltip.h" #include "FileDialog.h" diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index 136f22cbe..238006357 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -25,7 +25,7 @@ #include "Controller.h" -#include "song.h" +#include "Song.h" #include "PeakController.h" #include "peak_controller_effect.h" #include "lmms_math.h" diff --git a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp index 78109366b..c200903ba 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp @@ -30,7 +30,7 @@ #include "peak_controller_effect_controls.h" #include "peak_controller_effect.h" #include "PresetPreviewPlayHandle.h" -#include "song.h" +#include "Song.h" PeakControllerEffectControls:: diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index b6aefc123..9fae191fc 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -35,7 +35,7 @@ #include "InstrumentPlayHandle.h" #include "NotePlayHandle.h" #include "knob.h" -#include "song.h" +#include "Song.h" #include "patches_dialog.h" #include "tooltip.h" diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index d342a88c1..66d412ff7 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -46,7 +46,7 @@ float frnd(float range) #include "pixmap_button.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "MidiEvent.h" #include "MidiTime.h" diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index f2d0f0ed7..248944102 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -37,7 +37,7 @@ #include "string_container.h" #include "templates.h" #include "volume.h" -#include "song.h" +#include "Song.h" #include "embed.cpp" diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index 863338070..683e25951 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -48,7 +48,7 @@ #include "ConfigManager.h" #include "engine.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" #include "templates.h" #include "FileDialog.h" #include diff --git a/plugins/watsyn/Watsyn.cpp b/plugins/watsyn/Watsyn.cpp index 93bb5b4c3..8deb012a2 100644 --- a/plugins/watsyn/Watsyn.cpp +++ b/plugins/watsyn/Watsyn.cpp @@ -30,7 +30,7 @@ #include "InstrumentTrack.h" #include "templates.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "lmms_math.h" #include "interpolation.h" diff --git a/plugins/waveshaper/waveshaper_controls.cpp b/plugins/waveshaper/waveshaper_controls.cpp index 1a0a3404f..6b612234b 100644 --- a/plugins/waveshaper/waveshaper_controls.cpp +++ b/plugins/waveshaper/waveshaper_controls.cpp @@ -31,7 +31,7 @@ #include "base64.h" #include "graph.h" #include "engine.h" -#include "song.h" +#include "Song.h" #define onedB 1.1220184543019633f diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index ed7d4cf67..d89df1dde 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -34,7 +34,7 @@ #include "AutomationTrack.h" #include "ProjectJournal.h" #include "bb_track_container.h" -#include "song.h" +#include "Song.h" #include "text_float.h" #include "embed.h" diff --git a/src/core/Controller.cpp b/src/core/Controller.cpp index 41f3a54a8..3e1ee0ba5 100644 --- a/src/core/Controller.cpp +++ b/src/core/Controller.cpp @@ -29,7 +29,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "Controller.h" diff --git a/src/core/ControllerConnection.cpp b/src/core/ControllerConnection.cpp index ff18629e3..7ba723925 100644 --- a/src/core/ControllerConnection.cpp +++ b/src/core/ControllerConnection.cpp @@ -29,7 +29,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "ControllerConnection.h" diff --git a/src/core/EffectChain.cpp b/src/core/EffectChain.cpp index 708cd9698..f5bd9b95c 100644 --- a/src/core/EffectChain.cpp +++ b/src/core/EffectChain.cpp @@ -32,7 +32,7 @@ #include "debug.h" #include "DummyEffect.h" #include "MixHelpers.h" -#include "song.h" +#include "Song.h" EffectChain::EffectChain( Model * _parent ) : diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index e36f1f59d..4b6decb79 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -28,7 +28,7 @@ #include "MixerWorkerThread.h" #include "MixHelpers.h" #include "Effect.h" -#include "song.h" +#include "Song.h" #include "InstrumentTrack.h" #include "bb_track_container.h" diff --git a/src/core/LfoController.cpp b/src/core/LfoController.cpp index edcb37c7f..f72191496 100644 --- a/src/core/LfoController.cpp +++ b/src/core/LfoController.cpp @@ -29,7 +29,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "LfoController.h" diff --git a/src/core/Mixer.cpp b/src/core/Mixer.cpp index 2027fed15..0ae8743e1 100644 --- a/src/core/Mixer.cpp +++ b/src/core/Mixer.cpp @@ -28,7 +28,7 @@ #include "FxMixer.h" #include "MixHelpers.h" #include "MixerWorkerThread.h" -#include "song.h" +#include "Song.h" #include "templates.h" #include "EnvelopeAndLfoParameters.h" #include "NotePlayHandle.h" @@ -318,11 +318,11 @@ const surroundSampleFrame * Mixer::renderNextBuffer() { m_profiler.startPeriod(); - static song::playPos last_metro_pos = -1; + static Song::playPos last_metro_pos = -1; - song::playPos p = engine::getSong()->getPlayPos( - song::Mode_PlayPattern ); - if( engine::getSong()->playMode() == song::Mode_PlayPattern && + Song::playPos p = engine::getSong()->getPlayPos( + Song::Mode_PlayPattern ); + if( engine::getSong()->playMode() == Song::Mode_PlayPattern && engine::pianoRoll()->isRecording() == true && p != last_metro_pos ) { diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 16f7e0ebe..53e277370 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -32,7 +32,7 @@ #include "Instrument.h" #include "MidiEvent.h" #include "MidiPort.h" -#include "song.h" +#include "Song.h" NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) : diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index 87ea7a948..af6493048 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -30,7 +30,7 @@ #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "PeakController.h" diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index c04f81d26..662a694b6 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -27,7 +27,7 @@ #include "ProjectJournal.h" #include "engine.h" #include "JournallingObject.h" -#include "song.h" +#include "Song.h" const int ProjectJournal::MAX_UNDO_STATES = 100; // TODO: make this configurable in settings diff --git a/src/core/ProjectRenderer.cpp b/src/core/ProjectRenderer.cpp index 41c2655cc..d076cd18a 100644 --- a/src/core/ProjectRenderer.cpp +++ b/src/core/ProjectRenderer.cpp @@ -26,7 +26,7 @@ #include #include "ProjectRenderer.h" -#include "song.h" +#include "Song.h" #include "engine.h" #include "AudioFileWave.h" @@ -161,8 +161,8 @@ void ProjectRenderer::run() engine::getSong()->startExport(); - song::playPos & pp = engine::getSong()->getPlayPos( - song::Mode_PlaySong ); + Song::playPos & pp = engine::getSong()->getPlayPos( + Song::Mode_PlaySong ); m_progress = 0; const int sl = ( engine::getSong()->length() + 1 ) * 192; diff --git a/src/core/song.cpp b/src/core/Song.cpp similarity index 94% rename from src/core/song.cpp rename to src/core/Song.cpp index fb9a52f7f..07d729dc1 100644 --- a/src/core/song.cpp +++ b/src/core/Song.cpp @@ -30,7 +30,7 @@ #include -#include "song.h" +#include "Song.h" #include "AutomationTrack.h" #include "AutomationEditor.h" #include "bb_editor.h" @@ -68,7 +68,7 @@ tick_t MidiTime::s_ticksPerTact = DefaultTicksPerTact; -song::song() : +Song::Song() : TrackContainer(), m_globalAutomationTrack( dynamic_cast( Track::create( Track::HiddenAutomationTrack, @@ -118,7 +118,7 @@ song::song() : -song::~song() +Song::~Song() { m_playing = false; delete m_globalAutomationTrack; @@ -127,7 +127,7 @@ song::~song() -void song::masterVolumeChanged() +void Song::masterVolumeChanged() { engine::mixer()->setMasterGain( m_masterVolumeModel.value() / 100.0f ); @@ -136,7 +136,7 @@ void song::masterVolumeChanged() -void song::setTempo() +void Song::setTempo() { engine::mixer()->lockPlayHandleRemoval(); const bpm_t tempo = (bpm_t) m_tempoModel.value(); @@ -164,7 +164,7 @@ void song::setTempo() -void song::setTimeSignature() +void Song::setTimeSignature() { MidiTime::setTicksPerTact( ticksPerTact() ); emit timeSignatureChanged( m_oldTicksPerTact, ticksPerTact() ); @@ -177,7 +177,7 @@ void song::setTimeSignature() -void song::savePos() +void Song::savePos() { timeLine * tl = m_playPos[m_playMode].m_timeLine; @@ -190,7 +190,7 @@ void song::savePos() -void song::processNextBuffer() +void Song::processNextBuffer() { if( m_playing == false ) { @@ -389,7 +389,7 @@ void song::processNextBuffer() -void song::playSong() +void Song::playSong() { m_recording = false; @@ -412,7 +412,7 @@ void song::playSong() -void song::record() +void Song::record() { m_recording = true; // TODO: Implement @@ -421,7 +421,7 @@ void song::record() -void song::playAndRecord() +void Song::playAndRecord() { playSong(); m_recording = true; @@ -430,7 +430,7 @@ void song::playAndRecord() -void song::playTrack( Track * _trackToPlay ) +void Song::playTrack( Track * _trackToPlay ) { if( isStopped() == false ) { @@ -452,7 +452,7 @@ void song::playTrack( Track * _trackToPlay ) -void song::playBB() +void Song::playBB() { if( isStopped() == false ) { @@ -473,7 +473,7 @@ void song::playBB() -void song::playPattern( Pattern* patternToPlay, bool _loop ) +void Song::playPattern( Pattern* patternToPlay, bool _loop ) { if( isStopped() == false ) { @@ -498,7 +498,7 @@ void song::playPattern( Pattern* patternToPlay, bool _loop ) -void song::updateLength() +void Song::updateLength() { m_length = 0; m_tracksMutex.lockForRead(); @@ -519,7 +519,7 @@ void song::updateLength() -void song::setPlayPos( tick_t _ticks, PlayModes _play_mode ) +void Song::setPlayPos( tick_t _ticks, PlayModes _play_mode ) { m_elapsedTicks += m_playPos[_play_mode].getTicks() - _ticks; m_elapsedMilliSeconds += (((( _ticks - m_playPos[_play_mode].getTicks()))*60*1000/48)/getTempo()); @@ -536,7 +536,7 @@ void song::setPlayPos( tick_t _ticks, PlayModes _play_mode ) -void song::togglePause() +void Song::togglePause() { if( m_paused == true ) { @@ -557,7 +557,7 @@ void song::togglePause() -void song::stop() +void Song::stop() { // do not stop/reset things again if we're stopped already if( m_playMode == Mode_None ) @@ -616,7 +616,7 @@ void song::stop() -void song::startExport() +void Song::startExport() { stop(); @@ -630,7 +630,7 @@ void song::startExport() -void song::stopExport() +void Song::stopExport() { stop(); m_exporting = false; @@ -642,7 +642,7 @@ void song::stopExport() -void song::insertBar() +void Song::insertBar() { m_tracksMutex.lockForRead(); for( TrackList::const_iterator it = tracks().begin(); @@ -656,7 +656,7 @@ void song::insertBar() -void song::removeBar() +void Song::removeBar() { m_tracksMutex.lockForRead(); for( TrackList::const_iterator it = tracks().begin(); @@ -670,7 +670,7 @@ void song::removeBar() -void song::addBBTrack() +void Song::addBBTrack() { Track * t = Track::create( Track::BBTrack, this ); engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); @@ -679,7 +679,7 @@ void song::addBBTrack() -void song::addSampleTrack() +void Song::addSampleTrack() { (void) Track::create( Track::SampleTrack, this ); } @@ -687,7 +687,7 @@ void song::addSampleTrack() -void song::addAutomationTrack() +void Song::addAutomationTrack() { (void) Track::create( Track::AutomationTrack, this ); } @@ -695,7 +695,7 @@ void song::addAutomationTrack() -bpm_t song::getTempo() +bpm_t Song::getTempo() { return (bpm_t) m_tempoModel.value(); } @@ -703,7 +703,7 @@ bpm_t song::getTempo() -AutomationPattern * song::tempoAutomationPattern() +AutomationPattern * Song::tempoAutomationPattern() { return AutomationPattern::globalAutomationPattern( &m_tempoModel ); } @@ -711,7 +711,7 @@ AutomationPattern * song::tempoAutomationPattern() -void song::clearProject() +void Song::clearProject() { engine::projectJournal()->setJournalling( false ); @@ -793,7 +793,7 @@ void song::clearProject() // create new file -void song::createNewProject() +void Song::createNewProject() { QString default_template = ConfigManager::inst()->userProjectsDir() + "templates/default.mpt"; @@ -858,7 +858,7 @@ void song::createNewProject() -void song::createNewProjectFromTemplate( const QString & _template ) +void Song::createNewProjectFromTemplate( const QString & _template ) { loadProject( _template ); // clear file-name so that user doesn't overwrite template when @@ -876,7 +876,7 @@ void song::createNewProjectFromTemplate( const QString & _template ) // load given song -void song::loadProject( const QString & _file_name ) +void Song::loadProject( const QString & _file_name ) { QDomNode node; @@ -1005,7 +1005,7 @@ void song::loadProject( const QString & _file_name ) // only save current song as _filename and do nothing else -bool song::saveProjectFile( const QString & _filename ) +bool Song::saveProjectFile( const QString & _filename ) { DataFile::LocaleHelper localeHelper( DataFile::LocaleHelper::ModeSave ); @@ -1037,7 +1037,7 @@ bool song::saveProjectFile( const QString & _filename ) // save current song and update the gui -bool song::guiSaveProject() +bool Song::guiSaveProject() { DataFile dataFile( DataFile::SongProject ); m_fileName = dataFile.nameWithExtension( m_fileName ); @@ -1068,7 +1068,7 @@ bool song::guiSaveProject() // save current song in given filename -bool song::guiSaveProjectAs( const QString & _file_name ) +bool Song::guiSaveProjectAs( const QString & _file_name ) { QString o = m_oldFileName; m_oldFileName = m_fileName; @@ -1086,7 +1086,7 @@ bool song::guiSaveProjectAs( const QString & _file_name ) -void song::importProject() +void Song::importProject() { FileDialog ofd( NULL, tr( "Import file" ), ConfigManager::inst()->userProjectsDir(), @@ -1109,7 +1109,7 @@ void song::importProject() -void song::saveControllerStates( QDomDocument & _doc, QDomElement & _this ) +void Song::saveControllerStates( QDomDocument & _doc, QDomElement & _this ) { // save settings of controllers QDomElement controllersNode =_doc.createElement( "controllers" ); @@ -1123,7 +1123,7 @@ void song::saveControllerStates( QDomDocument & _doc, QDomElement & _this ) -void song::restoreControllerStates( const QDomElement & _this ) +void Song::restoreControllerStates( const QDomElement & _this ) { QDomNode node = _this.firstChild(); while( !node.isNull() ) @@ -1144,12 +1144,12 @@ void song::restoreControllerStates( const QDomElement & _this ) } -void song::exportProjectTracks() +void Song::exportProjectTracks() { exportProject(true); } -void song::exportProject(bool multiExport) +void Song::exportProject(bool multiExport) { if( isEmpty() ) { @@ -1229,7 +1229,7 @@ void song::exportProject(bool multiExport) -void song::updateFramesPerTick() +void Song::updateFramesPerTick() { engine::updateFramesPerTick(); } @@ -1237,7 +1237,7 @@ void song::updateFramesPerTick() -void song::setModified() +void Song::setModified() { if( !m_loadingProject ) { @@ -1253,7 +1253,7 @@ void song::setModified() -void song::addController( Controller * _c ) +void Song::addController( Controller * _c ) { if( _c != NULL && !m_controllers.contains( _c ) ) { @@ -1265,7 +1265,7 @@ void song::addController( Controller * _c ) -void song::removeController( Controller * _controller ) +void Song::removeController( Controller * _controller ) { int index = m_controllers.indexOf( _controller ); if( index != -1 ) diff --git a/src/core/TempoSyncKnobModel.cpp b/src/core/TempoSyncKnobModel.cpp index 03cdb0f4c..7d6235898 100644 --- a/src/core/TempoSyncKnobModel.cpp +++ b/src/core/TempoSyncKnobModel.cpp @@ -28,7 +28,7 @@ #include "TempoSyncKnobModel.h" #include "engine.h" -#include "song.h" +#include "Song.h" TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min, diff --git a/src/core/Track.cpp b/src/core/Track.cpp index db8d2d3f9..fdb70f2ea 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -63,7 +63,7 @@ #include "pixmap_button.h" #include "ProjectJournal.h" #include "SampleTrack.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "templates.h" #include "text_float.h" diff --git a/src/core/TrackContainer.cpp b/src/core/TrackContainer.cpp index c2027198c..fb529d159 100644 --- a/src/core/TrackContainer.cpp +++ b/src/core/TrackContainer.cpp @@ -32,7 +32,7 @@ #include "InstrumentTrack.h" #include "engine.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" TrackContainer::TrackContainer() : diff --git a/src/core/bb_track_container.cpp b/src/core/bb_track_container.cpp index f876f93fb..56015add1 100644 --- a/src/core/bb_track_container.cpp +++ b/src/core/bb_track_container.cpp @@ -28,7 +28,7 @@ #include "combobox.h" #include "embed.h" #include "engine.h" -#include "song.h" +#include "Song.h" @@ -182,7 +182,7 @@ void bbTrackContainer::fixIncorrectPositions() void bbTrackContainer::play() { - if( engine::getSong()->playMode() != song::Mode_PlayBB ) + if( engine::getSong()->playMode() != Song::Mode_PlayBB ) { engine::getSong()->playBB(); } diff --git a/src/core/engine.cpp b/src/core/engine.cpp index 39f7c38fe..e281972ec 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -42,7 +42,7 @@ #include "project_notes.h" #include "Plugin.h" #include "SongEditor.h" -#include "song.h" +#include "Song.h" #include "BandLimitedWave.h" @@ -54,7 +54,7 @@ FxMixer * engine::s_fxMixer = NULL; FxMixerView * engine::s_fxMixerView = NULL; MainWindow * engine::s_mainWindow = NULL; bbTrackContainer * engine::s_bbTrackContainer = NULL; -song * engine::s_song = NULL; +Song * engine::s_song = NULL; SongEditor* engine::s_songEditor = NULL; AutomationEditor * engine::s_automationEditor = NULL; bbEditor * engine::s_bbEditor = NULL; @@ -80,7 +80,7 @@ void engine::init( const bool _has_gui ) s_projectJournal = new ProjectJournal; s_mixer = new Mixer; - s_song = new song; + s_song = new Song; s_fxMixer = new FxMixer; s_bbTrackContainer = new bbTrackContainer; diff --git a/src/core/main.cpp b/src/core/main.cpp index dd95eaf64..5f303bba3 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -74,7 +74,7 @@ #include "MainWindow.h" #include "ProjectRenderer.h" #include "DataFile.h" -#include "song.h" +#include "Song.h" #include "LmmsPalette.h" static inline QString baseName( const QString & _file ) diff --git a/src/core/midi/MidiAlsaSeq.cpp b/src/core/midi/MidiAlsaSeq.cpp index 466afe5f8..7dec9e676 100644 --- a/src/core/midi/MidiAlsaSeq.cpp +++ b/src/core/midi/MidiAlsaSeq.cpp @@ -29,7 +29,7 @@ #include "ConfigManager.h" #include "engine.h" #include "gui_templates.h" -#include "song.h" +#include "Song.h" #include "MidiPort.h" #include "MidiTime.h" #include "note.h" diff --git a/src/core/midi/MidiController.cpp b/src/core/midi/MidiController.cpp index 7ed471fa4..99e846016 100644 --- a/src/core/midi/MidiController.cpp +++ b/src/core/midi/MidiController.cpp @@ -27,7 +27,7 @@ #include #include -#include "song.h" +#include "Song.h" #include "engine.h" #include "Mixer.h" #include "MidiClient.h" diff --git a/src/core/midi/MidiPort.cpp b/src/core/midi/MidiPort.cpp index 60d35b9ec..5219bbf0a 100644 --- a/src/core/midi/MidiPort.cpp +++ b/src/core/midi/MidiPort.cpp @@ -27,7 +27,7 @@ #include "MidiPort.h" #include "MidiClient.h" -#include "song.h" +#include "Song.h" diff --git a/src/core/timeline.cpp b/src/core/timeline.cpp index ad8cdc331..90a1dcde8 100644 --- a/src/core/timeline.cpp +++ b/src/core/timeline.cpp @@ -51,7 +51,7 @@ QPixmap * timeLine::s_loopPointBeginPixmap = NULL; QPixmap * timeLine::s_loopPointEndPixmap = NULL; timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, - song::playPos & _pos, const MidiTime & _begin, + Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ) : QWidget( _parent ), m_autoScroll( AutoScrollEnabled ), diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index 2e2c32423..da5ca6ce9 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -134,7 +134,7 @@ AutomationEditor::AutomationEditor() : // add time-line m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt, engine::getSong()->getPlayPos( - song::Mode_PlayAutomationPattern ), + Song::Mode_PlayAutomationPattern ), m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), m_timeLine, SLOT( updatePosition( const MidiTime & ) ) ); @@ -1819,7 +1819,7 @@ void AutomationEditor::resizeEvent( QResizeEvent * ) if( engine::getSong() ) { - engine::getSong()->getPlayPos( song::Mode_PlayAutomationPattern + engine::getSong()->getPlayPos( Song::Mode_PlayAutomationPattern ).m_timeLine->setFixedWidth( width() ); } m_toolBar->setFixedWidth( width() ); @@ -1931,7 +1931,7 @@ void AutomationEditor::play() if( !m_pattern->getTrack() ) { - if( engine::getSong()->playMode() != song::Mode_PlayPattern ) + if( engine::getSong()->playMode() != Song::Mode_PlayPattern ) { engine::getSong()->stop(); engine::getSong()->playPattern( (Pattern *) engine::pianoRoll()->currentPattern() ); @@ -2309,7 +2309,7 @@ void AutomationEditor::updatePosition( const MidiTime & _t ) { if( ( engine::getSong()->isPlaying() && engine::getSong()->playMode() == - song::Mode_PlayAutomationPattern ) || + Song::Mode_PlayAutomationPattern ) || m_scrollBack == true ) { const int w = width() - VALUES_WIDTH; diff --git a/src/gui/ControllerConnectionDialog.cpp b/src/gui/ControllerConnectionDialog.cpp index 36d7d78ef..35f42df97 100644 --- a/src/gui/ControllerConnectionDialog.cpp +++ b/src/gui/ControllerConnectionDialog.cpp @@ -39,7 +39,7 @@ #include "combobox.h" #include "tab_widget.h" #include "group_box.h" -#include "song.h" +#include "Song.h" #include "tool_button.h" #include "gui_templates.h" diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 34e34073b..6895233b1 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -46,7 +46,7 @@ #include "DataFile.h" #include "PresetPreviewPlayHandle.h" #include "SamplePlayHandle.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "text_float.h" diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index d17f63f6a..0e2463380 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -44,7 +44,7 @@ #include "MainWindow.h" #include "gui_templates.h" #include "InstrumentTrack.h" -#include "song.h" +#include "Song.h" #include "bb_track_container.h" FxMixerView::FxMixerView() : diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index ec266e55d..9df27df61 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -39,7 +39,7 @@ #include "MainWindow.h" #include "bb_editor.h" #include "SongEditor.h" -#include "song.h" +#include "Song.h" #include "PianoRoll.h" #include "embed.h" #include "engine.h" @@ -957,19 +957,19 @@ void MainWindow::updatePlayPauseIcons() { switch( engine::getSong()->playMode() ) { - case song::Mode_PlaySong: + case Song::Mode_PlaySong: engine::songEditor()->setPauseIcon( true ); break; - case song::Mode_PlayAutomationPattern: + case Song::Mode_PlayAutomationPattern: engine::automationEditor()->setPauseIcon( true ); break; - case song::Mode_PlayBB: + case Song::Mode_PlayBB: engine::getBBEditor()->setPauseIcon( true ); break; - case song::Mode_PlayPattern: + case Song::Mode_PlayPattern: engine::pianoRoll()->setPauseIcon( true ); break; diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 06bbd00c5..543c4ed19 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -61,7 +61,7 @@ #include "Pattern.h" #include "Piano.h" #include "pixmap_button.h" -#include "song.h" +#include "Song.h" #include "SongEditor.h" #include "templates.h" #include "text_float.h" @@ -293,7 +293,7 @@ PianoRoll::PianoRoll() : // add time-line m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt, engine::getSong()->getPlayPos( - song::Mode_PlayPattern ), + Song::Mode_PlayPattern ), m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), m_timeLine, SLOT( updatePosition( const MidiTime & ) ) ); @@ -301,12 +301,12 @@ PianoRoll::PianoRoll() : this, SLOT( updatePosition( const MidiTime & ) ) ); // update timeline when in record-accompany mode - connect( engine::getSong()->getPlayPos( song::Mode_PlaySong ).m_timeLine, + connect( engine::getSong()->getPlayPos( Song::Mode_PlaySong ).m_timeLine, SIGNAL( positionChanged( const MidiTime & ) ), this, SLOT( updatePositionAccompany( const MidiTime & ) ) ); // TODO -/* connect( engine::getSong()->getPlayPos( song::Mode_PlayBB ).m_timeLine, +/* connect( engine::getSong()->getPlayPos( Song::Mode_PlayBB ).m_timeLine, SIGNAL( positionChanged( const MidiTime & ) ), this, SLOT( updatePositionAccompany( const MidiTime & ) ) );*/ @@ -796,7 +796,7 @@ void PianoRoll::setCurrentPattern( Pattern* newPattern ) // force the song-editor to stop playing if it played pattern before if( engine::getSong()->isPlaying() && - engine::getSong()->playMode() == song::Mode_PlayPattern ) + engine::getSong()->playMode() == Song::Mode_PlayPattern ) { engine::getSong()->playPattern( NULL ); } @@ -3482,7 +3482,7 @@ void PianoRoll::resizeEvent( QResizeEvent * ) } m_topBottomScroll->setValue( m_totalKeysToScroll - m_startKey ); - engine::getSong()->getPlayPos( song::Mode_PlayPattern + engine::getSong()->getPlayPos( Song::Mode_PlayPattern ).m_timeLine->setFixedWidth( width() ); m_toolBar->setFixedWidth( width() ); update(); @@ -3649,14 +3649,14 @@ int PianoRoll::getKey( int _y ) const -song::PlayModes PianoRoll::desiredPlayModeForAccompany() const +Song::PlayModes PianoRoll::desiredPlayModeForAccompany() const { if( m_pattern->getTrack()->trackContainer() == engine::getBBTrackContainer() ) { - return song::Mode_PlayBB; + return Song::Mode_PlayBB; } - return song::Mode_PlaySong; + return Song::Mode_PlaySong; } @@ -3669,7 +3669,7 @@ void PianoRoll::play() return; } - if( engine::getSong()->playMode() != song::Mode_PlayPattern ) + if( engine::getSong()->playMode() != Song::Mode_PlayPattern ) { engine::getSong()->playPattern( m_pattern ); } @@ -3745,10 +3745,10 @@ void PianoRoll::startRecordNote( const note & _n ) ( engine::getSong()->playMode() == desiredPlayModeForAccompany() || engine::getSong()->playMode() == - song::Mode_PlayPattern ) ) + Song::Mode_PlayPattern ) ) { MidiTime sub; - if( engine::getSong()->playMode() == song::Mode_PlaySong ) + if( engine::getSong()->playMode() == Song::Mode_PlaySong ) { sub = m_pattern->startPosition(); } @@ -3772,7 +3772,7 @@ void PianoRoll::finishRecordNote( const note & _n ) ( engine::getSong()->playMode() == desiredPlayModeForAccompany() || engine::getSong()->playMode() == - song::Mode_PlayPattern ) ) + Song::Mode_PlayPattern ) ) { for( QList::Iterator it = m_recordingNotes.begin(); it != m_recordingNotes.end(); ++it ) @@ -4165,7 +4165,7 @@ void PianoRoll::updatePosition( const MidiTime & _t ) { if( ( engine::getSong()->isPlaying() && engine::getSong()->playMode() == - song::Mode_PlayPattern && + Song::Mode_PlayPattern && m_timeLine->autoScroll() == timeLine::AutoScrollEnabled ) || m_scrollBack == true ) { @@ -4178,19 +4178,19 @@ void PianoRoll::updatePosition( const MidiTime & _t ) void PianoRoll::updatePositionAccompany( const MidiTime & _t ) { - song * s = engine::getSong(); + Song * s = engine::getSong(); if( m_recording && hasValidPattern() && - s->playMode() != song::Mode_PlayPattern ) + s->playMode() != Song::Mode_PlayPattern ) { MidiTime pos = _t; - if( s->playMode() != song::Mode_PlayBB ) + if( s->playMode() != Song::Mode_PlayBB ) { pos -= m_pattern->startPosition(); } if( (int) pos > 0 ) { - s->getPlayPos( song::Mode_PlayPattern ).setTicks( pos ); + s->getPlayPos( Song::Mode_PlayPattern ).setTicks( pos ); autoScroll( pos ); } } diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index 5ec475cd2..194b2ed0d 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -74,9 +74,9 @@ void positionLine::paintEvent( QPaintEvent * _pe ) -SongEditor::SongEditor( song * _song ) : +SongEditor::SongEditor( Song * _song ) : TrackContainerView( _song ), - m_s( _song ), + m_song( _song ), m_scrollBack( false ), m_smoothScroll( ConfigManager::inst()->value( "ui", "smoothscroll" ).toInt() ) { @@ -93,10 +93,10 @@ SongEditor::SongEditor( song * _song ) : DEFAULT_SETTINGS_WIDGET_WIDTH + TRACK_OP_WIDTH; m_timeLine = new timeLine( widgetTotal, 32, pixelsPerTact(), - m_s->m_playPos[song::Mode_PlaySong], + m_song->m_playPos[Song::Mode_PlaySong], m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), - m_s->m_playPos[song::Mode_PlaySong].m_timeLine, + m_song->m_playPos[Song::Mode_PlaySong].m_timeLine, SLOT( updatePosition( const MidiTime & ) ) ); connect( m_timeLine, SIGNAL( positionChanged( const MidiTime & ) ), this, SLOT( updatePosition( const MidiTime & ) ) ); @@ -105,7 +105,7 @@ SongEditor::SongEditor( song * _song ) : // let's get notified when loading a project - connect( m_s, SIGNAL( projectLoaded() ), + connect( m_song, SIGNAL( projectLoaded() ), this, SLOT( adjustUiAfterProjectLoad() ) ); @@ -115,7 +115,7 @@ SongEditor::SongEditor( song * _song ) : engine::mainWindow()->addSpacingToToolBar( 10 ); m_tempoSpinBox = new LcdSpinBox( 3, tb, tr( "Tempo" ) ); - m_tempoSpinBox->setModel( &m_s->m_tempoModel ); + m_tempoSpinBox->setModel( &m_song->m_tempoModel ); m_tempoSpinBox->setLabel( tr( "TEMPO/BPM" ) ); toolTip::add( m_tempoSpinBox, tr( "tempo of song" ) ); @@ -145,7 +145,7 @@ SongEditor::SongEditor( song * _song ) : engine::mainWindow()->addSpacingToToolBar( 10 ); m_timeSigDisplay = new MeterDialog( this, true ); - m_timeSigDisplay->setModel( &m_s->m_timeSigModel ); + m_timeSigDisplay->setModel( &m_song->m_timeSigModel ); engine::mainWindow()->addWidgetToToolBar( m_timeSigDisplay ); engine::mainWindow()->addSpacingToToolBar( 10 ); @@ -156,7 +156,7 @@ SongEditor::SongEditor( song * _song ) : m_masterVolumeSlider = new automatableSlider( tb, tr( "Master volume" ) ); - m_masterVolumeSlider->setModel( &m_s->m_masterVolumeModel ); + m_masterVolumeSlider->setModel( &m_song->m_masterVolumeModel ); m_masterVolumeSlider->setOrientation( Qt::Vertical ); m_masterVolumeSlider->setPageStep( 1 ); m_masterVolumeSlider->setTickPosition( QSlider::TicksLeft ); @@ -189,7 +189,7 @@ SongEditor::SongEditor( song * _song ) : master_pitch_lbl->setFixedHeight( 64 ); m_masterPitchSlider = new automatableSlider( tb, tr( "Master pitch" ) ); - m_masterPitchSlider->setModel( &m_s->m_masterPitchModel ); + m_masterPitchSlider->setModel( &m_song->m_masterPitchModel ); m_masterPitchSlider->setOrientation( Qt::Vertical ); m_masterPitchSlider->setPageStep( 1 ); m_masterPitchSlider->setTickPosition( QSlider::TicksLeft ); @@ -283,19 +283,19 @@ SongEditor::SongEditor( song * _song ) : m_addBBTrackButton = new toolButton( embed::getIconPixmap( "add_bb_track" ), tr( "Add beat/bassline" ), - m_s, SLOT( addBBTrack() ), + m_song, SLOT( addBBTrack() ), m_toolBar ); m_addSampleTrackButton = new toolButton( embed::getIconPixmap( "add_sample_track" ), tr( "Add sample-track" ), - m_s, SLOT( addSampleTrack() ), + m_song, SLOT( addSampleTrack() ), m_toolBar ); m_addAutomationTrackButton = new toolButton( embed::getIconPixmap( "add_automation" ), tr( "Add automation-track" ), - m_s, SLOT( addAutomationTrack() ), + m_song, SLOT( addAutomationTrack() ), m_toolBar ); m_drawModeButton = new toolButton( embed::getIconPixmap( @@ -386,7 +386,7 @@ SongEditor::SongEditor( song * _song ) : static_cast( layout() )->addWidget( m_leftRightScroll ); connect( m_leftRightScroll, SIGNAL( valueChanged( int ) ), this, SLOT( scrolled( int ) ) ); - connect( m_s, SIGNAL( lengthChanged( int ) ), + connect( m_song, SIGNAL( lengthChanged( int ) ), this, SLOT( updateScrollBar( int ) ) ); @@ -443,7 +443,7 @@ void SongEditor::setPauseIcon( bool pause ) void SongEditor::play() { - if( engine::getSong()->playMode() != song::Mode_PlaySong ) + if( engine::getSong()->playMode() != Song::Mode_PlaySong ) { engine::getSong()->playSong(); } @@ -458,7 +458,7 @@ void SongEditor::play() void SongEditor::record() { - m_s->record(); + m_song->record(); } @@ -466,7 +466,7 @@ void SongEditor::record() void SongEditor::recordAccompany() { - m_s->playAndRecord(); + m_song->playAndRecord(); } @@ -474,7 +474,7 @@ void SongEditor::recordAccompany() void SongEditor::stop() { - m_s->stop(); + m_song->stop(); engine::pianoRoll()->stopRecording(); } @@ -487,33 +487,33 @@ void SongEditor::keyPressEvent( QKeyEvent * _ke ) engine::mainWindow()->isShiftPressed() == true && _ke->key() == Qt::Key_Insert ) { - m_s->insertBar(); + m_song->insertBar(); } else if(/* _ke->modifiers() & Qt::ShiftModifier &&*/ engine::mainWindow()->isShiftPressed() == true && _ke->key() == Qt::Key_Delete ) { - m_s->removeBar(); + m_song->removeBar(); } else if( _ke->key() == Qt::Key_Left ) { - tick_t t = m_s->currentTick() - MidiTime::ticksPerTact(); + tick_t t = m_song->currentTick() - MidiTime::ticksPerTact(); if( t >= 0 ) { - m_s->setPlayPos( t, song::Mode_PlaySong ); + m_song->setPlayPos( t, Song::Mode_PlaySong ); } } else if( _ke->key() == Qt::Key_Right ) { - tick_t t = m_s->currentTick() + MidiTime::ticksPerTact(); + tick_t t = m_song->currentTick() + MidiTime::ticksPerTact(); if( t < MaxSongLength ) { - m_s->setPlayPos( t, song::Mode_PlaySong ); + m_song->setPlayPos( t, Song::Mode_PlaySong ); } } else if( _ke->key() == Qt::Key_Space ) { - if( m_s->isPlaying() ) + if( m_song->isPlaying() ) { stop(); } @@ -524,7 +524,7 @@ void SongEditor::keyPressEvent( QKeyEvent * _ke ) } else if( _ke->key() == Qt::Key_Home ) { - m_s->setPlayPos( 0, song::Mode_PlaySong ); + m_song->setPlayPos( 0, Song::Mode_PlaySong ); } else { @@ -556,7 +556,7 @@ void SongEditor::wheelEvent( QWheelEvent * _we ) 100 / DEFAULT_PIXELS_PER_TACT ) ) + "%" ) ); // update timeline - m_s->m_playPos[song::Mode_PlaySong].m_timeLine-> + m_song->m_playPos[Song::Mode_PlaySong].m_timeLine-> setPixelsPerTact( pixelsPerTact() ); // and make sure, all TCO's are resized and relocated realignTracks(); @@ -580,7 +580,7 @@ void SongEditor::wheelEvent( QWheelEvent * _we ) void SongEditor::masterVolumeChanged( int _new_val ) { masterVolumeMoved( _new_val ); - if( m_mvsStatus->isVisible() == false && m_s->m_loadingProject == false + if( m_mvsStatus->isVisible() == false && m_song->m_loadingProject == false && m_masterVolumeSlider->showStatus() ) { m_mvsStatus->moveGlobal( m_masterVolumeSlider, @@ -598,7 +598,7 @@ void SongEditor::masterVolumePressed( void ) m_mvsStatus->moveGlobal( m_masterVolumeSlider, QPoint( m_masterVolumeSlider->width() + 2, -2 ) ); m_mvsStatus->show(); - masterVolumeMoved( m_s->m_masterVolumeModel.value() ); + masterVolumeMoved( m_song->m_masterVolumeModel.value() ); } @@ -623,7 +623,7 @@ void SongEditor::masterVolumeReleased( void ) void SongEditor::masterPitchChanged( int _new_val ) { masterPitchMoved( _new_val ); - if( m_mpsStatus->isVisible() == false && m_s->m_loadingProject == false + if( m_mpsStatus->isVisible() == false && m_song->m_loadingProject == false && m_masterPitchSlider->showStatus() ) { m_mpsStatus->moveGlobal( m_masterPitchSlider, @@ -640,7 +640,7 @@ void SongEditor::masterPitchPressed( void ) m_mpsStatus->moveGlobal( m_masterPitchSlider, QPoint( m_masterPitchSlider->width() + 2, -2 ) ); m_mpsStatus->show(); - masterPitchMoved( m_s->m_masterPitchModel.value() ); + masterPitchMoved( m_song->m_masterPitchModel.value() ); } @@ -716,7 +716,7 @@ void SongEditor::updatePosition( const MidiTime & _t ) trackOpWidth = TRACK_OP_WIDTH; } - if( ( m_s->isPlaying() && m_s->m_playMode == song::Mode_PlaySong + if( ( m_song->isPlaying() && m_song->m_playMode == Song::Mode_PlaySong && m_timeLine->autoScroll() == timeLine::AutoScrollEnabled) || m_scrollBack == true ) { @@ -739,7 +739,7 @@ void SongEditor::updatePosition( const MidiTime & _t ) m_scrollBack = false; } - const int x = m_s->m_playPos[song::Mode_PlaySong].m_timeLine-> + const int x = m_song->m_playPos[Song::Mode_PlaySong].m_timeLine-> markerX( _t ) + 8; if( x >= trackOpWidth + widgetWidth -1 ) { @@ -762,7 +762,7 @@ void SongEditor::zoomingChanged() const QString & zfac = m_zoomingComboBox->model()->currentText(); setPixelsPerTact( zfac.left( zfac.length() - 1 ).toInt() * DEFAULT_PIXELS_PER_TACT / 100 ); - m_s->m_playPos[song::Mode_PlaySong].m_timeLine-> + m_song->m_playPos[Song::Mode_PlaySong].m_timeLine-> setPixelsPerTact( pixelsPerTact() ); realignTracks(); } diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index 6ffb8b1cf..79a36aa5e 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -42,7 +42,7 @@ #include "InstrumentTrack.h" #include "DataFile.h" #include "rubberband.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "Track.h" diff --git a/src/gui/bb_editor.cpp b/src/gui/bb_editor.cpp index 654af2fe1..de1c1b946 100644 --- a/src/gui/bb_editor.cpp +++ b/src/gui/bb_editor.cpp @@ -32,7 +32,7 @@ #include "bb_track_container.h" #include "embed.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" #include "tool_button.h" #include "ConfigManager.h" #include "DataFile.h" @@ -209,7 +209,7 @@ void bbEditor::setPauseIcon( bool pause ) void bbEditor::play() { - if( engine::getSong()->playMode() != song::Mode_PlayBB ) + if( engine::getSong()->playMode() != Song::Mode_PlayBB ) { engine::getSong()->playBB(); } diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index 2ee53c2cd..6965160d0 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -27,7 +27,7 @@ #include #include "export_project_dialog.h" -#include "song.h" +#include "Song.h" #include "engine.h" #include "MainWindow.h" #include "bb_track_container.h" diff --git a/src/gui/widgets/ControllerRackView.cpp b/src/gui/widgets/ControllerRackView.cpp index 5648ab498..906fe7e48 100644 --- a/src/gui/widgets/ControllerRackView.cpp +++ b/src/gui/widgets/ControllerRackView.cpp @@ -32,7 +32,7 @@ #include #include -#include "song.h" +#include "Song.h" #include "embed.h" #include "MainWindow.h" #include "group_box.h" @@ -148,7 +148,7 @@ void ControllerRackView::deleteController( ControllerView * _view ) void ControllerRackView::update() { QWidget * w = m_scrollArea->widget(); - song * s = engine::getSong(); + Song * s = engine::getSong(); setUpdatesEnabled( false ); diff --git a/src/gui/widgets/TimeDisplayWidget.cpp b/src/gui/widgets/TimeDisplayWidget.cpp index 2a2fe2642..66c243bc9 100644 --- a/src/gui/widgets/TimeDisplayWidget.cpp +++ b/src/gui/widgets/TimeDisplayWidget.cpp @@ -28,7 +28,7 @@ #include "MainWindow.h" #include "engine.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" @@ -95,7 +95,7 @@ void TimeDisplayWidget::setDisplayMode( DisplayMode displayMode ) void TimeDisplayWidget::updateTime() { - song* s = engine::getSong(); + Song* s = engine::getSong(); switch( m_displayMode ) { diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp index b1a16f55f..4302fb099 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/knob.cpp @@ -45,7 +45,7 @@ #include "gui_templates.h" #include "MainWindow.h" #include "ProjectJournal.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "templates.h" #include "text_float.h" diff --git a/src/gui/widgets/project_notes.cpp b/src/gui/widgets/project_notes.cpp index 6ffa6d847..81383ad4c 100644 --- a/src/gui/widgets/project_notes.cpp +++ b/src/gui/widgets/project_notes.cpp @@ -40,7 +40,7 @@ #include "embed.h" #include "engine.h" #include "MainWindow.h" -#include "song.h" +#include "Song.h" diff --git a/src/gui/widgets/tempo_sync_knob.cpp b/src/gui/widgets/tempo_sync_knob.cpp index 1131ba441..94365b1e9 100644 --- a/src/gui/widgets/tempo_sync_knob.cpp +++ b/src/gui/widgets/tempo_sync_knob.cpp @@ -32,7 +32,7 @@ #include "embed.h" #include "MainWindow.h" #include "MeterDialog.h" -#include "song.h" +#include "Song.h" diff --git a/src/gui/widgets/visualization_widget.cpp b/src/gui/widgets/visualization_widget.cpp index a5712d3b9..0d3fac3cf 100644 --- a/src/gui/widgets/visualization_widget.cpp +++ b/src/gui/widgets/visualization_widget.cpp @@ -32,7 +32,7 @@ #include "embed.h" #include "engine.h" #include "tooltip.h" -#include "song.h" +#include "Song.h" #include "ConfigManager.h" diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 718fbaefc..1ac7fd15f 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -71,7 +71,7 @@ #include "Pattern.h" #include "PluginView.h" #include "SamplePlayHandle.h" -#include "song.h" +#include "Song.h" #include "string_pair_drag.h" #include "tab_widget.h" #include "tooltip.h" diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 3d31a1951..95223d7c8 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -44,7 +44,7 @@ #include "rename_dialog.h" #include "SampleBuffer.h" #include "AudioSampleRecorder.h" -#include "song.h" +#include "Song.h" #include "tooltip.h" #include "bb_track_container.h" #include "string_pair_drag.h" diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 20114a8ad..959b02a96 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -34,7 +34,7 @@ #include "gui_templates.h" #include "SampleTrack.h" -#include "song.h" +#include "Song.h" #include "embed.h" #include "engine.h" #include "tooltip.h" diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index 19c1c97d9..f04d2a3ff 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -36,7 +36,7 @@ #include "MainWindow.h" #include "Mixer.h" #include "rename_dialog.h" -#include "song.h" +#include "Song.h" #include "SongEditor.h" #include "templates.h" #include "track_label_button.h" From c2360f593cbe72ab174c947268bdbb36dde794cf Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 00:46:49 +0100 Subject: [PATCH 02/21] Rename bb_track_container to BBTrackContainer --- ...b_track_container.h => BBTrackContainer.h} | 8 +- include/bb_editor.h | 6 +- include/engine.h | 6 +- plugins/HydrogenImport/HydrogenImport.cpp | 2 +- plugins/flp_import/FlpImport.cpp | 2 +- qt.cfg | 81 +++++++++++++++++++ src/core/AutomationPattern.cpp | 2 +- ...ack_container.cpp => BBTrackContainer.cpp} | 34 ++++---- src/core/FxMixer.cpp | 2 +- src/core/Song.cpp | 2 +- src/core/Track.cpp | 2 +- src/core/engine.cpp | 6 +- src/gui/AutomationEditor.cpp | 2 +- src/gui/FileBrowser.cpp | 2 +- src/gui/FxMixerView.cpp | 2 +- src/gui/PianoRoll.cpp | 2 +- src/gui/bb_editor.cpp | 4 +- src/gui/export_project_dialog.cpp | 2 +- src/tracks/Pattern.cpp | 2 +- src/tracks/bb_track.cpp | 2 +- 20 files changed, 126 insertions(+), 45 deletions(-) rename include/{bb_track_container.h => BBTrackContainer.h} (91%) create mode 100644 qt.cfg rename src/core/{bb_track_container.cpp => BBTrackContainer.cpp} (85%) diff --git a/include/bb_track_container.h b/include/BBTrackContainer.h similarity index 91% rename from include/bb_track_container.h rename to include/BBTrackContainer.h index 465db8f48..56173c602 100644 --- a/include/bb_track_container.h +++ b/include/BBTrackContainer.h @@ -1,5 +1,5 @@ /* - * bb_track_container.h - model-component of BB-Editor + * BBTrackContainer.h - model-component of BB-Editor * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -30,13 +30,13 @@ #include "combobox.h" -class EXPORT bbTrackContainer : public TrackContainer +class EXPORT BBTrackContainer : public TrackContainer { Q_OBJECT mapPropertyFromModel(int,currentBB,setCurrentBB,m_bbComboBoxModel); public: - bbTrackContainer(); - virtual ~bbTrackContainer(); + BBTrackContainer(); + virtual ~BBTrackContainer(); virtual bool play( MidiTime _start, const fpp_t _frames, const f_cnt_t _frame_base, int _tco_num = -1 ); diff --git a/include/bb_editor.h b/include/bb_editor.h index 993633b7b..6d2100e84 100644 --- a/include/bb_editor.h +++ b/include/bb_editor.h @@ -29,7 +29,7 @@ #include "TrackContainerView.h" -class bbTrackContainer; +class BBTrackContainer; class comboBox; class toolButton; @@ -38,7 +38,7 @@ class bbEditor : public TrackContainerView { Q_OBJECT public: - bbEditor( bbTrackContainer * _tc ); + bbEditor( BBTrackContainer * _tc ); virtual ~bbEditor(); virtual inline bool fixedTCOs() const @@ -64,7 +64,7 @@ public slots: private: virtual void keyPressEvent( QKeyEvent * _ke ); - bbTrackContainer * m_bbtc; + BBTrackContainer * m_bbtc; QWidget * m_toolBar; toolButton * m_playButton; diff --git a/include/engine.h b/include/engine.h index 263345162..6ef3dc137 100644 --- a/include/engine.h +++ b/include/engine.h @@ -35,7 +35,7 @@ class AutomationEditor; class bbEditor; -class bbTrackContainer; +class BBTrackContainer; class DummyTrackContainer; class FxMixer; class FxMixerView; @@ -87,7 +87,7 @@ public: return s_song; } - static bbTrackContainer * getBBTrackContainer() + static BBTrackContainer * getBBTrackContainer() { return s_bbTrackContainer; } @@ -179,7 +179,7 @@ private: static Mixer *s_mixer; static FxMixer * s_fxMixer; static Song * s_song; - static bbTrackContainer * s_bbTrackContainer; + static BBTrackContainer * s_bbTrackContainer; static ProjectJournal * s_projectJournal; static DummyTrackContainer * s_dummyTC; static ControllerRackView * s_controllerRackView; diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 076f21e6d..edb8bdb17 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -16,7 +16,7 @@ #include "Pattern.h" #include "Track.h" #include "bb_track.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "Instrument.h" #define MAX_LAYERS 4 diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index ff5399544..9c5b7c233 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -34,7 +34,7 @@ #include "AutomationPattern.h" #include "basic_filters.h" #include "bb_track.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "combobox.h" #include "ConfigManager.h" #include "debug.h" diff --git a/qt.cfg b/qt.cfg new file mode 100644 index 000000000..d01ae5c55 --- /dev/null +++ b/qt.cfg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + READ + READ + WRITE + NOTIFY + + + + + + connect + + + + + + invokeMethod + + + + + true + + + true + + + + + diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index d89df1dde..79f009e05 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -33,7 +33,7 @@ #include "AutomationEditor.h" #include "AutomationTrack.h" #include "ProjectJournal.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "Song.h" #include "text_float.h" #include "embed.h" diff --git a/src/core/bb_track_container.cpp b/src/core/BBTrackContainer.cpp similarity index 85% rename from src/core/bb_track_container.cpp rename to src/core/BBTrackContainer.cpp index 56015add1..dc43ac660 100644 --- a/src/core/bb_track_container.cpp +++ b/src/core/BBTrackContainer.cpp @@ -1,5 +1,5 @@ /* - * bb_track_container.cpp - model-component of BB-Editor + * BBTrackContainer.cpp - model-component of BB-Editor * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -23,7 +23,7 @@ */ -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "bb_track.h" #include "combobox.h" #include "embed.h" @@ -32,7 +32,7 @@ -bbTrackContainer::bbTrackContainer() : +BBTrackContainer::BBTrackContainer() : TrackContainer(), m_bbComboBoxModel( this ) { @@ -47,14 +47,14 @@ bbTrackContainer::bbTrackContainer() : -bbTrackContainer::~bbTrackContainer() +BBTrackContainer::~BBTrackContainer() { } -bool bbTrackContainer::play( MidiTime _start, fpp_t _frames, +bool BBTrackContainer::play( MidiTime _start, fpp_t _frames, f_cnt_t _offset, int _tco_num ) { bool played_a_note = false; @@ -80,7 +80,7 @@ bool bbTrackContainer::play( MidiTime _start, fpp_t _frames, -void bbTrackContainer::updateAfterTrackAdd() +void BBTrackContainer::updateAfterTrackAdd() { if( numOfBBs() == 0 && !engine::getSong()->isLoadingProject() ) { @@ -97,7 +97,7 @@ void bbTrackContainer::updateAfterTrackAdd() -tact_t bbTrackContainer::lengthOfBB( int _bb ) +tact_t BBTrackContainer::lengthOfBB( int _bb ) { MidiTime max_length = MidiTime::ticksPerTact(); @@ -114,7 +114,7 @@ tact_t bbTrackContainer::lengthOfBB( int _bb ) -int bbTrackContainer::numOfBBs() const +int BBTrackContainer::numOfBBs() const { return engine::getSong()->countTracks( Track::BBTrack ); } @@ -122,7 +122,7 @@ int bbTrackContainer::numOfBBs() const -void bbTrackContainer::removeBB( int _bb ) +void BBTrackContainer::removeBB( int _bb ) { TrackList tl = tracks(); for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) @@ -139,7 +139,7 @@ void bbTrackContainer::removeBB( int _bb ) -void bbTrackContainer::swapBB( int _bb1, int _bb2 ) +void BBTrackContainer::swapBB( int _bb1, int _bb2 ) { TrackList tl = tracks(); for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) @@ -152,7 +152,7 @@ void bbTrackContainer::swapBB( int _bb1, int _bb2 ) -void bbTrackContainer::updateBBTrack( trackContentObject * _tco ) +void BBTrackContainer::updateBBTrack( trackContentObject * _tco ) { bbTrack * t = bbTrack::findBBTrack( _tco->startPosition() / DefaultTicksPerTact ); @@ -165,7 +165,7 @@ void bbTrackContainer::updateBBTrack( trackContentObject * _tco ) -void bbTrackContainer::fixIncorrectPositions() +void BBTrackContainer::fixIncorrectPositions() { TrackList tl = tracks(); for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) @@ -180,7 +180,7 @@ void bbTrackContainer::fixIncorrectPositions() -void bbTrackContainer::play() +void BBTrackContainer::play() { if( engine::getSong()->playMode() != Song::Mode_PlayBB ) { @@ -195,7 +195,7 @@ void bbTrackContainer::play() -void bbTrackContainer::stop() +void BBTrackContainer::stop() { engine::getSong()->stop(); } @@ -203,7 +203,7 @@ void bbTrackContainer::stop() -void bbTrackContainer::updateComboBox() +void BBTrackContainer::updateComboBox() { const int cur_bb = currentBB(); @@ -220,7 +220,7 @@ void bbTrackContainer::updateComboBox() -void bbTrackContainer::currentBBChanged() +void BBTrackContainer::currentBBChanged() { // first make sure, all channels have a TCO at current BB createTCOsForBB( currentBB() ); @@ -240,7 +240,7 @@ void bbTrackContainer::currentBBChanged() -void bbTrackContainer::createTCOsForBB( int _bb ) +void BBTrackContainer::createTCOsForBB( int _bb ) { if( numOfBBs() == 0 || engine::getSong()->isLoadingProject() ) { diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index 4b6decb79..8c20fdefc 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -31,7 +31,7 @@ #include "Song.h" #include "InstrumentTrack.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "ValueBuffer.h" FxRoute::FxRoute( FxChannel * from, FxChannel * to, float amount ) : diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 07d729dc1..6fae3eea3 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -35,7 +35,7 @@ #include "AutomationEditor.h" #include "bb_editor.h" #include "bb_track.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "ConfigManager.h" #include "ControllerRackView.h" #include "ControllerConnection.h" diff --git a/src/core/Track.cpp b/src/core/Track.cpp index fdb70f2ea..23a09f4e3 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -51,7 +51,7 @@ #include "AutomationTrack.h" #include "bb_editor.h" #include "bb_track.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "ConfigManager.h" #include "Clipboard.h" #include "embed.h" diff --git a/src/core/engine.cpp b/src/core/engine.cpp index e281972ec..e42db7f4f 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -26,7 +26,7 @@ #include "engine.h" #include "AutomationEditor.h" #include "bb_editor.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "ConfigManager.h" #include "ControllerRackView.h" #include "FxMixer.h" @@ -53,7 +53,7 @@ Mixer* engine::s_mixer = NULL; FxMixer * engine::s_fxMixer = NULL; FxMixerView * engine::s_fxMixerView = NULL; MainWindow * engine::s_mainWindow = NULL; -bbTrackContainer * engine::s_bbTrackContainer = NULL; +BBTrackContainer * engine::s_bbTrackContainer = NULL; Song * engine::s_song = NULL; SongEditor* engine::s_songEditor = NULL; AutomationEditor * engine::s_automationEditor = NULL; @@ -82,7 +82,7 @@ void engine::init( const bool _has_gui ) s_mixer = new Mixer; s_song = new Song; s_fxMixer = new FxMixer; - s_bbTrackContainer = new bbTrackContainer; + s_bbTrackContainer = new BBTrackContainer; s_ladspaManager = new ladspa2LMMS; diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index da5ca6ce9..33b1c1921 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -59,7 +59,7 @@ #include "tool_button.h" #include "text_float.h" #include "combobox.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "PianoRoll.h" #include "debug.h" #include "MeterModel.h" diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 6895233b1..14a862872 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -33,7 +33,7 @@ #include #include "FileBrowser.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "ConfigManager.h" #include "debug.h" #include "embed.h" diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index 0e2463380..5a84e1e64 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -45,7 +45,7 @@ #include "gui_templates.h" #include "InstrumentTrack.h" #include "Song.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" FxMixerView::FxMixerView() : QWidget(), diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 543c4ed19..e981792dc 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -47,7 +47,7 @@ #include "ConfigManager.h" #include "PianoRoll.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "Clipboard.h" #include "combobox.h" #include "debug.h" diff --git a/src/gui/bb_editor.cpp b/src/gui/bb_editor.cpp index de1c1b946..de32e07c2 100644 --- a/src/gui/bb_editor.cpp +++ b/src/gui/bb_editor.cpp @@ -29,7 +29,7 @@ #include #include "bb_editor.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "embed.h" #include "MainWindow.h" #include "Song.h" @@ -43,7 +43,7 @@ -bbEditor::bbEditor( bbTrackContainer* tc ) : +bbEditor::bbEditor( BBTrackContainer* tc ) : TrackContainerView( tc ), m_bbtc( tc ) { diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index 6965160d0..9ccd6e30f 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -30,7 +30,7 @@ #include "Song.h" #include "engine.h" #include "MainWindow.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "bb_track.h" diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 95223d7c8..63768df91 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -46,7 +46,7 @@ #include "AudioSampleRecorder.h" #include "Song.h" #include "tooltip.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "string_pair_drag.h" #include "MainWindow.h" diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index f04d2a3ff..a55672fc7 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -29,7 +29,7 @@ #include "bb_editor.h" #include "bb_track.h" -#include "bb_track_container.h" +#include "BBTrackContainer.h" #include "embed.h" #include "engine.h" #include "gui_templates.h" From 84d921588055a324ef07bc8b061f89e492a69fd5 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 00:47:55 +0100 Subject: [PATCH 03/21] Rename drumsynth to DrumSynth --- include/{drumsynth.h => DrumSynth.h} | 2 +- src/core/{drumsynth.cpp => DrumSynth.cpp} | 2 +- src/core/SampleBuffer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename include/{drumsynth.h => DrumSynth.h} (97%) rename src/core/{drumsynth.cpp => DrumSynth.cpp} (99%) diff --git a/include/drumsynth.h b/include/DrumSynth.h similarity index 97% rename from include/drumsynth.h rename to include/DrumSynth.h index 642325307..e57499038 100644 --- a/include/drumsynth.h +++ b/include/DrumSynth.h @@ -1,5 +1,5 @@ /* - * drumsynth.h - DrumSynth DS file renderer + * DrumSynth.h - DrumSynth DS file renderer * * Copyright (c) 1998-2000 Paul Kellett (mda-vst.com) * Copyright (c) 2007 Paul Giblock diff --git a/src/core/drumsynth.cpp b/src/core/DrumSynth.cpp similarity index 99% rename from src/core/drumsynth.cpp rename to src/core/DrumSynth.cpp index d55f7f8ea..305ed5ae1 100644 --- a/src/core/drumsynth.cpp +++ b/src/core/DrumSynth.cpp @@ -24,7 +24,7 @@ */ -#include "drumsynth.h" +#include "DrumSynth.h" #include "lmmsconfig.h" #include diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index d0e0397fc..eaeb62471 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -54,7 +54,7 @@ #include "base64.h" #include "ConfigManager.h" #include "debug.h" -#include "drumsynth.h" +#include "DrumSynth.h" #include "endian_handling.h" #include "engine.h" #include "interpolation.h" From 968909c07c0d1968e01d901f6d404234262ba137 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 00:49:55 +0100 Subject: [PATCH 04/21] Rename engine to Engine --- include/BandLimitedWave.h | 4 +- include/BufferManager.h | 2 +- include/ConfigManager.h | 4 +- include/Controller.h | 2 +- include/Effect.h | 16 +- include/{engine.h => Engine.h} | 4 +- include/FxMixerView.h | 2 +- include/PianoRoll.h | 2 +- include/Song.h | 4 +- plugins/Amplifier/AmplifierControls.cpp | 2 +- plugins/BassBooster/BassBooster.cpp | 2 +- plugins/BassBooster/BassBoosterControls.cpp | 2 +- plugins/DualFilter/DualFilter.cpp | 4 +- plugins/DualFilter/DualFilterControls.cpp | 8 +- plugins/HydrogenImport/HydrogenImport.cpp | 8 +- plugins/LadspaEffect/LadspaEffect.cpp | 26 +-- .../LadspaEffect/LadspaSubPluginFeatures.cpp | 8 +- plugins/MidiImport/MidiImport.cpp | 8 +- plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp | 2 +- .../SpectrumAnalyzerControlDialog.cpp | 2 +- plugins/VstEffect/VstEffect.cpp | 4 +- plugins/VstEffect/VstEffectControls.cpp | 2 +- .../audio_file_processor.cpp | 6 +- plugins/bit_invader/bit_invader.cpp | 22 +-- plugins/delay/delaycontrols.cpp | 4 +- plugins/delay/delayeffect.cpp | 12 +- .../dynamics_processor/dynamics_processor.cpp | 12 +- .../dynamics_processor_controls.cpp | 14 +- plugins/flp_import/FlpImport.cpp | 38 ++--- plugins/kicker/kicker.cpp | 6 +- plugins/ladspa_browser/ladspa_description.cpp | 8 +- plugins/ladspa_browser/ladspa_port_dialog.cpp | 8 +- plugins/lb302/lb302.cpp | 24 +-- plugins/monstro/Monstro.cpp | 8 +- plugins/nes/Nes.cpp | 4 +- plugins/opl2/opl2instrument.cpp | 14 +- plugins/organic/organic.cpp | 8 +- plugins/papu/papu_instrument.cpp | 4 +- plugins/patman/patman.cpp | 4 +- .../peak_controller_effect.cpp | 6 +- .../peak_controller_effect_controls.cpp | 2 +- plugins/sf2_player/sf2_player.cpp | 24 +-- plugins/sfxr/sfxr.cpp | 4 +- plugins/sid/sid_instrument.cpp | 6 +- plugins/stereo_enhancer/stereo_enhancer.h | 2 +- .../triple_oscillator/TripleOscillator.cpp | 8 +- plugins/vestige/vestige.cpp | 14 +- plugins/vibed/vibed.cpp | 20 +-- plugins/vibed/vibrating_string.cpp | 4 +- plugins/vst_base/VstPlugin.cpp | 12 +- plugins/watsyn/Watsyn.cpp | 86 +++++----- plugins/waveshaper/waveshaper_controls.cpp | 12 +- plugins/zynaddsubfx/ZynAddSubFx.cpp | 18 +- src/core/AutomatableModel.cpp | 2 +- src/core/AutomationPattern.cpp | 52 +++--- src/core/BBTrackContainer.cpp | 20 +-- src/core/Controller.cpp | 12 +- src/core/ControllerConnection.cpp | 12 +- src/core/Effect.cpp | 6 +- src/core/EffectChain.cpp | 12 +- src/core/{engine.cpp => Engine.cpp} | 50 +++--- src/core/EnvelopeAndLfoParameters.cpp | 14 +- src/core/FxMixer.cpp | 40 ++--- src/core/ImportFilter.cpp | 8 +- src/core/Instrument.cpp | 4 +- src/core/InstrumentFunctions.cpp | 14 +- src/core/InstrumentSoundShaping.cpp | 6 +- src/core/JournallingObject.cpp | 14 +- src/core/LfoController.cpp | 14 +- src/core/Mixer.cpp | 20 +-- src/core/MixerWorkerThread.cpp | 2 +- src/core/NotePlayHandle.cpp | 30 ++-- src/core/Oscillator.cpp | 6 +- src/core/PeakController.cpp | 8 +- src/core/Plugin.cpp | 6 +- src/core/PresetPreviewPlayHandle.cpp | 14 +- src/core/ProjectJournal.cpp | 6 +- src/core/ProjectRenderer.cpp | 26 +-- src/core/RemotePlugin.cpp | 16 +- src/core/RingBuffer.cpp | 18 +- src/core/SampleBuffer.cpp | 22 +-- src/core/SamplePlayHandle.cpp | 6 +- src/core/SampleRecordHandle.cpp | 10 +- src/core/Song.cpp | 160 +++++++++--------- src/core/TempoSyncKnobModel.cpp | 10 +- src/core/Track.cpp | 20 +-- src/core/TrackContainer.cpp | 10 +- src/core/VstSyncController.cpp | 10 +- src/core/audio/AudioAlsa.cpp | 4 +- src/core/audio/AudioJack.cpp | 8 +- src/core/audio/AudioOss.cpp | 4 +- src/core/audio/AudioPort.cpp | 20 +-- src/core/audio/AudioPortAudio.cpp | 2 +- src/core/audio/AudioPulseAudio.cpp | 4 +- src/core/audio/AudioSdl.cpp | 4 +- src/core/main.cpp | 32 ++-- src/core/midi/MidiAlsaSeq.cpp | 8 +- src/core/midi/MidiController.cpp | 4 +- src/core/midi/MidiPort.cpp | 2 +- src/core/midi/MidiWinMM.cpp | 2 +- src/core/timeline.cpp | 6 +- src/gui/AutomatableModelView.cpp | 2 +- src/gui/AutomationEditor.cpp | 78 ++++----- src/gui/AutomationPatternView.cpp | 22 +-- src/gui/ControllerConnectionDialog.cpp | 20 +-- src/gui/FileBrowser.cpp | 36 ++-- src/gui/FxMixerView.cpp | 30 ++-- src/gui/LfoControllerDialog.cpp | 2 +- src/gui/MainWindow.cpp | 90 +++++----- src/gui/PeakControllerDialog.cpp | 2 +- src/gui/PianoRoll.cpp | 94 +++++----- src/gui/PianoView.cpp | 2 +- src/gui/SongEditor.cpp | 54 +++--- src/gui/ToolPluginView.cpp | 4 +- src/gui/TrackContainerView.cpp | 8 +- src/gui/about_dialog.cpp | 4 +- src/gui/bb_editor.cpp | 14 +- src/gui/export_project_dialog.cpp | 12 +- src/gui/setup_dialog.cpp | 16 +- src/gui/string_pair_drag.cpp | 6 +- src/gui/widgets/ControllerRackView.cpp | 8 +- src/gui/widgets/ControllerView.cpp | 6 +- src/gui/widgets/EffectView.cpp | 4 +- src/gui/widgets/EnvelopeAndLfoView.cpp | 4 +- src/gui/widgets/FxLine.cpp | 14 +- src/gui/widgets/InstrumentFunctionViews.cpp | 2 +- src/gui/widgets/InstrumentMidiIOView.cpp | 4 +- src/gui/widgets/LcdSpinBox.cpp | 4 +- src/gui/widgets/LcdWidget.cpp | 2 +- src/gui/widgets/SendButtonIndicator.cpp | 6 +- src/gui/widgets/TimeDisplayWidget.cpp | 6 +- src/gui/widgets/automatable_button.cpp | 2 +- src/gui/widgets/automatable_slider.cpp | 2 +- src/gui/widgets/combobox.cpp | 2 +- src/gui/widgets/cpuload_widget.cpp | 4 +- src/gui/widgets/fader.cpp | 2 +- src/gui/widgets/graph.cpp | 2 +- src/gui/widgets/knob.cpp | 8 +- src/gui/widgets/project_notes.cpp | 22 +-- src/gui/widgets/tempo_sync_knob.cpp | 8 +- src/gui/widgets/text_float.cpp | 6 +- src/gui/widgets/track_label_button.cpp | 2 +- src/gui/widgets/visualization_widget.cpp | 28 +-- src/tracks/AutomationTrack.cpp | 6 +- src/tracks/InstrumentTrack.cpp | 42 ++--- src/tracks/Pattern.cpp | 40 ++--- src/tracks/SampleTrack.cpp | 18 +- src/tracks/bb_track.cpp | 54 +++--- 148 files changed, 1058 insertions(+), 1058 deletions(-) rename include/{engine.h => Engine.h} (98%) rename src/core/{engine.cpp => Engine.cpp} (77%) diff --git a/include/BandLimitedWave.h b/include/BandLimitedWave.h index 666f270ff..1c81e0606 100644 --- a/include/BandLimitedWave.h +++ b/include/BandLimitedWave.h @@ -35,7 +35,7 @@ #include "interpolation.h" #include "lmms_basics.h" #include "lmms_math.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #define MAXLEN 11 @@ -104,7 +104,7 @@ public: */ static inline float freqToLen( float f ) { - return freqToLen( f, engine::mixer()->processingSampleRate() ); + return freqToLen( f, Engine::mixer()->processingSampleRate() ); } /*! \brief This method converts frequency to wavelength, but you can use any custom sample rate with it. diff --git a/include/BufferManager.h b/include/BufferManager.h index b437ae05e..c2a0a987c 100644 --- a/include/BufferManager.h +++ b/include/BufferManager.h @@ -28,7 +28,7 @@ #include "MemoryManager.h" #include "lmms_basics.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include #include diff --git a/include/ConfigManager.h b/include/ConfigManager.h index 567dbd1d9..b22792288 100644 --- a/include/ConfigManager.h +++ b/include/ConfigManager.h @@ -36,7 +36,7 @@ #include "export.h" #include "MemoryManager.h" -class engine; +class Engine; const QString PROJECTS_PATH = "projects/"; @@ -221,7 +221,7 @@ private: settingsMap m_settings; - friend class engine; + friend class Engine; } ; diff --git a/include/Controller.h b/include/Controller.h index cf130351c..e1d2f9862 100644 --- a/include/Controller.h +++ b/include/Controller.h @@ -27,7 +27,7 @@ #ifndef CONTROLLER_H #define CONTROLLER_H -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "Model.h" #include "JournallingObject.h" diff --git a/include/Effect.h b/include/Effect.h index ded15c14e..2adfb4f5e 100644 --- a/include/Effect.h +++ b/include/Effect.h @@ -27,7 +27,7 @@ #define EFFECT_H #include "Plugin.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "AutomatableModel.h" #include "TempoSyncKnobModel.h" @@ -102,8 +102,8 @@ public: inline f_cnt_t timeout() const { - const float samples = engine::mixer()->processingSampleRate() * m_autoQuitModel.value() / 1000.0f; - return 1 + ( static_cast( samples ) / engine::mixer()->framesPerPeriod() ); + const float samples = Engine::mixer()->processingSampleRate() * m_autoQuitModel.value() / 1000.0f; + return 1 + ( static_cast( samples ) / Engine::mixer()->framesPerPeriod() ); } inline float wetLevel() const @@ -176,9 +176,9 @@ protected: sample_rate_t _dst_sr ) { resample( 0, _src_buf, - engine::mixer()->processingSampleRate(), + Engine::mixer()->processingSampleRate(), _dst_buf, _dst_sr, - engine::mixer()->framesPerPeriod() ); + Engine::mixer()->framesPerPeriod() ); } inline void sampleBack( const sampleFrame * _src_buf, @@ -186,9 +186,9 @@ protected: sample_rate_t _src_sr ) { resample( 1, _src_buf, _src_sr, _dst_buf, - engine::mixer()->processingSampleRate(), - engine::mixer()->framesPerPeriod() * _src_sr / - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate(), + Engine::mixer()->framesPerPeriod() * _src_sr / + Engine::mixer()->processingSampleRate() ); } void reinitSRC(); diff --git a/include/engine.h b/include/Engine.h similarity index 98% rename from include/engine.h rename to include/Engine.h index 6ef3dc137..7bbd437f3 100644 --- a/include/engine.h +++ b/include/Engine.h @@ -1,5 +1,5 @@ /* - * engine.h - engine-system of LMMS + * Engine.h - engine-system of LMMS * * Copyright (c) 2006-2014 Tobias Doerffel * @@ -50,7 +50,7 @@ class ladspa2LMMS; class ControllerRackView; -class EXPORT engine +class EXPORT Engine { public: static void init( const bool _has_gui = true ); diff --git a/include/FxMixerView.h b/include/FxMixerView.h index 92f260172..a6735ca7a 100644 --- a/include/FxMixerView.h +++ b/include/FxMixerView.h @@ -33,7 +33,7 @@ #include "FxLine.h" #include "FxMixer.h" #include "ModelView.h" -#include "engine.h" +#include "Engine.h" #include "fader.h" #include "pixmap_button.h" #include "tooltip.h" diff --git a/include/PianoRoll.h b/include/PianoRoll.h index d4ef00776..7bf5edce9 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -366,7 +366,7 @@ private: // did we start a mouseclick with shift pressed bool m_startedWithShift; - friend class engine; + friend class Engine; // qproperty fields QColor m_gridColor; diff --git a/include/Song.h b/include/Song.h index 24afc4377..70c226c46 100644 --- a/include/Song.h +++ b/include/Song.h @@ -317,7 +317,7 @@ private: inline f_cnt_t currentFrame() const { - return m_playPos[m_playMode].getTicks() * engine::framesPerTick() + m_playPos[m_playMode].currentFrame(); + return m_playPos[m_playMode].getTicks() * Engine::framesPerTick() + m_playPos[m_playMode].currentFrame(); } void setPlayPos( tick_t _ticks, PlayModes _play_mode ); @@ -364,7 +364,7 @@ private: VstSyncController m_vstSyncController; - friend class engine; + friend class Engine; friend class SongEditor; friend class mainWindow; friend class ControllerRackView; diff --git a/plugins/Amplifier/AmplifierControls.cpp b/plugins/Amplifier/AmplifierControls.cpp index a18d0c5a8..a127cd3ca 100644 --- a/plugins/Amplifier/AmplifierControls.cpp +++ b/plugins/Amplifier/AmplifierControls.cpp @@ -28,7 +28,7 @@ #include "AmplifierControls.h" #include "Amplifier.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index 60c31ab1a..85aa67f37 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -105,7 +105,7 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames inline void BassBoosterEffect::changeFrequency() { - const sample_t fac = engine::mixer()->processingSampleRate() / 44100.0f; + const sample_t fac = Engine::mixer()->processingSampleRate() / 44100.0f; m_bbFX.leftFX().setFrequency( m_bbControls.m_freqModel.value() * fac ); m_bbFX.rightFX().setFrequency( m_bbControls.m_freqModel.value() * fac ); diff --git a/plugins/BassBooster/BassBoosterControls.cpp b/plugins/BassBooster/BassBoosterControls.cpp index 0fe16a505..d79369ac5 100644 --- a/plugins/BassBooster/BassBoosterControls.cpp +++ b/plugins/BassBooster/BassBoosterControls.cpp @@ -37,7 +37,7 @@ BassBoosterControls::BassBoosterControls( BassBoosterEffect* effect ) : m_gainModel( 1.0f, 0.1f, 5.0f, 0.05f, this, tr( "Gain" ) ), m_ratioModel( 2.0f, 0.1f, 10.0f, 0.1f, this, tr( "Ratio" ) ) { - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeFrequency() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeFrequency() ) ); } diff --git a/plugins/DualFilter/DualFilter.cpp b/plugins/DualFilter/DualFilter.cpp index 22036930c..e0c55eec8 100644 --- a/plugins/DualFilter/DualFilter.cpp +++ b/plugins/DualFilter/DualFilter.cpp @@ -53,8 +53,8 @@ DualFilterEffect::DualFilterEffect( Model* parent, const Descriptor::SubPluginFe Effect( &dualfilter_plugin_descriptor, parent, key ), m_dfControls( this ) { - m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() ); - m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() ); + m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); + m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); // ensure filters get updated m_filter1changed = true; diff --git a/plugins/DualFilter/DualFilterControls.cpp b/plugins/DualFilter/DualFilterControls.cpp index 90a0b4792..10ae56771 100644 --- a/plugins/DualFilter/DualFilterControls.cpp +++ b/plugins/DualFilter/DualFilterControls.cpp @@ -28,7 +28,7 @@ #include "DualFilterControls.h" #include "DualFilter.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" #include "basic_filters.h" #include "embed.h" @@ -97,7 +97,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) : m_filter2Model.addItem( tr( "Fast Formant" ), new PixmapLoader( "filter_hp" ) ); m_filter2Model.addItem( tr( "Tripole" ), new PixmapLoader( "filter_lp" ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFilters() ) ); } @@ -108,8 +108,8 @@ void DualFilterControls::updateFilters() delete m_effect->m_filter1; delete m_effect->m_filter2; - m_effect->m_filter1 = new basicFilters<2>( engine::mixer()->processingSampleRate() ); - m_effect->m_filter2 = new basicFilters<2>( engine::mixer()->processingSampleRate() ); + m_effect->m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); + m_effect->m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); // flag filters as needing recalculation diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index edb8bdb17..6be40e091 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -9,7 +9,7 @@ #include "LocalFileMng.h" #include "HydrogenImport.h" #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "Instrument.h" #include "InstrumentTrack.h" #include "note.h" @@ -143,7 +143,7 @@ bool HydrogenImport::readSong() QHash pattern_length; QHash pattern_id; - Song *s = engine::getSong(); + Song *s = Engine::getSong(); int song_num_tracks = s->tracks().size(); if ( QFile( filename ).exists() == false ) { @@ -213,7 +213,7 @@ bool HydrogenImport::readSong() if ( nLayer == 0 ) { - drum_track[sId] = ( InstrumentTrack * ) Track::create( Track::InstrumentTrack,engine::getBBTrackContainer() ); + drum_track[sId] = ( InstrumentTrack * ) Track::create( Track::InstrumentTrack,Engine::getBBTrackContainer() ); drum_track[sId]->volumeModel()->setValue( fVolume * 100 ); drum_track[sId]->panningModel()->setValue( ( fPan_R - fPan_L ) * 100 ); ins = drum_track[sId]->loadInstrument( "audiofileprocessor" ); @@ -237,7 +237,7 @@ bool HydrogenImport::readSong() } QDomNode patterns = songNode.firstChildElement( "patternList" ); int pattern_count = 0; - int nbb = engine::getBBTrackContainer()->numOfBBs(); + int nbb = Engine::getBBTrackContainer()->numOfBBs(); QDomNode patternNode = patterns.firstChildElement( "pattern" ); int pn = 1; while ( !patternNode.isNull() ) diff --git a/plugins/LadspaEffect/LadspaEffect.cpp b/plugins/LadspaEffect/LadspaEffect.cpp index 15b5c284f..83c75ba3d 100644 --- a/plugins/LadspaEffect/LadspaEffect.cpp +++ b/plugins/LadspaEffect/LadspaEffect.cpp @@ -71,10 +71,10 @@ LadspaEffect::LadspaEffect( Model * _parent, m_maxSampleRate( 0 ), m_key( LadspaSubPluginFeatures::subPluginKeyToLadspaKey( _key ) ) { - ladspa2LMMS * manager = engine::getLADSPAManager(); + ladspa2LMMS * manager = Engine::getLADSPAManager(); if( manager->getDescription( m_key ) == NULL ) { - if( !engine::suppressMessages() ) + if( !Engine::suppressMessages() ) { QMessageBox::warning( 0, tr( "Effect" ), tr( "Unknown LADSPA plugin %1 requested." ). @@ -89,7 +89,7 @@ LadspaEffect::LadspaEffect( Model * _parent, pluginInstantiation(); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) ); } @@ -147,13 +147,13 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf, sampleFrame * o_buf = NULL; sampleFrame sBuf [_frames]; - if( m_maxSampleRate < engine::mixer()->processingSampleRate() ) + if( m_maxSampleRate < Engine::mixer()->processingSampleRate() ) { o_buf = _buf; _buf = &sBuf[0]; sampleDown( o_buf, _buf, m_maxSampleRate ); frames = _frames * m_maxSampleRate / - engine::mixer()->processingSampleRate(); + Engine::mixer()->processingSampleRate(); } // Copy the LMMS audio buffer to the LADSPA input buffer and initialize @@ -291,10 +291,10 @@ void LadspaEffect::pluginInstantiation() { m_maxSampleRate = maxSamplerate( displayName() ); - ladspa2LMMS * manager = engine::getLADSPAManager(); + ladspa2LMMS * manager = Engine::getLADSPAManager(); // Calculate how many processing units are needed. - const ch_cnt_t lmms_chnls = engine::mixer()->audioDev()->channels(); + const ch_cnt_t lmms_chnls = Engine::mixer()->audioDev()->channels(); int effect_channels = manager->getDescription( m_key )->inputChannels; setProcessorCount( lmms_chnls / effect_channels ); @@ -329,7 +329,7 @@ void LadspaEffect::pluginInstantiation() manager->isPortInput( m_key, port ) ) { p->rate = CHANNEL_IN; - p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() ); + p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() ); inbuf[ inputch ] = p->buffer; inputch++; } @@ -344,19 +344,19 @@ void LadspaEffect::pluginInstantiation() } else { - p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() ); + p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() ); m_inPlaceBroken = true; } } else if( manager->isPortInput( m_key, port ) ) { p->rate = AUDIO_RATE_INPUT; - p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() ); + p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() ); } else { p->rate = AUDIO_RATE_OUTPUT; - p->buffer = MM_ALLOC( LADSPA_Data, engine::mixer()->framesPerPeriod() ); + p->buffer = MM_ALLOC( LADSPA_Data, Engine::mixer()->framesPerPeriod() ); } } else @@ -548,7 +548,7 @@ void LadspaEffect::pluginDestruction() for( ch_cnt_t proc = 0; proc < processorCount(); proc++ ) { - ladspa2LMMS * manager = engine::getLADSPAManager(); + ladspa2LMMS * manager = Engine::getLADSPAManager(); manager->deactivate( m_key, m_handles[proc] ); manager->cleanup( m_key, m_handles[proc] ); for( int port = 0; port < m_portCount; port++ ) @@ -587,7 +587,7 @@ sample_rate_t LadspaEffect::maxSamplerate( const QString & _name ) { return( __buggy_plugins[_name] ); } - return( engine::mixer()->processingSampleRate() ); + return( Engine::mixer()->processingSampleRate() ); } diff --git a/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp b/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp index 237685bf6..7847b6309 100644 --- a/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp +++ b/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp @@ -30,7 +30,7 @@ #include "LadspaSubPluginFeatures.h" #include "AudioDevice.h" -#include "engine.h" +#include "Engine.h" #include "ladspa_2_lmms.h" #include "LadspaBase.h" #include "Mixer.h" @@ -48,7 +48,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent, const Key * _key ) const { const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key ); - ladspa2LMMS * lm = engine::getLADSPAManager(); + ladspa2LMMS * lm = Engine::getLADSPAManager(); QLabel * label = new QLabel( _parent ); label->setText( QWidget::tr( "Name: " ) + lm->getName( lkey ) ); @@ -119,7 +119,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent, void LadspaSubPluginFeatures::listSubPluginKeys( const Plugin::Descriptor * _desc, KeyList & _kl ) const { - ladspa2LMMS * lm = engine::getLADSPAManager(); + ladspa2LMMS * lm = Engine::getLADSPAManager(); l_sortable_plugin_t plugins; switch( m_type ) @@ -145,7 +145,7 @@ void LadspaSubPluginFeatures::listSubPluginKeys( it != plugins.end(); ++it ) { if( lm->getDescription( ( *it ).second )->inputChannels <= - engine::mixer()->audioDev()->channels() ) + Engine::mixer()->audioDev()->channels() ) { _kl.push_back( ladspaKeyToSubPluginKey( _desc, ( *it ).first, ( *it ).second ) ); } diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index d50770553..7250a126f 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -96,10 +96,10 @@ bool MidiImport::tryImport( TrackContainer* tc ) } #ifdef LMMS_HAVE_FLUIDSYNTH - if( engine::hasGUI() && + if( Engine::hasGUI() && ConfigManager::inst()->defaultSoundfont().isEmpty() ) { - QMessageBox::information( engine::mainWindow(), + QMessageBox::information( Engine::mainWindow(), tr( "Setup incomplete" ), tr( "You do not have set up a default soundfont in " "the settings dialog (Edit->Settings). " @@ -268,7 +268,7 @@ bool MidiImport::readSMF( TrackContainer* tc ) const int preTrackSteps = 2; QProgressDialog pd( TrackContainer::tr( "Importing MIDI-file..." ), - TrackContainer::tr( "Cancel" ), 0, preTrackSteps, engine::mainWindow() ); + TrackContainer::tr( "Cancel" ), 0, preTrackSteps, Engine::mainWindow() ); pd.setWindowTitle( TrackContainer::tr( "Please wait..." ) ); pd.setWindowModality(Qt::WindowModal); pd.setMinimumDuration( 0 ); @@ -285,7 +285,7 @@ bool MidiImport::readSMF( TrackContainer* tc ) smfMidiCC ccs[129]; smfMidiChannel chs[256]; - MeterModel & timeSigMM = engine::getSong()->getTimeSigModel(); + MeterModel & timeSigMM = Engine::getSong()->getTimeSigModel(); AutomationPattern * timeSigNumeratorPat = AutomationPattern::globalAutomationPattern( &timeSigMM.numeratorModel() ); AutomationPattern * timeSigDenominatorPat = diff --git a/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp b/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp index ce95fba7d..c06d4aa2b 100644 --- a/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp +++ b/plugins/SpectrumAnalyzer/SpectrumAnalyzer.cpp @@ -127,7 +127,7 @@ bool SpectrumAnalyzer::processAudioBuffer( sampleFrame* _buf, const fpp_t _frame // hanming( m_buffer, FFT_BUFFER_SIZE, HAMMING ); - const sample_rate_t sr = engine::mixer()->processingSampleRate(); + const sample_rate_t sr = Engine::mixer()->processingSampleRate(); const int LOWEST_FREQ = 0; const int HIGHEST_FREQ = sr / 2; diff --git a/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp b/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp index aeaaad42e..fc58d730a 100644 --- a/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp +++ b/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp @@ -59,7 +59,7 @@ public: m_background( PLUGIN_NAME::getIconPixmap( "spectrum_background" ).toImage() ) { setFixedSize( 249, 151 ); - connect( engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) ); + connect( Engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) ); setAttribute( Qt::WA_OpaquePaintEvent, true ); } diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index 8d0462cba..b440c6380 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -142,8 +142,8 @@ void VstEffect::openPlugin( const QString & _plugin ) return; } - VstPlugin::connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) ); - m_plugin->setTempo( engine::getSong()->getTempo() ); + VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) ); + m_plugin->setTempo( Engine::getSong()->getTempo() ); m_pluginMutex.unlock(); diff --git a/plugins/VstEffect/VstEffectControls.cpp b/plugins/VstEffect/VstEffectControls.cpp index f03a9adfd..0c68706ea 100644 --- a/plugins/VstEffect/VstEffectControls.cpp +++ b/plugins/VstEffect/VstEffectControls.cpp @@ -309,7 +309,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls * m_vi->m_scrollArea = new QScrollArea( widget ); l = new QGridLayout( widget ); - m_vi->m_subWindow = engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow | + m_vi->m_subWindow = Engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint); m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); m_vi->m_subWindow->setFixedSize( 960, 300); diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index b5f4b06ae..2a764222b 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -32,7 +32,7 @@ #include #include "audio_file_processor.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" @@ -293,7 +293,7 @@ QString audioFileProcessor::nodeName( void ) const int audioFileProcessor::getBeatLen( NotePlayHandle * _n ) const { const float freq_factor = BaseFreq / _n->frequency() * - engine::mixer()->processingSampleRate() / engine::mixer()->baseSampleRate(); + Engine::mixer()->processingSampleRate() / Engine::mixer()->baseSampleRate(); return static_cast( floorf( ( m_sampleBuffer.endFrame() - m_sampleBuffer.startFrame() ) * freq_factor ) ); } @@ -708,7 +708,7 @@ void AudioFileProcessorView::openAudioFile( void ) if( af != "" ) { castModel()->setAudioFile( af ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 3978440ee..ec6bf6eed 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -27,7 +27,7 @@ #include "bit_invader.h" #include "base64.h" -#include "engine.h" +#include "Engine.h" #include "graph.h" #include "InstrumentTrack.h" #include "knob.h" @@ -279,7 +279,7 @@ void bitInvader::playNote( NotePlayHandle * _n, m_graph.length(), _n, m_interpolation.value(), factor, - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate() ); } const fpp_t frames = _n->framesLeftForCurrentPeriod(); @@ -472,7 +472,7 @@ void bitInvaderView::modelChanged() void bitInvaderView::sinWaveClicked() { m_graph->model()->setWaveToSine(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -481,7 +481,7 @@ void bitInvaderView::sinWaveClicked() void bitInvaderView::triangleWaveClicked() { m_graph->model()->setWaveToTriangle(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -490,7 +490,7 @@ void bitInvaderView::triangleWaveClicked() void bitInvaderView::sawWaveClicked() { m_graph->model()->setWaveToSaw(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -499,7 +499,7 @@ void bitInvaderView::sawWaveClicked() void bitInvaderView::sqrWaveClicked() { m_graph->model()->setWaveToSquare(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -508,7 +508,7 @@ void bitInvaderView::sqrWaveClicked() void bitInvaderView::noiseWaveClicked() { m_graph->model()->setWaveToNoise(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -518,7 +518,7 @@ void bitInvaderView::usrWaveClicked() { QString fileName = m_graph->model()->setWaveToUser(); toolTip::add( m_usrWaveBtn, fileName ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); /* m_graph->model()->setWaveToNoise(); engine::getSong()->setModified(); @@ -554,7 +554,7 @@ void bitInvaderView::usrWaveClicked() void bitInvaderView::smoothClicked() { m_graph->model()->smooth(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -563,7 +563,7 @@ void bitInvaderView::smoothClicked() void bitInvaderView::interpolationToggled( bool value ) { m_graph->setGraphStyle( value ? graph::LinearStyle : graph::NearestStyle); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -571,7 +571,7 @@ void bitInvaderView::interpolationToggled( bool value ) void bitInvaderView::normalizeToggled( bool value ) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } diff --git a/plugins/delay/delaycontrols.cpp b/plugins/delay/delaycontrols.cpp index ecc91e94d..acfdfd36b 100644 --- a/plugins/delay/delaycontrols.cpp +++ b/plugins/delay/delaycontrols.cpp @@ -26,7 +26,7 @@ #include "delaycontrols.h" #include "delayeffect.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" DelayControls::DelayControls( DelayEffect* effect ): @@ -37,7 +37,7 @@ DelayControls::DelayControls( DelayEffect* effect ): m_lfoTimeModel(2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Lfo Frequency" ) ), m_lfoAmountModel(0.0f,0.0f,0.1f,0.0001f, this, tr ( "Lfo Amount" ) ) { - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changeSampleRate() ) ); } diff --git a/plugins/delay/delayeffect.cpp b/plugins/delay/delayeffect.cpp index 939cae7e2..e1634fcbf 100644 --- a/plugins/delay/delayeffect.cpp +++ b/plugins/delay/delayeffect.cpp @@ -23,7 +23,7 @@ */ #include "delayeffect.h" -#include "engine.h" +#include "Engine.h" #include "embed.cpp" @@ -51,8 +51,8 @@ DelayEffect::DelayEffect( Model* parent, const Plugin::Descriptor::SubPluginFeat m_delayControls( this ) { m_delay = 0; - m_delay = new StereoDelay( 20, engine::mixer()->processingSampleRate() ); - m_lfo = new Lfo( engine::mixer()->processingSampleRate() ); + m_delay = new StereoDelay( 20, Engine::mixer()->processingSampleRate() ); + m_lfo = new Lfo( Engine::mixer()->processingSampleRate() ); } @@ -82,7 +82,7 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames ) double outSum = 0.0; const float d = dryLevel(); const float w = wetLevel(); - const float length = m_delayControls.m_delayTimeModel.value() * engine::mixer()->processingSampleRate(); + const float length = m_delayControls.m_delayTimeModel.value() * Engine::mixer()->processingSampleRate(); m_lfo->setAmplitude( m_delayControls.m_lfoAmountModel.value() ); m_lfo->setFrequency( 1.0 / m_delayControls.m_lfoTimeModel.value() ); m_delay->setFeedback( m_delayControls.m_feedbackModel.value() ); @@ -104,8 +104,8 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames ) void DelayEffect::changeSampleRate() { - m_lfo->setSampleRate( engine::mixer()->processingSampleRate() ); - m_delay->setSampleRate( engine::mixer()->processingSampleRate() ); + m_lfo->setSampleRate( Engine::mixer()->processingSampleRate() ); + m_delay->setSampleRate( Engine::mixer()->processingSampleRate() ); } diff --git a/plugins/dynamics_processor/dynamics_processor.cpp b/plugins/dynamics_processor/dynamics_processor.cpp index fa7973dd1..859e661d3 100644 --- a/plugins/dynamics_processor/dynamics_processor.cpp +++ b/plugins/dynamics_processor/dynamics_processor.cpp @@ -58,8 +58,8 @@ dynProcEffect::dynProcEffect( Model * _parent, m_dpControls( this ) { m_currentPeak[0] = m_currentPeak[1] = DYN_NOISE_FLOOR; - m_rms[0] = new RmsHelper( 64 * engine::mixer()->processingSampleRate() / 44100 ); - m_rms[1] = new RmsHelper( 64 * engine::mixer()->processingSampleRate() / 44100 ); + m_rms[0] = new RmsHelper( 64 * Engine::mixer()->processingSampleRate() / 44100 ); + m_rms[1] = new RmsHelper( 64 * Engine::mixer()->processingSampleRate() / 44100 ); calcAttack(); calcRelease(); } @@ -76,12 +76,12 @@ dynProcEffect::~dynProcEffect() inline void dynProcEffect::calcAttack() { - m_attCoeff = exp10( ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() ); + m_attCoeff = exp10( ( DNF_LOG / ( m_dpControls.m_attackModel.value() * 0.001 ) ) / Engine::mixer()->processingSampleRate() ); } inline void dynProcEffect::calcRelease() { - m_relCoeff = exp10( ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / engine::mixer()->processingSampleRate() ); + m_relCoeff = exp10( ( -DNF_LOG / ( m_dpControls.m_releaseModel.value() * 0.001 ) ) / Engine::mixer()->processingSampleRate() ); } @@ -117,8 +117,8 @@ bool dynProcEffect::processAudioBuffer( sampleFrame * _buf, if( m_needsUpdate ) { - m_rms[0]->setSize( 64 * engine::mixer()->processingSampleRate() / 44100 ); - m_rms[1]->setSize( 64 * engine::mixer()->processingSampleRate() / 44100 ); + m_rms[0]->setSize( 64 * Engine::mixer()->processingSampleRate() / 44100 ); + m_rms[1]->setSize( 64 * Engine::mixer()->processingSampleRate() / 44100 ); calcAttack(); calcRelease(); m_needsUpdate = false; diff --git a/plugins/dynamics_processor/dynamics_processor_controls.cpp b/plugins/dynamics_processor/dynamics_processor_controls.cpp index 3a6619853..ecd33eb16 100644 --- a/plugins/dynamics_processor/dynamics_processor_controls.cpp +++ b/plugins/dynamics_processor/dynamics_processor_controls.cpp @@ -30,7 +30,7 @@ #include "dynamics_processor.h" #include "base64.h" #include "graph.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" @@ -48,7 +48,7 @@ dynProcControls::dynProcControls( dynProcEffect * _eff ) : { connect( &m_wavegraphModel, SIGNAL( samplesChanged( int, int ) ), this, SLOT( samplesChanged( int, int ) ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); setDefaultShape(); @@ -63,7 +63,7 @@ void dynProcControls::sampleRateChanged() void dynProcControls::samplesChanged( int _begin, int _end) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -126,13 +126,13 @@ void dynProcControls::setDefaultShape() void dynProcControls::resetClicked() { setDefaultShape(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } void dynProcControls::smoothClicked() { m_wavegraphModel.smoothNonCyclic(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } void dynProcControls::addOneClicked() @@ -141,7 +141,7 @@ void dynProcControls::addOneClicked() { m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] * onedB, 1.0f ) ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } void dynProcControls::subOneClicked() @@ -150,7 +150,7 @@ void dynProcControls::subOneClicked() { m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] / onedB, 1.0f ) ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index 9c5b7c233..64e6b38e9 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -39,7 +39,7 @@ #include "ConfigManager.h" #include "debug.h" #include "Effect.h" -#include "engine.h" +#include "Engine.h" #include "FxMixer.h" #include "FxMixerView.h" #include "group_box.h" @@ -767,8 +767,8 @@ bool FlpImport::tryImport( TrackContainer* tc ) int cur_channel = -1; - const bool is_journ = engine::projectJournal()->isJournalling(); - engine::projectJournal()->setJournalling( false ); + const bool is_journ = Engine::projectJournal()->isJournalling(); + Engine::projectJournal()->setJournalling( false ); while( file().atEnd() == false ) @@ -1411,22 +1411,22 @@ else // now create a project from FL_Project data structure - engine::getSong()->clearProject(); + Engine::getSong()->clearProject(); // configure the mixer for( int i=0; icreateChannel(); + Engine::fxMixer()->createChannel(); } - engine::fxMixerView()->refreshDisplay(); + Engine::fxMixerView()->refreshDisplay(); // set global parameters - engine::getSong()->setMasterVolume( p.mainVolume ); - engine::getSong()->setMasterPitch( p.mainPitch ); - engine::getSong()->setTempo( p.tempo ); + Engine::getSong()->setMasterVolume( p.mainVolume ); + Engine::getSong()->setMasterPitch( p.mainPitch ); + Engine::getSong()->setTempo( p.tempo ); // set project notes - engine::getProjectNotes()->setText( p.projectNotes ); + Engine::getProjectNotes()->setText( p.projectNotes ); progressDialog.setMaximum( p.maxPatterns + p.channels.size() + @@ -1437,11 +1437,11 @@ else QList bb_tracks; QList i_tracks; - while( engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns ) + while( Engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns ) { const int cur_pat = bb_tracks.size(); bbTrack * bbt = dynamic_cast( - Track::create( Track::BBTrack, engine::getSong() ) ); + Track::create( Track::BBTrack, Engine::getSong() ) ); if( p.patternNames.contains( cur_pat ) ) { bbt->setName( p.patternNames[cur_pat] ); @@ -1457,8 +1457,8 @@ else { InstrumentTrack * t = dynamic_cast( Track::create( Track::InstrumentTrack, - engine::getBBTrackContainer() ) ); - engine::getBBTrackContainer()->updateAfterTrackAdd(); + Engine::getBBTrackContainer() ) ); + Engine::getBBTrackContainer()->updateAfterTrackAdd(); i_tracks.push_back( t ); switch( it->pluginType ) { @@ -1657,7 +1657,7 @@ p->putValue( jt->pos, value, false ); for( int fx_ch = 0; fx_ch <= NumFLFxChannels ; ++fx_ch ) { - FxChannel * ch = engine::fxMixer()->effectChannel( fx_ch ); + FxChannel * ch = Engine::fxMixer()->effectChannel( fx_ch ); if( !ch ) { continue; @@ -1719,7 +1719,7 @@ p->putValue( jt->pos, value, false ); { continue; } - EffectChain * ec = &engine::fxMixer()-> + EffectChain * ec = &Engine::fxMixer()-> effectChannel( it->fxChannel )->m_fxChain; qDebug( "adding %s to %d\n", effName.toUtf8().constData(), it->fxChannel ); @@ -1763,14 +1763,14 @@ p->putValue( jt->pos, value, false ); // set current pattern - if( p.activeEditPattern < engine::getBBTrackContainer()->numOfBBs() ) + if( p.activeEditPattern < Engine::getBBTrackContainer()->numOfBBs() ) { - engine::getBBTrackContainer()->setCurrentBB( + Engine::getBBTrackContainer()->setCurrentBB( p.activeEditPattern ); } // restore journalling settings - engine::projectJournal()->setJournalling( is_journ ); + Engine::projectJournal()->setJournalling( is_journ ); return true; } diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index 30f78be25..7738b6422 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -28,7 +28,7 @@ #include #include "kicker.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "knob.h" #include "NotePlayHandle.h" @@ -166,7 +166,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n, const fpp_t frames = _n->framesLeftForCurrentPeriod(); const f_cnt_t offset = _n->noteOffset(); const float decfr = m_decayModel.value() * - engine::mixer()->processingSampleRate() / 1000.0f; + Engine::mixer()->processingSampleRate() / 1000.0f; const f_cnt_t tfp = _n->totalFramesPlayed(); if ( tfp == 0 ) @@ -190,7 +190,7 @@ void kickerInstrument::playNote( NotePlayHandle * _n, } SweepOsc * so = static_cast( _n->m_pluginData ); - so->update( _working_buffer + offset, frames, engine::mixer()->processingSampleRate() ); + so->update( _working_buffer + offset, frames, Engine::mixer()->processingSampleRate() ); if( _n->isReleased() ) { diff --git a/plugins/ladspa_browser/ladspa_description.cpp b/plugins/ladspa_browser/ladspa_description.cpp index d4e6b35a6..88cb07ac0 100644 --- a/plugins/ladspa_browser/ladspa_description.cpp +++ b/plugins/ladspa_browser/ladspa_description.cpp @@ -31,7 +31,7 @@ #include #include "AudioDevice.h" -#include "engine.h" +#include "Engine.h" #include "ladspa_2_lmms.h" #include "Mixer.h" @@ -41,7 +41,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent, ladspaPluginType _type ) : QWidget( _parent ) { - ladspa2LMMS * manager = engine::getLADSPAManager(); + ladspa2LMMS * manager = Engine::getLADSPAManager(); l_sortable_plugin_t plugins; switch( _type ) @@ -74,7 +74,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent, { if( _type != VALID || manager->getDescription( ( *it ).second )->inputChannels - <= engine::mixer()->audioDev()->channels() ) + <= Engine::mixer()->audioDev()->channels() ) { pluginNames.push_back( ( *it ).first ); m_pluginKeys.push_back( ( *it ).second ); @@ -128,7 +128,7 @@ void ladspaDescription::update( const ladspa_key_t & _key ) QVBoxLayout * layout = new QVBoxLayout( description ); layout->setSizeConstraint( QLayout::SetFixedSize ); - ladspa2LMMS * manager = engine::getLADSPAManager(); + ladspa2LMMS * manager = Engine::getLADSPAManager(); QLabel * name = new QLabel( description ); name->setText( QWidget::tr( "Name: " ) + manager->getName( _key ) ); diff --git a/plugins/ladspa_browser/ladspa_port_dialog.cpp b/plugins/ladspa_browser/ladspa_port_dialog.cpp index fef68280c..49ab388e8 100644 --- a/plugins/ladspa_browser/ladspa_port_dialog.cpp +++ b/plugins/ladspa_browser/ladspa_port_dialog.cpp @@ -29,14 +29,14 @@ #include #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "ladspa_2_lmms.h" #include "Mixer.h" ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key ) { - ladspa2LMMS * manager = engine::getLADSPAManager(); + ladspa2LMMS * manager = Engine::getLADSPAManager(); setWindowIcon( embed::getIconPixmap( "ports" ) ); setWindowTitle( tr( "Ports" ) ); @@ -87,11 +87,11 @@ ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key ) { if( min != NOHINT ) { - min *= engine::mixer()->processingSampleRate(); + min *= Engine::mixer()->processingSampleRate(); } if( max != NOHINT ) { - max *= engine::mixer()->processingSampleRate(); + max *= Engine::mixer()->processingSampleRate(); } } diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 306273b11..e10c5f05d 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -30,7 +30,7 @@ #include "lb302.h" #include "automatable_button.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" #include "knob.h" @@ -109,8 +109,8 @@ void lb302Filter::recalc() { vcf_e1 = exp(6.109 + 1.5876*(fs->envmod) + 2.1553*(fs->cutoff) - 1.2*(1.0-(fs->reso))); vcf_e0 = exp(5.613 - 0.8*(fs->envmod) + 2.1553*(fs->cutoff) - 0.7696*(1.0-(fs->reso))); - vcf_e0*=M_PI/engine::mixer()->processingSampleRate(); - vcf_e1*=M_PI/engine::mixer()->processingSampleRate(); + vcf_e0*=M_PI/Engine::mixer()->processingSampleRate(); + vcf_e1*=M_PI/Engine::mixer()->processingSampleRate(); vcf_e1 -= vcf_e0; vcf_rescoeff = exp(-1.20 + 3.455*(fs->reso)); @@ -226,14 +226,14 @@ void lb302Filter3Pole::envRecalc() w = vcf_e0 + vcf_c0; k = (fs->cutoff > 0.975)?0.975:fs->cutoff; kfco = 50.f + (k)*((2300.f-1600.f*(fs->envmod))+(w) * - (700.f+1500.f*(k)+(1500.f+(k)*(engine::mixer()->processingSampleRate()/2.f-6000.f)) * + (700.f+1500.f*(k)+(1500.f+(k)*(Engine::mixer()->processingSampleRate()/2.f-6000.f)) * (fs->envmod)) ); //+iacc*(.3+.7*kfco*kenvmod)*kaccent*kaccurve*2000 #ifdef LB_24_IGNORE_ENVELOPE // kfcn = fs->cutoff; - kfcn = 2.0 * kfco / engine::mixer()->processingSampleRate(); + kfcn = 2.0 * kfco / Engine::mixer()->processingSampleRate(); #else kfcn = w; #endif @@ -284,7 +284,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) : { - connect( engine::mixer(), SIGNAL( sampleRateChanged( ) ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged( ) ), this, SLOT ( filterChanged( ) ) ); connect( &vcf_cut_knob, SIGNAL( dataChanged( ) ), @@ -354,7 +354,7 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) : filterChanged(); InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); } @@ -413,7 +413,7 @@ void lb302Synth::filterChanged() float d = 0.2 + (2.3*vcf_dec_knob.value()); - d *= engine::mixer()->processingSampleRate(); // d *= smpl rate + d *= Engine::mixer()->processingSampleRate(); // d *= smpl rate fs.envdecay = pow(0.1, 1.0/d * ENVINC); // decay is 0.1 to the 1/d * ENVINC // vcf_envdecay is now adjusted for both // sampling rate and ENVINC @@ -463,12 +463,12 @@ inline int MIN(int a, int b) { } inline float GET_INC(float freq) { - return freq/engine::mixer()->processingSampleRate(); // TODO: Use actual sampling rate. + return freq/Engine::mixer()->processingSampleRate(); // TODO: Use actual sampling rate. } int lb302Synth::process(sampleFrame *outbuf, const int size) { - const float sampleRatio = 44100.f / engine::mixer()->processingSampleRate(); + const float sampleRatio = 44100.f / Engine::mixer()->processingSampleRate(); float w; float samp; @@ -643,7 +643,7 @@ int lb302Synth::process(sampleFrame *outbuf, const int size) // Handle Envelope if(vca_mode==0) { vca_a+=(vca_a0-vca_a)*vca_attack; - if(sample_cnt>=0.5*engine::mixer()->processingSampleRate()) + if(sample_cnt>=0.5*Engine::mixer()->processingSampleRate()) vca_mode = 2; } else if(vca_mode == 1) { @@ -793,7 +793,7 @@ void lb302Synth::play( sampleFrame * _working_buffer ) processNote( m_notes.takeFirst() ); }; - const fpp_t frames = engine::mixer()->framesPerPeriod(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); process( _working_buffer, frames ); instrumentTrack()->processAudioBuffer( _working_buffer, frames, NULL ); diff --git a/plugins/monstro/Monstro.cpp b/plugins/monstro/Monstro.cpp index e34c36039..70717d9a6 100644 --- a/plugins/monstro/Monstro.cpp +++ b/plugins/monstro/Monstro.cpp @@ -26,7 +26,7 @@ #include #include "Monstro.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "templates.h" #include "gui_templates.h" @@ -1012,9 +1012,9 @@ MonstroInstrument::MonstroInstrument( InstrumentTrack * _instrument_track ) : // updateSampleRate - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ) ); - m_fpp = engine::mixer()->framesPerPeriod(); + m_fpp = Engine::mixer()->framesPerPeriod(); updateSamplerate(); updateVolume1(); @@ -1425,7 +1425,7 @@ void MonstroInstrument::updateLFOAtts() void MonstroInstrument::updateSamplerate() { - m_samplerate = engine::mixer()->processingSampleRate(); + m_samplerate = Engine::mixer()->processingSampleRate(); m_integrator = 0.5f - ( 0.5f - INTEGRATOR ) * 44100.0f / m_samplerate; m_fmCorrection = 44100.f / m_samplerate * FM_AMOUNT; diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index b5ee3f5e2..0180551ae 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -26,7 +26,7 @@ #include #include "Nes.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "templates.h" #include "tooltip.h" @@ -560,7 +560,7 @@ void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer ) if ( n->totalFramesPlayed() == 0 || n->m_pluginData == NULL ) { - NesObject * nes = new NesObject( this, engine::mixer()->processingSampleRate(), n ); + NesObject * nes = new NesObject( this, Engine::mixer()->processingSampleRate(), n ); n->m_pluginData = nes; } diff --git a/plugins/opl2/opl2instrument.cpp b/plugins/opl2/opl2instrument.cpp index 4f1e810ef..d5b7cacfc 100644 --- a/plugins/opl2/opl2instrument.cpp +++ b/plugins/opl2/opl2instrument.cpp @@ -45,7 +45,7 @@ #include "mididata.h" #include "debug.h" #include "Instrument.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" @@ -139,14 +139,14 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) : { // Connect the plugin to the mixer... InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); // Voices are laid out in a funny way... // adlib_opadd = {0x00, 0x01, 0x02, 0x08, 0x09, 0x0A, 0x10, 0x11, 0x12}; // Create an emulator - samplerate, 16 bit, mono emulatorMutex.lock(); - theEmulator = new CTemuopl(engine::mixer()->processingSampleRate(), true, false); + theEmulator = new CTemuopl(Engine::mixer()->processingSampleRate(), true, false); theEmulator->init(); // Enable waveform selection theEmulator->write(0x01,0x20); @@ -163,7 +163,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) : updatePatch(); // Can the buffer size change suddenly? I bet that would break lots of stuff - frameCount = engine::mixer()->framesPerPeriod(); + frameCount = Engine::mixer()->framesPerPeriod(); renderbuffer = new short[frameCount]; // Some kind of sane defaults @@ -173,7 +173,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) : tuneEqual(69, 440); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( reloadEmulator() ) ); // Connect knobs // This one's for testing... @@ -221,7 +221,7 @@ opl2instrument::opl2instrument( InstrumentTrack * _instrument_track ) : opl2instrument::~opl2instrument() { delete theEmulator; - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); delete [] renderbuffer; } @@ -229,7 +229,7 @@ opl2instrument::~opl2instrument() { void opl2instrument::reloadEmulator() { delete theEmulator; emulatorMutex.lock(); - theEmulator = new CTemuopl(engine::mixer()->processingSampleRate(), true, false); + theEmulator = new CTemuopl(Engine::mixer()->processingSampleRate(), true, false); theEmulator->init(); theEmulator->write(0x01,0x20); emulatorMutex.unlock(); diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index 6cafcad34..5bfb2d863 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -30,7 +30,7 @@ #include -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "knob.h" #include "NotePlayHandle.h" @@ -143,7 +143,7 @@ organicInstrument::organicInstrument( InstrumentTrack * _instrument_track ) : } - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateAllDetuning() ) ); } @@ -628,10 +628,10 @@ void OscillatorObject::updateDetuning() { m_detuningLeft = powf( 2.0f, organicInstrument::s_harmonics[ static_cast( m_harmModel.value() ) ] + (float)m_detuneModel.value() * CENT ) / - engine::mixer()->processingSampleRate(); + Engine::mixer()->processingSampleRate(); m_detuningRight = powf( 2.0f, organicInstrument::s_harmonics[ static_cast( m_harmModel.value() ) ] - (float)m_detuneModel.value() * CENT ) / - engine::mixer()->processingSampleRate(); + Engine::mixer()->processingSampleRate(); } diff --git a/plugins/papu/papu_instrument.cpp b/plugins/papu/papu_instrument.cpp index 6ad4573f7..fc5ff38b7 100644 --- a/plugins/papu/papu_instrument.cpp +++ b/plugins/papu/papu_instrument.cpp @@ -35,7 +35,7 @@ #include "NotePlayHandle.h" #include "pixmap_button.h" #include "tooltip.h" -#include "engine.h" +#include "Engine.h" #include "graph.h" #include "embed.cpp" @@ -237,7 +237,7 @@ void papuInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) { const f_cnt_t tfp = _n->totalFramesPlayed(); - const int samplerate = engine::mixer()->processingSampleRate(); + const int samplerate = Engine::mixer()->processingSampleRate(); const fpp_t frames = _n->framesLeftForCurrentPeriod(); const f_cnt_t offset = _n->noteOffset(); diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 8a97fc577..80dcb5f73 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -30,7 +30,7 @@ #include #include "endian_handling.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" @@ -551,7 +551,7 @@ void PatmanView::openFile( void ) if( f != "" ) { m_pi->setFile( f ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } } diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index 238006357..105b9daea 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -66,8 +66,8 @@ PeakControllerEffect::PeakControllerEffect( m_lastSample( 0 ), m_autoController( NULL ) { - m_autoController = new PeakController( engine::getSong(), this ); - engine::getSong()->addController( m_autoController ); + m_autoController = new PeakController( Engine::getSong(), this ); + Engine::getSong()->addController( m_autoController ); PeakController::s_effects.append( this ); } @@ -80,7 +80,7 @@ PeakControllerEffect::~PeakControllerEffect() if( idx >= 0 ) { PeakController::s_effects.remove( idx ); - engine::getSong()->removeController( m_autoController ); + Engine::getSong()->removeController( m_autoController ); } } diff --git a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp index c200903ba..2b040fcc0 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_controls.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect_controls.cpp @@ -72,7 +72,7 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this ) * m_effectId is copied, then there would be two instruments * having the same id. */ - if( engine::getSong()->isLoadingProject() == true ) + if( Engine::getSong()->isLoadingProject() == true ) { m_effect->m_effectId = _this.attribute( "effectId" ).toInt(); } diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 9fae191fc..f6eb4c784 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -30,7 +30,7 @@ #include "FileDialog.h" #include "sf2_player.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "InstrumentPlayHandle.h" #include "NotePlayHandle.h" @@ -119,7 +119,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) : m_synth = new_fluid_synth( m_settings ); InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); loadFile( ConfigManager::inst()->defaultSoundfont() ); @@ -133,7 +133,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) : connect( &m_bankNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) ); connect( &m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); // Gain connect( &m_gain, SIGNAL( dataChanged() ), this, SLOT( updateGain() ) ); @@ -158,7 +158,7 @@ sf2Instrument::sf2Instrument( InstrumentTrack * _instrument_track ) : sf2Instrument::~sf2Instrument() { - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); freeFont(); delete_fluid_synth( m_synth ); delete_fluid_settings( m_settings ); @@ -465,7 +465,7 @@ void sf2Instrument::updateSampleRate() double tempRate; // Set & get, returns the true sample rate - fluid_settings_setnum( m_settings, (char *) "synth.sample-rate", engine::mixer()->processingSampleRate() ); + fluid_settings_setnum( m_settings, (char *) "synth.sample-rate", Engine::mixer()->processingSampleRate() ); fluid_settings_getnum( m_settings, (char *) "synth.sample-rate", &tempRate ); m_internalSampleRate = static_cast( tempRate ); @@ -495,7 +495,7 @@ void sf2Instrument::updateSampleRate() } m_synthMutex.lock(); - if( engine::mixer()->currentQualitySettings().interpolation >= + if( Engine::mixer()->currentQualitySettings().interpolation >= Mixer::qualitySettings::Interpolation_SincFastest ) { fluid_synth_set_interp_method( m_synth, -1, FLUID_INTERP_7THORDER ); @@ -505,7 +505,7 @@ void sf2Instrument::updateSampleRate() fluid_synth_set_interp_method( m_synth, -1, FLUID_INTERP_DEFAULT ); } m_synthMutex.unlock(); - if( m_internalSampleRate < engine::mixer()->processingSampleRate() ) + if( m_internalSampleRate < Engine::mixer()->processingSampleRate() ) { m_synthMutex.lock(); if( m_srcState != NULL ) @@ -513,7 +513,7 @@ void sf2Instrument::updateSampleRate() src_delete( m_srcState ); } int error; - m_srcState = src_new( engine::mixer()->currentQualitySettings().libsrcInterpolation(), DEFAULT_CHANNELS, &error ); + m_srcState = src_new( Engine::mixer()->currentQualitySettings().libsrcInterpolation(), DEFAULT_CHANNELS, &error ); if( m_srcState == NULL || error ) { qCritical( "error while creating libsamplerate data structure in Sf2Instrument::updateSampleRate()" ); @@ -641,7 +641,7 @@ void sf2Instrument::noteOff( SF2PluginData * n ) void sf2Instrument::play( sampleFrame * _working_buffer ) { - const fpp_t frames = engine::mixer()->framesPerPeriod(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); // set midi pitch for this period const int currentMidiPitch = instrumentTrack()->midiPitch(); @@ -722,10 +722,10 @@ void sf2Instrument::play( sampleFrame * _working_buffer ) void sf2Instrument::renderFrames( f_cnt_t frames, sampleFrame * buf ) { m_synthMutex.lock(); - if( m_internalSampleRate < engine::mixer()->processingSampleRate() && + if( m_internalSampleRate < Engine::mixer()->processingSampleRate() && m_srcState != NULL ) { - const fpp_t f = frames * m_internalSampleRate / engine::mixer()->processingSampleRate(); + const fpp_t f = frames * m_internalSampleRate / Engine::mixer()->processingSampleRate(); #ifdef __GNUC__ sampleFrame tmp[f]; #else @@ -1084,7 +1084,7 @@ void sf2InstrumentView::showFileDialog() if( f != "" ) { k->openFile( f ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index 66d412ff7..cd14af241 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -39,7 +39,7 @@ float frnd(float range) #include #include "sfxr.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "knob.h" #include "NotePlayHandle.h" @@ -451,7 +451,7 @@ QString sfxrInstrument::nodeName() const void sfxrInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) { - float currentSampleRate = engine::mixer()->processingSampleRate(); + float currentSampleRate = Engine::mixer()->processingSampleRate(); fpp_t frameNum = _n->framesLeftForCurrentPeriod(); const f_cnt_t offset = _n->noteOffset(); diff --git a/plugins/sid/sid_instrument.cpp b/plugins/sid/sid_instrument.cpp index 4a219f9f9..6942daa2d 100644 --- a/plugins/sid/sid_instrument.cpp +++ b/plugins/sid/sid_instrument.cpp @@ -32,7 +32,7 @@ #include "sid.h" #include "sid_instrument.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "knob.h" #include "NotePlayHandle.h" @@ -230,7 +230,7 @@ QString sidInstrument::nodeName() const f_cnt_t sidInstrument::desiredReleaseFrames() const { - const float samplerate = engine::mixer()->processingSampleRate(); + const float samplerate = Engine::mixer()->processingSampleRate(); int maxrel = 0; for( int i = 0 ; i < 3 ; ++i ) { @@ -305,7 +305,7 @@ void sidInstrument::playNote( NotePlayHandle * _n, const f_cnt_t tfp = _n->totalFramesPlayed(); const int clockrate = C64_PAL_CYCLES_PER_SEC; - const int samplerate = engine::mixer()->processingSampleRate(); + const int samplerate = Engine::mixer()->processingSampleRate(); if ( tfp == 0 ) { diff --git a/plugins/stereo_enhancer/stereo_enhancer.h b/plugins/stereo_enhancer/stereo_enhancer.h index 41ba7d4bc..931d906a5 100644 --- a/plugins/stereo_enhancer/stereo_enhancer.h +++ b/plugins/stereo_enhancer/stereo_enhancer.h @@ -28,7 +28,7 @@ #include "Effect.h" #include "DspEffectLibrary.h" -#include "engine.h" +#include "Engine.h" #include "stereoenhancer_controls.h" class stereoEnhancerEffect : public Effect diff --git a/plugins/triple_oscillator/TripleOscillator.cpp b/plugins/triple_oscillator/TripleOscillator.cpp index be54e0f91..97bd18de7 100644 --- a/plugins/triple_oscillator/TripleOscillator.cpp +++ b/plugins/triple_oscillator/TripleOscillator.cpp @@ -30,7 +30,7 @@ #include "TripleOscillator.h" #include "automatable_button.h" #include "debug.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "knob.h" #include "NotePlayHandle.h" @@ -175,7 +175,7 @@ void OscillatorObject::updateDetuningLeft() { m_detuningLeft = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f + (float)m_fineLeftModel.value() ) / 1200.0f ) - / engine::mixer()->processingSampleRate(); + / Engine::mixer()->processingSampleRate(); } @@ -185,7 +185,7 @@ void OscillatorObject::updateDetuningRight() { m_detuningRight = powf( 2.0f, ( (float)m_coarseModel.value() * 100.0f + (float)m_fineRightModel.value() ) / 1200.0f ) - / engine::mixer()->processingSampleRate(); + / Engine::mixer()->processingSampleRate(); } @@ -217,7 +217,7 @@ TripleOscillator::TripleOscillator( InstrumentTrack * _instrument_track ) : } - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateAllDetuning() ) ); } diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 7a165d6ac..4b3f7b386 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -32,7 +32,7 @@ #include #include -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" @@ -83,7 +83,7 @@ vestigeInstrument::vestigeInstrument( InstrumentTrack * _instrument_track ) : { // now we need a play-handle which cares for calling play() InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); } @@ -101,7 +101,7 @@ vestigeInstrument::~vestigeInstrument() knobFModel = NULL; } - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); closePlugin(); } @@ -302,7 +302,7 @@ void vestigeInstrument::play( sampleFrame * _buf ) m_plugin->process( NULL, _buf ); - const fpp_t frames = engine::mixer()->framesPerPeriod(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); instrumentTrack()->processAudioBuffer( _buf, frames, NULL ); @@ -647,7 +647,7 @@ void VestigeInstrumentView::openPlugin() { return; } - engine::mixer()->lock(); + Engine::mixer()->lock(); if (m_vi->p_subWindow != NULL) { delete m_vi->p_subWindow; @@ -655,7 +655,7 @@ void VestigeInstrumentView::openPlugin() } m_vi->loadFile( ofd.selectedFiles()[0] ); - engine::mixer()->unlock(); + Engine::mixer()->unlock(); if( m_vi->m_plugin && m_vi->m_plugin->pluginWidget() ) { m_vi->m_plugin->pluginWidget()->setWindowIcon( @@ -881,7 +881,7 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume widget = new QWidget(this); l = new QGridLayout( this ); - m_vi->m_subWindow = engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow | + m_vi->m_subWindow = Engine::mainWindow()->workspace()->addSubWindow(new QMdiSubWindow, Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint); m_vi->m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::MinimumExpanding ); m_vi->m_subWindow->setFixedWidth( 960 ); diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index 248944102..3368bebe7 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -27,7 +27,7 @@ #include #include "vibed.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" #include "tooltip.h" @@ -277,7 +277,7 @@ void vibed::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL ) { _n->m_pluginData = new stringContainer( _n->frequency(), - engine::mixer()->processingSampleRate(), + Engine::mixer()->processingSampleRate(), __sampleLength ); for( int i = 0; i < 9; ++i ) @@ -690,7 +690,7 @@ void vibedView::showString( int _string ) void vibedView::sinWaveClicked() { m_graph->model()->setWaveToSine(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -698,7 +698,7 @@ void vibedView::sinWaveClicked() void vibedView::triangleWaveClicked() { m_graph->model()->setWaveToTriangle(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -706,7 +706,7 @@ void vibedView::triangleWaveClicked() void vibedView::sawWaveClicked() { m_graph->model()->setWaveToSaw(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -714,7 +714,7 @@ void vibedView::sawWaveClicked() void vibedView::sqrWaveClicked() { m_graph->model()->setWaveToSquare(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -722,7 +722,7 @@ void vibedView::sqrWaveClicked() void vibedView::noiseWaveClicked() { m_graph->model()->setWaveToNoise(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -731,7 +731,7 @@ void vibedView::usrWaveClicked() { QString fileName = m_graph->model()->setWaveToUser(); toolTip::add( m_usrWaveBtn, fileName ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -739,7 +739,7 @@ void vibedView::usrWaveClicked() void vibedView::smoothClicked() { m_graph->model()->smooth(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -747,7 +747,7 @@ void vibedView::smoothClicked() void vibedView::normalizeClicked() { m_graph->model()->normalize(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } diff --git a/plugins/vibed/vibrating_string.cpp b/plugins/vibed/vibrating_string.cpp index 494f987c0..37d0ab709 100644 --- a/plugins/vibed/vibrating_string.cpp +++ b/plugins/vibed/vibrating_string.cpp @@ -27,7 +27,7 @@ #include "templates.h" #include "interpolation.h" #include "Mixer.h" -#include "engine.h" +#include "Engine.h" vibratingString::vibratingString( float _pitch, @@ -42,7 +42,7 @@ vibratingString::vibratingString( float _pitch, float _detune, bool _state ) : m_oversample( 2 * _oversample / (int)( _sample_rate / - engine::mixer()->baseSampleRate() ) ), + Engine::mixer()->baseSampleRate() ) ), m_randomize( _randomize ), m_stringLoss( 1.0f - _string_loss ), m_state( 0.1f ) diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index 683e25951..f6a38adc8 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -46,7 +46,7 @@ #endif #include "ConfigManager.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" #include "Song.h" #include "templates.h" @@ -108,11 +108,11 @@ VstPlugin::VstPlugin( const QString & _plugin ) : } #endif - setTempo( engine::getSong()->getTempo() ); + setTempo( Engine::getSong()->getTempo() ); - connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), + connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), this, SLOT( setTempo( bpm_t ) ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); // update once per second @@ -237,7 +237,7 @@ void VstPlugin::showEditor( QWidget * _parent, bool isEffect ) if( _parent == NULL ) { vstSubWin * sw = new vstSubWin( - engine::mainWindow()->workspace() ); + Engine::mainWindow()->workspace() ); if( isEffect ) { sw->setAttribute( Qt::WA_TranslucentBackground ); @@ -377,7 +377,7 @@ void VstPlugin::updateSampleRate() { lock(); sendMessage( message( IdSampleRateInformation ). - addInt( engine::mixer()->processingSampleRate() ) ); + addInt( Engine::mixer()->processingSampleRate() ) ); unlock(); } diff --git a/plugins/watsyn/Watsyn.cpp b/plugins/watsyn/Watsyn.cpp index 8deb012a2..1d2f8e59b 100644 --- a/plugins/watsyn/Watsyn.cpp +++ b/plugins/watsyn/Watsyn.cpp @@ -26,7 +26,7 @@ #include "Watsyn.h" #include "base64.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "templates.h" #include "tooltip.h" @@ -337,8 +337,8 @@ void WatsynInstrument::playNote( NotePlayHandle * _n, &B1_wave[0], &B2_wave[0], m_amod.value(), m_bmod.value(), - engine::mixer()->processingSampleRate(), _n, - engine::mixer()->framesPerPeriod(), this ); + Engine::mixer()->processingSampleRate(), _n, + Engine::mixer()->framesPerPeriod(), this ); _n->m_pluginData = w; } @@ -983,19 +983,19 @@ void WatsynView::sinWaveClicked() { case A1_OSC: a1_graph->model()->setWaveToSine(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->setWaveToSine(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->setWaveToSine(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->setWaveToSine(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1007,19 +1007,19 @@ void WatsynView::triWaveClicked() { case A1_OSC: a1_graph->model()->setWaveToTriangle(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->setWaveToTriangle(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->setWaveToTriangle(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->setWaveToTriangle(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1031,19 +1031,19 @@ void WatsynView::sawWaveClicked() { case A1_OSC: a1_graph->model()->setWaveToSaw(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->setWaveToSaw(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->setWaveToSaw(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->setWaveToSaw(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1055,19 +1055,19 @@ void WatsynView::sqrWaveClicked() { case A1_OSC: a1_graph->model()->setWaveToSquare(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->setWaveToSquare(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->setWaveToSquare(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->setWaveToSquare(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1079,19 +1079,19 @@ void WatsynView::normalizeClicked() { case A1_OSC: a1_graph->model()->normalize(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->normalize(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->normalize(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->normalize(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1103,19 +1103,19 @@ void WatsynView::invertClicked() { case A1_OSC: a1_graph->model()->invert(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->invert(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->invert(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->invert(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1127,19 +1127,19 @@ void WatsynView::smoothClicked() { case A1_OSC: a1_graph->model()->smooth(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->smooth(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->smooth(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->smooth(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1151,19 +1151,19 @@ void WatsynView::phaseLeftClicked() { case A1_OSC: a1_graph->model()->shiftPhase( -15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->shiftPhase( -15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->shiftPhase( -15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->shiftPhase( -15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1175,19 +1175,19 @@ void WatsynView::phaseRightClicked() { case A1_OSC: a1_graph->model()->shiftPhase( 15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->shiftPhase( 15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->shiftPhase( 15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->shiftPhase( 15 ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -1200,19 +1200,19 @@ void WatsynView::loadClicked() { case A1_OSC: a1_graph->model()->setWaveToUser(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case A2_OSC: a2_graph->model()->setWaveToUser(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B1_OSC: b1_graph->model()->setWaveToUser(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; case B2_OSC: b2_graph->model()->setWaveToUser(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } diff --git a/plugins/waveshaper/waveshaper_controls.cpp b/plugins/waveshaper/waveshaper_controls.cpp index 6b612234b..5091861a6 100644 --- a/plugins/waveshaper/waveshaper_controls.cpp +++ b/plugins/waveshaper/waveshaper_controls.cpp @@ -30,7 +30,7 @@ #include "waveshaper.h" #include "base64.h" #include "graph.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" @@ -55,7 +55,7 @@ waveShaperControls::waveShaperControls( waveShaperEffect * _eff ) : void waveShaperControls::samplesChanged( int _begin, int _end) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -115,13 +115,13 @@ void waveShaperControls::setDefaultShape() void waveShaperControls::resetClicked() { setDefaultShape(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } void waveShaperControls::smoothClicked() { m_wavegraphModel.smoothNonCyclic(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } void waveShaperControls::addOneClicked() @@ -130,7 +130,7 @@ void waveShaperControls::addOneClicked() { m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] * onedB, 1.0f ) ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } void waveShaperControls::subOneClicked() @@ -139,7 +139,7 @@ void waveShaperControls::subOneClicked() { m_wavegraphModel.setSampleAt( i, qBound( 0.0f, m_wavegraphModel.samples()[i] / onedB, 1.0f ) ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 91b8f43b5..52f6f2a01 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -32,7 +32,7 @@ #include #include "ZynAddSubFx.h" -#include "engine.h" +#include "Engine.h" #include "knob.h" #include "led_checkbox.h" #include "DataFile.h" @@ -130,9 +130,9 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument( // now we need a play-handle which cares for calling play() InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrumentTrack ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( reloadPlugin() ) ); connect( instrumentTrack()->pitchRangeModel(), SIGNAL( dataChanged() ), @@ -144,7 +144,7 @@ ZynAddSubFxInstrument::ZynAddSubFxInstrument( ZynAddSubFxInstrument::~ZynAddSubFxInstrument() { - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); m_pluginMutex.lock(); delete m_plugin; @@ -333,7 +333,7 @@ void ZynAddSubFxInstrument::play( sampleFrame * _buf ) m_plugin->processAudio( _buf ); } m_pluginMutex.unlock(); - instrumentTrack()->processAudioBuffer( _buf, engine::mixer()->framesPerPeriod(), NULL ); + instrumentTrack()->processAudioBuffer( _buf, Engine::mixer()->framesPerPeriod(), NULL ); } @@ -443,11 +443,11 @@ void ZynAddSubFxInstrument::initPlugin() QString( ConfigManager::inst()->factoryPresetsDir() + QDir::separator() + "ZynAddSubFX" ) ) ) ); - m_remotePlugin->updateSampleRate( engine::mixer()->processingSampleRate() ); + m_remotePlugin->updateSampleRate( Engine::mixer()->processingSampleRate() ); // temporary workaround until the VST synchronization feature gets stripped out of the RemotePluginClient class // causing not to send buffer size information requests - m_remotePlugin->sendMessage( RemotePlugin::message( IdBufferSizeInformation ).addInt( engine::mixer()->framesPerPeriod() ) ); + m_remotePlugin->sendMessage( RemotePlugin::message( IdBufferSizeInformation ).addInt( Engine::mixer()->framesPerPeriod() ) ); m_remotePlugin->showUI(); m_remotePlugin->unlock(); @@ -455,8 +455,8 @@ void ZynAddSubFxInstrument::initPlugin() else { m_plugin = new LocalZynAddSubFx; - m_plugin->setSampleRate( engine::mixer()->processingSampleRate() ); - m_plugin->setBufferSize( engine::mixer()->framesPerPeriod() ); + m_plugin->setSampleRate( Engine::mixer()->processingSampleRate() ); + m_plugin->setBufferSize( Engine::mixer()->framesPerPeriod() ); } m_pluginMutex.unlock(); diff --git a/src/core/AutomatableModel.cpp b/src/core/AutomatableModel.cpp index b527f3673..9549f5ad1 100644 --- a/src/core/AutomatableModel.cpp +++ b/src/core/AutomatableModel.cpp @@ -52,7 +52,7 @@ AutomatableModel::AutomatableModel( DataType type, m_hasStrictStepSize( false ), m_hasLinkedModels( false ), m_controllerConnection( NULL ), - m_valueBuffer( static_cast( engine::mixer()->framesPerPeriod() ) ), + m_valueBuffer( static_cast( Engine::mixer()->framesPerPeriod() ) ), m_lastUpdatedPeriod( -1 ), m_hasSampleExactData( false ) diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index 79f009e05..c5aa7a02b 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -79,10 +79,10 @@ AutomationPattern::AutomationPattern( const AutomationPattern & _pat_to_copy ) : AutomationPattern::~AutomationPattern() { - if( engine::automationEditor() && - engine::automationEditor()->currentPattern() == this ) + if( Engine::automationEditor() && + Engine::automationEditor()->currentPattern() == this ) { - engine::automationEditor()->setCurrentPattern( NULL ); + Engine::automationEditor()->setCurrentPattern( NULL ); } } @@ -186,9 +186,9 @@ MidiTime AutomationPattern::putValue( const MidiTime & _time, { cleanObjects(); - MidiTime newTime = _quant_pos && engine::automationEditor() ? + MidiTime newTime = _quant_pos && Engine::automationEditor() ? note::quantized( _time, - engine::automationEditor()->quantization() ) : + Engine::automationEditor()->quantization() ) : _time; m_timeMap[newTime] = _value; @@ -219,9 +219,9 @@ void AutomationPattern::removeValue( const MidiTime & _time, { cleanObjects(); - MidiTime newTime = _quant_pos && engine::automationEditor() ? + MidiTime newTime = _quant_pos && Engine::automationEditor() ? note::quantized( _time, - engine::automationEditor()->quantization() ) : + Engine::automationEditor()->quantization() ) : _time; m_timeMap.remove( newTime ); @@ -259,9 +259,9 @@ MidiTime AutomationPattern::setDragValue( const MidiTime & _time, const float _v { if( m_dragging == false ) { - MidiTime newTime = _quant_pos && engine::automationEditor() ? + MidiTime newTime = _quant_pos && Engine::automationEditor() ? note::quantized( _time, - engine::automationEditor()->quantization() ) : + Engine::automationEditor()->quantization() ) : _time; this->removeValue( newTime ); m_oldTimeMap = m_timeMap; @@ -523,9 +523,9 @@ trackContentObjectView * AutomationPattern::createView( trackView * _tv ) bool AutomationPattern::isAutomated( const AutomatableModel * _m ) { TrackContainer::TrackList l; - l += engine::getSong()->tracks(); - l += engine::getBBTrackContainer()->tracks(); - l += engine::getSong()->globalAutomationTrack(); + l += Engine::getSong()->tracks(); + l += Engine::getBBTrackContainer()->tracks(); + l += Engine::getSong()->globalAutomationTrack(); for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it ) { @@ -560,9 +560,9 @@ QVector AutomationPattern::patternsForModel( const Automata { QVector patterns; TrackContainer::TrackList l; - l += engine::getSong()->tracks(); - l += engine::getBBTrackContainer()->tracks(); - l += engine::getSong()->globalAutomationTrack(); + l += Engine::getSong()->tracks(); + l += Engine::getBBTrackContainer()->tracks(); + l += Engine::getSong()->globalAutomationTrack(); // go through all tracks... for( TrackContainer::TrackList::ConstIterator it = l.begin(); it != l.end(); ++it ) @@ -604,7 +604,7 @@ QVector AutomationPattern::patternsForModel( const Automata AutomationPattern * AutomationPattern::globalAutomationPattern( AutomatableModel * _m ) { - AutomationTrack * t = engine::getSong()->globalAutomationTrack(); + AutomationTrack * t = Engine::getSong()->globalAutomationTrack(); Track::tcoVector v = t->getTCOs(); for( Track::tcoVector::const_iterator j = v.begin(); j != v.end(); ++j ) { @@ -632,9 +632,9 @@ AutomationPattern * AutomationPattern::globalAutomationPattern( void AutomationPattern::resolveAllIDs() { - TrackContainer::TrackList l = engine::getSong()->tracks() + - engine::getBBTrackContainer()->tracks(); - l += engine::getSong()->globalAutomationTrack(); + TrackContainer::TrackList l = Engine::getSong()->tracks() + + Engine::getBBTrackContainer()->tracks(); + l += Engine::getSong()->globalAutomationTrack(); for( TrackContainer::TrackList::iterator it = l.begin(); it != l.end(); ++it ) { @@ -651,7 +651,7 @@ void AutomationPattern::resolveAllIDs() for( QVector::Iterator k = a->m_idsToResolve.begin(); k != a->m_idsToResolve.end(); ++k ) { - JournallingObject * o = engine::projectJournal()-> + JournallingObject * o = Engine::projectJournal()-> journallingObject( *k ); if( o && dynamic_cast( o ) ) { @@ -676,10 +676,10 @@ void AutomationPattern::clear() emit dataChanged(); - if( engine::automationEditor() && - engine::automationEditor()->currentPattern() == this ) + if( Engine::automationEditor() && + Engine::automationEditor()->currentPattern() == this ) { - engine::automationEditor()->update(); + Engine::automationEditor()->update(); } } @@ -688,9 +688,9 @@ void AutomationPattern::clear() void AutomationPattern::openInAutomationEditor() { - engine::automationEditor()->setCurrentPattern( this ); - engine::automationEditor()->parentWidget()->show(); - engine::automationEditor()->setFocus(); + Engine::automationEditor()->setCurrentPattern( this ); + Engine::automationEditor()->parentWidget()->show(); + Engine::automationEditor()->setFocus(); } diff --git a/src/core/BBTrackContainer.cpp b/src/core/BBTrackContainer.cpp index dc43ac660..a2e78e6e4 100644 --- a/src/core/BBTrackContainer.cpp +++ b/src/core/BBTrackContainer.cpp @@ -27,7 +27,7 @@ #include "bb_track.h" #include "combobox.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" @@ -82,9 +82,9 @@ bool BBTrackContainer::play( MidiTime _start, fpp_t _frames, void BBTrackContainer::updateAfterTrackAdd() { - if( numOfBBs() == 0 && !engine::getSong()->isLoadingProject() ) + if( numOfBBs() == 0 && !Engine::getSong()->isLoadingProject() ) { - engine::getSong()->addBBTrack(); + Engine::getSong()->addBBTrack(); } // make sure, new track(s) have TCOs for every beat/bassline @@ -116,7 +116,7 @@ tact_t BBTrackContainer::lengthOfBB( int _bb ) int BBTrackContainer::numOfBBs() const { - return engine::getSong()->countTracks( Track::BBTrack ); + return Engine::getSong()->countTracks( Track::BBTrack ); } @@ -182,13 +182,13 @@ void BBTrackContainer::fixIncorrectPositions() void BBTrackContainer::play() { - if( engine::getSong()->playMode() != Song::Mode_PlayBB ) + if( Engine::getSong()->playMode() != Song::Mode_PlayBB ) { - engine::getSong()->playBB(); + Engine::getSong()->playBB(); } else { - engine::getSong()->togglePause(); + Engine::getSong()->togglePause(); } } @@ -197,7 +197,7 @@ void BBTrackContainer::play() void BBTrackContainer::stop() { - engine::getSong()->stop(); + Engine::getSong()->stop(); } @@ -227,7 +227,7 @@ void BBTrackContainer::currentBBChanged() // now update all track-labels (the current one has to become white, // the others gray) - TrackList tl = engine::getSong()->tracks(); + TrackList tl = Engine::getSong()->tracks(); for( TrackList::iterator it = tl.begin(); it != tl.end(); ++it ) { if( ( *it )->type() == Track::BBTrack ) @@ -242,7 +242,7 @@ void BBTrackContainer::currentBBChanged() void BBTrackContainer::createTCOsForBB( int _bb ) { - if( numOfBBs() == 0 || engine::getSong()->isLoadingProject() ) + if( numOfBBs() == 0 || Engine::getSong()->isLoadingProject() ) { return; } diff --git a/src/core/Controller.cpp b/src/core/Controller.cpp index 3e1ee0ba5..71a6dca3a 100644 --- a/src/core/Controller.cpp +++ b/src/core/Controller.cpp @@ -30,7 +30,7 @@ #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "Controller.h" #include "ControllerConnection.h" @@ -49,7 +49,7 @@ Controller::Controller( ControllerTypes _type, Model * _parent, const QString & _display_name ) : Model( _parent, _display_name ), JournallingObject(), - m_valueBuffer( engine::mixer()->framesPerPeriod() ), + m_valueBuffer( Engine::mixer()->framesPerPeriod() ), m_bufferLastUpdated( -1 ), m_connectionCount( 0 ), m_type( _type ) @@ -95,9 +95,9 @@ Controller::~Controller() s_controllers.remove( idx ); } - if( engine::getSong() ) + if( Engine::getSong() ) { - engine::getSong()->removeController( this ); + Engine::getSong()->removeController( this ); } m_valueBuffer.clear(); @@ -153,7 +153,7 @@ void Controller::updateValueBuffer() // Get position in frames unsigned int Controller::runningFrames() { - return s_periods * engine::mixer()->framesPerPeriod(); + return s_periods * Engine::mixer()->framesPerPeriod(); } @@ -161,7 +161,7 @@ unsigned int Controller::runningFrames() // Get position in seconds float Controller::runningTime() { - return runningFrames() / engine::mixer()->processingSampleRate(); + return runningFrames() / Engine::mixer()->processingSampleRate(); } diff --git a/src/core/ControllerConnection.cpp b/src/core/ControllerConnection.cpp index 7ba723925..3c0266ab6 100644 --- a/src/core/ControllerConnection.cpp +++ b/src/core/ControllerConnection.cpp @@ -30,7 +30,7 @@ #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "ControllerConnection.h" @@ -160,9 +160,9 @@ void ControllerConnection::finalizeConnections() { ControllerConnection * c = s_connections[i]; if ( !c->isFinalized() && c->m_controllerId < - engine::getSong()->controllers().size() ) + Engine::getSong()->controllers().size() ) { - c->setController( engine::getSong()-> + c->setController( Engine::getSong()-> controllers().at( c->m_controllerId ) ); } } @@ -173,7 +173,7 @@ void ControllerConnection::finalizeConnections() void ControllerConnection::saveSettings( QDomDocument & _doc, QDomElement & _this ) { - if( engine::getSong() ) + if( Engine::getSong() ) { if( m_ownsController ) { @@ -181,7 +181,7 @@ void ControllerConnection::saveSettings( QDomDocument & _doc, QDomElement & _thi } else { - int id = engine::getSong()->controllers().indexOf( m_controller ); + int id = Engine::getSong()->controllers().indexOf( m_controller ); if( id >= 0 ) { _this.setAttribute( "id", id ); @@ -198,7 +198,7 @@ void ControllerConnection::loadSettings( const QDomElement & _this ) QDomNode node = _this.firstChild(); if( !node.isNull() ) { - setController( Controller::create( node.toElement(), engine::getSong() ) ); + setController( Controller::create( node.toElement(), Engine::getSong() ) ); } else { diff --git a/src/core/Effect.cpp b/src/core/Effect.cpp index f83dd97ef..c6aeecb29 100644 --- a/src/core/Effect.cpp +++ b/src/core/Effect.cpp @@ -26,7 +26,7 @@ #include #include "Effect.h" -#include "engine.h" +#include "Engine.h" #include "EffectChain.h" #include "EffectControls.h" #include "EffectView.h" @@ -182,7 +182,7 @@ void Effect::reinitSRC() } int error; if( ( m_srcState[i] = src_new( - engine::mixer()->currentQualitySettings(). + Engine::mixer()->currentQualitySettings(). libsrcInterpolation(), DEFAULT_CHANNELS, &error ) ) == NULL ) { @@ -204,7 +204,7 @@ void Effect::resample( int _i, const sampleFrame * _src_buf, return; } m_srcData[_i].input_frames = _frames; - m_srcData[_i].output_frames = engine::mixer()->framesPerPeriod(); + m_srcData[_i].output_frames = Engine::mixer()->framesPerPeriod(); m_srcData[_i].data_in = (float *) _src_buf[0]; m_srcData[_i].data_out = _dst_buf[0]; m_srcData[_i].src_ratio = (double) _dst_sr / _src_sr; diff --git a/src/core/EffectChain.cpp b/src/core/EffectChain.cpp index f5bd9b95c..f7a15bcf7 100644 --- a/src/core/EffectChain.cpp +++ b/src/core/EffectChain.cpp @@ -28,7 +28,7 @@ #include "EffectChain.h" #include "Effect.h" -#include "engine.h" +#include "Engine.h" #include "debug.h" #include "DummyEffect.h" #include "MixHelpers.h" @@ -121,9 +121,9 @@ void EffectChain::loadSettings( const QDomElement & _this ) void EffectChain::appendEffect( Effect * _effect ) { - engine::mixer()->lock(); + Engine::mixer()->lock(); m_effects.append( _effect ); - engine::mixer()->unlock(); + Engine::mixer()->unlock(); emit dataChanged(); } @@ -133,9 +133,9 @@ void EffectChain::appendEffect( Effect * _effect ) void EffectChain::removeEffect( Effect * _effect ) { - engine::mixer()->lock(); + Engine::mixer()->lock(); m_effects.erase( qFind( m_effects.begin(), m_effects.end(), _effect ) ); - engine::mixer()->unlock(); + Engine::mixer()->unlock(); emit dataChanged(); } @@ -195,7 +195,7 @@ bool EffectChain::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames, b { return false; } - const bool exporting = engine::getSong()->isExporting(); + const bool exporting = Engine::getSong()->isExporting(); if( exporting ) // strip infs/nans if exporting { MixHelpers::sanitize( _buf, _frames ); diff --git a/src/core/engine.cpp b/src/core/Engine.cpp similarity index 77% rename from src/core/engine.cpp rename to src/core/Engine.cpp index e42db7f4f..f2d1c3712 100644 --- a/src/core/engine.cpp +++ b/src/core/Engine.cpp @@ -1,5 +1,5 @@ /* - * engine.cpp - implementation of LMMS' engine-system + * Engine.cpp - implementation of LMMS' engine-system * * Copyright (c) 2006-2014 Tobias Doerffel * @@ -23,7 +23,7 @@ */ -#include "engine.h" +#include "Engine.h" #include "AutomationEditor.h" #include "bb_editor.h" #include "BBTrackContainer.h" @@ -46,30 +46,30 @@ #include "BandLimitedWave.h" -bool engine::s_hasGUI = true; -bool engine::s_suppressMessages = false; -float engine::s_framesPerTick; -Mixer* engine::s_mixer = NULL; -FxMixer * engine::s_fxMixer = NULL; -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; -AutomationEditor * engine::s_automationEditor = NULL; -bbEditor * engine::s_bbEditor = NULL; -PianoRoll* engine::s_pianoRoll = NULL; -projectNotes * engine::s_projectNotes = NULL; -ProjectJournal * engine::s_projectJournal = NULL; -ladspa2LMMS * engine::s_ladspaManager = NULL; -DummyTrackContainer * engine::s_dummyTC = NULL; -ControllerRackView * engine::s_controllerRackView = NULL; -QMap engine::s_pluginFileHandling; +bool Engine::s_hasGUI = true; +bool Engine::s_suppressMessages = false; +float Engine::s_framesPerTick; +Mixer* Engine::s_mixer = NULL; +FxMixer * Engine::s_fxMixer = NULL; +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; +AutomationEditor * Engine::s_automationEditor = NULL; +bbEditor * Engine::s_bbEditor = NULL; +PianoRoll* Engine::s_pianoRoll = NULL; +projectNotes * Engine::s_projectNotes = NULL; +ProjectJournal * Engine::s_projectJournal = NULL; +ladspa2LMMS * Engine::s_ladspaManager = NULL; +DummyTrackContainer * Engine::s_dummyTC = NULL; +ControllerRackView * Engine::s_controllerRackView = NULL; +QMap Engine::s_pluginFileHandling; -void engine::init( const bool _has_gui ) +void Engine::init( const bool _has_gui ) { s_hasGUI = _has_gui; @@ -113,7 +113,7 @@ void engine::init( const bool _has_gui ) -void engine::destroy() +void Engine::destroy() { s_mixer->stopProcessing(); @@ -150,7 +150,7 @@ void engine::destroy() -void engine::updateFramesPerTick() +void Engine::updateFramesPerTick() { s_framesPerTick = s_mixer->processingSampleRate() * 60.0f * 4 / DefaultTicksPerTact / s_song->getTempo(); @@ -159,7 +159,7 @@ void engine::updateFramesPerTick() -void engine::initPluginFileHandling() +void Engine::initPluginFileHandling() { Plugin::DescriptorList pluginDescriptors; Plugin::getDescriptorsOfAvailPlugins( pluginDescriptors ); diff --git a/src/core/EnvelopeAndLfoParameters.cpp b/src/core/EnvelopeAndLfoParameters.cpp index a0259fbb0..5685b46f6 100644 --- a/src/core/EnvelopeAndLfoParameters.cpp +++ b/src/core/EnvelopeAndLfoParameters.cpp @@ -26,7 +26,7 @@ #include "EnvelopeAndLfoParameters.h" #include "debug.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "Oscillator.h" @@ -47,7 +47,7 @@ void EnvelopeAndLfoParameters::LfoInstances::trigger() it != m_lfos.end(); ++it ) { ( *it )->m_lfoFrame += - engine::mixer()->framesPerPeriod(); + Engine::mixer()->framesPerPeriod(); ( *it )->m_bad_lfoShapeData = true; } } @@ -157,12 +157,12 @@ EnvelopeAndLfoParameters::EnvelopeAndLfoParameters( connect( &m_x100Model, SIGNAL( dataChanged() ), this, SLOT( updateSampleVars() ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleVars() ) ); m_lfoShapeData = - new sample_t[engine::mixer()->framesPerPeriod()]; + new sample_t[Engine::mixer()->framesPerPeriod()]; updateSampleVars(); } @@ -242,7 +242,7 @@ inline sample_t EnvelopeAndLfoParameters::lfoShapeSample( fpp_t _frame_offset ) void EnvelopeAndLfoParameters::updateLfoShapeData() { - const fpp_t frames = engine::mixer()->framesPerPeriod(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); for( fpp_t offset = 0; offset < frames; ++offset ) { m_lfoShapeData[offset] = lfoShapeSample( offset ); @@ -404,7 +404,7 @@ void EnvelopeAndLfoParameters::loadSettings( const QDomElement & _this ) void EnvelopeAndLfoParameters::updateSampleVars() { const float frames_per_env_seg = SECS_PER_ENV_SEGMENT * - engine::mixer()->processingSampleRate(); + Engine::mixer()->processingSampleRate(); // TODO: Remove the expKnobVals, time should be linear const f_cnt_t predelay_frames = static_cast( frames_per_env_seg * @@ -502,7 +502,7 @@ void EnvelopeAndLfoParameters::updateSampleVars() const float frames_per_lfo_oscillation = SECS_PER_LFO_OSCILLATION * - engine::mixer()->processingSampleRate(); + Engine::mixer()->processingSampleRate(); m_lfoPredelayFrames = static_cast( frames_per_lfo_oscillation * expKnobVal( m_lfoPredelayModel.value() ) ); m_lfoAttackFrames = static_cast( frames_per_lfo_oscillation * diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index 8c20fdefc..6423965c6 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -63,7 +63,7 @@ FxChannel::FxChannel( int idx, Model * _parent ) : m_stillRunning( false ), m_peakLeft( 0.0f ), m_peakRight( 0.0f ), - m_buffer( new sampleFrame[engine::mixer()->framesPerPeriod()] ), + m_buffer( new sampleFrame[Engine::mixer()->framesPerPeriod()] ), m_muteModel( false, _parent ), m_soloModel( false, _parent ), m_volumeModel( 1.0, 0.0, 2.0, 0.001, _parent ), @@ -73,8 +73,8 @@ FxChannel::FxChannel( int idx, Model * _parent ) : m_queued( false ), m_dependenciesMet( 0 ) { - engine::mixer()->clearAudioBuffer( m_buffer, - engine::mixer()->framesPerPeriod() ); + Engine::mixer()->clearAudioBuffer( m_buffer, + Engine::mixer()->framesPerPeriod() ); } @@ -118,8 +118,8 @@ void FxChannel::unmuteForSolo() void FxChannel::doProcessing() { - const fpp_t fpp = engine::mixer()->framesPerPeriod(); - const bool exporting = engine::getSong()->isExporting(); + const fpp_t fpp = Engine::mixer()->framesPerPeriod(); + const bool exporting = Engine::getSong()->isExporting(); if( m_muted == false ) { @@ -177,8 +177,8 @@ void FxChannel::doProcessing() m_stillRunning = m_fxChain.processAudioBuffer( m_buffer, fpp, m_hasInput ); - m_peakLeft = qMax( m_peakLeft, engine::mixer()->peakValueLeft( m_buffer, fpp ) * v ); - m_peakRight = qMax( m_peakRight, engine::mixer()->peakValueRight( m_buffer, fpp ) * v ); + m_peakLeft = qMax( m_peakLeft, Engine::mixer()->peakValueLeft( m_buffer, fpp ) * v ); + m_peakRight = qMax( m_peakRight, Engine::mixer()->peakValueRight( m_buffer, fpp ) * v ); } else { @@ -289,8 +289,8 @@ void FxMixer::deleteChannel( int index ) // go through every instrument and adjust for the channel index change TrackContainer::TrackList tracks; - tracks += engine::getSong()->tracks(); - tracks += engine::getBBTrackContainer()->tracks(); + tracks += Engine::getSong()->tracks(); + tracks += Engine::getBBTrackContainer()->tracks(); foreach( Track* t, tracks ) { @@ -345,8 +345,8 @@ void FxMixer::moveChannelLeft( int index ) int a = index - 1, b = index; // go through every instrument and adjust for the channel index change - QVector songTrackList = engine::getSong()->tracks(); - QVector bbTrackList = engine::getBBTrackContainer()->tracks(); + QVector songTrackList = Engine::getSong()->tracks(); + QVector bbTrackList = Engine::getBBTrackContainer()->tracks(); QVector trackLists[] = {songTrackList, bbTrackList}; for(int tl=0; tl<2; ++tl) @@ -428,7 +428,7 @@ FxRoute * FxMixer::createRoute( FxChannel * from, FxChannel * to, float amount ) to->m_receives.append( route ); // add us to fxmixer's list - engine::fxMixer()->m_fxRoutes.append( route ); + Engine::fxMixer()->m_fxRoutes.append( route ); m_sendsMutex.unlock(); return route; @@ -462,7 +462,7 @@ void FxMixer::deleteChannelSend( FxRoute * route ) // remove us from to's receives route->receiver()->m_receives.remove( route->receiver()->m_receives.indexOf( route ) ); // remove us from fxmixer's list - engine::fxMixer()->m_fxRoutes.remove( engine::fxMixer()->m_fxRoutes.indexOf( route ) ); + Engine::fxMixer()->m_fxRoutes.remove( Engine::fxMixer()->m_fxRoutes.indexOf( route ) ); delete route; m_sendsMutex.unlock(); } @@ -534,7 +534,7 @@ void FxMixer::mixToChannel( const sampleFrame * _buf, fx_ch_t _ch ) if( m_fxChannels[_ch]->m_muteModel.value() == false ) { m_fxChannels[_ch]->m_lock.lock(); - MixHelpers::add( m_fxChannels[_ch]->m_buffer, _buf, engine::mixer()->framesPerPeriod() ); + MixHelpers::add( m_fxChannels[_ch]->m_buffer, _buf, Engine::mixer()->framesPerPeriod() ); m_fxChannels[_ch]->m_hasInput = true; m_fxChannels[_ch]->m_lock.unlock(); } @@ -545,15 +545,15 @@ void FxMixer::mixToChannel( const sampleFrame * _buf, fx_ch_t _ch ) void FxMixer::prepareMasterMix() { - engine::mixer()->clearAudioBuffer( m_fxChannels[0]->m_buffer, - engine::mixer()->framesPerPeriod() ); + Engine::mixer()->clearAudioBuffer( m_fxChannels[0]->m_buffer, + Engine::mixer()->framesPerPeriod() ); } void FxMixer::masterMix( sampleFrame * _buf ) { - const int fpp = engine::mixer()->framesPerPeriod(); + const int fpp = Engine::mixer()->framesPerPeriod(); if( m_sendsMutex.tryLock() ) { @@ -601,14 +601,14 @@ void FxMixer::masterMix( sampleFrame * _buf ) : m_fxChannels[0]->m_volumeModel.value(); MixHelpers::addSanitizedMultiplied( _buf, m_fxChannels[0]->m_buffer, v, fpp ); - m_fxChannels[0]->m_peakLeft *= engine::mixer()->masterGain(); - m_fxChannels[0]->m_peakRight *= engine::mixer()->masterGain(); + m_fxChannels[0]->m_peakLeft *= Engine::mixer()->masterGain(); + m_fxChannels[0]->m_peakRight *= Engine::mixer()->masterGain(); // clear all channel buffers and // reset channel process state for( int i = 0; i < numChannels(); ++i) { - engine::mixer()->clearAudioBuffer( m_fxChannels[i]->m_buffer, engine::mixer()->framesPerPeriod() ); + Engine::mixer()->clearAudioBuffer( m_fxChannels[i]->m_buffer, Engine::mixer()->framesPerPeriod() ); m_fxChannels[i]->reset(); m_fxChannels[i]->m_queued = false; // also reset hasInput diff --git a/src/core/ImportFilter.cpp b/src/core/ImportFilter.cpp index 9214f6f87..e126de512 100644 --- a/src/core/ImportFilter.cpp +++ b/src/core/ImportFilter.cpp @@ -26,7 +26,7 @@ #include #include "ImportFilter.h" -#include "engine.h" +#include "Engine.h" #include "TrackContainer.h" #include "ProjectJournal.h" @@ -60,8 +60,8 @@ void ImportFilter::import( const QString & _file_to_import, char * s = qstrdup( _file_to_import.toUtf8().constData() ); // do not record changes while importing files - const bool j = engine::projectJournal()->isJournalling(); - engine::projectJournal()->setJournalling( false ); + const bool j = Engine::projectJournal()->isJournalling(); + Engine::projectJournal()->setJournalling( false ); for( Plugin::DescriptorList::ConstIterator it = d.begin(); it != d.end(); ++it ) @@ -80,7 +80,7 @@ void ImportFilter::import( const QString & _file_to_import, } } - engine::projectJournal()->setJournalling( j ); + Engine::projectJournal()->setJournalling( j ); delete[] s; diff --git a/src/core/Instrument.cpp b/src/core/Instrument.cpp index 2e5cf39cb..f8b04fdb5 100644 --- a/src/core/Instrument.cpp +++ b/src/core/Instrument.cpp @@ -27,7 +27,7 @@ #include "DummyInstrument.h" #include "NotePlayHandle.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" Instrument::Instrument( InstrumentTrack * _instrument_track, @@ -100,7 +100,7 @@ bool Instrument::isFromTrack( const Track * _track ) const void Instrument::applyRelease( sampleFrame * buf, const NotePlayHandle * _n ) { const fpp_t frames = _n->framesLeftForCurrentPeriod(); - const fpp_t fpp = engine::mixer()->framesPerPeriod(); + const fpp_t fpp = Engine::mixer()->framesPerPeriod(); const f_cnt_t fl = _n->framesLeft(); if( fl <= desiredReleaseFrames()+fpp ) { diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 1afc1cb23..050d19d80 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -26,7 +26,7 @@ #include "InstrumentFunctions.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" #include "PresetPreviewPlayHandle.h" @@ -260,7 +260,7 @@ void InstrumentFunctionNoteStacking::processNote( NotePlayHandle * _n ) // create sub-note-play-handle, only note is // different - engine::mixer()->addPlayHandle( + Engine::mixer()->addPlayHandle( NotePlayHandleManager::acquire( _n->instrumentTrack(), _n->offset(), _n->frames(), note_copy, _n, -1, NotePlayHandle::OriginNoteStacking ) ); @@ -369,7 +369,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) const int total_range = range * cnphv.size(); // number of frames that every note should be played - const f_cnt_t arp_frames = (f_cnt_t)( m_arpTimeModel.value() / 1000.0f * engine::mixer()->processingSampleRate() ); + const f_cnt_t arp_frames = (f_cnt_t)( m_arpTimeModel.value() / 1000.0f * Engine::mixer()->processingSampleRate() ); const f_cnt_t gated_frames = (f_cnt_t)( m_arpGateModel.value() * arp_frames / 100.0f ); // used for calculating remaining frames for arp-note, we have to add @@ -381,11 +381,11 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) // used for loop f_cnt_t frames_processed = ( m_arpModeModel.value() != FreeMode ) ? cnphv.first()->noteOffset() : _n->noteOffset(); - while( frames_processed < engine::mixer()->framesPerPeriod() ) + while( frames_processed < Engine::mixer()->framesPerPeriod() ) { const f_cnt_t remaining_frames_for_cur_arp = arp_frames - ( cur_frame % arp_frames ); // does current arp-note fill whole audio-buffer? - if( remaining_frames_for_cur_arp > engine::mixer()->framesPerPeriod() ) + if( remaining_frames_for_cur_arp > Engine::mixer()->framesPerPeriod() ) { // then we don't have to do something! break; @@ -458,7 +458,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) // range-checking if( sub_note_key >= NumKeys || sub_note_key < 0 || - engine::mixer()->criticalXRuns() ) + Engine::mixer()->criticalXRuns() ) { continue; } @@ -473,7 +473,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) // create sub-note-play-handle, only ptr to note is different // and is_arp_note=true - engine::mixer()->addPlayHandle( + Engine::mixer()->addPlayHandle( NotePlayHandleManager::acquire( _n->instrumentTrack(), frames_processed, gated_frames, diff --git a/src/core/InstrumentSoundShaping.cpp b/src/core/InstrumentSoundShaping.cpp index f815be85b..70d8f98d3 100644 --- a/src/core/InstrumentSoundShaping.cpp +++ b/src/core/InstrumentSoundShaping.cpp @@ -27,7 +27,7 @@ #include "InstrumentSoundShaping.h" #include "basic_filters.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "EnvelopeAndLfoParameters.h" #include "Instrument.h" #include "InstrumentTrack.h" @@ -119,7 +119,7 @@ float InstrumentSoundShaping::volumeLevel( NotePlayHandle* n, const f_cnt_t fram if( n->isReleased() == false ) { - envReleaseBegin += engine::mixer()->framesPerPeriod(); + envReleaseBegin += Engine::mixer()->framesPerPeriod(); } float level; @@ -161,7 +161,7 @@ void InstrumentSoundShaping::processAudioBuffer( sampleFrame* buffer, if( n->m_filter == NULL ) { - n->m_filter = new basicFilters<>( engine::mixer()->processingSampleRate() ); + n->m_filter = new basicFilters<>( Engine::mixer()->processingSampleRate() ); } n->m_filter->setFilterType( m_filterModel.value() ); diff --git a/src/core/JournallingObject.cpp b/src/core/JournallingObject.cpp index a169a550b..b2eea2d6d 100644 --- a/src/core/JournallingObject.cpp +++ b/src/core/JournallingObject.cpp @@ -30,13 +30,13 @@ #include "AutomatableModel.h" #include "ProjectJournal.h" #include "base64.h" -#include "engine.h" +#include "Engine.h" JournallingObject::JournallingObject() : SerializingObject(), - m_id( engine::projectJournal()->allocID( this ) ), + m_id( Engine::projectJournal()->allocID( this ) ), m_journalling( true ), m_journallingStateStack() { @@ -47,9 +47,9 @@ JournallingObject::JournallingObject() : JournallingObject::~JournallingObject() { - if( engine::projectJournal() ) + if( Engine::projectJournal() ) { - engine::projectJournal()->freeID( id() ); + Engine::projectJournal()->freeID( id() ); } } @@ -60,7 +60,7 @@ void JournallingObject::addJournalCheckPoint() { if( isJournalling() ) { - engine::projectJournal()->addJournalCheckPoint( this ); + Engine::projectJournal()->addJournalCheckPoint( this ); } } @@ -114,7 +114,7 @@ void JournallingObject::changeID( jo_id_t _id ) { if( id() != _id ) { - JournallingObject * jo = engine::projectJournal()-> + JournallingObject * jo = Engine::projectJournal()-> journallingObject( _id ); if( jo != NULL ) { @@ -131,7 +131,7 @@ void JournallingObject::changeID( jo_id_t _id ) return; } - engine::projectJournal()->reallocID( _id, this ); + Engine::projectJournal()->reallocID( _id, this ); m_id = _id; } } diff --git a/src/core/LfoController.cpp b/src/core/LfoController.cpp index f72191496..5d77ce06a 100644 --- a/src/core/LfoController.cpp +++ b/src/core/LfoController.cpp @@ -30,7 +30,7 @@ #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "LfoController.h" #include "ControllerDialog.h" @@ -60,12 +60,12 @@ LfoController::LfoController( Model * _parent ) : this, SLOT( updateDuration() ) ); connect( &m_multiplierModel, SIGNAL( dataChanged() ), this, SLOT( updateDuration() ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateDuration() ) ); - connect( engine::getSong(), SIGNAL( playbackStateChanged() ), + connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), this, SLOT( updatePhase() ) ); - connect( engine::getSong(), SIGNAL( playbackPositionChanged() ), + connect( Engine::getSong(), SIGNAL( playbackPositionChanged() ), this, SLOT( updatePhase() ) ); updateDuration(); @@ -97,7 +97,7 @@ void LfoController::updateValueBuffer() if( m_bufferLastUpdated < s_periods ) { int diff = s_periods - m_bufferLastUpdated; - phase += static_cast( engine::mixer()->framesPerPeriod() * diff ) / m_duration; + phase += static_cast( Engine::mixer()->framesPerPeriod() * diff ) / m_duration; m_bufferLastUpdated += diff; } @@ -119,14 +119,14 @@ void LfoController::updateValueBuffer() void LfoController::updatePhase() { - m_currentPhase = ( engine::getSong()->getFrames() ) / m_duration; + m_currentPhase = ( Engine::getSong()->getFrames() ) / m_duration; m_bufferLastUpdated = s_periods - 1; } void LfoController::updateDuration() { - float newDurationF = engine::mixer()->processingSampleRate() * m_speedModel.value(); + float newDurationF = Engine::mixer()->processingSampleRate() * m_speedModel.value(); switch(m_multiplierModel.value() ) { diff --git a/src/core/Mixer.cpp b/src/core/Mixer.cpp index 0ae8743e1..0630b8e47 100644 --- a/src/core/Mixer.cpp +++ b/src/core/Mixer.cpp @@ -34,7 +34,7 @@ #include "NotePlayHandle.h" #include "InstrumentTrack.h" #include "debug.h" -#include "engine.h" +#include "Engine.h" #include "ConfigManager.h" #include "SamplePlayHandle.h" #include "PianoRoll.h" @@ -86,7 +86,7 @@ Mixer::Mixer() : } // just rendering? - if( !engine::hasGUI() ) + if( !Engine::hasGUI() ) { m_framesPerPeriod = DEFAULT_BUFFER_SIZE; m_fifo = new fifo( 1 ); @@ -278,7 +278,7 @@ sample_rate_t Mixer::processingSampleRate() const bool Mixer::criticalXRuns() const { - return cpuLoad() >= 99 && engine::getSong()->isExporting() == false; + return cpuLoad() >= 99 && Engine::getSong()->isExporting() == false; } @@ -320,10 +320,10 @@ const surroundSampleFrame * Mixer::renderNextBuffer() static Song::playPos last_metro_pos = -1; - Song::playPos p = engine::getSong()->getPlayPos( + Song::playPos p = Engine::getSong()->getPlayPos( Song::Mode_PlayPattern ); - if( engine::getSong()->playMode() == Song::Mode_PlayPattern && - engine::pianoRoll()->isRecording() == true && + if( Engine::getSong()->playMode() == Song::Mode_PlayPattern && + Engine::pianoRoll()->isRecording() == true && p != last_metro_pos ) { if ( p.getTicks() % (MidiTime::ticksPerTact() / 1 ) == 0 ) @@ -331,7 +331,7 @@ const surroundSampleFrame * Mixer::renderNextBuffer() addPlayHandle( new SamplePlayHandle( "misc/metronome02.ogg" ) ); } else if ( p.getTicks() % (MidiTime::ticksPerTact() / - engine::getSong()->getTimeSigModel().getNumerator() ) == 0 ) + Engine::getSong()->getTimeSigModel().getNumerator() ) == 0 ) { addPlayHandle( new SamplePlayHandle( "misc/metronome01.ogg" ) ); } @@ -385,10 +385,10 @@ const surroundSampleFrame * Mixer::renderNextBuffer() clearAudioBuffer( m_writeBuf, m_framesPerPeriod ); // prepare master mix (clear internal buffers etc.) - engine::fxMixer()->prepareMasterMix(); + Engine::fxMixer()->prepareMasterMix(); // create play-handles for new notes, samples etc. - engine::getSong()->processNextBuffer(); + Engine::getSong()->processNextBuffer(); // add all play-handles that have to be added m_playHandleMutex.lock(); @@ -434,7 +434,7 @@ const surroundSampleFrame * Mixer::renderNextBuffer() // STAGE 3: do master mix in FX mixer - engine::fxMixer()->masterMix( m_writeBuf ); + Engine::fxMixer()->masterMix( m_writeBuf ); unlock(); diff --git a/src/core/MixerWorkerThread.cpp b/src/core/MixerWorkerThread.cpp index 9cc65c4c4..5a9ca166c 100644 --- a/src/core/MixerWorkerThread.cpp +++ b/src/core/MixerWorkerThread.cpp @@ -23,7 +23,7 @@ */ #include "MixerWorkerThread.h" -#include "engine.h" +#include "Engine.h" MixerWorkerThread::JobQueue MixerWorkerThread::globalJobQueue; diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 53e277370..f8b1321e5 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -69,7 +69,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, m_hadChildren( false ), m_muted( false ), m_bbTrack( NULL ), - m_origTempo( engine::getSong()->getTempo() ), + m_origTempo( Engine::getSong()->getTempo() ), m_origBaseNote( instrumentTrack->baseNote() ), m_frequency( 0 ), m_unpitchedFrequency( 0 ), @@ -114,7 +114,7 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, // send MidiNoteOn event m_instrumentTrack->processOutEvent( MidiEvent( MidiNoteOn, midiChannel(), midiKey(), midiVelocity( baseVelocity ) ), - MidiTime::fromFrames( offset(), engine::framesPerTick() ), + MidiTime::fromFrames( offset(), Engine::framesPerTick() ), offset() ); } @@ -207,9 +207,9 @@ void NotePlayHandle::play( sampleFrame * _working_buffer ) } // if the note offset falls over to next period, then don't start playback yet - if( offset() >= engine::mixer()->framesPerPeriod() ) + if( offset() >= Engine::mixer()->framesPerPeriod() ) { - setOffset( offset() - engine::mixer()->framesPerPeriod() ); + setOffset( offset() - Engine::mixer()->framesPerPeriod() ); return; } @@ -221,8 +221,8 @@ void NotePlayHandle::play( sampleFrame * _working_buffer ) // number of frames that can be played this period f_cnt_t framesThisPeriod = m_totalFramesPlayed == 0 - ? engine::mixer()->framesPerPeriod() - offset() - : engine::mixer()->framesPerPeriod(); + ? Engine::mixer()->framesPerPeriod() - offset() + : Engine::mixer()->framesPerPeriod(); // check if we start release during this period if( m_released == false && @@ -261,7 +261,7 @@ void NotePlayHandle::play( sampleFrame * _working_buffer ) // are inserted by arpAndChordsTabWidget::processNote() if( ! m_subNotes.isEmpty() ) { - m_releaseFramesToDo = m_releaseFramesDone + 2 * engine::mixer()->framesPerPeriod(); + m_releaseFramesToDo = m_releaseFramesDone + 2 * Engine::mixer()->framesPerPeriod(); } // look whether we have frames left to be done before release if( m_framesBeforeRelease ) @@ -325,7 +325,7 @@ f_cnt_t NotePlayHandle::framesLeft() const { if( instrumentTrack()->isSustainPedalPressed() ) { - return 4*engine::mixer()->framesPerPeriod(); + return 4*Engine::mixer()->framesPerPeriod(); } else if( m_released && actualReleaseFramesToDo() == 0 ) { @@ -345,9 +345,9 @@ fpp_t NotePlayHandle::framesLeftForCurrentPeriod() const { if( m_totalFramesPlayed == 0 ) { - return (fpp_t) qMin( framesLeft(), engine::mixer()->framesPerPeriod() - offset() ); + return (fpp_t) qMin( framesLeft(), Engine::mixer()->framesPerPeriod() - offset() ); } - return (fpp_t) qMin( framesLeft(), engine::mixer()->framesPerPeriod() ); + return (fpp_t) qMin( framesLeft(), Engine::mixer()->framesPerPeriod() ); } @@ -386,14 +386,14 @@ void NotePlayHandle::noteOff( const f_cnt_t _s ) // send MidiNoteOff event m_instrumentTrack->processOutEvent( MidiEvent( MidiNoteOff, midiChannel(), midiKey(), 0 ), - MidiTime::fromFrames( _s, engine::framesPerTick() ), + MidiTime::fromFrames( _s, Engine::framesPerTick() ), _s ); } // inform attached components about MIDI finished (used for recording in Piano Roll) if( m_origin == OriginMidiInput ) { - setLength( MidiTime( static_cast( totalFramesPlayed() / engine::framesPerTick() ) ) ); + setLength( MidiTime( static_cast( totalFramesPlayed() / Engine::framesPerTick() ) ) ); m_instrumentTrack->midiNoteOff( *this ); } } @@ -445,7 +445,7 @@ void NotePlayHandle::mute() int NotePlayHandle::index() const { - const PlayHandleList & playHandles = engine::mixer()->playHandles(); + const PlayHandleList & playHandles = Engine::mixer()->playHandles(); int idx = 0; for( PlayHandleList::ConstIterator it = playHandles.begin(); it != playHandles.end(); ++it ) { @@ -468,7 +468,7 @@ int NotePlayHandle::index() const ConstNotePlayHandleList NotePlayHandle::nphsOfInstrumentTrack( const InstrumentTrack * _it, bool _all_ph ) { - const PlayHandleList & playHandles = engine::mixer()->playHandles(); + const PlayHandleList & playHandles = Engine::mixer()->playHandles(); ConstNotePlayHandleList cnphv; for( PlayHandleList::ConstIterator it = playHandles.begin(); it != playHandles.end(); ++it ) @@ -512,7 +512,7 @@ void NotePlayHandle::updateFrequency() const float pitch = ( key() - m_instrumentTrack->baseNoteModel()->value() + - engine::getSong()->masterPitch() + + Engine::getSong()->masterPitch() + m_baseDetuning->value() ) / 12.0f; m_frequency = BaseFreq * powf( 2.0f, pitch + m_instrumentTrack->pitchModel()->value() / ( 100 * 12.0f ) ); diff --git a/src/core/Oscillator.cpp b/src/core/Oscillator.cpp index b07699cc5..843e99688 100644 --- a/src/core/Oscillator.cpp +++ b/src/core/Oscillator.cpp @@ -23,7 +23,7 @@ */ #include "Oscillator.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "AutomatableModel.h" @@ -55,7 +55,7 @@ Oscillator::Oscillator( const IntModel * _wave_shape_model, void Oscillator::update( sampleFrame * _ab, const fpp_t _frames, const ch_cnt_t _chnl ) { - if( m_freq >= engine::mixer()->processingSampleRate() / 2 ) + if( m_freq >= Engine::mixer()->processingSampleRate() / 2 ) { Mixer::clearAudioBuffer( _ab, _frames ); return; @@ -456,7 +456,7 @@ void Oscillator::updateFM( sampleFrame * _ab, const fpp_t _frames, recalcPhase(); const float osc_coeff = m_freq * m_detuning; const float sampleRateCorrection = 44100.0f / - engine::mixer()->processingSampleRate(); + Engine::mixer()->processingSampleRate(); for( fpp_t frame = 0; frame < _frames; ++frame ) { diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index af6493048..c8702f937 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -31,7 +31,7 @@ #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "PeakController.h" #include "EffectChain.h" @@ -60,7 +60,7 @@ PeakController::PeakController( Model * _parent, connect( m_peakEffect, SIGNAL( destroyed( ) ), this, SLOT( handleDestroyedEffect( ) ) ); } - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateCoeffs() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateCoeffs() ) ); connect( m_peakEffect->attackModel(), SIGNAL( dataChanged() ), this, SLOT( updateCoeffs() ) ); connect( m_peakEffect->decayModel(), SIGNAL( dataChanged() ), this, SLOT( updateCoeffs() ) ); m_coeffNeedsUpdate = true; @@ -86,7 +86,7 @@ void PeakController::updateValueBuffer() { if( m_coeffNeedsUpdate ) { - const float ratio = 44100.0f / engine::mixer()->processingSampleRate(); + const float ratio = 44100.0f / Engine::mixer()->processingSampleRate(); m_attackCoeff = 1.0f - powf( 2.0f, -0.3f * ( 1.0f - m_peakEffect->attackModel()->value() ) * ratio ); m_decayCoeff = 1.0f - powf( 2.0f, -0.3f * ( 1.0f - m_peakEffect->decayModel()->value() ) * ratio ); m_coeffNeedsUpdate = false; @@ -97,7 +97,7 @@ void PeakController::updateValueBuffer() float targetSample = m_peakEffect->lastSample(); if( m_currentSample != targetSample ) { - const f_cnt_t frames = engine::mixer()->framesPerPeriod(); + const f_cnt_t frames = Engine::mixer()->framesPerPeriod(); float * values = m_valueBuffer.values(); for( f_cnt_t f = 0; f < frames; ++f ) diff --git a/src/core/Plugin.cpp b/src/core/Plugin.cpp index 2894cc412..1078ae2d1 100644 --- a/src/core/Plugin.cpp +++ b/src/core/Plugin.cpp @@ -29,7 +29,7 @@ #include "Plugin.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "ConfigManager.h" #include "DummyPlugin.h" @@ -96,7 +96,7 @@ Plugin * Plugin::instantiate( const QString & pluginName, Model * parent, QLibrary pluginLibrary( ConfigManager::inst()->pluginDir() + pluginName ); if( pluginLibrary.load() == false ) { - if( engine::hasGUI() ) + if( Engine::hasGUI() ) { QMessageBox::information( NULL, tr( "Plugin not found" ), @@ -110,7 +110,7 @@ Plugin * Plugin::instantiate( const QString & pluginName, Model * parent, InstantiationHook instantiationHook = ( InstantiationHook ) pluginLibrary.resolve( "lmms_plugin_main" ); if( instantiationHook == NULL ) { - if( engine::hasGUI() ) + if( Engine::hasGUI() ) { QMessageBox::information( NULL, tr( "Error while loading plugin" ), diff --git a/src/core/PresetPreviewPlayHandle.cpp b/src/core/PresetPreviewPlayHandle.cpp index d5ac70962..e4c95eb62 100644 --- a/src/core/PresetPreviewPlayHandle.cpp +++ b/src/core/PresetPreviewPlayHandle.cpp @@ -27,7 +27,7 @@ #include "PresetPreviewPlayHandle.h" #include "debug.h" -#include "engine.h" +#include "Engine.h" #include "Instrument.h" #include "InstrumentTrack.h" #include "MidiPort.h" @@ -123,10 +123,10 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file, } - const bool j = engine::projectJournal()->isJournalling(); - engine::projectJournal()->setJournalling( false ); + const bool j = Engine::projectJournal()->isJournalling(); + Engine::projectJournal()->setJournalling( false ); - engine::setSuppressMessages( true ); + Engine::setSuppressMessages( true ); if( _load_by_plugin ) { @@ -137,7 +137,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file, { i = s_previewTC->previewInstrumentTrack()-> loadInstrument( - engine::pluginFileHandling()[ext] ); + Engine::pluginFileHandling()[ext] ); } if( i != NULL ) { @@ -152,7 +152,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file, dataFile.content().firstChild().toElement() ); } - engine::setSuppressMessages( false ); + Engine::setSuppressMessages( false ); // make sure, our preset-preview-track does not appear in any MIDI- // devices list, so just disable receiving/sending MIDI-events at all @@ -170,7 +170,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file, s_previewTC->setPreviewNote( m_previewNote ); s_previewTC->unlockData(); - engine::projectJournal()->setJournalling( j ); + Engine::projectJournal()->setJournalling( j ); } diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index 662a694b6..8a8d8c466 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -25,7 +25,7 @@ #include #include "ProjectJournal.h" -#include "engine.h" +#include "Engine.h" #include "JournallingObject.h" #include "Song.h" @@ -66,7 +66,7 @@ void ProjectJournal::undo() setJournalling( false ); jo->restoreState( c.data.content().firstChildElement() ); setJournalling( prev ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } @@ -91,7 +91,7 @@ void ProjectJournal::redo() setJournalling( false ); jo->restoreState( c.data.content().firstChildElement() ); setJournalling( prev ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); break; } } diff --git a/src/core/ProjectRenderer.cpp b/src/core/ProjectRenderer.cpp index d076cd18a..d4f27d1fa 100644 --- a/src/core/ProjectRenderer.cpp +++ b/src/core/ProjectRenderer.cpp @@ -27,7 +27,7 @@ #include "ProjectRenderer.h" #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "AudioFileWave.h" #include "AudioFileOgg.h" @@ -66,10 +66,10 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & _qs, const OutputSettings & _os, ExportFileFormats _file_format, const QString & _out_file ) : - QThread( engine::mixer() ), + QThread( Engine::mixer() ), m_fileDev( NULL ), m_qualitySettings( _qs ), - m_oldQualitySettings( engine::mixer()->currentQualitySettings() ), + m_oldQualitySettings( Engine::mixer()->currentQualitySettings() ), m_progress( 0 ), m_abort( false ) { @@ -84,7 +84,7 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & _qs, _out_file, _os.vbr, _os.bitrate, _os.bitrate - 64, _os.bitrate + 64, _os.depth == Depth_32Bit ? 32 : 16, - engine::mixer() ); + Engine::mixer() ); if( success_ful == false ) { delete m_fileDev; @@ -132,7 +132,7 @@ void ProjectRenderer::startProcessing() // have to do mixer stuff with GUI-thread-affinity in order to // make slots connected to sampleRateChanged()-signals being // called immediately - engine::mixer()->setAudioDevice( m_fileDev, + Engine::mixer()->setAudioDevice( m_fileDev, m_qualitySettings, false ); start( @@ -159,15 +159,15 @@ void ProjectRenderer::run() #endif - engine::getSong()->startExport(); + Engine::getSong()->startExport(); - Song::playPos & pp = engine::getSong()->getPlayPos( + Song::playPos & pp = Engine::getSong()->getPlayPos( Song::Mode_PlaySong ); m_progress = 0; - const int sl = ( engine::getSong()->length() + 1 ) * 192; + const int sl = ( Engine::getSong()->length() + 1 ) * 192; - while( engine::getSong()->isExportDone() == false && - engine::getSong()->isExporting() == true + while( Engine::getSong()->isExportDone() == false && + Engine::getSong()->isExporting() == true && !m_abort ) { m_fileDev->processNextBuffer(); @@ -179,12 +179,12 @@ void ProjectRenderer::run() } } - engine::getSong()->stopExport(); + Engine::getSong()->stopExport(); const QString f = m_fileDev->outputFile(); - engine::mixer()->restoreAudioDevice(); // also deletes audio-dev - engine::mixer()->changeQuality( m_oldQualitySettings ); + Engine::mixer()->restoreAudioDevice(); // also deletes audio-dev + Engine::mixer()->changeQuality( m_oldQualitySettings ); // if the user aborted export-process, the file has to be deleted if( m_abort ) diff --git a/src/core/RemotePlugin.cpp b/src/core/RemotePlugin.cpp index f74ad9d94..c30f0c9e3 100644 --- a/src/core/RemotePlugin.cpp +++ b/src/core/RemotePlugin.cpp @@ -30,7 +30,7 @@ #include "RemotePlugin.h" #include "Mixer.h" -#include "engine.h" +#include "Engine.h" #include "ConfigManager.h" #include @@ -163,13 +163,13 @@ bool RemotePlugin::init( const QString &pluginExecutable, bool RemotePlugin::process( const sampleFrame * _in_buf, sampleFrame * _out_buf ) { - const fpp_t frames = engine::mixer()->framesPerPeriod(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); if( m_failed || !isRunning() ) { if( _out_buf != NULL ) { - engine::mixer()->clearAudioBuffer( _out_buf, + Engine::mixer()->clearAudioBuffer( _out_buf, frames ); } return false; @@ -189,7 +189,7 @@ bool RemotePlugin::process( const sampleFrame * _in_buf, } if( _out_buf != NULL ) { - engine::mixer()->clearAudioBuffer( _out_buf, + Engine::mixer()->clearAudioBuffer( _out_buf, frames ); } return false; @@ -264,7 +264,7 @@ bool RemotePlugin::process( const sampleFrame * _in_buf, sampleFrame * o = (sampleFrame *) ( m_shm + m_inputCount*frames ); // clear buffer, if plugin didn't fill up both channels - engine::mixer()->clearAudioBuffer( _out_buf, frames ); + Engine::mixer()->clearAudioBuffer( _out_buf, frames ); for( ch_cnt_t ch = 0; ch < qMin( DEFAULT_CHANNELS, outputs ); ++ch ) @@ -302,7 +302,7 @@ void RemotePlugin::processMidiEvent( const MidiEvent & _e, void RemotePlugin::resizeSharedProcessingMemory() { const size_t s = ( m_inputCount+m_outputCount ) * - engine::mixer()->framesPerPeriod() * + Engine::mixer()->framesPerPeriod() * sizeof( float ); if( m_shm != NULL ) { @@ -355,12 +355,12 @@ bool RemotePlugin::processMessage( const message & _m ) case IdSampleRateInformation: reply = true; - reply_message.addInt( engine::mixer()->processingSampleRate() ); + reply_message.addInt( Engine::mixer()->processingSampleRate() ); break; case IdBufferSizeInformation: reply = true; - reply_message.addInt( engine::mixer()->framesPerPeriod() ); + reply_message.addInt( Engine::mixer()->framesPerPeriod() ); break; case IdChangeInputCount: diff --git a/src/core/RingBuffer.cpp b/src/core/RingBuffer.cpp index aa878c299..ce4117be0 100644 --- a/src/core/RingBuffer.cpp +++ b/src/core/RingBuffer.cpp @@ -24,15 +24,15 @@ */ #include "RingBuffer.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include #include "MixHelpers.h" RingBuffer::RingBuffer( f_cnt_t size ) : - m_fpp( engine::mixer()->framesPerPeriod() ), - m_samplerate( engine::mixer()->processingSampleRate() ), + m_fpp( Engine::mixer()->framesPerPeriod() ), + m_samplerate( Engine::mixer()->processingSampleRate() ), m_size( size + m_fpp ) { m_buffer = new sampleFrame[ m_size ]; @@ -41,8 +41,8 @@ RingBuffer::RingBuffer( f_cnt_t size ) : RingBuffer::RingBuffer( float size ) : - m_fpp( engine::mixer()->framesPerPeriod() ), - m_samplerate( engine::mixer()->processingSampleRate() ) + m_fpp( Engine::mixer()->framesPerPeriod() ), + m_samplerate( Engine::mixer()->processingSampleRate() ) { m_size = msToFrames( size ) + m_fpp; m_buffer = new sampleFrame[ m_size ]; @@ -93,11 +93,11 @@ void RingBuffer::setSamplerateAware( bool b ) { if( b ) { - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ), Qt::UniqueConnection ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ), Qt::UniqueConnection ); } else { - disconnect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); + disconnect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); } } @@ -310,9 +310,9 @@ void RingBuffer::updateSamplerate() { lock(); - float newsize = static_cast( ( m_size - m_fpp ) * engine::mixer()->processingSampleRate() ) / m_samplerate; + float newsize = static_cast( ( m_size - m_fpp ) * Engine::mixer()->processingSampleRate() ) / m_samplerate; m_size = static_cast( ceilf( newsize ) ) + m_fpp; - m_samplerate = engine::mixer()->processingSampleRate(); + m_samplerate = Engine::mixer()->processingSampleRate(); delete m_buffer; m_buffer = new sampleFrame[ m_size ]; memset( m_buffer, 0, m_size * sizeof( sampleFrame ) ); diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index eaeb62471..8ebbd9716 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -56,7 +56,7 @@ #include "debug.h" #include "DrumSynth.h" #include "endian_handling.h" -#include "engine.h" +#include "Engine.h" #include "interpolation.h" #include "templates.h" @@ -78,13 +78,13 @@ SampleBuffer::SampleBuffer( const QString & _audio_file, m_amplification( 1.0f ), m_reversed( false ), m_frequency( BaseFreq ), - m_sampleRate( engine::mixer()->baseSampleRate() ) + m_sampleRate( Engine::mixer()->baseSampleRate() ) { if( _is_base64_data == true ) { loadFromBase64( _audio_file ); } - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); update(); } @@ -104,7 +104,7 @@ SampleBuffer::SampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) : m_amplification( 1.0f ), m_reversed( false ), m_frequency( BaseFreq ), - m_sampleRate( engine::mixer()->baseSampleRate() ) + m_sampleRate( Engine::mixer()->baseSampleRate() ) { if( _frames > 0 ) { @@ -112,7 +112,7 @@ SampleBuffer::SampleBuffer( const sampleFrame * _data, const f_cnt_t _frames ) : memcpy( m_origData, _data, _frames * BYTES_PER_FRAME ); m_origFrames = _frames; } - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); update(); } @@ -132,7 +132,7 @@ SampleBuffer::SampleBuffer( const f_cnt_t _frames ) : m_amplification( 1.0f ), m_reversed( false ), m_frequency( BaseFreq ), - m_sampleRate( engine::mixer()->baseSampleRate() ) + m_sampleRate( Engine::mixer()->baseSampleRate() ) { if( _frames > 0 ) { @@ -140,7 +140,7 @@ SampleBuffer::SampleBuffer( const f_cnt_t _frames ) : memset( m_origData, 0, _frames * BYTES_PER_FRAME ); m_origFrames = _frames; } - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); update(); } @@ -194,7 +194,7 @@ void SampleBuffer::update( bool _keep_settings ) int_sample_t * buf = NULL; sample_t * fbuf = NULL; ch_cnt_t channels = DEFAULT_CHANNELS; - sample_rate_t samplerate = engine::mixer()->baseSampleRate(); + sample_rate_t samplerate = Engine::mixer()->baseSampleRate(); m_frames = 0; const QFileInfo fileInfo( file ); @@ -359,10 +359,10 @@ void SampleBuffer::normalizeSampleRate( const sample_rate_t _src_sr, bool _keep_settings ) { // do samplerate-conversion to our default-samplerate - if( _src_sr != engine::mixer()->baseSampleRate() ) + if( _src_sr != Engine::mixer()->baseSampleRate() ) { SampleBuffer * resampled = resample( this, _src_sr, - engine::mixer()->baseSampleRate() ); + Engine::mixer()->baseSampleRate() ); MM_FREE( m_data ); m_frames = resampled->frames(); m_data = MM_ALLOC( sampleFrame, m_frames ); @@ -621,7 +621,7 @@ bool SampleBuffer::play( sampleFrame * _ab, handleState * _state, bool is_backwards = _state->isBackwards(); const double freq_factor = (double) _freq / (double) m_frequency * - m_sampleRate / engine::mixer()->processingSampleRate(); + m_sampleRate / Engine::mixer()->processingSampleRate(); // calculate how many frames we have in requested pitch const f_cnt_t total_frames_for_current_pitch = static_cast( ( diff --git a/src/core/SamplePlayHandle.cpp b/src/core/SamplePlayHandle.cpp index af29aa8a4..e1b9d99dd 100644 --- a/src/core/SamplePlayHandle.cpp +++ b/src/core/SamplePlayHandle.cpp @@ -25,7 +25,7 @@ #include "SamplePlayHandle.h" #include "AudioPort.h" #include "bb_track.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "Pattern.h" #include "SampleBuffer.h" @@ -105,7 +105,7 @@ void SamplePlayHandle::play( sampleFrame * buffer ) } sampleFrame * workingBuffer = buffer; - const fpp_t fpp = engine::mixer()->framesPerPeriod(); + const fpp_t fpp = Engine::mixer()->framesPerPeriod(); f_cnt_t frames = fpp; // apply offset for the first period @@ -153,7 +153,7 @@ bool SamplePlayHandle::isFromTrack( const Track * _track ) const f_cnt_t SamplePlayHandle::totalFrames() const { - return ( m_sampleBuffer->endFrame() - m_sampleBuffer->startFrame() ) * ( engine::mixer()->processingSampleRate() / engine::mixer()->baseSampleRate() ); + return ( m_sampleBuffer->endFrame() - m_sampleBuffer->startFrame() ) * ( Engine::mixer()->processingSampleRate() / Engine::mixer()->baseSampleRate() ); } diff --git a/src/core/SampleRecordHandle.cpp b/src/core/SampleRecordHandle.cpp index 8e6702f4a..abfb78051 100644 --- a/src/core/SampleRecordHandle.cpp +++ b/src/core/SampleRecordHandle.cpp @@ -25,7 +25,7 @@ #include "SampleRecordHandle.h" #include "bb_track.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "Pattern.h" #include "SampleBuffer.h" @@ -68,12 +68,12 @@ SampleRecordHandle::~SampleRecordHandle() void SampleRecordHandle::play( sampleFrame * /*_working_buffer*/ ) { - const sampleFrame * recbuf = engine::mixer()->inputBuffer(); - const f_cnt_t frames = engine::mixer()->inputBufferFrames(); + const sampleFrame * recbuf = Engine::mixer()->inputBuffer(); + const f_cnt_t frames = Engine::mixer()->inputBufferFrames(); writeBuffer( recbuf, frames ); m_framesRecorded += frames; - MidiTime len = (tick_t)( m_framesRecorded / engine::framesPerTick() ); + MidiTime len = (tick_t)( m_framesRecorded / Engine::framesPerTick() ); if( len > m_minLength ) { // m_tco->changeLength( len ); @@ -129,7 +129,7 @@ void SampleRecordHandle::createSampleBuffer( SampleBuffer** sampleBuf ) } // create according sample-buffer out of big buffer *sampleBuf = new SampleBuffer( data, frames ); - ( *sampleBuf)->setSampleRate( engine::mixer()->inputSampleRate() ); + ( *sampleBuf)->setSampleRate( Engine::mixer()->inputSampleRate() ); delete[] data; } diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 6fae3eea3..2969c2ebe 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -104,7 +104,7 @@ Song::Song() : this, SLOT( setTimeSignature() ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateFramesPerTick() ) ); connect( &m_masterVolumeModel, SIGNAL( dataChanged() ), @@ -129,7 +129,7 @@ Song::~Song() void Song::masterVolumeChanged() { - engine::mixer()->setMasterGain( m_masterVolumeModel.value() / + Engine::mixer()->setMasterGain( m_masterVolumeModel.value() / 100.0f ); } @@ -138,9 +138,9 @@ void Song::masterVolumeChanged() void Song::setTempo() { - engine::mixer()->lockPlayHandleRemoval(); + Engine::mixer()->lockPlayHandleRemoval(); const bpm_t tempo = (bpm_t) m_tempoModel.value(); - PlayHandleList & playHandles = engine::mixer()->playHandles(); + PlayHandleList & playHandles = Engine::mixer()->playHandles(); for( PlayHandleList::Iterator it = playHandles.begin(); it != playHandles.end(); ++it ) { @@ -152,9 +152,9 @@ void Song::setTempo() nph->unlock(); } } - engine::mixer()->unlockPlayHandleRemoval(); + Engine::mixer()->unlockPlayHandleRemoval(); - engine::updateFramesPerTick(); + Engine::updateFramesPerTick(); m_vstSyncController.setTempo( tempo ); @@ -216,9 +216,9 @@ void Song::processNextBuffer() break; case Mode_PlayBB: - if( engine::getBBTrackContainer()->numOfBBs() > 0 ) + if( Engine::getBBTrackContainer()->numOfBBs() > 0 ) { - tco_num = engine::getBBTrackContainer()-> + tco_num = Engine::getBBTrackContainer()-> currentBB(); track_list.push_back( bbTrack::findBBTrack( tco_num ) ); @@ -261,14 +261,14 @@ void Song::processNextBuffer() } f_cnt_t total_frames_played = 0; - const float frames_per_tick = engine::framesPerTick(); + const float frames_per_tick = Engine::framesPerTick(); while( total_frames_played - < engine::mixer()->framesPerPeriod() ) + < Engine::mixer()->framesPerPeriod() ) { m_vstSyncController.update(); - f_cnt_t played_frames = engine::mixer()->framesPerPeriod() - total_frames_played; + f_cnt_t played_frames = Engine::mixer()->framesPerPeriod() - total_frames_played; float current_frame = m_playPos[m_playMode].currentFrame(); // did we play a tick? @@ -291,7 +291,7 @@ void Song::processNextBuffer() // or to loop back to first tact if( m_playMode == Mode_PlayBB ) { - max_tact = engine::getBBTrackContainer() + max_tact = Engine::getBBTrackContainer() ->lengthOfCurrentBB(); } else if( m_playMode == Mode_PlayPattern && @@ -606,7 +606,7 @@ void Song::stop() m_vstSyncController.setAbsolutePosition( m_playPos[m_playMode].getTicks() ); // remove all note-play-handles that are active - engine::mixer()->clear(); + Engine::mixer()->clear(); m_playMode = Mode_None; @@ -673,7 +673,7 @@ void Song::removeBar() void Song::addBBTrack() { Track * t = Track::create( Track::BBTrack, this ); - engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); + Engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); } @@ -713,7 +713,7 @@ AutomationPattern * Song::tempoAutomationPattern() void Song::clearProject() { - engine::projectJournal()->setJournalling( false ); + Engine::projectJournal()->setJournalling( false ); if( m_playing ) { @@ -726,33 +726,33 @@ void Song::clearProject() } - engine::mixer()->lock(); - if( engine::getBBEditor() ) + Engine::mixer()->lock(); + if( Engine::getBBEditor() ) { - engine::getBBEditor()->clearAllTracks(); + Engine::getBBEditor()->clearAllTracks(); } - if( engine::songEditor() ) + if( Engine::songEditor() ) { - engine::songEditor()->clearAllTracks(); + Engine::songEditor()->clearAllTracks(); } - if( engine::fxMixerView() ) + if( Engine::fxMixerView() ) { - engine::fxMixerView()->clear(); + Engine::fxMixerView()->clear(); } QCoreApplication::sendPostedEvents(); - engine::getBBTrackContainer()->clearAllTracks(); + Engine::getBBTrackContainer()->clearAllTracks(); clearAllTracks(); - engine::fxMixer()->clear(); + Engine::fxMixer()->clear(); - if( engine::automationEditor() ) + if( Engine::automationEditor() ) { - engine::automationEditor()->setCurrentPattern( NULL ); + Engine::automationEditor()->setCurrentPattern( NULL ); } - if( engine::pianoRoll() ) + if( Engine::pianoRoll() ) { - engine::pianoRoll()->reset(); + Engine::pianoRoll()->reset(); } m_tempoModel.reset(); @@ -766,11 +766,11 @@ void Song::clearProject() AutomationPattern::globalAutomationPattern( &m_masterPitchModel )-> clear(); - engine::mixer()->unlock(); + Engine::mixer()->unlock(); - if( engine::getProjectNotes() ) + if( Engine::getProjectNotes() ) { - engine::getProjectNotes()->clear(); + Engine::getProjectNotes()->clear(); } // Move to function @@ -781,9 +781,9 @@ void Song::clearProject() emit dataChanged(); - engine::projectJournal()->clearJournal(); + Engine::projectJournal()->clearJournal(); - engine::projectJournal()->setJournalling( true ); + Engine::projectJournal()->setJournalling( true ); InstrumentTrackView::cleanupWindowCache(); } @@ -816,7 +816,7 @@ void Song::createNewProject() clearProject(); - engine::projectJournal()->setJournalling( false ); + Engine::projectJournal()->setJournalling( false ); m_fileName = m_oldFileName = ""; @@ -825,7 +825,7 @@ void Song::createNewProject() dynamic_cast( t )->loadInstrument( "tripleoscillator" ); t = Track::create( Track::InstrumentTrack, - engine::getBBTrackContainer() ); + Engine::getBBTrackContainer() ); dynamic_cast( t )->loadInstrument( "kicker" ); Track::create( Track::SampleTrack, this ); @@ -841,17 +841,17 @@ void Song::createNewProject() m_loadingProject = false; - engine::getBBTrackContainer()->updateAfterTrackAdd(); + Engine::getBBTrackContainer()->updateAfterTrackAdd(); - engine::projectJournal()->setJournalling( true ); + Engine::projectJournal()->setJournalling( true ); QCoreApplication::sendPostedEvents(); m_modified = false; - if( engine::mainWindow() ) + if( Engine::mainWindow() ) { - engine::mainWindow()->resetWindowTitle(); + Engine::mainWindow()->resetWindowTitle(); } } @@ -865,9 +865,9 @@ void Song::createNewProjectFromTemplate( const QString & _template ) // saving... m_fileName = m_oldFileName = ""; // update window title - if( engine::mainWindow() ) + if( Engine::mainWindow() ) { - engine::mainWindow()->resetWindowTitle(); + Engine::mainWindow()->resetWindowTitle(); } } @@ -882,7 +882,7 @@ void Song::loadProject( const QString & _file_name ) m_loadingProject = true; - engine::projectJournal()->setJournalling( false ); + Engine::projectJournal()->setJournalling( false ); m_fileName = _file_name; m_oldFileName = _file_name; @@ -899,7 +899,7 @@ void Song::loadProject( const QString & _file_name ) DataFile::LocaleHelper localeHelper( DataFile::LocaleHelper::ModeLoad ); - engine::mixer()->lock(); + Engine::mixer()->lock(); // get the header information from the DOM m_tempoModel.loadSettings( dataFile.head(), "bpm" ); @@ -923,14 +923,14 @@ void Song::loadProject( const QString & _file_name ) PeakController::initGetControllerBySetting(); // Load mixer first to be able to set the correct range for FX channels - node = dataFile.content().firstChildElement( engine::fxMixer()->nodeName() ); + node = dataFile.content().firstChildElement( Engine::fxMixer()->nodeName() ); if( !node.isNull() ) { - engine::fxMixer()->restoreState( node.toElement() ); - if( engine::hasGUI() ) + Engine::fxMixer()->restoreState( node.toElement() ); + if( Engine::hasGUI() ) { // refresh FxMixerView - engine::fxMixerView()->refreshDisplay(); + Engine::fxMixerView()->refreshDisplay(); } } @@ -947,23 +947,23 @@ void Song::loadProject( const QString & _file_name ) { restoreControllerStates( node.toElement() ); } - else if( engine::hasGUI() ) + else if( Engine::hasGUI() ) { - if( node.nodeName() == engine::getControllerRackView()->nodeName() ) + if( node.nodeName() == Engine::getControllerRackView()->nodeName() ) { - engine::getControllerRackView()->restoreState( node.toElement() ); + Engine::getControllerRackView()->restoreState( node.toElement() ); } - else if( node.nodeName() == engine::pianoRoll()->nodeName() ) + else if( node.nodeName() == Engine::pianoRoll()->nodeName() ) { - engine::pianoRoll()->restoreState( node.toElement() ); + Engine::pianoRoll()->restoreState( node.toElement() ); } - else if( node.nodeName() == engine::automationEditor()->nodeName() ) + else if( node.nodeName() == Engine::automationEditor()->nodeName() ) { - engine::automationEditor()->restoreState( node.toElement() ); + Engine::automationEditor()->restoreState( node.toElement() ); } - else if( node.nodeName() == engine::getProjectNotes()->nodeName() ) + else if( node.nodeName() == Engine::getProjectNotes()->nodeName() ) { - engine::getProjectNotes()->SerializingObject::restoreState( node.toElement() ); + Engine::getProjectNotes()->SerializingObject::restoreState( node.toElement() ); } else if( node.nodeName() == m_playPos[Mode_PlaySong].m_timeLine->nodeName() ) { @@ -976,7 +976,7 @@ void Song::loadProject( const QString & _file_name ) // quirk for fixing projects with broken positions of TCOs inside // BB-tracks - engine::getBBTrackContainer()->fixIncorrectPositions(); + Engine::getBBTrackContainer()->fixIncorrectPositions(); // Connect controller links to their controllers // now that everything is loaded @@ -986,20 +986,20 @@ void Song::loadProject( const QString & _file_name ) AutomationPattern::resolveAllIDs(); - engine::mixer()->unlock(); + Engine::mixer()->unlock(); ConfigManager::inst()->addRecentlyOpenedProject( _file_name ); - engine::projectJournal()->setJournalling( true ); + Engine::projectJournal()->setJournalling( true ); emit projectLoaded(); m_loadingProject = false; m_modified = false; - if( engine::mainWindow() ) + if( Engine::mainWindow() ) { - engine::mainWindow()->resetWindowTitle(); + Engine::mainWindow()->resetWindowTitle(); } } @@ -1019,13 +1019,13 @@ bool Song::saveProjectFile( const QString & _filename ) saveState( dataFile, dataFile.content() ); m_globalAutomationTrack->saveState( dataFile, dataFile.content() ); - engine::fxMixer()->saveState( dataFile, dataFile.content() ); - if( engine::hasGUI() ) + Engine::fxMixer()->saveState( dataFile, dataFile.content() ); + if( Engine::hasGUI() ) { - engine::getControllerRackView()->saveState( dataFile, dataFile.content() ); - engine::pianoRoll()->saveState( dataFile, dataFile.content() ); - engine::automationEditor()->saveState( dataFile, dataFile.content() ); - engine::getProjectNotes()->SerializingObject::saveState( dataFile, dataFile.content() ); + Engine::getControllerRackView()->saveState( dataFile, dataFile.content() ); + Engine::pianoRoll()->saveState( dataFile, dataFile.content() ); + Engine::automationEditor()->saveState( dataFile, dataFile.content() ); + Engine::getProjectNotes()->SerializingObject::saveState( dataFile, dataFile.content() ); m_playPos[Mode_PlaySong].m_timeLine->saveState( dataFile, dataFile.content() ); } @@ -1041,7 +1041,7 @@ bool Song::guiSaveProject() { DataFile dataFile( DataFile::SongProject ); m_fileName = dataFile.nameWithExtension( m_fileName ); - if( saveProjectFile( m_fileName ) && engine::hasGUI() ) + if( saveProjectFile( m_fileName ) && Engine::hasGUI() ) { textFloat::displayMessage( tr( "Project saved" ), tr( "The project %1 is now saved." @@ -1050,9 +1050,9 @@ bool Song::guiSaveProject() 2000 ); ConfigManager::inst()->addRecentlyOpenedProject( m_fileName ); m_modified = false; - engine::mainWindow()->resetWindowTitle(); + Engine::mainWindow()->resetWindowTitle(); } - else if( engine::hasGUI() ) + else if( Engine::hasGUI() ) { textFloat::displayMessage( tr( "Project NOT saved." ), tr( "The project %1 was not saved!" ).arg( @@ -1136,7 +1136,7 @@ void Song::restoreControllerStates( const QDomElement & _this ) * This line removes the previously added controller for PeakController * without affecting the order of controllers in Controller Rack */ - engine::getSong()->removeController( c ); + Engine::getSong()->removeController( c ); addController( c ); node = node.nextSibling(); @@ -1153,7 +1153,7 @@ void Song::exportProject(bool multiExport) { if( isEmpty() ) { - QMessageBox::information( engine::mainWindow(), + QMessageBox::information( Engine::mainWindow(), tr( "Empty project" ), tr( "This project is empty so exporting makes " "no sense. Please put some items into " @@ -1161,7 +1161,7 @@ void Song::exportProject(bool multiExport) return; } - FileDialog efd( engine::mainWindow() ); + FileDialog efd( Engine::mainWindow() ); if (multiExport) { efd.setFileMode( FileDialog::Directory); @@ -1221,7 +1221,7 @@ void Song::exportProject(bool multiExport) } const QString export_file_name = efd.selectedFiles()[0] + suffix; - exportProjectDialog epd( export_file_name, engine::mainWindow(), multiExport ); + exportProjectDialog epd( export_file_name, Engine::mainWindow(), multiExport ); epd.exec(); } } @@ -1231,7 +1231,7 @@ void Song::exportProject(bool multiExport) void Song::updateFramesPerTick() { - engine::updateFramesPerTick(); + Engine::updateFramesPerTick(); } @@ -1242,10 +1242,10 @@ void Song::setModified() if( !m_loadingProject ) { m_modified = true; - if( engine::mainWindow() && - QThread::currentThread() == engine::mainWindow()->thread() ) + if( Engine::mainWindow() && + QThread::currentThread() == Engine::mainWindow()->thread() ) { - engine::mainWindow()->resetWindowTitle(); + Engine::mainWindow()->resetWindowTitle(); } } } @@ -1272,9 +1272,9 @@ void Song::removeController( Controller * _controller ) { m_controllers.remove( index ); - if( engine::getSong() ) + if( Engine::getSong() ) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } emit dataChanged(); } diff --git a/src/core/TempoSyncKnobModel.cpp b/src/core/TempoSyncKnobModel.cpp index 7d6235898..c3583f88a 100644 --- a/src/core/TempoSyncKnobModel.cpp +++ b/src/core/TempoSyncKnobModel.cpp @@ -27,7 +27,7 @@ #include #include "TempoSyncKnobModel.h" -#include "engine.h" +#include "Engine.h" #include "Song.h" @@ -41,7 +41,7 @@ TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min, m_scale( _scale ), m_custom( _parent ) { - connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), + connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), this, SLOT( calculateTempoSyncTime( bpm_t ) ) ); } @@ -66,7 +66,7 @@ void TempoSyncKnobModel::setTempoSync( QAction * _item ) void TempoSyncKnobModel::setTempoSync( int _note_type ) { setSyncMode( ( TempoSyncMode ) _note_type ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -157,7 +157,7 @@ void TempoSyncKnobModel::setSyncMode( TempoSyncMode _new_mode ) this, SLOT( updateCustom() ) ); } } - calculateTempoSyncTime( engine::getSong()->getTempo() ); + calculateTempoSyncTime( Engine::getSong()->getTempo() ); } @@ -166,7 +166,7 @@ void TempoSyncKnobModel::setSyncMode( TempoSyncMode _new_mode ) void TempoSyncKnobModel::setScale( float _new_scale ) { m_scale = _new_scale; - calculateTempoSyncTime( engine::getSong()->getTempo() ); + calculateTempoSyncTime( Engine::getSong()->getTempo() ); emit scaleChanged( _new_scale ); } diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 23a09f4e3..923c8f792 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -55,7 +55,7 @@ #include "ConfigManager.h" #include "Clipboard.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "InstrumentTrack.h" #include "MainWindow.h" @@ -151,7 +151,7 @@ void trackContentObject::movePosition( const MidiTime & _pos ) if( m_startPosition != _pos ) { m_startPosition = _pos; - engine::getSong()->updateLength(); + Engine::getSong()->updateLength(); } emit positionChanged(); } @@ -171,7 +171,7 @@ void trackContentObject::changeLength( const MidiTime & _length ) if( m_length != _length ) { m_length = _length; - engine::getSong()->updateLength(); + Engine::getSong()->updateLength(); } emit lengthChanged(); } @@ -1102,7 +1102,7 @@ void trackContentWidget::removeTCOView( trackContentObjectView * _tcov ) if( it != m_tcoViews.end() ) { m_tcoViews.erase( it ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } @@ -1134,9 +1134,9 @@ void trackContentWidget::update() */ void trackContentWidget::changePosition( const MidiTime & _new_pos ) { - if( m_trackView->trackContainerView() == engine::getBBEditor() ) + if( m_trackView->trackContainerView() == Engine::getBBEditor() ) { - const int cur_bb = engine::getBBTrackContainer()->currentBB(); + const int cur_bb = Engine::getBBTrackContainer()->currentBB(); setUpdatesEnabled( false ); // first show TCO for current BB... @@ -1466,7 +1466,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) int ppt = static_cast( tcv->pixelsPerTact() ); QPainter p( this ); // Don't draw background on BB-Editor - if( m_trackView->trackContainerView() != engine::getBBEditor() ) + if( m_trackView->trackContainerView() != Engine::getBBEditor() ) { p.drawTiledPixmap( rect(), m_background, QPoint( tcv->currentPosition().getTact() * ppt, 0 ) ); @@ -2076,10 +2076,10 @@ void Track::removeTCO( trackContentObject * _tco ) if( it != m_trackContentObjects.end() ) { m_trackContentObjects.erase( it ); - if( engine::getSong() ) + if( Engine::getSong() ) { - engine::getSong()->updateLength(); - engine::getSong()->setModified(); + Engine::getSong()->updateLength(); + Engine::getSong()->setModified(); } } } diff --git a/src/core/TrackContainer.cpp b/src/core/TrackContainer.cpp index fb529d159..400113b88 100644 --- a/src/core/TrackContainer.cpp +++ b/src/core/TrackContainer.cpp @@ -30,7 +30,7 @@ #include "TrackContainer.h" #include "InstrumentTrack.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" #include "Song.h" @@ -82,14 +82,14 @@ void TrackContainer::loadSettings( const QDomElement & _this ) static QProgressDialog * pd = NULL; bool was_null = ( pd == NULL ); int start_val = 0; - if( !journalRestore && engine::hasGUI() ) + if( !journalRestore && Engine::hasGUI() ) { if( pd == NULL ) { pd = new QProgressDialog( tr( "Loading project..." ), tr( "Cancel" ), 0, _this.childNodes().count(), - engine::mainWindow() ); + Engine::mainWindow() ); pd->setWindowModality( Qt::ApplicationModal ); pd->setWindowTitle( tr( "Please wait..." ) ); pd->show(); @@ -185,9 +185,9 @@ void TrackContainer::removeTrack( Track * _track ) m_tracks.remove( index ); m_tracksMutex.unlock(); - if( engine::getSong() ) + if( Engine::getSong() ) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } } diff --git a/src/core/VstSyncController.cpp b/src/core/VstSyncController.cpp index 36c7ec544..1e1294c32 100644 --- a/src/core/VstSyncController.cpp +++ b/src/core/VstSyncController.cpp @@ -26,7 +26,7 @@ #include #include "ConfigManager.h" -#include "engine.h" +#include "Engine.h" #include "lmmsconfig.h" #include "Mixer.h" #include "VstSyncController.h" @@ -54,7 +54,7 @@ VstSyncController::VstSyncController() : { if( ConfigManager::inst()->value( "ui", "syncvstplugins" ).toInt() ) { - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); #ifdef USE_QT_SHMEM if ( m_shm.create( sizeof( VstSyncData ) ) ) @@ -104,7 +104,7 @@ VstSyncController::VstSyncController() : } m_syncData->isPlaying = false; - m_syncData->m_bufferSize = engine::mixer()->framesPerPeriod(); + m_syncData->m_bufferSize = Engine::mixer()->framesPerPeriod(); m_syncData->timeSigNumer = 4; m_syncData->timeSigDenom = 4; @@ -176,7 +176,7 @@ void VstSyncController::startCycle( int startTick, int endTick ) void VstSyncController::update() { - m_syncData->m_bufferSize = engine::mixer()->framesPerPeriod(); + m_syncData->m_bufferSize = Engine::mixer()->framesPerPeriod(); #ifdef VST_SNC_LATENCY m_syncData->m_latency = m_syncData->m_bufferSize * m_syncData->m_bpm / ( (float) m_syncData->m_sampleRate * 60 ); @@ -187,7 +187,7 @@ void VstSyncController::update() void VstSyncController::updateSampleRate() { - m_syncData->m_sampleRate = engine::mixer()->processingSampleRate(); + m_syncData->m_sampleRate = Engine::mixer()->processingSampleRate(); #ifdef VST_SNC_LATENCY m_syncData->m_latency = m_syncData->m_bufferSize * m_syncData->m_bpm / ( (float) m_syncData->m_sampleRate * 60 ); diff --git a/src/core/audio/AudioAlsa.cpp b/src/core/audio/AudioAlsa.cpp index 1edbfae9d..04594f855 100644 --- a/src/core/audio/AudioAlsa.cpp +++ b/src/core/audio/AudioAlsa.cpp @@ -31,7 +31,7 @@ #include "endian_handling.h" #include "ConfigManager.h" -#include "engine.h" +#include "Engine.h" #include "LcdSpinBox.h" #include "gui_templates.h" #include "templates.h" @@ -202,7 +202,7 @@ void AudioAlsa::applyQualitySettings() { if( hqAudio() ) { - setSampleRate( engine::mixer()->processingSampleRate() ); + setSampleRate( Engine::mixer()->processingSampleRate() ); if( m_handle != NULL ) { diff --git a/src/core/audio/AudioJack.cpp b/src/core/audio/AudioJack.cpp index 2766eb211..004f1e504 100644 --- a/src/core/audio/AudioJack.cpp +++ b/src/core/audio/AudioJack.cpp @@ -33,7 +33,7 @@ #include #include "debug.h" -#include "engine.h" +#include "Engine.h" #include "templates.h" #include "gui_templates.h" #include "ConfigManager.h" @@ -106,7 +106,7 @@ void AudioJack::restartAfterZombified() { m_active = false; startProcessing(); - QMessageBox::information( engine::mainWindow(), + QMessageBox::information( Engine::mainWindow(), tr( "JACK client restarted" ), tr( "LMMS was kicked by JACK for some reason. " "Therefore the JACK backend of LMMS has been " @@ -115,7 +115,7 @@ void AudioJack::restartAfterZombified() } else { - QMessageBox::information( engine::mainWindow(), + QMessageBox::information( Engine::mainWindow(), tr( "JACK server down" ), tr( "The JACK server seems to have been shutdown " "and starting a new instance failed. " @@ -259,7 +259,7 @@ void AudioJack::applyQualitySettings() { if( hqAudio() ) { - setSampleRate( engine::mixer()->processingSampleRate() ); + setSampleRate( Engine::mixer()->processingSampleRate() ); if( jack_get_sample_rate( m_client ) != sampleRate() ) { diff --git a/src/core/audio/AudioOss.cpp b/src/core/audio/AudioOss.cpp index 224a5763d..0e43793fd 100644 --- a/src/core/audio/AudioOss.cpp +++ b/src/core/audio/AudioOss.cpp @@ -32,7 +32,7 @@ #include "endian_handling.h" #include "LcdSpinBox.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "templates.h" @@ -268,7 +268,7 @@ void AudioOss::applyQualitySettings() { if( hqAudio() ) { - setSampleRate( engine::mixer()->processingSampleRate() ); + setSampleRate( Engine::mixer()->processingSampleRate() ); unsigned int value = sampleRate(); if ( ioctl( m_audioFD, SNDCTL_DSP_SPEED, &value ) < 0 ) diff --git a/src/core/audio/AudioPort.cpp b/src/core/audio/AudioPort.cpp index 1fecc8d9e..b913babd1 100644 --- a/src/core/audio/AudioPort.cpp +++ b/src/core/audio/AudioPort.cpp @@ -26,7 +26,7 @@ #include "AudioDevice.h" #include "EffectChain.h" #include "FxMixer.h" -#include "engine.h" +#include "Engine.h" #include "MixHelpers.h" #include "BufferManager.h" #include "ValueBuffer.h" @@ -44,7 +44,7 @@ AudioPort::AudioPort( const QString & _name, bool _has_effect_chain, m_volumeModel( volumeModel ), m_panningModel( panningModel ) { - engine::mixer()->addAudioPort( this ); + Engine::mixer()->addAudioPort( this ); setExtOutputEnabled( true ); } @@ -54,7 +54,7 @@ AudioPort::AudioPort( const QString & _name, bool _has_effect_chain, AudioPort::~AudioPort() { setExtOutputEnabled( false ); - engine::mixer()->removeAudioPort( this ); + Engine::mixer()->removeAudioPort( this ); delete m_effects; } @@ -68,11 +68,11 @@ void AudioPort::setExtOutputEnabled( bool _enabled ) m_extOutputEnabled = _enabled; if( m_extOutputEnabled ) { - engine::mixer()->audioDev()->registerPort( this ); + Engine::mixer()->audioDev()->registerPort( this ); } else { - engine::mixer()->audioDev()->unregisterPort( this ); + Engine::mixer()->audioDev()->unregisterPort( this ); } } } @@ -83,7 +83,7 @@ void AudioPort::setExtOutputEnabled( bool _enabled ) void AudioPort::setName( const QString & _name ) { m_name = _name; - engine::mixer()->audioDev()->renamePort( this ); + Engine::mixer()->audioDev()->renamePort( this ); } @@ -93,7 +93,7 @@ bool AudioPort::processEffects() { if( m_effects ) { - bool more = m_effects->processAudioBuffer( m_portBuffer, engine::mixer()->framesPerPeriod(), m_bufferUsage ); + bool more = m_effects->processAudioBuffer( m_portBuffer, Engine::mixer()->framesPerPeriod(), m_bufferUsage ); return more; } return false; @@ -102,11 +102,11 @@ bool AudioPort::processEffects() void AudioPort::doProcessing() { - const fpp_t fpp = engine::mixer()->framesPerPeriod(); + const fpp_t fpp = Engine::mixer()->framesPerPeriod(); m_portBuffer = BufferManager::acquire(); // get buffer for processing - engine::mixer()->clearAudioBuffer( m_portBuffer, fpp ); // clear the audioport buffer so we can use it + Engine::mixer()->clearAudioBuffer( m_portBuffer, fpp ); // clear the audioport buffer so we can use it //qDebug( "Playhandles: %d", m_playHandles.size() ); foreach( PlayHandle * ph, m_playHandles ) // now we mix all playhandle buffers into the audioport buffer @@ -215,7 +215,7 @@ void AudioPort::doProcessing() const bool me = processEffects(); if( me || m_bufferUsage ) { - engine::fxMixer()->mixToChannel( m_portBuffer, m_nextFxChannel ); // send output to fx mixer + Engine::fxMixer()->mixToChannel( m_portBuffer, m_nextFxChannel ); // send output to fx mixer // TODO: improve the flow here - convert to pull model m_bufferUsage = false; } diff --git a/src/core/audio/AudioPortAudio.cpp b/src/core/audio/AudioPortAudio.cpp index f9a110f32..05edcbd87 100644 --- a/src/core/audio/AudioPortAudio.cpp +++ b/src/core/audio/AudioPortAudio.cpp @@ -41,7 +41,7 @@ void AudioPortAudioSetupUtil::updateChannels() #include #include -#include "engine.h" +#include "Engine.h" #include "debug.h" #include "ConfigManager.h" #include "gui_templates.h" diff --git a/src/core/audio/AudioPulseAudio.cpp b/src/core/audio/AudioPulseAudio.cpp index 6ab5525a1..ca80d6eec 100644 --- a/src/core/audio/AudioPulseAudio.cpp +++ b/src/core/audio/AudioPulseAudio.cpp @@ -34,7 +34,7 @@ #include "LcdSpinBox.h" #include "gui_templates.h" #include "templates.h" -#include "engine.h" +#include "Engine.h" static void stream_write_callback(pa_stream *s, size_t length, void *userdata) @@ -179,7 +179,7 @@ static void context_state_callback(pa_context *c, void *userdata) buffer_attr.minreq = (uint32_t)(-1); buffer_attr.fragsize = (uint32_t)(-1); - double latency = (double)( engine::mixer()->framesPerPeriod() ) / + double latency = (double)( Engine::mixer()->framesPerPeriod() ) / (double)_this->sampleRate(); // ask PulseAudio for the desired latency (which might not be approved) diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index a5f678155..6285b4d4b 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -29,7 +29,7 @@ #include #include -#include "engine.h" +#include "Engine.h" #include "debug.h" #include "ConfigManager.h" #include "gui_templates.h" @@ -131,7 +131,7 @@ void AudioSdl::applyQualitySettings() { SDL_CloseAudio(); - setSampleRate( engine::mixer()->processingSampleRate() ); + setSampleRate( Engine::mixer()->processingSampleRate() ); m_audioHandle.freq = sampleRate(); diff --git a/src/core/main.cpp b/src/core/main.cpp index 5f303bba3..14dce4091 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -68,7 +68,7 @@ #include "ConfigManager.h" #include "NotePlayHandle.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "LmmsStyle.h" #include "ImportFilter.h" #include "MainWindow.h" @@ -437,7 +437,7 @@ int main( int argc, char * * argv ) qApp->processEvents(); // init central engine which handles all components of LMMS - engine::init(); + Engine::init(); splashScreen.hide(); @@ -449,7 +449,7 @@ int main( int argc, char * * argv ) QString recoveryFile = ConfigManager::inst()->recoveryFile(); if( QFileInfo(recoveryFile).exists() && - QMessageBox::question( engine::mainWindow(), MainWindow::tr( "Project recovery" ), + QMessageBox::question( Engine::mainWindow(), MainWindow::tr( "Project recovery" ), MainWindow::tr( "It looks like the last session did not end properly. " "Do you want to recover the project of this session?" ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::Yes ) @@ -460,54 +460,54 @@ int main( int argc, char * * argv ) // we try to load given file if( !file_to_load.isEmpty() ) { - engine::mainWindow()->show(); + Engine::mainWindow()->show(); if( fullscreen ) { - engine::mainWindow()->showMaximized(); + Engine::mainWindow()->showMaximized(); } if( file_to_load == recoveryFile ) { - engine::getSong()->createNewProjectFromTemplate( file_to_load ); + Engine::getSong()->createNewProjectFromTemplate( file_to_load ); } else { - engine::getSong()->loadProject( file_to_load ); + Engine::getSong()->loadProject( file_to_load ); } } else if( !file_to_import.isEmpty() ) { - ImportFilter::import( file_to_import, engine::getSong() ); + ImportFilter::import( file_to_import, Engine::getSong() ); if( exit_after_import ) { return 0; } - engine::mainWindow()->show(); + Engine::mainWindow()->show(); if( fullscreen ) { - engine::mainWindow()->showMaximized(); + Engine::mainWindow()->showMaximized(); } } else { - engine::getSong()->createNewProject(); + Engine::getSong()->createNewProject(); // [Settel] workaround: showMaximized() doesn't work with // FVWM2 unless the window is already visible -> show() first - engine::mainWindow()->show(); + Engine::mainWindow()->show(); if( fullscreen ) { - engine::mainWindow()->showMaximized(); + Engine::mainWindow()->showMaximized(); } } } else { // we're going to render our song - engine::init( false ); + Engine::init( false ); printf( "loading project...\n" ); - engine::getSong()->loadProject( file_to_load ); + Engine::getSong()->loadProject( file_to_load ); printf( "done\n" ); // create renderer @@ -527,7 +527,7 @@ int main( int argc, char * * argv ) if( profilerOutputFile.isEmpty() == false ) { - engine::mixer()->profiler().setOutputFile( profilerOutputFile ); + Engine::mixer()->profiler().setOutputFile( profilerOutputFile ); } // start now! diff --git a/src/core/midi/MidiAlsaSeq.cpp b/src/core/midi/MidiAlsaSeq.cpp index 7dec9e676..7923fc659 100644 --- a/src/core/midi/MidiAlsaSeq.cpp +++ b/src/core/midi/MidiAlsaSeq.cpp @@ -27,7 +27,7 @@ #include "MidiAlsaSeq.h" #include "ConfigManager.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "Song.h" #include "MidiPort.h" @@ -96,14 +96,14 @@ MidiAlsaSeq::MidiAlsaSeq() : snd_seq_queue_tempo_t * tempo; snd_seq_queue_tempo_malloc( &tempo ); snd_seq_queue_tempo_set_tempo( tempo, 6000000 / - engine::getSong()->getTempo() ); + Engine::getSong()->getTempo() ); snd_seq_queue_tempo_set_ppq( tempo, 16 ); snd_seq_set_queue_tempo( m_seqHandle, m_queueID, tempo ); snd_seq_queue_tempo_free( tempo ); snd_seq_start_queue( m_seqHandle, m_queueID, NULL ); - changeQueueTempo( engine::getSong()->getTempo() ); - connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), + changeQueueTempo( Engine::getSong()->getTempo() ); + connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), this, SLOT( changeQueueTempo( bpm_t ) ) ); // initial list-update diff --git a/src/core/midi/MidiController.cpp b/src/core/midi/MidiController.cpp index 99e846016..7ff057c6f 100644 --- a/src/core/midi/MidiController.cpp +++ b/src/core/midi/MidiController.cpp @@ -28,7 +28,7 @@ #include #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" #include "MidiClient.h" #include "MidiController.h" @@ -38,7 +38,7 @@ MidiController::MidiController( Model * _parent ) : Controller( Controller::MidiController, _parent, tr( "MIDI Controller" ) ), MidiEventProcessor(), m_midiPort( tr( "unnamed_midi_controller" ), - engine::mixer()->midiClient(), this, this, MidiPort::Input ), + Engine::mixer()->midiClient(), this, this, MidiPort::Input ), m_lastValue( 0.0f ) { setSampleExact( true ); diff --git a/src/core/midi/MidiPort.cpp b/src/core/midi/MidiPort.cpp index 5219bbf0a..7185c6dc7 100644 --- a/src/core/midi/MidiPort.cpp +++ b/src/core/midi/MidiPort.cpp @@ -340,7 +340,7 @@ void MidiPort::updateMidiPortMode() emit writablePortsChanged(); emit modeChanged(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } diff --git a/src/core/midi/MidiWinMM.cpp b/src/core/midi/MidiWinMM.cpp index fe6dbc597..67c1319bc 100644 --- a/src/core/midi/MidiWinMM.cpp +++ b/src/core/midi/MidiWinMM.cpp @@ -27,7 +27,7 @@ #include "MidiWinMM.h" #include "ConfigManager.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "MidiPort.h" #include "note.h" diff --git a/src/core/timeline.cpp b/src/core/timeline.cpp index 90a1dcde8..9bc004df8 100644 --- a/src/core/timeline.cpp +++ b/src/core/timeline.cpp @@ -33,7 +33,7 @@ #include "timeline.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "templates.h" #include "nstate_button.h" #include "MainWindow.h" @@ -111,7 +111,7 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, timeLine::~timeLine() { - if( engine::songEditor() ) + if( Engine::songEditor() ) { m_pos.m_timeLine = NULL; } @@ -339,7 +339,7 @@ void timeLine::mouseMoveEvent( QMouseEvent* event ) { case MovePositionMarker: m_pos.setTicks( t.getTicks() ); - engine::getSong()->setMilliSeconds(((((t.getTicks()))*60*1000/48)/engine::getSong()->getTempo())); + Engine::getSong()->setMilliSeconds(((((t.getTicks()))*60*1000/48)/Engine::getSong()->getTempo())); m_pos.setCurrentFrame( 0 ); updatePosition(); break; diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index a314adfcc..98926f714 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -177,7 +177,7 @@ void AutomatableModelViewSlots::execConnectionDialog() AutomatableModel* m = m_amv->modelUntyped(); m->displayName(); - ControllerConnectionDialog d( (QWidget*) engine::mainWindow(), m ); + ControllerConnectionDialog d( (QWidget*) Engine::mainWindow(), m ); if( d.exec() == 1 ) { diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index 33b1c1921..b7c8c0845 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -50,7 +50,7 @@ #include "SongEditor.h" #include "MainWindow.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "pixmap_button.h" #include "templates.h" #include "gui_templates.h" @@ -105,7 +105,7 @@ AutomationEditor::AutomationEditor() : connect( this, SIGNAL( currentPatternChanged() ), this, SLOT( updateAfterPatternChange() ), Qt::QueuedConnection ); - connect( engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), + connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), this, SLOT( update() ) ); // init pixmaps if( s_toolDraw == NULL ) @@ -133,7 +133,7 @@ AutomationEditor::AutomationEditor() : // add time-line m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt, - engine::getSong()->getPlayPos( + Engine::getSong()->getPlayPos( Song::Mode_PlayAutomationPattern ), m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), @@ -435,9 +435,9 @@ AutomationEditor::AutomationEditor() : setMinimumSize( tb_layout->minimumSize().width(), 128 ); // add us to workspace - if( engine::mainWindow()->workspace() ) + if( Engine::mainWindow()->workspace() ) { - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); parentWidget()->resize( INITIAL_WIDTH, INITIAL_HEIGHT ); parentWidget()->move( 5, 5 ); parentWidget()->hide(); @@ -587,7 +587,7 @@ void AutomationEditor::update() // Note detuning? if( m_pattern && !m_pattern->getTrack() ) { - engine::pianoRoll()->update(); + Engine::pianoRoll()->update(); } } @@ -725,7 +725,7 @@ void AutomationEditor::keyPressEvent( QKeyEvent * _ke ) break; case Qt::Key_Space: - if( engine::getSong()->isPlaying() ) + if( Engine::getSong()->isPlaying() ) { stop(); } @@ -911,7 +911,7 @@ void AutomationEditor::mousePressEvent( QMouseEvent * _me ) QCursor c( Qt::SizeAllCursor ); QApplication::setOverrideCursor( c ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } else if( ( _me->button() == Qt::RightButton && m_editMode == DRAW ) || @@ -921,7 +921,7 @@ void AutomationEditor::mousePressEvent( QMouseEvent * _me ) if( it != time_map.end() ) { m_pattern->removeValue( it.key() ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } m_action = NONE; } @@ -954,7 +954,7 @@ void AutomationEditor::mousePressEvent( QMouseEvent * _me ) m_action = MOVE_SELECTION; - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } else if( _me->button() == Qt::RightButton && m_editMode == MOVE ) @@ -1039,7 +1039,7 @@ void AutomationEditor::mouseMoveEvent( QMouseEvent * _me ) level ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } else if( ( _me->buttons() & Qt::RightButton && @@ -1492,7 +1492,7 @@ void AutomationEditor::paintEvent( QPaintEvent * _pe ) } // Then beat grid int ticksPerBeat = DefaultTicksPerTact / - engine::getSong()->getTimeSigModel().getDenominator(); + Engine::getSong()->getTimeSigModel().getDenominator(); for( tick = m_currentPosition - m_currentPosition % ticksPerBeat, x = xCoordOfTick( tick ); x<=width(); @@ -1817,9 +1817,9 @@ void AutomationEditor::resizeEvent( QResizeEvent * ) m_topBottomScroll->setValue( (int) m_scrollLevel ); - if( engine::getSong() ) + if( Engine::getSong() ) { - engine::getSong()->getPlayPos( Song::Mode_PlayAutomationPattern + Engine::getSong()->getPlayPos( Song::Mode_PlayAutomationPattern ).m_timeLine->setFixedWidth( width() ); } m_toolBar->setFixedWidth( width() ); @@ -1914,7 +1914,7 @@ inline bool AutomationEditor::inBBEditor() { QMutexLocker m( &m_patternMutex ); return( validPattern() && - m_pattern->getTrack()->trackContainer() == engine::getBBTrackContainer() ); + m_pattern->getTrack()->trackContainer() == Engine::getBBTrackContainer() ); } @@ -1931,37 +1931,37 @@ void AutomationEditor::play() if( !m_pattern->getTrack() ) { - if( engine::getSong()->playMode() != Song::Mode_PlayPattern ) + if( Engine::getSong()->playMode() != Song::Mode_PlayPattern ) { - engine::getSong()->stop(); - engine::getSong()->playPattern( (Pattern *) engine::pianoRoll()->currentPattern() ); + Engine::getSong()->stop(); + Engine::getSong()->playPattern( (Pattern *) Engine::pianoRoll()->currentPattern() ); } - else if( engine::getSong()->isStopped() == false ) + else if( Engine::getSong()->isStopped() == false ) { - engine::getSong()->togglePause(); + Engine::getSong()->togglePause(); } else { - engine::getSong()->playPattern( (Pattern *) engine::pianoRoll()->currentPattern() ); + Engine::getSong()->playPattern( (Pattern *) Engine::pianoRoll()->currentPattern() ); } } else if( inBBEditor() ) { - engine::getBBTrackContainer()->play(); + Engine::getBBTrackContainer()->play(); } else { - if( engine::getSong()->isStopped() == true ) + if( Engine::getSong()->isStopped() == true ) { - engine::getSong()->playSong(); + Engine::getSong()->playSong(); } else { - engine::getSong()->togglePause(); + Engine::getSong()->togglePause(); } } - setPauseIcon( engine::getSong()->isPlaying() ); + setPauseIcon( Engine::getSong()->isPlaying() ); } @@ -1977,11 +1977,11 @@ void AutomationEditor::stop() } if( m_pattern->getTrack() && inBBEditor() ) { - engine::getBBTrackContainer()->stop(); + Engine::getBBTrackContainer()->stop(); } else { - engine::getSong()->stop(); + Engine::getSong()->stop(); } m_scrollBack = true; } @@ -2058,7 +2058,7 @@ void AutomationEditor::discreteButtonToggled() disableTensionKnob(); m_pattern->setProgressionType( AutomationPattern::DiscreteProgression ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); } } @@ -2074,7 +2074,7 @@ void AutomationEditor::linearButtonToggled() disableTensionKnob(); m_pattern->setProgressionType( AutomationPattern::LinearProgression ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); } } @@ -2096,7 +2096,7 @@ void AutomationEditor::cubicHermiteButtonToggled() "level off at each control point." ) ); m_pattern->setProgressionType( AutomationPattern::CubicHermiteProgression ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); } } @@ -2235,7 +2235,7 @@ void AutomationEditor::cutSelectedValues() if( !selected_values.isEmpty() ) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); for( timeMap::iterator it = selected_values.begin(); it != selected_values.end(); ++it ) @@ -2246,7 +2246,7 @@ void AutomationEditor::cutSelectedValues() } update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } @@ -2266,9 +2266,9 @@ void AutomationEditor::pasteValues() // we only have to do the following lines if we pasted at // least one value... - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } } @@ -2296,9 +2296,9 @@ void AutomationEditor::deleteSelectedValues() if( update_after_delete == true ) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } } @@ -2307,8 +2307,8 @@ void AutomationEditor::deleteSelectedValues() void AutomationEditor::updatePosition( const MidiTime & _t ) { - if( ( engine::getSong()->isPlaying() && - engine::getSong()->playMode() == + if( ( Engine::getSong()->isPlaying() && + Engine::getSong()->playMode() == Song::Mode_PlayAutomationPattern ) || m_scrollBack == true ) { diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index 56c0d1309..ad90a92e9 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -30,7 +30,7 @@ #include "AutomationEditor.h" #include "AutomationPattern.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "ProjectJournal.h" #include "rename_dialog.h" @@ -49,7 +49,7 @@ AutomationPatternView::AutomationPatternView( AutomationPattern * _pattern, { connect( m_pat, SIGNAL( dataChanged() ), this, SLOT( update() ) ); - connect( engine::automationEditor(), SIGNAL( currentPatternChanged() ), + connect( Engine::automationEditor(), SIGNAL( currentPatternChanged() ), this, SLOT( update() ) ); setAttribute( Qt::WA_OpaquePaintEvent, true ); @@ -110,7 +110,7 @@ void AutomationPatternView::changeName() void AutomationPatternView::disconnectObject( QAction * _a ) { - JournallingObject * j = engine::projectJournal()-> + JournallingObject * j = Engine::projectJournal()-> journallingObject( _a->data().toInt() ); if( j && dynamic_cast( j ) ) { @@ -123,9 +123,9 @@ void AutomationPatternView::disconnectObject( QAction * _a ) update(); //If automation editor is opened, update its display after disconnection - if( engine::automationEditor() ) + if( Engine::automationEditor() ) { - engine::automationEditor()->updateAfterPatternChange(); + Engine::automationEditor()->updateAfterPatternChange(); } //if there is no more connection connected to the AutomationPattern @@ -242,7 +242,7 @@ void AutomationPatternView::paintEvent( QPaintEvent * ) lingrad.setColorAt( 0, c ); p.setBrush( lingrad ); - if( engine::automationEditor()->currentPattern() == m_pat ) + if( Engine::automationEditor()->currentPattern() == m_pat ) p.setPen( c.lighter( 160 ) ); else p.setPen( c.lighter( 130 ) ); @@ -325,7 +325,7 @@ void AutomationPatternView::paintEvent( QPaintEvent * ) // outer edge p.setBrush( QBrush() ); - if( engine::automationEditor()->currentPattern() == m_pat ) + if( Engine::automationEditor()->currentPattern() == m_pat ) p.setPen( c.lighter( 130 ) ); else p.setPen( c.darker( 300 ) ); @@ -378,7 +378,7 @@ void AutomationPatternView::dropEvent( QDropEvent * _de ) if( type == "automatable_model" ) { AutomatableModel * mod = dynamic_cast( - engine::projectJournal()-> + Engine::projectJournal()-> journallingObject( val.toInt() ) ); if( mod != NULL ) { @@ -386,10 +386,10 @@ void AutomationPatternView::dropEvent( QDropEvent * _de ) } update(); - if( engine::automationEditor() && - engine::automationEditor()->currentPattern() == m_pat ) + if( Engine::automationEditor() && + Engine::automationEditor()->currentPattern() == m_pat ) { - engine::automationEditor()->setCurrentPattern( m_pat ); + Engine::automationEditor()->setCurrentPattern( m_pat ); } } else diff --git a/src/gui/ControllerConnectionDialog.cpp b/src/gui/ControllerConnectionDialog.cpp index 35f42df97..0a31cf075 100644 --- a/src/gui/ControllerConnectionDialog.cpp +++ b/src/gui/ControllerConnectionDialog.cpp @@ -70,7 +70,7 @@ public: { m_detectedMidiChannel = event.channel() + 1; m_detectedMidiController = event.controllerNumber() + 1; - m_detectedMidiPort = engine::mixer()->midiClient()->sourcePortName( event ); + m_detectedMidiPort = Engine::mixer()->midiClient()->sourcePortName( event ); emit valueChanged(); } @@ -165,7 +165,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, // when using with non-raw-clients we can provide buttons showing // our port-menus when being clicked - if( !engine::mixer()->midiClient()->isRaw() ) + if( !Engine::mixer()->midiClient()->isRaw() ) { m_readablePorts = new MidiPortMenu( MidiPort::Input ); connect( m_readablePorts, SIGNAL( triggered( QAction * ) ), @@ -189,9 +189,9 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, m_userController = new comboBox( m_userGroupBox, "Controller" ); m_userController->setGeometry( 10, 24, 200, 22 ); - for( int i = 0; i < engine::getSong()->controllers().size(); ++i ) + for( int i = 0; i < Engine::getSong()->controllers().size(); ++i ) { - Controller * c = engine::getSong()->controllers().at( i ); + Controller * c = Engine::getSong()->controllers().at( i ); m_userController->model()->addItem( c->name() ); } @@ -242,7 +242,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, { cc = m_targetModel->controllerConnection(); - if( cc && cc->getController()->type() != Controller::DummyController && engine::getSong() ) + if( cc && cc->getController()->type() != Controller::DummyController && Engine::getSong() ) { if ( cc->getController()->type() == Controller::MidiController ) { @@ -258,7 +258,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, } else { - int idx = engine::getSong()->controllers().indexOf( cc->getController() ); + int idx = Engine::getSong()->controllers().indexOf( cc->getController() ); if( idx >= 0 ) { @@ -298,7 +298,7 @@ void ControllerConnectionDialog::selectController() if( m_midiControllerSpinBox->model()->value() > 0 ) { MidiController * mc; - mc = m_midiController->copyToMidiController( engine::getSong() ); + mc = m_midiController->copyToMidiController( Engine::getSong() ); /* if( m_targetModel->getTrack() && @@ -321,9 +321,9 @@ void ControllerConnectionDialog::selectController() else { if( m_userGroupBox->model()->value() > 0 && - engine::getSong()->controllers().size() ) + Engine::getSong()->controllers().size() ) { - m_controller = engine::getSong()->controllers().at( + m_controller = Engine::getSong()->controllers().at( m_userController->model()->value() ); } @@ -353,7 +353,7 @@ void ControllerConnectionDialog::midiToggled() if( !m_midiController ) { - m_midiController = new AutoDetectMidiController( engine::getSong() ); + m_midiController = new AutoDetectMidiController( Engine::getSong() ); MidiPort::Map map = m_midiController->m_midiPort.readablePorts(); for( MidiPort::Map::Iterator it = map.begin(); it != map.end(); ++it ) diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 14a862872..117ad8000 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -37,7 +37,7 @@ #include "ConfigManager.h" #include "debug.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "ImportFilter.h" #include "Instrument.h" @@ -415,7 +415,7 @@ void FileBrowserTreeWidget::mousePressEvent(QMouseEvent * me ) m_pphMutex.lock(); if( m_previewPlayHandle != NULL ) { - engine::mixer()->removePlayHandle( + Engine::mixer()->removePlayHandle( m_previewPlayHandle ); m_previewPlayHandle = NULL; } @@ -446,7 +446,7 @@ void FileBrowserTreeWidget::mousePressEvent(QMouseEvent * me ) } if( m_previewPlayHandle != NULL ) { - if( !engine::mixer()->addPlayHandle( + if( !Engine::mixer()->addPlayHandle( m_previewPlayHandle ) ) { m_previewPlayHandle = NULL; @@ -524,7 +524,7 @@ void FileBrowserTreeWidget::mouseReleaseEvent(QMouseEvent * me ) SamplePlayHandle * s = dynamic_cast( m_previewPlayHandle ); if( s && s->totalFrames() - s->framesDone() <= - static_cast( engine::mixer()-> + static_cast( Engine::mixer()-> processingSampleRate() * 3 ) ) { s->setDoneMayReturnTrue( true ); @@ -533,7 +533,7 @@ void FileBrowserTreeWidget::mouseReleaseEvent(QMouseEvent * me ) return; } } - engine::mixer()->removePlayHandle( m_previewPlayHandle ); + Engine::mixer()->removePlayHandle( m_previewPlayHandle ); m_previewPlayHandle = NULL; } m_pphMutex.unlock(); @@ -545,13 +545,13 @@ void FileBrowserTreeWidget::mouseReleaseEvent(QMouseEvent * me ) void FileBrowserTreeWidget::handleFile(FileItem * f, InstrumentTrack * it ) { - engine::mixer()->lock(); + Engine::mixer()->lock(); switch( f->handling() ) { case FileItem::LoadAsProject: - if( engine::mainWindow()->mayChangeProject() ) + if( Engine::mainWindow()->mayChangeProject() ) { - engine::getSong()->loadProject( f->fullName() ); + Engine::getSong()->loadProject( f->fullName() ); } break; @@ -563,7 +563,7 @@ void FileBrowserTreeWidget::handleFile(FileItem * f, InstrumentTrack * it ) !i->descriptor()->supportsFileType( e ) ) { i = it->loadInstrument( - engine::pluginFileHandling()[e] ); + Engine::pluginFileHandling()[e] ); } i->loadFile( f->fullName() ); break; @@ -580,12 +580,12 @@ void FileBrowserTreeWidget::handleFile(FileItem * f, InstrumentTrack * it ) case FileItem::ImportAsProject: if( f->type() == FileItem::FlpFile && - !engine::mainWindow()->mayChangeProject() ) + !Engine::mainWindow()->mayChangeProject() ) { break; } ImportFilter::import( f->fullName(), - engine::getSong() ); + Engine::getSong() ); break; case FileItem::NotSupported: @@ -593,7 +593,7 @@ void FileBrowserTreeWidget::handleFile(FileItem * f, InstrumentTrack * it ) break; } - engine::mixer()->unlock(); + Engine::mixer()->unlock(); } @@ -618,7 +618,7 @@ void FileBrowserTreeWidget::activateListItem(QTreeWidgetItem * item, // engine::mixer()->lock(); InstrumentTrack * it = dynamic_cast( Track::create( Track::InstrumentTrack, - engine::getBBTrackContainer() ) ); + Engine::getBBTrackContainer() ) ); handleFile( f, it ); // engine::mixer()->unlock(); } @@ -645,7 +645,7 @@ void FileBrowserTreeWidget::openInNewInstrumentTrack( TrackContainer* tc ) void FileBrowserTreeWidget::openInNewInstrumentTrackBBE( void ) { - openInNewInstrumentTrack( engine::getBBTrackContainer() ); + openInNewInstrumentTrack( Engine::getBBTrackContainer() ); } @@ -653,7 +653,7 @@ void FileBrowserTreeWidget::openInNewInstrumentTrackBBE( void ) void FileBrowserTreeWidget::openInNewInstrumentTrackSE( void ) { - openInNewInstrumentTrack( engine::getSong() ); + openInNewInstrumentTrack( Engine::getSong() ); } @@ -663,7 +663,7 @@ void FileBrowserTreeWidget::sendToActiveInstrumentTrack( void ) { // get all windows opened in the workspace QList pl = - engine::mainWindow()->workspace()-> + Engine::mainWindow()->workspace()-> subWindowList( QMdiArea::StackingOrder ); QListIterator w( pl ); w.toBack(); @@ -988,7 +988,7 @@ void FileItem::determineFileType( void ) m_type = PresetFile; m_handling = LoadAsPreset; } - else if( ext == "xiz" && engine::pluginFileHandling().contains( ext ) ) + else if( ext == "xiz" && Engine::pluginFileHandling().contains( ext ) ) { m_type = PresetFile; m_handling = LoadByPlugin; @@ -1022,7 +1022,7 @@ void FileItem::determineFileType( void ) } if( m_handling == NotSupported && - !ext.isEmpty() && engine::pluginFileHandling().contains( ext ) ) + !ext.isEmpty() && Engine::pluginFileHandling().contains( ext ) ) { m_handling = LoadByPlugin; // classify as sample if not classified by anything yet but can diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index 5a84e1e64..4f1cb0f7f 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -39,7 +39,7 @@ #include "FxMixerView.h" #include "knob.h" -#include "engine.h" +#include "Engine.h" #include "embed.h" #include "MainWindow.h" #include "gui_templates.h" @@ -52,7 +52,7 @@ FxMixerView::FxMixerView() : ModelView( NULL, this ), SerializingObjectHook() { - FxMixer * m = engine::fxMixer(); + FxMixer * m = Engine::fxMixer(); m->setHook( this ); //QPalette pal = palette(); @@ -141,13 +141,13 @@ FxMixerView::FxMixerView() : updateGeometry(); // timer for updating faders - connect( engine::mainWindow(), SIGNAL( periodicUpdate() ), + connect( Engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( updateFaders() ) ); // add ourself to workspace QMdiSubWindow * subWin = - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); Qt::WindowFlags flags = subWin->windowFlags(); flags &= ~Qt::WindowMaximizeButtonHint; subWin->setWindowFlags( flags ); @@ -174,7 +174,7 @@ FxMixerView::~FxMixerView() void FxMixerView::addNewChannel() { // add new fx mixer channel and redraw the form. - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); int newChannelIndex = mix->createChannel(); m_fxChannelViews.push_back(new FxChannelView(m_channelAreaWidget, this, @@ -204,7 +204,7 @@ void FxMixerView::refreshDisplay() m_channelAreaWidget->adjustSize(); // re-add the views - m_fxChannelViews.resize(engine::fxMixer()->numChannels()); + m_fxChannelViews.resize(Engine::fxMixer()->numChannels()); for( int i = 1; i < m_fxChannelViews.size(); ++i ) { m_fxChannelViews[i] = new FxChannelView(m_channelAreaWidget, this, i); @@ -228,8 +228,8 @@ void FxMixerView::refreshDisplay() // update the and max. channel number for every instrument void FxMixerView::updateMaxChannelSelector() { - QVector songTrackList = engine::getSong()->tracks(); - QVector bbTrackList = engine::getBBTrackContainer()->tracks(); + QVector songTrackList = Engine::getSong()->tracks(); + QVector bbTrackList = Engine::getBBTrackContainer()->tracks(); QVector trackLists[] = {songTrackList, bbTrackList}; for(int tl=0; tl<2; ++tl) @@ -267,7 +267,7 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv, { m_fxLine = new FxLine(_parent, _mv, _chIndex); - FxMixer * m = engine::fxMixer(); + FxMixer * m = Engine::fxMixer(); m_fader = new fader( &m->effectChannel(_chIndex)->m_volumeModel, tr( "FX Fader %1" ).arg( _chIndex ), m_fxLine ); m_fader->move( 16-m_fader->width()/2, @@ -304,7 +304,7 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv, void FxMixerView::toggledSolo() { - engine::fxMixer()->toggledSolo(); + Engine::fxMixer()->toggledSolo(); } @@ -325,7 +325,7 @@ void FxMixerView::setCurrentFxLine( FxLine * _line ) void FxMixerView::updateFxLine(int index) { - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); // does current channel send to this channel? int selIndex = m_currentFxLine->channelIndex(); @@ -359,7 +359,7 @@ void FxMixerView::deleteChannel(int index) int selLine = m_currentFxLine->channelIndex(); // delete the real channel - engine::fxMixer()->deleteChannel(index); + Engine::fxMixer()->deleteChannel(index); // delete the view chLayout->removeWidget(m_fxChannelViews[index]->m_fxLine); @@ -402,7 +402,7 @@ void FxMixerView::moveChannelLeft(int index) int selIndex = m_currentFxLine->channelIndex(); - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); mix->moveChannelLeft(index); // refresh the two mixer views @@ -492,7 +492,7 @@ void FxMixerView::setCurrentFxLine( int _line ) void FxMixerView::clear() { - engine::fxMixer()->clear(); + Engine::fxMixer()->clear(); refreshDisplay(); } @@ -502,7 +502,7 @@ void FxMixerView::clear() void FxMixerView::updateFaders() { - FxMixer * m = engine::fxMixer(); + FxMixer * m = Engine::fxMixer(); for( int i = 0; i < m_fxChannelViews.size(); ++i ) { const float opl = m_fxChannelViews[i]->m_fader->getPeak_L(); diff --git a/src/gui/LfoControllerDialog.cpp b/src/gui/LfoControllerDialog.cpp index c52fd1930..b1415f73f 100644 --- a/src/gui/LfoControllerDialog.cpp +++ b/src/gui/LfoControllerDialog.cpp @@ -32,7 +32,7 @@ #include "caption_menu.h" #include "gui_templates.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "led_checkbox.h" #include "MainWindow.h" #include "tooltip.h" diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 9df27df61..1c6394f6e 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -42,7 +42,7 @@ #include "Song.h" #include "PianoRoll.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "FxMixerView.h" #include "InstrumentTrack.h" #include "PianoView.h" @@ -199,7 +199,7 @@ MainWindow::MainWindow() : m_autoSaveTimer.start(1000 * 60); // 1 minute } - connect( engine::getSong(), SIGNAL( playbackStateChanged() ), + connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), this, SLOT( updatePlayPauseIcons() ) ); } @@ -217,7 +217,7 @@ MainWindow::~MainWindow() } // TODO: Close tools // destroy engine which will do further cleanups etc. - engine::destroy(); + Engine::destroy(); } @@ -266,16 +266,16 @@ void MainWindow::finalize() project_menu->addSeparator(); project_menu->addAction( embed::getIconPixmap( "project_import" ), tr( "Import..." ), - engine::getSong(), + Engine::getSong(), SLOT( importProject() ) ); project_menu->addAction( embed::getIconPixmap( "project_export" ), tr( "E&xport..." ), - engine::getSong(), + Engine::getSong(), SLOT( exportProject() ), Qt::CTRL + Qt::Key_E ); project_menu->addAction( embed::getIconPixmap( "project_export" ), tr( "E&xport tracks..." ), - engine::getSong(), + Engine::getSong(), SLOT( exportProjectTracks() ), Qt::CTRL + Qt::SHIFT + Qt::Key_E ); @@ -392,7 +392,7 @@ void MainWindow::finalize() toolButton * project_export = new toolButton( embed::getIconPixmap( "project_export" ), tr( "Export current project" ), - engine::getSong(), + Engine::getSong(), SLOT( exportProject() ), m_toolBar ); @@ -523,7 +523,7 @@ void MainWindow::finalize() sd.exec(); } // look whether mixer could use a audio-interface beside AudioDummy - else if( engine::mixer()->audioDevName() == AudioDummy::name() ) + else if( Engine::mixer()->audioDevName() == AudioDummy::name() ) { // no, so we offer setup-dialog with audio-settings... setupDialog sd( setupDialog::AudioSettings ); @@ -563,16 +563,16 @@ void MainWindow::addSpacingToToolBar( int _size ) void MainWindow::resetWindowTitle() { QString title = ""; - if( engine::getSong()->projectFileName() != "" ) + if( Engine::getSong()->projectFileName() != "" ) { - title = QFileInfo( engine::getSong()->projectFileName() + title = QFileInfo( Engine::getSong()->projectFileName() ).completeBaseName(); } if( title == "" ) { title = tr( "Untitled" ); } - if( engine::getSong()->isModified() ) + if( Engine::getSong()->isModified() ) { title += '*'; } @@ -584,9 +584,9 @@ void MainWindow::resetWindowTitle() bool MainWindow::mayChangeProject() { - engine::getSong()->stop(); + Engine::getSong()->stop(); - if( !engine::getSong()->isModified() ) + if( !Engine::getSong()->isModified() ) { return( true ); } @@ -693,7 +693,7 @@ void MainWindow::createNewProject() { if( mayChangeProject() ) { - engine::getSong()->createNewProject(); + Engine::getSong()->createNewProject(); } } @@ -708,7 +708,7 @@ void MainWindow::createNewProjectFromTemplate( QAction * _idx ) >= m_custom_templates_count ? ConfigManager::inst()->factoryProjectsDir() : ConfigManager::inst()->userProjectsDir(); - engine::getSong()->createNewProjectFromTemplate( + Engine::getSong()->createNewProjectFromTemplate( dir_base + "templates/" + _idx->text() + ".mpt" ); } } @@ -728,7 +728,7 @@ void MainWindow::openProject() !ofd.selectedFiles().isEmpty() ) { setCursor( Qt::WaitCursor ); - engine::getSong()->loadProject( + Engine::getSong()->loadProject( ofd.selectedFiles()[0] ); setCursor( Qt::ArrowCursor ); } @@ -758,7 +758,7 @@ void MainWindow::openRecentlyOpenedProject( QAction * _action ) { const QString & f = _action->text(); setCursor( Qt::WaitCursor ); - engine::getSong()->loadProject( f ); + Engine::getSong()->loadProject( f ); ConfigManager::inst()->addRecentlyOpenedProject( f ); setCursor( Qt::ArrowCursor ); } @@ -769,13 +769,13 @@ void MainWindow::openRecentlyOpenedProject( QAction * _action ) bool MainWindow::saveProject() { - if( engine::getSong()->projectFileName() == "" ) + if( Engine::getSong()->projectFileName() == "" ) { return( saveProjectAs() ); } else { - engine::getSong()->guiSaveProject(); + Engine::getSong()->guiSaveProject(); } return( true ); } @@ -788,7 +788,7 @@ bool MainWindow::saveProjectAs() VersionedSaveDialog sfd( this, tr( "Save project" ), "", tr( "LMMS Project (*.mmpz *.mmp);;" "LMMS Project Template (*.mpt)" ) ); - QString f = engine::getSong()->projectFileName(); + QString f = Engine::getSong()->projectFileName(); if( f != "" ) { sfd.setDirectory( QFileInfo( f ).absolutePath() ); @@ -802,7 +802,7 @@ bool MainWindow::saveProjectAs() if( sfd.exec () == FileDialog::Accepted && !sfd.selectedFiles().isEmpty() && sfd.selectedFiles()[0] != "" ) { - engine::getSong()->guiSaveProjectAs( + Engine::getSong()->guiSaveProjectAs( sfd.selectedFiles()[0] ); return( true ); } @@ -814,7 +814,7 @@ bool MainWindow::saveProjectAs() bool MainWindow::saveProjectAsNewVersion() { - QString fileName = engine::getSong()->projectFileName(); + QString fileName = Engine::getSong()->projectFileName(); if( fileName == "" ) { return saveProjectAs(); @@ -824,7 +824,7 @@ bool MainWindow::saveProjectAsNewVersion() do VersionedSaveDialog::changeFileNameVersion( fileName, true ); while ( QFile( fileName ).exists() ); - engine::getSong()->guiSaveProjectAs( fileName ); + Engine::getSong()->guiSaveProjectAs( fileName ); return true; } } @@ -892,7 +892,7 @@ void MainWindow::toggleWindow( QWidget *window, bool forceShow ) void MainWindow::toggleBBEditorWin( bool forceShow ) { - toggleWindow( engine::getBBEditor(), forceShow ); + toggleWindow( Engine::getBBEditor(), forceShow ); } @@ -900,7 +900,7 @@ void MainWindow::toggleBBEditorWin( bool forceShow ) void MainWindow::toggleSongEditorWin() { - toggleWindow( engine::songEditor() ); + toggleWindow( Engine::songEditor() ); } @@ -908,7 +908,7 @@ void MainWindow::toggleSongEditorWin() void MainWindow::toggleProjectNotesWin() { - toggleWindow( engine::getProjectNotes() ); + toggleWindow( Engine::getProjectNotes() ); } @@ -916,7 +916,7 @@ void MainWindow::toggleProjectNotesWin() void MainWindow::togglePianoRollWin() { - toggleWindow( engine::pianoRoll() ); + toggleWindow( Engine::pianoRoll() ); } @@ -924,7 +924,7 @@ void MainWindow::togglePianoRollWin() void MainWindow::toggleAutomationEditorWin() { - toggleWindow( engine::automationEditor() ); + toggleWindow( Engine::automationEditor() ); } @@ -932,7 +932,7 @@ void MainWindow::toggleAutomationEditorWin() void MainWindow::toggleFxMixerWin() { - toggleWindow( engine::fxMixerView() ); + toggleWindow( Engine::fxMixerView() ); } @@ -940,7 +940,7 @@ void MainWindow::toggleFxMixerWin() void MainWindow::toggleControllerRack() { - toggleWindow( engine::getControllerRackView() ); + toggleWindow( Engine::getControllerRackView() ); } @@ -948,29 +948,29 @@ void MainWindow::toggleControllerRack() void MainWindow::updatePlayPauseIcons() { - engine::songEditor()->setPauseIcon( false ); - engine::automationEditor()->setPauseIcon( false ); - engine::getBBEditor()->setPauseIcon( false ); - engine::pianoRoll()->setPauseIcon( false ); + Engine::songEditor()->setPauseIcon( false ); + Engine::automationEditor()->setPauseIcon( false ); + Engine::getBBEditor()->setPauseIcon( false ); + Engine::pianoRoll()->setPauseIcon( false ); - if( engine::getSong()->isPlaying() ) + if( Engine::getSong()->isPlaying() ) { - switch( engine::getSong()->playMode() ) + switch( Engine::getSong()->playMode() ) { case Song::Mode_PlaySong: - engine::songEditor()->setPauseIcon( true ); + Engine::songEditor()->setPauseIcon( true ); break; case Song::Mode_PlayAutomationPattern: - engine::automationEditor()->setPauseIcon( true ); + Engine::automationEditor()->setPauseIcon( true ); break; case Song::Mode_PlayBB: - engine::getBBEditor()->setPauseIcon( true ); + Engine::getBBEditor()->setPauseIcon( true ); break; case Song::Mode_PlayPattern: - engine::pianoRoll()->setPauseIcon( true ); + Engine::pianoRoll()->setPauseIcon( true ); break; default: @@ -984,7 +984,7 @@ void MainWindow::updatePlayPauseIcons() void MainWindow::undo() { - engine::projectJournal()->undo(); + Engine::projectJournal()->undo(); } @@ -992,7 +992,7 @@ void MainWindow::undo() void MainWindow::redo() { - engine::projectJournal()->redo(); + Engine::projectJournal()->redo(); } @@ -1145,10 +1145,10 @@ void MainWindow::browseHelp() void MainWindow::autoSave() { - if( !( engine::getSong()->isPlaying() || - engine::getSong()->isExporting() ) ) + if( !( Engine::getSong()->isPlaying() || + Engine::getSong()->isExporting() ) ) { - engine::getSong()->saveProjectFile(ConfigManager::inst()->recoveryFile()); + Engine::getSong()->saveProjectFile(ConfigManager::inst()->recoveryFile()); } else { diff --git a/src/gui/PeakControllerDialog.cpp b/src/gui/PeakControllerDialog.cpp index 81528e7b0..f657999ce 100644 --- a/src/gui/PeakControllerDialog.cpp +++ b/src/gui/PeakControllerDialog.cpp @@ -33,7 +33,7 @@ #include "caption_menu.h" #include "gui_templates.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" #include "tooltip.h" diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index e981792dc..020fd3951 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -292,7 +292,7 @@ PianoRoll::PianoRoll() : // add time-line m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt, - engine::getSong()->getPlayPos( + Engine::getSong()->getPlayPos( Song::Mode_PlayPattern ), m_currentPosition, this ); connect( this, SIGNAL( positionChanged( const MidiTime & ) ), @@ -301,7 +301,7 @@ PianoRoll::PianoRoll() : this, SLOT( updatePosition( const MidiTime & ) ) ); // update timeline when in record-accompany mode - connect( engine::getSong()->getPlayPos( Song::Mode_PlaySong ).m_timeLine, + connect( Engine::getSong()->getPlayPos( Song::Mode_PlaySong ).m_timeLine, SIGNAL( positionChanged( const MidiTime & ) ), this, SLOT( updatePositionAccompany( const MidiTime & ) ) ); @@ -678,9 +678,9 @@ PianoRoll::PianoRoll() : setMinimumSize( tb_layout->minimumSize().width(), 160 ); // add us to workspace - if( engine::mainWindow()->workspace() ) + if( Engine::mainWindow()->workspace() ) { - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); parentWidget()->setMinimumSize( tb_layout->minimumSize().width()+10, 200 ); parentWidget()->resize( tb_layout->minimumSize().width()+10, INITIAL_PIANOROLL_HEIGHT ); @@ -694,7 +694,7 @@ PianoRoll::PianoRoll() : hide(); } - connect( engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), + connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), this, SLOT( update() ) ); } @@ -795,10 +795,10 @@ void PianoRoll::setCurrentPattern( Pattern* newPattern ) } // force the song-editor to stop playing if it played pattern before - if( engine::getSong()->isPlaying() && - engine::getSong()->playMode() == Song::Mode_PlayPattern ) + if( Engine::getSong()->isPlaying() && + Engine::getSong()->playMode() == Song::Mode_PlayPattern ) { - engine::getSong()->playPattern( NULL ); + Engine::getSong()->playPattern( NULL ); } // set new data @@ -1134,7 +1134,7 @@ void PianoRoll::shiftSemiTone( int amount ) // shift notes by amount semitones // we modified the song update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } @@ -1170,7 +1170,7 @@ void PianoRoll::shiftPos( int amount ) //shift notes pos by amount // we modified the song update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } @@ -1428,7 +1428,7 @@ void PianoRoll::keyPressEvent( QKeyEvent* event ) break; case Qt::Key_Space: - if( engine::getSong()->isPlaying() ) + if( Engine::getSong()->isPlaying() ) { stop(); } @@ -1879,9 +1879,9 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) } // added new notes, so must update engine, song, etc - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } } @@ -1889,7 +1889,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) testPlayNote( m_currentNote ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } else if( ( _me->buttons() == Qt::RightButton && m_editMode == ModeDraw ) || @@ -1909,7 +1909,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) ( *it )->setLength( 0 ); m_pattern->dataChanged(); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } else if( _me->button() == Qt::LeftButton && @@ -2658,7 +2658,7 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * _me ) ( *it )->setLength( 0 ); m_pattern->dataChanged(); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } else @@ -2883,7 +2883,7 @@ void PianoRoll::dragNotes( int x, int y, bool alt, bool shift ) } m_pattern->dataChanged(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } static QString calculateNoteLabel(QString note, int octave) @@ -3482,7 +3482,7 @@ void PianoRoll::resizeEvent( QResizeEvent * ) } m_topBottomScroll->setValue( m_totalKeysToScroll - m_startKey ); - engine::getSong()->getPlayPos( Song::Mode_PlayPattern + Engine::getSong()->getPlayPos( Song::Mode_PlayPattern ).m_timeLine->setFixedWidth( width() ); m_toolBar->setFixedWidth( width() ); update(); @@ -3652,7 +3652,7 @@ int PianoRoll::getKey( int _y ) const Song::PlayModes PianoRoll::desiredPlayModeForAccompany() const { if( m_pattern->getTrack()->trackContainer() == - engine::getBBTrackContainer() ) + Engine::getBBTrackContainer() ) { return Song::Mode_PlayBB; } @@ -3669,13 +3669,13 @@ void PianoRoll::play() return; } - if( engine::getSong()->playMode() != Song::Mode_PlayPattern ) + if( Engine::getSong()->playMode() != Song::Mode_PlayPattern ) { - engine::getSong()->playPattern( m_pattern ); + Engine::getSong()->playPattern( m_pattern ); } else { - engine::getSong()->togglePause(); + Engine::getSong()->togglePause(); } } @@ -3684,7 +3684,7 @@ void PianoRoll::play() void PianoRoll::record() { - if( engine::getSong()->isPlaying() ) + if( Engine::getSong()->isPlaying() ) { stop(); } @@ -3695,7 +3695,7 @@ void PianoRoll::record() m_recording = true; - engine::getSong()->playPattern( m_pattern, false ); + Engine::getSong()->playPattern( m_pattern, false ); } @@ -3703,7 +3703,7 @@ void PianoRoll::record() void PianoRoll::recordAccompany() { - if( engine::getSong()->isPlaying() ) + if( Engine::getSong()->isPlaying() ) { stop(); } @@ -3714,13 +3714,13 @@ void PianoRoll::recordAccompany() m_recording = true; - if( m_pattern->getTrack()->trackContainer() == engine::getSong() ) + if( m_pattern->getTrack()->trackContainer() == Engine::getSong() ) { - engine::getSong()->playSong(); + Engine::getSong()->playSong(); } else { - engine::getSong()->playBB(); + Engine::getSong()->playBB(); } } @@ -3730,7 +3730,7 @@ void PianoRoll::recordAccompany() void PianoRoll::stop() { - engine::getSong()->stop(); + Engine::getSong()->stop(); m_recording = false; m_scrollBack = true; } @@ -3741,19 +3741,19 @@ void PianoRoll::stop() void PianoRoll::startRecordNote( const note & _n ) { if( m_recording == true && hasValidPattern() == true && - engine::getSong()->isPlaying() && - ( engine::getSong()->playMode() == + Engine::getSong()->isPlaying() && + ( Engine::getSong()->playMode() == desiredPlayModeForAccompany() || - engine::getSong()->playMode() == + Engine::getSong()->playMode() == Song::Mode_PlayPattern ) ) { MidiTime sub; - if( engine::getSong()->playMode() == Song::Mode_PlaySong ) + if( Engine::getSong()->playMode() == Song::Mode_PlaySong ) { sub = m_pattern->startPosition(); } - note n( 1, engine::getSong()->getPlayPos( - engine::getSong()->playMode() ) - sub, + note n( 1, Engine::getSong()->getPlayPos( + Engine::getSong()->playMode() ) - sub, _n.key(), _n.getVolume(), _n.getPanning() ); if( n.pos() >= 0 ) { @@ -3768,10 +3768,10 @@ void PianoRoll::startRecordNote( const note & _n ) void PianoRoll::finishRecordNote( const note & _n ) { if( m_recording == true && hasValidPattern() == true && - engine::getSong()->isPlaying() && - ( engine::getSong()->playMode() == + Engine::getSong()->isPlaying() && + ( Engine::getSong()->playMode() == desiredPlayModeForAccompany() || - engine::getSong()->playMode() == + Engine::getSong()->playMode() == Song::Mode_PlayPattern ) ) { for( QList::Iterator it = m_recordingNotes.begin(); @@ -4025,7 +4025,7 @@ void PianoRoll::cutSelectedNotes() { copy_to_clipboard( selected_notes ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); for( NoteVector::Iterator it = selected_notes.begin(); it != selected_notes.end(); ++it ) @@ -4037,7 +4037,7 @@ void PianoRoll::cutSelectedNotes() } update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } @@ -4084,11 +4084,11 @@ void PianoRoll::pasteNotes() // we only have to do the following lines if we pasted at // least one note... - engine::getSong()->setModified(); + Engine::getSong()->setModified(); m_ctrlMode = ModeDraw; m_drawButton->setChecked( true ); update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } } @@ -4130,9 +4130,9 @@ void PianoRoll::deleteSelectedNotes() if( update_after_delete == true ) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); - engine::songEditor()->update(); + Engine::songEditor()->update(); } } @@ -4163,8 +4163,8 @@ void PianoRoll::autoScroll( const MidiTime & _t ) void PianoRoll::updatePosition( const MidiTime & _t ) { - if( ( engine::getSong()->isPlaying() && - engine::getSong()->playMode() == + if( ( Engine::getSong()->isPlaying() && + Engine::getSong()->playMode() == Song::Mode_PlayPattern && m_timeLine->autoScroll() == timeLine::AutoScrollEnabled ) || m_scrollBack == true ) @@ -4178,7 +4178,7 @@ void PianoRoll::updatePosition( const MidiTime & _t ) void PianoRoll::updatePositionAccompany( const MidiTime & _t ) { - Song * s = engine::getSong(); + Song * s = Engine::getSong(); if( m_recording && hasValidPattern() && s->playMode() != Song::Mode_PlayPattern ) diff --git a/src/gui/PianoView.cpp b/src/gui/PianoView.cpp index c0a90a438..9e846d61f 100644 --- a/src/gui/PianoView.cpp +++ b/src/gui/PianoView.cpp @@ -47,7 +47,7 @@ #include "PianoView.h" #include "caption_menu.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "InstrumentTrack.h" #include "knob.h" diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index 194b2ed0d..c19d1883b 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -110,9 +110,9 @@ SongEditor::SongEditor( Song * _song ) : // add some essential widgets to global tool-bar - QWidget * tb = engine::mainWindow()->toolBar(); + QWidget * tb = Engine::mainWindow()->toolBar(); - engine::mainWindow()->addSpacingToToolBar( 10 ); + Engine::mainWindow()->addSpacingToToolBar( 10 ); m_tempoSpinBox = new LcdSpinBox( 3, tb, tr( "Tempo" ) ); m_tempoSpinBox->setModel( &m_song->m_tempoModel ); @@ -127,7 +127,7 @@ SongEditor::SongEditor( Song * _song ) : "should be played within a minute (or how many measures " "should be played within four minutes)." ) ); - int tempoSpinBoxCol = engine::mainWindow()->addWidgetToToolBar( m_tempoSpinBox, 0 ); + int tempoSpinBoxCol = Engine::mainWindow()->addWidgetToToolBar( m_tempoSpinBox, 0 ); #if 0 toolButton * hq_btn = new toolButton( embed::getIconPixmap( "hq_mode" ), @@ -140,15 +140,15 @@ SongEditor::SongEditor( Song * _song ) : engine::mainWindow()->addWidgetToToolBar( hq_btn, 1, col ); #endif - engine::mainWindow()->addWidgetToToolBar( new TimeDisplayWidget, 1, tempoSpinBoxCol ); + Engine::mainWindow()->addWidgetToToolBar( new TimeDisplayWidget, 1, tempoSpinBoxCol ); - engine::mainWindow()->addSpacingToToolBar( 10 ); + Engine::mainWindow()->addSpacingToToolBar( 10 ); m_timeSigDisplay = new MeterDialog( this, true ); m_timeSigDisplay->setModel( &m_song->m_timeSigModel ); - engine::mainWindow()->addWidgetToToolBar( m_timeSigDisplay ); + Engine::mainWindow()->addWidgetToToolBar( m_timeSigDisplay ); - engine::mainWindow()->addSpacingToToolBar( 10 ); + Engine::mainWindow()->addSpacingToToolBar( 10 ); QLabel * master_vol_lbl = new QLabel( tb ); @@ -177,11 +177,11 @@ SongEditor::SongEditor( Song * _song ) : m_mvsStatus->setTitle( tr( "Master volume" ) ); m_mvsStatus->setPixmap( embed::getIconPixmap( "master_volume" ) ); - engine::mainWindow()->addWidgetToToolBar( master_vol_lbl ); - engine::mainWindow()->addWidgetToToolBar( m_masterVolumeSlider ); + Engine::mainWindow()->addWidgetToToolBar( master_vol_lbl ); + Engine::mainWindow()->addWidgetToToolBar( m_masterVolumeSlider ); - engine::mainWindow()->addSpacingToToolBar( 10 ); + Engine::mainWindow()->addSpacingToToolBar( 10 ); QLabel * master_pitch_lbl = new QLabel( tb ); @@ -209,10 +209,10 @@ SongEditor::SongEditor( Song * _song ) : m_mpsStatus->setTitle( tr( "Master pitch" ) ); m_mpsStatus->setPixmap( embed::getIconPixmap( "master_pitch" ) ); - engine::mainWindow()->addWidgetToToolBar( master_pitch_lbl ); - engine::mainWindow()->addWidgetToToolBar( m_masterPitchSlider ); + Engine::mainWindow()->addWidgetToToolBar( master_pitch_lbl ); + Engine::mainWindow()->addWidgetToToolBar( m_masterPitchSlider ); - engine::mainWindow()->addSpacingToToolBar( 10 ); + Engine::mainWindow()->addSpacingToToolBar( 10 ); // create widget for visualization- and cpu-load-widget QWidget * vc_w = new QWidget( tb ); @@ -227,7 +227,7 @@ SongEditor::SongEditor( Song * _song ) : vcw_layout->addWidget( new cpuloadWidget( vc_w ) ); vcw_layout->addStretch(); - engine::mainWindow()->addWidgetToToolBar( vc_w ); + Engine::mainWindow()->addWidgetToToolBar( vc_w ); // create own toolbar @@ -269,7 +269,7 @@ SongEditor::SongEditor( Song * _song ) : m_recordButton->setDisabled( true ); // disable record buttons if capturing is not supported - if( !engine::mixer()->audioDev()->supportsCapture() ) + if( !Engine::mixer()->audioDev()->supportsCapture() ) { m_recordButton->setDisabled( true ); m_recordAccompanyButton->setDisabled( true ); @@ -390,7 +390,7 @@ SongEditor::SongEditor( Song * _song ) : this, SLOT( updateScrollBar( int ) ) ); - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false ); parentWidget()->resize( 600, 300 ); parentWidget()->move( 5, 5 ); @@ -409,7 +409,7 @@ SongEditor::~SongEditor() void SongEditor::setHighQuality( bool _hq ) { - engine::mixer()->changeQuality( Mixer::qualitySettings( + Engine::mixer()->changeQuality( Mixer::qualitySettings( _hq ? Mixer::qualitySettings::Mode_HighQuality : Mixer::qualitySettings::Mode_Draft ) ); } @@ -443,13 +443,13 @@ void SongEditor::setPauseIcon( bool pause ) void SongEditor::play() { - if( engine::getSong()->playMode() != Song::Mode_PlaySong ) + if( Engine::getSong()->playMode() != Song::Mode_PlaySong ) { - engine::getSong()->playSong(); + Engine::getSong()->playSong(); } else { - engine::getSong()->togglePause(); + Engine::getSong()->togglePause(); } } @@ -475,7 +475,7 @@ void SongEditor::recordAccompany() void SongEditor::stop() { m_song->stop(); - engine::pianoRoll()->stopRecording(); + Engine::pianoRoll()->stopRecording(); } @@ -484,13 +484,13 @@ void SongEditor::stop() void SongEditor::keyPressEvent( QKeyEvent * _ke ) { if( /*_ke->modifiers() & Qt::ShiftModifier*/ - engine::mainWindow()->isShiftPressed() == true && + Engine::mainWindow()->isShiftPressed() == true && _ke->key() == Qt::Key_Insert ) { m_song->insertBar(); } else if(/* _ke->modifiers() & Qt::ShiftModifier &&*/ - engine::mainWindow()->isShiftPressed() == true && + Engine::mainWindow()->isShiftPressed() == true && _ke->key() == Qt::Key_Delete ) { m_song->removeBar(); @@ -537,7 +537,7 @@ void SongEditor::keyPressEvent( QKeyEvent * _ke ) void SongEditor::wheelEvent( QWheelEvent * _we ) { - if( engine::mainWindow()->isCtrlPressed() == true ) + if( Engine::mainWindow()->isCtrlPressed() == true ) { if( _we->delta() > 0 ) { @@ -561,7 +561,7 @@ void SongEditor::wheelEvent( QWheelEvent * _we ) // and make sure, all TCO's are resized and relocated realignTracks(); } - else if( engine::mainWindow()->isShiftPressed() == true ) + else if( Engine::mainWindow()->isShiftPressed() == true ) { m_leftRightScroll->setValue( m_leftRightScroll->value() - _we->delta() / 30 ); @@ -587,7 +587,7 @@ void SongEditor::masterVolumeChanged( int _new_val ) QPoint( m_masterVolumeSlider->width() + 2, -2 ) ); m_mvsStatus->setVisibilityTimeOut( 1000 ); } - engine::mixer()->setMasterGain( _new_val / 100.0f ); + Engine::mixer()->setMasterGain( _new_val / 100.0f ); } @@ -777,7 +777,7 @@ void SongEditor::adjustUiAfterProjectLoad() // make sure to bring us to front as the song editor is the central // widget in a song and when just opening a song in order to listen to // it, it's very annyoing to manually bring up the song editor each time - engine::mainWindow()->workspace()->setActiveSubWindow( + Engine::mainWindow()->workspace()->setActiveSubWindow( qobject_cast( parentWidget() ) ); } scrolled( 0 ); diff --git a/src/gui/ToolPluginView.cpp b/src/gui/ToolPluginView.cpp index 2c0d6f1fe..72953c82c 100644 --- a/src/gui/ToolPluginView.cpp +++ b/src/gui/ToolPluginView.cpp @@ -30,14 +30,14 @@ #include #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" ToolPluginView::ToolPluginView( ToolPlugin * _toolPlugin ) : PluginView( _toolPlugin, NULL ) { - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false ); setWindowTitle( _toolPlugin->displayName() ); diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index 79a36aa5e..13b585106 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -81,7 +81,7 @@ TrackContainerView::TrackContainerView( TrackContainer * _tc ) : setAcceptDrops( true ); - connect( engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), + connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), this, SLOT( realignTracks() ) ); connect( m_tc, SIGNAL( trackAdded( Track * ) ), this, SLOT( createTrackView( Track * ) ), @@ -145,9 +145,9 @@ void TrackContainerView::removeTrackView( trackView * _tv ) m_scrollLayout->removeWidget( _tv ); realignTracks(); - if( engine::getSong() ) + if( Engine::getSong() ) { - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } } @@ -336,7 +336,7 @@ void TrackContainerView::dropEvent( QDropEvent * _de ) Track::create( Track::InstrumentTrack, m_tc ) ); Instrument * i = it->loadInstrument( - engine::pluginFileHandling()[FileItem::extension( + Engine::pluginFileHandling()[FileItem::extension( value )]); i->loadFile( value ); //it->toggledInstrumentTrackButton( true ); diff --git a/src/gui/about_dialog.cpp b/src/gui/about_dialog.cpp index 9eee88cc8..f482f49ee 100644 --- a/src/gui/about_dialog.cpp +++ b/src/gui/about_dialog.cpp @@ -26,14 +26,14 @@ #include "lmmsversion.h" #include "about_dialog.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" #include "versioninfo.h" aboutDialog::aboutDialog() : - QDialog( engine::mainWindow() ), + QDialog( Engine::mainWindow() ), Ui::AboutDialog() { setupUi( this ); diff --git a/src/gui/bb_editor.cpp b/src/gui/bb_editor.cpp index de32e07c2..3aa0365f3 100644 --- a/src/gui/bb_editor.cpp +++ b/src/gui/bb_editor.cpp @@ -93,7 +93,7 @@ bbEditor::bbEditor( BBTrackContainer* tc ) : toolButton * add_bb_track = new toolButton( embed::getIconPixmap( "add_bb_track" ), tr( "Add beat/bassline" ), - engine::getSong(), SLOT( addBBTrack() ), + Engine::getSong(), SLOT( addBBTrack() ), m_toolBar ); toolButton * add_automation_track = new toolButton( @@ -138,7 +138,7 @@ bbEditor::bbEditor( BBTrackContainer* tc ) : tb_layout->addWidget( add_bar ); tb_layout->addSpacing( 15 ); - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false ); parentWidget()->layout()->setSizeConstraint( QLayout::SetMinimumSize ); parentWidget()->resize( minimumWidth(), 300 ); @@ -209,13 +209,13 @@ void bbEditor::setPauseIcon( bool pause ) void bbEditor::play() { - if( engine::getSong()->playMode() != Song::Mode_PlayBB ) + if( Engine::getSong()->playMode() != Song::Mode_PlayBB ) { - engine::getSong()->playBB(); + Engine::getSong()->playBB(); } else { - engine::getSong()->togglePause(); + Engine::getSong()->togglePause(); } } @@ -224,7 +224,7 @@ void bbEditor::play() void bbEditor::stop() { - engine::getSong()->stop(); + Engine::getSong()->stop(); } @@ -287,7 +287,7 @@ void bbEditor::keyPressEvent( QKeyEvent * _ke ) { if ( _ke->key() == Qt::Key_Space ) { - if( engine::getSong()->isPlaying() ) + if( Engine::getSong()->isPlaying() ) { stop(); } diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index 9ccd6e30f..931529944 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -28,7 +28,7 @@ #include "export_project_dialog.h" #include "Song.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" #include "BBTrackContainer.h" #include "bb_track.h" @@ -196,7 +196,7 @@ void exportProjectDialog::multiRender() int x = 1; - const TrackContainer::TrackList & tl = engine::getSong()->tracks(); + const TrackContainer::TrackList & tl = Engine::getSong()->tracks(); // Check for all unmuted tracks. Remember list. for( TrackContainer::TrackList::ConstIterator it = tl.begin(); @@ -223,7 +223,7 @@ void exportProjectDialog::multiRender() } - const TrackContainer::TrackList t2 = engine::getBBTrackContainer()->tracks(); + const TrackContainer::TrackList t2 = Engine::getBBTrackContainer()->tracks(); for( TrackContainer::TrackList::ConstIterator it = t2.begin(); it != t2.end(); ++it ) { Track* tk = (*it); @@ -259,7 +259,7 @@ ProjectRenderer* exportProjectDialog::prepRender() bitrateCB->currentText().section(" ", 0, 0).toUInt(), static_cast( depthCB->currentIndex() ) ); - engine::getSong()->setExportLoop( exportLoopCB->isChecked() ); + Engine::getSong()->setExportLoop( exportLoopCB->isChecked() ); ProjectRenderer* renderer = new ProjectRenderer( qs, os, m_ft, m_fileName ); @@ -278,7 +278,7 @@ void exportProjectDialog::render( ProjectRenderer* renderer ) connect( renderer, SIGNAL( progressChanged( int ) ), progressBar, SLOT( setValue( int ) ) ); connect( renderer, SIGNAL( progressChanged( int ) ), this, SLOT( updateTitleBar( int ) )) ; connect( renderer, SIGNAL( finished() ), this, SLOT( accept() ) ); - connect( renderer, SIGNAL( finished() ), engine::mainWindow(), SLOT( resetWindowTitle() ) ); + connect( renderer, SIGNAL( finished() ), Engine::mainWindow(), SLOT( resetWindowTitle() ) ); renderer->startProcessing(); } @@ -337,7 +337,7 @@ void exportProjectDialog::startBtnClicked() void exportProjectDialog::updateTitleBar( int _prog ) { - engine::mainWindow()->setWindowTitle( + Engine::mainWindow()->setWindowTitle( tr( "Rendering: %1%" ).arg( _prog ) ); } diff --git a/src/gui/setup_dialog.cpp b/src/gui/setup_dialog.cpp index e120094a9..3fd6b8750 100644 --- a/src/gui/setup_dialog.cpp +++ b/src/gui/setup_dialog.cpp @@ -40,7 +40,7 @@ #include "ProjectJournal.h" #include "ConfigManager.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "debug.h" #include "tooltip.h" #include "led_checkbox.h" @@ -129,7 +129,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : setWindowTitle( tr( "Setup LMMS" ) ); setModal( true ); - engine::projectJournal()->setJournalling( false ); + Engine::projectJournal()->setJournalling( false ); QVBoxLayout * vlayout = new QVBoxLayout( this ); vlayout->setSpacing( 0 ); @@ -631,8 +631,8 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : m_audioInterfaces->addItem( it.key() ); } m_audioInterfaces->setCurrentIndex( m_audioInterfaces->findText( - tr( engine::mixer()->audioDevName().toLatin1() ) ) ); - m_audioIfaceSetupWidgets[engine::mixer()->audioDevName()]->show(); + tr( Engine::mixer()->audioDevName().toLatin1() ) ) ); + m_audioIfaceSetupWidgets[Engine::mixer()->audioDevName()]->show(); connect( m_audioInterfaces, SIGNAL( activated( const QString & ) ), this, SLOT( audioInterfaceChanged( const QString & ) ) ); @@ -712,8 +712,8 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : } m_midiInterfaces->setCurrentIndex( m_midiInterfaces->findText( - tr( engine::mixer()->midiClientName().toLatin1() ) ) ); - m_midiIfaceSetupWidgets[engine::mixer()->midiClientName()]->show(); + tr( Engine::mixer()->midiClientName().toLatin1() ) ) ); + m_midiIfaceSetupWidgets[Engine::mixer()->midiClientName()]->show(); connect( m_midiInterfaces, SIGNAL( activated( const QString & ) ), this, SLOT( midiInterfaceChanged( const QString & ) ) ); @@ -784,7 +784,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : setupDialog::~setupDialog() { - engine::projectJournal()->setJournalling( true ); + Engine::projectJournal()->setJournalling( true ); } @@ -896,7 +896,7 @@ void setupDialog::setBufferSize( int _value ) m_bufSizeLbl->setText( tr( "Frames: %1\nLatency: %2 ms" ).arg( m_bufferSize ).arg( 1000.0f * m_bufferSize / - engine::mixer()->processingSampleRate(), + Engine::mixer()->processingSampleRate(), 0, 'f', 1 ) ); } diff --git a/src/gui/string_pair_drag.cpp b/src/gui/string_pair_drag.cpp index 251c1f0b3..d1f84efb6 100644 --- a/src/gui/string_pair_drag.cpp +++ b/src/gui/string_pair_drag.cpp @@ -31,7 +31,7 @@ #include "string_pair_drag.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" @@ -64,9 +64,9 @@ stringPairDrag::~stringPairDrag() { // during a drag, we might have lost key-press-events, so reset // modifiers of main-win - if( engine::mainWindow() ) + if( Engine::mainWindow() ) { - engine::mainWindow()->clearKeyModifiers(); + Engine::mainWindow()->clearKeyModifiers(); } } diff --git a/src/gui/widgets/ControllerRackView.cpp b/src/gui/widgets/ControllerRackView.cpp index 906fe7e48..945c0f65a 100644 --- a/src/gui/widgets/ControllerRackView.cpp +++ b/src/gui/widgets/ControllerRackView.cpp @@ -66,7 +66,7 @@ ControllerRackView::ControllerRackView( ) : connect( m_addButton, SIGNAL( clicked() ), this, SLOT( addController() ) ); - connect( engine::getSong(), SIGNAL( dataChanged() ), + connect( Engine::getSong(), SIGNAL( dataChanged() ), this, SLOT( update() ) ); QVBoxLayout * layout = new QVBoxLayout(); @@ -75,7 +75,7 @@ ControllerRackView::ControllerRackView( ) : this->setLayout( layout ); QMdiSubWindow * subWin = - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); // No maximize button Qt::WindowFlags flags = subWin->windowFlags(); @@ -148,7 +148,7 @@ void ControllerRackView::deleteController( ControllerView * _view ) void ControllerRackView::update() { QWidget * w = m_scrollArea->widget(); - Song * s = engine::getSong(); + Song * s = Engine::getSong(); setUpdatesEnabled( false ); @@ -184,7 +184,7 @@ void ControllerRackView::addController() { // TODO: Eventually let the user pick from available controller types - engine::getSong()->addController( new LfoController( engine::getSong() ) ); + Engine::getSong()->addController( new LfoController( Engine::getSong() ) ); update(); // fix bug which always made ControllerRackView loose focus when adding diff --git a/src/gui/widgets/ControllerView.cpp b/src/gui/widgets/ControllerView.cpp index 3d0185ab4..6dc281935 100644 --- a/src/gui/widgets/ControllerView.cpp +++ b/src/gui/widgets/ControllerView.cpp @@ -38,7 +38,7 @@ #include "ControllerDialog.h" #include "gui_templates.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "led_checkbox.h" #include "MainWindow.h" #include "tooltip.h" @@ -62,9 +62,9 @@ ControllerView::ControllerView( Controller * _model, QWidget * _parent ) : connect( ctls_btn, SIGNAL( clicked() ), this, SLOT( editControls() ) ); - m_controllerDlg = getController()->createDialog( engine::mainWindow()->workspace() ); + m_controllerDlg = getController()->createDialog( Engine::mainWindow()->workspace() ); - m_subWindow = engine::mainWindow()->workspace()->addSubWindow( + m_subWindow = Engine::mainWindow()->workspace()->addSubWindow( m_controllerDlg ); Qt::WindowFlags flags = m_subWindow->windowFlags(); diff --git a/src/gui/widgets/EffectView.cpp b/src/gui/widgets/EffectView.cpp index 3ecb785c3..0036667e6 100644 --- a/src/gui/widgets/EffectView.cpp +++ b/src/gui/widgets/EffectView.cpp @@ -36,7 +36,7 @@ #include "EffectControls.h" #include "EffectControlDialog.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "knob.h" #include "led_checkbox.h" @@ -109,7 +109,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : m_controlView = effect()->controls()->createView(); if( m_controlView ) { - m_subWindow = engine::mainWindow()->workspace()->addSubWindow( + m_subWindow = Engine::mainWindow()->workspace()->addSubWindow( m_controlView, Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint ); diff --git a/src/gui/widgets/EnvelopeAndLfoView.cpp b/src/gui/widgets/EnvelopeAndLfoView.cpp index 3de7751db..44cbf2fbb 100644 --- a/src/gui/widgets/EnvelopeAndLfoView.cpp +++ b/src/gui/widgets/EnvelopeAndLfoView.cpp @@ -29,7 +29,7 @@ #include "EnvelopeAndLfoView.h" #include "EnvelopeAndLfoParameters.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "knob.h" #include "led_checkbox.h" @@ -491,7 +491,7 @@ void EnvelopeAndLfoView::paintEvent( QPaintEvent * ) int graph_y_base = LFO_GRAPH_Y + 3 + LFO_GRAPH_H / 2; const float frames_for_graph = SECS_PER_LFO_OSCILLATION * - engine::mixer()->baseSampleRate() / 10; + Engine::mixer()->baseSampleRate() / 10; const float lfo_gray_amount = 1.0f - fabsf( m_lfoAmountKnob->value() ); p.setPen( QPen( QColor( static_cast( 96 * lfo_gray_amount ), diff --git a/src/gui/widgets/FxLine.cpp b/src/gui/widgets/FxLine.cpp index b97e551d7..0304d3d8e 100644 --- a/src/gui/widgets/FxLine.cpp +++ b/src/gui/widgets/FxLine.cpp @@ -34,7 +34,7 @@ #include "FxMixer.h" #include "FxMixerView.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "SendButtonIndicator.h" #include "gui_templates.h" #include "caption_menu.h" @@ -154,7 +154,7 @@ void FxLine::drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, void FxLine::paintEvent( QPaintEvent * ) { - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); bool sendToThis = mix->channelSendModel( m_mv->currentFxLine()->m_channelIndex, m_channelIndex ) != NULL; bool receiveFromThis = mix->channelSendModel( @@ -182,7 +182,7 @@ void FxLine::mouseDoubleClickEvent( QMouseEvent * ) void FxLine::contextMenuEvent( QContextMenuEvent * ) { - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); QPointer contextMenu = new captionMenu( mix->effectChannel( m_channelIndex )->m_name, this ); if( m_channelIndex != 0 ) // no move-options in master { @@ -208,7 +208,7 @@ void FxLine::contextMenuEvent( QContextMenuEvent * ) void FxLine::renameChannel() { bool ok; - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); QString new_name = QInputDialog::getText( this, FxMixerView::tr( "Rename FX channel" ), FxMixerView::tr( "Enter the new name for this " @@ -224,21 +224,21 @@ void FxLine::renameChannel() void FxLine::removeChannel() { - FxMixerView * mix = engine::fxMixerView(); + FxMixerView * mix = Engine::fxMixerView(); mix->deleteChannel( m_channelIndex ); } void FxLine::moveChannelLeft() { - FxMixerView * mix = engine::fxMixerView(); + FxMixerView * mix = Engine::fxMixerView(); mix->moveChannelLeft( m_channelIndex ); } void FxLine::moveChannelRight() { - FxMixerView * mix = engine::fxMixerView(); + FxMixerView * mix = Engine::fxMixerView(); mix->moveChannelRight( m_channelIndex ); } diff --git a/src/gui/widgets/InstrumentFunctionViews.cpp b/src/gui/widgets/InstrumentFunctionViews.cpp index 192ab5b22..c93e4160c 100644 --- a/src/gui/widgets/InstrumentFunctionViews.cpp +++ b/src/gui/widgets/InstrumentFunctionViews.cpp @@ -29,7 +29,7 @@ #include "InstrumentFunctionViews.h" #include "combobox.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "group_box.h" #include "gui_templates.h" #include "knob.h" diff --git a/src/gui/widgets/InstrumentMidiIOView.cpp b/src/gui/widgets/InstrumentMidiIOView.cpp index 80f2a881a..c741b4751 100644 --- a/src/gui/widgets/InstrumentMidiIOView.cpp +++ b/src/gui/widgets/InstrumentMidiIOView.cpp @@ -29,7 +29,7 @@ #include "InstrumentMidiIOView.h" #include "MidiPortMenu.h" -#include "engine.h" +#include "Engine.h" #include "embed.h" #include "group_box.h" #include "gui_templates.h" @@ -117,7 +117,7 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ), m_fixedOutputNoteSpinBox, SLOT( setEnabled( bool ) ) ); - if( !engine::mixer()->midiClient()->isRaw() ) + if( !Engine::mixer()->midiClient()->isRaw() ) { m_rpBtn = new QToolButton; m_rpBtn->setMinimumSize( 32, 32 ); diff --git a/src/gui/widgets/LcdSpinBox.cpp b/src/gui/widgets/LcdSpinBox.cpp index 8fedbfd2d..4d0eec342 100644 --- a/src/gui/widgets/LcdSpinBox.cpp +++ b/src/gui/widgets/LcdSpinBox.cpp @@ -33,7 +33,7 @@ #include "LcdSpinBox.h" #include "caption_menu.h" -#include "engine.h" +#include "Engine.h" #include "embed.h" #include "gui_templates.h" #include "templates.h" @@ -126,7 +126,7 @@ void LcdSpinBox::mouseMoveEvent( QMouseEvent* event ) if( m_mouseMoving ) { int dy = event->globalY() - m_origMousePos.y(); - if( engine::mainWindow()->isShiftPressed() ) + if( Engine::mainWindow()->isShiftPressed() ) dy = qBound( -4, dy/4, 4 ); if( dy > 1 || dy < -1 ) { diff --git a/src/gui/widgets/LcdWidget.cpp b/src/gui/widgets/LcdWidget.cpp index 67f04d3f3..eab4870f3 100644 --- a/src/gui/widgets/LcdWidget.cpp +++ b/src/gui/widgets/LcdWidget.cpp @@ -33,7 +33,7 @@ #include #include "LcdWidget.h" -#include "engine.h" +#include "Engine.h" #include "embed.h" #include "gui_templates.h" #include "MainWindow.h" diff --git a/src/gui/widgets/SendButtonIndicator.cpp b/src/gui/widgets/SendButtonIndicator.cpp index e77c0e965..5ac55b761 100644 --- a/src/gui/widgets/SendButtonIndicator.cpp +++ b/src/gui/widgets/SendButtonIndicator.cpp @@ -1,6 +1,6 @@ #include "SendButtonIndicator.h" -#include "engine.h" +#include "Engine.h" #include "FxMixer.h" #include "Model.h" @@ -31,7 +31,7 @@ SendButtonIndicator:: SendButtonIndicator( QWidget * _parent, FxLine * _owner, void SendButtonIndicator::mousePressEvent( QMouseEvent * e ) { - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); int from = m_mv->currentFxLine()->channelIndex(); int to = m_parent->channelIndex(); FloatModel * sendModel = mix->channelSendModel(from, to); @@ -52,7 +52,7 @@ void SendButtonIndicator::mousePressEvent( QMouseEvent * e ) FloatModel * SendButtonIndicator::getSendModel() { - FxMixer * mix = engine::fxMixer(); + FxMixer * mix = Engine::fxMixer(); return mix->channelSendModel( m_mv->currentFxLine()->channelIndex(), m_parent->channelIndex()); } diff --git a/src/gui/widgets/TimeDisplayWidget.cpp b/src/gui/widgets/TimeDisplayWidget.cpp index 66c243bc9..93375f0b9 100644 --- a/src/gui/widgets/TimeDisplayWidget.cpp +++ b/src/gui/widgets/TimeDisplayWidget.cpp @@ -26,7 +26,7 @@ #include "TimeDisplayWidget.h" #include "MainWindow.h" -#include "engine.h" +#include "Engine.h" #include "tooltip.h" #include "Song.h" @@ -53,7 +53,7 @@ TimeDisplayWidget::TimeDisplayWidget() : // update labels of LCD spinboxes setDisplayMode( m_displayMode ); - connect( engine::mainWindow(), SIGNAL( periodicUpdate() ), + connect( Engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( updateTime() ) ); } @@ -95,7 +95,7 @@ void TimeDisplayWidget::setDisplayMode( DisplayMode displayMode ) void TimeDisplayWidget::updateTime() { - Song* s = engine::getSong(); + Song* s = Engine::getSong(); switch( m_displayMode ) { diff --git a/src/gui/widgets/automatable_button.cpp b/src/gui/widgets/automatable_button.cpp index acc8bc81b..9c1e11328 100644 --- a/src/gui/widgets/automatable_button.cpp +++ b/src/gui/widgets/automatable_button.cpp @@ -29,7 +29,7 @@ #include #include "caption_menu.h" -#include "engine.h" +#include "Engine.h" #include "embed.h" #include "MainWindow.h" #include "string_pair_drag.h" diff --git a/src/gui/widgets/automatable_slider.cpp b/src/gui/widgets/automatable_slider.cpp index 610ee2009..b604ce757 100644 --- a/src/gui/widgets/automatable_slider.cpp +++ b/src/gui/widgets/automatable_slider.cpp @@ -30,7 +30,7 @@ #include "caption_menu.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" diff --git a/src/gui/widgets/combobox.cpp b/src/gui/widgets/combobox.cpp index 2082284af..8e857eb0f 100644 --- a/src/gui/widgets/combobox.cpp +++ b/src/gui/widgets/combobox.cpp @@ -35,7 +35,7 @@ #include #include "caption_menu.h" -#include "engine.h" +#include "Engine.h" #include "embed.h" #include "gui_templates.h" #include "MainWindow.h" diff --git a/src/gui/widgets/cpuload_widget.cpp b/src/gui/widgets/cpuload_widget.cpp index f81d227ca..522c9e5b8 100644 --- a/src/gui/widgets/cpuload_widget.cpp +++ b/src/gui/widgets/cpuload_widget.cpp @@ -28,7 +28,7 @@ #include "cpuload_widget.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "Mixer.h" @@ -92,7 +92,7 @@ void cpuloadWidget::paintEvent( QPaintEvent * ) void cpuloadWidget::updateCpuLoad() { // smooth load-values a bit - int new_load = ( m_currentLoad + engine::mixer()->cpuLoad() ) / 2; + int new_load = ( m_currentLoad + Engine::mixer()->cpuLoad() ) / 2; if( new_load != m_currentLoad ) { m_currentLoad = new_load; diff --git a/src/gui/widgets/fader.cpp b/src/gui/widgets/fader.cpp index 08ddbccef..38d6fcbe8 100644 --- a/src/gui/widgets/fader.cpp +++ b/src/gui/widgets/fader.cpp @@ -52,7 +52,7 @@ #include "fader.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "caption_menu.h" #include "ConfigManager.h" #include "text_float.h" diff --git a/src/gui/widgets/graph.cpp b/src/gui/widgets/graph.cpp index 7d8052f54..fcab26f1c 100644 --- a/src/gui/widgets/graph.cpp +++ b/src/gui/widgets/graph.cpp @@ -31,7 +31,7 @@ #include "string_pair_drag.h" #include "SampleBuffer.h" #include "Oscillator.h" -#include "engine.h" +#include "Engine.h" graph::graph( QWidget * _parent, graphStyle _style, int _width, diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp index 4302fb099..941a77f13 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/knob.cpp @@ -41,7 +41,7 @@ #include "ConfigManager.h" #include "ControllerConnection.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "MainWindow.h" #include "ProjectJournal.h" @@ -462,7 +462,7 @@ float knob::getValue( const QPoint & _p ) value = ( ( _p.y() + _p.y() * qMin( qAbs( _p.y() / 2.5f ), 6.0f ) ) ) / 12.0f; // if shift pressed we want slower movement - if( engine::mainWindow()->isShiftPressed() ) + if( Engine::mainWindow()->isShiftPressed() ) { value /= 4.0f; value = qBound( -4.0f, value, 4.0f ); @@ -520,7 +520,7 @@ void knob::dropEvent( QDropEvent * _de ) else if( type == "automatable_model" ) { AutomatableModel * mod = dynamic_cast( - engine::projectJournal()-> + Engine::projectJournal()-> journallingObject( val.toInt() ) ); if( mod != NULL ) { @@ -561,7 +561,7 @@ void knob::mousePressEvent( QMouseEvent * _me ) m_buttonPressed = true; } else if( _me->button() == Qt::LeftButton && - engine::mainWindow()->isShiftPressed() == true ) + Engine::mainWindow()->isShiftPressed() == true ) { new stringPairDrag( "float_value", QString::number( model()->value() ), diff --git a/src/gui/widgets/project_notes.cpp b/src/gui/widgets/project_notes.cpp index 81383ad4c..e94b0f549 100644 --- a/src/gui/widgets/project_notes.cpp +++ b/src/gui/widgets/project_notes.cpp @@ -38,14 +38,14 @@ #include #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "MainWindow.h" #include "Song.h" projectNotes::projectNotes() : - QMainWindow( engine::mainWindow()->workspace() ) + QMainWindow( Engine::mainWindow()->workspace() ) { m_edit = new QTextEdit( this ); m_edit->setAutoFillBackground( true ); @@ -62,7 +62,7 @@ projectNotes::projectNotes() : // connect( m_edit, SIGNAL( currentAlignmentChanged( int ) ), // this, SLOT( alignmentChanged( int ) ) ); connect( m_edit, SIGNAL( textChanged() ), - engine::getSong(), SLOT( setModified() ) ); + Engine::getSong(), SLOT( setModified() ) ); setupActions(); @@ -70,7 +70,7 @@ projectNotes::projectNotes() : setWindowTitle( tr( "Project notes" ) ); setWindowIcon( embed::getIconPixmap( "project_notes" ) ); - engine::mainWindow()->workspace()->addSubWindow( this ); + Engine::mainWindow()->workspace()->addSubWindow( this ); parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false ); parentWidget()->move( 700, 10 ); parentWidget()->resize( 400, 300 ); @@ -250,7 +250,7 @@ void projectNotes::textBold() { m_edit->setFontWeight( m_actionTextBold->isChecked() ? QFont::Bold : QFont::Normal ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -259,7 +259,7 @@ void projectNotes::textBold() void projectNotes::textUnderline() { m_edit->setFontUnderline( m_actionTextUnderline->isChecked() ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -268,7 +268,7 @@ void projectNotes::textUnderline() void projectNotes::textItalic() { m_edit->setFontItalic( m_actionTextItalic->isChecked() ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -278,7 +278,7 @@ void projectNotes::textFamily( const QString & _f ) { m_edit->setFontFamily( _f ); m_edit->viewport()->setFocus(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -288,7 +288,7 @@ void projectNotes::textSize( const QString & _p ) { m_edit->setFontPointSize( _p.toInt() ); m_edit->viewport()->setFocus(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -346,7 +346,7 @@ void projectNotes::formatChanged( const QTextCharFormat & _f ) pix.fill( _f.foreground().color() ); m_actionTextColor->setIcon( pix ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -370,7 +370,7 @@ void projectNotes::alignmentChanged( int _a ) { m_actionAlignJustify->setChecked( true ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } diff --git a/src/gui/widgets/tempo_sync_knob.cpp b/src/gui/widgets/tempo_sync_knob.cpp index 94365b1e9..21149592a 100644 --- a/src/gui/widgets/tempo_sync_knob.cpp +++ b/src/gui/widgets/tempo_sync_knob.cpp @@ -27,7 +27,7 @@ #include #include "TempoSyncKnob.h" -#include "engine.h" +#include "Engine.h" #include "caption_menu.h" #include "embed.h" #include "MainWindow.h" @@ -87,7 +87,7 @@ void TempoSyncKnob::contextMenuEvent( QContextMenuEvent * ) addDefaultActions( &contextMenu ); contextMenu.addSeparator(); - float limit = 60000.0f / ( engine::getSong()->getTempo() * + float limit = 60000.0f / ( Engine::getSong()->getTempo() * model()->m_scale ); QMenu * syncMenu = contextMenu.addMenu( m_tempoSyncIcon, @@ -291,8 +291,8 @@ void TempoSyncKnob::showCustom() { if( m_custom == NULL ) { - m_custom = new MeterDialog( engine::mainWindow()->workspace() ); - engine::mainWindow()->workspace()->addSubWindow( m_custom ); + m_custom = new MeterDialog( Engine::mainWindow()->workspace() ); + Engine::mainWindow()->workspace()->addSubWindow( m_custom ); m_custom->setWindowTitle( "Meter" ); m_custom->setModel( &model()->m_custom ); } diff --git a/src/gui/widgets/text_float.cpp b/src/gui/widgets/text_float.cpp index b3775b884..cd063c580 100644 --- a/src/gui/widgets/text_float.cpp +++ b/src/gui/widgets/text_float.cpp @@ -29,12 +29,12 @@ #include "text_float.h" #include "gui_templates.h" #include "MainWindow.h" -#include "engine.h" +#include "Engine.h" textFloat::textFloat() : - QWidget( engine::mainWindow(), Qt::ToolTip ), + QWidget( Engine::mainWindow(), Qt::ToolTip ), m_title(), m_text(), m_pixmap() @@ -89,7 +89,7 @@ void textFloat::setVisibilityTimeOut( int _msecs ) textFloat * textFloat::displayMessage( const QString & _msg, int _timeout, QWidget * _parent, int _add_y_margin ) { - QWidget * mw = engine::mainWindow(); + QWidget * mw = Engine::mainWindow(); textFloat * tf = new textFloat; if( _parent != NULL ) { diff --git a/src/gui/widgets/track_label_button.cpp b/src/gui/widgets/track_label_button.cpp index 4ac33728c..53ff02bcd 100644 --- a/src/gui/widgets/track_label_button.cpp +++ b/src/gui/widgets/track_label_button.cpp @@ -34,7 +34,7 @@ #include "InstrumentTrack.h" #include "Instrument.h" #include "ConfigManager.h" -#include "engine.h" +#include "Engine.h" diff --git a/src/gui/widgets/visualization_widget.cpp b/src/gui/widgets/visualization_widget.cpp index 0d3fac3cf..c6a738b1c 100644 --- a/src/gui/widgets/visualization_widget.cpp +++ b/src/gui/widgets/visualization_widget.cpp @@ -30,7 +30,7 @@ #include "gui_templates.h" #include "MainWindow.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "tooltip.h" #include "Song.h" @@ -42,17 +42,17 @@ visualizationWidget::visualizationWidget( const QPixmap & _bg, QWidget * _p, visualizationTypes _vtype ) : QWidget( _p ), s_background( _bg ), - m_points( new QPointF[engine::mixer()->framesPerPeriod()] ), + m_points( new QPointF[Engine::mixer()->framesPerPeriod()] ), m_active( false ) { setFixedSize( s_background.width(), s_background.height() ); setAttribute( Qt::WA_OpaquePaintEvent, true ); setActive( ConfigManager::inst()->value( "ui", "displaywaveform").toInt() ); - const fpp_t frames = engine::mixer()->framesPerPeriod(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); m_buffer = new sampleFrame[frames]; - engine::mixer()->clearAudioBuffer( m_buffer, frames ); + Engine::mixer()->clearAudioBuffer( m_buffer, frames ); toolTip::add( this, tr( "click to enable/disable visualization of " @@ -73,11 +73,11 @@ visualizationWidget::~visualizationWidget() void visualizationWidget::updateAudioBuffer() { - if( !engine::getSong()->isExporting() ) + if( !Engine::getSong()->isExporting() ) { - const surroundSampleFrame * c = engine::mixer()-> + const surroundSampleFrame * c = Engine::mixer()-> currentReadBuffer(); - const fpp_t fpp = engine::mixer()->framesPerPeriod(); + const fpp_t fpp = Engine::mixer()->framesPerPeriod(); memcpy( m_buffer, c, sizeof( surroundSampleFrame ) * fpp ); } } @@ -90,19 +90,19 @@ void visualizationWidget::setActive( bool _active ) m_active = _active; if( m_active ) { - connect( engine::mainWindow(), + connect( Engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) ); - connect( engine::mixer(), + connect( Engine::mixer(), SIGNAL( nextAudioBuffer() ), this, SLOT( updateAudioBuffer() ) ); } else { - disconnect( engine::mainWindow(), + disconnect( Engine::mainWindow(), SIGNAL( periodicUpdate() ), this, SLOT( update() ) ); - disconnect( engine::mixer(), + disconnect( Engine::mixer(), SIGNAL( nextAudioBuffer() ), this, SLOT( updateAudioBuffer() ) ); // we have to update (remove last waves), @@ -120,9 +120,9 @@ void visualizationWidget::paintEvent( QPaintEvent * ) p.drawPixmap( 0, 0, s_background ); - if( m_active && !engine::getSong()->isExporting() ) + if( m_active && !Engine::getSong()->isExporting() ) { - float master_output = engine::mixer()->masterGain(); + float master_output = Engine::mixer()->masterGain(); int w = width()-4; const float half_h = -( height() - 6 ) / 3.0 * master_output - 1; int x_base = 2; @@ -132,7 +132,7 @@ void visualizationWidget::paintEvent( QPaintEvent * ) const fpp_t frames = - engine::mixer()->framesPerPeriod(); + Engine::mixer()->framesPerPeriod(); const float max_level = qMax( Mixer::peakValueLeft( m_buffer, frames ), Mixer::peakValueRight( m_buffer, frames ) ); diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index 2cf14ba4a..9d6a22e89 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -26,7 +26,7 @@ #include "AutomationTrack.h" #include "AutomationPattern.h" -#include "engine.h" +#include "Engine.h" #include "embed.h" #include "ProjectJournal.h" #include "string_pair_drag.h" @@ -67,7 +67,7 @@ bool AutomationTrack::play( const MidiTime & _start, const fpp_t _frames, else { getTCOsInRange( tcos, _start, _start + static_cast( - _frames / engine::framesPerTick()) ); + _frames / Engine::framesPerTick()) ); } for( tcoVector::iterator it = tcos.begin(); it != tcos.end(); ++it ) @@ -164,7 +164,7 @@ void AutomationTrackView::dropEvent( QDropEvent * _de ) if( type == "automatable_model" ) { AutomatableModel * mod = dynamic_cast( - engine::projectJournal()-> + Engine::projectJournal()-> journallingObject( val.toInt() ) ); if( mod != NULL ) { diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 1ac7fd15f..1fee7d06b 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -48,7 +48,7 @@ #include "EffectChain.h" #include "EffectRackView.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "FileBrowser.h" #include "FxMixer.h" #include "FxMixerView.h" @@ -95,7 +95,7 @@ const int INSTRUMENT_WINDOW_CACHE_SIZE = 8; InstrumentTrack::InstrumentTrack( TrackContainer* tc ) : Track( Track::InstrumentTrack, tc ), MidiEventProcessor(), - m_midiPort( tr( "unnamed_track" ), engine::mixer()->midiClient(), + m_midiPort( tr( "unnamed_track" ), Engine::mixer()->midiClient(), this, this ), m_notes(), m_sustainPedalPressed( false ), @@ -122,7 +122,7 @@ InstrumentTrack::InstrumentTrack( TrackContainer* tc ) : connect( &m_pitchModel, SIGNAL( dataChanged() ), this, SLOT( updatePitch() ) ); connect( &m_pitchRangeModel, SIGNAL( dataChanged() ), this, SLOT( updatePitchRange() ) ); - m_effectChannelModel.setRange( 0, engine::fxMixer()->numChannels()-1, 1); + m_effectChannelModel.setRange( 0, Engine::fxMixer()->numChannels()-1, 1); for( int i = 0; i < NumKeys; ++i ) { @@ -138,7 +138,7 @@ InstrumentTrack::InstrumentTrack( TrackContainer* tc ) : int InstrumentTrack::baseNote() const { - return m_baseNoteModel.value() - engine::getSong()->masterPitch(); + return m_baseNoteModel.value() - Engine::getSong()->masterPitch(); } @@ -260,7 +260,7 @@ void InstrumentTrack::processInEvent( const MidiEvent& event, const MidiTime& ti NULL, event.channel(), NotePlayHandle::OriginMidiInput ); m_notes[event.key()] = nph; - if( ! engine::mixer()->addPlayHandle( nph ) ) + if( ! Engine::mixer()->addPlayHandle( nph ) ) { m_notes[event.key()] = NULL; } @@ -421,7 +421,7 @@ void InstrumentTrack::silenceAllNotes( bool removeIPH ) lock(); // invalidate all NotePlayHandles linked to this track m_processHandles.clear(); - engine::mixer()->removePlayHandles( this, removeIPH ); + Engine::mixer()->removePlayHandles( this, removeIPH ); unlock(); } @@ -571,7 +571,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, { return false; } - const float frames_per_tick = engine::framesPerTick(); + const float frames_per_tick = Engine::framesPerTick(); tcoVector tcos; bbTrack * bb_track = NULL; @@ -654,7 +654,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, notePlayHandle->setSongGlobalParentOffset( p->startPosition() ); } - engine::mixer()->addPlayHandle( notePlayHandle ); + Engine::mixer()->addPlayHandle( notePlayHandle ); played_a_note = true; } ++nit; @@ -720,7 +720,7 @@ void InstrumentTrack::loadTrackSpecificSettings( const QDomElement & thisElement m_panningModel.loadSettings( thisElement, "pan" ); m_pitchRangeModel.loadSettings( thisElement, "pitchrange" ); m_pitchModel.loadSettings( thisElement, "pitch" ); - m_effectChannelModel.setRange( 0, engine::fxMixer()->numChannels()-1 ); + m_effectChannelModel.setRange( 0, Engine::fxMixer()->numChannels()-1 ); m_effectChannelModel.loadSettings( thisElement, "fxch" ); m_baseNoteModel.loadSettings( thisElement, "basenote" ); @@ -866,7 +866,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV m_midiMenu = new QMenu( tr( "MIDI" ), this ); // sequenced MIDI? - if( !engine::mixer()->midiClient()->isRaw() ) + if( !Engine::mixer()->midiClient()->isRaw() ) { _it->m_midiPort.m_readablePortsMenu = new MidiPortMenu( MidiPort::Input ); @@ -935,7 +935,7 @@ InstrumentTrackWindow * InstrumentTrackView::topLevelInstrumentTrackWindow() { InstrumentTrackWindow * w = NULL; foreach( QMdiSubWindow * sw, - engine::mainWindow()->workspace()->subWindowList( + Engine::mainWindow()->workspace()->subWindowList( QMdiArea::ActivationHistoryOrder ) ) { if( sw->isVisible() && sw->widget()->inherits( "InstrumentTrackWindow" ) ) @@ -1129,10 +1129,10 @@ class fxLineLcdSpinBox : public LcdSpinBox protected: virtual void mouseDoubleClickEvent ( QMouseEvent * _me ) { - engine::fxMixerView()->setCurrentFxLine( model()->value() ); + Engine::fxMixerView()->setCurrentFxLine( model()->value() ); - engine::fxMixerView()->show();// show fxMixer window - engine::fxMixerView()->setFocus();// set focus to fxMixer window + Engine::fxMixerView()->show();// show fxMixer window + Engine::fxMixerView()->setFocus();// set focus to fxMixer window //engine::getFxMixerView()->raise(); } }; @@ -1274,7 +1274,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : setFixedWidth( INSTRUMENT_WIDTH ); resize( sizeHint() ); - QMdiSubWindow * subWin = engine::mainWindow()->workspace()->addSubWindow( this ); + QMdiSubWindow * subWin = Engine::mainWindow()->workspace()->addSubWindow( this ); Qt::WindowFlags flags = subWin->windowFlags(); flags |= Qt::MSWindowsFixedSizeDialogHint; flags &= ~Qt::WindowMaximizeButtonHint; @@ -1300,7 +1300,7 @@ InstrumentTrackWindow::~InstrumentTrackWindow() delete m_instrumentView; - if( engine::mainWindow()->workspace() ) + if( Engine::mainWindow()->workspace() ) { parentWidget()->hide(); parentWidget()->deleteLater(); @@ -1439,7 +1439,7 @@ void InstrumentTrackWindow::updateInstrumentView() void InstrumentTrackWindow::textChanged( const QString& newName ) { m_track->setName( newName ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } @@ -1466,7 +1466,7 @@ void InstrumentTrackWindow::closeEvent( QCloseEvent* event ) { event->ignore(); - if( engine::mainWindow()->workspace() ) + if( Engine::mainWindow()->workspace() ) { parentWidget()->hide(); } @@ -1515,7 +1515,7 @@ void InstrumentTrackWindow::dropEvent( QDropEvent* event ) { m_track->loadInstrument( value ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); event->accept(); } @@ -1526,7 +1526,7 @@ void InstrumentTrackWindow::dropEvent( QDropEvent* event ) m_track->setSimpleSerializing(); m_track->loadSettings( dataFile.content().toElement() ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); event->accept(); } @@ -1537,7 +1537,7 @@ void InstrumentTrackWindow::dropEvent( QDropEvent* event ) if( !i->descriptor()->supportsFileType( ext ) ) { - i = m_track->loadInstrument( engine::pluginFileHandling()[ext] ); + i = m_track->loadInstrument( Engine::pluginFileHandling()[ext] ); } i->loadFile( value ); diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 63768df91..e43b1d1ec 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -38,7 +38,7 @@ #include "templates.h" #include "gui_templates.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "PianoRoll.h" #include "TrackContainer.h" #include "rename_dialog.h" @@ -104,7 +104,7 @@ Pattern::~Pattern() void Pattern::init() { - connect( engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), + connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), this, SLOT( changeTimeSignature() ) ); saveJournallingState( false ); @@ -170,9 +170,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::pianoRoll() ) + if( _quant_pos && Engine::pianoRoll() ) { - new_note->quantizePos( engine::pianoRoll()->quantization() ); + new_note->quantizePos( Engine::pianoRoll()->quantization() ); } instrumentTrack()->lock(); @@ -534,14 +534,14 @@ void Pattern::ensureBeatNotes() void Pattern::updateBBTrack() { - if( getTrack()->trackContainer() == engine::getBBTrackContainer() ) + if( getTrack()->trackContainer() == Engine::getBBTrackContainer() ) { - engine::getBBTrackContainer()->updateBBTrack( this ); + Engine::getBBTrackContainer()->updateBBTrack( this ); } - if( engine::pianoRoll() && engine::pianoRoll()->currentPattern() == this ) + if( Engine::pianoRoll() && Engine::pianoRoll()->currentPattern() == this ) { - engine::pianoRoll()->update(); + Engine::pianoRoll()->update(); } } @@ -607,7 +607,7 @@ PatternView::PatternView( Pattern* pattern, trackView* parent ) : m_paintPixmap(), m_needsUpdate( true ) { - connect( engine::pianoRoll(), SIGNAL( currentPatternChanged() ), + connect( Engine::pianoRoll(), SIGNAL( currentPatternChanged() ), this, SLOT( update() ) ); if( s_stepBtnOn == NULL ) @@ -668,9 +668,9 @@ void PatternView::update() void PatternView::openInPianoRoll() { - engine::pianoRoll()->setCurrentPattern( m_pat ); - engine::pianoRoll()->parentWidget()->show(); - engine::pianoRoll()->setFocus(); + Engine::pianoRoll()->setCurrentPattern( m_pat ); + Engine::pianoRoll()->parentWidget()->show(); + Engine::pianoRoll()->setFocus(); } @@ -798,12 +798,12 @@ void PatternView::mousePressEvent( QMouseEvent * _me ) } } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); - if( engine::pianoRoll()->currentPattern() == m_pat ) + if( Engine::pianoRoll()->currentPattern() == m_pat ) { - engine::pianoRoll()->update(); + Engine::pianoRoll()->update(); } } else @@ -860,11 +860,11 @@ void PatternView::wheelEvent( QWheelEvent * _we ) n->setVolume( qMax( 0, vol - 5 ) ); } - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); - if( engine::pianoRoll()->currentPattern() == m_pat ) + if( Engine::pianoRoll()->currentPattern() == m_pat ) { - engine::pianoRoll()->update(); + Engine::pianoRoll()->update(); } } _we->accept(); @@ -924,7 +924,7 @@ void PatternView::paintEvent( QPaintEvent * ) } p.setBrush( lingrad ); - if( engine::pianoRoll()->currentPattern() == m_pat && m_pat->m_patternType != Pattern::BeatPattern ) + if( Engine::pianoRoll()->currentPattern() == m_pat && m_pat->m_patternType != Pattern::BeatPattern ) p.setPen( c.lighter( 130 ) ); else p.setPen( c.darker( 300 ) ); @@ -933,7 +933,7 @@ void PatternView::paintEvent( QPaintEvent * ) p.setBrush( QBrush() ); if( m_pat->m_patternType != Pattern::BeatPattern ) { - if( engine::pianoRoll()->currentPattern() == m_pat ) + if( Engine::pianoRoll()->currentPattern() == m_pat ) p.setPen( c.lighter( 160 ) ); else p.setPen( c.lighter( 130 ) ); diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 959b02a96..802ce00a2 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -36,7 +36,7 @@ #include "SampleTrack.h" #include "Song.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "tooltip.h" #include "AudioPort.h" #include "SamplePlayHandle.h" @@ -59,7 +59,7 @@ SampleTCO::SampleTCO( Track * _track ) : // we need to receive bpm-change-events, because then we have to // change length of this TCO - connect( engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), + connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), this, SLOT( updateLength( bpm_t ) ) ); } @@ -130,7 +130,7 @@ void SampleTCO::updateLength( bpm_t ) MidiTime SampleTCO::sampleLength() const { - return (int)( m_sampleBuffer->frames() / engine::framesPerTick() ); + return (int)( m_sampleBuffer->frames() / Engine::framesPerTick() ); } @@ -291,7 +291,7 @@ void SampleTCOView::dropEvent( QDropEvent * _de ) m_tco->updateLength(); update(); _de->accept(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } else { @@ -325,7 +325,7 @@ void SampleTCOView::mouseDoubleClickEvent( QMouseEvent * ) if( af != "" && af != m_tco->m_sampleBuffer->audioFile() ) { m_tco->setSampleFile( af ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } @@ -415,7 +415,7 @@ SampleTrack::SampleTrack( TrackContainer* tc ) : SampleTrack::~SampleTrack() { - engine::mixer()->removePlayHandles( this ); + Engine::mixer()->removePlayHandles( this ); } @@ -440,7 +440,7 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames, PlayHandle* handle; if( st->isRecord() ) { - if( !engine::getSong()->isRecording() ) + if( !Engine::getSong()->isRecording() ) { return played_a_note; } @@ -457,7 +457,7 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames, // handle->setBBTrack( _tco_num ); handle->setOffset( _offset ); // send it to the mixer - engine::mixer()->addPlayHandle( handle ); + Engine::mixer()->addPlayHandle( handle ); played_a_note = true; } } @@ -553,7 +553,7 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) : m_effectRack = new EffectRackView( _t->audioPort()->effects() ); m_effectRack->setFixedSize( 240, 242 ); - m_effWindow = engine::mainWindow()->workspace()->addSubWindow( m_effectRack ); + m_effWindow = Engine::mainWindow()->workspace()->addSubWindow( m_effectRack ); m_effWindow->setAttribute( Qt::WA_DeleteOnClose, false ); m_effWindow->layout()->setSizeConstraint( QLayout::SetFixedSize ); m_effWindow->setWindowTitle( _t->name() ); diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index a55672fc7..d537cc62e 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -31,7 +31,7 @@ #include "bb_track.h" #include "BBTrackContainer.h" #include "embed.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "MainWindow.h" #include "Mixer.h" @@ -51,7 +51,7 @@ bbTCO::bbTCO( Track * _track ) : m_color( 128, 128, 128 ), m_useStyleColor( true ) { - tact_t t = engine::getBBTrackContainer()->lengthOfBB( bbTrackIndex() ); + tact_t t = Engine::getBBTrackContainer()->lengthOfBB( bbTrackIndex() ); if( t > 0 ) { saveJournallingState( false ); @@ -234,7 +234,7 @@ void bbTCOView::paintEvent( QPaintEvent * ) lingrad.setColorAt( 1, col.light( 70 ) ); p.fillRect( rect(), lingrad ); - tact_t t = engine::getBBTrackContainer()->lengthOfBB( m_bbTCO->bbTrackIndex() ); + tact_t t = Engine::getBBTrackContainer()->lengthOfBB( m_bbTCO->bbTrackIndex() ); if( m_bbTCO->length() > MidiTime::ticksPerTact() && t > 0 ) { for( int x = static_cast( t * pixelsPerTact() ); @@ -273,9 +273,9 @@ void bbTCOView::paintEvent( QPaintEvent * ) void bbTCOView::openInBBEditor() { - engine::getBBTrackContainer()->setCurrentBB( m_bbTCO->bbTrackIndex() ); + Engine::getBBTrackContainer()->setCurrentBB( m_bbTCO->bbTrackIndex() ); - engine::mainWindow()->toggleBBEditorWin( true ); + Engine::mainWindow()->toggleBBEditorWin( true ); } @@ -310,7 +310,7 @@ void bbTCOView::changeColor() if( isSelected() ) { QVector selected = - engine::songEditor()->selectedObjects(); + Engine::songEditor()->selectedObjects(); for( QVector::iterator it = selected.begin(); it != selected.end(); ++it ) @@ -335,7 +335,7 @@ void bbTCOView::resetColor() if( ! m_bbTCO->m_useStyleColor ) { m_bbTCO->m_useStyleColor = true; - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); } bbTrack::clearLastTCOColor(); @@ -349,7 +349,7 @@ void bbTCOView::setColor( QColor new_color ) { m_bbTCO->setColor( new_color ); m_bbTCO->m_useStyleColor = false; - engine::getSong()->setModified(); + Engine::getSong()->setModified(); update(); } bbTrack::setLastTCOColor( new_color ); @@ -368,11 +368,11 @@ bbTrack::bbTrack( TrackContainer* tc ) : s_infoMap[this] = bbNum; setName( tr( "Beat/Bassline %1" ).arg( bbNum ) ); - engine::getBBTrackContainer()->setCurrentBB( bbNum ); - engine::getBBTrackContainer()->updateComboBox(); + Engine::getBBTrackContainer()->setCurrentBB( bbNum ); + Engine::getBBTrackContainer()->updateComboBox(); connect( this, SIGNAL( nameChanged() ), - engine::getBBTrackContainer(), SLOT( updateComboBox() ) ); + Engine::getBBTrackContainer(), SLOT( updateComboBox() ) ); } @@ -380,10 +380,10 @@ bbTrack::bbTrack( TrackContainer* tc ) : bbTrack::~bbTrack() { - engine::mixer()->removePlayHandles( this ); + Engine::mixer()->removePlayHandles( this ); const int bb = s_infoMap[this]; - engine::getBBTrackContainer()->removeBB( bb ); + Engine::getBBTrackContainer()->removeBB( bb ); for( infoMap::iterator it = s_infoMap.begin(); it != s_infoMap.end(); ++it ) { @@ -397,7 +397,7 @@ bbTrack::~bbTrack() // remove us from TC so bbTrackContainer::numOfBBs() returns a smaller // value and thus combobox-updating in bbTrackContainer works well trackContainer()->removeTrack( this ); - engine::getBBTrackContainer()->updateComboBox(); + Engine::getBBTrackContainer()->updateComboBox(); } @@ -414,11 +414,11 @@ bool bbTrack::play( const MidiTime & _start, const fpp_t _frames, if( _tco_num >= 0 ) { - return engine::getBBTrackContainer()->play( _start, _frames, _offset, s_infoMap[this] ); + return Engine::getBBTrackContainer()->play( _start, _frames, _offset, s_infoMap[this] ); } tcoVector tcos; - getTCOsInRange( tcos, _start, _start + static_cast( _frames / engine::framesPerTick() ) ); + getTCOsInRange( tcos, _start, _start + static_cast( _frames / Engine::framesPerTick() ) ); if( tcos.size() == 0 ) { @@ -439,7 +439,7 @@ bool bbTrack::play( const MidiTime & _start, const fpp_t _frames, if( _start - lastPosition < lastLen ) { - return engine::getBBTrackContainer()->play( _start - lastPosition, _frames, _offset, s_infoMap[this] ); + return Engine::getBBTrackContainer()->play( _start - lastPosition, _frames, _offset, s_infoMap[this] ); } return false; } @@ -479,7 +479,7 @@ void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc, _this.parentNode().parentNode().nodeName() != "clone" && _this.parentNode().parentNode().nodeName() != "journaldata" ) { - ( (JournallingObject *)( engine::getBBTrackContainer() ) )-> + ( (JournallingObject *)( Engine::getBBTrackContainer() ) )-> saveState( _doc, _this ); } if( _this.parentNode().parentNode().nodeName() == "clone" ) @@ -502,9 +502,9 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) { const int src = _this.attribute( "clonebbt" ).toInt(); const int dst = s_infoMap[this]; - engine::getBBTrackContainer()->createTCOsForBB( dst ); + Engine::getBBTrackContainer()->createTCOsForBB( dst ); TrackContainer::TrackList tl = - engine::getBBTrackContainer()->tracks(); + Engine::getBBTrackContainer()->tracks(); // copy TCOs of all tracks from source BB (at bar "src") to destination // TCOs (which are created if they do not exist yet) for( TrackContainer::TrackList::iterator it = tl.begin(); @@ -522,7 +522,7 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) TrackContainer::classNodeName() ); if( node.isElement() ) { - ( (JournallingObject *)engine::getBBTrackContainer() )-> + ( (JournallingObject *)Engine::getBBTrackContainer() )-> restoreState( node.toElement() ); } } @@ -562,9 +562,9 @@ void bbTrack::swapBBTracks( Track * _track1, Track * _track2 ) if( t1 != NULL && t2 != NULL ) { qSwap( s_infoMap[t1], s_infoMap[t2] ); - engine::getBBTrackContainer()->swapBB( s_infoMap[t1], + Engine::getBBTrackContainer()->swapBB( s_infoMap[t1], s_infoMap[t2] ); - engine::getBBTrackContainer()->setCurrentBB( s_infoMap[t1] ); + Engine::getBBTrackContainer()->setCurrentBB( s_infoMap[t1] ); } } @@ -599,7 +599,7 @@ bbTrackView::bbTrackView( bbTrack * _bbt, TrackContainerView* tcv ) : bbTrackView::~bbTrackView() { - engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); + Engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); } @@ -607,7 +607,7 @@ bbTrackView::~bbTrackView() bool bbTrackView::close() { - engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); + Engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); return trackView::close(); } @@ -616,8 +616,8 @@ bool bbTrackView::close() void bbTrackView::clickedTrackLabel() { - engine::getBBTrackContainer()->setCurrentBB( m_bbTrack->index() ); - engine::getBBEditor()->show(); + Engine::getBBTrackContainer()->setCurrentBB( m_bbTrack->index() ); + Engine::getBBEditor()->show(); /* foreach( bbTrackView * tv, trackContainerView()->findChildren() ) { From 5b306ea84517e026d6055eec46a5d29d46fe0b95 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 00:52:25 +0100 Subject: [PATCH 05/21] Rename ladspa_2_lmms to Ladspa2LMMS --- include/Engine.h | 6 +++--- include/{ladspa_2_lmms.h => Ladspa2LMMS.h} | 12 ++++++------ plugins/LadspaEffect/LadspaEffect.cpp | 8 ++++---- plugins/LadspaEffect/LadspaSubPluginFeatures.cpp | 6 +++--- plugins/ladspa_browser/ladspa_description.cpp | 6 +++--- plugins/ladspa_browser/ladspa_port_dialog.cpp | 4 ++-- src/core/Engine.cpp | 6 +++--- src/core/{ladspa_2_lmms.cpp => Ladspa2LMMS.cpp} | 10 +++++----- 8 files changed, 29 insertions(+), 29 deletions(-) rename include/{ladspa_2_lmms.h => Ladspa2LMMS.h} (88%) rename src/core/{ladspa_2_lmms.cpp => Ladspa2LMMS.cpp} (92%) diff --git a/include/Engine.h b/include/Engine.h index 7bbd437f3..d0a708638 100644 --- a/include/Engine.h +++ b/include/Engine.h @@ -46,7 +46,7 @@ class PianoRoll; class projectNotes; class Song; class SongEditor; -class ladspa2LMMS; +class Ladspa2LMMS; class ControllerRackView; @@ -133,7 +133,7 @@ public: return s_automationEditor; } - static ladspa2LMMS * getLADSPAManager() + static Ladspa2LMMS * getLADSPAManager() { return s_ladspaManager; } @@ -192,7 +192,7 @@ private: static bbEditor * s_bbEditor; static PianoRoll* s_pianoRoll; static projectNotes * s_projectNotes; - static ladspa2LMMS * s_ladspaManager; + static Ladspa2LMMS * s_ladspaManager; static QMap s_pluginFileHandling; diff --git a/include/ladspa_2_lmms.h b/include/Ladspa2LMMS.h similarity index 88% rename from include/ladspa_2_lmms.h rename to include/Ladspa2LMMS.h index e5b4a281b..be7e608d9 100644 --- a/include/ladspa_2_lmms.h +++ b/include/Ladspa2LMMS.h @@ -1,5 +1,5 @@ /* - * ladspa_2_lmms.h - class that identifies and instantiates LADSPA effects + * Ladspa2LMMS.h - class that identifies and instantiates LADSPA effects * for use with LMMS * * Copyright (c) 2005-2008 Danny McRae @@ -23,14 +23,14 @@ * */ -#ifndef _LADSPA_2_LMMS_H -#define _LADSPA_2_LMMS_H +#ifndef LADSPA_2_LMMS_H +#define LADSPA_2_LMMS_H #include "ladspa_manager.h" -class EXPORT ladspa2LMMS : public ladspaManager +class EXPORT Ladspa2LMMS : public ladspaManager { public: @@ -62,8 +62,8 @@ public: QString getShortName( const ladspa_key_t & _key ); private: - ladspa2LMMS(); - virtual ~ladspa2LMMS(); + Ladspa2LMMS(); + virtual ~Ladspa2LMMS(); l_sortable_plugin_t m_instruments; l_sortable_plugin_t m_validEffects; diff --git a/plugins/LadspaEffect/LadspaEffect.cpp b/plugins/LadspaEffect/LadspaEffect.cpp index 83c75ba3d..9dc3774bc 100644 --- a/plugins/LadspaEffect/LadspaEffect.cpp +++ b/plugins/LadspaEffect/LadspaEffect.cpp @@ -30,7 +30,7 @@ #include "DataFile.h" #include "AudioDevice.h" #include "ConfigManager.h" -#include "ladspa_2_lmms.h" +#include "Ladspa2LMMS.h" #include "LadspaControl.h" #include "LadspaSubPluginFeatures.h" #include "Mixer.h" @@ -71,7 +71,7 @@ LadspaEffect::LadspaEffect( Model * _parent, m_maxSampleRate( 0 ), m_key( LadspaSubPluginFeatures::subPluginKeyToLadspaKey( _key ) ) { - ladspa2LMMS * manager = Engine::getLADSPAManager(); + Ladspa2LMMS * manager = Engine::getLADSPAManager(); if( manager->getDescription( m_key ) == NULL ) { if( !Engine::suppressMessages() ) @@ -291,7 +291,7 @@ void LadspaEffect::pluginInstantiation() { m_maxSampleRate = maxSamplerate( displayName() ); - ladspa2LMMS * manager = Engine::getLADSPAManager(); + Ladspa2LMMS * manager = Engine::getLADSPAManager(); // Calculate how many processing units are needed. const ch_cnt_t lmms_chnls = Engine::mixer()->audioDev()->channels(); @@ -548,7 +548,7 @@ void LadspaEffect::pluginDestruction() for( ch_cnt_t proc = 0; proc < processorCount(); proc++ ) { - ladspa2LMMS * manager = Engine::getLADSPAManager(); + Ladspa2LMMS * manager = Engine::getLADSPAManager(); manager->deactivate( m_key, m_handles[proc] ); manager->cleanup( m_key, m_handles[proc] ); for( int port = 0; port < m_portCount; port++ ) diff --git a/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp b/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp index 7847b6309..f2c977f2c 100644 --- a/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp +++ b/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp @@ -31,7 +31,7 @@ #include "LadspaSubPluginFeatures.h" #include "AudioDevice.h" #include "Engine.h" -#include "ladspa_2_lmms.h" +#include "Ladspa2LMMS.h" #include "LadspaBase.h" #include "Mixer.h" @@ -48,7 +48,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent, const Key * _key ) const { const ladspa_key_t & lkey = subPluginKeyToLadspaKey( _key ); - ladspa2LMMS * lm = Engine::getLADSPAManager(); + Ladspa2LMMS * lm = Engine::getLADSPAManager(); QLabel * label = new QLabel( _parent ); label->setText( QWidget::tr( "Name: " ) + lm->getName( lkey ) ); @@ -119,7 +119,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent, void LadspaSubPluginFeatures::listSubPluginKeys( const Plugin::Descriptor * _desc, KeyList & _kl ) const { - ladspa2LMMS * lm = Engine::getLADSPAManager(); + Ladspa2LMMS * lm = Engine::getLADSPAManager(); l_sortable_plugin_t plugins; switch( m_type ) diff --git a/plugins/ladspa_browser/ladspa_description.cpp b/plugins/ladspa_browser/ladspa_description.cpp index 88cb07ac0..76efcb182 100644 --- a/plugins/ladspa_browser/ladspa_description.cpp +++ b/plugins/ladspa_browser/ladspa_description.cpp @@ -32,7 +32,7 @@ #include "AudioDevice.h" #include "Engine.h" -#include "ladspa_2_lmms.h" +#include "Ladspa2LMMS.h" #include "Mixer.h" @@ -41,7 +41,7 @@ ladspaDescription::ladspaDescription( QWidget * _parent, ladspaPluginType _type ) : QWidget( _parent ) { - ladspa2LMMS * manager = Engine::getLADSPAManager(); + Ladspa2LMMS * manager = Engine::getLADSPAManager(); l_sortable_plugin_t plugins; switch( _type ) @@ -128,7 +128,7 @@ void ladspaDescription::update( const ladspa_key_t & _key ) QVBoxLayout * layout = new QVBoxLayout( description ); layout->setSizeConstraint( QLayout::SetFixedSize ); - ladspa2LMMS * manager = Engine::getLADSPAManager(); + Ladspa2LMMS * manager = Engine::getLADSPAManager(); QLabel * name = new QLabel( description ); name->setText( QWidget::tr( "Name: " ) + manager->getName( _key ) ); diff --git a/plugins/ladspa_browser/ladspa_port_dialog.cpp b/plugins/ladspa_browser/ladspa_port_dialog.cpp index 49ab388e8..999efb158 100644 --- a/plugins/ladspa_browser/ladspa_port_dialog.cpp +++ b/plugins/ladspa_browser/ladspa_port_dialog.cpp @@ -30,13 +30,13 @@ #include "embed.h" #include "Engine.h" -#include "ladspa_2_lmms.h" +#include "Ladspa2LMMS.h" #include "Mixer.h" ladspaPortDialog::ladspaPortDialog( const ladspa_key_t & _key ) { - ladspa2LMMS * manager = Engine::getLADSPAManager(); + Ladspa2LMMS * manager = Engine::getLADSPAManager(); setWindowIcon( embed::getIconPixmap( "ports" ) ); setWindowTitle( tr( "Ports" ) ); diff --git a/src/core/Engine.cpp b/src/core/Engine.cpp index f2d1c3712..d36c5e486 100644 --- a/src/core/Engine.cpp +++ b/src/core/Engine.cpp @@ -32,7 +32,7 @@ #include "FxMixer.h" #include "FxMixerView.h" #include "InstrumentTrack.h" -#include "ladspa_2_lmms.h" +#include "Ladspa2LMMS.h" #include "MainWindow.h" #include "Mixer.h" #include "Pattern.h" @@ -61,7 +61,7 @@ bbEditor * Engine::s_bbEditor = NULL; PianoRoll* Engine::s_pianoRoll = NULL; projectNotes * Engine::s_projectNotes = NULL; ProjectJournal * Engine::s_projectJournal = NULL; -ladspa2LMMS * Engine::s_ladspaManager = NULL; +Ladspa2LMMS * Engine::s_ladspaManager = NULL; DummyTrackContainer * Engine::s_dummyTC = NULL; ControllerRackView * Engine::s_controllerRackView = NULL; QMap Engine::s_pluginFileHandling; @@ -84,7 +84,7 @@ void Engine::init( const bool _has_gui ) s_fxMixer = new FxMixer; s_bbTrackContainer = new BBTrackContainer; - s_ladspaManager = new ladspa2LMMS; + s_ladspaManager = new Ladspa2LMMS; s_projectJournal->setJournalling( true ); diff --git a/src/core/ladspa_2_lmms.cpp b/src/core/Ladspa2LMMS.cpp similarity index 92% rename from src/core/ladspa_2_lmms.cpp rename to src/core/Ladspa2LMMS.cpp index 014a192c8..08489beff 100644 --- a/src/core/ladspa_2_lmms.cpp +++ b/src/core/Ladspa2LMMS.cpp @@ -1,5 +1,5 @@ /* - * ladspa_2_lmms.cpp - class that identifies and instantiates LADSPA effects + * Ladspa2LMMS.cpp - class that identifies and instantiates LADSPA effects * for use with LMMS * * Copyright (c) 2005-2008 Danny McRae @@ -24,10 +24,10 @@ */ -#include "ladspa_2_lmms.h" +#include "Ladspa2LMMS.h" -ladspa2LMMS::ladspa2LMMS() +Ladspa2LMMS::Ladspa2LMMS() { l_sortable_plugin_t plugins = getSortedPlugins(); @@ -78,13 +78,13 @@ ladspa2LMMS::ladspa2LMMS() -ladspa2LMMS::~ladspa2LMMS() +Ladspa2LMMS::~Ladspa2LMMS() { } -QString ladspa2LMMS::getShortName( const ladspa_key_t & _key ) +QString Ladspa2LMMS::getShortName( const ladspa_key_t & _key ) { QString name = getName( _key ); From 178eadeb35c7d418e4bb5f78bb40a679e6303e53 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:12:22 +0100 Subject: [PATCH 06/21] Rename ladspa_manager to LadspaManager --- include/Ladspa2LMMS.h | 4 +- include/LadspaBase.h | 2 +- include/{ladspa_manager.h => LadspaManager.h} | 8 +- .../LadspaEffect/LadspaSubPluginFeatures.h | 2 +- plugins/ladspa_browser/ladspa_browser.h | 2 +- plugins/ladspa_browser/ladspa_description.h | 2 +- plugins/ladspa_browser/ladspa_port_dialog.h | 2 +- .../{ladspa_manager.cpp => LadspaManager.cpp} | 78 +++++++++---------- 8 files changed, 50 insertions(+), 50 deletions(-) rename include/{ladspa_manager.h => LadspaManager.h} (99%) rename src/core/{ladspa_manager.cpp => LadspaManager.cpp} (90%) diff --git a/include/Ladspa2LMMS.h b/include/Ladspa2LMMS.h index be7e608d9..1e7dc4ae3 100644 --- a/include/Ladspa2LMMS.h +++ b/include/Ladspa2LMMS.h @@ -27,10 +27,10 @@ #define LADSPA_2_LMMS_H -#include "ladspa_manager.h" +#include "LadspaManager.h" -class EXPORT Ladspa2LMMS : public ladspaManager +class EXPORT Ladspa2LMMS : public LadspaManager { public: diff --git a/include/LadspaBase.h b/include/LadspaBase.h index 697b999d9..888a16ef9 100644 --- a/include/LadspaBase.h +++ b/include/LadspaBase.h @@ -26,7 +26,7 @@ #ifndef LADSPA_BASE_H #define LADSPA_BASE_H -#include "ladspa_manager.h" +#include "LadspaManager.h" #include "Plugin.h" class LadspaControl; diff --git a/include/ladspa_manager.h b/include/LadspaManager.h similarity index 99% rename from include/ladspa_manager.h rename to include/LadspaManager.h index 1e83b65c3..13ecd5988 100644 --- a/include/ladspa_manager.h +++ b/include/LadspaManager.h @@ -1,5 +1,5 @@ /* - * ladspa_manager.h - declaration of class ladspaManager + * LadspaManager.h - declaration of class ladspaManager * a class to manage loading and instantiation * of ladspa plugins * @@ -80,12 +80,12 @@ typedef struct ladspaManagerStorage } ladspaManagerDescription; -class EXPORT ladspaManager +class EXPORT LadspaManager { public: - ladspaManager(); - virtual ~ladspaManager(); + LadspaManager(); + virtual ~LadspaManager(); l_sortable_plugin_t getSortedPlugins(); ladspaManagerDescription * getDescription( const ladspa_key_t & diff --git a/plugins/LadspaEffect/LadspaSubPluginFeatures.h b/plugins/LadspaEffect/LadspaSubPluginFeatures.h index 88a3baad4..adda34395 100644 --- a/plugins/LadspaEffect/LadspaSubPluginFeatures.h +++ b/plugins/LadspaEffect/LadspaSubPluginFeatures.h @@ -28,7 +28,7 @@ #ifndef _LADSPA_SUBPLUGIN_FEATURES_H #define _LADSPA_SUBPLUGIN_FEATURES_H -#include "ladspa_manager.h" +#include "LadspaManager.h" #include "Plugin.h" diff --git a/plugins/ladspa_browser/ladspa_browser.h b/plugins/ladspa_browser/ladspa_browser.h index c036b6ad0..2ca47af48 100644 --- a/plugins/ladspa_browser/ladspa_browser.h +++ b/plugins/ladspa_browser/ladspa_browser.h @@ -27,7 +27,7 @@ #ifndef _LADSPA_BROWSER_H #define _LADSPA_BROWSER_H -#include "ladspa_manager.h" +#include "LadspaManager.h" #include "ToolPlugin.h" #include "ToolPluginView.h" diff --git a/plugins/ladspa_browser/ladspa_description.h b/plugins/ladspa_browser/ladspa_description.h index 3d9016802..09099b3da 100644 --- a/plugins/ladspa_browser/ladspa_description.h +++ b/plugins/ladspa_browser/ladspa_description.h @@ -29,7 +29,7 @@ #include -#include "ladspa_manager.h" +#include "LadspaManager.h" class QListWidgetItem; diff --git a/plugins/ladspa_browser/ladspa_port_dialog.h b/plugins/ladspa_browser/ladspa_port_dialog.h index 0927b6f5e..da14f9193 100644 --- a/plugins/ladspa_browser/ladspa_port_dialog.h +++ b/plugins/ladspa_browser/ladspa_port_dialog.h @@ -29,7 +29,7 @@ #include -#include "ladspa_manager.h" +#include "LadspaManager.h" diff --git a/src/core/ladspa_manager.cpp b/src/core/LadspaManager.cpp similarity index 90% rename from src/core/ladspa_manager.cpp rename to src/core/LadspaManager.cpp index fab67cf9e..50e791b9e 100644 --- a/src/core/ladspa_manager.cpp +++ b/src/core/LadspaManager.cpp @@ -1,5 +1,5 @@ /* - * ladspa_manager.cpp - a class to manage loading and instantiation + * LadspaManager.cpp - a class to manage loading and instantiation * of ladspa plugins * * Copyright (c) 2005-2008 Danny McRae @@ -33,11 +33,11 @@ #include #include "ConfigManager.h" -#include "ladspa_manager.h" +#include "LadspaManager.h" -ladspaManager::ladspaManager() +LadspaManager::LadspaManager() { QStringList ladspaDirectories = QString( getenv( "LADSPA_PATH" ) ). split( LADSPA_PATH_SEPERATOR ); @@ -106,7 +106,7 @@ ladspaManager::ladspaManager() -ladspaManager::~ladspaManager() +LadspaManager::~LadspaManager() { for( ladspaManagerMapType::iterator it = m_ladspaManagerMap.begin(); it != m_ladspaManagerMap.end(); ++it ) @@ -118,7 +118,7 @@ ladspaManager::~ladspaManager() -ladspaManagerDescription * ladspaManager::getDescription( +ladspaManagerDescription * LadspaManager::getDescription( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) @@ -134,7 +134,7 @@ ladspaManagerDescription * ladspaManager::getDescription( -void ladspaManager::addPlugins( +void LadspaManager::addPlugins( LADSPA_Descriptor_Function _descriptor_func, const QString & _file ) { @@ -183,7 +183,7 @@ void ladspaManager::addPlugins( -uint16_t ladspaManager::getPluginInputs( +uint16_t LadspaManager::getPluginInputs( const LADSPA_Descriptor * _descriptor ) { uint16_t inputs = 0; @@ -209,7 +209,7 @@ uint16_t ladspaManager::getPluginInputs( -uint16_t ladspaManager::getPluginOutputs( +uint16_t LadspaManager::getPluginOutputs( const LADSPA_Descriptor * _descriptor ) { uint16_t outputs = 0; @@ -235,7 +235,7 @@ uint16_t ladspaManager::getPluginOutputs( -l_sortable_plugin_t ladspaManager::getSortedPlugins() +l_sortable_plugin_t LadspaManager::getSortedPlugins() { return( m_sortedPlugins ); } @@ -243,7 +243,7 @@ l_sortable_plugin_t ladspaManager::getSortedPlugins() -QString ladspaManager::getLabel( const ladspa_key_t & _plugin ) +QString LadspaManager::getLabel( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) { @@ -263,7 +263,7 @@ QString ladspaManager::getLabel( const ladspa_key_t & _plugin ) -bool ladspaManager::hasRealTimeDependency( +bool LadspaManager::hasRealTimeDependency( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) @@ -284,7 +284,7 @@ bool ladspaManager::hasRealTimeDependency( -bool ladspaManager::isInplaceBroken( const ladspa_key_t & _plugin ) +bool LadspaManager::isInplaceBroken( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) { @@ -304,7 +304,7 @@ bool ladspaManager::isInplaceBroken( const ladspa_key_t & _plugin ) -bool ladspaManager::isRealTimeCapable( +bool LadspaManager::isRealTimeCapable( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) @@ -325,7 +325,7 @@ bool ladspaManager::isRealTimeCapable( -QString ladspaManager::getName( const ladspa_key_t & _plugin ) +QString LadspaManager::getName( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) { @@ -345,7 +345,7 @@ QString ladspaManager::getName( const ladspa_key_t & _plugin ) -QString ladspaManager::getMaker( const ladspa_key_t & _plugin ) +QString LadspaManager::getMaker( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) { @@ -365,7 +365,7 @@ QString ladspaManager::getMaker( const ladspa_key_t & _plugin ) -QString ladspaManager::getCopyright( const ladspa_key_t & _plugin ) +QString LadspaManager::getCopyright( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) { @@ -385,7 +385,7 @@ QString ladspaManager::getCopyright( const ladspa_key_t & _plugin ) -uint32_t ladspaManager::getPortCount( const ladspa_key_t & _plugin ) +uint32_t LadspaManager::getPortCount( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) { @@ -405,7 +405,7 @@ uint32_t ladspaManager::getPortCount( const ladspa_key_t & _plugin ) -bool ladspaManager::isPortInput( const ladspa_key_t & _plugin, +bool LadspaManager::isPortInput( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -429,7 +429,7 @@ bool ladspaManager::isPortInput( const ladspa_key_t & _plugin, -bool ladspaManager::isPortOutput( const ladspa_key_t & _plugin, +bool LadspaManager::isPortOutput( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -453,7 +453,7 @@ bool ladspaManager::isPortOutput( const ladspa_key_t & _plugin, -bool ladspaManager::isPortAudio( const ladspa_key_t & _plugin, +bool LadspaManager::isPortAudio( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -477,7 +477,7 @@ bool ladspaManager::isPortAudio( const ladspa_key_t & _plugin, -bool ladspaManager::isPortControl( const ladspa_key_t & _plugin, +bool LadspaManager::isPortControl( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -501,7 +501,7 @@ bool ladspaManager::isPortControl( const ladspa_key_t & _plugin, -bool ladspaManager::areHintsSampleRateDependent( +bool LadspaManager::areHintsSampleRateDependent( const ladspa_key_t & _plugin, uint32_t _port ) { @@ -526,7 +526,7 @@ bool ladspaManager::areHintsSampleRateDependent( -float ladspaManager::getLowerBound( const ladspa_key_t & _plugin, +float LadspaManager::getLowerBound( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -557,7 +557,7 @@ float ladspaManager::getLowerBound( const ladspa_key_t & _plugin, -float ladspaManager::getUpperBound( const ladspa_key_t & _plugin, uint32_t _port ) +float LadspaManager::getUpperBound( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) && _port < getPortCount( _plugin ) ) @@ -587,7 +587,7 @@ float ladspaManager::getUpperBound( const ladspa_key_t & _plugin, uint32 -bool ladspaManager::isPortToggled( const ladspa_key_t & _plugin, +bool LadspaManager::isPortToggled( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -611,7 +611,7 @@ bool ladspaManager::isPortToggled( const ladspa_key_t & _plugin, -float ladspaManager::getDefaultSetting( const ladspa_key_t & _plugin, +float LadspaManager::getDefaultSetting( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -698,7 +698,7 @@ float ladspaManager::getDefaultSetting( const ladspa_key_t & _plugin, -bool ladspaManager::isLogarithmic( const ladspa_key_t & _plugin, +bool LadspaManager::isLogarithmic( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -722,7 +722,7 @@ bool ladspaManager::isLogarithmic( const ladspa_key_t & _plugin, -bool ladspaManager::isInteger( const ladspa_key_t & _plugin, +bool LadspaManager::isInteger( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) @@ -746,7 +746,7 @@ bool ladspaManager::isInteger( const ladspa_key_t & _plugin, -QString ladspaManager::getPortName( const ladspa_key_t & _plugin, +QString LadspaManager::getPortName( const ladspa_key_t & _plugin, uint32_t _port ) { if( m_ladspaManagerMap.contains( _plugin ) && @@ -769,7 +769,7 @@ QString ladspaManager::getPortName( const ladspa_key_t & _plugin, -const void * ladspaManager::getImplementationData( +const void * LadspaManager::getImplementationData( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) @@ -790,7 +790,7 @@ const void * ladspaManager::getImplementationData( -const LADSPA_Descriptor * ladspaManager::getDescriptor( +const LADSPA_Descriptor * LadspaManager::getDescriptor( const ladspa_key_t & _plugin ) { if( m_ladspaManagerMap.contains( _plugin ) ) @@ -811,7 +811,7 @@ const LADSPA_Descriptor * ladspaManager::getDescriptor( -LADSPA_Handle ladspaManager::instantiate( +LADSPA_Handle LadspaManager::instantiate( const ladspa_key_t & _plugin, uint32_t _sample_rate ) { @@ -834,7 +834,7 @@ LADSPA_Handle ladspaManager::instantiate( -bool ladspaManager::connectPort( const ladspa_key_t & _plugin, +bool LadspaManager::connectPort( const ladspa_key_t & _plugin, LADSPA_Handle _instance, uint32_t _port, LADSPA_Data * _data_location ) @@ -860,7 +860,7 @@ bool ladspaManager::connectPort( const ladspa_key_t & _plugin, -bool ladspaManager::activate( const ladspa_key_t & _plugin, +bool LadspaManager::activate( const ladspa_key_t & _plugin, LADSPA_Handle _instance ) { if( m_ladspaManagerMap.contains( _plugin ) ) @@ -882,7 +882,7 @@ bool ladspaManager::activate( const ladspa_key_t & _plugin, -bool ladspaManager::run( const ladspa_key_t & _plugin, +bool LadspaManager::run( const ladspa_key_t & _plugin, LADSPA_Handle _instance, uint32_t _sample_count ) { @@ -905,7 +905,7 @@ bool ladspaManager::run( const ladspa_key_t & _plugin, -bool ladspaManager::runAdding( const ladspa_key_t & _plugin, +bool LadspaManager::runAdding( const ladspa_key_t & _plugin, LADSPA_Handle _instance, uint32_t _sample_count ) { @@ -929,7 +929,7 @@ bool ladspaManager::runAdding( const ladspa_key_t & _plugin, -bool ladspaManager::setRunAddingGain( const ladspa_key_t & _plugin, +bool LadspaManager::setRunAddingGain( const ladspa_key_t & _plugin, LADSPA_Handle _instance, LADSPA_Data _gain ) { @@ -954,7 +954,7 @@ bool ladspaManager::setRunAddingGain( const ladspa_key_t & _plugin, -bool ladspaManager::deactivate( const ladspa_key_t & _plugin, +bool LadspaManager::deactivate( const ladspa_key_t & _plugin, LADSPA_Handle _instance ) { if( m_ladspaManagerMap.contains( _plugin ) ) @@ -976,7 +976,7 @@ bool ladspaManager::deactivate( const ladspa_key_t & _plugin, -bool ladspaManager::cleanup( const ladspa_key_t & _plugin, +bool LadspaManager::cleanup( const ladspa_key_t & _plugin, LADSPA_Handle _instance ) { if( m_ladspaManagerMap.contains( _plugin ) ) From e045f1dd19e48f74a983ec985d5ff674cff737e8 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:12:57 +0100 Subject: [PATCH 07/21] Rename fixes --- include/AutomationEditor.h | 2 +- include/Ladspa2LMMS.h | 2 +- include/MainWindow.h | 2 +- include/Mixer.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/AutomationEditor.h b/include/AutomationEditor.h index df75ad759..1479ca1b9 100644 --- a/include/AutomationEditor.h +++ b/include/AutomationEditor.h @@ -270,7 +270,7 @@ private: QColor m_vertexColor; QBrush m_scaleColor; - friend class engine; + friend class Engine; signals: diff --git a/include/Ladspa2LMMS.h b/include/Ladspa2LMMS.h index 1e7dc4ae3..e24d0b382 100644 --- a/include/Ladspa2LMMS.h +++ b/include/Ladspa2LMMS.h @@ -71,7 +71,7 @@ private: l_sortable_plugin_t m_analysisTools; l_sortable_plugin_t m_otherPlugins; - friend class engine; + friend class Engine; } ; diff --git a/include/MainWindow.h b/include/MainWindow.h index dd4b96db6..5a238ae34 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -171,7 +171,7 @@ private: QTimer m_autoSaveTimer; - friend class engine; + friend class Engine; private slots: diff --git a/include/Mixer.h b/include/Mixer.h index e5fc2c3a4..a3e5c8463 100644 --- a/include/Mixer.h +++ b/include/Mixer.h @@ -462,7 +462,7 @@ private: MixerProfiler m_profiler; - friend class engine; + friend class Engine; friend class MixerWorkerThread; } ; From aaeb5216ad3f951be89aa2dcad437f0320a4597d Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:14:52 +0100 Subject: [PATCH 08/21] Rename note to Note --- include/InstrumentTrack.h | 4 +- include/Mixer.h | 2 +- include/{note.h => Note.h} | 14 +++--- include/NotePlayHandle.h | 8 ++-- include/Pattern.h | 10 ++-- include/Piano.h | 2 +- include/PianoRoll.h | 18 +++---- plugins/HydrogenImport/HydrogenImport.cpp | 4 +- plugins/MidiImport/MidiImport.cpp | 4 +- plugins/flp_import/FlpImport.cpp | 4 +- plugins/flp_import/FlpImport.h | 2 +- plugins/lb302/lb302.h | 2 +- plugins/vestige/vestige.h | 2 +- plugins/zynaddsubfx/LocalZynAddSubFx.h | 2 +- plugins/zynaddsubfx/RemoteZynAddSubFx.cpp | 2 +- src/core/AutomationPattern.cpp | 6 +-- src/core/InstrumentFunctions.cpp | 4 +- src/core/{note.cpp => Note.cpp} | 34 ++++++------- src/core/NotePlayHandle.cpp | 10 ++-- src/core/PresetPreviewPlayHandle.cpp | 2 +- src/core/Song.cpp | 2 +- src/core/midi/MidiAlsaSeq.cpp | 2 +- src/core/midi/MidiClient.cpp | 2 +- src/core/midi/MidiWinMM.cpp | 2 +- src/gui/PianoRoll.cpp | 58 +++++++++++------------ src/tracks/InstrumentTrack.cpp | 4 +- src/tracks/Pattern.cpp | 26 +++++----- 27 files changed, 116 insertions(+), 116 deletions(-) rename include/{note.h => Note.h} (93%) rename src/core/{note.cpp => Note.cpp} (84%) diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index af20c5fb2..1a64825a0 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -206,8 +206,8 @@ public: signals: void instrumentChanged(); void newNote(); - void midiNoteOn( const note& ); - void midiNoteOff( const note& ); + void midiNoteOn( const Note& ); + void midiNoteOff( const Note& ); void nameChanged(); diff --git a/include/Mixer.h b/include/Mixer.h index a3e5c8463..f8f9cf313 100644 --- a/include/Mixer.h +++ b/include/Mixer.h @@ -53,7 +53,7 @@ #include "lmms_basics.h" -#include "note.h" +#include "Note.h" #include "fifo_buffer.h" #include "MixerProfiler.h" diff --git a/include/note.h b/include/Note.h similarity index 93% rename from include/note.h rename to include/Note.h index 6cf9538b5..eb36462a6 100644 --- a/include/note.h +++ b/include/Note.h @@ -1,5 +1,5 @@ /* - * note.h - declaration of class note which contains all informations about a + * Note.h - declaration of class note which contains all informations about a * note + definitions of several constants and enums * * Copyright (c) 2004-2014 Tobias Doerffel @@ -78,17 +78,17 @@ const float MaxDetuning = 4 * 12.0f; -class EXPORT note : public SerializingObject +class EXPORT Note : public SerializingObject { public: - note( const MidiTime & _length = MidiTime( 0 ), + Note( const MidiTime & _length = MidiTime( 0 ), const MidiTime & _pos = MidiTime( 0 ), int key = DefaultKey, volume_t _volume = DefaultVolume, panning_t _panning = DefaultPanning, DetuningHelper * _detuning = NULL ); - note( const note & _note ); - virtual ~note(); + Note( const Note & _note ); + virtual ~Note(); // used by GUI inline void setSelected( const bool _selected ){ m_selected = _selected; } @@ -112,7 +112,7 @@ public: void quantizeLength( const int _q_grid ); void quantizePos( const int _q_grid ); - static inline bool lessThan( note * &lhs, note * &rhs ) + static inline bool lessThan( Note * &lhs, Note * &rhs ) { // function to compare two notes - must be called explictly when // using qSort @@ -234,7 +234,7 @@ private: } ; -typedef QVector NoteVector; +typedef QVector NoteVector; #endif diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index 03b3fddd7..e0f0bcdaf 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -27,7 +27,7 @@ #define NOTE_PLAY_HANDLE_H #include "lmmsconfig.h" -#include "note.h" +#include "Note.h" #include "PlayHandle.h" #include "Track.h" #include "MemoryManager.h" @@ -42,7 +42,7 @@ typedef QList NotePlayHandleList; typedef QList ConstNotePlayHandleList; -class EXPORT NotePlayHandle : public PlayHandle, public note +class EXPORT NotePlayHandle : public PlayHandle, public Note { MM_OPERATORS public: @@ -63,7 +63,7 @@ public: NotePlayHandle( InstrumentTrack* instrumentTrack, const f_cnt_t offset, const f_cnt_t frames, - const note& noteToPlay, + const Note& noteToPlay, NotePlayHandle* parent = NULL, int midiEventChannel = -1, Origin origin = OriginPattern ); @@ -326,7 +326,7 @@ public: static NotePlayHandle * acquire( InstrumentTrack* instrumentTrack, const f_cnt_t offset, const f_cnt_t frames, - const note& noteToPlay, + const Note& noteToPlay, NotePlayHandle* parent = NULL, int midiEventChannel = -1, NotePlayHandle::Origin origin = NotePlayHandle::OriginPattern ); diff --git a/include/Pattern.h b/include/Pattern.h index fdfd9ab57..5deb67c45 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -33,7 +33,7 @@ #include -#include "note.h" +#include "Note.h" #include "Track.h" @@ -67,13 +67,13 @@ public: MidiTime beatPatternLength() const; // note management - note * addNote( const note & _new_note, const bool _quant_pos = true ); + Note * addNote( const Note & _new_note, const bool _quant_pos = true ); - void removeNote( const note * _note_to_del ); + void removeNote( const Note * _note_to_del ); - note * noteAtStep( int _step ); + Note * noteAtStep( int _step ); - note * rearrangeNote( const note * _note_to_proc, + Note * rearrangeNote( const Note * _note_to_proc, const bool _quant_pos = true ); void rearrangeAllNotes(); void clearNotes(); diff --git a/include/Piano.h b/include/Piano.h index ff2e185e1..48dd7f137 100644 --- a/include/Piano.h +++ b/include/Piano.h @@ -25,7 +25,7 @@ #ifndef PIANO_H #define PIANO_H -#include "note.h" +#include "Note.h" #include "Model.h" class InstrumentTrack; diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 7bf5edce9..817ebde33 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -32,7 +32,7 @@ #include "ComboBoxModel.h" #include "SerializingObject.h" -#include "note.h" +#include "Note.h" #include "lmms_basics.h" #include "Song.h" #include "tooltip.h" @@ -123,7 +123,7 @@ protected: int getKey( int _y ) const; static inline void drawNoteRect( QPainter & _p, int _x, int _y, - int _width, note * _n, const QColor & noteCol ); + int _width, Note * _n, const QColor & noteCol ); void removeSelection(); void selectAll(); void getSelectedNotes( NoteVector & _selected_notes ); @@ -137,8 +137,8 @@ protected slots: void recordAccompany(); void stop(); - void startRecordNote( const note & _n ); - void finishRecordNote( const note & _n ); + void startRecordNote( const Note & _n ); + void finishRecordNote( const Note & _n ); void horScrolled( int _new_pos ); void verScrolled( int _new_pos ); @@ -232,7 +232,7 @@ private: void shiftSemiTone(int amount); bool isSelection() const; int selectionCount() const; - void testPlayNote( note * n ); + void testPlayNote( Note * n ); void testPlayKey( int _key, int _vol, int _pan ); void pauseTestNotes( bool _pause = true ); @@ -300,9 +300,9 @@ private: MidiTime m_currentPosition; bool m_recording; - QList m_recordingNotes; + QList m_recordingNotes; - note * m_currentNote; + Note * m_currentNote; actions m_action; noteEditMode m_noteEditMode; @@ -355,9 +355,9 @@ private: void copy_to_clipboard( const NoteVector & _notes ) const; - void drawDetuningInfo( QPainter & _p, note * _n, int _x, int _y ); + void drawDetuningInfo( QPainter & _p, Note * _n, int _x, int _y ); bool mouseOverNote(); - note * noteUnderMouse(); + Note * noteUnderMouse(); // turn a selection rectangle into selected notes void computeSelectedNotes( bool shift ); diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 6be40e091..6cfe648d8 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -12,7 +12,7 @@ #include "Engine.h" #include "Instrument.h" #include "InstrumentTrack.h" -#include "note.h" +#include "Note.h" #include "Pattern.h" #include "Track.h" #include "bb_track.h" @@ -271,7 +271,7 @@ bool HydrogenImport::readSong() int i = pattern_count - 1 + nbb; pattern_id[sName] = pattern_count - 1; Pattern*p = dynamic_cast( drum_track[instrId]->getTCO( i ) ); - note n; + Note n; n.setPos( nPosition ); if ( (nPosition + 48) <= nSize ) { diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index 7250a126f..215e79523 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -244,7 +244,7 @@ public: } - void addNote( note & n ) + void addNote( Note & n ) { if( !p || n.pos() > lastEnd + DefaultTicksPerTact ) { @@ -378,7 +378,7 @@ bool MidiImport::readSMF( TrackContainer* tc ) smfMidiChannel * ch = chs[evt->chan].create( tc ); Alg_note_ptr noteEvt = dynamic_cast( evt ); - note n( noteEvt->get_duration() * ticksPerBeat, + Note n( noteEvt->get_duration() * ticksPerBeat, noteEvt->get_start_time() * ticksPerBeat, noteEvt->get_identifier() - 12, noteEvt->get_loud()); diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index 64e6b38e9..183772625 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -414,7 +414,7 @@ struct FL_Channel : public FL_Plugin int fxChannel; int layerParent; - typedef QList > noteVector; + typedef QList > noteVector; noteVector notes; QList dots; @@ -1313,7 +1313,7 @@ if( p.currentEffectChannel <= NumFLFxChannels ) 8 ) ); pos /= (4*ppq) / DefaultTicksPerTact; len /= (4*ppq) / DefaultTicksPerTact; - note n( len, pos, key, vol * 100 / 128, + Note n( len, pos, key, vol * 100 / 128, pan*200 / 128 - 100 ); if( ch < p.numChannels ) { diff --git a/plugins/flp_import/FlpImport.h b/plugins/flp_import/FlpImport.h index 8470ce3f6..18ba3e251 100644 --- a/plugins/flp_import/FlpImport.h +++ b/plugins/flp_import/FlpImport.h @@ -30,7 +30,7 @@ #include #include "ImportFilter.h" -#include "note.h" +#include "Note.h" diff --git a/plugins/lb302/lb302.h b/plugins/lb302/lb302.h index dbef4e190..71e4d6dc3 100644 --- a/plugins/lb302/lb302.h +++ b/plugins/lb302/lb302.h @@ -168,7 +168,7 @@ public: private: void processNote( NotePlayHandle * n ); - void initNote(lb302Note *note); + void initNote(lb302Note *Note); void initSlide(); private: diff --git a/plugins/vestige/vestige.h b/plugins/vestige/vestige.h index 24184704f..51265aaaf 100644 --- a/plugins/vestige/vestige.h +++ b/plugins/vestige/vestige.h @@ -34,7 +34,7 @@ #include "Instrument.h" #include "InstrumentView.h" -#include "note.h" +#include "Note.h" #include "knob.h" #include "AutomatableModel.h" diff --git a/plugins/zynaddsubfx/LocalZynAddSubFx.h b/plugins/zynaddsubfx/LocalZynAddSubFx.h index b9077345f..f4e3b8ff3 100644 --- a/plugins/zynaddsubfx/LocalZynAddSubFx.h +++ b/plugins/zynaddsubfx/LocalZynAddSubFx.h @@ -26,7 +26,7 @@ #define LOCAL_ZYNADDSUBFX_H #include "MidiEvent.h" -#include "note.h" +#include "Note.h" class Master; class NulEngine; diff --git a/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp b/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp index 813ac516d..54da176ea 100644 --- a/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp @@ -30,7 +30,7 @@ #include #define BUILD_REMOTE_PLUGIN_CLIENT -#include "note.h" +#include "Note.h" #include "RemotePlugin.h" #include "RemoteZynAddSubFx.h" #include "LocalZynAddSubFx.h" diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index c5aa7a02b..68ca7882b 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -187,7 +187,7 @@ MidiTime AutomationPattern::putValue( const MidiTime & _time, cleanObjects(); MidiTime newTime = _quant_pos && Engine::automationEditor() ? - note::quantized( _time, + Note::quantized( _time, Engine::automationEditor()->quantization() ) : _time; @@ -220,7 +220,7 @@ void AutomationPattern::removeValue( const MidiTime & _time, cleanObjects(); MidiTime newTime = _quant_pos && Engine::automationEditor() ? - note::quantized( _time, + Note::quantized( _time, Engine::automationEditor()->quantization() ) : _time; @@ -260,7 +260,7 @@ MidiTime AutomationPattern::setDragValue( const MidiTime & _time, const float _v if( m_dragging == false ) { MidiTime newTime = _quant_pos && Engine::automationEditor() ? - note::quantized( _time, + Note::quantized( _time, Engine::automationEditor()->quantization() ) : _time; this->removeValue( newTime ); diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 050d19d80..1083a3052 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -256,7 +256,7 @@ void InstrumentFunctionNoteStacking::processNote( NotePlayHandle * _n ) break; } // create copy of base-note - note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->detuning() ); + Note note_copy( _n->length(), 0, sub_note_key, _n->getVolume(), _n->getPanning(), _n->detuning() ); // create sub-note-play-handle, only note is // different @@ -477,7 +477,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) NotePlayHandleManager::acquire( _n->instrumentTrack(), frames_processed, gated_frames, - note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() * vol_level ), + Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() * vol_level ), _n->getPanning(), _n->detuning() ), _n, -1, NotePlayHandle::OriginArpeggio ) ); diff --git a/src/core/note.cpp b/src/core/Note.cpp similarity index 84% rename from src/core/note.cpp rename to src/core/Note.cpp index f2bc1f337..fca078587 100644 --- a/src/core/note.cpp +++ b/src/core/Note.cpp @@ -27,7 +27,7 @@ #include -#include "note.h" +#include "Note.h" #include "DetuningHelper.h" #include "templates.h" @@ -35,7 +35,7 @@ -note::note( const MidiTime & _length, const MidiTime & _pos, +Note::Note( const MidiTime & _length, const MidiTime & _pos, int _key, volume_t _volume, panning_t _panning, DetuningHelper * _detuning ) : m_selected( false ), @@ -63,7 +63,7 @@ note::note( const MidiTime & _length, const MidiTime & _pos, -note::note( const note & _note ) : +Note::Note( const Note & _note ) : SerializingObject( _note ), m_selected( _note.m_selected ), m_oldKey( _note.m_oldKey ), @@ -86,7 +86,7 @@ note::note( const note & _note ) : -note::~note() +Note::~Note() { if( m_detuning ) { @@ -97,7 +97,7 @@ note::~note() -void note::setLength( const MidiTime & _length ) +void Note::setLength( const MidiTime & _length ) { m_length = _length; } @@ -105,7 +105,7 @@ void note::setLength( const MidiTime & _length ) -void note::setPos( const MidiTime & _pos ) +void Note::setPos( const MidiTime & _pos ) { m_pos = _pos; } @@ -113,7 +113,7 @@ void note::setPos( const MidiTime & _pos ) -void note::setKey( const int _key ) +void Note::setKey( const int _key ) { const int k = qBound( 0, _key, NumKeys ); m_key = k; @@ -122,7 +122,7 @@ void note::setKey( const int _key ) -void note::setVolume( volume_t _volume ) +void Note::setVolume( volume_t _volume ) { const volume_t v = qBound( MinVolume, _volume, MaxVolume ); m_volume = v; @@ -131,7 +131,7 @@ void note::setVolume( volume_t _volume ) -void note::setPanning( panning_t _panning ) +void Note::setPanning( panning_t _panning ) { const panning_t p = qBound( PanningLeft, _panning, PanningRight ); m_panning = p; @@ -140,7 +140,7 @@ void note::setPanning( panning_t _panning ) -MidiTime note::quantized( const MidiTime & _m, const int _q_grid ) +MidiTime Note::quantized( const MidiTime & _m, const int _q_grid ) { float p = ( (float) _m / _q_grid ); if( p - floorf( p ) < 0.5f ) @@ -153,7 +153,7 @@ MidiTime note::quantized( const MidiTime & _m, const int _q_grid ) -void note::quantizeLength( const int _q_grid ) +void Note::quantizeLength( const int _q_grid ) { setLength( quantized( length(), _q_grid ) ); if( length() == 0 ) @@ -165,7 +165,7 @@ void note::quantizeLength( const int _q_grid ) -void note::quantizePos( const int _q_grid ) +void Note::quantizePos( const int _q_grid ) { setPos( quantized( pos(), _q_grid ) ); } @@ -173,7 +173,7 @@ void note::quantizePos( const int _q_grid ) -void note::saveSettings( QDomDocument & _doc, QDomElement & _this ) +void Note::saveSettings( QDomDocument & _doc, QDomElement & _this ) { _this.setAttribute( "key", m_key ); _this.setAttribute( "vol", m_volume ); @@ -190,7 +190,7 @@ void note::saveSettings( QDomDocument & _doc, QDomElement & _this ) -void note::loadSettings( const QDomElement & _this ) +void Note::loadSettings( const QDomElement & _this ) { const int oldKey = _this.attribute( "tone" ).toInt() + _this.attribute( "oct" ).toInt() * KeysPerOctave; m_key = qMax( oldKey, _this.attribute( "key" ).toInt() ); @@ -209,7 +209,7 @@ void note::loadSettings( const QDomElement & _this ) -void note::editDetuningPattern() +void Note::editDetuningPattern() { createDetuning(); m_detuning->automationPattern()->openInAutomationEditor(); @@ -218,7 +218,7 @@ void note::editDetuningPattern() -void note::createDetuning() +void Note::createDetuning() { if( m_detuning == NULL ) { @@ -232,7 +232,7 @@ void note::createDetuning() -bool note::hasDetuningInfo() const +bool Note::hasDetuningInfo() const { return m_detuning && m_detuning->hasAutomation(); } diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index f8b1321e5..4e3f798fc 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -48,12 +48,12 @@ NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) : NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack, const f_cnt_t _offset, const f_cnt_t _frames, - const note& n, + const Note& n, NotePlayHandle *parent, int midiEventChannel, Origin origin ) : PlayHandle( TypeNotePlayHandle, _offset ), - note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.detuning() ), + Note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.detuning() ), m_pluginData( NULL ), m_filter( NULL ), m_instrumentTrack( instrumentTrack ), @@ -168,7 +168,7 @@ void NotePlayHandle::done() void NotePlayHandle::setVolume( volume_t _volume ) { - note::setVolume( _volume ); + Note::setVolume( _volume ); const int baseVelocity = m_instrumentTrack->midiPort()->baseVelocity(); @@ -180,7 +180,7 @@ void NotePlayHandle::setVolume( volume_t _volume ) void NotePlayHandle::setPanning( panning_t panning ) { - note::setPanning( panning ); + Note::setPanning( panning ); MidiEvent event( MidiMetaEvent, midiChannel(), midiKey(), panningToMidi( panning ) ); event.setMetaEvent( MidiNotePanning ); @@ -582,7 +582,7 @@ void NotePlayHandleManager::init() NotePlayHandle * NotePlayHandleManager::acquire( InstrumentTrack* instrumentTrack, const f_cnt_t offset, const f_cnt_t frames, - const note& noteToPlay, + const Note& noteToPlay, NotePlayHandle* parent, int midiEventChannel, NotePlayHandle::Origin origin ) diff --git a/src/core/PresetPreviewPlayHandle.cpp b/src/core/PresetPreviewPlayHandle.cpp index e4c95eb62..dceb5b0d2 100644 --- a/src/core/PresetPreviewPlayHandle.cpp +++ b/src/core/PresetPreviewPlayHandle.cpp @@ -163,7 +163,7 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file, m_previewNote = NotePlayHandleManager::acquire( s_previewTC->previewInstrumentTrack(), 0, typeInfo::max() / 2, - note( 0, 0, DefaultKey, 100 ) ); + Note( 0, 0, DefaultKey, 100 ) ); setAudioPort( s_previewTC->previewInstrumentTrack()->audioPort() ); diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 2969c2ebe..930259c88 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -112,7 +112,7 @@ Song::Song() : /* connect( &m_masterPitchModel, SIGNAL( dataChanged() ), this, SLOT( masterPitchChanged() ) );*/ - qRegisterMetaType( "note" ); + qRegisterMetaType( "note" ); } diff --git a/src/core/midi/MidiAlsaSeq.cpp b/src/core/midi/MidiAlsaSeq.cpp index 7923fc659..33740bafd 100644 --- a/src/core/midi/MidiAlsaSeq.cpp +++ b/src/core/midi/MidiAlsaSeq.cpp @@ -32,7 +32,7 @@ #include "Song.h" #include "MidiPort.h" #include "MidiTime.h" -#include "note.h" +#include "Note.h" #ifdef LMMS_HAVE_ALSA diff --git a/src/core/midi/MidiClient.cpp b/src/core/midi/MidiClient.cpp index 494641aaa..b4e9e250a 100644 --- a/src/core/midi/MidiClient.cpp +++ b/src/core/midi/MidiClient.cpp @@ -25,7 +25,7 @@ #include "MidiClient.h" #include "MidiPort.h" -#include "note.h" +#include "Note.h" MidiClient::MidiClient() diff --git a/src/core/midi/MidiWinMM.cpp b/src/core/midi/MidiWinMM.cpp index 67c1319bc..01badfd5d 100644 --- a/src/core/midi/MidiWinMM.cpp +++ b/src/core/midi/MidiWinMM.cpp @@ -30,7 +30,7 @@ #include "Engine.h" #include "gui_templates.h" #include "MidiPort.h" -#include "note.h" +#include "Note.h" #ifdef LMMS_BUILD_WIN32 diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 020fd3951..3e806c25b 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -851,8 +851,8 @@ void PianoRoll::setCurrentPattern( Pattern* newPattern ) // make sure to always get informed about the pattern being destroyed connect( m_pattern, SIGNAL( destroyedPattern( Pattern* ) ), this, SLOT( hidePattern( Pattern* ) ) ); - connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOn( const note& ) ), this, SLOT( startRecordNote( const note& ) ) ); - connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOff( const note& ) ), this, SLOT( finishRecordNote( const note& ) ) ); + connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOn( const Note& ) ), this, SLOT( startRecordNote( const Note& ) ) ); + connect( m_pattern->instrumentTrack(), SIGNAL( midiNoteOff( const Note& ) ), this, SLOT( finishRecordNote( const Note& ) ) ); connect( m_pattern->instrumentTrack()->pianoModel(), SIGNAL( dataChanged() ), this, SLOT( update() ) ); setWindowTitle( tr( "Piano-Roll - %1" ).arg( m_pattern->name() ) ); @@ -931,7 +931,7 @@ void PianoRoll::setBarColor( const QColor & c ) inline void PianoRoll::drawNoteRect( QPainter & _p, int _x, int _y, - int _width, note * _n, const QColor & noteCol ) + int _width, Note * _n, const QColor & noteCol ) { ++_x; ++_y; @@ -1017,7 +1017,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; @@ -1701,7 +1701,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) // whether this action creates new note(s) or not bool is_new_note = false; - note * created_new_note = NULL; + Note * created_new_note = NULL; // did it reach end of vector because // there's no note?? if( it == notes.begin()-1 ) @@ -1721,7 +1721,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) MidiTime note_pos( pos_ticks - ( quantization() / 2 ) ); MidiTime note_len( newNoteLen() ); - note new_note( note_len, note_pos, key_num ); + Note new_note( note_len, note_pos, key_num ); new_note.setSelected( true ); new_note.setPanning( m_lastNotePanning ); new_note.setVolume( m_lastNoteVolume ); @@ -1741,7 +1741,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) { note_pos += note_len; } - note new_note( note_len, note_pos, key_num + chord[i] ); + Note new_note( note_len, note_pos, key_num + chord[i] ); new_note.setSelected( true ); new_note.setPanning( m_lastNotePanning ); new_note.setVolume( m_lastNoteVolume ); @@ -1856,14 +1856,14 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) ! is_new_note && _me->modifiers() & Qt::ShiftModifier ) { // vector to hold new notes until we're through the loop - QVector newNotes; + QVector newNotes; it = notes.begin(); while( it != notes.end() ) { if( ( *it )->selected() ) { // copy this note - note noteCopy( (note) **it ); + Note noteCopy( (Note) **it ); newNotes.push_back( noteCopy ); } ++it; @@ -1874,7 +1874,7 @@ void PianoRoll::mousePressEvent( QMouseEvent * _me ) //put notes from vector into piano roll for( int i=0; iaddNote( newNotes[i] ); + Note * newNote = m_pattern->addNote( newNotes[i] ); newNote->setSelected( false ); } @@ -2000,7 +2000,7 @@ void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me ) // go through notes to figure out which one we want to change NoteVector nv; - foreach( note * i, notes ) + foreach( Note * i, notes ) { if( i->pos().getTicks() >= ticks_start && i->pos().getTicks() <= ticks_end @@ -2013,12 +2013,12 @@ void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me ) // make sure we're on a note if( nv.size() > 0 ) { - note * closest = NULL; + Note * closest = NULL; int closest_dist = 9999999; // if we caught multiple notes, find the closest... if( nv.size() > 1 ) { - foreach( note * i, nv ) + foreach( Note * i, nv ) { const int dist = qAbs( i->pos().getTicks() - ticks_middle ); if( dist < closest_dist ) { closest = i; closest_dist = dist; } @@ -2045,7 +2045,7 @@ void PianoRoll::mouseDoubleClickEvent( QMouseEvent * _me ) -void PianoRoll::testPlayNote( note * n ) +void PianoRoll::testPlayNote( Note * n ) { m_lastKey = n->key(); @@ -2431,7 +2431,7 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * _me ) NoteVector::ConstIterator it = notes.begin()+notes.size()-1; for( int i = 0; i < notes.size(); ++i ) { - note * n = *it; + Note * n = *it; if( n->pos().getTicks() >= ticks_start && n->pos().getTicks() <= ticks_end && n->length().getTicks() != 0 @@ -3512,7 +3512,7 @@ void PianoRoll::wheelEvent( QWheelEvent * _we ) // go through notes to figure out which one we want to change NoteVector nv; - foreach( note * i, notes ) + foreach( Note * i, notes ) { if( i->pos().getTicks() >= ticks_start && i->pos().getTicks() <= ticks_end @@ -3527,7 +3527,7 @@ void PianoRoll::wheelEvent( QWheelEvent * _we ) const int step = _we->delta() > 0 ? 1.0 : -1.0; if( m_noteEditMode == NoteEditVolume ) { - foreach( note * n, nv ) + foreach( Note * n, nv ) { volume_t vol = tLimit( n->getVolume() + step, MinVolume, MaxVolume ); n->setVolume( vol ); @@ -3536,7 +3536,7 @@ void PianoRoll::wheelEvent( QWheelEvent * _we ) } else if( m_noteEditMode == NoteEditPanning ) { - foreach( note * n, nv ) + foreach( Note * n, nv ) { panning_t pan = tLimit( n->getPanning() + step, PanningLeft, PanningRight ); n->setPanning( pan ); @@ -3738,7 +3738,7 @@ void PianoRoll::stop() -void PianoRoll::startRecordNote( const note & _n ) +void PianoRoll::startRecordNote( const Note & _n ) { if( m_recording == true && hasValidPattern() == true && Engine::getSong()->isPlaying() && @@ -3752,7 +3752,7 @@ void PianoRoll::startRecordNote( const note & _n ) { sub = m_pattern->startPosition(); } - note n( 1, Engine::getSong()->getPlayPos( + Note n( 1, Engine::getSong()->getPlayPos( Engine::getSong()->playMode() ) - sub, _n.key(), _n.getVolume(), _n.getPanning() ); if( n.pos() >= 0 ) @@ -3765,7 +3765,7 @@ void PianoRoll::startRecordNote( const note & _n ) -void PianoRoll::finishRecordNote( const note & _n ) +void PianoRoll::finishRecordNote( const Note & _n ) { if( m_recording == true && hasValidPattern() == true && Engine::getSong()->isPlaying() && @@ -3774,12 +3774,12 @@ void PianoRoll::finishRecordNote( const note & _n ) Engine::getSong()->playMode() == Song::Mode_PlayPattern ) ) { - for( QList::Iterator it = m_recordingNotes.begin(); + for( QList::Iterator it = m_recordingNotes.begin(); it != m_recordingNotes.end(); ++it ) { if( it->key() == _n.key() ) { - note n( _n.length(), it->pos(), + Note n( _n.length(), it->pos(), it->key(), it->getVolume(), it->getPanning() ); n.quantizeLength( quantization() ); @@ -3943,7 +3943,7 @@ void PianoRoll::enterValue( NoteVector* nv ) if( ok ) { - foreach( note * n, *nv ) + foreach( Note * n, *nv ) { n->setVolume( new_val ); } @@ -3962,7 +3962,7 @@ void PianoRoll::enterValue( NoteVector* nv ) if( ok ) { - foreach( note * n, *nv ) + foreach( Note * n, *nv ) { n->setPanning( new_val ); } @@ -3983,7 +3983,7 @@ void PianoRoll::copy_to_clipboard( const NoteVector & _notes ) const for( NoteVector::ConstIterator it = _notes.begin(); it != _notes.end(); ++it ) { - note clip_note( **it ); + Note clip_note( **it ); clip_note.setPos( clip_note.pos( start_pos ) ); clip_note.saveState( dataFile, note_list ); } @@ -4058,7 +4058,7 @@ void PianoRoll::pasteNotes() { DataFile dataFile( value.toUtf8() ); - QDomNodeList list = dataFile.elementsByTagName( note::classNodeName() ); + QDomNodeList list = dataFile.elementsByTagName( Note::classNodeName() ); // remove selection and select the newly pasted notes clearSelectedNotes(); @@ -4071,7 +4071,7 @@ void PianoRoll::pasteNotes() for( int i = 0; !list.item( i ).isNull(); ++i ) { // create the note - note cur_note; + Note cur_note; cur_note.restoreState( list.item( i ).toElement() ); cur_note.setPos( cur_note.pos() + m_timeLine->pos() ); @@ -4278,7 +4278,7 @@ bool PianoRoll::mouseOverNote() -note * PianoRoll::noteUnderMouse() +Note * PianoRoll::noteUnderMouse() { QPoint pos = mapFromGlobal( QCursor::pos() ); diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 1fee7d06b..01d6a8b9e 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -256,7 +256,7 @@ void InstrumentTrack::processInEvent( const MidiEvent& event, const MidiTime& ti { nph = NotePlayHandleManager::acquire( this, offset, typeInfo::max() / 2, - note( MidiTime(), MidiTime(), event.key(), event.volume( midiPort()->baseVelocity() ) ), + Note( MidiTime(), MidiTime(), event.key(), event.volume( midiPort()->baseVelocity() ) ), NULL, event.channel(), NotePlayHandle::OriginMidiInput ); m_notes[event.key()] = nph; @@ -634,7 +634,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, } } - note * cur_note; + Note * cur_note; while( nit != notes.end() && ( cur_note = *nit )->pos() == cur_start ) { diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index e43b1d1ec..da8060313 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -79,7 +79,7 @@ Pattern::Pattern( const Pattern& other ) : { for( NoteVector::ConstIterator it = other.m_notes.begin(); it != other.m_notes.end(); ++it ) { - m_notes.push_back( new note( **it ) ); + m_notes.push_back( new Note( **it ) ); } init(); @@ -167,9 +167,9 @@ MidiTime Pattern::beatPatternLength() const return MidiTime( max_length ).nextFullTact() * MidiTime::ticksPerTact(); } -note * Pattern::addNote( const note & _new_note, const bool _quant_pos ) +Note * Pattern::addNote( const Note & _new_note, const bool _quant_pos ) { - note * new_note = new note( _new_note ); + Note * new_note = new Note( _new_note ); if( _quant_pos && Engine::pianoRoll() ) { new_note->quantizePos( Engine::pianoRoll()->quantization() ); @@ -213,7 +213,7 @@ note * Pattern::addNote( const note & _new_note, const bool _quant_pos ) -void Pattern::removeNote( const note * _note_to_del ) +void Pattern::removeNote( const Note * _note_to_del ) { instrumentTrack()->lock(); NoteVector::Iterator it = m_notes.begin(); @@ -240,7 +240,7 @@ void Pattern::removeNote( const note * _note_to_del ) // returns a pointer to the note at specified step, or NULL if note doesn't exist -note * Pattern::noteAtStep( int _step ) +Note * Pattern::noteAtStep( int _step ) { for( NoteVector::Iterator it = m_notes.begin(); it != m_notes.end(); ++it ) @@ -254,12 +254,12 @@ note * Pattern::noteAtStep( int _step ) } -note * Pattern::rearrangeNote( const note * _note_to_proc, +Note * Pattern::rearrangeNote( const Note * _note_to_proc, const bool _quant_pos ) { // just rearrange the position of the note by removing it and adding // a copy of it -> addNote inserts it at the correct position - note copy_of_note( *_note_to_proc ); + Note copy_of_note( *_note_to_proc ); removeNote( _note_to_proc ); return addNote( copy_of_note, _quant_pos ); @@ -270,7 +270,7 @@ note * Pattern::rearrangeNote( const note * _note_to_proc, void Pattern::rearrangeAllNotes() { // sort notes by start time - qSort(m_notes.begin(), m_notes.end(), note::lessThan ); + qSort(m_notes.begin(), m_notes.end(), Note::lessThan ); } @@ -397,7 +397,7 @@ void Pattern::loadSettings( const QDomElement & _this ) if( node.isElement() && !node.toElement().attribute( "metadata" ).toInt() ) { - note * n = new note; + Note * n = new Note; n->restoreState( node.toElement() ); m_notes.push_back( n ); } @@ -499,7 +499,7 @@ void Pattern::ensureBeatNotes() } if( found == false ) { - addNote( note( MidiTime( 0 ), MidiTime( ( i * + addNote( Note( MidiTime( 0 ), MidiTime( ( i * MidiTime::ticksPerTact() ) / MidiTime::stepsPerTact() ) ), false ); } @@ -773,7 +773,7 @@ void PatternView::mousePressEvent( QMouseEvent * _me ) return; } - note * n = m_pat->noteAtStep( step ); + Note * n = m_pat->noteAtStep( step ); // if note at step not found, ensureBeatNotes and try again if( n == NULL ) @@ -840,7 +840,7 @@ void PatternView::wheelEvent( QWheelEvent * _we ) int vol = 0; int len = 0; - note * n = m_pat->noteAtStep( step ); + Note * n = m_pat->noteAtStep( step ); if( n != NULL ) { vol = n->getVolume(); @@ -1083,7 +1083,7 @@ void PatternView::paintEvent( QPaintEvent * ) for( int it = 0; it < steps; it++ ) // go through all the steps in the beat pattern { - note * n = m_pat->noteAtStep( it ); + Note * n = m_pat->noteAtStep( it ); // figure out x and y coordinates for step graphic const int x = TCO_BORDER_WIDTH + static_cast( it * w / steps ); From fec779ff70948d69e6a58f3e8d96583966cb5e34 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:16:26 +0100 Subject: [PATCH 09/21] Rename project_version to ProjectVersion --- include/{project_version.h => ProjectVersion.h} | 14 +++++++------- src/core/DataFile.cpp | 4 ++-- .../{project_version.cpp => ProjectVersion.cpp} | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) rename include/{project_version.h => ProjectVersion.h} (74%) rename src/core/{project_version.cpp => ProjectVersion.cpp} (90%) diff --git a/include/project_version.h b/include/ProjectVersion.h similarity index 74% rename from include/project_version.h rename to include/ProjectVersion.h index 4be7f15a5..7326ce3c3 100644 --- a/include/project_version.h +++ b/include/ProjectVersion.h @@ -1,5 +1,5 @@ /* - * project_version.h - version compared in import upgrades + * ProjectVersion.h - version compared in import upgrades * * Copyright (c) 2007 Javier Serrano Polo * @@ -29,25 +29,25 @@ #include -class projectVersion : public QString +class ProjectVersion : public QString { public: - projectVersion( const QString & _s ) : + ProjectVersion( const QString & _s ) : QString( _s ) { } - static int compare( const projectVersion & _v1, - const projectVersion & _v2 ); + static int compare( const ProjectVersion & _v1, + const ProjectVersion & _v2 ); } ; -inline bool operator<( const projectVersion & _v1, const char * _str ) +inline bool operator<( const ProjectVersion & _v1, const char * _str ) { - return projectVersion::compare( _v1, projectVersion( _str ) ) < 0; + return ProjectVersion::compare( _v1, ProjectVersion( _str ) ) < 0; } diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 40fda6cff..3eec74935 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -36,7 +36,7 @@ #include "ConfigManager.h" -#include "project_version.h" +#include "ProjectVersion.h" #include "SongEditor.h" #include "Effect.h" #include "lmmsversion.h" @@ -327,7 +327,7 @@ void DataFile::cleanMetaNodes( QDomElement _de ) void DataFile::upgrade() { - projectVersion version = + ProjectVersion version = documentElement().attribute( "creatorversion" ). replace( "svn", "" ); diff --git a/src/core/project_version.cpp b/src/core/ProjectVersion.cpp similarity index 90% rename from src/core/project_version.cpp rename to src/core/ProjectVersion.cpp index 15b584e07..58e5ac541 100644 --- a/src/core/project_version.cpp +++ b/src/core/ProjectVersion.cpp @@ -1,5 +1,5 @@ /* - * project_version.cpp - compare versions in import upgrades + * ProjectVersion.cpp - compare versions in import upgrades * * Copyright (c) 2007 Javier Serrano Polo * Copyright (c) 2008 Tobias Doerffel @@ -26,13 +26,13 @@ -#include "project_version.h" +#include "ProjectVersion.h" -int projectVersion::compare( const projectVersion & _v1, - const projectVersion & _v2 ) +int ProjectVersion::compare( const ProjectVersion & _v1, + const ProjectVersion & _v2 ) { int n1, n2; From ac95123d417583e25151ee35f3145af0d85271f0 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:18:07 +0100 Subject: [PATCH 10/21] Rename timeLine to Timeline --- include/AutomationEditor.h | 4 +-- include/PianoRoll.h | 4 +-- include/Song.h | 4 +-- include/SongEditor.h | 4 +-- include/{timeline.h => Timeline.h} | 8 +++--- src/core/Song.cpp | 14 ++++----- src/core/{timeline.cpp => Timeline.cpp} | 38 ++++++++++++------------- src/gui/AutomationEditor.cpp | 4 +-- src/gui/PianoRoll.cpp | 6 ++-- src/gui/SongEditor.cpp | 6 ++-- 10 files changed, 46 insertions(+), 46 deletions(-) rename include/{timeline.h => Timeline.h} (94%) rename src/core/{timeline.cpp => Timeline.cpp} (90%) diff --git a/include/AutomationEditor.h b/include/AutomationEditor.h index 1479ca1b9..be0157ccc 100644 --- a/include/AutomationEditor.h +++ b/include/AutomationEditor.h @@ -43,7 +43,7 @@ class QScrollBar; class comboBox; class NotePlayHandle; -class timeLine; +class Timeline; class toolButton; @@ -258,7 +258,7 @@ private: editModes m_editMode; - timeLine * m_timeLine; + Timeline * m_timeLine; bool m_scrollBack; void drawCross( QPainter & _p ); diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 817ebde33..eec6ba2fb 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -47,7 +47,7 @@ class QSignalMapper; class comboBox; class NotePlayHandle; class Pattern; -class timeLine; +class Timeline; class toolButton; class PianoRoll : public QWidget, public SerializingObject @@ -350,7 +350,7 @@ private: bool m_mouseDownLeft; //true if left click is being held down bool m_mouseDownRight; //true if right click is being held down - timeLine * m_timeLine; + Timeline * m_timeLine; bool m_scrollBack; void copy_to_clipboard( const NoteVector & _notes ) const; diff --git a/include/Song.h b/include/Song.h index 70c226c46..d0dac5a9c 100644 --- a/include/Song.h +++ b/include/Song.h @@ -36,7 +36,7 @@ class AutomationTrack; class Pattern; -class timeLine; +class Timeline; const bpm_t MinTempo = 10; @@ -83,7 +83,7 @@ public: { return m_currentFrame; } - timeLine * m_timeLine; + Timeline * m_timeLine; bool m_timeLineUpdate; private: diff --git a/include/SongEditor.h b/include/SongEditor.h index 439c8d6b7..b1651bc01 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -38,7 +38,7 @@ class LcdSpinBox; class MeterDialog; class Song; class textFloat; -class timeLine; +class Timeline; class toolButton; class positionLine : public QWidget @@ -110,7 +110,7 @@ private: toolButton * m_stopButton; LcdSpinBox * m_tempoSpinBox; - timeLine * m_timeLine; + Timeline * m_timeLine; MeterDialog * m_timeSigDisplay; automatableSlider * m_masterVolumeSlider; diff --git a/include/timeline.h b/include/Timeline.h similarity index 94% rename from include/timeline.h rename to include/Timeline.h index bfde02b4e..b1811bb6a 100644 --- a/include/timeline.h +++ b/include/Timeline.h @@ -1,5 +1,5 @@ /* - * timeline.h - class timeLine, representing a time-line with position marker + * Timeline.h - class timeLine, representing a time-line with position marker * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -36,7 +36,7 @@ class nStateButton; class textFloat; -class timeLine : public QWidget, public JournallingObject +class Timeline : public QWidget, public JournallingObject { Q_OBJECT public: @@ -60,9 +60,9 @@ public: } ; - timeLine( int _xoff, int _yoff, float _ppt, Song::playPos & _pos, + Timeline( int _xoff, int _yoff, float _ppt, Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ); - virtual ~timeLine(); + virtual ~Timeline(); inline Song::playPos & pos() { diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 930259c88..f150129a2 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -60,7 +60,7 @@ #include "SongEditor.h" #include "templates.h" #include "text_float.h" -#include "timeline.h" +#include "Timeline.h" #include "PeakController.h" @@ -179,7 +179,7 @@ void Song::setTimeSignature() void Song::savePos() { - timeLine * tl = m_playPos[m_playMode].m_timeLine; + Timeline * 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; + Timeline * 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; + Timeline * 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 Timeline::BackToZero: m_playPos[m_playMode].setTicks( 0 ); m_elapsedMilliSeconds = 0; break; - case timeLine::BackToStart: + case Timeline::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 Timeline::KeepStopPosition: default: break; } diff --git a/src/core/timeline.cpp b/src/core/Timeline.cpp similarity index 90% rename from src/core/timeline.cpp rename to src/core/Timeline.cpp index 9bc004df8..c48571c6a 100644 --- a/src/core/timeline.cpp +++ b/src/core/Timeline.cpp @@ -1,5 +1,5 @@ /* - * timeline.cpp - class timeLine, representing a time-line with position marker + * Timeline.cpp - class timeLine, representing a time-line with position marker * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -31,7 +31,7 @@ #include -#include "timeline.h" +#include "Timeline.h" #include "embed.h" #include "Engine.h" #include "templates.h" @@ -45,12 +45,12 @@ #endif -QPixmap * timeLine::s_timeLinePixmap = NULL; -QPixmap * timeLine::s_posMarkerPixmap = NULL; -QPixmap * timeLine::s_loopPointBeginPixmap = NULL; -QPixmap * timeLine::s_loopPointEndPixmap = NULL; +QPixmap * Timeline::s_timeLinePixmap = NULL; +QPixmap * Timeline::s_posMarkerPixmap = NULL; +QPixmap * Timeline::s_loopPointBeginPixmap = NULL; +QPixmap * Timeline::s_loopPointEndPixmap = NULL; -timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, +Timeline::Timeline( const int _xoff, const int _yoff, const float _ppt, Song::playPos & _pos, const MidiTime & _begin, QWidget * _parent ) : QWidget( _parent ), @@ -109,7 +109,7 @@ timeLine::timeLine( const int _xoff, const int _yoff, const float _ppt, -timeLine::~timeLine() +Timeline::~Timeline() { if( Engine::songEditor() ) { @@ -121,7 +121,7 @@ timeLine::~timeLine() -void timeLine::addToolButtons( QWidget * _tool_bar ) +void Timeline::addToolButtons( QWidget * _tool_bar ) { nStateButton * autoScroll = new nStateButton( _tool_bar ); autoScroll->setGeneralToolTip( tr( "Enable/disable auto-scrolling" ) ); @@ -161,7 +161,7 @@ void timeLine::addToolButtons( QWidget * _tool_bar ) -void timeLine::saveSettings( QDomDocument & _doc, QDomElement & _this ) +void Timeline::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 Timeline::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 Timeline::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 Timeline::toggleAutoScroll( int _n ) { m_autoScroll = static_cast( _n ); } @@ -208,7 +208,7 @@ void timeLine::toggleAutoScroll( int _n ) -void timeLine::toggleLoopPoints( int _n ) +void Timeline::toggleLoopPoints( int _n ) { m_loopPoints = static_cast( _n ); update(); @@ -217,7 +217,7 @@ void timeLine::toggleLoopPoints( int _n ) -void timeLine::toggleBehaviourAtStop( int _n ) +void Timeline::toggleBehaviourAtStop( int _n ) { m_behaviourAtStop = static_cast( _n ); } @@ -225,7 +225,7 @@ void timeLine::toggleBehaviourAtStop( int _n ) -void timeLine::paintEvent( QPaintEvent * ) +void Timeline::paintEvent( QPaintEvent * ) { QPainter p( this ); @@ -274,7 +274,7 @@ void timeLine::paintEvent( QPaintEvent * ) -void timeLine::mousePressEvent( QMouseEvent* event ) +void Timeline::mousePressEvent( QMouseEvent* event ) { if( event->x() < m_xOffset ) { @@ -331,7 +331,7 @@ void timeLine::mousePressEvent( QMouseEvent* event ) -void timeLine::mouseMoveEvent( QMouseEvent* event ) +void Timeline::mouseMoveEvent( QMouseEvent* event ) { const MidiTime t = m_begin + static_cast( qMax( event->x() - m_xOffset - m_moveXOff, 0 ) * MidiTime::ticksPerTact() / m_ppt ); @@ -381,7 +381,7 @@ void timeLine::mouseMoveEvent( QMouseEvent* event ) -void timeLine::mouseReleaseEvent( QMouseEvent* event ) +void Timeline::mouseReleaseEvent( QMouseEvent* event ) { delete m_hint; m_hint = NULL; diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index b7c8c0845..1357dca3e 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -54,7 +54,7 @@ #include "pixmap_button.h" #include "templates.h" #include "gui_templates.h" -#include "timeline.h" +#include "Timeline.h" #include "tooltip.h" #include "tool_button.h" #include "text_float.h" @@ -132,7 +132,7 @@ AutomationEditor::AutomationEditor() : setAttribute( Qt::WA_OpaquePaintEvent, true ); // add time-line - m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt, + m_timeLine = new Timeline( VALUES_WIDTH, 32, m_ppt, Engine::getSong()->getPlayPos( Song::Mode_PlayAutomationPattern ), m_currentPosition, this ); diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 3e806c25b..1300aa72f 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -65,7 +65,7 @@ #include "SongEditor.h" #include "templates.h" #include "text_float.h" -#include "timeline.h" +#include "Timeline.h" #include "tool_button.h" #include "text_float.h" @@ -291,7 +291,7 @@ PianoRoll::PianoRoll() : setAttribute( Qt::WA_OpaquePaintEvent, true ); // add time-line - m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt, + m_timeLine = new Timeline( WHITE_KEY_WIDTH, 32, m_ppt, Engine::getSong()->getPlayPos( Song::Mode_PlayPattern ), m_currentPosition, this ); @@ -4166,7 +4166,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() == Timeline::AutoScrollEnabled ) || m_scrollBack == true ) { autoScroll( _t ); diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index c19d1883b..4755afb64 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -45,7 +45,7 @@ #include "MainWindow.h" #include "MeterDialog.h" #include "text_float.h" -#include "timeline.h" +#include "Timeline.h" #include "tool_button.h" #include "tooltip.h" #include "visualization_widget.h" @@ -91,7 +91,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 Timeline( widgetTotal, 32, pixelsPerTact(), m_song->m_playPos[Song::Mode_PlaySong], m_currentPosition, this ); @@ -717,7 +717,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() == Timeline::AutoScrollEnabled) || m_scrollBack == true ) { const int w = width() - widgetWidth From c33bef346a2b1c3713625ef60e128528eeea1e49 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:21:42 +0100 Subject: [PATCH 11/21] Rename automatable_button to AutomatableButton --- ...tomatable_button.h => AutomatableButton.h} | 16 +++++----- include/led_checkbox.h | 4 +-- include/pixmap_button.h | 4 +-- .../audio_file_processor.h | 2 +- plugins/lb302/lb302.cpp | 2 +- plugins/monstro/Monstro.h | 2 +- plugins/nes/Nes.h | 2 +- .../triple_oscillator/TripleOscillator.cpp | 2 +- plugins/watsyn/Watsyn.h | 2 +- ...table_button.cpp => AutomatableButton.cpp} | 32 +++++++++---------- src/gui/widgets/pixmap_button.cpp | 6 ++-- 11 files changed, 37 insertions(+), 37 deletions(-) rename include/{automatable_button.h => AutomatableButton.h} (83%) rename src/gui/widgets/{automatable_button.cpp => AutomatableButton.cpp} (84%) diff --git a/include/automatable_button.h b/include/AutomatableButton.h similarity index 83% rename from include/automatable_button.h rename to include/AutomatableButton.h index 43816b62c..1d0f69e2f 100644 --- a/include/automatable_button.h +++ b/include/AutomatableButton.h @@ -1,5 +1,5 @@ /* - * automatable_button.h - class automatableButton, the base for all buttons + * AutomatableButton.h - class automatableButton, the base for all buttons * * Copyright (c) 2006-2008 Tobias Doerffel * @@ -34,13 +34,13 @@ class automatableButtonGroup; -class EXPORT automatableButton : public QPushButton, public BoolModelView +class EXPORT AutomatableButton : public QPushButton, public BoolModelView { Q_OBJECT public: - automatableButton( QWidget * _parent, const QString & _name + AutomatableButton( QWidget * _parent, const QString & _name = QString::null ); - virtual ~automatableButton(); + virtual ~AutomatableButton(); inline void setCheckable( bool _on ) { @@ -87,10 +87,10 @@ public: = QString::null ); virtual ~automatableButtonGroup(); - void addButton( automatableButton * _btn ); - void removeButton( automatableButton * _btn ); + void addButton( AutomatableButton * _btn ); + void removeButton( AutomatableButton * _btn ); - void activateButton( automatableButton * _btn ); + void activateButton( AutomatableButton * _btn ); virtual void modelChanged(); @@ -100,7 +100,7 @@ private slots: private: - QList m_buttons; + QList m_buttons; } ; diff --git a/include/led_checkbox.h b/include/led_checkbox.h index 808774313..0ee8d369c 100644 --- a/include/led_checkbox.h +++ b/include/led_checkbox.h @@ -26,13 +26,13 @@ #ifndef LED_CHECKBOX_H #define LED_CHECKBOX_H -#include "automatable_button.h" +#include "AutomatableButton.h" class QPixmap; -class EXPORT ledCheckBox : public automatableButton +class EXPORT ledCheckBox : public AutomatableButton { Q_OBJECT public: diff --git a/include/pixmap_button.h b/include/pixmap_button.h index e08b91e2e..63095ab71 100644 --- a/include/pixmap_button.h +++ b/include/pixmap_button.h @@ -28,10 +28,10 @@ #include -#include "automatable_button.h" +#include "AutomatableButton.h" -class EXPORT pixmapButton : public automatableButton +class EXPORT pixmapButton : public AutomatableButton { Q_OBJECT public: diff --git a/plugins/audio_file_processor/audio_file_processor.h b/plugins/audio_file_processor/audio_file_processor.h index 964ee380f..1889ced85 100644 --- a/plugins/audio_file_processor/audio_file_processor.h +++ b/plugins/audio_file_processor/audio_file_processor.h @@ -34,7 +34,7 @@ #include "SampleBuffer.h" #include "knob.h" #include "pixmap_button.h" -#include "automatable_button.h" +#include "AutomatableButton.h" #include "combobox.h" diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index e10c5f05d..3d9fbda3c 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -29,7 +29,7 @@ */ #include "lb302.h" -#include "automatable_button.h" +#include "AutomatableButton.h" #include "Engine.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" diff --git a/plugins/monstro/Monstro.h b/plugins/monstro/Monstro.h index 8bbdcb83e..8b97df197 100644 --- a/plugins/monstro/Monstro.h +++ b/plugins/monstro/Monstro.h @@ -30,7 +30,7 @@ #include "Instrument.h" #include "InstrumentView.h" #include "AutomatableModel.h" -#include "automatable_button.h" +#include "AutomatableButton.h" #include "TempoSyncKnob.h" #include "NotePlayHandle.h" #include "pixmap_button.h" diff --git a/plugins/nes/Nes.h b/plugins/nes/Nes.h index 337d31c69..d76a90d2b 100644 --- a/plugins/nes/Nes.h +++ b/plugins/nes/Nes.h @@ -28,7 +28,7 @@ #include "Instrument.h" #include "InstrumentView.h" #include "AutomatableModel.h" -#include "automatable_button.h" +#include "AutomatableButton.h" #include "TempoSyncKnob.h" #include "NotePlayHandle.h" #include "pixmap_button.h" diff --git a/plugins/triple_oscillator/TripleOscillator.cpp b/plugins/triple_oscillator/TripleOscillator.cpp index 97bd18de7..154aeb666 100644 --- a/plugins/triple_oscillator/TripleOscillator.cpp +++ b/plugins/triple_oscillator/TripleOscillator.cpp @@ -28,7 +28,7 @@ #include #include "TripleOscillator.h" -#include "automatable_button.h" +#include "AutomatableButton.h" #include "debug.h" #include "Engine.h" #include "InstrumentTrack.h" diff --git a/plugins/watsyn/Watsyn.h b/plugins/watsyn/Watsyn.h index 7b2a09bb4..8f1a92098 100644 --- a/plugins/watsyn/Watsyn.h +++ b/plugins/watsyn/Watsyn.h @@ -30,7 +30,7 @@ #include "InstrumentView.h" #include "graph.h" #include "AutomatableModel.h" -#include "automatable_button.h" +#include "AutomatableButton.h" #include "TempoSyncKnob.h" #include "NotePlayHandle.h" #include "pixmap_button.h" diff --git a/src/gui/widgets/automatable_button.cpp b/src/gui/widgets/AutomatableButton.cpp similarity index 84% rename from src/gui/widgets/automatable_button.cpp rename to src/gui/widgets/AutomatableButton.cpp index 9c1e11328..8d1d3390d 100644 --- a/src/gui/widgets/automatable_button.cpp +++ b/src/gui/widgets/AutomatableButton.cpp @@ -1,5 +1,5 @@ /* - * automatable_button.cpp - implementation of class automatableButton and + * AutomatableButton.cpp - implementation of class automatableButton and * automatableButtonGroup * * Copyright (c) 2006-2011 Tobias Doerffel @@ -23,7 +23,7 @@ * */ -#include "automatable_button.h" +#include "AutomatableButton.h" #include #include @@ -36,7 +36,7 @@ -automatableButton::automatableButton( QWidget * _parent, +AutomatableButton::AutomatableButton( QWidget * _parent, const QString & _name ) : QPushButton( _parent ), BoolModelView( new BoolModel( false, NULL, _name, true ), this ), @@ -50,7 +50,7 @@ automatableButton::automatableButton( QWidget * _parent, -automatableButton::~automatableButton() +AutomatableButton::~AutomatableButton() { if( m_group != NULL ) { @@ -61,7 +61,7 @@ automatableButton::~automatableButton() -void automatableButton::modelChanged() +void AutomatableButton::modelChanged() { if( QPushButton::isChecked() != model()->value() ) { @@ -72,7 +72,7 @@ void automatableButton::modelChanged() -void automatableButton::update() +void AutomatableButton::update() { if( QPushButton::isChecked() != model()->value() ) { @@ -84,7 +84,7 @@ void automatableButton::update() -void automatableButton::contextMenuEvent( QContextMenuEvent * _me ) +void AutomatableButton::contextMenuEvent( QContextMenuEvent * _me ) { // for the case, the user clicked right while pressing left mouse- // button, the context-menu appears while mouse-cursor is still hidden @@ -110,7 +110,7 @@ void automatableButton::contextMenuEvent( QContextMenuEvent * _me ) -void automatableButton::mousePressEvent( QMouseEvent * _me ) +void AutomatableButton::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton && ! ( _me->modifiers() & Qt::ControlModifier ) ) @@ -147,7 +147,7 @@ void automatableButton::mousePressEvent( QMouseEvent * _me ) -void automatableButton::mouseReleaseEvent( QMouseEvent * _me ) +void AutomatableButton::mouseReleaseEvent( QMouseEvent * _me ) { if( _me && _me->button() == Qt::LeftButton ) { @@ -158,7 +158,7 @@ void automatableButton::mouseReleaseEvent( QMouseEvent * _me ) -void automatableButton::toggle() +void AutomatableButton::toggle() { if( isCheckable() && m_group != NULL ) { @@ -194,7 +194,7 @@ automatableButtonGroup::automatableButtonGroup( QWidget * _parent, automatableButtonGroup::~automatableButtonGroup() { - for( QList::iterator it = m_buttons.begin(); + for( QList::iterator it = m_buttons.begin(); it != m_buttons.end(); ++it ) { ( *it )->m_group = NULL; @@ -204,7 +204,7 @@ automatableButtonGroup::~automatableButtonGroup() -void automatableButtonGroup::addButton( automatableButton * _btn ) +void automatableButtonGroup::addButton( AutomatableButton * _btn ) { _btn->m_group = this; _btn->setCheckable( true ); @@ -221,7 +221,7 @@ void automatableButtonGroup::addButton( automatableButton * _btn ) -void automatableButtonGroup::removeButton( automatableButton * _btn ) +void automatableButtonGroup::removeButton( AutomatableButton * _btn ) { m_buttons.erase( qFind( m_buttons.begin(), m_buttons.end(), _btn ) ); _btn->m_group = NULL; @@ -230,13 +230,13 @@ void automatableButtonGroup::removeButton( automatableButton * _btn ) -void automatableButtonGroup::activateButton( automatableButton * _btn ) +void automatableButtonGroup::activateButton( AutomatableButton * _btn ) { if( _btn != m_buttons[model()->value()] && m_buttons.indexOf( _btn ) != -1 ) { model()->setValue( m_buttons.indexOf( _btn ) ); - foreach( automatableButton * btn, m_buttons ) + foreach( AutomatableButton * btn, m_buttons ) { btn->update(); } @@ -261,7 +261,7 @@ void automatableButtonGroup::updateButtons() { model()->setRange( 0, m_buttons.size() - 1 ); int i = 0; - foreach( automatableButton * btn, m_buttons ) + foreach( AutomatableButton * btn, m_buttons ) { btn->model()->setValue( i == model()->value() ); ++i; diff --git a/src/gui/widgets/pixmap_button.cpp b/src/gui/widgets/pixmap_button.cpp index fddbaf789..3f1d0f4fb 100644 --- a/src/gui/widgets/pixmap_button.cpp +++ b/src/gui/widgets/pixmap_button.cpp @@ -34,7 +34,7 @@ pixmapButton::pixmapButton( QWidget * _parent, const QString & _name ) : - automatableButton( _parent, _name ), + AutomatableButton( _parent, _name ), m_activePixmap(), m_inactivePixmap(), m_pressed( false ) @@ -83,7 +83,7 @@ void pixmapButton::mousePressEvent( QMouseEvent * _me ) update(); } - automatableButton::mousePressEvent( _me ); + AutomatableButton::mousePressEvent( _me ); } @@ -91,7 +91,7 @@ void pixmapButton::mousePressEvent( QMouseEvent * _me ) void pixmapButton::mouseReleaseEvent( QMouseEvent * _me ) { - automatableButton::mouseReleaseEvent( _me ); + AutomatableButton::mouseReleaseEvent( _me ); if( !isCheckable() ) { From 58ec27ef753f1a5e4df20469da3938ec99e77fa8 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:23:04 +0100 Subject: [PATCH 12/21] Rename automatable_slider to AutomatableSlider --- ...tomatable_slider.h => AutomatableSlider.h} | 8 +++---- include/SongEditor.h | 6 ++--- src/gui/SongEditor.cpp | 6 ++--- ...table_slider.cpp => AutomatableSlider.cpp} | 24 +++++++++---------- 4 files changed, 22 insertions(+), 22 deletions(-) rename include/{automatable_slider.h => AutomatableSlider.h} (87%) rename src/gui/widgets/{automatable_slider.cpp => AutomatableSlider.cpp} (79%) diff --git a/include/automatable_slider.h b/include/AutomatableSlider.h similarity index 87% rename from include/automatable_slider.h rename to include/AutomatableSlider.h index aac331750..1cd1405b1 100644 --- a/include/automatable_slider.h +++ b/include/AutomatableSlider.h @@ -1,5 +1,5 @@ /* - * automatable_slider.h - class automatableSlider, a QSlider with automation + * AutomatableSlider.h - class automatableSlider, a QSlider with automation * * Copyright (c) 2006-2008 Javier Serrano Polo * @@ -32,12 +32,12 @@ -class automatableSlider : public QSlider, public IntModelView +class AutomatableSlider : public QSlider, public IntModelView { Q_OBJECT public: - automatableSlider( QWidget * _parent, const QString & _name = QString::null ); - virtual ~automatableSlider(); + AutomatableSlider( QWidget * _parent, const QString & _name = QString::null ); + virtual ~AutomatableSlider(); bool showStatus() { diff --git a/include/SongEditor.h b/include/SongEditor.h index b1651bc01..5d876591b 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -32,7 +32,7 @@ class QLabel; class QScrollBar; -class automatableSlider; +class AutomatableSlider; class comboBox; class LcdSpinBox; class MeterDialog; @@ -113,8 +113,8 @@ private: Timeline * m_timeLine; MeterDialog * m_timeSigDisplay; - automatableSlider * m_masterVolumeSlider; - automatableSlider * m_masterPitchSlider; + AutomatableSlider * m_masterVolumeSlider; + AutomatableSlider * m_masterPitchSlider; textFloat * m_mvsStatus; textFloat * m_mpsStatus; diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index 4755afb64..9135cec1f 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -36,7 +36,7 @@ #include #include "SongEditor.h" -#include "automatable_slider.h" +#include "AutomatableSlider.h" #include "combobox.h" #include "ConfigManager.h" #include "cpuload_widget.h" @@ -154,7 +154,7 @@ SongEditor::SongEditor( Song * _song ) : QLabel * master_vol_lbl = new QLabel( tb ); master_vol_lbl->setPixmap( embed::getIconPixmap( "master_volume" ) ); - m_masterVolumeSlider = new automatableSlider( tb, + m_masterVolumeSlider = new AutomatableSlider( tb, tr( "Master volume" ) ); m_masterVolumeSlider->setModel( &m_song->m_masterVolumeModel ); m_masterVolumeSlider->setOrientation( Qt::Vertical ); @@ -188,7 +188,7 @@ SongEditor::SongEditor( Song * _song ) : master_pitch_lbl->setPixmap( embed::getIconPixmap( "master_pitch" ) ); master_pitch_lbl->setFixedHeight( 64 ); - m_masterPitchSlider = new automatableSlider( tb, tr( "Master pitch" ) ); + m_masterPitchSlider = new AutomatableSlider( tb, tr( "Master pitch" ) ); m_masterPitchSlider->setModel( &m_song->m_masterPitchModel ); m_masterPitchSlider->setOrientation( Qt::Vertical ); m_masterPitchSlider->setPageStep( 1 ); diff --git a/src/gui/widgets/automatable_slider.cpp b/src/gui/widgets/AutomatableSlider.cpp similarity index 79% rename from src/gui/widgets/automatable_slider.cpp rename to src/gui/widgets/AutomatableSlider.cpp index b604ce757..2e6ba0ac6 100644 --- a/src/gui/widgets/automatable_slider.cpp +++ b/src/gui/widgets/AutomatableSlider.cpp @@ -1,5 +1,5 @@ /* - * automatable_slider.cpp - implementation of class automatableSlider + * AutomatableSlider.cpp - implementation of class automatableSlider * * Copyright (c) 2006-2007 Javier Serrano Polo * Copyright (c) 2007-2009 Tobias Doerffel @@ -23,7 +23,7 @@ * */ -#include "automatable_slider.h" +#include "AutomatableSlider.h" #include #include @@ -36,7 +36,7 @@ -automatableSlider::automatableSlider( QWidget * _parent, +AutomatableSlider::AutomatableSlider( QWidget * _parent, const QString & _name ) : QSlider( _parent ), IntModelView( new IntModel( 0, 0, 0, NULL, _name, true ), this ), @@ -53,14 +53,14 @@ automatableSlider::automatableSlider( QWidget * _parent, -automatableSlider::~automatableSlider() +AutomatableSlider::~AutomatableSlider() { } -void automatableSlider::contextMenuEvent( QContextMenuEvent * _me ) +void AutomatableSlider::contextMenuEvent( QContextMenuEvent * _me ) { captionMenu contextMenu( model()->displayName() ); addDefaultActions( &contextMenu ); @@ -70,7 +70,7 @@ void automatableSlider::contextMenuEvent( QContextMenuEvent * _me ) -void automatableSlider::mousePressEvent( QMouseEvent * _me ) +void AutomatableSlider::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton && ! ( _me->modifiers() & Qt::ControlModifier ) ) @@ -87,7 +87,7 @@ void automatableSlider::mousePressEvent( QMouseEvent * _me ) -void automatableSlider::mouseReleaseEvent( QMouseEvent * _me ) +void AutomatableSlider::mouseReleaseEvent( QMouseEvent * _me ) { m_showStatus = false; QSlider::mouseReleaseEvent( _me ); @@ -96,7 +96,7 @@ void automatableSlider::mouseReleaseEvent( QMouseEvent * _me ) -void automatableSlider::wheelEvent( QWheelEvent * _me ) +void AutomatableSlider::wheelEvent( QWheelEvent * _me ) { bool old_status = m_showStatus; m_showStatus = true; @@ -107,7 +107,7 @@ void automatableSlider::wheelEvent( QWheelEvent * _me ) -void automatableSlider::modelChanged() +void AutomatableSlider::modelChanged() { QSlider::setRange( model()->minValue(), model()->maxValue() ); updateSlider(); @@ -118,7 +118,7 @@ void automatableSlider::modelChanged() -void automatableSlider::changeValue( int _value ) +void AutomatableSlider::changeValue( int _value ) { model()->setValue( _value ); emit logicValueChanged( model()->value() ); @@ -127,7 +127,7 @@ void automatableSlider::changeValue( int _value ) -void automatableSlider::moveSlider( int _value ) +void AutomatableSlider::moveSlider( int _value ) { model()->setValue( _value ); emit logicSliderMoved( model()->value() ); @@ -136,7 +136,7 @@ void automatableSlider::moveSlider( int _value ) -void automatableSlider::updateSlider() +void AutomatableSlider::updateSlider() { QSlider::setValue( model()->value() ); } From 35d880a4ce18ac2351485f6502a298dc9e6bc302 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:26:38 +0100 Subject: [PATCH 13/21] Rename caption_menu to CaptionMenu --- include/{caption_menu.h => CaptionMenu.h} | 8 ++++---- plugins/vibed/nine_button_selector.cpp | 4 ++-- plugins/vibed/vibed.cpp | 4 ++-- src/gui/LfoControllerDialog.cpp | 2 +- src/gui/PeakControllerDialog.cpp | 2 +- src/gui/PianoView.cpp | 4 ++-- src/gui/widgets/AutomatableButton.cpp | 6 +++--- src/gui/widgets/AutomatableSlider.cpp | 4 ++-- src/gui/widgets/{caption_menu.cpp => CaptionMenu.cpp} | 10 +++++----- src/gui/widgets/ControllerView.cpp | 4 ++-- src/gui/widgets/EffectView.cpp | 4 ++-- src/gui/widgets/FxLine.cpp | 4 ++-- src/gui/widgets/LcdSpinBox.cpp | 4 ++-- src/gui/widgets/combobox.cpp | 4 ++-- src/gui/widgets/fader.cpp | 4 ++-- src/gui/widgets/knob.cpp | 4 ++-- src/gui/widgets/tempo_sync_knob.cpp | 4 ++-- 17 files changed, 38 insertions(+), 38 deletions(-) rename include/{caption_menu.h => CaptionMenu.h} (87%) rename src/gui/widgets/{caption_menu.cpp => CaptionMenu.cpp} (87%) diff --git a/include/caption_menu.h b/include/CaptionMenu.h similarity index 87% rename from include/caption_menu.h rename to include/CaptionMenu.h index 8f5afb630..9e40d9be5 100644 --- a/include/caption_menu.h +++ b/include/CaptionMenu.h @@ -1,5 +1,5 @@ /* - * caption_menu.h - context menu with a caption + * CaptionMenu.h - context menu with a caption * * Copyright (c) 2007-2008 Javier Serrano Polo * @@ -33,12 +33,12 @@ /// /// \brief A context menu with a caption /// -class EXPORT captionMenu : public QMenu +class EXPORT CaptionMenu : public QMenu { Q_OBJECT public: - captionMenu( const QString & _title, QWidget * _parent = 0 ); - virtual ~captionMenu(); + CaptionMenu( const QString & _title, QWidget * _parent = 0 ); + virtual ~CaptionMenu(); /// /// \brief Adds a "Help" action displaying the Menu's parent's WhatsThis diff --git a/plugins/vibed/nine_button_selector.cpp b/plugins/vibed/nine_button_selector.cpp index 4fbdbf6c9..2bc9e1463 100644 --- a/plugins/vibed/nine_button_selector.cpp +++ b/plugins/vibed/nine_button_selector.cpp @@ -28,7 +28,7 @@ #include -#include "caption_menu.h" +#include "CaptionMenu.h" #include "embed.h" @@ -251,7 +251,7 @@ void nineButtonSelector::updateButton( int _new_button ) void nineButtonSelector::contextMenuEvent( QContextMenuEvent * ) { - captionMenu contextMenu( windowTitle(), this ); + CaptionMenu contextMenu( windowTitle(), this ); contextMenu.addHelpAction(); contextMenu.exec( QCursor::pos() ); } diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index 3368bebe7..8d08e6acf 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -32,7 +32,7 @@ #include "NotePlayHandle.h" #include "tooltip.h" #include "base64.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "Oscillator.h" #include "string_container.h" #include "templates.h" @@ -756,7 +756,7 @@ void vibedView::normalizeClicked() void vibedView::contextMenuEvent( QContextMenuEvent * ) { - captionMenu contextMenu( model()->displayName(), this ); + CaptionMenu contextMenu( model()->displayName(), this ); contextMenu.addHelpAction(); contextMenu.exec( QCursor::pos() ); diff --git a/src/gui/LfoControllerDialog.cpp b/src/gui/LfoControllerDialog.cpp index b1415f73f..693207bd9 100644 --- a/src/gui/LfoControllerDialog.cpp +++ b/src/gui/LfoControllerDialog.cpp @@ -29,7 +29,7 @@ #include #include -#include "caption_menu.h" +#include "CaptionMenu.h" #include "gui_templates.h" #include "embed.h" #include "Engine.h" diff --git a/src/gui/PeakControllerDialog.cpp b/src/gui/PeakControllerDialog.cpp index f657999ce..add8eb529 100644 --- a/src/gui/PeakControllerDialog.cpp +++ b/src/gui/PeakControllerDialog.cpp @@ -30,7 +30,7 @@ #include #include -#include "caption_menu.h" +#include "CaptionMenu.h" #include "gui_templates.h" #include "embed.h" #include "Engine.h" diff --git a/src/gui/PianoView.cpp b/src/gui/PianoView.cpp index 9e846d61f..64423c036 100644 --- a/src/gui/PianoView.cpp +++ b/src/gui/PianoView.cpp @@ -45,7 +45,7 @@ #include "PianoView.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "embed.h" #include "Engine.h" #include "gui_templates.h" @@ -419,7 +419,7 @@ void PianoView::contextMenuEvent( QContextMenuEvent * _me ) return; } - captionMenu contextMenu( tr( "Base note" ) ); + CaptionMenu contextMenu( tr( "Base note" ) ); AutomatableModelView amv( m_piano->instrumentTrack()->baseNoteModel(), &contextMenu ); amv.addDefaultActions( &contextMenu ); contextMenu.exec( QCursor::pos() ); diff --git a/src/gui/widgets/AutomatableButton.cpp b/src/gui/widgets/AutomatableButton.cpp index 8d1d3390d..7680ac894 100644 --- a/src/gui/widgets/AutomatableButton.cpp +++ b/src/gui/widgets/AutomatableButton.cpp @@ -28,7 +28,7 @@ #include #include -#include "caption_menu.h" +#include "CaptionMenu.h" #include "Engine.h" #include "embed.h" #include "MainWindow.h" @@ -94,13 +94,13 @@ void AutomatableButton::contextMenuEvent( QContextMenuEvent * _me ) if ( m_group != NULL ) { - captionMenu contextMenu( m_group->model()->displayName() ); + CaptionMenu contextMenu( m_group->model()->displayName() ); m_group->addDefaultActions( &contextMenu ); contextMenu.exec( QCursor::pos() ); } else { - captionMenu contextMenu( model()->displayName() ); + CaptionMenu contextMenu( model()->displayName() ); addDefaultActions( &contextMenu ); contextMenu.exec( QCursor::pos() ); } diff --git a/src/gui/widgets/AutomatableSlider.cpp b/src/gui/widgets/AutomatableSlider.cpp index 2e6ba0ac6..6a3d10640 100644 --- a/src/gui/widgets/AutomatableSlider.cpp +++ b/src/gui/widgets/AutomatableSlider.cpp @@ -28,7 +28,7 @@ #include #include -#include "caption_menu.h" +#include "CaptionMenu.h" #include "embed.h" #include "Engine.h" #include "MainWindow.h" @@ -62,7 +62,7 @@ AutomatableSlider::~AutomatableSlider() void AutomatableSlider::contextMenuEvent( QContextMenuEvent * _me ) { - captionMenu contextMenu( model()->displayName() ); + CaptionMenu contextMenu( model()->displayName() ); addDefaultActions( &contextMenu ); contextMenu.exec( QCursor::pos() ); } diff --git a/src/gui/widgets/caption_menu.cpp b/src/gui/widgets/CaptionMenu.cpp similarity index 87% rename from src/gui/widgets/caption_menu.cpp rename to src/gui/widgets/CaptionMenu.cpp index 2ae6b5a91..7c4deca6b 100644 --- a/src/gui/widgets/caption_menu.cpp +++ b/src/gui/widgets/CaptionMenu.cpp @@ -1,5 +1,5 @@ /* - * caption_menu.cpp - context menu with a caption + * CaptionMenu.cpp - context menu with a caption * * Copyright (c) 2007 Javier Serrano Polo * @@ -23,13 +23,13 @@ */ -#include "caption_menu.h" +#include "CaptionMenu.h" #include "embed.h" -captionMenu::captionMenu( const QString & _title, QWidget * _parent ) : +CaptionMenu::CaptionMenu( const QString & _title, QWidget * _parent ) : QMenu( _title, _parent ) { QAction * caption = addAction( _title ); @@ -39,14 +39,14 @@ captionMenu::captionMenu( const QString & _title, QWidget * _parent ) : -captionMenu::~captionMenu() +CaptionMenu::~CaptionMenu() { } -void captionMenu::addHelpAction() +void CaptionMenu::addHelpAction() { QWidget* parent = (QWidget*) this->parent(); diff --git a/src/gui/widgets/ControllerView.cpp b/src/gui/widgets/ControllerView.cpp index 6dc281935..0be6df17a 100644 --- a/src/gui/widgets/ControllerView.cpp +++ b/src/gui/widgets/ControllerView.cpp @@ -34,7 +34,7 @@ #include "ControllerView.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "ControllerDialog.h" #include "gui_templates.h" #include "embed.h" @@ -176,7 +176,7 @@ void ControllerView::modelChanged() void ControllerView::contextMenuEvent( QContextMenuEvent * ) { - QPointer contextMenu = new captionMenu( model()->displayName(), this ); + QPointer contextMenu = new CaptionMenu( model()->displayName(), this ); contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "&Remove this plugin" ), this, SLOT( deleteController() ) ); diff --git a/src/gui/widgets/EffectView.cpp b/src/gui/widgets/EffectView.cpp index 0036667e6..7bf1560fc 100644 --- a/src/gui/widgets/EffectView.cpp +++ b/src/gui/widgets/EffectView.cpp @@ -32,7 +32,7 @@ #include "EffectView.h" #include "DummyEffect.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "EffectControls.h" #include "EffectControlDialog.h" #include "embed.h" @@ -245,7 +245,7 @@ void EffectView::closeEffects() void EffectView::contextMenuEvent( QContextMenuEvent * ) { - QPointer contextMenu = new captionMenu( model()->displayName(), this ); + QPointer contextMenu = new CaptionMenu( model()->displayName(), this ); contextMenu->addAction( embed::getIconPixmap( "arp_up" ), tr( "Move &up" ), this, SLOT( moveUp() ) ); diff --git a/src/gui/widgets/FxLine.cpp b/src/gui/widgets/FxLine.cpp index 0304d3d8e..cc394acd9 100644 --- a/src/gui/widgets/FxLine.cpp +++ b/src/gui/widgets/FxLine.cpp @@ -37,7 +37,7 @@ #include "Engine.h" #include "SendButtonIndicator.h" #include "gui_templates.h" -#include "caption_menu.h" +#include "CaptionMenu.h" const int FxLine::FxLineHeight = 287; QPixmap * FxLine::s_sendBgArrow = NULL; @@ -183,7 +183,7 @@ void FxLine::mouseDoubleClickEvent( QMouseEvent * ) void FxLine::contextMenuEvent( QContextMenuEvent * ) { FxMixer * mix = Engine::fxMixer(); - QPointer contextMenu = new captionMenu( mix->effectChannel( m_channelIndex )->m_name, this ); + QPointer contextMenu = new CaptionMenu( mix->effectChannel( m_channelIndex )->m_name, this ); if( m_channelIndex != 0 ) // no move-options in master { contextMenu->addAction( tr( "Move &left" ), this, SLOT( moveChannelLeft() ) ); diff --git a/src/gui/widgets/LcdSpinBox.cpp b/src/gui/widgets/LcdSpinBox.cpp index 4d0eec342..afdf85943 100644 --- a/src/gui/widgets/LcdSpinBox.cpp +++ b/src/gui/widgets/LcdSpinBox.cpp @@ -32,7 +32,7 @@ #include #include "LcdSpinBox.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "Engine.h" #include "embed.h" #include "gui_templates.h" @@ -87,7 +87,7 @@ void LcdSpinBox::contextMenuEvent( QContextMenuEvent* event ) // an QApplication::restoreOverrideCursor()-call... mouseReleaseEvent( NULL ); - captionMenu contextMenu( model()->displayName() ); + CaptionMenu contextMenu( model()->displayName() ); addDefaultActions( &contextMenu ); contextMenu.exec( QCursor::pos() ); } diff --git a/src/gui/widgets/combobox.cpp b/src/gui/widgets/combobox.cpp index 8e857eb0f..18322ad02 100644 --- a/src/gui/widgets/combobox.cpp +++ b/src/gui/widgets/combobox.cpp @@ -34,7 +34,7 @@ #include #include -#include "caption_menu.h" +#include "CaptionMenu.h" #include "Engine.h" #include "embed.h" #include "gui_templates.h" @@ -113,7 +113,7 @@ void comboBox::contextMenuEvent( QContextMenuEvent * event ) return; } - captionMenu contextMenu( model()->displayName() ); + CaptionMenu contextMenu( model()->displayName() ); addDefaultActions( &contextMenu ); contextMenu.exec( QCursor::pos() ); } diff --git a/src/gui/widgets/fader.cpp b/src/gui/widgets/fader.cpp index 38d6fcbe8..69c2b023d 100644 --- a/src/gui/widgets/fader.cpp +++ b/src/gui/widgets/fader.cpp @@ -53,7 +53,7 @@ #include "fader.h" #include "embed.h" #include "Engine.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "ConfigManager.h" #include "text_float.h" #include "MainWindow.h" @@ -115,7 +115,7 @@ fader::~fader() void fader::contextMenuEvent( QContextMenuEvent * _ev ) { - captionMenu contextMenu( windowTitle() ); + CaptionMenu contextMenu( windowTitle() ); addDefaultActions( &contextMenu ); contextMenu.exec( QCursor::pos() ); _ev->accept(); diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp index 941a77f13..8fda84463 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/knob.cpp @@ -37,7 +37,7 @@ #include "lmms_math.h" #include "knob.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "ConfigManager.h" #include "ControllerConnection.h" #include "embed.h" @@ -481,7 +481,7 @@ void knob::contextMenuEvent( QContextMenuEvent * ) // an QApplication::restoreOverrideCursor()-call... mouseReleaseEvent( NULL ); - captionMenu contextMenu( model()->displayName(), this ); + CaptionMenu contextMenu( model()->displayName(), this ); addDefaultActions( &contextMenu ); contextMenu.addAction( QPixmap(), model()->isScaleLogarithmic() ? tr( "Set linear" ) : tr( "Set logarithmic" ), diff --git a/src/gui/widgets/tempo_sync_knob.cpp b/src/gui/widgets/tempo_sync_knob.cpp index 21149592a..b08961421 100644 --- a/src/gui/widgets/tempo_sync_knob.cpp +++ b/src/gui/widgets/tempo_sync_knob.cpp @@ -28,7 +28,7 @@ #include "TempoSyncKnob.h" #include "Engine.h" -#include "caption_menu.h" +#include "CaptionMenu.h" #include "embed.h" #include "MainWindow.h" #include "MeterDialog.h" @@ -83,7 +83,7 @@ void TempoSyncKnob::contextMenuEvent( QContextMenuEvent * ) { mouseReleaseEvent( NULL ); - captionMenu contextMenu( model()->displayName(), this ); + CaptionMenu contextMenu( model()->displayName(), this ); addDefaultActions( &contextMenu ); contextMenu.addSeparator(); From 5b77abd9a5418bdc0a56ee9e1a963ec6ba7ee27a Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 01:46:12 +0100 Subject: [PATCH 14/21] Rename fixes --- plugins/GigPlayer/GigPlayer.cpp | 18 +++++++++--------- plugins/MidiImport/MidiImport.cpp | 4 ++-- plugins/bit_invader/bit_invader.cpp | 2 +- plugins/carlabase/carla.cpp | 20 ++++++++++---------- plugins/papu/papu_instrument.cpp | 2 +- plugins/stk/mallets/mallets.cpp | 10 +++++----- plugins/vst_base/VstPlugin.cpp | 2 +- src/core/BufferManager.cpp | 4 ++-- src/core/SampleBuffer.cpp | 2 +- src/core/audio/AudioPortAudio.cpp | 2 +- src/gui/SongEditor.cpp | 2 +- src/gui/widgets/led_checkbox.cpp | 2 +- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index 34e404420..b0ca74785 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -37,12 +37,12 @@ #include "FileDialog.h" #include "GigPlayer.h" -#include "engine.h" +#include "Engine.h" #include "InstrumentTrack.h" #include "InstrumentPlayHandle.h" #include "NotePlayHandle.h" #include "knob.h" -#include "song.h" +#include "Song.h" #include "ConfigManager.h" #include "endian_handling.h" @@ -87,13 +87,13 @@ GigInstrument::GigInstrument( InstrumentTrack * _instrument_track ) : m_currentKeyDimension( 0 ) { InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, _instrument_track ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); updateSampleRate(); connect( &m_bankNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) ); connect( &m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatch() ) ); - connect( engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); + connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); } @@ -101,7 +101,7 @@ GigInstrument::GigInstrument( InstrumentTrack * _instrument_track ) : GigInstrument::~GigInstrument() { - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); freeInstance(); } @@ -316,8 +316,8 @@ void GigInstrument::playNote( NotePlayHandle * _n, sampleFrame * ) // the preferences) void GigInstrument::play( sampleFrame * _working_buffer ) { - const fpp_t frames = engine::mixer()->framesPerPeriod(); - const int rate = engine::mixer()->processingSampleRate(); + const fpp_t frames = Engine::mixer()->framesPerPeriod(); + const int rate = Engine::mixer()->processingSampleRate(); // Initialize to zeros std::memset( &_working_buffer[0][0], 0, DEFAULT_CHANNELS * frames * sizeof( float ) ); @@ -753,7 +753,7 @@ void GigInstrument::addSamples( GigNote & gignote, bool wantReleaseSample ) if( gignote.midiNote >= keyLow && gignote.midiNote <= keyHigh ) { float attenuation = pDimRegion->GetVelocityAttenuation( gignote.velocity ); - float length = (float) pSample->SamplesTotal / engine::mixer()->processingSampleRate(); + float length = (float) pSample->SamplesTotal / Engine::mixer()->processingSampleRate(); // TODO: sample panning? crossfade different layers? @@ -1094,7 +1094,7 @@ void GigInstrumentView::showFileDialog() if( f != "" ) { k->openFile( f ); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); } } diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index 215e79523..853decb32 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -109,9 +109,9 @@ bool MidiImport::tryImport( TrackContainer* tc ) "settings dialog and try again." ) ); } #else - if( engine::hasGUI() ) + if( Engine::hasGUI() ) { - QMessageBox::information( engine::mainWindow(), + QMessageBox::information( Engine::mainWindow(), tr( "Setup incomplete" ), tr( "You did not compile LMMS with support for " "SoundFont2 player, which is used to add default " diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index ec6bf6eed..93a14bbda 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -521,7 +521,7 @@ void bitInvaderView::usrWaveClicked() Engine::getSong()->setModified(); /* m_graph->model()->setWaveToNoise(); - engine::getSong()->setModified(); + Engine::getSong()->setModified(); // zero sample_shape for (int i = 0; i < sample_length; i++) { diff --git a/plugins/carlabase/carla.cpp b/plugins/carlabase/carla.cpp index 167a476d2..14c388a08 100644 --- a/plugins/carlabase/carla.cpp +++ b/plugins/carlabase/carla.cpp @@ -27,8 +27,8 @@ #define REAL_BUILD // FIXME this shouldn't be needed #include "CarlaHost.h" -#include "engine.h" -#include "song.h" +#include "Engine.h" +#include "Song.h" #include "gui_templates.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" @@ -181,14 +181,14 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D // we need a play-handle which cares for calling play() InstrumentPlayHandle * iph = new InstrumentPlayHandle( this, instrumentTrack ); - engine::mixer()->addPlayHandle( iph ); + Engine::mixer()->addPlayHandle( iph ); - connect(engine::mixer(), SIGNAL(sampleRateChanged()), this, SLOT(sampleRateChanged())); + connect(Engine::mixer(), SIGNAL(sampleRateChanged()), this, SLOT(sampleRateChanged())); } CarlaInstrument::~CarlaInstrument() { - engine::mixer()->removePlayHandles( instrumentTrack() ); + Engine::mixer()->removePlayHandles( instrumentTrack() ); if (fHost.resourceDir != NULL) { @@ -218,12 +218,12 @@ CarlaInstrument::~CarlaInstrument() uint32_t CarlaInstrument::handleGetBufferSize() const { - return engine::mixer()->framesPerPeriod(); + return Engine::mixer()->framesPerPeriod(); } double CarlaInstrument::handleGetSampleRate() const { - return engine::mixer()->processingSampleRate(); + return Engine::mixer()->processingSampleRate(); } bool CarlaInstrument::handleIsOffline() const @@ -317,7 +317,7 @@ void CarlaInstrument::loadSettings(const QDomElement& elem) void CarlaInstrument::play(sampleFrame* workingBuffer) { - const uint bufsize = engine::mixer()->framesPerPeriod(); + const uint bufsize = Engine::mixer()->framesPerPeriod(); std::memset(workingBuffer, 0, sizeof(sample_t)*bufsize*DEFAULT_CHANNELS); @@ -328,9 +328,9 @@ void CarlaInstrument::play(sampleFrame* workingBuffer) } // set time info - song* const s = engine::getSong(); + song* const s = Engine::getSong(); fTimeInfo.playing = s->isPlaying(); - fTimeInfo.frame = s->getPlayPos(s->playMode()).frames(engine::framesPerTick()); + fTimeInfo.frame = s->getPlayPos(s->playMode()).frames(Engine::framesPerTick()); fTimeInfo.usecs = s->getMilliseconds()*1000; fTimeInfo.bbt.bar = s->getTacts() + 1; fTimeInfo.bbt.beat = s->getBeat() + 1; diff --git a/plugins/papu/papu_instrument.cpp b/plugins/papu/papu_instrument.cpp index fc5ff38b7..9b4ad4bde 100644 --- a/plugins/papu/papu_instrument.cpp +++ b/plugins/papu/papu_instrument.cpp @@ -215,7 +215,7 @@ QString papuInstrument::nodeName() const /*f_cnt_t papuInstrument::desiredReleaseFrames() const { - const float samplerate = engine::mixer()->processingSampleRate(); + const float samplerate = Engine::mixer()->processingSampleRate(); int maxrel = 0; for( int i = 0 ; i < 3 ; ++i ) { diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index d3ada3829..d34bde876 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -32,7 +32,7 @@ #include "ModalBar.h" #include "TubeBell.h" -#include "engine.h" +#include "Engine.h" #include "gui_templates.h" #include "InstrumentTrack.h" @@ -82,7 +82,7 @@ malletsInstrument::malletsInstrument( InstrumentTrack * _instrument_track ): + "sinewave.raw" ).exists() ) { // try to inform user about missing Stk-installation - if( m_filesMissing && engine::hasGUI() ) + if( m_filesMissing && Engine::hasGUI() ) { QMessageBox::information( 0, tr( "Missing files" ), tr( "Your Stk-installation seems to be " @@ -233,7 +233,7 @@ void malletsInstrument::playNote( NotePlayHandle * _n, m_vibratoFreqModel.value(), p, (uint8_t) m_spreadModel.value(), - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate() ); } else if( p == 9 ) { @@ -246,7 +246,7 @@ void malletsInstrument::playNote( NotePlayHandle * _n, m_lfoSpeedModel.value(), m_adsrModel.value(), (uint8_t) m_spreadModel.value(), - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate() ); } else { @@ -259,7 +259,7 @@ void malletsInstrument::playNote( NotePlayHandle * _n, m_strikeModel.value() * 128.0, m_velocityModel.value(), (uint8_t) m_spreadModel.value(), - engine::mixer()->processingSampleRate() ); + Engine::mixer()->processingSampleRate() ); } m.unlock(); } diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index f6a38adc8..0cc604d63 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -188,7 +188,7 @@ void VstPlugin::tryLoad( const QString &remoteVstPluginExecutable ) { target->setFixedSize( m_pluginGeometry ); vstSubWin * sw = new vstSubWin( - engine::mainWindow()->workspace() ); + Engine::mainWindow()->workspace() ); sw->setWidget( helper ); helper->setWindowTitle( name() ); m_pluginWidget = helper; diff --git a/src/core/BufferManager.cpp b/src/core/BufferManager.cpp index b82b94e8f..cb38d45e9 100644 --- a/src/core/BufferManager.cpp +++ b/src/core/BufferManager.cpp @@ -99,12 +99,12 @@ void BufferManager::extend( int c ) MM_FREE( s_available ); s_available = tmp; - int cc = c * engine::mixer()->framesPerPeriod(); + int cc = c * Engine::mixer()->framesPerPeriod(); sampleFrame * b = MM_ALLOC( sampleFrame, cc ); for( int i = 0; i < c; ++i ) { s_available[ s_availableIndex.fetchAndAddOrdered( 1 ) + 1 ] = b; - b += engine::mixer()->framesPerPeriod(); + b += Engine::mixer()->framesPerPeriod(); } }*/ diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index 8ebbd9716..c685fd1cf 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -1111,7 +1111,7 @@ QString & SampleBuffer::toBase64( QString & _dst ) const /* FLAC__stream_encoder_set_do_exhaustive_model_search( flac_enc, true ); FLAC__stream_encoder_set_do_mid_side_stereo( flac_enc, true );*/ FLAC__stream_encoder_set_sample_rate( flac_enc, - engine::mixer()->sampleRate() ); + Engine::mixer()->sampleRate() ); QBuffer ba_writer; ba_writer.open( QBuffer::WriteOnly ); diff --git a/src/core/audio/AudioPortAudio.cpp b/src/core/audio/AudioPortAudio.cpp index 05edcbd87..b67ddab0c 100644 --- a/src/core/audio/AudioPortAudio.cpp +++ b/src/core/audio/AudioPortAudio.cpp @@ -232,7 +232,7 @@ void AudioPortAudio::applyQualitySettings() if( hqAudio() ) { - setSampleRate( engine::mixer()->processingSampleRate() ); + setSampleRate( Engine::mixer()->processingSampleRate() ); int samples = mixer()->framesPerPeriod(); PaError err = Pa_OpenStream( diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index 9135cec1f..26db6beac 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -137,7 +137,7 @@ SongEditor::SongEditor( Song * _song ) : connect( hq_btn, SIGNAL( toggled( bool ) ), this, SLOT( setHighQuality( bool ) ) ); hq_btn->setFixedWidth( 42 ); - engine::mainWindow()->addWidgetToToolBar( hq_btn, 1, col ); + Engine::mainWindow()->addWidgetToToolBar( hq_btn, 1, col ); #endif Engine::mainWindow()->addWidgetToToolBar( new TimeDisplayWidget, 1, tempoSpinBoxCol ); diff --git a/src/gui/widgets/led_checkbox.cpp b/src/gui/widgets/led_checkbox.cpp index 43ddb20bb..ec97c447f 100644 --- a/src/gui/widgets/led_checkbox.cpp +++ b/src/gui/widgets/led_checkbox.cpp @@ -41,7 +41,7 @@ static const QString names[ledCheckBox::NumColors] = //! @todo: in C++11, we can use delegating ctors #define DEFAULT_LEDCHECKBOX_INITIALIZER_LIST \ - automatableButton( _parent, _name ) + AutomatableButton( _parent, _name ) ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent, const QString & _name, LedColors _color ) : From 1bbf7455a44fe002c18bb350aa8cbaea1ce9ca09 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 10:09:49 +0100 Subject: [PATCH 15/21] =?UTF-8?q?Rename=20a=20lot=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/AudioDevice.h | 8 +- include/AudioPortAudio.h | 6 +- include/AutomationEditor.h | 38 ++-- include/BBTrackContainer.h | 2 +- include/{cpuload_widget.h => CPULoadWidget.h} | 8 +- include/{combobox.h => ComboBox.h} | 8 +- include/ControllerConnectionDialog.h | 18 +- include/ControllerView.h | 2 +- include/EffectRackView.h | 4 +- include/EffectView.h | 10 +- include/Engine.h | 6 +- include/EnvelopeAndLfoView.h | 32 ++-- include/{fade_button.h => FadeButton.h} | 8 +- include/{fader.h => Fader.h} | 12 +- include/FxLine.h | 4 +- include/FxMixerView.h | 12 +- include/{graph.h => Graph.h} | 10 +- include/{group_box.h => GroupBox.h} | 14 +- include/InstrumentFunctionViews.h | 24 +-- include/InstrumentMidiIOView.h | 6 +- include/InstrumentSoundShapingView.h | 18 +- include/InstrumentTrack.h | 26 +-- include/{knob.h => Knob.h} | 14 +- include/{led_checkbox.h => LedCheckbox.h} | 10 +- include/LfoController.h | 16 +- include/MainWindow.h | 2 +- include/MidiClient.h | 6 +- include/{nstate_button.h => NStateButton.h} | 10 +- include/PeakController.h | 2 +- include/PianoRoll.h | 40 ++--- include/{pixmap_button.h => PixmapButton.h} | 8 +- include/{project_notes.h => ProjectNotes.h} | 8 +- include/{rename_dialog.h => RenameDialog.h} | 8 +- include/{rubberband.h => Rubberband.h} | 8 +- include/SampleTrack.h | 4 +- include/SongEditor.h | 30 ++-- include/{tab_bar.h => TabBar.h} | 8 +- include/{tab_widget.h => TabWidget.h} | 8 +- include/TempoSyncKnob.h | 4 +- include/{text_float.h => TextFloat.h} | 12 +- include/Timeline.h | 6 +- include/{tool_button.h => ToolButton.h} | 10 +- include/{tooltip.h => ToolTip.h} | 4 +- include/Track.h | 16 +- include/TrackContainerView.h | 2 +- ...rack_label_button.h => TrackLabelButton.h} | 8 +- ...ization_widget.h => VisualizationWidget.h} | 8 +- include/bb_editor.h | 10 +- include/bb_track.h | 4 +- include/setup_dialog.h | 4 +- plugins/Amplifier/AmplifierControlDialog.cpp | 8 +- plugins/Amplifier/AmplifierControls.h | 2 +- .../BassBooster/BassBoosterControlDialog.cpp | 6 +- plugins/BassBooster/BassBoosterControls.h | 2 +- .../DualFilter/DualFilterControlDialog.cpp | 24 +-- plugins/DualFilter/DualFilterControls.h | 2 +- plugins/GigPlayer/GigPlayer.cpp | 16 +- plugins/GigPlayer/GigPlayer.h | 12 +- plugins/LadspaEffect/LadspaControlDialog.cpp | 4 +- plugins/LadspaEffect/LadspaControlDialog.h | 4 +- .../SpectrumAnalyzerControlDialog.cpp | 6 +- .../SpectrumAnalyzerControls.h | 2 +- plugins/VstEffect/VstEffect.cpp | 4 +- plugins/VstEffect/VstEffectControlDialog.cpp | 24 +-- plugins/VstEffect/VstEffectControlDialog.h | 14 +- plugins/VstEffect/VstEffectControls.cpp | 8 +- plugins/VstEffect/VstEffectControls.h | 4 +- .../audio_file_processor.cpp | 32 ++-- .../audio_file_processor.h | 32 ++-- plugins/bit_invader/bit_invader.cpp | 56 +++--- plugins/bit_invader/bit_invader.h | 30 ++-- plugins/delay/delaycontrols.h | 2 +- plugins/delay/delaycontrolsdialog.cpp | 4 +- .../dynamics_processor_control_dialog.cpp | 46 ++--- .../dynamics_processor_controls.cpp | 2 +- .../dynamics_processor_controls.h | 4 +- plugins/flp_import/FlpImport.cpp | 8 +- plugins/kicker/kicker.cpp | 14 +- plugins/kicker/kicker.h | 28 +-- plugins/ladspa_browser/ladspa_browser.cpp | 4 +- plugins/ladspa_browser/ladspa_browser.h | 4 +- plugins/lb302/lb302.cpp | 92 +++++----- plugins/lb302/lb302.h | 24 +-- plugins/lb303/lb303.cpp | 24 +-- plugins/lb303/lb303.h | 28 +-- plugins/monstro/Monstro.cpp | 36 ++-- plugins/monstro/Monstro.h | 168 +++++++++--------- plugins/nes/Nes.cpp | 2 +- plugins/nes/Nes.h | 78 ++++---- plugins/opl2/opl2instrument.cpp | 16 +- plugins/opl2/opl2instrument.h | 72 ++++---- plugins/organic/organic.cpp | 22 +-- plugins/organic/organic.h | 30 ++-- plugins/papu/papu_instrument.cpp | 102 +++++------ plugins/papu/papu_instrument.h | 64 +++---- plugins/patman/patman.cpp | 16 +- plugins/patman/patman.h | 8 +- .../peak_controller_effect_control_dialog.cpp | 20 +-- .../peak_controller_effect_control_dialog.h | 20 +-- .../peak_controller_effect_controls.h | 2 +- plugins/sf2_player/sf2_player.cpp | 24 +-- plugins/sf2_player/sf2_player.h | 32 ++-- plugins/sfxr/sfxr.cpp | 20 +-- plugins/sfxr/sfxr.h | 78 ++++---- plugins/sid/sid_instrument.cpp | 96 +++++----- plugins/sid/sid_instrument.h | 52 +++--- .../stereoenhancer_control_dialog.cpp | 2 +- .../stereo_enhancer/stereoenhancer_controls.h | 2 +- .../stereomatrix_control_dialog.cpp | 8 +- plugins/stereo_matrix/stereomatrix_controls.h | 2 +- plugins/stk/mallets/mallets.cpp | 34 ++-- plugins/stk/mallets/mallets.h | 40 ++--- .../triple_oscillator/TripleOscillator.cpp | 102 +++++------ plugins/triple_oscillator/TripleOscillator.h | 36 ++-- plugins/vestige/vestige.cpp | 40 ++--- plugins/vestige/vestige.h | 18 +- plugins/vibed/nine_button_selector.cpp | 18 +- plugins/vibed/nine_button_selector.h | 8 +- plugins/vibed/vibed.cpp | 62 +++---- plugins/vibed/vibed.h | 46 ++--- plugins/watsyn/Watsyn.cpp | 106 +++++------ plugins/watsyn/Watsyn.h | 80 ++++----- .../waveshaper/waveshaper_control_dialog.cpp | 36 ++-- plugins/waveshaper/waveshaper_controls.cpp | 2 +- plugins/waveshaper/waveshaper_controls.h | 4 +- plugins/zynaddsubfx/ZynAddSubFx.cpp | 20 +-- plugins/zynaddsubfx/ZynAddSubFx.h | 20 +-- src/core/AutomationPattern.cpp | 4 +- src/core/BBTrackContainer.cpp | 2 +- src/core/Engine.cpp | 6 +- src/core/Song.cpp | 10 +- src/core/Timeline.cpp | 14 +- src/core/Track.cpp | 28 +-- src/core/audio/AudioPortAudio.cpp | 6 +- src/gui/AutomationEditor.cpp | 42 ++--- src/gui/AutomationPatternView.cpp | 8 +- src/gui/ControllerConnectionDialog.cpp | 22 +-- src/gui/FileBrowser.cpp | 4 +- src/gui/FxMixerView.cpp | 12 +- src/gui/LfoControllerDialog.cpp | 60 +++---- src/gui/MainWindow.cpp | 36 ++-- src/gui/PeakControllerDialog.cpp | 8 +- src/gui/PianoRoll.cpp | 46 ++--- src/gui/PianoView.cpp | 2 +- src/gui/SongEditor.cpp | 46 ++--- src/gui/TrackContainerView.cpp | 4 +- src/gui/bb_editor.cpp | 16 +- src/gui/setup_dialog.cpp | 66 +++---- .../{cpuload_widget.cpp => CPULoadWidget.cpp} | 12 +- .../widgets/{combobox.cpp => ComboBox.cpp} | 26 +-- src/gui/widgets/ControllerRackView.cpp | 2 +- src/gui/widgets/ControllerView.cpp | 4 +- src/gui/widgets/EffectRackView.cpp | 4 +- src/gui/widgets/EffectView.cpp | 14 +- src/gui/widgets/EnvelopeAndLfoView.cpp | 52 +++--- .../{fade_button.cpp => FadeButton.cpp} | 16 +- src/gui/widgets/{fader.cpp => Fader.cpp} | 52 +++--- src/gui/widgets/FxLine.cpp | 2 +- src/gui/widgets/{graph.cpp => Graph.cpp} | 42 ++--- .../widgets/{group_box.cpp => GroupBox.cpp} | 18 +- src/gui/widgets/InstrumentFunctionViews.cpp | 28 +-- src/gui/widgets/InstrumentMidiIOView.cpp | 10 +- .../widgets/InstrumentSoundShapingView.cpp | 18 +- src/gui/widgets/{knob.cpp => Knob.cpp} | 104 +++++------ src/gui/widgets/LadspaControlView.cpp | 18 +- .../{led_checkbox.cpp => LedCheckbox.cpp} | 20 +-- .../{nstate_button.cpp => NStateButton.cpp} | 22 +-- .../{pixmap_button.cpp => PixmapButton.cpp} | 20 +-- .../{project_notes.cpp => ProjectNotes.cpp} | 36 ++-- .../{rename_dialog.cpp => RenameDialog.cpp} | 12 +- .../{rubberband.cpp => Rubberband.cpp} | 14 +- src/gui/widgets/SideBar.cpp | 4 +- src/gui/widgets/{tab_bar.cpp => TabBar.cpp} | 30 ++-- .../widgets/{tab_widget.cpp => TabWidget.cpp} | 20 +-- ...{tempo_sync_knob.cpp => TempoSyncKnob.cpp} | 2 +- .../widgets/{text_float.cpp => TextFloat.cpp} | 28 +-- src/gui/widgets/TimeDisplayWidget.cpp | 4 +- .../{tool_button.cpp => ToolButton.cpp} | 22 +-- src/gui/widgets/{tooltip.cpp => ToolTip.cpp} | 6 +- ..._label_button.cpp => TrackLabelButton.cpp} | 24 +-- ...ion_widget.cpp => VisualizationWidget.cpp} | 20 +-- src/tracks/AutomationTrack.cpp | 4 +- src/tracks/InstrumentTrack.cpp | 32 ++-- src/tracks/Pattern.cpp | 8 +- src/tracks/SampleTrack.cpp | 12 +- src/tracks/bb_track.cpp | 8 +- 186 files changed, 1989 insertions(+), 1989 deletions(-) rename include/{cpuload_widget.h => CPULoadWidget.h} (88%) rename include/{combobox.h => ComboBox.h} (88%) rename include/{fade_button.h => FadeButton.h} (88%) rename include/{fader.h => Fader.h} (93%) rename include/{graph.h => Graph.h} (93%) rename include/{group_box.h => GroupBox.h} (84%) rename include/{knob.h => Knob.h} (94%) rename include/{led_checkbox.h => LedCheckbox.h} (87%) rename include/{nstate_button.h => NStateButton.h} (89%) rename include/{pixmap_button.h => PixmapButton.h} (90%) rename include/{project_notes.h => ProjectNotes.h} (92%) rename include/{rename_dialog.h => RenameDialog.h} (88%) rename include/{rubberband.h => Rubberband.h} (91%) rename include/{tab_bar.h => TabBar.h} (93%) rename include/{tab_widget.h => TabWidget.h} (91%) rename include/{text_float.h => TextFloat.h} (87%) rename include/{tool_button.h => ToolButton.h} (88%) rename include/{tooltip.h => ToolTip.h} (93%) rename include/{track_label_button.h => TrackLabelButton.h} (88%) rename include/{visualization_widget.h => VisualizationWidget.h} (87%) rename src/gui/widgets/{cpuload_widget.cpp => CPULoadWidget.cpp} (89%) rename src/gui/widgets/{combobox.cpp => ComboBox.cpp} (90%) rename src/gui/widgets/{fade_button.cpp => FadeButton.cpp} (88%) rename src/gui/widgets/{fader.cpp => Fader.cpp} (86%) rename src/gui/widgets/{graph.cpp => Graph.cpp} (94%) rename src/gui/widgets/{group_box.cpp => GroupBox.cpp} (89%) rename src/gui/widgets/{knob.cpp => Knob.cpp} (87%) rename src/gui/widgets/{led_checkbox.cpp => LedCheckbox.cpp} (84%) rename src/gui/widgets/{nstate_button.cpp => NStateButton.cpp} (79%) rename src/gui/widgets/{pixmap_button.cpp => PixmapButton.cpp} (78%) rename src/gui/widgets/{project_notes.cpp => ProjectNotes.cpp} (92%) rename src/gui/widgets/{rename_dialog.cpp => RenameDialog.cpp} (83%) rename src/gui/widgets/{rubberband.cpp => Rubberband.cpp} (85%) rename src/gui/widgets/{tab_bar.cpp => TabBar.cpp} (88%) rename src/gui/widgets/{tab_widget.cpp => TabWidget.cpp} (91%) rename src/gui/widgets/{tempo_sync_knob.cpp => TempoSyncKnob.cpp} (99%) rename src/gui/widgets/{text_float.cpp => TextFloat.cpp} (84%) rename src/gui/widgets/{tool_button.cpp => ToolButton.cpp} (80%) rename src/gui/widgets/{tooltip.cpp => ToolTip.cpp} (88%) rename src/gui/widgets/{track_label_button.cpp => TrackLabelButton.cpp} (82%) rename src/gui/widgets/{visualization_widget.cpp => VisualizationWidget.cpp} (88%) diff --git a/include/AudioDevice.h b/include/AudioDevice.h index ce83c3996..298279ddb 100644 --- a/include/AudioDevice.h +++ b/include/AudioDevice.h @@ -30,7 +30,7 @@ #include #include "Mixer.h" -#include "tab_widget.h" +#include "TabWidget.h" class AudioPort; @@ -90,12 +90,12 @@ public: - class setupWidget : public tabWidget + class setupWidget : public TabWidget { public: setupWidget( const QString & _caption, QWidget * _parent ) : - tabWidget( tabWidget::tr( "Settings for %1" ).arg( - tabWidget::tr( _caption.toLatin1() ) ). + TabWidget( TabWidget::tr( "Settings for %1" ).arg( + TabWidget::tr( _caption.toLatin1() ) ). toUpper(), _parent ) { } diff --git a/include/AudioPortAudio.h b/include/AudioPortAudio.h index 07993d434..b388f727a 100644 --- a/include/AudioPortAudio.h +++ b/include/AudioPortAudio.h @@ -56,7 +56,7 @@ public: #endif -class comboBox; +class ComboBox; class LcdSpinBox; @@ -86,8 +86,8 @@ public: virtual void saveSettings(); private: - comboBox * m_backend; - comboBox * m_device; + ComboBox * m_backend; + ComboBox * m_device; AudioPortAudioSetupUtil m_setupUtil; } ; diff --git a/include/AutomationEditor.h b/include/AutomationEditor.h index be0157ccc..83b0a022b 100644 --- a/include/AutomationEditor.h +++ b/include/AutomationEditor.h @@ -34,17 +34,17 @@ #include "MidiTime.h" #include "AutomationPattern.h" #include "ComboBoxModel.h" -#include "knob.h" +#include "Knob.h" class QPainter; class QPixmap; class QScrollBar; -class comboBox; +class ComboBox; class NotePlayHandle; class Timeline; -class toolButton; +class ToolButton; class AutomationEditor : public QWidget, public JournallingObject @@ -191,27 +191,27 @@ private: QWidget * m_toolBar; - toolButton * m_playButton; - toolButton * m_stopButton; + ToolButton * m_playButton; + ToolButton * m_stopButton; - toolButton * m_drawButton; - toolButton * m_eraseButton; - toolButton * m_selectButton; - toolButton * m_moveButton; + ToolButton * m_drawButton; + ToolButton * m_eraseButton; + ToolButton * m_selectButton; + ToolButton * m_moveButton; - toolButton * m_discreteButton; - toolButton * m_linearButton; - toolButton * m_cubicHermiteButton; - knob * m_tensionKnob; + ToolButton * m_discreteButton; + ToolButton * m_linearButton; + ToolButton * m_cubicHermiteButton; + Knob * m_tensionKnob; FloatModel * m_tensionModel; - toolButton * m_cutButton; - toolButton * m_copyButton; - toolButton * m_pasteButton; + ToolButton * m_cutButton; + ToolButton * m_copyButton; + ToolButton * m_pasteButton; - comboBox * m_zoomingXComboBox; - comboBox * m_zoomingYComboBox; - comboBox * m_quantizeComboBox; + ComboBox * m_zoomingXComboBox; + ComboBox * m_zoomingYComboBox; + ComboBox * m_quantizeComboBox; ComboBoxModel m_zoomingXModel; ComboBoxModel m_zoomingYModel; diff --git a/include/BBTrackContainer.h b/include/BBTrackContainer.h index 56173c602..691bea13c 100644 --- a/include/BBTrackContainer.h +++ b/include/BBTrackContainer.h @@ -27,7 +27,7 @@ #define BB_TRACK_CONTAINER_H #include "TrackContainer.h" -#include "combobox.h" +#include "ComboBox.h" class EXPORT BBTrackContainer : public TrackContainer diff --git a/include/cpuload_widget.h b/include/CPULoadWidget.h similarity index 88% rename from include/cpuload_widget.h rename to include/CPULoadWidget.h index b02a78c38..e15368519 100644 --- a/include/cpuload_widget.h +++ b/include/CPULoadWidget.h @@ -1,5 +1,5 @@ /* - * cpuload_widget.h - widget for displaying CPU-load (partly based on + * CPULoadWidget.h - widget for displaying CPU-load (partly based on * Hydrogen's CPU-load-widget) * * Copyright (c) 2005-2014 Tobias Doerffel @@ -34,12 +34,12 @@ #include "lmms_basics.h" -class cpuloadWidget : public QWidget +class CPULoadWidget : public QWidget { Q_OBJECT public: - cpuloadWidget( QWidget * _parent ); - virtual ~cpuloadWidget(); + CPULoadWidget( QWidget * _parent ); + virtual ~CPULoadWidget(); protected: diff --git a/include/combobox.h b/include/ComboBox.h similarity index 88% rename from include/combobox.h rename to include/ComboBox.h index 067c69a8d..fdfe12bf3 100644 --- a/include/combobox.h +++ b/include/ComboBox.h @@ -1,5 +1,5 @@ /* - * combobox.h - class ComboBox, a combo box view for models + * ComboBox.h - class ComboBox, a combo box view for models * * Copyright (c) 2006-2014 Tobias Doerffel * @@ -34,12 +34,12 @@ -class EXPORT comboBox : public QWidget, public IntModelView +class EXPORT ComboBox : public QWidget, public IntModelView { Q_OBJECT public: - comboBox( QWidget* parent = NULL, const QString& name = QString() ); - virtual ~comboBox(); + ComboBox( QWidget* parent = NULL, const QString& name = QString() ); + virtual ~ComboBox(); ComboBoxModel* model() { diff --git a/include/ControllerConnectionDialog.h b/include/ControllerConnectionDialog.h index d28b4e305..02a717abd 100644 --- a/include/ControllerConnectionDialog.h +++ b/include/ControllerConnectionDialog.h @@ -39,11 +39,11 @@ class QLineEdit; class QListView; class QScrollArea; class AutoDetectMidiController; -class comboBox; -class groupBox; -class tabWidget; +class ComboBox; +class GroupBox; +class TabWidget; class LcdSpinBox; -class ledCheckBox; +class LedCheckBox; class MidiPortMenu; @@ -76,19 +76,19 @@ protected slots: private: // Midi - groupBox * m_midiGroupBox; + GroupBox * m_midiGroupBox; LcdSpinBox * m_midiChannelSpinBox; LcdSpinBox * m_midiControllerSpinBox; - ledCheckBox * m_midiAutoDetectCheckBox; + LedCheckBox * m_midiAutoDetectCheckBox; MidiPortMenu * m_readablePorts; BoolModel m_midiAutoDetect; // User - groupBox * m_userGroupBox; - comboBox * m_userController; + GroupBox * m_userGroupBox; + ComboBox * m_userController; // Mapping - tabWidget * m_mappingBox; + TabWidget * m_mappingBox; QLineEdit * m_mappingFunction; Controller * m_controller; diff --git a/include/ControllerView.h b/include/ControllerView.h index 9e40590b2..f1d73c400 100644 --- a/include/ControllerView.h +++ b/include/ControllerView.h @@ -36,7 +36,7 @@ class QLabel; class QPushButton; class QMdiSubWindow; -class ledCheckBox; +class LedCheckBox; class ControllerView : public QWidget, public ModelView diff --git a/include/EffectRackView.h b/include/EffectRackView.h index a3a82a7ab..58d6bc3fc 100644 --- a/include/EffectRackView.h +++ b/include/EffectRackView.h @@ -36,7 +36,7 @@ class QScrollArea; class QVBoxLayout; class EffectView; -class groupBox; +class GroupBox; class EffectRackView : public QWidget, public ModelView @@ -75,7 +75,7 @@ private: QVector m_effectViews; - groupBox* m_effectsGroupBox; + GroupBox* m_effectsGroupBox; QScrollArea* m_scrollArea; int m_lastY; diff --git a/include/EffectView.h b/include/EffectView.h index 614a43939..c251a41ae 100644 --- a/include/EffectView.h +++ b/include/EffectView.h @@ -36,8 +36,8 @@ class QPushButton; class QMdiSubWindow; class EffectControlDialog; -class knob; -class ledCheckBox; +class Knob; +class LedCheckBox; class TempoSyncKnob; @@ -81,10 +81,10 @@ protected: private: QPixmap m_bg; - ledCheckBox * m_bypass; - knob * m_wetDry; + LedCheckBox * m_bypass; + Knob * m_wetDry; TempoSyncKnob * m_autoQuit; - knob * m_gate; + Knob * m_gate; QMdiSubWindow * m_subWindow; EffectControlDialog * m_controlView; diff --git a/include/Engine.h b/include/Engine.h index d0a708638..d317b52c4 100644 --- a/include/Engine.h +++ b/include/Engine.h @@ -43,7 +43,7 @@ class ProjectJournal; class MainWindow; class Mixer; class PianoRoll; -class projectNotes; +class ProjectNotes; class Song; class SongEditor; class Ladspa2LMMS; @@ -123,7 +123,7 @@ public: return s_pianoRoll; } - static projectNotes * getProjectNotes() + static ProjectNotes * getProjectNotes() { return s_projectNotes; } @@ -191,7 +191,7 @@ private: static AutomationEditor * s_automationEditor; static bbEditor * s_bbEditor; static PianoRoll* s_pianoRoll; - static projectNotes * s_projectNotes; + static ProjectNotes * s_projectNotes; static Ladspa2LMMS * s_ladspaManager; static QMap s_pluginFileHandling; diff --git a/include/EnvelopeAndLfoView.h b/include/EnvelopeAndLfoView.h index d62a85f04..f491ea7bf 100644 --- a/include/EnvelopeAndLfoView.h +++ b/include/EnvelopeAndLfoView.h @@ -36,9 +36,9 @@ class QPixmap; class EnvelopeAndLfoParameters; class automatableButtonGroup; -class knob; -class ledCheckBox; -class pixmapButton; +class Knob; +class LedCheckBox; +class PixmapButton; class TempoSyncKnob; @@ -72,24 +72,24 @@ private: // envelope stuff - knob * m_predelayKnob; - knob * m_attackKnob; - knob * m_holdKnob; - knob * m_decayKnob; - knob * m_sustainKnob; - knob * m_releaseKnob; - knob * m_amountKnob; + Knob * m_predelayKnob; + Knob * m_attackKnob; + Knob * m_holdKnob; + Knob * m_decayKnob; + Knob * m_sustainKnob; + Knob * m_releaseKnob; + Knob * m_amountKnob; // LFO stuff - knob * m_lfoPredelayKnob; - knob * m_lfoAttackKnob; + Knob * m_lfoPredelayKnob; + Knob * m_lfoAttackKnob; TempoSyncKnob * m_lfoSpeedKnob; - knob * m_lfoAmountKnob; - pixmapButton * m_userLfoBtn; + Knob * m_lfoAmountKnob; + PixmapButton * m_userLfoBtn; automatableButtonGroup * m_lfoWaveBtnGrp; - ledCheckBox * m_x100Cb; - ledCheckBox * m_controlEnvAmountCb; + LedCheckBox * m_x100Cb; + LedCheckBox * m_controlEnvAmountCb; float m_randomGraph; } ; diff --git a/include/fade_button.h b/include/FadeButton.h similarity index 88% rename from include/fade_button.h rename to include/FadeButton.h index c16fdf23e..6e7371f9f 100644 --- a/include/fade_button.h +++ b/include/FadeButton.h @@ -1,5 +1,5 @@ /* - * fade_button.h - declaration of class fadeButton + * FadeButton.h - declaration of class fadeButton * * Copyright (c) 2005-2009 Tobias Doerffel * @@ -31,14 +31,14 @@ #include -class fadeButton : public QAbstractButton +class FadeButton : public QAbstractButton { Q_OBJECT public: - fadeButton( const QColor & _normal_color, const QColor & + FadeButton( const QColor & _normal_color, const QColor & _activated_color, QWidget * _parent ); - virtual ~fadeButton(); + virtual ~FadeButton(); public slots: diff --git a/include/fader.h b/include/Fader.h similarity index 93% rename from include/fader.h rename to include/Fader.h index 4f4844463..efbc4ebf1 100644 --- a/include/fader.h +++ b/include/Fader.h @@ -1,5 +1,5 @@ /* - * fader.h - fader-widget used in FX-mixer - partly taken from Hydrogen + * Fader.h - fader-widget used in FX-mixer - partly taken from Hydrogen * * Copyright (c) 2008-2012 Tobias Doerffel * @@ -54,17 +54,17 @@ #include "AutomatableModelView.h" -class textFloat; +class TextFloat; -class fader : public QWidget, public FloatModelView +class Fader : public QWidget, public FloatModelView { Q_OBJECT public: Q_PROPERTY( QColor peakGreen READ peakGreen WRITE setPeakGreen ) Q_PROPERTY( QColor peakRed READ peakRed WRITE setPeakRed ) - fader( FloatModel * _model, const QString & _name, QWidget * _parent ); - virtual ~fader(); + Fader( FloatModel * _model, const QString & _name, QWidget * _parent ); + virtual ~Fader(); void setPeak_L( float fPeak ); float getPeak_L() { return m_fPeakValue_L; } @@ -116,7 +116,7 @@ private: int m_moveStartPoint; float m_startValue; - static textFloat * s_textFloat; + static TextFloat * s_textFloat; void updateTextFloat(); QColor m_peakGreen; diff --git a/include/FxLine.h b/include/FxLine.h index d540c8c5a..2cc479799 100644 --- a/include/FxLine.h +++ b/include/FxLine.h @@ -29,7 +29,7 @@ #include #include -#include "knob.h" +#include "Knob.h" #include "LcdWidget.h" #include "SendButtonIndicator.h" @@ -52,7 +52,7 @@ public: inline int channelIndex() { return m_channelIndex; } void setChannelIndex(int index); - knob * m_sendKnob; + Knob * m_sendKnob; SendButtonIndicator * m_sendBtn; QBrush backgroundActive() const; diff --git a/include/FxMixerView.h b/include/FxMixerView.h index a6735ca7a..e2cee4be6 100644 --- a/include/FxMixerView.h +++ b/include/FxMixerView.h @@ -34,9 +34,9 @@ #include "FxMixer.h" #include "ModelView.h" #include "Engine.h" -#include "fader.h" -#include "pixmap_button.h" -#include "tooltip.h" +#include "Fader.h" +#include "PixmapButton.h" +#include "ToolTip.h" #include "embed.h" #include "EffectRackView.h" @@ -54,9 +54,9 @@ public: FxChannelView(QWidget * _parent, FxMixerView * _mv, int _chIndex ); FxLine * m_fxLine; - pixmapButton * m_muteBtn; - pixmapButton * m_soloBtn; - fader * m_fader; + PixmapButton * m_muteBtn; + PixmapButton * m_soloBtn; + Fader * m_fader; EffectRackView * m_rackView; }; diff --git a/include/graph.h b/include/Graph.h similarity index 93% rename from include/graph.h rename to include/Graph.h index 054c7c355..018b0ff0d 100644 --- a/include/graph.h +++ b/include/Graph.h @@ -1,5 +1,5 @@ /* - * graph.h - a QT widget for displaying and manipulating waveforms + * Graph.h - a QT widget for displaying and manipulating waveforms * * Copyright (c) 2006-2007 Andreas Brandmaier * 2008 Paul Giblock @@ -38,7 +38,7 @@ class graphModel; -class EXPORT graph : public QWidget, public ModelView +class EXPORT Graph : public QWidget, public ModelView { Q_OBJECT public: @@ -51,11 +51,11 @@ public: NumGraphStyles }; - graph( QWidget * _parent, graphStyle _style = graph::LinearStyle, + Graph( QWidget * _parent, graphStyle _style = Graph::LinearStyle, int _width = 132, int _height = 104 ); - virtual ~graph(); + virtual ~Graph(); void setForeground( const QPixmap & _pixmap ); @@ -179,7 +179,7 @@ private: float m_maxValue; float m_step; - friend class graph; + friend class Graph; }; diff --git a/include/group_box.h b/include/GroupBox.h similarity index 84% rename from include/group_box.h rename to include/GroupBox.h index 9fcdae618..3b71c2dbd 100644 --- a/include/group_box.h +++ b/include/GroupBox.h @@ -1,5 +1,5 @@ /* - * group_box.h - LMMS-groupbox + * GroupBox.h - LMMS-groupbox * * Copyright (c) 2005-2008 Tobias Doerffel * @@ -29,22 +29,22 @@ #include #include "AutomatableModelView.h" -#include "pixmap_button.h" +#include "PixmapButton.h" class QPixmap; -class groupBox : public QWidget, public BoolModelView +class GroupBox : public QWidget, public BoolModelView { Q_OBJECT public: - groupBox( const QString & _caption, QWidget * _parent = NULL ); - virtual ~groupBox(); + GroupBox( const QString & _caption, QWidget * _parent = NULL ); + virtual ~GroupBox(); virtual void modelChanged(); - pixmapButton * ledButton() + PixmapButton * ledButton() { return m_led; } @@ -63,7 +63,7 @@ protected: private: void updatePixmap(); - pixmapButton * m_led; + PixmapButton * m_led; QString m_caption; const int m_titleBarHeight; diff --git a/include/InstrumentFunctionViews.h b/include/InstrumentFunctionViews.h index 05c285d18..c8c91f302 100644 --- a/include/InstrumentFunctionViews.h +++ b/include/InstrumentFunctionViews.h @@ -30,9 +30,9 @@ #include class QLabel; -class comboBox; -class groupBox; -class knob; +class ComboBox; +class GroupBox; +class Knob; class TempoSyncKnob; class InstrumentFunctionArpeggio; @@ -53,9 +53,9 @@ private: InstrumentFunctionNoteStacking * m_cc; - groupBox * m_chordsGroupBox; - comboBox * m_chordsComboBox; - knob * m_chordRangeKnob; + GroupBox * m_chordsGroupBox; + ComboBox * m_chordsComboBox; + Knob * m_chordRangeKnob; } ; @@ -75,14 +75,14 @@ private: virtual void modelChanged(); InstrumentFunctionArpeggio * m_a; - groupBox * m_arpGroupBox; - comboBox * m_arpComboBox; - knob * m_arpRangeKnob; + GroupBox * m_arpGroupBox; + ComboBox * m_arpComboBox; + Knob * m_arpRangeKnob; TempoSyncKnob * m_arpTimeKnob; - knob * m_arpGateKnob; + Knob * m_arpGateKnob; - comboBox * m_arpDirectionComboBox; - comboBox * m_arpModeComboBox; + ComboBox * m_arpDirectionComboBox; + ComboBox * m_arpModeComboBox; } ; diff --git a/include/InstrumentMidiIOView.h b/include/InstrumentMidiIOView.h index 70ce4c141..14437642b 100644 --- a/include/InstrumentMidiIOView.h +++ b/include/InstrumentMidiIOView.h @@ -31,7 +31,7 @@ #include "ModelView.h" -class groupBox; +class GroupBox; class LcdSpinBox; class QToolButton; @@ -46,12 +46,12 @@ public: private: virtual void modelChanged(); - groupBox * m_midiInputGroupBox; + GroupBox * m_midiInputGroupBox; LcdSpinBox * m_inputChannelSpinBox; LcdSpinBox * m_fixedInputVelocitySpinBox; QToolButton * m_rpBtn; - groupBox * m_midiOutputGroupBox; + GroupBox * m_midiOutputGroupBox; LcdSpinBox * m_outputChannelSpinBox; LcdSpinBox * m_fixedOutputVelocitySpinBox; LcdSpinBox * m_outputProgramSpinBox; diff --git a/include/InstrumentSoundShapingView.h b/include/InstrumentSoundShapingView.h index 59734ce76..8f87bb51c 100644 --- a/include/InstrumentSoundShapingView.h +++ b/include/InstrumentSoundShapingView.h @@ -33,10 +33,10 @@ class QLabel; class EnvelopeAndLfoView; -class comboBox; -class groupBox; -class knob; -class tabWidget; +class ComboBox; +class GroupBox; +class Knob; +class TabWidget; class InstrumentSoundShapingView : public QWidget, public ModelView @@ -54,14 +54,14 @@ private: InstrumentSoundShaping * m_ss; - tabWidget * m_targetsTabWidget; + TabWidget * m_targetsTabWidget; EnvelopeAndLfoView * m_envLfoViews[InstrumentSoundShaping::NumTargets]; // filter-stuff - groupBox * m_filterGroupBox; - comboBox * m_filterComboBox; - knob * m_filterCutKnob; - knob * m_filterResKnob; + GroupBox * m_filterGroupBox; + ComboBox * m_filterComboBox; + Knob * m_filterCutKnob; + Knob * m_filterResKnob; QLabel* m_singleStreamInfoLabel; diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index 1a64825a0..3aeb6f6ae 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -44,17 +44,17 @@ class InstrumentFunctionArpeggioView; class InstrumentFunctionNoteStackingView; class EffectRackView; class InstrumentSoundShapingView; -class fadeButton; +class FadeButton; class Instrument; class InstrumentTrackWindow; class InstrumentMidiIOView; -class knob; +class Knob; class LcdSpinBox; class midiPortMenu; class DataFile; class PluginView; -class tabWidget; -class trackLabelButton; +class TabWidget; +class TrackLabelButton; class EXPORT InstrumentTrack : public Track, public MidiEventProcessor @@ -321,10 +321,10 @@ private: static QQueue s_windowCache; // widgets in track-settings-widget - trackLabelButton * m_tlb; - knob * m_volumeKnob; - knob * m_panningKnob; - fadeButton * m_activityIndicator; + TrackLabelButton * m_tlb; + Knob * m_volumeKnob; + Knob * m_panningKnob; + FadeButton * m_activityIndicator; QMenu * m_midiMenu; @@ -350,7 +350,7 @@ public: virtual ~InstrumentTrackWindow(); // parent for all internal tab-widgets - tabWidget * tabWidgetParent() + TabWidget * tabWidgetParent() { return m_tabWidget; } @@ -406,15 +406,15 @@ private: // widgets on the top of an instrument-track-window QLineEdit * m_nameLineEdit; - knob * m_volumeKnob; - knob * m_panningKnob; - knob * m_pitchKnob; + Knob * m_volumeKnob; + Knob * m_panningKnob; + Knob * m_pitchKnob; LcdSpinBox* m_pitchRangeSpinBox; LcdSpinBox * m_effectChannelNumber; // tab-widget with all children - tabWidget * m_tabWidget; + TabWidget * m_tabWidget; PluginView * m_instrumentView; InstrumentSoundShapingView * m_ssView; InstrumentFunctionNoteStackingView* m_noteStackingView; diff --git a/include/knob.h b/include/Knob.h similarity index 94% rename from include/knob.h rename to include/Knob.h index 760302e3c..c41ebf08d 100644 --- a/include/knob.h +++ b/include/Knob.h @@ -1,5 +1,5 @@ /* - * knob.h - powerful knob-widget + * Knob.h - powerful knob-widget * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -34,7 +34,7 @@ class QPixmap; -class textFloat; +class TextFloat; enum knobTypes { @@ -43,7 +43,7 @@ enum knobTypes -class EXPORT knob : public QWidget, public FloatModelView +class EXPORT Knob : public QWidget, public FloatModelView { Q_OBJECT Q_ENUMS( knobTypes ) @@ -70,9 +70,9 @@ class EXPORT knob : public QWidget, public FloatModelView void onKnobNumUpdated(); //!< to be called when you updated @a m_knobNum public: - knob( knobTypes _knob_num, QWidget * _parent = NULL, const QString & _name = QString() ); - knob( QWidget * _parent = NULL, const QString & _name = QString() ); //!< default ctor - virtual ~knob(); + Knob( knobTypes _knob_num, QWidget * _parent = NULL, const QString & _name = QString() ); + Knob( QWidget * _parent = NULL, const QString & _name = QString() ); //!< default ctor + virtual ~Knob(); // TODO: remove inline void setHintText( const QString & _txt_before, @@ -161,7 +161,7 @@ private: } - static textFloat * s_textFloat; + static TextFloat * s_textFloat; QString m_label; diff --git a/include/led_checkbox.h b/include/LedCheckbox.h similarity index 87% rename from include/led_checkbox.h rename to include/LedCheckbox.h index 0ee8d369c..f2e215b2f 100644 --- a/include/led_checkbox.h +++ b/include/LedCheckbox.h @@ -1,5 +1,5 @@ /* - * led_checkbox.h - class ledCheckBox, an improved QCheckBox + * LedCheckbox.h - class LedCheckBox, an improved QCheckBox * * Copyright (c) 2005-2008 Tobias Doerffel * @@ -32,7 +32,7 @@ class QPixmap; -class EXPORT ledCheckBox : public AutomatableButton +class EXPORT LedCheckBox : public AutomatableButton { Q_OBJECT public: @@ -44,14 +44,14 @@ public: NumColors } ; - ledCheckBox( const QString & _txt, QWidget * _parent, + LedCheckBox( const QString & _txt, QWidget * _parent, const QString & _name = QString::null, LedColors _color = Yellow ); - ledCheckBox( QWidget * _parent, + LedCheckBox( QWidget * _parent, const QString & _name = QString::null, LedColors _color = Yellow ); - virtual ~ledCheckBox(); + virtual ~LedCheckBox(); inline const QString & text() diff --git a/include/LfoController.h b/include/LfoController.h index b00bdfcac..8cc5ec70f 100644 --- a/include/LfoController.h +++ b/include/LfoController.h @@ -35,10 +35,10 @@ #include "Oscillator.h" class automatableButtonGroup; -class knob; -class ledCheckBox; +class Knob; +class LedCheckBox; class TempoSyncKnob; -class pixmapButton; +class PixmapButton; class LfoController : public Controller @@ -103,17 +103,17 @@ protected: LfoController * m_lfo; - knob * m_baseKnob; + Knob * m_baseKnob; TempoSyncKnob * m_speedKnob; - knob * m_amountKnob; - knob * m_phaseKnob; - pixmapButton * m_userLfoBtn; + Knob * m_amountKnob; + Knob * m_phaseKnob; + PixmapButton * m_userLfoBtn; automatableButtonGroup * m_waveBtnGrp; automatableButtonGroup * m_multiplierBtnGrp; private: - pixmapButton * m_userWaveBtn; + PixmapButton * m_userWaveBtn; private slots: void askUserDefWave(); diff --git a/include/MainWindow.h b/include/MainWindow.h index 5a238ae34..5e9fb3254 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -37,7 +37,7 @@ class QMdiArea; class ConfigManager; class PluginView; -class toolButton; +class ToolButton; class MainWindow : public QMainWindow diff --git a/include/MidiClient.h b/include/MidiClient.h index 533c2b5e0..09e4a07ae 100644 --- a/include/MidiClient.h +++ b/include/MidiClient.h @@ -31,7 +31,7 @@ #include "MidiEvent.h" #include "MidiEventProcessor.h" -#include "tab_widget.h" +#include "TabWidget.h" class MidiPort; @@ -107,11 +107,11 @@ public: static MidiClient * openMidiClient(); - class setupWidget : public tabWidget + class setupWidget : public TabWidget { public: setupWidget( const QString & _caption, QWidget * _parent ) : - tabWidget( tabWidget::tr( "Settings for %1" ).arg( + TabWidget( TabWidget::tr( "Settings for %1" ).arg( tr( _caption.toLatin1() ) ).toUpper(), _parent ) { diff --git a/include/nstate_button.h b/include/NStateButton.h similarity index 89% rename from include/nstate_button.h rename to include/NStateButton.h index c146d63b6..37dcde1dd 100644 --- a/include/nstate_button.h +++ b/include/NStateButton.h @@ -1,5 +1,5 @@ /* - * nstate_button.h - declaration of class nStateButton + * NStateButton.h - declaration of class nStateButton * * Copyright (c) 2005 Tobias Doerffel * @@ -30,15 +30,15 @@ #include #include -#include "tool_button.h" +#include "ToolButton.h" -class nStateButton : public toolButton +class NStateButton : public ToolButton { Q_OBJECT public: - nStateButton( QWidget * _parent ); - virtual ~nStateButton(); + NStateButton( QWidget * _parent ); + virtual ~NStateButton(); void addState( const QPixmap & _pixmap, const QString & _tooltip = "" ); inline void setGeneralToolTip( const QString & _tooltip ) diff --git a/include/PeakController.h b/include/PeakController.h index fc9ea92d8..2b87ff09a 100644 --- a/include/PeakController.h +++ b/include/PeakController.h @@ -33,7 +33,7 @@ #include "ControllerDialog.h" class automatableButtonGroup; -class knob; +class Knob; class PeakControllerEffect; typedef QVector PeakControllerEffectVector; diff --git a/include/PianoRoll.h b/include/PianoRoll.h index eec6ba2fb..bd27bda2e 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -35,7 +35,7 @@ #include "Note.h" #include "lmms_basics.h" #include "Song.h" -#include "tooltip.h" +#include "ToolTip.h" class QPainter; class QPixmap; @@ -44,11 +44,11 @@ class QString; class QMenu; class QSignalMapper; -class comboBox; +class ComboBox; class NotePlayHandle; class Pattern; class Timeline; -class toolButton; +class ToolButton; class PianoRoll : public QWidget, public SerializingObject { @@ -262,29 +262,29 @@ private: static PianoRollKeyTypes prKeyOrder[]; - static textFloat * s_textFloat; + static TextFloat * s_textFloat; QWidget * m_toolBar; - toolButton * m_playButton; - toolButton * m_recordButton; - toolButton * m_recordAccompanyButton; - toolButton * m_stopButton; + ToolButton * m_playButton; + ToolButton * m_recordButton; + ToolButton * m_recordAccompanyButton; + ToolButton * m_stopButton; - toolButton * m_drawButton; - toolButton * m_eraseButton; - toolButton * m_selectButton; - toolButton * m_detuneButton; + ToolButton * m_drawButton; + ToolButton * m_eraseButton; + ToolButton * m_selectButton; + ToolButton * m_detuneButton; - toolButton * m_cutButton; - toolButton * m_copyButton; - toolButton * m_pasteButton; + ToolButton * m_cutButton; + ToolButton * m_copyButton; + ToolButton * m_pasteButton; - comboBox * m_zoomingComboBox; - comboBox * m_quantizeComboBox; - comboBox * m_noteLenComboBox; - comboBox * m_scaleComboBox; - comboBox * m_chordComboBox; + ComboBox * m_zoomingComboBox; + ComboBox * m_quantizeComboBox; + ComboBox * m_noteLenComboBox; + ComboBox * m_scaleComboBox; + ComboBox * m_chordComboBox; ComboBoxModel m_zoomingModel; ComboBoxModel m_quantizeModel; diff --git a/include/pixmap_button.h b/include/PixmapButton.h similarity index 90% rename from include/pixmap_button.h rename to include/PixmapButton.h index 63095ab71..7e02c4047 100644 --- a/include/pixmap_button.h +++ b/include/PixmapButton.h @@ -1,5 +1,5 @@ /* - * pixmap_button.h - declaration of class pixmapButton + * PixmapButton.h - declaration of class pixmapButton * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -31,13 +31,13 @@ #include "AutomatableButton.h" -class EXPORT pixmapButton : public AutomatableButton +class EXPORT PixmapButton : public AutomatableButton { Q_OBJECT public: - pixmapButton( QWidget * _parent, + PixmapButton( QWidget * _parent, const QString & _name = QString::null ); - virtual ~pixmapButton(); + virtual ~PixmapButton(); void setActiveGraphic( const QPixmap & _pm ); void setInactiveGraphic( const QPixmap & _pm, bool _update = true ); diff --git a/include/project_notes.h b/include/ProjectNotes.h similarity index 92% rename from include/project_notes.h rename to include/ProjectNotes.h index 9833294c1..80a6748da 100644 --- a/include/project_notes.h +++ b/include/ProjectNotes.h @@ -1,5 +1,5 @@ /* - * project_notes.h - header for project-notes-editor + * ProjectNotes.h - header for project-notes-editor * * Copyright (c) 2005-2007 Tobias Doerffel * @@ -36,12 +36,12 @@ class QTextCharFormat; class QTextEdit; -class EXPORT projectNotes : public QMainWindow, public SerializingObject +class EXPORT ProjectNotes : public QMainWindow, public SerializingObject { Q_OBJECT public: - projectNotes(); - virtual ~projectNotes(); + ProjectNotes(); + virtual ~ProjectNotes(); void clear(); void setText( const QString & _text ); diff --git a/include/rename_dialog.h b/include/RenameDialog.h similarity index 88% rename from include/rename_dialog.h rename to include/RenameDialog.h index dbaea7216..8c857e15d 100644 --- a/include/rename_dialog.h +++ b/include/RenameDialog.h @@ -1,5 +1,5 @@ /* - * rename_dialog.h - declaration of class renameDialog, a simple dialog for + * RenameDialog.h - declaration of class renameDialog, a simple dialog for * changing the content of a string * * Copyright (c) 2004-2005 Tobias Doerffel @@ -33,12 +33,12 @@ class QLineEdit; -class renameDialog : public QDialog +class RenameDialog : public QDialog { Q_OBJECT public: - renameDialog( QString & _string ); - ~renameDialog(); + RenameDialog( QString & _string ); + ~RenameDialog(); protected: diff --git a/include/rubberband.h b/include/Rubberband.h similarity index 91% rename from include/rubberband.h rename to include/Rubberband.h index dc437340a..7c8454f76 100644 --- a/include/rubberband.h +++ b/include/Rubberband.h @@ -1,5 +1,5 @@ /* - * rubberband.h - rubberband - either own implementation for Qt3 or wrapper for + * Rubberband.h - rubberband - either own implementation for Qt3 or wrapper for * Qt4 * * Copyright (c) 2006 Tobias Doerffel @@ -72,11 +72,11 @@ private: -class rubberBand : public QRubberBand +class RubberBand : public QRubberBand { public: - rubberBand( QWidget * _parent ); - virtual ~rubberBand(); + RubberBand( QWidget * _parent ); + virtual ~RubberBand(); QVector selectedObjects() const; diff --git a/include/SampleTrack.h b/include/SampleTrack.h index a776f821a..4912f90e3 100644 --- a/include/SampleTrack.h +++ b/include/SampleTrack.h @@ -31,7 +31,7 @@ #include "Track.h" class EffectRackView; -class knob; +class Knob; class SampleBuffer; @@ -180,7 +180,7 @@ protected: private: EffectRackView * m_effectRack; QWidget * m_effWindow; - knob * m_volumeKnob; + Knob * m_volumeKnob; } ; diff --git a/include/SongEditor.h b/include/SongEditor.h index 5d876591b..bb40155eb 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -33,13 +33,13 @@ class QLabel; class QScrollBar; class AutomatableSlider; -class comboBox; +class ComboBox; class LcdSpinBox; class MeterDialog; class Song; -class textFloat; +class TextFloat; class Timeline; -class toolButton; +class ToolButton; class positionLine : public QWidget { @@ -104,10 +104,10 @@ private: QWidget * m_toolBar; - toolButton * m_playButton; - toolButton * m_recordButton; - toolButton * m_recordAccompanyButton; - toolButton * m_stopButton; + ToolButton * m_playButton; + ToolButton * m_recordButton; + ToolButton * m_recordAccompanyButton; + ToolButton * m_stopButton; LcdSpinBox * m_tempoSpinBox; Timeline * m_timeLine; @@ -116,17 +116,17 @@ private: AutomatableSlider * m_masterVolumeSlider; AutomatableSlider * m_masterPitchSlider; - textFloat * m_mvsStatus; - textFloat * m_mpsStatus; + TextFloat * m_mvsStatus; + TextFloat * m_mpsStatus; - toolButton * m_addBBTrackButton; - toolButton * m_addSampleTrackButton; - toolButton * m_addAutomationTrackButton; + ToolButton * m_addBBTrackButton; + ToolButton * m_addSampleTrackButton; + ToolButton * m_addAutomationTrackButton; - toolButton * m_drawModeButton; - toolButton * m_editModeButton; + ToolButton * m_drawModeButton; + ToolButton * m_editModeButton; - comboBox * m_zoomingComboBox; + ComboBox * m_zoomingComboBox; positionLine * m_positionLine; diff --git a/include/tab_bar.h b/include/TabBar.h similarity index 93% rename from include/tab_bar.h rename to include/TabBar.h index e5deceb16..9cfe1dd96 100644 --- a/include/tab_bar.h +++ b/include/TabBar.h @@ -1,5 +1,5 @@ /* - * tab_bar.h - class tabBar + * TabBar.h - class tabBar * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -36,13 +36,13 @@ class tabButton; -class EXPORT tabBar : public QWidget +class EXPORT TabBar : public QWidget { Q_OBJECT public: - tabBar( QWidget * _parent, + TabBar( QWidget * _parent, QBoxLayout::Direction _dir = QBoxLayout::LeftToRight ); - virtual ~tabBar(); + virtual ~TabBar(); tabButton * addTab( QWidget * _w, const QString & _text, int _id, bool _add_stretch = false, diff --git a/include/tab_widget.h b/include/TabWidget.h similarity index 91% rename from include/tab_widget.h rename to include/TabWidget.h index aca714a79..1d5635c95 100644 --- a/include/tab_widget.h +++ b/include/TabWidget.h @@ -1,5 +1,5 @@ /* - * tab_widget.h - LMMS-tabwidget + * TabWidget.h - LMMS-tabwidget * * Copyright (c) 2005-2008 Tobias Doerffel * @@ -30,12 +30,12 @@ #include -class tabWidget : public QWidget +class TabWidget : public QWidget { Q_OBJECT public: - tabWidget( const QString & _caption, QWidget * _parent ); - virtual ~tabWidget(); + TabWidget( const QString & _caption, QWidget * _parent ); + virtual ~TabWidget(); void addTab( QWidget * _w, const QString & _name, int _idx = -1 ); diff --git a/include/TempoSyncKnob.h b/include/TempoSyncKnob.h index 656e88dc5..a19069901 100644 --- a/include/TempoSyncKnob.h +++ b/include/TempoSyncKnob.h @@ -29,12 +29,12 @@ #include #include -#include "knob.h" +#include "Knob.h" #include "TempoSyncKnobModel.h" class MeterDialog; -class EXPORT TempoSyncKnob : public knob +class EXPORT TempoSyncKnob : public Knob { Q_OBJECT public: diff --git a/include/text_float.h b/include/TextFloat.h similarity index 87% rename from include/text_float.h rename to include/TextFloat.h index f216917ac..c89c346b4 100644 --- a/include/text_float.h +++ b/include/TextFloat.h @@ -1,5 +1,5 @@ /* - * text_float.h - class textFloat, a floating text-label + * TextFloat.h - class textFloat, a floating text-label * * Copyright (c) 2005-2008 Tobias Doerffel * @@ -32,12 +32,12 @@ #include "export.h" -class EXPORT textFloat : public QWidget +class EXPORT TextFloat : public QWidget { Q_OBJECT public: - textFloat(); - virtual ~textFloat() + TextFloat(); + virtual ~TextFloat() { } @@ -48,11 +48,11 @@ public: void setVisibilityTimeOut( int _msecs ); - static textFloat * displayMessage( const QString & _msg, + static TextFloat * displayMessage( const QString & _msg, int _timeout = 2000, QWidget * _parent = NULL, int _add_y_margin = 0 ); - static textFloat * displayMessage( const QString & _title, + static TextFloat * displayMessage( const QString & _title, const QString & _msg, const QPixmap & _pixmap = QPixmap(), diff --git a/include/Timeline.h b/include/Timeline.h index b1811bb6a..78dc00ddc 100644 --- a/include/Timeline.h +++ b/include/Timeline.h @@ -32,8 +32,8 @@ class QPixmap; -class nStateButton; -class textFloat; +class NStateButton; +class TextFloat; class Timeline : public QWidget, public JournallingObject @@ -169,7 +169,7 @@ private: MidiTime m_savedPos; - textFloat * m_hint; + TextFloat * m_hint; enum actions diff --git a/include/tool_button.h b/include/ToolButton.h similarity index 88% rename from include/tool_button.h rename to include/ToolButton.h index 46f18569c..7e1183e14 100644 --- a/include/tool_button.h +++ b/include/ToolButton.h @@ -1,5 +1,5 @@ /* - * tool_button.h - declaration of class toolButton + * ToolButton.h - declaration of class toolButton * * Copyright (c) 2005-2006 Tobias Doerffel * @@ -30,15 +30,15 @@ #include -class toolButton : public QToolButton +class ToolButton : public QToolButton { Q_OBJECT public: - toolButton( const QPixmap & _pixmap, const QString & _tooltip, + ToolButton( const QPixmap & _pixmap, const QString & _tooltip, QObject * _receiver, const char * _slot, QWidget * _parent ); - inline toolButton( QWidget * _parent ) : + inline ToolButton( QWidget * _parent ) : QToolButton( _parent ), m_colorStandard( s_stdColor ), m_colorHighlighted( s_hlColor ) @@ -47,7 +47,7 @@ public: leaveEvent( NULL ); } - virtual ~toolButton(); + virtual ~ToolButton(); inline void setStandardColor( const QColor & _color ) { diff --git a/include/tooltip.h b/include/ToolTip.h similarity index 93% rename from include/tooltip.h rename to include/ToolTip.h index e0dfb735e..b543b3808 100644 --- a/include/tooltip.h +++ b/include/ToolTip.h @@ -1,5 +1,5 @@ /* - * tooltip.h - namespace toolTip, a tooltip-wrapper for LMMS + * ToolTip.h - namespace toolTip, a tooltip-wrapper for LMMS * * Copyright (c) 2005-2008 Tobias Doerffel * @@ -33,7 +33,7 @@ class QWidget; -struct toolTip +struct ToolTip { static void EXPORT add( QWidget * _w, const QString & _txt ); } ; diff --git a/include/Track.h b/include/Track.h index 944e9bd32..778e422b2 100644 --- a/include/Track.h +++ b/include/Track.h @@ -34,7 +34,7 @@ #include "lmms_basics.h" #include "MidiTime.h" -#include "rubberband.h" +#include "Rubberband.h" #include "JournallingObject.h" #include "AutomatableModel.h" #include "ModelView.h" @@ -44,8 +44,8 @@ class QMenu; class QPushButton; -class pixmapButton; -class textFloat; +class PixmapButton; +class TextFloat; class Track; class trackContentObjectView; class TrackContainer; @@ -243,7 +243,7 @@ private: ToggleSelected } ; - static textFloat * s_textFloat; + static TextFloat * s_textFloat; trackContentObject * m_tco; trackView * m_trackView; @@ -252,7 +252,7 @@ private: QPoint m_initialMousePos; QPoint m_initialMouseGlobalPos; - textFloat * m_hint; + TextFloat * m_hint; MidiTime m_oldTime;// used for undo/redo while mouse-button is pressed @@ -388,8 +388,8 @@ private: trackView * m_trackView; QPushButton * m_trackOps; - pixmapButton * m_muteBtn; - pixmapButton * m_soloBtn; + PixmapButton * m_muteBtn; + PixmapButton * m_soloBtn; friend class trackView; @@ -658,7 +658,7 @@ private: Actions m_action; - friend class trackLabelButton; + friend class TrackLabelButton; private slots: diff --git a/include/TrackContainerView.h b/include/TrackContainerView.h index 09b128a47..f4762f873 100644 --- a/include/TrackContainerView.h +++ b/include/TrackContainerView.h @@ -172,7 +172,7 @@ private: float m_ppt; - rubberBand * m_rubberBand; + RubberBand * m_rubberBand; QPoint m_origin; diff --git a/include/track_label_button.h b/include/TrackLabelButton.h similarity index 88% rename from include/track_label_button.h rename to include/TrackLabelButton.h index a5e2a0acb..5dcb9ad13 100644 --- a/include/track_label_button.h +++ b/include/TrackLabelButton.h @@ -1,5 +1,5 @@ /* - * track_label_button.h - class trackLabelButton + * TrackLabelButton.h - class trackLabelButton * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -32,12 +32,12 @@ class trackView; -class trackLabelButton : public QToolButton +class TrackLabelButton : public QToolButton { Q_OBJECT public: - trackLabelButton( trackView * _tv, QWidget * _parent ); - virtual ~trackLabelButton(); + TrackLabelButton( trackView * _tv, QWidget * _parent ); + virtual ~TrackLabelButton(); public slots: diff --git a/include/visualization_widget.h b/include/VisualizationWidget.h similarity index 87% rename from include/visualization_widget.h rename to include/VisualizationWidget.h index b0a8e5edf..12922ffc6 100644 --- a/include/visualization_widget.h +++ b/include/VisualizationWidget.h @@ -1,5 +1,5 @@ /* - * visualization_widget.h - widget for visualization of sound-data + * VisualizationWidget.h - widget for visualization of sound-data * * Copyright (c) 2005-2008 Tobias Doerffel * @@ -32,7 +32,7 @@ #include "Mixer.h" -class visualizationWidget : public QWidget +class VisualizationWidget : public QWidget { Q_OBJECT public: @@ -41,9 +41,9 @@ public: Simple // add more here } ; - visualizationWidget( const QPixmap & _bg, QWidget * _parent, + VisualizationWidget( const QPixmap & _bg, QWidget * _parent, visualizationTypes _vtype = Simple ); - virtual ~visualizationWidget(); + virtual ~VisualizationWidget(); void setActive( bool _active ); diff --git a/include/bb_editor.h b/include/bb_editor.h index 6d2100e84..adaf8600a 100644 --- a/include/bb_editor.h +++ b/include/bb_editor.h @@ -30,8 +30,8 @@ class BBTrackContainer; -class comboBox; -class toolButton; +class ComboBox; +class ToolButton; class bbEditor : public TrackContainerView @@ -67,10 +67,10 @@ private: BBTrackContainer * m_bbtc; QWidget * m_toolBar; - toolButton * m_playButton; - toolButton * m_stopButton; + ToolButton * m_playButton; + ToolButton * m_stopButton; - comboBox * m_bbComboBox; + ComboBox * m_bbComboBox; } ; diff --git a/include/bb_track.h b/include/bb_track.h index 25eb84c8e..6017e9bd5 100644 --- a/include/bb_track.h +++ b/include/bb_track.h @@ -32,7 +32,7 @@ #include "Track.h" -class trackLabelButton; +class TrackLabelButton; class TrackContainer; @@ -220,7 +220,7 @@ public slots: private: bbTrack * m_bbTrack; - trackLabelButton * m_trackLabel; + TrackLabelButton * m_trackLabel; } ; diff --git a/include/setup_dialog.h b/include/setup_dialog.h index 8eeb06988..fd726cf9b 100644 --- a/include/setup_dialog.h +++ b/include/setup_dialog.h @@ -38,7 +38,7 @@ class QLabel; class QLineEdit; class QSlider; -class tabBar; +class TabBar; class setupDialog : public QDialog @@ -114,7 +114,7 @@ private slots: private: - tabBar * m_tabBar; + TabBar * m_tabBar; QSlider * m_bufSizeSlider; QLabel * m_bufSizeLbl; diff --git a/plugins/Amplifier/AmplifierControlDialog.cpp b/plugins/Amplifier/AmplifierControlDialog.cpp index cf935c714..354760187 100644 --- a/plugins/Amplifier/AmplifierControlDialog.cpp +++ b/plugins/Amplifier/AmplifierControlDialog.cpp @@ -40,27 +40,27 @@ AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) : setPalette( pal ); setFixedSize( 100, 125 ); - knob * volumeKnob = new knob( knobBright_26, this); + Knob * volumeKnob = new Knob( knobBright_26, this); volumeKnob -> move( 20, 30 ); volumeKnob -> setVolumeKnob( true ); volumeKnob->setModel( &controls->m_volumeModel ); volumeKnob->setLabel( tr( "VOL" ) ); volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" ); - knob * panKnob = new knob( knobBright_26, this); + Knob * panKnob = new Knob( knobBright_26, this); panKnob -> move( 60, 30 ); panKnob->setModel( &controls->m_panModel ); panKnob->setLabel( tr( "PAN" ) ); panKnob->setHintText( tr( "Panning:" ) + " ", "" ); - knob * leftKnob = new knob( knobBright_26, this); + Knob * leftKnob = new Knob( knobBright_26, this); leftKnob -> move( 20, 80 ); leftKnob -> setVolumeKnob( true ); leftKnob->setModel( &controls->m_leftModel ); leftKnob->setLabel( tr( "LEFT" ) ); leftKnob->setHintText( tr( "Left gain:" ) + " ", "%" ); - knob * rightKnob = new knob( knobBright_26, this); + Knob * rightKnob = new Knob( knobBright_26, this); rightKnob -> move( 60, 80 ); rightKnob -> setVolumeKnob( true ); rightKnob->setModel( &controls->m_rightModel ); diff --git a/plugins/Amplifier/AmplifierControls.h b/plugins/Amplifier/AmplifierControls.h index d1b98659d..0d2f52dab 100644 --- a/plugins/Amplifier/AmplifierControls.h +++ b/plugins/Amplifier/AmplifierControls.h @@ -28,7 +28,7 @@ #include "EffectControls.h" #include "AmplifierControlDialog.h" -#include "knob.h" +#include "Knob.h" class AmplifierEffect; diff --git a/plugins/BassBooster/BassBoosterControlDialog.cpp b/plugins/BassBooster/BassBoosterControlDialog.cpp index 18917595e..9caca1bb8 100644 --- a/plugins/BassBooster/BassBoosterControlDialog.cpp +++ b/plugins/BassBooster/BassBoosterControlDialog.cpp @@ -44,17 +44,17 @@ BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* control QHBoxLayout * l = new QHBoxLayout; - knob * freqKnob = new knob( knobBright_26, this); + Knob * freqKnob = new Knob( knobBright_26, this); freqKnob->setModel( &controls->m_freqModel ); freqKnob->setLabel( tr( "FREQ" ) ); freqKnob->setHintText( tr( "Frequency:" ) + " ", "Hz" ); - knob * gainKnob = new knob( knobBright_26, this ); + Knob * gainKnob = new Knob( knobBright_26, this ); gainKnob->setModel( &controls->m_gainModel ); gainKnob->setLabel( tr( "GAIN" ) ); gainKnob->setHintText( tr( "Gain:" ) + " ", "" ); - knob * ratioKnob = new knob( knobBright_26, this ); + Knob * ratioKnob = new Knob( knobBright_26, this ); ratioKnob->setModel( &controls->m_ratioModel ); ratioKnob->setLabel( tr( "RATIO" ) ); ratioKnob->setHintText( tr( "Ratio:" ) + " ", "" ); diff --git a/plugins/BassBooster/BassBoosterControls.h b/plugins/BassBooster/BassBoosterControls.h index 5df888bc1..7a3bea3ce 100644 --- a/plugins/BassBooster/BassBoosterControls.h +++ b/plugins/BassBooster/BassBoosterControls.h @@ -27,7 +27,7 @@ #include "EffectControls.h" #include "BassBoosterControlDialog.h" -#include "knob.h" +#include "Knob.h" class BassBoosterEffect; diff --git a/plugins/DualFilter/DualFilterControlDialog.cpp b/plugins/DualFilter/DualFilterControlDialog.cpp index 9de81cf1b..13fed96db 100644 --- a/plugins/DualFilter/DualFilterControlDialog.cpp +++ b/plugins/DualFilter/DualFilterControlDialog.cpp @@ -28,13 +28,13 @@ #include "DualFilterControlDialog.h" #include "DualFilterControls.h" #include "embed.h" -#include "led_checkbox.h" -#include "combobox.h" -#include "tooltip.h" +#include "LedCheckbox.h" +#include "ComboBox.h" +#include "ToolTip.h" #include "gui_templates.h" #define makeknob( name, x, y, model, label, hint, unit ) \ - knob * name = new knob( knobBright_26, this); \ + Knob * name = new Knob( knobBright_26, this); \ name -> move( x, y ); \ name ->setModel( &controls-> model ); \ name ->setLabel( tr( label ) ); \ @@ -62,24 +62,24 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls ) gain1Knob-> setVolumeKnob( true ); gain2Knob-> setVolumeKnob( true ); - ledCheckBox * enabled1Toggle = new ledCheckBox( "", this, - tr( "Filter 1 enabled" ), ledCheckBox::Green ); - ledCheckBox * enabled2Toggle = new ledCheckBox( "", this, - tr( "Filter 2 enabled" ), ledCheckBox::Green ); + LedCheckBox * enabled1Toggle = new LedCheckBox( "", this, + tr( "Filter 1 enabled" ), LedCheckBox::Green ); + LedCheckBox * enabled2Toggle = new LedCheckBox( "", this, + tr( "Filter 2 enabled" ), LedCheckBox::Green ); enabled1Toggle -> move( 5, 30 ); enabled1Toggle -> setModel( &controls -> m_enabled1Model ); - toolTip::add( enabled1Toggle, tr( "Click to enable/disable Filter 1" ) ); + ToolTip::add( enabled1Toggle, tr( "Click to enable/disable Filter 1" ) ); enabled2Toggle -> move( 5, 145 ); enabled2Toggle -> setModel( &controls -> m_enabled2Model ); - toolTip::add( enabled2Toggle, tr( "Click to enable/disable Filter 2" ) ); + ToolTip::add( enabled2Toggle, tr( "Click to enable/disable Filter 2" ) ); - comboBox * m_filter1ComboBox = new comboBox( this ); + ComboBox * m_filter1ComboBox = new ComboBox( this ); m_filter1ComboBox->setGeometry( 5, 70, 140, 22 ); m_filter1ComboBox->setFont( pointSize<8>( m_filter1ComboBox->font() ) ); m_filter1ComboBox->setModel( &controls->m_filter1Model ); - comboBox * m_filter2ComboBox = new comboBox( this ); + ComboBox * m_filter2ComboBox = new ComboBox( this ); m_filter2ComboBox->setGeometry( 5, 185, 140, 22 ); m_filter2ComboBox->setFont( pointSize<8>( m_filter2ComboBox->font() ) ); m_filter2ComboBox->setModel( &controls->m_filter2Model ); diff --git a/plugins/DualFilter/DualFilterControls.h b/plugins/DualFilter/DualFilterControls.h index 65953ba91..ad9d3915a 100644 --- a/plugins/DualFilter/DualFilterControls.h +++ b/plugins/DualFilter/DualFilterControls.h @@ -28,7 +28,7 @@ #include "EffectControls.h" #include "DualFilterControlDialog.h" -#include "knob.h" +#include "Knob.h" #include "ComboBoxModel.h" class DualFilterEffect; diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index b0ca74785..8d17b1f2e 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -41,13 +41,13 @@ #include "InstrumentTrack.h" #include "InstrumentPlayHandle.h" #include "NotePlayHandle.h" -#include "knob.h" +#include "Knob.h" #include "Song.h" #include "ConfigManager.h" #include "endian_handling.h" #include "PatchesDialog.h" -#include "tooltip.h" +#include "ToolTip.h" #include "LcdSpinBox.h" #include "embed.cpp" @@ -904,11 +904,11 @@ void GigInstrument::updateSampleRate() -class gigKnob : public knob +class gigKnob : public Knob { public: gigKnob( QWidget * _parent ) : - knob( knobBright_26, _parent ) + Knob( knobBright_26, _parent ) { setFixedSize( 31, 38 ); } @@ -926,7 +926,7 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren connect( &k->m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatchName() ) ); // File Button - m_fileDialogButton = new pixmapButton( this ); + m_fileDialogButton = new PixmapButton( this ); m_fileDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) ); m_fileDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_on" ) ); m_fileDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_off" ) ); @@ -934,12 +934,12 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren connect( m_fileDialogButton, SIGNAL( clicked() ), this, SLOT( showFileDialog() ) ); - toolTip::add( m_fileDialogButton, tr( "Open other GIG file" ) ); + ToolTip::add( m_fileDialogButton, tr( "Open other GIG file" ) ); m_fileDialogButton->setWhatsThis( tr( "Click here to open another GIG file" ) ); // Patch Button - m_patchDialogButton = new pixmapButton( this ); + m_patchDialogButton = new PixmapButton( this ); m_patchDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) ); m_patchDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_on" ) ); m_patchDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_off" ) ); @@ -948,7 +948,7 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren connect( m_patchDialogButton, SIGNAL( clicked() ), this, SLOT( showPatchDialog() ) ); - toolTip::add( m_patchDialogButton, tr( "Choose the patch" ) ); + ToolTip::add( m_patchDialogButton, tr( "Choose the patch" ) ); m_patchDialogButton->setWhatsThis( tr( "Click here to change which patch of the GIG file to use" ) ); diff --git a/plugins/GigPlayer/GigPlayer.h b/plugins/GigPlayer/GigPlayer.h index f302df622..e637fcd6a 100644 --- a/plugins/GigPlayer/GigPlayer.h +++ b/plugins/GigPlayer/GigPlayer.h @@ -32,11 +32,11 @@ #include #include "Instrument.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "InstrumentView.h" -#include "knob.h" +#include "Knob.h" #include "LcdSpinBox.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "SampleBuffer.h" #include "MemoryManager.h" #include "gig.h" @@ -345,8 +345,8 @@ public: private: virtual void modelChanged(); - pixmapButton * m_fileDialogButton; - pixmapButton * m_patchDialogButton; + PixmapButton * m_fileDialogButton; + PixmapButton * m_patchDialogButton; LcdSpinBox * m_bankNumLcd; LcdSpinBox * m_patchNumLcd; @@ -354,7 +354,7 @@ private: QLabel * m_filenameLabel; QLabel * m_patchLabel; - knob * m_gainKnob; + Knob * m_gainKnob; static PatchesDialog * s_patchDialog; diff --git a/plugins/LadspaEffect/LadspaControlDialog.cpp b/plugins/LadspaEffect/LadspaControlDialog.cpp index d2b02700b..b84fc9b0b 100644 --- a/plugins/LadspaEffect/LadspaControlDialog.cpp +++ b/plugins/LadspaEffect/LadspaControlDialog.cpp @@ -31,7 +31,7 @@ #include "LadspaEffect.h" #include "LadspaControlDialog.h" #include "LadspaControlView.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" @@ -52,7 +52,7 @@ LadspaControlDialog::LadspaControlDialog( LadspaControls * _ctl ) : mainLay->addSpacing( 3 ); QHBoxLayout * center = new QHBoxLayout(); mainLay->addLayout( center ); - m_stereoLink = new ledCheckBox( tr( "Link Channels" ), this ); + m_stereoLink = new LedCheckBox( tr( "Link Channels" ), this ); m_stereoLink->setModel( &_ctl->m_stereoLinkModel ); center->addWidget( m_stereoLink ); } diff --git a/plugins/LadspaEffect/LadspaControlDialog.h b/plugins/LadspaEffect/LadspaControlDialog.h index 87f9689d5..9c4f697d0 100644 --- a/plugins/LadspaEffect/LadspaControlDialog.h +++ b/plugins/LadspaEffect/LadspaControlDialog.h @@ -32,7 +32,7 @@ class QHBoxLayout; class LadspaControls; -class ledCheckBox; +class LedCheckBox; class LadspaControlDialog : public EffectControlDialog @@ -49,7 +49,7 @@ private slots: private: QHBoxLayout * m_effectLayout; - ledCheckBox * m_stereoLink; + LedCheckBox * m_stereoLink; } ; diff --git a/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp b/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp index fc58d730a..08be1d0fb 100644 --- a/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp +++ b/plugins/SpectrumAnalyzer/SpectrumAnalyzerControlDialog.cpp @@ -27,7 +27,7 @@ #include "SpectrumAnalyzer.h" #include "MainWindow.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "embed.h" @@ -157,11 +157,11 @@ SpectrumAnalyzerControlDialog::SpectrumAnalyzerControlDialog( SpectrumAnalyzerCo SpectrumView* v = new SpectrumView( controls->m_effect, this ); v->move( 27, 30 ); - ledCheckBox * lin_spec = new ledCheckBox( tr( "Linear spectrum" ), this ); + LedCheckBox * lin_spec = new LedCheckBox( tr( "Linear spectrum" ), this ); lin_spec->move( 24, 204 ); lin_spec->setModel( &controls->m_linearSpec ); - ledCheckBox * lin_y = new ledCheckBox( tr( "Linear Y axis" ), this ); + LedCheckBox * lin_y = new LedCheckBox( tr( "Linear Y axis" ), this ); lin_y->move( 24, 220 ); lin_y->setModel( &controls->m_linearYAxis ); diff --git a/plugins/SpectrumAnalyzer/SpectrumAnalyzerControls.h b/plugins/SpectrumAnalyzer/SpectrumAnalyzerControls.h index 24c0faef4..6d43e29f0 100644 --- a/plugins/SpectrumAnalyzer/SpectrumAnalyzerControls.h +++ b/plugins/SpectrumAnalyzer/SpectrumAnalyzerControls.h @@ -27,7 +27,7 @@ #include "EffectControls.h" #include "SpectrumAnalyzerControlDialog.h" -#include "knob.h" +#include "Knob.h" class SpectrumAnalyzer; diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index b440c6380..7d52e22c4 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -26,7 +26,7 @@ #include "VstEffect.h" #include "Song.h" -#include "text_float.h" +#include "TextFloat.h" #include "VstSubPluginFeatures.h" #include "embed.cpp" @@ -124,7 +124,7 @@ bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) void VstEffect::openPlugin( const QString & _plugin ) { - textFloat * tf = textFloat::displayMessage( + TextFloat * tf = TextFloat::displayMessage( VstPlugin::tr( "Loading plugin" ), VstPlugin::tr( "Please wait while loading VST plugin..." ), PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 ); diff --git a/plugins/VstEffect/VstEffectControlDialog.cpp b/plugins/VstEffect/VstEffectControlDialog.cpp index 4b07a408c..e11bda2ab 100644 --- a/plugins/VstEffect/VstEffectControlDialog.cpp +++ b/plugins/VstEffect/VstEffectControlDialog.cpp @@ -30,9 +30,9 @@ #include "VstEffectControlDialog.h" #include "VstEffect.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "embed.h" -#include "tooltip.h" +#include "ToolTip.h" #include #include @@ -84,7 +84,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : btn->setMinimumHeight( 24 ); btn->setMaximumHeight( 24 ); - m_managePluginButton = new pixmapButton( this, "" ); + m_managePluginButton = new PixmapButton( this, "" ); m_managePluginButton->setCheckable( false ); m_managePluginButton->setCursor( Qt::PointingHandCursor ); m_managePluginButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -93,7 +93,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : "track_op_menu" ) ); connect( m_managePluginButton, SIGNAL( clicked() ), _ctl, SLOT( managePlugin() ) ); - toolTip::add( m_managePluginButton, tr( "Control VST-plugin from LMMS host" ) ); + ToolTip::add( m_managePluginButton, tr( "Control VST-plugin from LMMS host" ) ); m_managePluginButton->setWhatsThis( tr( "Click here, if you want to control VST-plugin from host." ) ); @@ -103,7 +103,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : m_managePluginButton->setMinimumHeight( 21 ); m_managePluginButton->setMaximumHeight( 21 ); - m_openPresetButton = new pixmapButton( this, "" ); + m_openPresetButton = new PixmapButton( this, "" ); m_openPresetButton->setCheckable( false ); m_openPresetButton->setCursor( Qt::PointingHandCursor ); m_openPresetButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -112,7 +112,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : "stepper-up" ) ); connect( m_openPresetButton, SIGNAL( clicked() ), _ctl, SLOT( openPreset() ) ); - toolTip::add( m_openPresetButton, tr( "Open VST-plugin preset" ) ); + ToolTip::add( m_openPresetButton, tr( "Open VST-plugin preset" ) ); m_openPresetButton->setWhatsThis( tr( "Click here, if you want to open another *.fxp, *.fxb VST-plugin preset." ) ); @@ -122,7 +122,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : m_openPresetButton->setMinimumHeight( 16 ); m_openPresetButton->setMaximumHeight( 16 ); - m_rolLPresetButton = new pixmapButton( this, "" ); + m_rolLPresetButton = new PixmapButton( this, "" ); m_rolLPresetButton->setCheckable( false ); m_rolLPresetButton->setCursor( Qt::PointingHandCursor ); m_rolLPresetButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -135,7 +135,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : connect( m_rolLPresetButton, SIGNAL( clicked() ), this, SLOT( update() ) ); - toolTip::add( m_rolLPresetButton, tr( "Previous (-)" ) ); + ToolTip::add( m_rolLPresetButton, tr( "Previous (-)" ) ); m_rolLPresetButton->setShortcut( Qt::Key_Minus ); @@ -147,7 +147,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : m_rolLPresetButton->setMinimumHeight( 16 ); m_rolLPresetButton->setMaximumHeight( 16 ); - m_rolRPresetButton = new pixmapButton( this, "" ); + m_rolRPresetButton = new PixmapButton( this, "" ); m_rolRPresetButton->setCheckable( false ); m_rolRPresetButton->setCursor( Qt::PointingHandCursor ); m_rolRPresetButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -160,7 +160,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : connect( m_rolRPresetButton, SIGNAL( clicked() ), this, SLOT( update() ) ); - toolTip::add( m_rolRPresetButton, tr( "Next (+)" ) ); + ToolTip::add( m_rolRPresetButton, tr( "Next (+)" ) ); m_rolRPresetButton->setShortcut( Qt::Key_Plus ); @@ -187,7 +187,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : _ctl->m_selPresetButton->setMinimumHeight( 16 ); _ctl->m_selPresetButton->setMaximumHeight( 16 ); - m_savePresetButton = new pixmapButton( this, "" ); + m_savePresetButton = new PixmapButton( this, "" ); m_savePresetButton->setCheckable( false ); m_savePresetButton->setCursor( Qt::PointingHandCursor ); m_savePresetButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -196,7 +196,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : "project_save", 21, 21 ) ); connect( m_savePresetButton, SIGNAL( clicked() ), _ctl, SLOT( savePreset() ) ); - toolTip::add( m_savePresetButton, tr( "Save preset" ) ); + ToolTip::add( m_savePresetButton, tr( "Save preset" ) ); m_savePresetButton->setWhatsThis( tr( "Click here, if you want to save current VST-plugin preset program." ) ); diff --git a/plugins/VstEffect/VstEffectControlDialog.h b/plugins/VstEffect/VstEffectControlDialog.h index 574aa20c2..0539cf9d7 100644 --- a/plugins/VstEffect/VstEffectControlDialog.h +++ b/plugins/VstEffect/VstEffectControlDialog.h @@ -34,10 +34,10 @@ class VstEffectControls; -class pixmapButton; +class PixmapButton; class QPixmap; class QPushButton; -class pixmapButton; +class PixmapButton; class VstEffectControlDialog : public EffectControlDialog @@ -52,11 +52,11 @@ protected: private: QWidget * m_pluginWidget; - pixmapButton * m_openPresetButton; - pixmapButton * m_rolLPresetButton; - pixmapButton * m_rolRPresetButton; - pixmapButton * m_managePluginButton; - pixmapButton * m_savePresetButton; + PixmapButton * m_openPresetButton; + PixmapButton * m_rolLPresetButton; + PixmapButton * m_rolRPresetButton; + PixmapButton * m_managePluginButton; + PixmapButton * m_savePresetButton; VstPlugin * m_plugin; diff --git a/plugins/VstEffect/VstEffectControls.cpp b/plugins/VstEffect/VstEffectControls.cpp index 0c68706ea..08f8e28ac 100644 --- a/plugins/VstEffect/VstEffectControls.cpp +++ b/plugins/VstEffect/VstEffectControls.cpp @@ -71,7 +71,7 @@ void VstEffectControls::loadSettings( const QDomElement & _this ) const QMap & dump = m_effect->m_plugin->parameterDump(); paramCount = dump.size(); char paramStr[35]; - vstKnobs = new knob *[ paramCount ]; + vstKnobs = new Knob *[ paramCount ]; knobFModel = new FloatModel *[ paramCount ]; QStringList s_dumpValues; QWidget * widget = new QWidget(); @@ -80,7 +80,7 @@ void VstEffectControls::loadSettings( const QDomElement & _this ) sprintf( paramStr, "param%d", i ); s_dumpValues = dump[ paramStr ].split( ":" ); - vstKnobs[i] = new knob( knobBright_26, widget, s_dumpValues.at( 1 ) ); + vstKnobs[i] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) ); vstKnobs[i]->setHintText( s_dumpValues.at( 1 ) + ":", "" ); vstKnobs[i]->setLabel( s_dumpValues.at( 1 ).left( 15 ) ); @@ -361,7 +361,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls * if (m_vi->vstKnobs == NULL) { - m_vi->vstKnobs = new knob *[ m_vi->paramCount ]; + m_vi->vstKnobs = new Knob *[ m_vi->paramCount ]; isVstKnobs = false; } if (m_vi->knobFModel == NULL) { @@ -377,7 +377,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls * sprintf( paramStr, "param%d", i); s_dumpValues = dump[ paramStr ].split( ":" ); - m_vi->vstKnobs[ i ] = new knob( knobBright_26, widget, s_dumpValues.at( 1 ) ); + m_vi->vstKnobs[ i ] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) ); m_vi->vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" ); m_vi->vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) ); diff --git a/plugins/VstEffect/VstEffectControls.h b/plugins/VstEffect/VstEffectControls.h index def875063..8c74d9bef 100644 --- a/plugins/VstEffect/VstEffectControls.h +++ b/plugins/VstEffect/VstEffectControls.h @@ -34,7 +34,7 @@ #include #include -#include "knob.h" +#include "Knob.h" #include #include #include @@ -87,7 +87,7 @@ private: QMdiSubWindow * m_subWindow; QScrollArea * m_scrollArea; FloatModel ** knobFModel; - knob ** vstKnobs; + Knob ** vstKnobs; int paramCount; QObject * ctrHandle; diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 2a764222b..dc56750e6 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -38,7 +38,7 @@ #include "NotePlayHandle.h" #include "interpolation.h" #include "gui_templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "string_pair_drag.h" #include "DataFile.h" @@ -447,7 +447,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "artwork" ) ); } - m_openAudioFileButton = new pixmapButton( this ); + m_openAudioFileButton = new PixmapButton( this ); m_openAudioFileButton->setCursor( QCursor( Qt::PointingHandCursor ) ); m_openAudioFileButton->move( 227, 72 ); m_openAudioFileButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( @@ -456,7 +456,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "select_file" ) ); connect( m_openAudioFileButton, SIGNAL( clicked() ), this, SLOT( openAudioFile() ) ); - toolTip::add( m_openAudioFileButton, tr( "Open other sample" ) ); + ToolTip::add( m_openAudioFileButton, tr( "Open other sample" ) ); m_openAudioFileButton->setWhatsThis( tr( "Click here, if you want to open another audio-file. " @@ -465,14 +465,14 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "amplify-value, and so on are not reset. So, it may not " "sound like the original sample.") ); - m_reverseButton = new pixmapButton( this ); + m_reverseButton = new PixmapButton( this ); m_reverseButton->setCheckable( true ); m_reverseButton->move( 164, 105 ); m_reverseButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reverse_on" ) ); m_reverseButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reverse_off" ) ); - toolTip::add( m_reverseButton, tr( "Reverse sample" ) ); + ToolTip::add( m_reverseButton, tr( "Reverse sample" ) ); m_reverseButton->setWhatsThis( tr( "If you enable this button, the whole sample is reversed. " "This is useful for cool effects, e.g. a reversed " @@ -480,39 +480,39 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, // loop button group - pixmapButton * m_loopOffButton = new pixmapButton( this ); + PixmapButton * m_loopOffButton = new PixmapButton( this ); m_loopOffButton->setCheckable( true ); m_loopOffButton->move( 190, 105 ); m_loopOffButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_off_on" ) ); m_loopOffButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_off_off" ) ); - toolTip::add( m_loopOffButton, tr( "Disable loop" ) ); + ToolTip::add( m_loopOffButton, tr( "Disable loop" ) ); m_loopOffButton->setWhatsThis( tr( "This button disables looping. " "The sample plays only once from start to end. " ) ); - pixmapButton * m_loopOnButton = new pixmapButton( this ); + PixmapButton * m_loopOnButton = new PixmapButton( this ); m_loopOnButton->setCheckable( true ); m_loopOnButton->move( 190, 124 ); m_loopOnButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_on_on" ) ); m_loopOnButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_on_off" ) ); - toolTip::add( m_loopOnButton, tr( "Enable loop" ) ); + ToolTip::add( m_loopOnButton, tr( "Enable loop" ) ); m_loopOnButton->setWhatsThis( tr( "This button enables forwards-looping. " "The sample loops between the end point and the loop point." ) ); - pixmapButton * m_loopPingPongButton = new pixmapButton( this ); + PixmapButton * m_loopPingPongButton = new PixmapButton( this ); m_loopPingPongButton->setCheckable( true ); m_loopPingPongButton->move( 216, 124 ); m_loopPingPongButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_pingpong_on" ) ); m_loopPingPongButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_pingpong_off" ) ); - toolTip::add( m_loopPingPongButton, tr( "Enable loop" ) ); + ToolTip::add( m_loopPingPongButton, tr( "Enable loop" ) ); m_loopPingPongButton->setWhatsThis( tr( "This button enables ping-pong-looping. " "The sample loops backwards and forwards between the end point " @@ -523,14 +523,14 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, m_loopGroup->addButton( m_loopOnButton ); m_loopGroup->addButton( m_loopPingPongButton ); - m_stutterButton = new pixmapButton( this ); + m_stutterButton = new PixmapButton( this ); m_stutterButton->setCheckable( true ); m_stutterButton->move( 164, 124 ); m_stutterButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "stutter_on" ) ); m_stutterButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "stutter_off" ) ); - toolTip::add( m_stutterButton, + ToolTip::add( m_stutterButton, tr( "Continue sample playback across notes" ) ); m_stutterButton->setWhatsThis( tr( "Enabling this option makes the sample continue playing " @@ -540,7 +540,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "playback to the start of the sample, insert a note at the bottom " "of the keyboard (< 20 Hz)") ); - m_ampKnob = new knob( knobBright_26, this ); + m_ampKnob = new Knob( knobBright_26, this ); m_ampKnob->setVolumeKnob( true ); m_ampKnob->move( 5, 108 ); m_ampKnob->setHintText( tr( "Amplify:" )+" ", "%" ); @@ -572,7 +572,7 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, "the loop starts. " ) ); // interpolation selector - m_interpBox = new comboBox( this ); + m_interpBox = new ComboBox( this ); m_interpBox->setGeometry( 142, 62, 82, 22 ); m_interpBox->setFont( pointSize<8>( m_interpBox->font() ) ); @@ -1247,7 +1247,7 @@ float AudioFileProcessorWaveView::knob::getValue( const QPoint & _p ) const double dec_fact = ! m_waveView ? 1 : double( m_waveView->m_to - m_waveView->m_from ) / m_waveView->m_sampleBuffer.frames(); - const float inc = ::knob::getValue( _p ) * dec_fact; + const float inc = ::Knob::getValue( _p ) * dec_fact; return inc; } diff --git a/plugins/audio_file_processor/audio_file_processor.h b/plugins/audio_file_processor/audio_file_processor.h index 1889ced85..22f7a047d 100644 --- a/plugins/audio_file_processor/audio_file_processor.h +++ b/plugins/audio_file_processor/audio_file_processor.h @@ -32,10 +32,10 @@ #include "Instrument.h" #include "InstrumentView.h" #include "SampleBuffer.h" -#include "knob.h" -#include "pixmap_button.h" +#include "Knob.h" +#include "PixmapButton.h" #include "AutomatableButton.h" -#include "combobox.h" +#include "ComboBox.h" class audioFileProcessor : public Instrument @@ -136,16 +136,16 @@ private: static QPixmap * s_artwork; AudioFileProcessorWaveView * m_waveView; - knob * m_ampKnob; - knob * m_startKnob; - knob * m_endKnob; - knob * m_loopKnob; + Knob * m_ampKnob; + Knob * m_startKnob; + Knob * m_endKnob; + Knob * m_loopKnob; - pixmapButton * m_openAudioFileButton; - pixmapButton * m_reverseButton; + PixmapButton * m_openAudioFileButton; + PixmapButton * m_reverseButton; automatableButtonGroup * m_loopGroup; - pixmapButton * m_stutterButton; - comboBox * m_interpBox; + PixmapButton * m_stutterButton; + ComboBox * m_interpBox; } ; @@ -172,15 +172,15 @@ public: loop } ; - class knob : public ::knob + class knob : public ::Knob { const AudioFileProcessorWaveView * m_waveView; - const knob * m_relatedKnob; + const Knob * m_relatedKnob; public: knob( QWidget * _parent ) : - ::knob( knobBright_26, _parent ), + ::Knob( knobBright_26, _parent ), m_waveView( 0 ), m_relatedKnob( 0 ) { @@ -192,7 +192,7 @@ public: m_waveView = _wv; } - void setRelatedKnob( const knob * _knob ) + void setRelatedKnob( const Knob * _knob ) { m_relatedKnob = _knob; } @@ -258,7 +258,7 @@ private: public: AudioFileProcessorWaveView( QWidget * _parent, int _w, int _h, SampleBuffer& buf ); - void setKnobs( knob * _start, knob * _end, knob * _loop ); + void setKnobs(knob *_start, knob *_end, knob *_loop ); private: diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index 93a14bbda..9fc371ae9 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -28,15 +28,15 @@ #include "bit_invader.h" #include "base64.h" #include "Engine.h" -#include "graph.h" +#include "Graph.h" #include "InstrumentTrack.h" -#include "knob.h" -#include "led_checkbox.h" +#include "Knob.h" +#include "LedCheckbox.h" #include "NotePlayHandle.h" #include "Oscillator.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "Song.h" #include "interpolation.h" @@ -333,16 +333,16 @@ bitInvaderView::bitInvaderView( Instrument * _instrument, "artwork" ) ); setPalette( pal ); - m_sampleLengthKnob = new knob( knobDark_28, this ); + m_sampleLengthKnob = new Knob( knobDark_28, this ); m_sampleLengthKnob->move( 6, 201 ); m_sampleLengthKnob->setHintText( tr( "Sample Length" ) + " ", "" ); - m_graph = new graph( this, graph::NearestStyle, 204, 134 ); + m_graph = new Graph( this, Graph::NearestStyle, 204, 134 ); m_graph->move(23,59); // 55,120 - 2px border m_graph->setAutoFillBackground( true ); m_graph->setGraphColor( QColor( 255, 255, 255 ) ); - toolTip::add( m_graph, tr ( "Draw your own waveform here " + ToolTip::add( m_graph, tr ( "Draw your own waveform here " "by dragging your mouse on this graph." )); @@ -353,78 +353,78 @@ bitInvaderView::bitInvaderView( Instrument * _instrument, m_graph->setPalette( pal ); - m_sinWaveBtn = new pixmapButton( this, tr( "Sine wave" ) ); + m_sinWaveBtn = new PixmapButton( this, tr( "Sine wave" ) ); m_sinWaveBtn->move( 131, 205 ); m_sinWaveBtn->setActiveGraphic( embed::getIconPixmap( "sin_wave_active" ) ); m_sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - toolTip::add( m_sinWaveBtn, + ToolTip::add( m_sinWaveBtn, tr( "Click for a sine-wave." ) ); - m_triangleWaveBtn = new pixmapButton( this, tr( "Triangle wave" ) ); + m_triangleWaveBtn = new PixmapButton( this, tr( "Triangle wave" ) ); m_triangleWaveBtn->move( 131 + 14, 205 ); m_triangleWaveBtn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - toolTip::add( m_triangleWaveBtn, + ToolTip::add( m_triangleWaveBtn, tr( "Click here for a triangle-wave." ) ); - m_sawWaveBtn = new pixmapButton( this, tr( "Saw wave" ) ); + m_sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) ); m_sawWaveBtn->move( 131 + 14*2, 205 ); m_sawWaveBtn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); m_sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - toolTip::add( m_sawWaveBtn, + ToolTip::add( m_sawWaveBtn, tr( "Click here for a saw-wave." ) ); - m_sqrWaveBtn = new pixmapButton( this, tr( "Square wave" ) ); + m_sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) ); m_sqrWaveBtn->move( 131 + 14*3, 205 ); m_sqrWaveBtn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - toolTip::add( m_sqrWaveBtn, + ToolTip::add( m_sqrWaveBtn, tr( "Click here for a square-wave." ) ); - m_whiteNoiseWaveBtn = new pixmapButton( this, + m_whiteNoiseWaveBtn = new PixmapButton( this, tr( "White noise wave" ) ); m_whiteNoiseWaveBtn->move( 131 + 14*4, 205 ); m_whiteNoiseWaveBtn->setActiveGraphic( embed::getIconPixmap( "white_noise_wave_active" ) ); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - toolTip::add( m_whiteNoiseWaveBtn, + ToolTip::add( m_whiteNoiseWaveBtn, tr( "Click here for white-noise." ) ); - m_usrWaveBtn = new pixmapButton( this, tr( "User defined wave" ) ); + m_usrWaveBtn = new PixmapButton( this, tr( "User defined wave" ) ); m_usrWaveBtn->move( 131 + 14*5, 205 ); m_usrWaveBtn->setActiveGraphic( embed::getIconPixmap( "usr_wave_active" ) ); m_usrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); - toolTip::add( m_usrWaveBtn, + ToolTip::add( m_usrWaveBtn, tr( "Click here for a user-defined shape." ) ); - m_smoothBtn = new pixmapButton( this, tr( "Smooth" ) ); + m_smoothBtn = new PixmapButton( this, tr( "Smooth" ) ); m_smoothBtn->move( 131 + 14*6, 205 ); m_smoothBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); m_smoothBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - toolTip::add( m_smoothBtn, + ToolTip::add( m_smoothBtn, tr( "Click here to smooth waveform." ) ); - m_interpolationToggle = new ledCheckBox( "Interpolation", this, - tr( "Interpolation" ), ledCheckBox::Yellow ); + m_interpolationToggle = new LedCheckBox( "Interpolation", this, + tr( "Interpolation" ), LedCheckBox::Yellow ); m_interpolationToggle->move( 131, 221 ); - m_normalizeToggle = new ledCheckBox( "Normalize", this, - tr( "Normalize" ), ledCheckBox::Green ); + m_normalizeToggle = new LedCheckBox( "Normalize", this, + tr( "Normalize" ), LedCheckBox::Green ); m_normalizeToggle->move( 131, 236 ); @@ -517,7 +517,7 @@ void bitInvaderView::noiseWaveClicked() void bitInvaderView::usrWaveClicked() { QString fileName = m_graph->model()->setWaveToUser(); - toolTip::add( m_usrWaveBtn, fileName ); + ToolTip::add( m_usrWaveBtn, fileName ); Engine::getSong()->setModified(); /* m_graph->model()->setWaveToNoise(); @@ -562,7 +562,7 @@ void bitInvaderView::smoothClicked() void bitInvaderView::interpolationToggled( bool value ) { - m_graph->setGraphStyle( value ? graph::LinearStyle : graph::NearestStyle); + m_graph->setGraphStyle( value ? Graph::LinearStyle : Graph::NearestStyle); Engine::getSong()->setModified(); } diff --git a/plugins/bit_invader/bit_invader.h b/plugins/bit_invader/bit_invader.h index d4eae0352..475602f47 100644 --- a/plugins/bit_invader/bit_invader.h +++ b/plugins/bit_invader/bit_invader.h @@ -29,10 +29,10 @@ #include "Instrument.h" #include "InstrumentView.h" -#include "graph.h" -#include "knob.h" -#include "pixmap_button.h" -#include "led_checkbox.h" +#include "Graph.h" +#include "Knob.h" +#include "PixmapButton.h" +#include "LedCheckbox.h" #include "MemoryManager.h" class oscillator; @@ -135,20 +135,20 @@ protected slots: private: virtual void modelChanged(); - knob * m_sampleLengthKnob; - pixmapButton * m_sinWaveBtn; - pixmapButton * m_triangleWaveBtn; - pixmapButton * m_sqrWaveBtn; - pixmapButton * m_sawWaveBtn; - pixmapButton * m_whiteNoiseWaveBtn; - pixmapButton * m_smoothBtn; - pixmapButton * m_usrWaveBtn; + Knob * m_sampleLengthKnob; + PixmapButton * m_sinWaveBtn; + PixmapButton * m_triangleWaveBtn; + PixmapButton * m_sqrWaveBtn; + PixmapButton * m_sawWaveBtn; + PixmapButton * m_whiteNoiseWaveBtn; + PixmapButton * m_smoothBtn; + PixmapButton * m_usrWaveBtn; static QPixmap * s_artwork; - graph * m_graph; - ledCheckBox * m_interpolationToggle; - ledCheckBox * m_normalizeToggle; + Graph * m_graph; + LedCheckBox * m_interpolationToggle; + LedCheckBox * m_normalizeToggle; } ; diff --git a/plugins/delay/delaycontrols.h b/plugins/delay/delaycontrols.h index fe7b3c3e9..386f94b76 100644 --- a/plugins/delay/delaycontrols.h +++ b/plugins/delay/delaycontrols.h @@ -26,7 +26,7 @@ #define DELAYCONTROLS_H #include "EffectControls.h" -#include "knob.h" +#include "Knob.h" #include "delaycontrolsdialog.h" diff --git a/plugins/delay/delaycontrolsdialog.cpp b/plugins/delay/delaycontrolsdialog.cpp index 1f5746d02..1b712118f 100644 --- a/plugins/delay/delaycontrolsdialog.cpp +++ b/plugins/delay/delaycontrolsdialog.cpp @@ -46,7 +46,7 @@ DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) : sampleDelayKnob->setLabel( tr( "Delay" ) ); sampleDelayKnob->setHintText( tr( "Delay Time Seconds:" ) + " ", "" ); - knob * feedbackKnob = new knob( knobBright_26, this ); + Knob * feedbackKnob = new Knob( knobBright_26, this ); feedbackKnob->move( 63,10 ); feedbackKnob->setVolumeKnob( true) ; feedbackKnob->setModel( &controls->m_feedbackModel); @@ -60,7 +60,7 @@ DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) : lfoFreqKnob->setLabel( tr( "Rate" ) ); lfoFreqKnob->setHintText( tr ( "Lfo Seconds:" ) + " ", "" ); - knob * lfoAmtKnob = new knob( knobBright_26, this ); + Knob * lfoAmtKnob = new Knob( knobBright_26, this ); lfoAmtKnob->move( 150,10 ); lfoAmtKnob->setVolumeKnob( true ); lfoAmtKnob->setModel( &controls->m_lfoAmountModel ); diff --git a/plugins/dynamics_processor/dynamics_processor_control_dialog.cpp b/plugins/dynamics_processor/dynamics_processor_control_dialog.cpp index 92948ef96..b0c66c79b 100644 --- a/plugins/dynamics_processor/dynamics_processor_control_dialog.cpp +++ b/plugins/dynamics_processor/dynamics_processor_control_dialog.cpp @@ -29,10 +29,10 @@ #include "dynamics_processor_control_dialog.h" #include "dynamics_processor_controls.h" #include "embed.h" -#include "graph.h" -#include "pixmap_button.h" -#include "tooltip.h" -#include "led_checkbox.h" +#include "Graph.h" +#include "PixmapButton.h" +#include "ToolTip.h" +#include "LedCheckbox.h" dynProcControlDialog::dynProcControlDialog( @@ -46,7 +46,7 @@ dynProcControlDialog::dynProcControlDialog( setPalette( pal ); setFixedSize( 224, 340 ); - graph * waveGraph = new graph( this, graph::LinearNonCyclicStyle, 204, 205 ); + Graph * waveGraph = new Graph( this, Graph::LinearNonCyclicStyle, 204, 205 ); waveGraph -> move( 10, 32 ); waveGraph -> setModel( &_controls -> m_wavegraphModel ); waveGraph -> setAutoFillBackground( true ); @@ -57,7 +57,7 @@ dynProcControlDialog::dynProcControlDialog( waveGraph->setGraphColor( QColor( 170, 255, 255 ) ); waveGraph -> setMaximumSize( 204, 205 ); - knob * inputKnob = new knob( knobBright_26, this); + Knob * inputKnob = new Knob( knobBright_26, this); inputKnob -> setVolumeKnob( true ); inputKnob -> setVolumeRatio( 1.0 ); inputKnob -> move( 14, 251 ); @@ -65,7 +65,7 @@ dynProcControlDialog::dynProcControlDialog( inputKnob->setLabel( tr( "INPUT" ) ); inputKnob->setHintText( tr( "Input gain:" ) + " ", "" ); - knob * outputKnob = new knob( knobBright_26, this ); + Knob * outputKnob = new Knob( knobBright_26, this ); outputKnob -> setVolumeKnob( true ); outputKnob -> setVolumeRatio( 1.0 ); outputKnob -> move( 54, 251 ); @@ -73,13 +73,13 @@ dynProcControlDialog::dynProcControlDialog( outputKnob->setLabel( tr( "OUTPUT" ) ); outputKnob->setHintText( tr( "Output gain:" ) + " ", "" ); - knob * attackKnob = new knob( knobBright_26, this); + Knob * attackKnob = new Knob( knobBright_26, this); attackKnob -> move( 11, 291 ); attackKnob->setModel( &_controls->m_attackModel ); attackKnob->setLabel( tr( "ATTACK" ) ); attackKnob->setHintText( tr( "Peak attack time:" ) + " ", "ms" ); - knob * releaseKnob = new knob( knobBright_26, this ); + Knob * releaseKnob = new Knob( knobBright_26, this ); releaseKnob -> move( 52, 291 ); releaseKnob->setModel( &_controls->m_releaseModel ); releaseKnob->setLabel( tr( "RELEASE" ) ); @@ -87,55 +87,55 @@ dynProcControlDialog::dynProcControlDialog( //waveform control buttons - pixmapButton * resetButton = new pixmapButton( this, tr("Reset waveform") ); + PixmapButton * resetButton = new PixmapButton( this, tr("Reset waveform") ); resetButton -> move( 164, 251 ); resetButton -> resize( 12, 48 ); resetButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_active" ) ); resetButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_inactive" ) ); - toolTip::add( resetButton, tr( "Click here to reset the wavegraph back to default" ) ); + ToolTip::add( resetButton, tr( "Click here to reset the wavegraph back to default" ) ); - pixmapButton * smoothButton = new pixmapButton( this, tr("Smooth waveform") ); + PixmapButton * smoothButton = new PixmapButton( this, tr("Smooth waveform") ); smoothButton -> move( 164, 267 ); smoothButton -> resize( 12, 48 ); smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - toolTip::add( smoothButton, tr( "Click here to apply smoothing to wavegraph" ) ); + ToolTip::add( smoothButton, tr( "Click here to apply smoothing to wavegraph" ) ); - pixmapButton * addOneButton = new pixmapButton( this, tr("Increase wavegraph amplitude by 1dB") ); + PixmapButton * addOneButton = new PixmapButton( this, tr("Increase wavegraph amplitude by 1dB") ); addOneButton -> move( 133, 251 ); addOneButton -> resize( 12, 29 ); addOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_active" ) ); addOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_inactive" ) ); - toolTip::add( addOneButton, tr( "Click here to increase wavegraph amplitude by 1dB" ) ); + ToolTip::add( addOneButton, tr( "Click here to increase wavegraph amplitude by 1dB" ) ); - pixmapButton * subOneButton = new pixmapButton( this, tr("Decrease wavegraph amplitude by 1dB") ); + PixmapButton * subOneButton = new PixmapButton( this, tr("Decrease wavegraph amplitude by 1dB") ); subOneButton -> move( 133, 267 ); subOneButton -> resize( 12, 29 ); subOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_active" ) ); subOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_inactive" ) ); - toolTip::add( subOneButton, tr( "Click here to decrease wavegraph amplitude by 1dB" ) ); + ToolTip::add( subOneButton, tr( "Click here to decrease wavegraph amplitude by 1dB" ) ); //stereomode switches - pixmapButton * smMaxButton = new pixmapButton( this, tr( "Stereomode Maximum" ) ); + PixmapButton * smMaxButton = new PixmapButton( this, tr( "Stereomode Maximum" ) ); smMaxButton -> move( 165, 290 ); smMaxButton -> resize( 48, 13 ); smMaxButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "max_active" ) ); smMaxButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "max_inactive" ) ); - toolTip::add( smMaxButton, tr( "Process based on the maximum of both stereo channels" ) ); + ToolTip::add( smMaxButton, tr( "Process based on the maximum of both stereo channels" ) ); - pixmapButton * smAvgButton = new pixmapButton( this, tr( "Stereomode Average" ) ); + PixmapButton * smAvgButton = new PixmapButton( this, tr( "Stereomode Average" ) ); smAvgButton -> move( 165, 290 + 13 ); smAvgButton -> resize( 48, 13 ); smAvgButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_active" ) ); smAvgButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "avg_inactive" ) ); - toolTip::add( smAvgButton, tr( "Process based on the average of both stereo channels" ) ); + ToolTip::add( smAvgButton, tr( "Process based on the average of both stereo channels" ) ); - pixmapButton * smUnlButton = new pixmapButton( this, tr( "Stereomode Unlinked" ) ); + PixmapButton * smUnlButton = new PixmapButton( this, tr( "Stereomode Unlinked" ) ); smUnlButton -> move( 165, 290 + (13*2) ); smUnlButton -> resize( 48, 13 ); smUnlButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_active" ) ); smUnlButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "unl_inactive" ) ); - toolTip::add( smUnlButton, tr( "Process each stereo channel independently" ) ); + ToolTip::add( smUnlButton, tr( "Process each stereo channel independently" ) ); automatableButtonGroup * smGroup = new automatableButtonGroup( this ); smGroup -> addButton( smMaxButton ); diff --git a/plugins/dynamics_processor/dynamics_processor_controls.cpp b/plugins/dynamics_processor/dynamics_processor_controls.cpp index ecd33eb16..5f76be707 100644 --- a/plugins/dynamics_processor/dynamics_processor_controls.cpp +++ b/plugins/dynamics_processor/dynamics_processor_controls.cpp @@ -29,7 +29,7 @@ #include "dynamics_processor_controls.h" #include "dynamics_processor.h" #include "base64.h" -#include "graph.h" +#include "Graph.h" #include "Engine.h" #include "Song.h" diff --git a/plugins/dynamics_processor/dynamics_processor_controls.h b/plugins/dynamics_processor/dynamics_processor_controls.h index 39e8acaec..f18c93d93 100644 --- a/plugins/dynamics_processor/dynamics_processor_controls.h +++ b/plugins/dynamics_processor/dynamics_processor_controls.h @@ -28,8 +28,8 @@ #include "EffectControls.h" #include "dynamics_processor_control_dialog.h" -#include "knob.h" -#include "graph.h" +#include "Knob.h" +#include "Graph.h" class dynProcEffect; diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index 183772625..cbd0100a2 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -35,23 +35,23 @@ #include "basic_filters.h" #include "bb_track.h" #include "BBTrackContainer.h" -#include "combobox.h" +#include "ComboBox.h" #include "ConfigManager.h" #include "debug.h" #include "Effect.h" #include "Engine.h" #include "FxMixer.h" #include "FxMixerView.h" -#include "group_box.h" +#include "GroupBox.h" #include "Instrument.h" #include "InstrumentTrack.h" #include "EnvelopeAndLfoParameters.h" -#include "knob.h" +#include "Knob.h" #include "Oscillator.h" #include "Pattern.h" #include "Piano.h" #include "ProjectJournal.h" -#include "project_notes.h" +#include "ProjectNotes.h" #include "Song.h" #include "TrackContainer.h" #include "embed.h" diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index 7738b6422..a3868a257 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -30,7 +30,7 @@ #include "kicker.h" #include "Engine.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" #include "KickerOsc.h" @@ -226,11 +226,11 @@ PluginView * kickerInstrument::instantiateView( QWidget * _parent ) -class kickerKnob : public knob +class kickerKnob : public Knob { public: kickerKnob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 29, 29 ); setObjectName( "smallKnob" ); @@ -250,11 +250,11 @@ public: }; -class kickerLargeKnob : public knob +class kickerLargeKnob : public Knob { public: kickerLargeKnob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 34, 34 ); setObjectName( "largeKnob" ); @@ -319,10 +319,10 @@ kickerInstrumentView::kickerInstrumentView( Instrument * _instrument, m_distEndKnob->setHintText( tr( "Distortion End:" ) + " ", "" ); m_distEndKnob->move( COL5, ROW2 ); - m_startNoteToggle = new ledCheckBox( "", this, "", ledCheckBox::Green ); + m_startNoteToggle = new LedCheckBox( "", this, "", LedCheckBox::Green ); m_startNoteToggle->move( COL1 + 8, LED_ROW ); - m_endNoteToggle = new ledCheckBox( "", this, "", ledCheckBox::Green ); + m_endNoteToggle = new LedCheckBox( "", this, "", LedCheckBox::Green ); m_endNoteToggle->move( END_COL + 8, LED_ROW ); setAutoFillBackground( true ); diff --git a/plugins/kicker/kicker.h b/plugins/kicker/kicker.h index af4ce11d1..654aa5fba 100644 --- a/plugins/kicker/kicker.h +++ b/plugins/kicker/kicker.h @@ -30,8 +30,8 @@ #include #include "Instrument.h" #include "InstrumentView.h" -#include "knob.h" -#include "led_checkbox.h" +#include "Knob.h" +#include "LedCheckbox.h" #include "TempoSyncKnob.h" @@ -103,19 +103,19 @@ public: private: virtual void modelChanged(); - knob * m_startFreqKnob; - knob * m_endFreqKnob; - knob * m_decayKnob; - knob * m_distKnob; - knob * m_distEndKnob; - knob * m_gainKnob; - knob * m_envKnob; - knob * m_noiseKnob; - knob * m_clickKnob; - knob * m_slopeKnob; + Knob * m_startFreqKnob; + Knob * m_endFreqKnob; + Knob * m_decayKnob; + Knob * m_distKnob; + Knob * m_distEndKnob; + Knob * m_gainKnob; + Knob * m_envKnob; + Knob * m_noiseKnob; + Knob * m_clickKnob; + Knob * m_slopeKnob; - ledCheckBox * m_startNoteToggle; - ledCheckBox * m_endNoteToggle; + LedCheckBox * m_startNoteToggle; + LedCheckBox * m_endNoteToggle; } ; diff --git a/plugins/ladspa_browser/ladspa_browser.cpp b/plugins/ladspa_browser/ladspa_browser.cpp index e9b410e3b..3f6e6cb9b 100644 --- a/plugins/ladspa_browser/ladspa_browser.cpp +++ b/plugins/ladspa_browser/ladspa_browser.cpp @@ -35,7 +35,7 @@ #include "gui_templates.h" #include "ladspa_description.h" #include "ladspa_port_dialog.h" -#include "tab_bar.h" +#include "TabBar.h" #include "tab_button.h" #include "embed.cpp" @@ -103,7 +103,7 @@ ladspaBrowserView::ladspaBrowserView( ToolPlugin * _tool ) : hlayout->setSpacing( 0 ); hlayout->setMargin( 0 ); - m_tabBar = new tabBar( this, QBoxLayout::TopToBottom ); + m_tabBar = new TabBar( this, QBoxLayout::TopToBottom ); m_tabBar->setExclusive( true ); m_tabBar->setFixedWidth( 72 ); diff --git a/plugins/ladspa_browser/ladspa_browser.h b/plugins/ladspa_browser/ladspa_browser.h index 2ca47af48..fe705b6b8 100644 --- a/plugins/ladspa_browser/ladspa_browser.h +++ b/plugins/ladspa_browser/ladspa_browser.h @@ -31,7 +31,7 @@ #include "ToolPlugin.h" #include "ToolPluginView.h" -class tabBar; +class TabBar; class ladspaBrowserView : public ToolPluginView @@ -47,7 +47,7 @@ public slots: private: - tabBar * m_tabBar; + TabBar * m_tabBar; QWidget * createTab( QWidget * _parent, const QString & _txt, ladspaPluginType _type ); diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 3d9fbda3c..46e7be982 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -33,12 +33,12 @@ #include "Engine.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" #include "Oscillator.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "BandLimitedWave.h" #include "embed.cpp" @@ -822,48 +822,48 @@ lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) : InstrumentView( _instrument, _parent ) { // GUI - m_vcfCutKnob = new knob( knobBright_26, this ); + m_vcfCutKnob = new Knob( knobBright_26, this ); m_vcfCutKnob->move( 75, 130 ); m_vcfCutKnob->setHintText( tr( "Cutoff Freq:" ) + " ", "" ); m_vcfCutKnob->setLabel( "" ); - m_vcfResKnob = new knob( knobBright_26, this ); + m_vcfResKnob = new Knob( knobBright_26, this ); m_vcfResKnob->move( 120, 130 ); m_vcfResKnob->setHintText( tr( "Resonance:" ) + " ", "" ); m_vcfResKnob->setLabel( "" ); - m_vcfModKnob = new knob( knobBright_26, this ); + m_vcfModKnob = new Knob( knobBright_26, this ); m_vcfModKnob->move( 165, 130 ); m_vcfModKnob->setHintText( tr( "Env Mod:" ) + " ", "" ); m_vcfModKnob->setLabel( "" ); - m_vcfDecKnob = new knob( knobBright_26, this ); + m_vcfDecKnob = new Knob( knobBright_26, this ); m_vcfDecKnob->move( 210, 130 ); m_vcfDecKnob->setHintText( tr( "Decay:" ) + " ", "" ); m_vcfDecKnob->setLabel( "" ); - m_slideToggle = new ledCheckBox( "", this ); + m_slideToggle = new LedCheckBox( "", this ); m_slideToggle->move( 10, 180 ); -/* m_accentToggle = new ledCheckBox( "", this ); +/* m_accentToggle = new LedCheckBox( "", this ); m_accentToggle->move( 10, 200 ); m_accentToggle->setDisabled(true);*/ // accent removed pending real implementation - no need for non-functional buttons - m_deadToggle = new ledCheckBox( "", this ); + m_deadToggle = new LedCheckBox( "", this ); m_deadToggle->move( 10, 200 ); - m_db24Toggle = new ledCheckBox( "", this ); + m_db24Toggle = new LedCheckBox( "", this ); m_db24Toggle->setWhatsThis( tr( "303-es-que, 24dB/octave, 3 pole filter" ) ); m_db24Toggle->move( 10, 150); - m_slideDecKnob = new knob( knobBright_26, this ); + m_slideDecKnob = new Knob( knobBright_26, this ); m_slideDecKnob->move( 210, 75 ); m_slideDecKnob->setHintText( tr( "Slide Decay:" ) + " ", "" ); m_slideDecKnob->setLabel( ""); - m_distKnob = new knob( knobBright_26, this ); + m_distKnob = new Knob( knobBright_26, this ); m_distKnob->move( 210, 190 ); m_distKnob->setHintText( tr( "DIST:" ) + " ", "" ); m_distKnob->setLabel( tr( "")); @@ -873,122 +873,122 @@ lb302SynthView::lb302SynthView( Instrument * _instrument, QWidget * _parent ) : // move to 120,75 const int waveBtnX = 10; const int waveBtnY = 96; - pixmapButton * sawWaveBtn = new pixmapButton( this, tr( "Saw wave" ) ); + PixmapButton * sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) ); sawWaveBtn->move( waveBtnX, waveBtnY ); sawWaveBtn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - toolTip::add( sawWaveBtn, + ToolTip::add( sawWaveBtn, tr( "Click here for a saw-wave." ) ); - pixmapButton * triangleWaveBtn = - new pixmapButton( this, tr( "Triangle wave" ) ); + PixmapButton * triangleWaveBtn = + new PixmapButton( this, tr( "Triangle wave" ) ); triangleWaveBtn->move( waveBtnX+(16*1), waveBtnY ); triangleWaveBtn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - toolTip::add( triangleWaveBtn, + ToolTip::add( triangleWaveBtn, tr( "Click here for a triangle-wave." ) ); - pixmapButton * sqrWaveBtn = new pixmapButton( this, tr( "Square wave" ) ); + PixmapButton * sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) ); sqrWaveBtn->move( waveBtnX+(16*2), waveBtnY ); sqrWaveBtn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - toolTip::add( sqrWaveBtn, + ToolTip::add( sqrWaveBtn, tr( "Click here for a square-wave." ) ); - pixmapButton * roundSqrWaveBtn = - new pixmapButton( this, tr( "Rounded square wave" ) ); + PixmapButton * roundSqrWaveBtn = + new PixmapButton( this, tr( "Rounded square wave" ) ); roundSqrWaveBtn->move( waveBtnX+(16*3), waveBtnY ); roundSqrWaveBtn->setActiveGraphic( embed::getIconPixmap( "round_square_wave_active" ) ); roundSqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "round_square_wave_inactive" ) ); - toolTip::add( roundSqrWaveBtn, + ToolTip::add( roundSqrWaveBtn, tr( "Click here for a square-wave with a rounded end." ) ); - pixmapButton * moogWaveBtn = - new pixmapButton( this, tr( "Moog wave" ) ); + PixmapButton * moogWaveBtn = + new PixmapButton( this, tr( "Moog wave" ) ); moogWaveBtn->move( waveBtnX+(16*4), waveBtnY ); moogWaveBtn->setActiveGraphic( embed::getIconPixmap( "moog_saw_wave_active" ) ); moogWaveBtn->setInactiveGraphic( embed::getIconPixmap( "moog_saw_wave_inactive" ) ); - toolTip::add( moogWaveBtn, + ToolTip::add( moogWaveBtn, tr( "Click here for a moog-like wave." ) ); - pixmapButton * sinWaveBtn = new pixmapButton( this, tr( "Sine wave" ) ); + PixmapButton * sinWaveBtn = new PixmapButton( this, tr( "Sine wave" ) ); sinWaveBtn->move( waveBtnX+(16*5), waveBtnY ); sinWaveBtn->setActiveGraphic( embed::getIconPixmap( "sin_wave_active" ) ); sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - toolTip::add( sinWaveBtn, + ToolTip::add( sinWaveBtn, tr( "Click for a sine-wave." ) ); - pixmapButton * exponentialWaveBtn = - new pixmapButton( this, tr( "White noise wave" ) ); + PixmapButton * exponentialWaveBtn = + new PixmapButton( this, tr( "White noise wave" ) ); exponentialWaveBtn->move( waveBtnX+(16*6), waveBtnY ); exponentialWaveBtn->setActiveGraphic( embed::getIconPixmap( "exp_wave_active" ) ); exponentialWaveBtn->setInactiveGraphic( embed::getIconPixmap( "exp_wave_inactive" ) ); - toolTip::add( exponentialWaveBtn, + ToolTip::add( exponentialWaveBtn, tr( "Click here for an exponential wave." ) ); - pixmapButton * whiteNoiseWaveBtn = - new pixmapButton( this, tr( "White noise wave" ) ); + PixmapButton * whiteNoiseWaveBtn = + new PixmapButton( this, tr( "White noise wave" ) ); whiteNoiseWaveBtn->move( waveBtnX+(16*7), waveBtnY ); whiteNoiseWaveBtn->setActiveGraphic( embed::getIconPixmap( "white_noise_wave_active" ) ); whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - toolTip::add( whiteNoiseWaveBtn, + ToolTip::add( whiteNoiseWaveBtn, tr( "Click here for white-noise." ) ); - pixmapButton * blSawWaveBtn = - new pixmapButton( this, tr( "Bandlimited saw wave" ) ); + PixmapButton * blSawWaveBtn = + new PixmapButton( this, tr( "Bandlimited saw wave" ) ); blSawWaveBtn->move( waveBtnX+(16*9)-8, waveBtnY ); blSawWaveBtn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); blSawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - toolTip::add( blSawWaveBtn, + ToolTip::add( blSawWaveBtn, tr( "Click here for bandlimited saw wave." ) ); - pixmapButton * blSquareWaveBtn = - new pixmapButton( this, tr( "Bandlimited square wave" ) ); + PixmapButton * blSquareWaveBtn = + new PixmapButton( this, tr( "Bandlimited square wave" ) ); blSquareWaveBtn->move( waveBtnX+(16*10)-8, waveBtnY ); blSquareWaveBtn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); blSquareWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - toolTip::add( blSquareWaveBtn, + ToolTip::add( blSquareWaveBtn, tr( "Click here for bandlimited square wave." ) ); - pixmapButton * blTriangleWaveBtn = - new pixmapButton( this, tr( "Bandlimited triangle wave" ) ); + PixmapButton * blTriangleWaveBtn = + new PixmapButton( this, tr( "Bandlimited triangle wave" ) ); blTriangleWaveBtn->move( waveBtnX+(16*11)-8, waveBtnY ); blTriangleWaveBtn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); blTriangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - toolTip::add( blTriangleWaveBtn, + ToolTip::add( blTriangleWaveBtn, tr( "Click here for bandlimited triangle wave." ) ); - pixmapButton * blMoogWaveBtn = - new pixmapButton( this, tr( "Bandlimited moog saw wave" ) ); + PixmapButton * blMoogWaveBtn = + new PixmapButton( this, tr( "Bandlimited moog saw wave" ) ); blMoogWaveBtn->move( waveBtnX+(16*12)-8, waveBtnY ); blMoogWaveBtn->setActiveGraphic( embed::getIconPixmap( "moog_saw_wave_active" ) ); blMoogWaveBtn->setInactiveGraphic( embed::getIconPixmap( "moog_saw_wave_inactive" ) ); - toolTip::add( blMoogWaveBtn, + ToolTip::add( blMoogWaveBtn, tr( "Click here for bandlimited moog saw wave." ) ); diff --git a/plugins/lb302/lb302.h b/plugins/lb302/lb302.h index 71e4d6dc3..d79e7c986 100644 --- a/plugins/lb302/lb302.h +++ b/plugins/lb302/lb302.h @@ -35,8 +35,8 @@ #include "DspEffectLibrary.h" #include "Instrument.h" #include "InstrumentView.h" -#include "led_checkbox.h" -#include "knob.h" +#include "LedCheckbox.h" +#include "Knob.h" #include "Mixer.h" #include "NotePlayHandle.h" #include @@ -260,19 +260,19 @@ public: private: virtual void modelChanged(); - knob * m_vcfCutKnob; - knob * m_vcfResKnob; - knob * m_vcfDecKnob; - knob * m_vcfModKnob; + Knob * m_vcfCutKnob; + Knob * m_vcfResKnob; + Knob * m_vcfDecKnob; + Knob * m_vcfModKnob; - knob * m_distKnob; - knob * m_slideDecKnob; + Knob * m_distKnob; + Knob * m_slideDecKnob; automatableButtonGroup * m_waveBtnGrp; - ledCheckBox * m_slideToggle; - /*ledCheckBox * m_accentToggle;*/ // removed pending accent implementation - ledCheckBox * m_deadToggle; - ledCheckBox * m_db24Toggle; + LedCheckBox * m_slideToggle; + /*LedCheckBox * m_accentToggle;*/ // removed pending accent implementation + LedCheckBox * m_deadToggle; + LedCheckBox * m_db24Toggle; } ; diff --git a/plugins/lb303/lb303.cpp b/plugins/lb303/lb303.cpp index 94e859eaa..f4b7e3c6b 100644 --- a/plugins/lb303/lb303.cpp +++ b/plugins/lb303/lb303.cpp @@ -35,7 +35,7 @@ #include "engine.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" #include "templates.h" #include "audio_port.h" @@ -739,54 +739,54 @@ lb303SynthView::lb303SynthView( Instrument * _instrument, QWidget * _parent ) : InstrumentView( _instrument, _parent ) { // GUI - m_vcfCutKnob = new knob( knobBright_26, this ); + m_vcfCutKnob = new Knob( knobBright_26, this ); m_vcfCutKnob->move( 75, 130 ); m_vcfCutKnob->setHintText( tr( "Cutoff Freq:" ) + " ", "" ); m_vcfCutKnob->setLabel( tr("CUT") ); - m_vcfResKnob = new knob( knobBright_26, this ); + m_vcfResKnob = new Knob( knobBright_26, this ); m_vcfResKnob->move( 120, 130 ); m_vcfResKnob->setHintText( tr( "Resonance:" ) + " ", "" ); m_vcfResKnob->setLabel( tr("RES") ); - m_vcfModKnob = new knob( knobBright_26, this ); + m_vcfModKnob = new Knob( knobBright_26, this ); m_vcfModKnob->move( 165, 130 ); m_vcfModKnob->setHintText( tr( "Env Mod:" ) + " ", "" ); m_vcfModKnob->setLabel( tr("ENV MOD") ); - m_vcfDecKnob = new knob( knobBright_26, this ); + m_vcfDecKnob = new Knob( knobBright_26, this ); m_vcfDecKnob->move( 210, 130 ); m_vcfDecKnob->setHintText( tr( "Decay:" ) + " ", "" ); m_vcfDecKnob->setLabel( tr("DEC") ); - m_slideToggle = new ledCheckBox( "Slide", this ); + m_slideToggle = new LedCheckBox( "Slide", this ); m_slideToggle->move( 10, 180 ); - m_accentToggle = new ledCheckBox( "Accent", this ); + m_accentToggle = new LedCheckBox( "Accent", this ); m_accentToggle->move( 10, 200 ); m_accentToggle->setDisabled(true); - m_deadToggle = new ledCheckBox( "Dead", this ); + m_deadToggle = new LedCheckBox( "Dead", this ); m_deadToggle->move( 10, 220 ); - m_db24Toggle = new ledCheckBox( "24dB/oct", this ); + m_db24Toggle = new LedCheckBox( "24dB/oct", this ); m_db24Toggle->setWhatsThis( tr( "303-es-que, 24dB/octave, 3 pole filter" ) ); m_db24Toggle->move( 10, 150); - m_slideDecKnob = new knob( knobBright_26, this ); + m_slideDecKnob = new Knob( knobBright_26, this ); m_slideDecKnob->move( 210, 75 ); m_slideDecKnob->setHintText( tr( "Slide Decay:" ) + " ", "" ); m_slideDecKnob->setLabel( tr( "SLIDE")); - m_distKnob = new knob( knobBright_26, this ); + m_distKnob = new Knob( knobBright_26, this ); m_distKnob->move( 210, 190 ); m_distKnob->setHintText( tr( "DIST:" ) + " ", "" ); m_distKnob->setLabel( tr( "DIST")); - m_waveKnob = new knob( knobBright_26, this ); + m_waveKnob = new Knob( knobBright_26, this ); m_waveKnob->move( 120, 75 ); m_waveKnob->setHintText( tr( "WAVE:" ) + " ", "" ); m_waveKnob->setLabel( tr( "WAVE")); diff --git a/plugins/lb303/lb303.h b/plugins/lb303/lb303.h index 3a7f347d0..22c089c22 100644 --- a/plugins/lb303/lb303.h +++ b/plugins/lb303/lb303.h @@ -35,8 +35,8 @@ #include "effect_lib.h" #include "Instrument.h" #include "InstrumentView.h" -#include "led_checkbox.h" -#include "knob.h" +#include "LedCheckbox.h" +#include "Knob.h" #include "Mixer.h" class lb303SynthView; @@ -249,21 +249,21 @@ public: private: virtual void modelChanged(); - knob * m_vcfCutKnob; - knob * m_vcfResKnob; - knob * m_vcfDecKnob; - knob * m_vcfModKnob; + Knob * m_vcfCutKnob; + Knob * m_vcfResKnob; + Knob * m_vcfDecKnob; + Knob * m_vcfModKnob; - knob * m_vcoFineDetuneKnob; + Knob * m_vcoFineDetuneKnob; - knob * m_distKnob; - knob * m_waveKnob; - knob * m_slideDecKnob; + Knob * m_distKnob; + Knob * m_waveKnob; + Knob * m_slideDecKnob; - ledCheckBox * m_slideToggle; - ledCheckBox * m_accentToggle; - ledCheckBox * m_deadToggle; - ledCheckBox * m_db24Toggle; + LedCheckBox * m_slideToggle; + LedCheckBox * m_accentToggle; + LedCheckBox * m_deadToggle; + LedCheckBox * m_db24Toggle; } ; diff --git a/plugins/monstro/Monstro.cpp b/plugins/monstro/Monstro.cpp index 70717d9a6..3f0869b68 100644 --- a/plugins/monstro/Monstro.cpp +++ b/plugins/monstro/Monstro.cpp @@ -30,7 +30,7 @@ #include "InstrumentTrack.h" #include "templates.h" #include "gui_templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "Song.h" #include "lmms_math.h" #include "interpolation.h" @@ -1467,22 +1467,22 @@ MonstroView::MonstroView( Instrument * _instrument, // "tab buttons" - pixmapButton * m_opViewButton = new pixmapButton( this, NULL ); + PixmapButton * m_opViewButton = new PixmapButton( this, NULL ); m_opViewButton -> move( 0,0 ); m_opViewButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "opview_active" ) ); m_opViewButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "opview_inactive" ) ); - toolTip::add( m_opViewButton, tr( "Operators view" ) ); + ToolTip::add( m_opViewButton, tr( "Operators view" ) ); m_opViewButton -> setWhatsThis( tr( "The Operators view contains all the operators. These include both audible " "operators (oscillators) and inaudible operators, or modulators: " "Low-frequency oscillators and Envelopes. \n\n" "Knobs and other widgets in the Operators view have their own what's this -texts, " "so you can get more specific help for them that way. " ) ); - pixmapButton * m_matViewButton = new pixmapButton( this, NULL ); + PixmapButton * m_matViewButton = new PixmapButton( this, NULL ); m_matViewButton -> move( 125,0 ); m_matViewButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "matview_active" ) ); m_matViewButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "matview_inactive" ) ); - toolTip::add( m_matViewButton, tr( "Matrix view" ) ); + ToolTip::add( m_matViewButton, tr( "Matrix view" ) ); m_matViewButton -> setWhatsThis( tr( "The Matrix view contains the modulation matrix. Here you can define " "the modulation relationships between the various operators: Each " "audible operator (oscillators 1-3) has 3-4 properties that can be " @@ -1686,7 +1686,7 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent ) m_osc2VolKnob -> setVolumeKnob( true ); - m_osc2WaveBox = new comboBox( view ); + m_osc2WaveBox = new ComboBox( view ); m_osc2WaveBox -> setGeometry( 204, O2ROW + 7, 42, 22 ); m_osc2WaveBox->setFont( pointSize<8>( m_osc2WaveBox->font() ) ); @@ -1699,18 +1699,18 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent ) makeknob( m_osc3SpoKnob, KNOBCOL4, O3ROW, "Stereo phase offset", " deg", "osc3Knob" ) makeknob( m_osc3SubKnob, KNOBCOL5, O3ROW, "Sub-osc mix", "", "osc3Knob" ) - m_osc3Wave1Box = new comboBox( view ); + m_osc3Wave1Box = new ComboBox( view ); m_osc3Wave1Box -> setGeometry( 160, O3ROW + 7, 42, 22 ); m_osc3Wave1Box->setFont( pointSize<8>( m_osc3Wave1Box->font() ) ); - m_osc3Wave2Box = new comboBox( view ); + m_osc3Wave2Box = new ComboBox( view ); m_osc3Wave2Box -> setGeometry( 204, O3ROW + 7, 42, 22 ); m_osc3Wave2Box->setFont( pointSize<8>( m_osc3Wave2Box->font() ) ); maketinyled( m_osc3SyncHButton, 212, O3ROW - 3, "Hard sync oscillator 3" ) maketinyled( m_osc3SyncRButton, 191, O3ROW - 3, "Reverse sync oscillator 3" ) - m_lfo1WaveBox = new comboBox( view ); + m_lfo1WaveBox = new ComboBox( view ); m_lfo1WaveBox -> setGeometry( 2, LFOROW + 7, 42, 22 ); m_lfo1WaveBox->setFont( pointSize<8>( m_lfo1WaveBox->font() ) ); @@ -1718,7 +1718,7 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent ) maketsknob( m_lfo1RateKnob, LFOCOL2, LFOROW, "Rate", " ms", "lfoKnob" ) makeknob( m_lfo1PhsKnob, LFOCOL3, LFOROW, "Phase", " deg", "lfoKnob" ) - m_lfo2WaveBox = new comboBox( view ); + m_lfo2WaveBox = new ComboBox( view ); m_lfo2WaveBox -> setGeometry( 127, LFOROW + 7, 42, 22 ); m_lfo2WaveBox->setFont( pointSize<8>( m_lfo2WaveBox->font() ) ); @@ -1743,29 +1743,29 @@ QWidget * MonstroView::setupOperatorsView( QWidget * _parent ) makeknob( m_env2SlopeKnob, KNOBCOL7, E2ROW, "Slope", "", "envKnob" ) // mod selector - pixmapButton * m_mixButton = new pixmapButton( view, NULL ); + PixmapButton * m_mixButton = new PixmapButton( view, NULL ); m_mixButton -> move( 225, 185 ); m_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_active" ) ); m_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_inactive" ) ); - toolTip::add( m_mixButton, tr( "Mix Osc2 with Osc3" ) ); + ToolTip::add( m_mixButton, tr( "Mix Osc2 with Osc3" ) ); - pixmapButton * m_amButton = new pixmapButton( view, NULL ); + PixmapButton * m_amButton = new PixmapButton( view, NULL ); m_amButton -> move( 225, 185 + 15 ); m_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "am_active" ) ); m_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "am_inactive" ) ); - toolTip::add( m_amButton, tr( "Modulate amplitude of Osc3 with Osc2" ) ); + ToolTip::add( m_amButton, tr( "Modulate amplitude of Osc3 with Osc2" ) ); - pixmapButton * m_fmButton = new pixmapButton( view, NULL ); + PixmapButton * m_fmButton = new PixmapButton( view, NULL ); m_fmButton -> move( 225, 185 + 15*2 ); m_fmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_active" ) ); m_fmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_inactive" ) ); - toolTip::add( m_fmButton, tr( "Modulate frequency of Osc3 with Osc2" ) ); + ToolTip::add( m_fmButton, tr( "Modulate frequency of Osc3 with Osc2" ) ); - pixmapButton * m_pmButton = new pixmapButton( view, NULL ); + PixmapButton * m_pmButton = new PixmapButton( view, NULL ); m_pmButton -> move( 225, 185 + 15*3 ); m_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_active" ) ); m_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_inactive" ) ); - toolTip::add( m_pmButton, tr( "Modulate phase of Osc3 with Osc2" ) ); + ToolTip::add( m_pmButton, tr( "Modulate phase of Osc3 with Osc2" ) ); m_o23ModGroup = new automatableButtonGroup( view ); m_o23ModGroup-> addButton( m_mixButton ); diff --git a/plugins/monstro/Monstro.h b/plugins/monstro/Monstro.h index 8b97df197..663ded670 100644 --- a/plugins/monstro/Monstro.h +++ b/plugins/monstro/Monstro.h @@ -33,8 +33,8 @@ #include "AutomatableButton.h" #include "TempoSyncKnob.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" -#include "combobox.h" +#include "PixmapButton.h" +#include "ComboBox.h" #include "Oscillator.h" #include "lmms_math.h" #include "BandLimitedWave.h" @@ -44,7 +44,7 @@ // #define makeknob( name, x, y, hint, unit, oname ) \ - name = new knob( knobStyled, view ); \ + name = new Knob( knobStyled, view ); \ name ->move( x, y ); \ name ->setHintText( tr( hint ) + " ", unit ); \ name ->setObjectName( oname ); \ @@ -58,12 +58,12 @@ name ->setFixedSize( 20, 20 ); #define maketinyled( name, x, y, ttip ) \ - name = new pixmapButton( view, NULL ); \ + name = new PixmapButton( view, NULL ); \ name -> setCheckable( true ); \ name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "tinyled_on" ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tinyled_off" ) ); \ - toolTip::add( name, tr( ttip ) ); + ToolTip::add( name, tr( ttip ) ); #define setwavemodel( name ) \ name .addItem( tr( "Sine wave" ), static_cast( new PluginPixmapLoader( "sin" ) ) ); \ @@ -591,61 +591,61 @@ private: // // ////////////////////////////////////// - knob * m_osc1VolKnob; - knob * m_osc1PanKnob; - knob * m_osc1CrsKnob; - knob * m_osc1FtlKnob; - knob * m_osc1FtrKnob; - knob * m_osc1SpoKnob; - knob * m_osc1PwKnob; - pixmapButton * m_osc1SSRButton; - pixmapButton * m_osc1SSFButton; + Knob * m_osc1VolKnob; + Knob * m_osc1PanKnob; + Knob * m_osc1CrsKnob; + Knob * m_osc1FtlKnob; + Knob * m_osc1FtrKnob; + Knob * m_osc1SpoKnob; + Knob * m_osc1PwKnob; + PixmapButton * m_osc1SSRButton; + PixmapButton * m_osc1SSFButton; - knob * m_osc2VolKnob; - knob * m_osc2PanKnob; - knob * m_osc2CrsKnob; - knob * m_osc2FtlKnob; - knob * m_osc2FtrKnob; - knob * m_osc2SpoKnob; - comboBox * m_osc2WaveBox; - pixmapButton * m_osc2SyncHButton; - pixmapButton * m_osc2SyncRButton; + Knob * m_osc2VolKnob; + Knob * m_osc2PanKnob; + Knob * m_osc2CrsKnob; + Knob * m_osc2FtlKnob; + Knob * m_osc2FtrKnob; + Knob * m_osc2SpoKnob; + ComboBox * m_osc2WaveBox; + PixmapButton * m_osc2SyncHButton; + PixmapButton * m_osc2SyncRButton; - knob * m_osc3VolKnob; - knob * m_osc3PanKnob; - knob * m_osc3CrsKnob; - knob * m_osc3SpoKnob; - knob * m_osc3SubKnob; - comboBox * m_osc3Wave1Box; - comboBox * m_osc3Wave2Box; - pixmapButton * m_osc3SyncHButton; - pixmapButton * m_osc3SyncRButton; + Knob * m_osc3VolKnob; + Knob * m_osc3PanKnob; + Knob * m_osc3CrsKnob; + Knob * m_osc3SpoKnob; + Knob * m_osc3SubKnob; + ComboBox * m_osc3Wave1Box; + ComboBox * m_osc3Wave2Box; + PixmapButton * m_osc3SyncHButton; + PixmapButton * m_osc3SyncRButton; - comboBox * m_lfo1WaveBox; + ComboBox * m_lfo1WaveBox; TempoSyncKnob * m_lfo1AttKnob; TempoSyncKnob * m_lfo1RateKnob; - knob * m_lfo1PhsKnob; + Knob * m_lfo1PhsKnob; - comboBox * m_lfo2WaveBox; + ComboBox * m_lfo2WaveBox; TempoSyncKnob * m_lfo2AttKnob; TempoSyncKnob * m_lfo2RateKnob; - knob * m_lfo2PhsKnob; + Knob * m_lfo2PhsKnob; TempoSyncKnob * m_env1PreKnob; TempoSyncKnob * m_env1AttKnob; TempoSyncKnob * m_env1HoldKnob; TempoSyncKnob * m_env1DecKnob; - knob * m_env1SusKnob; + Knob * m_env1SusKnob; TempoSyncKnob * m_env1RelKnob; - knob * m_env1SlopeKnob; + Knob * m_env1SlopeKnob; TempoSyncKnob * m_env2PreKnob; TempoSyncKnob * m_env2AttKnob; TempoSyncKnob * m_env2HoldKnob; TempoSyncKnob * m_env2DecKnob; - knob * m_env2SusKnob; + Knob * m_env2SusKnob; TempoSyncKnob * m_env2RelKnob; - knob * m_env2SlopeKnob; + Knob * m_env2SlopeKnob; automatableButtonGroup * m_o23ModGroup; @@ -660,60 +660,60 @@ private: // // ///////////////////////////////// - knob * m_vol1env1Knob; - knob * m_vol1env2Knob; - knob * m_vol1lfo1Knob; - knob * m_vol1lfo2Knob; + Knob * m_vol1env1Knob; + Knob * m_vol1env2Knob; + Knob * m_vol1lfo1Knob; + Knob * m_vol1lfo2Knob; - knob * m_vol2env1Knob; - knob * m_vol2env2Knob; - knob * m_vol2lfo1Knob; - knob * m_vol2lfo2Knob; + Knob * m_vol2env1Knob; + Knob * m_vol2env2Knob; + Knob * m_vol2lfo1Knob; + Knob * m_vol2lfo2Knob; - knob * m_vol3env1Knob; - knob * m_vol3env2Knob; - knob * m_vol3lfo1Knob; - knob * m_vol3lfo2Knob; + Knob * m_vol3env1Knob; + Knob * m_vol3env2Knob; + Knob * m_vol3lfo1Knob; + Knob * m_vol3lfo2Knob; - knob * m_phs1env1Knob; - knob * m_phs1env2Knob; - knob * m_phs1lfo1Knob; - knob * m_phs1lfo2Knob; + Knob * m_phs1env1Knob; + Knob * m_phs1env2Knob; + Knob * m_phs1lfo1Knob; + Knob * m_phs1lfo2Knob; - knob * m_phs2env1Knob; - knob * m_phs2env2Knob; - knob * m_phs2lfo1Knob; - knob * m_phs2lfo2Knob; + Knob * m_phs2env1Knob; + Knob * m_phs2env2Knob; + Knob * m_phs2lfo1Knob; + Knob * m_phs2lfo2Knob; - knob * m_phs3env1Knob; - knob * m_phs3env2Knob; - knob * m_phs3lfo1Knob; - knob * m_phs3lfo2Knob; + Knob * m_phs3env1Knob; + Knob * m_phs3env2Knob; + Knob * m_phs3lfo1Knob; + Knob * m_phs3lfo2Knob; - knob * m_pit1env1Knob; - knob * m_pit1env2Knob; - knob * m_pit1lfo1Knob; - knob * m_pit1lfo2Knob; + Knob * m_pit1env1Knob; + Knob * m_pit1env2Knob; + Knob * m_pit1lfo1Knob; + Knob * m_pit1lfo2Knob; - knob * m_pit2env1Knob; - knob * m_pit2env2Knob; - knob * m_pit2lfo1Knob; - knob * m_pit2lfo2Knob; + Knob * m_pit2env1Knob; + Knob * m_pit2env2Knob; + Knob * m_pit2lfo1Knob; + Knob * m_pit2lfo2Knob; - knob * m_pit3env1Knob; - knob * m_pit3env2Knob; - knob * m_pit3lfo1Knob; - knob * m_pit3lfo2Knob; + Knob * m_pit3env1Knob; + Knob * m_pit3env2Knob; + Knob * m_pit3lfo1Knob; + Knob * m_pit3lfo2Knob; - knob * m_pw1env1Knob; - knob * m_pw1env2Knob; - knob * m_pw1lfo1Knob; - knob * m_pw1lfo2Knob; + Knob * m_pw1env1Knob; + Knob * m_pw1env2Knob; + Knob * m_pw1lfo1Knob; + Knob * m_pw1lfo2Knob; - knob * m_sub3env1Knob; - knob * m_sub3env2Knob; - knob * m_sub3lfo1Knob; - knob * m_sub3lfo2Knob; + Knob * m_sub3env1Knob; + Knob * m_sub3env2Knob; + Knob * m_sub3lfo1Knob; + Knob * m_sub3lfo2Knob; }; diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index 0180551ae..0fa288339 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -29,7 +29,7 @@ #include "Engine.h" #include "InstrumentTrack.h" #include "templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "Song.h" #include "lmms_math.h" #include "interpolation.h" diff --git a/plugins/nes/Nes.h b/plugins/nes/Nes.h index d76a90d2b..645a980dc 100644 --- a/plugins/nes/Nes.h +++ b/plugins/nes/Nes.h @@ -31,31 +31,31 @@ #include "AutomatableButton.h" #include "TempoSyncKnob.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "MemoryManager.h" #define makeknob( name, x, y, hint, unit, oname ) \ - name = new knob( knobStyled, this ); \ + name = new Knob( knobStyled, this ); \ name ->move( x, y ); \ name ->setHintText( tr( hint ) + " ", unit ); \ name ->setObjectName( oname ); \ name ->setFixedSize( 29, 29 ); #define makenesled( name, x, y, ttip ) \ - name = new pixmapButton( this, NULL ); \ + name = new PixmapButton( this, NULL ); \ name -> setCheckable( true ); \ name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "nesled_on" ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "nesled_off" ) ); \ - toolTip::add( name, tr( ttip ) ); + ToolTip::add( name, tr( ttip ) ); #define makedcled( name, x, y, ttip, active ) \ - pixmapButton * name = new pixmapButton( this, NULL ); \ + PixmapButton * name = new PixmapButton( this, NULL ); \ name -> move( x, y ); \ name -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( active ) ); \ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "nesdc_off" ) ); \ - toolTip::add( name, tr( ttip ) ); + ToolTip::add( name, tr( ttip ) ); const float NES_SIMPLE_FILTER = 1.0 / 20.0; // simulate nes analog audio output const float NFB = 895000.0f; @@ -304,58 +304,58 @@ private: virtual void modelChanged(); // channel 1 - pixmapButton * m_ch1EnabledBtn; - knob * m_ch1CrsKnob; - knob * m_ch1VolumeKnob; + PixmapButton * m_ch1EnabledBtn; + Knob * m_ch1CrsKnob; + Knob * m_ch1VolumeKnob; - pixmapButton * m_ch1EnvEnabledBtn; - pixmapButton * m_ch1EnvLoopedBtn; - knob * m_ch1EnvLenKnob; + PixmapButton * m_ch1EnvEnabledBtn; + PixmapButton * m_ch1EnvLoopedBtn; + Knob * m_ch1EnvLenKnob; automatableButtonGroup * m_ch1DutyCycleGrp; - pixmapButton * m_ch1SweepEnabledBtn; - knob * m_ch1SweepAmtKnob; - knob * m_ch1SweepRateKnob; + PixmapButton * m_ch1SweepEnabledBtn; + Knob * m_ch1SweepAmtKnob; + Knob * m_ch1SweepRateKnob; // channel 2 - pixmapButton * m_ch2EnabledBtn; - knob * m_ch2CrsKnob; - knob * m_ch2VolumeKnob; + PixmapButton * m_ch2EnabledBtn; + Knob * m_ch2CrsKnob; + Knob * m_ch2VolumeKnob; - pixmapButton * m_ch2EnvEnabledBtn; - pixmapButton * m_ch2EnvLoopedBtn; - knob * m_ch2EnvLenKnob; + PixmapButton * m_ch2EnvEnabledBtn; + PixmapButton * m_ch2EnvLoopedBtn; + Knob * m_ch2EnvLenKnob; automatableButtonGroup * m_ch2DutyCycleGrp; - pixmapButton * m_ch2SweepEnabledBtn; - knob * m_ch2SweepAmtKnob; - knob * m_ch2SweepRateKnob; + PixmapButton * m_ch2SweepEnabledBtn; + Knob * m_ch2SweepAmtKnob; + Knob * m_ch2SweepRateKnob; //channel 3 - pixmapButton * m_ch3EnabledBtn; - knob * m_ch3CrsKnob; - knob * m_ch3VolumeKnob; + PixmapButton * m_ch3EnabledBtn; + Knob * m_ch3CrsKnob; + Knob * m_ch3VolumeKnob; //channel 4 - pixmapButton * m_ch4EnabledBtn; - knob * m_ch4VolumeKnob; + PixmapButton * m_ch4EnabledBtn; + Knob * m_ch4VolumeKnob; - pixmapButton * m_ch4EnvEnabledBtn; - pixmapButton * m_ch4EnvLoopedBtn; - knob * m_ch4EnvLenKnob; + PixmapButton * m_ch4EnvEnabledBtn; + PixmapButton * m_ch4EnvLoopedBtn; + Knob * m_ch4EnvLenKnob; - pixmapButton * m_ch4NoiseModeBtn; - pixmapButton * m_ch4NoiseFreqModeBtn; - knob * m_ch4NoiseFreqKnob; + PixmapButton * m_ch4NoiseModeBtn; + PixmapButton * m_ch4NoiseFreqModeBtn; + Knob * m_ch4NoiseFreqKnob; - knob * m_ch4SweepKnob; - pixmapButton * m_ch4NoiseQuantizeBtn; + Knob * m_ch4SweepKnob; + PixmapButton * m_ch4NoiseQuantizeBtn; //master - knob * m_masterVolKnob; - knob * m_vibratoKnob; + Knob * m_masterVolKnob; + Knob * m_vibratoKnob; static QPixmap * s_artwork; }; diff --git a/plugins/opl2/opl2instrument.cpp b/plugins/opl2/opl2instrument.cpp index d5b7cacfc..f99c38296 100644 --- a/plugins/opl2/opl2instrument.cpp +++ b/plugins/opl2/opl2instrument.cpp @@ -57,10 +57,10 @@ #include "embed.cpp" #include "math.h" -#include "knob.h" +#include "Knob.h" #include "LcdSpinBox.h" -#include "pixmap_button.h" -#include "tooltip.h" +#include "PixmapButton.h" +#include "ToolTip.h" extern "C" { @@ -585,7 +585,7 @@ opl2instrumentView::opl2instrumentView( Instrument * _instrument, */ #define KNOB_GEN(knobname, hinttext, hintunit,xpos,ypos) \ - knobname = new knob( knobStyled, this );\ + knobname = new Knob( knobStyled, this );\ knobname->setHintText( tr(hinttext) + "", hintunit );\ knobname->setFixedSize(22,22);\ knobname->setCenterPointX(11.0);\ @@ -594,18 +594,18 @@ opl2instrumentView::opl2instrumentView( Instrument * _instrument, knobname->move(xpos,ypos); #define BUTTON_GEN(buttname, tooltip, xpos, ypos) \ - buttname = new pixmapButton( this, NULL );\ + buttname = new PixmapButton( this, NULL );\ buttname->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "opl2_led_on" ) );\ buttname->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "opl2_led_off" ) );\ buttname->setCheckable( true );\ - toolTip::add( buttname, tr( tooltip ) );\ + ToolTip::add( buttname, tr( tooltip ) );\ buttname->move( xpos, ypos ); #define WAVEBUTTON_GEN(buttname, tooltip, xpos, ypos, icon_on, icon_off, buttgroup) \ - buttname = new pixmapButton( this, NULL );\ + buttname = new PixmapButton( this, NULL );\ buttname->setActiveGraphic( PLUGIN_NAME::getIconPixmap( icon_on ) ); \ buttname->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( icon_off ) ); \ - toolTip::add( buttname, tr( tooltip ) );\ + ToolTip::add( buttname, tr( tooltip ) );\ buttname->move( xpos, ypos );\ buttgroup->addButton(buttname); diff --git a/plugins/opl2/opl2instrument.h b/plugins/opl2/opl2instrument.h index c837f1e04..7cd644942 100644 --- a/plugins/opl2/opl2instrument.h +++ b/plugins/opl2/opl2instrument.h @@ -30,8 +30,8 @@ #include "opl.h" #include "LcdSpinBox.h" -#include "knob.h" -#include "pixmap_button.h" +#include "Knob.h" +#include "PixmapButton.h" #define OPL2_VOICE_FREE 255 #define OPL2_NO_VOICE 255 @@ -146,46 +146,46 @@ public: LcdSpinBox *m_patch; void modelChanged(); - knob *op1_a_kn; - knob *op1_d_kn; - knob *op1_s_kn; - knob *op1_r_kn; - knob *op1_lvl_kn; - knob *op1_scale_kn; - knob *op1_mul_kn; - knob *feedback_kn; - pixmapButton *op1_ksr_btn; - pixmapButton *op1_perc_btn; - pixmapButton *op1_trem_btn; - pixmapButton *op1_vib_btn; - pixmapButton *op1_w0_btn; - pixmapButton *op1_w1_btn; - pixmapButton *op1_w2_btn; - pixmapButton *op1_w3_btn; + Knob *op1_a_kn; + Knob *op1_d_kn; + Knob *op1_s_kn; + Knob *op1_r_kn; + Knob *op1_lvl_kn; + Knob *op1_scale_kn; + Knob *op1_mul_kn; + Knob *feedback_kn; + PixmapButton *op1_ksr_btn; + PixmapButton *op1_perc_btn; + PixmapButton *op1_trem_btn; + PixmapButton *op1_vib_btn; + PixmapButton *op1_w0_btn; + PixmapButton *op1_w1_btn; + PixmapButton *op1_w2_btn; + PixmapButton *op1_w3_btn; automatableButtonGroup *op1_waveform; - knob *op2_a_kn; - knob *op2_d_kn; - knob *op2_s_kn; - knob *op2_r_kn; - knob *op2_lvl_kn; - knob *op2_scale_kn; - knob *op2_mul_kn; - pixmapButton *op2_ksr_btn; - pixmapButton *op2_perc_btn; - pixmapButton *op2_trem_btn; - pixmapButton *op2_vib_btn; - pixmapButton *op2_w0_btn; - pixmapButton *op2_w1_btn; - pixmapButton *op2_w2_btn; - pixmapButton *op2_w3_btn; + Knob *op2_a_kn; + Knob *op2_d_kn; + Knob *op2_s_kn; + Knob *op2_r_kn; + Knob *op2_lvl_kn; + Knob *op2_scale_kn; + Knob *op2_mul_kn; + PixmapButton *op2_ksr_btn; + PixmapButton *op2_perc_btn; + PixmapButton *op2_trem_btn; + PixmapButton *op2_vib_btn; + PixmapButton *op2_w0_btn; + PixmapButton *op2_w1_btn; + PixmapButton *op2_w2_btn; + PixmapButton *op2_w3_btn; automatableButtonGroup *op2_waveform; - pixmapButton *fm_btn; - pixmapButton *vib_depth_btn; - pixmapButton *trem_depth_btn; + PixmapButton *fm_btn; + PixmapButton *vib_depth_btn; + PixmapButton *trem_depth_btn; diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index 5bfb2d863..08699d18d 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -32,12 +32,12 @@ #include "Engine.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" #include "Oscillator.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "embed.cpp" @@ -403,11 +403,11 @@ PluginView * organicInstrument::instantiateView( QWidget * _parent ) -class organicKnob : public knob +class organicKnob : public Knob { public: organicKnob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 21, 21 ); } @@ -448,7 +448,7 @@ organicInstrumentView::organicInstrumentView( Instrument * _instrument, "It is cumulative with the instrument window's volume control. " ) ); // randomise - m_randBtn = new pixmapButton( this, tr( "Randomise" ) ); + m_randBtn = new PixmapButton( this, tr( "Randomise" ) ); m_randBtn->move( 148, 224 ); m_randBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "randomise_pressed" ) ); @@ -501,14 +501,14 @@ void organicInstrumentView::modelChanged() for( int i = 0; i < m_numOscillators; ++i ) { // setup harmonic knob - knob * harmKnob = new organicKnob( this ); + Knob * harmKnob = new organicKnob( this ); harmKnob->move( x + i * colWidth, y - rowHeight ); harmKnob->setObjectName( "harmKnob" ); connect( &oi->m_osc[i]->m_harmModel, SIGNAL( dataChanged() ), this, SLOT( updateKnobHint() ) ); // setup waveform-knob - knob * oscKnob = new organicKnob( this ); + Knob * oscKnob = new organicKnob( this ); oscKnob->move( x + i * colWidth, y ); connect( &oi->m_osc[i]->m_oscModel, SIGNAL( dataChanged() ), this, SLOT( updateKnobHint() ) ); @@ -516,7 +516,7 @@ void organicInstrumentView::modelChanged() oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ) + " ", QString() ); // setup volume-knob - knob * volKnob = new knob( knobStyled, this ); + Knob * volKnob = new Knob( knobStyled, this ); volKnob->setVolumeKnob( true ); volKnob->move( x + i * colWidth, y + rowHeight*1 ); volKnob->setFixedSize( 21, 21 ); @@ -524,13 +524,13 @@ void organicInstrumentView::modelChanged() i + 1 ) + " ", "%" ); // setup panning-knob - knob * panKnob = new organicKnob( this ); + Knob * panKnob = new organicKnob( this ); panKnob->move( x + i * colWidth, y + rowHeight*2 ); panKnob->setHintText( tr("Osc %1 panning:").arg( i + 1 ) + " ", "" ); // setup knob for fine-detuning - knob * detuneKnob = new organicKnob( this ); + Knob * detuneKnob = new organicKnob( this ); detuneKnob->move( x + i * colWidth, y + rowHeight*3 ); detuneKnob->setHintText( tr( "Osc %1 stereo detuning" ).arg( i + 1 ) + " ", " " + diff --git a/plugins/organic/organic.h b/plugins/organic/organic.h index e41349763..0cdd49ecd 100644 --- a/plugins/organic/organic.h +++ b/plugins/organic/organic.h @@ -35,9 +35,9 @@ class QPixmap; -class knob; +class Knob; class NotePlayHandle; -class pixmapButton; +class PixmapButton; const int NUM_HARMONICS = 18; const QString HARMONIC_NAMES[NUM_HARMONICS] = { @@ -184,11 +184,11 @@ private: { MM_OPERATORS OscillatorKnobs( - knob * h, - knob * v, - knob * o, - knob * p, - knob * dt ) : + Knob * h, + Knob * v, + Knob * o, + Knob * p, + Knob * dt ) : m_harmKnob( h ), m_volKnob( v ), m_oscKnob( o ), @@ -200,18 +200,18 @@ private: { } - knob * m_harmKnob; - knob * m_volKnob; - knob * m_oscKnob; - knob * m_panKnob; - knob * m_detuneKnob; + Knob * m_harmKnob; + Knob * m_volKnob; + Knob * m_oscKnob; + Knob * m_panKnob; + Knob * m_detuneKnob; } ; OscillatorKnobs * m_oscKnobs; - knob * m_fx1Knob; - knob * m_volKnob; - pixmapButton * m_randBtn; + Knob * m_fx1Knob; + Knob * m_volKnob; + PixmapButton * m_randBtn; int m_numOscillators; diff --git a/plugins/papu/papu_instrument.cpp b/plugins/papu/papu_instrument.cpp index 9b4ad4bde..947c9d841 100644 --- a/plugins/papu/papu_instrument.cpp +++ b/plugins/papu/papu_instrument.cpp @@ -31,12 +31,12 @@ #include "papu_instrument.h" #include "base64.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" -#include "tooltip.h" +#include "PixmapButton.h" +#include "ToolTip.h" #include "Engine.h" -#include "graph.h" +#include "Graph.h" #include "embed.cpp" @@ -426,11 +426,11 @@ PluginView * papuInstrument::instantiateView( QWidget * _parent ) } -class papuKnob : public knob +class papuKnob : public Knob { public: papuKnob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 30, 30 ); setCenterPointX( 15.0 ); @@ -458,7 +458,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch1SweepTimeKnob = new papuKnob( this ); m_ch1SweepTimeKnob->setHintText( tr( "Sweep Time:" ) + " ", "" ); m_ch1SweepTimeKnob->move( 5 + 4*32, 106 ); - toolTip::add( m_ch1SweepTimeKnob, tr( "Sweep Time" ) ); + ToolTip::add( m_ch1SweepTimeKnob, tr( "Sweep Time" ) ); m_ch1SweepTimeKnob->setWhatsThis( tr( "The amount of increase or" " decrease in frequency" ) ); @@ -466,7 +466,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch1SweepRtShiftKnob->setHintText( tr( "Sweep RtShift amount:" ) + " ", "" ); m_ch1SweepRtShiftKnob->move( 5 + 3*32, 106 ); - toolTip::add( m_ch1SweepRtShiftKnob, tr( "Sweep RtShift amount" ) ); + ToolTip::add( m_ch1SweepRtShiftKnob, tr( "Sweep RtShift amount" ) ); m_ch1SweepRtShiftKnob->setWhatsThis( tr( "The rate at which increase or" " decrease in frequency occurs" ) ); @@ -474,7 +474,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch1WavePatternDutyKnob->setHintText( tr( "Wave pattern duty:" ) + " ", "" ); m_ch1WavePatternDutyKnob->move( 5 + 2*32, 106 ); - toolTip::add( m_ch1WavePatternDutyKnob, tr( "Wave Pattern Duty" ) ); + ToolTip::add( m_ch1WavePatternDutyKnob, tr( "Wave Pattern Duty" ) ); m_ch1WavePatternDutyKnob->setWhatsThis( tr( "The duty cycle is the ratio of" " the duration (time) that a signal is ON" " versus the total period of the signal." ) ); @@ -483,14 +483,14 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch1VolumeKnob->setHintText( tr( "Square Channel 1 Volume:" ) + " ", "" ); m_ch1VolumeKnob->move( 5, 106 ); - toolTip::add( m_ch1VolumeKnob, tr( "Square Channel 1 Volume:" ) ); + ToolTip::add( m_ch1VolumeKnob, tr( "Square Channel 1 Volume:" ) ); m_ch1VolumeKnob->setWhatsThis( tr( "Square Channel 1 Volume" ) ); m_ch1SweepStepLengthKnob = new papuKnob( this ); m_ch1SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" ) + " ", "" ); m_ch1SweepStepLengthKnob->move( 5 + 32, 106 ); - toolTip::add( m_ch1SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); + ToolTip::add( m_ch1SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); m_ch1SweepStepLengthKnob->setWhatsThis( tr( "The delay between step change" ) ); @@ -499,7 +499,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch2WavePatternDutyKnob->setHintText( tr( "Wave pattern duty:" ) + " ", "" ); m_ch2WavePatternDutyKnob->move( 5 + 2*32, 155 ); - toolTip::add( m_ch2WavePatternDutyKnob, tr( "Wave pattern duty" ) ); + ToolTip::add( m_ch2WavePatternDutyKnob, tr( "Wave pattern duty" ) ); m_ch2WavePatternDutyKnob->setWhatsThis( tr( "The duty cycle is the ratio of" " the duration (time) that a signal is ON" " versus the total period of the signal." ) ); @@ -508,14 +508,14 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch2VolumeKnob->setHintText( tr( "Square Channel 2 Volume:" ) + " ", "" ); m_ch2VolumeKnob->move( 5, 155 ); - toolTip::add( m_ch2VolumeKnob, tr( "Square Channel 2 Volume" ) ); + ToolTip::add( m_ch2VolumeKnob, tr( "Square Channel 2 Volume" ) ); m_ch2VolumeKnob->setWhatsThis( tr( "Square Channel 2 Volume" ) ); m_ch2SweepStepLengthKnob = new papuKnob( this ); m_ch2SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" ) + " ", "" ); m_ch2SweepStepLengthKnob->move( 5 + 32, 155 ); - toolTip::add( m_ch2SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); + ToolTip::add( m_ch2SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); m_ch2SweepStepLengthKnob->setWhatsThis( tr( "The delay between step change" ) ); @@ -523,7 +523,7 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch3VolumeKnob = new papuKnob( this ); m_ch3VolumeKnob->setHintText( tr( "Wave Channel Volume:" ) + " ", "" ); m_ch3VolumeKnob->move( 5, 204 ); - toolTip::add( m_ch3VolumeKnob, tr( "Wave Channel Volume" ) ); + ToolTip::add( m_ch3VolumeKnob, tr( "Wave Channel Volume" ) ); m_ch3VolumeKnob->setWhatsThis( tr( "Wave Channel Volume" ) ); @@ -531,14 +531,14 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_ch4VolumeKnob = new papuKnob( this ); m_ch4VolumeKnob->setHintText( tr( "Noise Channel Volume:" ) + " ", "" ); m_ch4VolumeKnob->move( 144, 155 ); - toolTip::add( m_ch4VolumeKnob, tr( "Noise Channel Volume" ) ); + ToolTip::add( m_ch4VolumeKnob, tr( "Noise Channel Volume" ) ); m_ch4VolumeKnob->setWhatsThis( tr( "Noise Channel Volume" ) ); m_ch4SweepStepLengthKnob = new papuKnob( this ); m_ch4SweepStepLengthKnob->setHintText( tr( "Length of each step in sweep:" ) + " ", "" ); m_ch4SweepStepLengthKnob->move( 144 + 32, 155 ); - toolTip::add( m_ch4SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); + ToolTip::add( m_ch4SweepStepLengthKnob, tr( "Length of each step in sweep" ) ); m_ch4SweepStepLengthKnob->setWhatsThis( tr( "The delay between step change" ) ); @@ -546,44 +546,44 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, m_so1VolumeKnob = new papuKnob( this ); m_so1VolumeKnob->setHintText( tr( "SO1 Volume (Right):" ) + " ", "" ); m_so1VolumeKnob->move( 5, 58 ); - toolTip::add( m_so1VolumeKnob, tr( "SO1 Volume (Right)" ) ); + ToolTip::add( m_so1VolumeKnob, tr( "SO1 Volume (Right)" ) ); m_so2VolumeKnob = new papuKnob( this ); m_so2VolumeKnob->setHintText( tr( "SO2 Volume (Left):" ) + " ", "" ); m_so2VolumeKnob->move( 5 + 32, 58 ); - toolTip::add( m_so2VolumeKnob, tr( "SO2 Volume (Left)" ) ); + ToolTip::add( m_so2VolumeKnob, tr( "SO2 Volume (Left)" ) ); m_trebleKnob = new papuKnob( this ); m_trebleKnob->setHintText( tr( "Treble:" ) + " ", "" ); m_trebleKnob->move( 5 + 2*32, 58 ); - toolTip::add( m_trebleKnob, tr( "Treble" ) ); + ToolTip::add( m_trebleKnob, tr( "Treble" ) ); m_bassKnob = new papuKnob( this ); m_bassKnob->setHintText( tr( "Bass:" ) + " ", "" ); m_bassKnob->move( 5 + 3*32, 58 ); - toolTip::add( m_bassKnob, tr( "Bass" ) ); + ToolTip::add( m_bassKnob, tr( "Bass" ) ); - m_ch1SweepDirButton = new pixmapButton( this, NULL ); + m_ch1SweepDirButton = new PixmapButton( this, NULL ); m_ch1SweepDirButton->setCheckable( true ); m_ch1SweepDirButton->move( 167, 108 ); m_ch1SweepDirButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_down" ) ); m_ch1SweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_up" ) ); - toolTip::add( m_ch1SweepDirButton, tr( "Sweep Direction" ) ); + ToolTip::add( m_ch1SweepDirButton, tr( "Sweep Direction" ) ); - m_ch1VolSweepDirButton = new pixmapButton( this, NULL ); + m_ch1VolSweepDirButton = new PixmapButton( this, NULL ); m_ch1VolSweepDirButton->setCheckable( true ); m_ch1VolSweepDirButton->move( 207, 108 ); m_ch1VolSweepDirButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_up" ) ); m_ch1VolSweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_down" ) ); - toolTip::add( m_ch1VolSweepDirButton, tr( "Volume Sweep Direction" ) ); + ToolTip::add( m_ch1VolSweepDirButton, tr( "Volume Sweep Direction" ) ); - m_ch2VolSweepDirButton = new pixmapButton( this, + m_ch2VolSweepDirButton = new PixmapButton( this, tr( "Volume Sweep Direction" ) ); m_ch2VolSweepDirButton->setCheckable( true ); m_ch2VolSweepDirButton->move( 102, 156 ); @@ -591,12 +591,12 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "btn_up" ) ); m_ch2VolSweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_down" ) ); - toolTip::add( m_ch2VolSweepDirButton, tr( "Volume Sweep Direction" ) ); + ToolTip::add( m_ch2VolSweepDirButton, tr( "Volume Sweep Direction" ) ); - //m_ch3OnButton = new pixmapButton( this, NULL ); + //m_ch3OnButton = new PixmapButton( this, NULL ); //m_ch3OnButton->move( 176, 53 ); - m_ch4VolSweepDirButton = new pixmapButton( this, + m_ch4VolSweepDirButton = new PixmapButton( this, tr( "Volume Sweep Direction" ) ); m_ch4VolSweepDirButton->setCheckable( true ); m_ch4VolSweepDirButton->move( 207, 157 ); @@ -604,85 +604,85 @@ papuInstrumentView::papuInstrumentView( Instrument * _instrument, PLUGIN_NAME::getIconPixmap( "btn_up" ) ); m_ch4VolSweepDirButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_down" ) ); - toolTip::add( m_ch4VolSweepDirButton, tr( "Volume Sweep Direction" ) ); + ToolTip::add( m_ch4VolSweepDirButton, tr( "Volume Sweep Direction" ) ); - m_ch4ShiftRegWidthButton = new pixmapButton( this, NULL ); + m_ch4ShiftRegWidthButton = new PixmapButton( this, NULL ); m_ch4ShiftRegWidthButton->setCheckable( true ); m_ch4ShiftRegWidthButton->move( 207, 171 ); m_ch4ShiftRegWidthButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_7" ) ); m_ch4ShiftRegWidthButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_15" ) ); - toolTip::add( m_ch4ShiftRegWidthButton, tr( "Shift Register Width" ) ); + ToolTip::add( m_ch4ShiftRegWidthButton, tr( "Shift Register Width" ) ); - m_ch1So1Button = new pixmapButton( this, NULL ); + m_ch1So1Button = new PixmapButton( this, NULL ); m_ch1So1Button->setCheckable( true ); m_ch1So1Button->move( 208, 51 ); m_ch1So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch1So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch1So1Button, tr( "Channel1 to SO1 (Right)" ) ); + ToolTip::add( m_ch1So1Button, tr( "Channel1 to SO1 (Right)" ) ); - m_ch2So1Button = new pixmapButton( this, NULL ); + m_ch2So1Button = new PixmapButton( this, NULL ); m_ch2So1Button->setCheckable( true ); m_ch2So1Button->move( 208, 51 + 12 ); m_ch2So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch2So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch2So1Button, tr( "Channel2 to SO1 (Right)" ) ); + ToolTip::add( m_ch2So1Button, tr( "Channel2 to SO1 (Right)" ) ); - m_ch3So1Button = new pixmapButton( this, NULL ); + m_ch3So1Button = new PixmapButton( this, NULL ); m_ch3So1Button->setCheckable( true ); m_ch3So1Button->move( 208, 51 + 2*12 ); m_ch3So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch3So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch3So1Button, tr( "Channel3 to SO1 (Right)" ) ); + ToolTip::add( m_ch3So1Button, tr( "Channel3 to SO1 (Right)" ) ); - m_ch4So1Button = new pixmapButton( this, NULL ); + m_ch4So1Button = new PixmapButton( this, NULL ); m_ch4So1Button->setCheckable( true ); m_ch4So1Button->setChecked( false ); m_ch4So1Button->move( 208, 51 + 3*12 ); m_ch4So1Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch4So1Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch4So1Button, tr( "Channel4 to SO1 (Right)" ) ); + ToolTip::add( m_ch4So1Button, tr( "Channel4 to SO1 (Right)" ) ); - m_ch1So2Button = new pixmapButton( this, NULL ); + m_ch1So2Button = new PixmapButton( this, NULL ); m_ch1So2Button->setCheckable( true ); m_ch1So2Button->move( 148, 51 ); m_ch1So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch1So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch1So2Button, tr( "Channel1 to SO2 (Left)" ) ); + ToolTip::add( m_ch1So2Button, tr( "Channel1 to SO2 (Left)" ) ); - m_ch2So2Button = new pixmapButton( this, NULL ); + m_ch2So2Button = new PixmapButton( this, NULL ); m_ch2So2Button->setCheckable( true ); m_ch2So2Button->move( 148, 51 + 12 ); m_ch2So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch2So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch2So2Button, tr( "Channel2 to SO2 (Left)" ) ); + ToolTip::add( m_ch2So2Button, tr( "Channel2 to SO2 (Left)" ) ); - m_ch3So2Button = new pixmapButton( this, NULL ); + m_ch3So2Button = new PixmapButton( this, NULL ); m_ch3So2Button->setCheckable( true ); m_ch3So2Button->move( 148, 51 + 2*12 ); m_ch3So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch3So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch3So2Button, tr( "Channel3 to SO2 (Left)" ) ); + ToolTip::add( m_ch3So2Button, tr( "Channel3 to SO2 (Left)" ) ); - m_ch4So2Button = new pixmapButton( this, NULL ); + m_ch4So2Button = new PixmapButton( this, NULL ); m_ch4So2Button->setCheckable( true ); m_ch4So2Button->setChecked( false ); m_ch4So2Button->move( 148, 51 + 3*12 ); m_ch4So2Button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "btn_on" ) ); m_ch4So2Button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap("btn_off") ); - toolTip::add( m_ch4So2Button, tr( "Channel4 to SO2 (Left)" ) ); + ToolTip::add( m_ch4So2Button, tr( "Channel4 to SO2 (Left)" ) ); - m_graph = new graph( this ); - m_graph->setGraphStyle( graph::NearestStyle ); + m_graph = new Graph( this ); + m_graph->setGraphStyle( Graph::NearestStyle ); m_graph->setGraphColor( QColor(0x4E, 0x83, 0x2B) ); m_graph->move( 37, 199 ); m_graph->resize(208, 47); - toolTip::add( m_graph, tr( "Wave Pattern" ) ); + ToolTip::add( m_graph, tr( "Wave Pattern" ) ); m_graph->setWhatsThis( tr( "Draw the wave here" ) ); } diff --git a/plugins/papu/papu_instrument.h b/plugins/papu/papu_instrument.h index ffbee3987..bf926a405 100644 --- a/plugins/papu/papu_instrument.h +++ b/plugins/papu/papu_instrument.h @@ -29,12 +29,12 @@ #include #include "Instrument.h" #include "InstrumentView.h" -#include "knob.h" -#include "graph.h" +#include "Knob.h" +#include "Graph.h" class papuInstrumentView; class NotePlayHandle; -class pixmapButton; +class PixmapButton; class papuInstrument : public Instrument { @@ -116,40 +116,40 @@ public: private: virtual void modelChanged(); - knob * m_ch1SweepTimeKnob; - pixmapButton * m_ch1SweepDirButton; - knob * m_ch1SweepRtShiftKnob; - knob * m_ch1WavePatternDutyKnob; - knob * m_ch1VolumeKnob; - pixmapButton * m_ch1VolSweepDirButton; - knob * m_ch1SweepStepLengthKnob; + Knob * m_ch1SweepTimeKnob; + PixmapButton * m_ch1SweepDirButton; + Knob * m_ch1SweepRtShiftKnob; + Knob * m_ch1WavePatternDutyKnob; + Knob * m_ch1VolumeKnob; + PixmapButton * m_ch1VolSweepDirButton; + Knob * m_ch1SweepStepLengthKnob; - knob * m_ch2WavePatternDutyKnob; - knob * m_ch2VolumeKnob; - pixmapButton * m_ch2VolSweepDirButton; - knob * m_ch2SweepStepLengthKnob; + Knob * m_ch2WavePatternDutyKnob; + Knob * m_ch2VolumeKnob; + PixmapButton * m_ch2VolSweepDirButton; + Knob * m_ch2SweepStepLengthKnob; - knob * m_ch3VolumeKnob; + Knob * m_ch3VolumeKnob; - knob * m_ch4VolumeKnob; - pixmapButton * m_ch4VolSweepDirButton; - knob * m_ch4SweepStepLengthKnob; - pixmapButton * m_ch4ShiftRegWidthButton; + Knob * m_ch4VolumeKnob; + PixmapButton * m_ch4VolSweepDirButton; + Knob * m_ch4SweepStepLengthKnob; + PixmapButton * m_ch4ShiftRegWidthButton; - knob * m_so1VolumeKnob; - knob * m_so2VolumeKnob; - pixmapButton * m_ch1So1Button; - pixmapButton * m_ch2So1Button; - pixmapButton * m_ch3So1Button; - pixmapButton * m_ch4So1Button; - pixmapButton * m_ch1So2Button; - pixmapButton * m_ch2So2Button; - pixmapButton * m_ch3So2Button; - pixmapButton * m_ch4So2Button; - knob * m_trebleKnob; - knob * m_bassKnob; + Knob * m_so1VolumeKnob; + Knob * m_so2VolumeKnob; + PixmapButton * m_ch1So1Button; + PixmapButton * m_ch2So1Button; + PixmapButton * m_ch3So1Button; + PixmapButton * m_ch4So1Button; + PixmapButton * m_ch1So2Button; + PixmapButton * m_ch2So2Button; + PixmapButton * m_ch3So2Button; + PixmapButton * m_ch4So2Button; + Knob * m_trebleKnob; + Knob * m_bassKnob; - graph * m_graph; + Graph * m_graph; /*protected slots: void updateKnobHint(); diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 80dcb5f73..fc094f4e1 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -34,10 +34,10 @@ #include "gui_templates.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "Song.h" #include "string_pair_drag.h" -#include "tooltip.h" +#include "ToolTip.h" #include "FileDialog.h" #include "embed.cpp" @@ -448,7 +448,7 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : setPalette( pal ); - m_openFileButton = new pixmapButton( this, NULL ); + m_openFileButton = new PixmapButton( this, NULL ); m_openFileButton->setObjectName( "openFileButton" ); m_openFileButton->setCursor( QCursor( Qt::PointingHandCursor ) ); m_openFileButton->move( 227, 86 ); @@ -458,13 +458,13 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : "select_file" ) ); connect( m_openFileButton, SIGNAL( clicked() ), this, SLOT( openFile() ) ); - toolTip::add( m_openFileButton, tr( "Open other patch" ) ); + ToolTip::add( m_openFileButton, tr( "Open other patch" ) ); m_openFileButton->setWhatsThis( tr( "Click here to open another patch-file. Loop and Tune " "settings are not reset." ) ); - m_loopButton = new pixmapButton( this, tr( "Loop" ) ); + m_loopButton = new PixmapButton( this, tr( "Loop" ) ); m_loopButton->setObjectName("loopButton"); m_loopButton->setCheckable( true ); m_loopButton->move( 195, 138 ); @@ -472,13 +472,13 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : "loop_on" ) ); m_loopButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "loop_off" ) ); - toolTip::add( m_loopButton, tr( "Loop mode" ) ); + ToolTip::add( m_loopButton, tr( "Loop mode" ) ); m_loopButton->setWhatsThis( tr( "Here you can toggle the Loop mode. If enabled, PatMan " "will use the loop information available in the " "file." ) ); - m_tuneButton = new pixmapButton( this, tr( "Tune" ) ); + m_tuneButton = new PixmapButton( this, tr( "Tune" ) ); m_tuneButton->setObjectName("tuneButton"); m_tuneButton->setCheckable( true ); m_tuneButton->move( 223, 138 ); @@ -486,7 +486,7 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : "tune_on" ) ); m_tuneButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tune_off" ) ); - toolTip::add( m_tuneButton, tr( "Tune mode" ) ); + ToolTip::add( m_tuneButton, tr( "Tune mode" ) ); m_tuneButton->setWhatsThis( tr( "Here you can toggle the Tune mode. If enabled, PatMan " "will tune the sample to match the note's " diff --git a/plugins/patman/patman.h b/plugins/patman/patman.h index 9bf61db8e..c5668262b 100644 --- a/plugins/patman/patman.h +++ b/plugins/patman/patman.h @@ -32,7 +32,7 @@ #include "AutomatableModel.h" #include "MemoryManager.h" -class pixmapButton; +class PixmapButton; #define MODES_16BIT ( 1 << 0 ) @@ -141,9 +141,9 @@ private: patmanInstrument * m_pi; QString m_displayFilename; - pixmapButton * m_openFileButton; - pixmapButton * m_loopButton; - pixmapButton * m_tuneButton; + PixmapButton * m_openFileButton; + PixmapButton * m_loopButton; + PixmapButton * m_tuneButton; } ; diff --git a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp index 359b23b9b..e1b76d31e 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp @@ -30,8 +30,8 @@ #include "peak_controller_effect_control_dialog.h" #include "peak_controller_effect_controls.h" -#include "knob.h" -#include "led_checkbox.h" +#include "Knob.h" +#include "LedCheckbox.h" #include "embed.h" @@ -50,32 +50,32 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog( QHBoxLayout * l = new QHBoxLayout; l->setSpacing( 4 ); - m_baseKnob = new knob( knobBright_26, this ); + m_baseKnob = new Knob( knobBright_26, this ); m_baseKnob->setLabel( tr( "BASE" ) ); m_baseKnob->setModel( &_controls->m_baseModel ); m_baseKnob->setHintText( tr( "Base amount:" ) + " ", "" ); - m_amountKnob = new knob( knobBright_26, this ); + m_amountKnob = new Knob( knobBright_26, this ); m_amountKnob->setLabel( tr( "AMNT" ) ); m_amountKnob->setModel( &_controls->m_amountModel ); m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" ); - m_amountMultKnob = new knob( knobBright_26, this ); + m_amountMultKnob = new Knob( knobBright_26, this ); m_amountMultKnob->setLabel( tr( "MULT" ) ); m_amountMultKnob->setModel( &_controls->m_amountMultModel ); m_amountMultKnob->setHintText( tr( "Amount Multiplicator:" ) + " ", "" ); - m_attackKnob = new knob( knobBright_26, this ); + m_attackKnob = new Knob( knobBright_26, this ); m_attackKnob->setLabel( tr( "ATCK" ) ); m_attackKnob->setModel( &_controls->m_attackModel ); m_attackKnob->setHintText( tr( "Attack:" ) + " ", "" ); - m_decayKnob = new knob( knobBright_26, this ); + m_decayKnob = new Knob( knobBright_26, this ); m_decayKnob->setLabel( tr( "DCAY" ) ); m_decayKnob->setModel( &_controls->m_decayModel ); m_decayKnob->setHintText( tr( "Release:" ) + " ", "" ); - m_tresholdKnob = new knob( knobBright_26, this ); + m_tresholdKnob = new Knob( knobBright_26, this ); m_tresholdKnob->setLabel( tr( "TRES" ) ); m_tresholdKnob->setModel( &_controls->m_tresholdModel ); m_tresholdKnob->setHintText( tr( "Treshold:" ) + " ", "" ); @@ -91,10 +91,10 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog( QVBoxLayout * l2 = new QVBoxLayout; // = 2nd vbox - m_muteLed = new ledCheckBox( "Mute Effect", this ); + m_muteLed = new LedCheckBox( "Mute Effect", this ); m_muteLed->setModel( &_controls->m_muteModel ); - m_absLed = new ledCheckBox( "Absolute Value", this ); + m_absLed = new LedCheckBox( "Absolute Value", this ); m_absLed->setModel( &_controls->m_absModel ); l2->addWidget( m_muteLed ); diff --git a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h index 64e876e37..fd859ada5 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h +++ b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h @@ -29,8 +29,8 @@ #include "EffectControlDialog.h" class PeakControllerEffectControls; -class knob; -class ledCheckBox; +class Knob; +class LedCheckBox; class PeakControllerEffectControlDialog : public EffectControlDialog @@ -44,15 +44,15 @@ public: protected: - knob * m_baseKnob; - knob * m_amountKnob; - knob * m_attackKnob; - knob * m_decayKnob; - knob * m_tresholdKnob; - ledCheckBox * m_muteLed; + Knob * m_baseKnob; + Knob * m_amountKnob; + Knob * m_attackKnob; + Knob * m_decayKnob; + Knob * m_tresholdKnob; + LedCheckBox * m_muteLed; - ledCheckBox * m_absLed; - knob * m_amountMultKnob; + LedCheckBox * m_absLed; + Knob * m_amountMultKnob; } ; diff --git a/plugins/peak_controller_effect/peak_controller_effect_controls.h b/plugins/peak_controller_effect/peak_controller_effect_controls.h index ad56fa99a..9bd671afb 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_controls.h +++ b/plugins/peak_controller_effect/peak_controller_effect_controls.h @@ -28,7 +28,7 @@ #include "EffectControls.h" #include "peak_controller_effect_control_dialog.h" -#include "knob.h" +#include "Knob.h" class PeakControllerEffect; diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index f6eb4c784..340759fd4 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -34,11 +34,11 @@ #include "InstrumentTrack.h" #include "InstrumentPlayHandle.h" #include "NotePlayHandle.h" -#include "knob.h" +#include "Knob.h" #include "Song.h" #include "patches_dialog.h" -#include "tooltip.h" +#include "ToolTip.h" #include "LcdSpinBox.h" #include "embed.cpp" @@ -788,11 +788,11 @@ PluginView * sf2Instrument::instantiateView( QWidget * _parent ) -class sf2Knob : public knob +class sf2Knob : public Knob { public: sf2Knob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 31, 38 ); } @@ -812,7 +812,7 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren connect( &k->m_patchNum, SIGNAL( dataChanged() ), this, SLOT( updatePatchName() ) ); // File Button - m_fileDialogButton = new pixmapButton( this ); + m_fileDialogButton = new PixmapButton( this ); m_fileDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) ); m_fileDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_on" ) ); m_fileDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fileselect_off" ) ); @@ -820,12 +820,12 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren connect( m_fileDialogButton, SIGNAL( clicked() ), this, SLOT( showFileDialog() ) ); - toolTip::add( m_fileDialogButton, tr( "Open other SoundFont file" ) ); + ToolTip::add( m_fileDialogButton, tr( "Open other SoundFont file" ) ); m_fileDialogButton->setWhatsThis( tr( "Click here to open another SF2 file" ) ); // Patch Button - m_patchDialogButton = new pixmapButton( this ); + m_patchDialogButton = new PixmapButton( this ); m_patchDialogButton->setCursor( QCursor( Qt::PointingHandCursor ) ); m_patchDialogButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_on" ) ); m_patchDialogButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "patches_off" ) ); @@ -834,7 +834,7 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren connect( m_patchDialogButton, SIGNAL( clicked() ), this, SLOT( showPatchDialog() ) ); - toolTip::add( m_patchDialogButton, tr( "Choose the patch" ) ); + ToolTip::add( m_patchDialogButton, tr( "Choose the patch" ) ); // LCDs @@ -877,12 +877,12 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren // hl = new QHBoxLayout(); - m_reverbButton = new pixmapButton( this ); + m_reverbButton = new PixmapButton( this ); m_reverbButton->setCheckable( true ); m_reverbButton->move( 14, 180 ); m_reverbButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reverb_on" ) ); m_reverbButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reverb_off" ) ); - toolTip::add( m_reverbButton, tr( "Apply reverb (if supported)" ) ); + ToolTip::add( m_reverbButton, tr( "Apply reverb (if supported)" ) ); m_reverbButton->setWhatsThis( tr( "This button enables the reverb effect. " "This is useful for cool effects, but only works on " @@ -917,12 +917,12 @@ sf2InstrumentView::sf2InstrumentView( Instrument * _instrument, QWidget * _paren // Chorus // hl = new QHBoxLayout(); - m_chorusButton = new pixmapButton( this ); + m_chorusButton = new PixmapButton( this ); m_chorusButton->setCheckable( true ); m_chorusButton->move( 14, 226 ); m_chorusButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "chorus_on" ) ); m_chorusButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "chorus_off" ) ); - toolTip::add( m_reverbButton, tr( "Apply chorus (if supported)" ) ); + ToolTip::add( m_reverbButton, tr( "Apply chorus (if supported)" ) ); m_chorusButton->setWhatsThis( tr( "This button enables the chorus effect. " "This is useful for cool echo effects, but only works on " diff --git a/plugins/sf2_player/sf2_player.h b/plugins/sf2_player/sf2_player.h index a7b9262b6..2a6995c01 100644 --- a/plugins/sf2_player/sf2_player.h +++ b/plugins/sf2_player/sf2_player.h @@ -30,11 +30,11 @@ #include #include "Instrument.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "InstrumentView.h" -#include "knob.h" +#include "Knob.h" #include "LcdSpinBox.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "fluidsynth.h" #include "SampleBuffer.h" #include "MemoryManager.h" @@ -198,8 +198,8 @@ public: private: virtual void modelChanged(); - pixmapButton * m_fileDialogButton; - pixmapButton * m_patchDialogButton; + PixmapButton * m_fileDialogButton; + PixmapButton * m_patchDialogButton; LcdSpinBox * m_bankNumLcd; LcdSpinBox * m_patchNumLcd; @@ -207,19 +207,19 @@ private: QLabel * m_filenameLabel; QLabel * m_patchLabel; - knob * m_gainKnob; + Knob * m_gainKnob; - pixmapButton * m_reverbButton; - knob * m_reverbRoomSizeKnob; - knob * m_reverbDampingKnob; - knob * m_reverbWidthKnob; - knob * m_reverbLevelKnob; + PixmapButton * m_reverbButton; + Knob * m_reverbRoomSizeKnob; + Knob * m_reverbDampingKnob; + Knob * m_reverbWidthKnob; + Knob * m_reverbLevelKnob; - pixmapButton * m_chorusButton; - knob * m_chorusNumKnob; - knob * m_chorusLevelKnob; - knob * m_chorusSpeedKnob; - knob * m_chorusDepthKnob; + PixmapButton * m_chorusButton; + Knob * m_chorusNumKnob; + Knob * m_chorusLevelKnob; + Knob * m_chorusSpeedKnob; + Knob * m_chorusDepthKnob; static patchesDialog * s_patchDialog; diff --git a/plugins/sfxr/sfxr.cpp b/plugins/sfxr/sfxr.cpp index cd14af241..d06356c3e 100644 --- a/plugins/sfxr/sfxr.cpp +++ b/plugins/sfxr/sfxr.cpp @@ -41,11 +41,11 @@ float frnd(float range) #include "sfxr.h" #include "Engine.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "Song.h" #include "MidiEvent.h" #include "MidiTime.h" @@ -547,11 +547,11 @@ void sfxrInstrument::resetModels() -class sfxrKnob : public knob +class sfxrKnob : public Knob { public: sfxrKnob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 20, 20 ); setCenterPointX( 10.0 ); @@ -568,27 +568,27 @@ public: _knob = new sfxrKnob( this ); \ _knob->setHintText( tr( _name ":" ), "" ); \ _knob->move( _x, _y ); \ - toolTip::add( _knob, tr( _name ) ); + ToolTip::add( _knob, tr( _name ) ); #define createButton( _button, _x, _y, _name, _resName )\ - _button = new pixmapButton( this, tr( _name ) );\ + _button = new PixmapButton( this, tr( _name ) );\ _button->move( _x, _y );\ _button->setActiveGraphic( embed::getIconPixmap( _resName "_active" ) );\ _button->setInactiveGraphic( embed::getIconPixmap( _resName "_inactive" ) );\ - toolTip::add( _button, tr( _name ) ); + ToolTip::add( _button, tr( _name ) ); #define createButtonLocalGraphic( _button, _x, _y, _name, _resName )\ - _button = new pixmapButton( this, tr( _name ) );\ + _button = new PixmapButton( this, tr( _name ) );\ _button->move( _x, _y );\ _button->setActiveGraphic( PLUGIN_NAME::getIconPixmap( _resName "_active" ) );\ _button->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( _resName "_inactive" ) );\ - toolTip::add( _button, tr( _name ) ); + ToolTip::add( _button, tr( _name ) ); diff --git a/plugins/sfxr/sfxr.h b/plugins/sfxr/sfxr.h index d83c98283..c16b993fa 100644 --- a/plugins/sfxr/sfxr.h +++ b/plugins/sfxr/sfxr.h @@ -30,10 +30,10 @@ #include "Instrument.h" #include "InstrumentView.h" -#include "knob.h" -#include "graph.h" -#include "pixmap_button.h" -#include "led_checkbox.h" +#include "Knob.h" +#include "Graph.h" +#include "PixmapButton.h" +#include "LedCheckbox.h" #include "MemoryManager.h" @@ -248,53 +248,53 @@ protected slots: private: virtual void modelChanged(); - knob * m_attKnob; //Attack Time - knob * m_holdKnob; //Sustain Time - knob * m_susKnob; //Sustain Punch - knob * m_decKnob; //Decay Time + Knob * m_attKnob; //Attack Time + Knob * m_holdKnob; //Sustain Time + Knob * m_susKnob; //Sustain Punch + Knob * m_decKnob; //Decay Time - knob * m_startFreqKnob; //Start Frequency - knob * m_minFreqKnob; //Min Frequency - knob * m_slideKnob; //Slide - knob * m_dSlideKnob; //Delta Slide - knob * m_vibDepthKnob; //Vibrato Depth - knob * m_vibSpeedKnob; //Vibrato Speed + Knob * m_startFreqKnob; //Start Frequency + Knob * m_minFreqKnob; //Min Frequency + Knob * m_slideKnob; //Slide + Knob * m_dSlideKnob; //Delta Slide + Knob * m_vibDepthKnob; //Vibrato Depth + Knob * m_vibSpeedKnob; //Vibrato Speed - knob * m_changeAmtKnob; //Change Amount - knob * m_changeSpeedKnob; //Change Speed + Knob * m_changeAmtKnob; //Change Amount + Knob * m_changeSpeedKnob; //Change Speed - knob * m_sqrDutyKnob; //Squre Duty - knob * m_sqrSweepKnob; //Squre Sweep + Knob * m_sqrDutyKnob; //Squre Duty + Knob * m_sqrSweepKnob; //Squre Sweep - knob * m_repeatSpeedKnob; //Repeat Speed + Knob * m_repeatSpeedKnob; //Repeat Speed - knob * m_phaserOffsetKnob; //Phaser Offset - knob * m_phaserSweepKnob; //Phaser Sweep + Knob * m_phaserOffsetKnob; //Phaser Offset + Knob * m_phaserSweepKnob; //Phaser Sweep - knob * m_lpFilCutKnob; //LP Filter Cutoff - knob * m_lpFilCutSweepKnob; //LP Filter Cutoff Sweep - knob * m_lpFilResoKnob; //LP Filter Resonance - knob * m_hpFilCutKnob; //HP Filter Cutoff - knob * m_hpFilCutSweepKnob; //HP Filter Cutoff Sweep + Knob * m_lpFilCutKnob; //LP Filter Cutoff + Knob * m_lpFilCutSweepKnob; //LP Filter Cutoff Sweep + Knob * m_lpFilResoKnob; //LP Filter Resonance + Knob * m_hpFilCutKnob; //HP Filter Cutoff + Knob * m_hpFilCutSweepKnob; //HP Filter Cutoff Sweep automatableButtonGroup * m_waveBtnGroup; - pixmapButton * m_sqrWaveBtn; //NOTE: This button has Squre Duty + PixmapButton * m_sqrWaveBtn; //NOTE: This button has Squre Duty //and Squre Speed configurable - pixmapButton * m_sawWaveBtn; - pixmapButton * m_sinWaveBtn; - pixmapButton * m_noiseWaveBtn; + PixmapButton * m_sawWaveBtn; + PixmapButton * m_sinWaveBtn; + PixmapButton * m_noiseWaveBtn; - pixmapButton * m_pickupBtn; - pixmapButton * m_laserBtn; - pixmapButton * m_explosionBtn; - pixmapButton * m_powerupBtn; - pixmapButton * m_hitBtn; - pixmapButton * m_jumpBtn; - pixmapButton * m_blipBtn; + PixmapButton * m_pickupBtn; + PixmapButton * m_laserBtn; + PixmapButton * m_explosionBtn; + PixmapButton * m_powerupBtn; + PixmapButton * m_hitBtn; + PixmapButton * m_jumpBtn; + PixmapButton * m_blipBtn; - pixmapButton * m_randomizeBtn; - pixmapButton * m_mutateBtn; + PixmapButton * m_randomizeBtn; + PixmapButton * m_mutateBtn; static QPixmap * s_artwork; }; diff --git a/plugins/sid/sid_instrument.cpp b/plugins/sid/sid_instrument.cpp index 6942daa2d..0e64e83d7 100644 --- a/plugins/sid/sid_instrument.cpp +++ b/plugins/sid/sid_instrument.cpp @@ -34,10 +34,10 @@ #include "sid_instrument.h" #include "Engine.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" -#include "tooltip.h" +#include "PixmapButton.h" +#include "ToolTip.h" #include "embed.cpp" @@ -457,11 +457,11 @@ PluginView * sidInstrument::instantiateView( QWidget * _parent ) -class sidKnob : public knob +class sidKnob : public Knob { public: sidKnob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 16, 16 ); setCenterPointX( 7.5 ); @@ -498,47 +498,47 @@ sidInstrumentView::sidInstrumentView( Instrument * _instrument, m_cutKnob->setHintText( tr( "Cutoff frequency:" ) + " ", "Hz" ); m_cutKnob->move( 7 + 2*28, 64 ); - pixmapButton * hp_btn = new pixmapButton( this, NULL ); + PixmapButton * hp_btn = new PixmapButton( this, NULL ); hp_btn->move( 140, 77 ); hp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "hpred" ) ); hp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "hp" ) ); - toolTip::add( hp_btn, tr( "High-Pass filter ") ); + ToolTip::add( hp_btn, tr( "High-Pass filter ") ); - pixmapButton * bp_btn = new pixmapButton( this, NULL ); + PixmapButton * bp_btn = new PixmapButton( this, NULL ); bp_btn->move( 164, 77 ); bp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bpred" ) ); bp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bp" ) ); - toolTip::add( bp_btn, tr( "Band-Pass filter ") ); + ToolTip::add( bp_btn, tr( "Band-Pass filter ") ); - pixmapButton * lp_btn = new pixmapButton( this, NULL ); + PixmapButton * lp_btn = new PixmapButton( this, NULL ); lp_btn->move( 185, 77 ); lp_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "lpred" ) ); lp_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "lp" ) ); - toolTip::add( lp_btn, tr( "Low-Pass filter ") ); + ToolTip::add( lp_btn, tr( "Low-Pass filter ") ); m_passBtnGrp = new automatableButtonGroup( this ); m_passBtnGrp->addButton( hp_btn ); m_passBtnGrp->addButton( bp_btn ); m_passBtnGrp->addButton( lp_btn ); - m_offButton = new pixmapButton( this, NULL ); + m_offButton = new PixmapButton( this, NULL ); m_offButton->setCheckable( true ); m_offButton->move( 207, 77 ); m_offButton->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "3offred" ) ); m_offButton->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "3off" ) ); - toolTip::add( m_offButton, tr( "Voice3 Off ") ); + ToolTip::add( m_offButton, tr( "Voice3 Off ") ); - pixmapButton * mos6581_btn = new pixmapButton( this, NULL ); + PixmapButton * mos6581_btn = new PixmapButton( this, NULL ); mos6581_btn->move( 170, 59 ); mos6581_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "6581red" ) ); mos6581_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "6581" ) ); - toolTip::add( mos6581_btn, tr( "MOS6581 SID ") ); + ToolTip::add( mos6581_btn, tr( "MOS6581 SID ") ); - pixmapButton * mos8580_btn = new pixmapButton( this, NULL ); + PixmapButton * mos8580_btn = new PixmapButton( this, NULL ); mos8580_btn->move( 207, 59 ); mos8580_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "8580red" ) ); mos8580_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "8580" ) ); - toolTip::add( mos8580_btn, tr( "MOS8580 SID ") ); + ToolTip::add( mos8580_btn, tr( "MOS8580 SID ") ); m_sidTypeBtnGrp = new automatableButtonGroup( this ); m_sidTypeBtnGrp->addButton( mos6581_btn ); @@ -546,32 +546,32 @@ sidInstrumentView::sidInstrumentView( Instrument * _instrument, for( int i = 0; i < 3; i++ ) { - knob *ak = new sidKnob( this ); + Knob *ak = new sidKnob( this ); ak->setHintText( tr("Attack:") + " ", "" ); ak->move( 7, 114 + i*50 ); ak->setWhatsThis( tr ( "Attack rate determines how rapidly the output " "of Voice %1 rises from zero to peak amplitude." ).arg( i+1 ) ); - knob *dk = new sidKnob( this ); + Knob *dk = new sidKnob( this ); dk->setHintText( tr("Decay:") + " ", "" ); dk->move( 7 + 28, 114 + i*50 ); dk->setWhatsThis( tr ( "Decay rate determines how rapidly the output " "falls from the peak amplitude to the selected Sustain level." ) ); - knob *sk = new sidKnob( this ); + Knob *sk = new sidKnob( this ); sk->setHintText( tr("Sustain:") + " ", "" ); sk->move( 7 + 2*28, 114 + i*50 ); sk->setWhatsThis( tr ( "Output of Voice %1 will remain at the selected " "Sustain amplitude as long as the note is held." ).arg( i+1 ) ); - knob *rk = new sidKnob( this ); + Knob *rk = new sidKnob( this ); rk->setHintText( tr("Release:") + " ", "" ); rk->move( 7 + 3*28, 114 + i*50 ); rk->setWhatsThis( tr ( "The output of of Voice %1 will fall from " "Sustain amplitude to zero amplitude at the selected Release " "rate." ).arg( i+1 ) ); - knob *pwk = new sidKnob( this ); + Knob *pwk = new sidKnob( this ); pwk->setHintText( tr("Pulse Width:") + " ", "" ); pwk->move( 7 + 4*28, 114 + i*50 ); pwk->setWhatsThis( tr ( "The Pulse Width resolution allows the width " @@ -579,43 +579,43 @@ sidInstrumentView::sidInstrumentView( Instrument * _instrument, "waveform on Oscillator %1 must be selected to have any audible" " effect." ).arg( i+1 ) ); - knob *crsk = new sidKnob( this ); + Knob *crsk = new sidKnob( this ); crsk->setHintText( tr("Coarse:") + " ", " semitones" ); crsk->move( 147, 114 + i*50 ); crsk->setWhatsThis( tr ( "The Coarse detuning allows to detune Voice " "%1 one octave up or down." ).arg( i+1 ) ); - pixmapButton * pulse_btn = new pixmapButton( this, NULL ); + PixmapButton * pulse_btn = new PixmapButton( this, NULL ); pulse_btn->move( 187, 101 + i*50 ); pulse_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "pulsered" ) ); pulse_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pulse" ) ); - toolTip::add( pulse_btn, tr( "Pulse Wave" ) ); + ToolTip::add( pulse_btn, tr( "Pulse Wave" ) ); - pixmapButton * triangle_btn = new pixmapButton( this, NULL ); + PixmapButton * triangle_btn = new PixmapButton( this, NULL ); triangle_btn->move( 168, 101 + i*50 ); triangle_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "trianglered" ) ); triangle_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "triangle" ) ); - toolTip::add( triangle_btn, tr( "Triangle Wave" ) ); + ToolTip::add( triangle_btn, tr( "Triangle Wave" ) ); - pixmapButton * saw_btn = new pixmapButton( this, NULL ); + PixmapButton * saw_btn = new PixmapButton( this, NULL ); saw_btn->move( 207, 101 + i*50 ); saw_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sawred" ) ); saw_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "saw" ) ); - toolTip::add( saw_btn, tr( "SawTooth" ) ); + ToolTip::add( saw_btn, tr( "SawTooth" ) ); - pixmapButton * noise_btn = new pixmapButton( this, NULL ); + PixmapButton * noise_btn = new PixmapButton( this, NULL ); noise_btn->move( 226, 101 + i*50 ); noise_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "noisered" ) ); noise_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "noise" ) ); - toolTip::add( noise_btn, tr( "Noise" ) ); + ToolTip::add( noise_btn, tr( "Noise" ) ); automatableButtonGroup * wfbg = new automatableButtonGroup( this ); @@ -627,53 +627,53 @@ sidInstrumentView::sidInstrumentView( Instrument * _instrument, int syncRingWidth[] = { 3, 1, 2 }; - pixmapButton * sync_btn = new pixmapButton( this, NULL ); + PixmapButton * sync_btn = new PixmapButton( this, NULL ); sync_btn->setCheckable( true ); sync_btn->move( 207, 134 + i*50 ); sync_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "syncred" ) ); sync_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sync" ) ); - toolTip::add( sync_btn, tr( "Sync" ) ); + ToolTip::add( sync_btn, tr( "Sync" ) ); sync_btn->setWhatsThis( tr ( "Sync synchronizes the fundamental " "frequency of Oscillator %1 with the fundamental frequency of " "Oscillator %2 producing \"Hard Sync\" effects." ).arg( i+1 ) .arg( syncRingWidth[i] ) ); - pixmapButton * ringMod_btn = new pixmapButton( this, NULL ); + PixmapButton * ringMod_btn = new PixmapButton( this, NULL ); ringMod_btn->setCheckable( true ); ringMod_btn->move( 170, 116 + i*50 ); ringMod_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "ringred" ) ); ringMod_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "ring" ) ); - toolTip::add( ringMod_btn, tr( "Ring-Mod" ) ); + ToolTip::add( ringMod_btn, tr( "Ring-Mod" ) ); ringMod_btn->setWhatsThis( tr ( "Ring-mod replaces the Triangle " "Waveform output of Oscillator %1 with a \"Ring Modulated\" " "combination of Oscillators %1 and %2." ).arg( i+1 ) .arg( syncRingWidth[i] ) ); - pixmapButton * filter_btn = new pixmapButton( this, NULL ); + PixmapButton * filter_btn = new PixmapButton( this, NULL ); filter_btn->setCheckable( true ); filter_btn->move( 207, 116 + i*50 ); filter_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "filterred" ) ); filter_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "filter" ) ); - toolTip::add( filter_btn, tr( "Filtered" ) ); + ToolTip::add( filter_btn, tr( "Filtered" ) ); filter_btn->setWhatsThis( tr ( "When Filtered is on, Voice %1 will be " "processed through the Filter. When Filtered is off, Voice %1 " "appears directly at the output, and the Filter has no effect on " "it." ).arg( i+1 ) ); - pixmapButton * test_btn = new pixmapButton( this, NULL ); + PixmapButton * test_btn = new PixmapButton( this, NULL ); test_btn->setCheckable( true ); test_btn->move( 170, 134 + i*50 ); test_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "testred" ) ); test_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "test" ) ); - toolTip::add( test_btn, tr( "Test" ) ); + ToolTip::add( test_btn, tr( "Test" ) ); test_btn->setWhatsThis( tr ( "Test, when set, resets and locks " "Oscillator %1 at zero until Test is turned off." ).arg( i+1 ) ); @@ -696,32 +696,32 @@ void sidInstrumentView::updateKnobHint() m_voiceKnobs[i].m_attKnob->setHintText( tr( "Attack:" ) + " ", " (" + QString::fromLatin1( attackTime[(int)k->m_voice[i]-> m_attackModel.value()] ) + ")" ); - toolTip::add( m_voiceKnobs[i].m_attKnob, + ToolTip::add( m_voiceKnobs[i].m_attKnob, attackTime[(int)k->m_voice[i]->m_attackModel.value()] ); m_voiceKnobs[i].m_decKnob->setHintText( tr( "Decay:" ) + " ", " (" + QString::fromLatin1( decRelTime[(int)k->m_voice[i]-> m_decayModel.value()] ) + ")" ); - toolTip::add( m_voiceKnobs[i].m_decKnob, + ToolTip::add( m_voiceKnobs[i].m_decKnob, decRelTime[(int)k->m_voice[i]->m_decayModel.value()] ); m_voiceKnobs[i].m_relKnob->setHintText( tr( "Release:" ) + " ", " (" + QString::fromLatin1( decRelTime[(int)k->m_voice[i]-> m_releaseModel.value()] ) + ")" ); - toolTip::add( m_voiceKnobs[i].m_relKnob, + ToolTip::add( m_voiceKnobs[i].m_relKnob, decRelTime[(int)k->m_voice[i]->m_releaseModel.value()]); m_voiceKnobs[i].m_pwKnob->setHintText( tr( "Pulse Width:" )+ " ", " (" + QString::number( (double)k->m_voice[i]-> m_pulseWidthModel.value() / 40.95 ) + "%)" ); - toolTip::add( m_voiceKnobs[i].m_pwKnob, + ToolTip::add( m_voiceKnobs[i].m_pwKnob, QString::number( (double)k->m_voice[i]-> m_pulseWidthModel.value() / 40.95 ) + "%" ); } m_cutKnob->setHintText( tr( "Cutoff frequency:" ) + " ", " (" + QString::number ( (int) ( 9970.0 / 2047.0 * (double)k->m_filterFCModel.value() + 30.0 ) ) + "Hz)" ); - toolTip::add( m_cutKnob, QString::number( (int) ( 9970.0 / 2047.0 * + ToolTip::add( m_cutKnob, QString::number( (int) ( 9970.0 / 2047.0 * (double)k->m_filterFCModel.value() + 30.0 ) ) + "Hz" ); } @@ -733,15 +733,15 @@ void sidInstrumentView::updateKnobToolTip() sidInstrument * k = castModel(); for( int i = 0; i < 3; ++i ) { - toolTip::add( m_voiceKnobs[i].m_sustKnob, + ToolTip::add( m_voiceKnobs[i].m_sustKnob, QString::number( (int)k->m_voice[i]->m_sustainModel.value() ) ); - toolTip::add( m_voiceKnobs[i].m_crsKnob, + ToolTip::add( m_voiceKnobs[i].m_crsKnob, QString::number( (int)k->m_voice[i]->m_coarseModel.value() ) + " semitones" ); } - toolTip::add( m_volKnob, + ToolTip::add( m_volKnob, QString::number( (int)k->m_volumeModel.value() ) ); - toolTip::add( m_resKnob, + ToolTip::add( m_resKnob, QString::number( (int)k->m_filterResonanceModel.value() ) ); } diff --git a/plugins/sid/sid_instrument.h b/plugins/sid/sid_instrument.h index 45b6e7d4d..5e8770675 100644 --- a/plugins/sid/sid_instrument.h +++ b/plugins/sid/sid_instrument.h @@ -30,13 +30,13 @@ #include #include "Instrument.h" #include "InstrumentView.h" -#include "knob.h" +#include "Knob.h" class sidInstrumentView; class NotePlayHandle; class automatableButtonGroup; -class pixmapButton; +class PixmapButton; class voiceObject : public Model { @@ -147,17 +147,17 @@ private: struct voiceKnobs { - voiceKnobs( knob * a, - knob * d, - knob * s, - knob * r, - knob * pw, - knob * crs, + voiceKnobs( Knob * a, + Knob * d, + Knob * s, + Knob * r, + Knob * pw, + Knob * crs, automatableButtonGroup * wfbg, - pixmapButton * syncb, - pixmapButton * ringb, - pixmapButton * filterb, - pixmapButton * testb ) : + PixmapButton * syncb, + PixmapButton * ringb, + PixmapButton * filterb, + PixmapButton * testb ) : m_attKnob( a ), m_decKnob( d ), m_sustKnob( s ), @@ -174,25 +174,25 @@ private: voiceKnobs() { } - knob * m_attKnob; - knob * m_decKnob; - knob * m_sustKnob; - knob * m_relKnob; - knob * m_pwKnob; - knob * m_crsKnob; + Knob * m_attKnob; + Knob * m_decKnob; + Knob * m_sustKnob; + Knob * m_relKnob; + Knob * m_pwKnob; + Knob * m_crsKnob; automatableButtonGroup * m_waveFormBtnGrp; - pixmapButton * m_syncButton; - pixmapButton * m_ringModButton; - pixmapButton * m_filterButton; - pixmapButton * m_testButton; + PixmapButton * m_syncButton; + PixmapButton * m_ringModButton; + PixmapButton * m_filterButton; + PixmapButton * m_testButton; } ; voiceKnobs m_voiceKnobs[3]; - knob * m_volKnob; - knob * m_resKnob; - knob * m_cutKnob; - pixmapButton * m_offButton; + Knob * m_volKnob; + Knob * m_resKnob; + Knob * m_cutKnob; + PixmapButton * m_offButton; protected slots: void updateKnobHint(); diff --git a/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp b/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp index 5013883d2..42fabf427 100644 --- a/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp +++ b/plugins/stereo_enhancer/stereoenhancer_control_dialog.cpp @@ -37,7 +37,7 @@ stereoEnhancerControlDialog::stereoEnhancerControlDialog( { QHBoxLayout * l = new QHBoxLayout( this ); - knob * widthKnob = new knob( knobBright_26, this ); + Knob * widthKnob = new Knob( knobBright_26, this ); widthKnob->setModel( &_controls->m_widthModel ); widthKnob->setLabel( tr( "WIDE" ) ); widthKnob->setHintText( tr( "Width:" ) + " ", "samples" ); diff --git a/plugins/stereo_enhancer/stereoenhancer_controls.h b/plugins/stereo_enhancer/stereoenhancer_controls.h index 6616bf3e0..7448449cf 100644 --- a/plugins/stereo_enhancer/stereoenhancer_controls.h +++ b/plugins/stereo_enhancer/stereoenhancer_controls.h @@ -27,7 +27,7 @@ #include "EffectControls.h" #include "stereoenhancer_control_dialog.h" -#include "knob.h" +#include "Knob.h" class stereoEnhancerEffect; diff --git a/plugins/stereo_matrix/stereomatrix_control_dialog.cpp b/plugins/stereo_matrix/stereomatrix_control_dialog.cpp index 22ea484a4..3017973ea 100644 --- a/plugins/stereo_matrix/stereomatrix_control_dialog.cpp +++ b/plugins/stereo_matrix/stereomatrix_control_dialog.cpp @@ -47,22 +47,22 @@ stereoMatrixControlDialog::stereoMatrixControlDialog( setPalette( pal ); - knob * llKnob = new knob( knobSmall_17, this ); + Knob * llKnob = new Knob( knobSmall_17, this ); llKnob->setModel( &_controls->m_llModel ); llKnob->setHintText( tr( "Left to Left Vol:" ) + " ", "" ); llKnob->move( 40, 60 ); - knob * lrKnob = new knob( knobSmall_17, this ); + Knob * lrKnob = new Knob( knobSmall_17, this ); lrKnob->setModel( &_controls->m_lrModel ); lrKnob->setHintText( tr( "Left to Right Vol:" ) + " ", "" ); lrKnob->move( 40+28, 60); - knob * rlKnob = new knob( knobSmall_17, this ); + Knob * rlKnob = new Knob( knobSmall_17, this ); rlKnob->setModel( &_controls->m_rlModel ); rlKnob->setHintText( tr( "Right to Left Vol:" ) + " ", "" ); rlKnob->move( 40, 60+28 ); - knob * rrKnob = new knob( knobSmall_17, this ); + Knob * rrKnob = new Knob( knobSmall_17, this ); rrKnob->setModel( &_controls->m_rrModel ); rrKnob->setHintText( tr( "Right to Right Vol:" ) + " ", "" ); rrKnob->move( 40+28, 60+28 ); diff --git a/plugins/stereo_matrix/stereomatrix_controls.h b/plugins/stereo_matrix/stereomatrix_controls.h index 8604b4d34..8f5443fd1 100644 --- a/plugins/stereo_matrix/stereomatrix_controls.h +++ b/plugins/stereo_matrix/stereomatrix_controls.h @@ -27,7 +27,7 @@ #include "EffectControls.h" #include "stereomatrix_control_dialog.h" -#include "knob.h" +#include "Knob.h" class stereoMatrixEffect; diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index d34bde876..433a6883b 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -324,14 +324,14 @@ malletsInstrumentView::malletsInstrumentView( malletsInstrument * _instrument, m_bandedWGWidget->hide(); m_bandedWGWidget->move( 0,0 ); - m_presetsCombo = new comboBox( this, tr( "Instrument" ) ); + m_presetsCombo = new ComboBox( this, tr( "Instrument" ) ); m_presetsCombo->setGeometry( 140, 50, 99, 22 ); m_presetsCombo->setFont( pointSize<8>( m_presetsCombo->font() ) ); connect( &_instrument->m_presetsModel, SIGNAL( dataChanged() ), this, SLOT( changePreset() ) ); - m_spreadKnob = new knob( knobVintage_32, this ); + m_spreadKnob = new Knob( knobVintage_32, this ); m_spreadKnob->setLabel( tr( "Spread" ) ); m_spreadKnob->move( 190, 140 ); m_spreadKnob->setHintText( tr( "Spread:" ) + " ", "" ); @@ -363,27 +363,27 @@ QWidget * malletsInstrumentView::setupModalBarControls( QWidget * _parent ) QWidget * widget = new QWidget( _parent ); widget->setFixedSize( 250, 250 ); - m_hardnessKnob = new knob( knobVintage_32, widget ); + m_hardnessKnob = new Knob( knobVintage_32, widget ); m_hardnessKnob->setLabel( tr( "Hardness" ) ); m_hardnessKnob->move( 30, 90 ); m_hardnessKnob->setHintText( tr( "Hardness:" ) + " ", "" ); - m_positionKnob = new knob( knobVintage_32, widget ); + m_positionKnob = new Knob( knobVintage_32, widget ); m_positionKnob->setLabel( tr( "Position" ) ); m_positionKnob->move( 110, 90 ); m_positionKnob->setHintText( tr( "Position:" ) + " ", "" ); - m_vibratoGainKnob = new knob( knobVintage_32, widget ); + m_vibratoGainKnob = new Knob( knobVintage_32, widget ); m_vibratoGainKnob->setLabel( tr( "Vib Gain" ) ); m_vibratoGainKnob->move( 30, 140 ); m_vibratoGainKnob->setHintText( tr( "Vib Gain:" ) + " ", "" ); - m_vibratoFreqKnob = new knob( knobVintage_32, widget ); + m_vibratoFreqKnob = new Knob( knobVintage_32, widget ); m_vibratoFreqKnob->setLabel( tr( "Vib Freq" ) ); m_vibratoFreqKnob->move( 110, 140 ); m_vibratoFreqKnob->setHintText( tr( "Vib Freq:" ) + " ", "" ); - m_stickKnob = new knob( knobVintage_32, widget ); + m_stickKnob = new Knob( knobVintage_32, widget ); m_stickKnob->setLabel( tr( "Stick Mix" ) ); m_stickKnob->move( 190, 90 ); m_stickKnob->setHintText( tr( "Stick Mix:" ) + " ", "" ); @@ -399,27 +399,27 @@ QWidget * malletsInstrumentView::setupTubeBellControls( QWidget * _parent ) QWidget * widget = new QWidget( _parent ); widget->setFixedSize( 250, 250 ); - m_modulatorKnob = new knob( knobVintage_32, widget ); + m_modulatorKnob = new Knob( knobVintage_32, widget ); m_modulatorKnob->setLabel( tr( "Modulator" ) ); m_modulatorKnob->move( 30, 90 ); m_modulatorKnob->setHintText( tr( "Modulator:" ) + " ", "" ); - m_crossfadeKnob = new knob( knobVintage_32, widget ); + m_crossfadeKnob = new Knob( knobVintage_32, widget ); m_crossfadeKnob->setLabel( tr( "Crossfade" ) ); m_crossfadeKnob->move( 110, 90 ); m_crossfadeKnob->setHintText( tr( "Crossfade:" ) + " ", "" ); - m_lfoSpeedKnob = new knob( knobVintage_32, widget ); + m_lfoSpeedKnob = new Knob( knobVintage_32, widget ); m_lfoSpeedKnob->setLabel( tr( "LFO Speed" ) ); m_lfoSpeedKnob->move( 30, 140 ); m_lfoSpeedKnob->setHintText( tr( "LFO Speed:" ) + " ", "" ); - m_lfoDepthKnob = new knob( knobVintage_32, widget ); + m_lfoDepthKnob = new Knob( knobVintage_32, widget ); m_lfoDepthKnob->setLabel( tr( "LFO Depth" ) ); m_lfoDepthKnob->move( 110, 140 ); m_lfoDepthKnob->setHintText( tr( "LFO Depth:" ) + " ", "" ); - m_adsrKnob = new knob( knobVintage_32, widget ); + m_adsrKnob = new Knob( knobVintage_32, widget ); m_adsrKnob->setLabel( tr( "ADSR" ) ); m_adsrKnob->move( 190, 90 ); m_adsrKnob->setHintText( tr( "ADSR:" ) + " ", "" ); @@ -436,25 +436,25 @@ QWidget * malletsInstrumentView::setupBandedWGControls( QWidget * _parent ) QWidget * widget = new QWidget( _parent ); widget->setFixedSize( 250, 250 ); - m_strikeLED = new ledCheckBox( tr( "Bowed" ), widget ); + m_strikeLED = new LedCheckBox( tr( "Bowed" ), widget ); m_strikeLED->move( 138, 25 ); - m_pressureKnob = new knob( knobVintage_32, widget ); + m_pressureKnob = new Knob( knobVintage_32, widget ); m_pressureKnob->setLabel( tr( "Pressure" ) ); m_pressureKnob->move( 30, 90 ); m_pressureKnob->setHintText( tr( "Pressure:" ) + " ", "" ); - m_motionKnob = new knob( knobVintage_32, widget ); + m_motionKnob = new Knob( knobVintage_32, widget ); m_motionKnob->setLabel( tr( "Motion" ) ); m_motionKnob->move( 110, 90 ); m_motionKnob->setHintText( tr( "Motion:" ) + " ", "" ); - m_velocityKnob = new knob( knobVintage_32, widget ); + m_velocityKnob = new Knob( knobVintage_32, widget ); m_velocityKnob->setLabel( tr( "Speed" ) ); m_velocityKnob->move( 30, 140 ); m_velocityKnob->setHintText( tr( "Speed:" ) + " ", "" ); - m_vibratoKnob = new knob( knobVintage_32, widget, tr( "Vibrato" ) ); + m_vibratoKnob = new Knob( knobVintage_32, widget, tr( "Vibrato" ) ); m_vibratoKnob->setLabel( tr( "Vibrato" ) ); m_vibratoKnob->move( 110, 140 ); m_vibratoKnob->setHintText( tr( "Vibrato:" ) + " ", "" ); diff --git a/plugins/stk/mallets/mallets.h b/plugins/stk/mallets/mallets.h index 2213d9666..11311bfac 100644 --- a/plugins/stk/mallets/mallets.h +++ b/plugins/stk/mallets/mallets.h @@ -29,12 +29,12 @@ #include "Instrmnt.h" -#include "combobox.h" +#include "ComboBox.h" #include "Instrument.h" #include "InstrumentView.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" // As of Stk 4.4 all classes and types have been moved to the namespace "stk". // However in older versions this namespace does not exist, therefore declare it @@ -203,28 +203,28 @@ private: QWidget * setupBandedWGControls( QWidget * _parent ); QWidget * m_modalBarWidget; - knob * m_hardnessKnob; - knob * m_positionKnob; - knob * m_vibratoGainKnob; - knob * m_vibratoFreqKnob; - knob * m_stickKnob; + Knob * m_hardnessKnob; + Knob * m_positionKnob; + Knob * m_vibratoGainKnob; + Knob * m_vibratoFreqKnob; + Knob * m_stickKnob; QWidget * m_tubeBellWidget; - knob * m_modulatorKnob; - knob * m_crossfadeKnob; - knob * m_lfoSpeedKnob; - knob * m_lfoDepthKnob; - knob * m_adsrKnob; + Knob * m_modulatorKnob; + Knob * m_crossfadeKnob; + Knob * m_lfoSpeedKnob; + Knob * m_lfoDepthKnob; + Knob * m_adsrKnob; QWidget * m_bandedWGWidget; - knob * m_pressureKnob; - knob * m_motionKnob; - knob * m_vibratoKnob; - knob * m_velocityKnob; - ledCheckBox * m_strikeLED; + Knob * m_pressureKnob; + Knob * m_motionKnob; + Knob * m_vibratoKnob; + Knob * m_velocityKnob; + LedCheckBox * m_strikeLED; - comboBox * m_presetsCombo; - knob * m_spreadKnob; + ComboBox * m_presetsCombo; + Knob * m_spreadKnob; }; #endif diff --git a/plugins/triple_oscillator/TripleOscillator.cpp b/plugins/triple_oscillator/TripleOscillator.cpp index 154aeb666..360b7ad24 100644 --- a/plugins/triple_oscillator/TripleOscillator.cpp +++ b/plugins/triple_oscillator/TripleOscillator.cpp @@ -32,11 +32,11 @@ #include "debug.h" #include "Engine.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "SampleBuffer.h" -#include "tooltip.h" +#include "ToolTip.h" #include "embed.cpp" @@ -141,7 +141,7 @@ void OscillatorObject::oscUserDefWaveDblClick() if( af != "" ) { // TODO: - //toolTip::add( m_usrWaveBtn, m_sampleBuffer->audioFile() ); + //ToolTip::add( m_usrWaveBtn, m_sampleBuffer->audioFile() ); } } @@ -403,11 +403,11 @@ void TripleOscillator::updateAllDetuning() -class TripleOscKnob : public knob +class TripleOscKnob : public Knob { public: TripleOscKnob( QWidget * _parent ) : - knob( knobStyled, _parent ) + Knob( knobStyled, _parent ) { setFixedSize( 28, 35 ); } @@ -433,50 +433,50 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, const int osc_h = 52; // TODO: clean rewrite using layouts and all that... - pixmapButton * pm_osc1_btn = new pixmapButton( this, NULL ); + PixmapButton * pm_osc1_btn = new PixmapButton( this, NULL ); pm_osc1_btn->move( mod_x, mod1_y ); pm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_active" ) ); pm_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_inactive" ) ); - toolTip::add( pm_osc1_btn, tr( "Use phase modulation for " + ToolTip::add( pm_osc1_btn, tr( "Use phase modulation for " "modulating oscillator 2 with " "oscillator 1" ) ); - pixmapButton * am_osc1_btn = new pixmapButton( this, NULL ); + PixmapButton * am_osc1_btn = new PixmapButton( this, NULL ); am_osc1_btn->move( mod_x + 35, mod1_y ); am_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "am_active" ) ); am_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "am_inactive" ) ); - toolTip::add( am_osc1_btn, tr( "Use amplitude modulation for " + ToolTip::add( am_osc1_btn, tr( "Use amplitude modulation for " "modulating oscillator 2 with " "oscillator 1" ) ); - pixmapButton * mix_osc1_btn = new pixmapButton( this, NULL ); + PixmapButton * mix_osc1_btn = new PixmapButton( this, NULL ); mix_osc1_btn->move( mod_x + 70, mod1_y ); mix_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_active" ) ); mix_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_inactive" ) ); - toolTip::add( mix_osc1_btn, tr( "Mix output of oscillator 1 & 2" ) ); + ToolTip::add( mix_osc1_btn, tr( "Mix output of oscillator 1 & 2" ) ); - pixmapButton * sync_osc1_btn = new pixmapButton( this, NULL ); + PixmapButton * sync_osc1_btn = new PixmapButton( this, NULL ); sync_osc1_btn->move( mod_x + 105, mod1_y ); sync_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sync_active" ) ); sync_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sync_inactive" ) ); - toolTip::add( sync_osc1_btn, tr( "Synchronize oscillator 1 with " + ToolTip::add( sync_osc1_btn, tr( "Synchronize oscillator 1 with " "oscillator 2" ) ); - pixmapButton * fm_osc1_btn = new pixmapButton( this, NULL ); + PixmapButton * fm_osc1_btn = new PixmapButton( this, NULL ); fm_osc1_btn->move( mod_x + 140, mod1_y ); fm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_active" ) ); fm_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_inactive" ) ); - toolTip::add( fm_osc1_btn, tr( "Use frequency modulation for " + ToolTip::add( fm_osc1_btn, tr( "Use frequency modulation for " "modulating oscillator 2 with " "oscillator 1" ) ); @@ -489,50 +489,50 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, - pixmapButton * pm_osc2_btn = new pixmapButton( this, NULL ); + PixmapButton * pm_osc2_btn = new PixmapButton( this, NULL ); pm_osc2_btn->move( mod_x, mod2_y ); pm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_active" ) ); pm_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "pm_inactive" ) ); - toolTip::add( pm_osc2_btn, tr( "Use phase modulation for " + ToolTip::add( pm_osc2_btn, tr( "Use phase modulation for " "modulating oscillator 3 with " "oscillator 2" ) ); - pixmapButton * am_osc2_btn = new pixmapButton( this, NULL ); + PixmapButton * am_osc2_btn = new PixmapButton( this, NULL ); am_osc2_btn->move( mod_x + 35, mod2_y ); am_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "am_active" ) ); am_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "am_inactive" ) ); - toolTip::add( am_osc2_btn, tr( "Use amplitude modulation for " + ToolTip::add( am_osc2_btn, tr( "Use amplitude modulation for " "modulating oscillator 3 with " "oscillator 2" ) ); - pixmapButton * mix_osc2_btn = new pixmapButton( this, NULL ); + PixmapButton * mix_osc2_btn = new PixmapButton( this, NULL ); mix_osc2_btn->move( mod_x + 70, mod2_y ); mix_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_active" ) ); mix_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "mix_inactive" ) ); - toolTip::add( mix_osc2_btn, tr("Mix output of oscillator 2 & 3" ) ); + ToolTip::add( mix_osc2_btn, tr("Mix output of oscillator 2 & 3" ) ); - pixmapButton * sync_osc2_btn = new pixmapButton( this, NULL ); + PixmapButton * sync_osc2_btn = new PixmapButton( this, NULL ); sync_osc2_btn->move( mod_x + 105, mod2_y ); sync_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sync_active" ) ); sync_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sync_inactive" ) ); - toolTip::add( sync_osc2_btn, tr( "Synchronize oscillator 2 with " + ToolTip::add( sync_osc2_btn, tr( "Synchronize oscillator 2 with " "oscillator 3" ) ); - pixmapButton * fm_osc2_btn = new pixmapButton( this, NULL ); + PixmapButton * fm_osc2_btn = new PixmapButton( this, NULL ); fm_osc2_btn->move( mod_x + 140, mod2_y ); fm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_active" ) ); fm_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "fm_inactive" ) ); - toolTip::add( fm_osc2_btn, tr( "Use frequency modulation for " + ToolTip::add( fm_osc2_btn, tr( "Use frequency modulation for " "modulating oscillator 3 with " "oscillator 2" ) ); @@ -550,7 +550,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, int knob_y = osc_y + i * osc_h; // setup volume-knob - knob * vk = new knob( knobStyled, this ); + Knob * vk = new Knob( knobStyled, this ); vk->setVolumeKnob( true ); vk->setFixedSize( 28, 35 ); vk->move( 6, knob_y ); @@ -564,7 +564,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "here.").arg( i+1 ) ); // setup panning-knob - knob * pk = new TripleOscKnob( this ); + Knob * pk = new TripleOscKnob( this ); pk->move( 35, knob_y ); pk->setHintText( tr("Osc %1 panning:").arg( i + 1 ) + " ", "" ); pk->setWhatsThis( @@ -574,7 +574,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "output right.").arg( i+1 ) ); // setup coarse-knob - knob * ck = new TripleOscKnob( this ); + Knob * ck = new TripleOscKnob( this ); ck->move( 82, knob_y ); ck->setHintText( tr( "Osc %1 coarse detuning:" ).arg( i + 1 ) + " ", " " + tr( "semitones" ) ); @@ -587,7 +587,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, // setup knob for left fine-detuning - knob * flk = new TripleOscKnob( this ); + Knob * flk = new TripleOscKnob( this ); flk->move( 111, knob_y ); flk->setHintText( tr( "Osc %1 fine detuning left:" ). arg( i + 1 ) + " ", @@ -600,7 +600,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, "\"fat\" sounds." ).arg( i + 1 ) ); // setup knob for right fine-detuning - knob * frk = new TripleOscKnob( this ); + Knob * frk = new TripleOscKnob( this ); frk->move( 140, knob_y ); frk->setHintText( tr( "Osc %1 fine detuning right:" ). arg( i + 1 ) + " ", @@ -614,7 +614,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, // setup phase-offset-knob - knob * pok = new TripleOscKnob( this ); + Knob * pok = new TripleOscKnob( this ); pok->move( 188, knob_y ); pok->setHintText( tr( "Osc %1 phase-offset:" ). arg( i + 1 ) + " ", @@ -630,7 +630,7 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, ).arg( i+1 ) ); // setup stereo-phase-detuning-knob - knob * spdk = new TripleOscKnob( this ); + Knob * spdk = new TripleOscKnob( this ); spdk->move( 217, knob_y ); spdk->setHintText( tr("Osc %1 stereo phase-detuning:" ). arg( i + 1 ) + " ", @@ -645,85 +645,85 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, int btn_y = 96 + i * osc_h; - pixmapButton * sin_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * sin_wave_btn = new PixmapButton( this, NULL ); sin_wave_btn->move( 128, btn_y ); sin_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_shape_active" ) ); sin_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_shape_inactive" ) ); - toolTip::add( sin_wave_btn, + ToolTip::add( sin_wave_btn, tr( "Use a sine-wave for " "current oscillator." ) ); - pixmapButton * triangle_wave_btn = - new pixmapButton( this, NULL ); + PixmapButton * triangle_wave_btn = + new PixmapButton( this, NULL ); triangle_wave_btn->move( 143, btn_y ); triangle_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "triangle_shape_active" ) ); triangle_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "triangle_shape_inactive" ) ); - toolTip::add( triangle_wave_btn, + ToolTip::add( triangle_wave_btn, tr( "Use a triangle-wave " "for current oscillator." ) ); - pixmapButton * saw_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * saw_wave_btn = new PixmapButton( this, NULL ); saw_wave_btn->move( 158, btn_y ); saw_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_shape_active" ) ); saw_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_shape_inactive" ) ); - toolTip::add( saw_wave_btn, + ToolTip::add( saw_wave_btn, tr( "Use a saw-wave for " "current oscillator." ) ); - pixmapButton * sqr_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * sqr_wave_btn = new PixmapButton( this, NULL ); sqr_wave_btn->move( 173, btn_y ); sqr_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "square_shape_active" ) ); sqr_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "square_shape_inactive" ) ); - toolTip::add( sqr_wave_btn, + ToolTip::add( sqr_wave_btn, tr( "Use a square-wave for " "current oscillator." ) ); - pixmapButton * moog_saw_wave_btn = - new pixmapButton( this, NULL ); + PixmapButton * moog_saw_wave_btn = + new PixmapButton( this, NULL ); moog_saw_wave_btn->move( 188, btn_y ); moog_saw_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "moog_saw_shape_active" ) ); moog_saw_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "moog_saw_shape_inactive" ) ); - toolTip::add( moog_saw_wave_btn, + ToolTip::add( moog_saw_wave_btn, tr( "Use a moog-like saw-wave " "for current oscillator." ) ); - pixmapButton * exp_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * exp_wave_btn = new PixmapButton( this, NULL ); exp_wave_btn->move( 203, btn_y ); exp_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "exp_shape_active" ) ); exp_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "exp_shape_inactive" ) ); - toolTip::add( exp_wave_btn, + ToolTip::add( exp_wave_btn, tr( "Use an exponential " "wave for current oscillator." ) ); - pixmapButton * white_noise_btn = new pixmapButton( this, NULL ); + PixmapButton * white_noise_btn = new PixmapButton( this, NULL ); white_noise_btn->move( 218, btn_y ); white_noise_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "white_noise_shape_active" ) ); white_noise_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "white_noise_shape_inactive" ) ); - toolTip::add( white_noise_btn, + ToolTip::add( white_noise_btn, tr( "Use white-noise for " "current oscillator." ) ); - pixmapButton * uwb = new pixmapButton( this, NULL ); + PixmapButton * uwb = new PixmapButton( this, NULL ); uwb->move( 233, btn_y ); uwb->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "usr_shape_active" ) ); uwb->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "usr_shape_inactive" ) ); - toolTip::add( uwb, tr( "Use a user-defined " + ToolTip::add( uwb, tr( "Use a user-defined " "waveform for current oscillator." ) ); automatableButtonGroup * wsbg = diff --git a/plugins/triple_oscillator/TripleOscillator.h b/plugins/triple_oscillator/TripleOscillator.h index 622472080..a339fe899 100644 --- a/plugins/triple_oscillator/TripleOscillator.h +++ b/plugins/triple_oscillator/TripleOscillator.h @@ -33,9 +33,9 @@ class automatableButtonGroup; -class knob; +class Knob; class NotePlayHandle; -class pixmapButton; +class PixmapButton; class SampleBuffer; const int NUM_OF_OSCILLATORS = 3; @@ -153,14 +153,14 @@ private: struct OscillatorKnobs { MM_OPERATORS - OscillatorKnobs( knob * v, - knob * p, - knob * c, - knob * fl, - knob * fr, - knob * po, - knob * spd, - pixmapButton * uwb, + OscillatorKnobs( Knob * v, + Knob * p, + Knob * c, + Knob * fl, + Knob * fr, + Knob * po, + Knob * spd, + PixmapButton * uwb, automatableButtonGroup * wsbg ) : m_volKnob( v ), m_panKnob( p ), @@ -176,14 +176,14 @@ private: OscillatorKnobs() { } - knob * m_volKnob; - knob * m_panKnob; - knob * m_coarseKnob; - knob * m_fineLeftKnob; - knob * m_fineRightKnob; - knob * m_phaseOffsetKnob; - knob * m_stereoPhaseDetuningKnob; - pixmapButton * m_userWaveButton; + Knob * m_volKnob; + Knob * m_panKnob; + Knob * m_coarseKnob; + Knob * m_fineLeftKnob; + Knob * m_fineRightKnob; + Knob * m_phaseOffsetKnob; + Knob * m_stereoPhaseDetuningKnob; + PixmapButton * m_userWaveButton; automatableButtonGroup * m_waveShapeBtnGrp; } ; diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 4b3f7b386..69349b3bf 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -38,10 +38,10 @@ #include "InstrumentTrack.h" #include "VstPlugin.h" #include "MainWindow.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "string_pair_drag.h" -#include "text_float.h" -#include "tooltip.h" +#include "TextFloat.h" +#include "ToolTip.h" #include "FileDialog.h" #include "embed.cpp" @@ -119,7 +119,7 @@ void vestigeInstrument::loadSettings( const QDomElement & _this ) const QMap & dump = m_plugin->parameterDump(); paramCount = dump.size(); char paramStr[35]; - vstKnobs = new knob *[ paramCount ]; + vstKnobs = new Knob *[ paramCount ]; knobFModel = new FloatModel *[ paramCount ]; QStringList s_dumpValues; QWidget * widget = new QWidget(); @@ -128,7 +128,7 @@ void vestigeInstrument::loadSettings( const QDomElement & _this ) sprintf( paramStr, "param%d", i ); s_dumpValues = dump[ paramStr ].split( ":" ); - vstKnobs[i] = new knob( knobBright_26, widget, s_dumpValues.at( 1 ) ); + vstKnobs[i] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) ); vstKnobs[i]->setHintText( s_dumpValues.at( 1 ) + ":", "" ); vstKnobs[i]->setLabel( s_dumpValues.at( 1 ).left( 15 ) ); @@ -250,7 +250,7 @@ void vestigeInstrument::loadFile( const QString & _file ) } m_pluginDLL = _file; - textFloat * tf = textFloat::displayMessage( + TextFloat * tf = TextFloat::displayMessage( tr( "Loading plugin" ), tr( "Please wait while loading VST-plugin..." ), PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 ); @@ -406,7 +406,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "artwork" ) ); } - m_openPluginButton = new pixmapButton( this, "" ); + m_openPluginButton = new PixmapButton( this, "" ); m_openPluginButton->setCheckable( false ); m_openPluginButton->setCursor( Qt::PointingHandCursor ); m_openPluginButton->move( 216, 81 ); @@ -416,14 +416,14 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "select_file" ) ); connect( m_openPluginButton, SIGNAL( clicked() ), this, SLOT( openPlugin() ) ); - toolTip::add( m_openPluginButton, tr( "Open other VST-plugin" ) ); + ToolTip::add( m_openPluginButton, tr( "Open other VST-plugin" ) ); m_openPluginButton->setWhatsThis( tr( "Click here, if you want to open another VST-plugin. After " "clicking on this button, a file-open-dialog appears " "and you can select your file." ) ); - m_managePluginButton = new pixmapButton( this, "" ); + m_managePluginButton = new PixmapButton( this, "" ); m_managePluginButton->setCheckable( false ); m_managePluginButton->setCursor( Qt::PointingHandCursor ); m_managePluginButton->move( 216, 101 ); @@ -433,13 +433,13 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "track_op_menu" ) ); connect( m_managePluginButton, SIGNAL( clicked() ), this, SLOT( managePlugin() ) ); - toolTip::add( m_managePluginButton, tr( "Control VST-plugin from LMMS host" ) ); + ToolTip::add( m_managePluginButton, tr( "Control VST-plugin from LMMS host" ) ); m_managePluginButton->setWhatsThis( tr( "Click here, if you want to control VST-plugin from host." ) ); - m_openPresetButton = new pixmapButton( this, "" ); + m_openPresetButton = new PixmapButton( this, "" ); m_openPresetButton->setCheckable( false ); m_openPresetButton->setCursor( Qt::PointingHandCursor ); m_openPresetButton->move( 200, 224 ); @@ -449,13 +449,13 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "project_open", 20, 20 ) ); connect( m_openPresetButton, SIGNAL( clicked() ), this, SLOT( openPreset() ) ); - toolTip::add( m_openPresetButton, tr( "Open VST-plugin preset" ) ); + ToolTip::add( m_openPresetButton, tr( "Open VST-plugin preset" ) ); m_openPresetButton->setWhatsThis( tr( "Click here, if you want to open another *.fxp, *.fxb VST-plugin preset." ) ); - m_rolLPresetButton = new pixmapButton( this, "" ); + m_rolLPresetButton = new PixmapButton( this, "" ); m_rolLPresetButton->setCheckable( false ); m_rolLPresetButton->setCursor( Qt::PointingHandCursor ); m_rolLPresetButton->move( 190, 201 ); @@ -465,7 +465,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "stepper-left" ) ); connect( m_rolLPresetButton, SIGNAL( clicked() ), this, SLOT( previousProgram() ) ); - toolTip::add( m_rolLPresetButton, tr( "Previous (-)" ) ); + ToolTip::add( m_rolLPresetButton, tr( "Previous (-)" ) ); m_rolLPresetButton->setShortcut( Qt::Key_Minus ); @@ -473,7 +473,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, tr( "Click here, if you want to switch to another VST-plugin preset program." ) ); - m_savePresetButton = new pixmapButton( this, "" ); + m_savePresetButton = new PixmapButton( this, "" ); m_savePresetButton->setCheckable( false ); m_savePresetButton->setCursor( Qt::PointingHandCursor ); m_savePresetButton->move( 224, 224 ); @@ -483,13 +483,13 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "project_save", 20, 20 ) ); connect( m_savePresetButton, SIGNAL( clicked() ), this, SLOT( savePreset() ) ); - toolTip::add( m_savePresetButton, tr( "Save preset" ) ); + ToolTip::add( m_savePresetButton, tr( "Save preset" ) ); m_savePresetButton->setWhatsThis( tr( "Click here, if you want to save current VST-plugin preset program." ) ); - m_rolRPresetButton = new pixmapButton( this, "" ); + m_rolRPresetButton = new PixmapButton( this, "" ); m_rolRPresetButton->setCheckable( false ); m_rolRPresetButton->setCursor( Qt::PointingHandCursor ); m_rolRPresetButton->move( 209, 201 ); @@ -499,7 +499,7 @@ VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, "stepper-right" ) ); connect( m_rolRPresetButton, SIGNAL( clicked() ), this, SLOT( nextProgram() ) ); - toolTip::add( m_rolRPresetButton, tr( "Next (+)" ) ); + ToolTip::add( m_rolRPresetButton, tr( "Next (+)" ) ); m_rolRPresetButton->setShortcut( Qt::Key_Plus ); @@ -934,7 +934,7 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume bool isVstKnobs = true; if (m_vi->vstKnobs == NULL) { - m_vi->vstKnobs = new knob *[ m_vi->paramCount ]; + m_vi->vstKnobs = new Knob *[ m_vi->paramCount ]; isVstKnobs = false; } if (m_vi->knobFModel == NULL) { @@ -950,7 +950,7 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume sprintf( paramStr, "param%d", i); s_dumpValues = dump[ paramStr ].split( ":" ); - m_vi->vstKnobs[ i ] = new knob( knobBright_26, this, s_dumpValues.at( 1 ) ); + m_vi->vstKnobs[ i ] = new Knob( knobBright_26, this, s_dumpValues.at( 1 ) ); m_vi->vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" ); m_vi->vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) ); diff --git a/plugins/vestige/vestige.h b/plugins/vestige/vestige.h index 51265aaaf..328c5e4a5 100644 --- a/plugins/vestige/vestige.h +++ b/plugins/vestige/vestige.h @@ -35,7 +35,7 @@ #include "Instrument.h" #include "InstrumentView.h" #include "Note.h" -#include "knob.h" +#include "Knob.h" #include "AutomatableModel.h" @@ -43,7 +43,7 @@ class QPixmap; class QPushButton; -class pixmapButton; +class PixmapButton; class VstPlugin; @@ -85,7 +85,7 @@ private: QString m_pluginDLL; QMdiSubWindow * m_subWindow; QScrollArea * m_scrollArea; - knob ** vstKnobs; + Knob ** vstKnobs; FloatModel ** knobFModel; QObject * p_subWindow; int paramCount; @@ -168,14 +168,14 @@ private: int lastPosInMenu; - pixmapButton * m_openPluginButton; - pixmapButton * m_openPresetButton; - pixmapButton * m_rolLPresetButton; - pixmapButton * m_rolRPresetButton; + PixmapButton * m_openPluginButton; + PixmapButton * m_openPresetButton; + PixmapButton * m_rolLPresetButton; + PixmapButton * m_rolRPresetButton; QPushButton * m_selPresetButton; QPushButton * m_toggleGUIButton; - pixmapButton * m_managePluginButton; - pixmapButton * m_savePresetButton; + PixmapButton * m_managePluginButton; + PixmapButton * m_savePresetButton; Instrument * _instrument2; QWidget * _parent2; diff --git a/plugins/vibed/nine_button_selector.cpp b/plugins/vibed/nine_button_selector.cpp index 2bc9e1463..583151789 100644 --- a/plugins/vibed/nine_button_selector.cpp +++ b/plugins/vibed/nine_button_selector.cpp @@ -60,7 +60,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, setFixedSize( 50, 50 ); move( _x, _y ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 1, 1 ); m_button->setActiveGraphic( _button0_on ); m_button->setInactiveGraphic( _button0_off ); @@ -69,7 +69,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button0Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 18, 1 ); m_button->setActiveGraphic( _button1_on ); m_button->setInactiveGraphic( _button1_off ); @@ -78,7 +78,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button1Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 35, 1 ); m_button->setActiveGraphic( _button2_on ); m_button->setInactiveGraphic( _button2_off ); @@ -87,7 +87,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button2Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 1, 18 ); m_button->setActiveGraphic( _button3_on ); m_button->setInactiveGraphic( _button3_off ); @@ -96,7 +96,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button3Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 18, 18 ); m_button->setActiveGraphic( _button4_on ); m_button->setInactiveGraphic( _button4_off ); @@ -105,7 +105,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button4Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 35, 18 ); m_button->setActiveGraphic( _button5_on ); m_button->setInactiveGraphic( _button5_off ); @@ -114,7 +114,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button5Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 1, 35 ); m_button->setActiveGraphic( _button6_on ); m_button->setInactiveGraphic( _button6_off ); @@ -123,7 +123,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button6Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 18, 35 ); m_button->setActiveGraphic( _button7_on ); m_button->setInactiveGraphic( _button7_off ); @@ -132,7 +132,7 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, this, SLOT ( button7Clicked() ) ); m_buttons.append( m_button ); - m_button = new pixmapButton( this, NULL ); + m_button = new PixmapButton( this, NULL ); m_button->move( 35, 35 ); m_button->setActiveGraphic( _button8_on ); m_button->setInactiveGraphic( _button8_off ); diff --git a/plugins/vibed/nine_button_selector.h b/plugins/vibed/nine_button_selector.h index e7e086271..6adc47b67 100644 --- a/plugins/vibed/nine_button_selector.h +++ b/plugins/vibed/nine_button_selector.h @@ -25,7 +25,7 @@ #ifndef _NINE_BUTTON_SELECTOR_H #define _NINE_BUTTON_SELECTOR_H -#include "pixmap_button.h" +#include "PixmapButton.h" class nineButtonSelector: public QWidget , public IntModelView @@ -83,9 +83,9 @@ private: virtual void modelChanged(); void updateButton( int ); - QList m_buttons; - pixmapButton * m_button; - pixmapButton * m_lastBtn; + QList m_buttons; + PixmapButton * m_button; + PixmapButton * m_lastBtn; } ; diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index 8d08e6acf..d48297779 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -30,7 +30,7 @@ #include "Engine.h" #include "InstrumentTrack.h" #include "NotePlayHandle.h" -#include "tooltip.h" +#include "ToolTip.h" #include "base64.h" #include "CaptionMenu.h" #include "Oscillator.h" @@ -358,14 +358,14 @@ vibedView::vibedView( Instrument * _instrument, "artwork" ) ); setPalette( pal ); - m_volumeKnob = new knob( knobBright_26, this ); + m_volumeKnob = new Knob( knobBright_26, this ); m_volumeKnob->setVolumeKnob( true ); m_volumeKnob->move( 103, 142 ); m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "" ); m_volumeKnob->setWhatsThis( tr( "The 'V' knob sets the volume " "of the selected string." ) ); - m_stiffnessKnob = new knob( knobBright_26, this ); + m_stiffnessKnob = new Knob( knobBright_26, this ); m_stiffnessKnob->move( 129, 142 ); m_stiffnessKnob->setHintText( tr( "String stiffness:" ) + " ", "" ); @@ -375,14 +375,14 @@ vibedView::vibedView( Instrument * _instrument, "the setting, the longer the string will ring." ) ); - m_pickKnob = new knob( knobBright_26, this ); + m_pickKnob = new Knob( knobBright_26, this ); m_pickKnob->move( 153, 142 ); m_pickKnob->setHintText( tr( "Pick position:" ) + " ", "" ); m_pickKnob->setWhatsThis( tr( "The 'P' knob sets the position where the selected string will be 'picked'. " "The lower the setting the closer the pick is to the bridge." ) ); - m_pickupKnob = new knob( knobBright_26, this ); + m_pickupKnob = new Knob( knobBright_26, this ); m_pickupKnob->move( 177, 142 ); m_pickupKnob->setHintText( tr( "Pickup position:" ) + " ", "" ); @@ -391,14 +391,14 @@ vibedView::vibedView( Instrument * _instrument, "for the selected string. The lower the setting, the closer the " "pickup is to the bridge." ) ); - m_panKnob = new knob( knobBright_26, this ); + m_panKnob = new Knob( knobBright_26, this ); m_panKnob->move( 105, 187 ); m_panKnob->setHintText( tr( "Pan:" ) + " ", "" ); m_panKnob->setWhatsThis( tr( "The Pan knob determines the location of the selected string in the stereo " "field." ) ); - m_detuneKnob = new knob( knobBright_26, this ); + m_detuneKnob = new Knob( knobBright_26, this ); m_detuneKnob->move( 150, 187 ); m_detuneKnob->setHintText( tr( "Detune:" ) + " ", "" ); m_detuneKnob->setWhatsThis( tr( @@ -406,7 +406,7 @@ vibedView::vibedView( Instrument * _instrument, "than zero will cause the string to sound flat. Settings greater than zero " "will cause the string to sound sharp." ) ); - m_randomKnob = new knob( knobBright_26, this ); + m_randomKnob = new Knob( knobBright_26, this ); m_randomKnob->move( 194, 187 ); m_randomKnob->setHintText( tr( "Fuzziness:" ) + " ", "" ); @@ -415,7 +415,7 @@ vibedView::vibedView( Instrument * _instrument, "apparent during the attack, though it can also be used to make the string " "sound more 'metallic'.") ); - m_lengthKnob = new knob( knobBright_26, this ); + m_lengthKnob = new Knob( knobBright_26, this ); m_lengthKnob->move( 23, 193 ); m_lengthKnob->setHintText( tr( "Length:" ) + " ", "" ); @@ -424,9 +424,9 @@ vibedView::vibedView( Instrument * _instrument, "will both ring longer and sound brighter, however, they will also eat up " "more CPU cycles." ) ); - m_impulse = new ledCheckBox( "", this ); + m_impulse = new LedCheckBox( "", this ); m_impulse->move( 23, 94 ); - toolTip::add( m_impulse, + ToolTip::add( m_impulse, tr( "Impulse or initial state" ) ); m_impulse->setWhatsThis( tr( "The 'Imp' selector determines whether the waveform in the graph is to be " @@ -488,7 +488,7 @@ vibedView::vibedView( Instrument * _instrument, 21, 39, this); - m_graph = new graph( this ); + m_graph = new Graph( this ); m_graph->setWindowTitle( tr( "Impulse Editor" ) ); m_graph->setForeground( PLUGIN_NAME::getIconPixmap( "wavegraph4" ) ); m_graph->move( 76, 21 ); @@ -530,9 +530,9 @@ vibedView::vibedView( Instrument * _instrument, "whether the string is active in the current instrument." ) ); - m_power = new ledCheckBox( "", this, tr( "Enable waveform" ) ); + m_power = new LedCheckBox( "", this, tr( "Enable waveform" ) ); m_power->move( 212, 130 ); - toolTip::add( m_power, + ToolTip::add( m_power, tr( "Click here to enable/disable waveform." ) ); @@ -549,104 +549,104 @@ vibedView::vibedView( Instrument * _instrument, showString( 0 ); - m_sinWaveBtn = new pixmapButton( this, tr( "Sine wave" ) ); + m_sinWaveBtn = new PixmapButton( this, tr( "Sine wave" ) ); m_sinWaveBtn->move( 212, 24 ); m_sinWaveBtn->setActiveGraphic( embed::getIconPixmap( "sin_wave_active" ) ); m_sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - toolTip::add( m_sinWaveBtn, + ToolTip::add( m_sinWaveBtn, tr( "Use a sine-wave for " "current oscillator." ) ); connect( m_sinWaveBtn, SIGNAL (clicked () ), this, SLOT ( sinWaveClicked() ) ); - m_triangleWaveBtn = new pixmapButton( this, tr( "Triangle wave" ) ); + m_triangleWaveBtn = new PixmapButton( this, tr( "Triangle wave" ) ); m_triangleWaveBtn->move( 212, 41 ); m_triangleWaveBtn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - toolTip::add( m_triangleWaveBtn, + ToolTip::add( m_triangleWaveBtn, tr( "Use a triangle-wave " "for current oscillator." ) ); connect( m_triangleWaveBtn, SIGNAL ( clicked () ), this, SLOT ( triangleWaveClicked( ) ) ); - m_sawWaveBtn = new pixmapButton( this, tr( "Saw wave" ) ); + m_sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) ); m_sawWaveBtn->move( 212, 58 ); m_sawWaveBtn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); m_sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - toolTip::add( m_sawWaveBtn, + ToolTip::add( m_sawWaveBtn, tr( "Use a saw-wave for " "current oscillator." ) ); connect( m_sawWaveBtn, SIGNAL (clicked () ), this, SLOT ( sawWaveClicked() ) ); - m_sqrWaveBtn = new pixmapButton( this, tr( "Square wave" ) ); + m_sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) ); m_sqrWaveBtn->move( 212, 75 ); m_sqrWaveBtn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - toolTip::add( m_sqrWaveBtn, + ToolTip::add( m_sqrWaveBtn, tr( "Use a square-wave for " "current oscillator." ) ); connect( m_sqrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( sqrWaveClicked() ) ); - m_whiteNoiseWaveBtn = new pixmapButton( this, tr( "White noise wave" ) ); + m_whiteNoiseWaveBtn = new PixmapButton( this, tr( "White noise wave" ) ); m_whiteNoiseWaveBtn->move( 212, 92 ); m_whiteNoiseWaveBtn->setActiveGraphic( embed::getIconPixmap( "white_noise_wave_active" ) ); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - toolTip::add( m_whiteNoiseWaveBtn, + ToolTip::add( m_whiteNoiseWaveBtn, tr( "Use white-noise for " "current oscillator." ) ); connect( m_whiteNoiseWaveBtn, SIGNAL ( clicked () ), this, SLOT ( noiseWaveClicked() ) ); - m_usrWaveBtn = new pixmapButton( this, tr( "User defined wave" ) ); + m_usrWaveBtn = new PixmapButton( this, tr( "User defined wave" ) ); m_usrWaveBtn->move( 212, 109 ); m_usrWaveBtn->setActiveGraphic( embed::getIconPixmap( "usr_wave_active" ) ); m_usrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); - toolTip::add( m_usrWaveBtn, + ToolTip::add( m_usrWaveBtn, tr( "Use a user-defined " "waveform for current oscillator." ) ); connect( m_usrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( usrWaveClicked() ) ); - m_smoothBtn = new pixmapButton( this, tr( "Smooth" ) ); + m_smoothBtn = new PixmapButton( this, tr( "Smooth" ) ); m_smoothBtn->move( 79, 129 ); m_smoothBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); m_smoothBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); m_smoothBtn->setChecked( false ); - toolTip::add( m_smoothBtn, + ToolTip::add( m_smoothBtn, tr( "Click here to smooth waveform." ) ); connect( m_smoothBtn, SIGNAL ( clicked () ), this, SLOT ( smoothClicked() ) ); - m_normalizeBtn = new pixmapButton( this, tr( "Normalize" ) ); + m_normalizeBtn = new PixmapButton( this, tr( "Normalize" ) ); m_normalizeBtn->move( 96, 129 ); m_normalizeBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "normalize_active" ) ); m_normalizeBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "normalize_inactive" ) ); m_normalizeBtn->setChecked( false ); - toolTip::add( m_normalizeBtn, + ToolTip::add( m_normalizeBtn, tr( "Click here to normalize waveform." ) ); connect( m_normalizeBtn, SIGNAL ( clicked () ), @@ -730,7 +730,7 @@ void vibedView::noiseWaveClicked() void vibedView::usrWaveClicked() { QString fileName = m_graph->model()->setWaveToUser(); - toolTip::add( m_usrWaveBtn, fileName ); + ToolTip::add( m_usrWaveBtn, fileName ); Engine::getSong()->setModified(); } diff --git a/plugins/vibed/vibed.h b/plugins/vibed/vibed.h index 3df8b1b1c..e4c8e4a14 100644 --- a/plugins/vibed/vibed.h +++ b/plugins/vibed/vibed.h @@ -26,10 +26,10 @@ #include "Instrument.h" #include "InstrumentView.h" -#include "graph.h" -#include "knob.h" -#include "pixmap_button.h" -#include "led_checkbox.h" +#include "Graph.h" +#include "Knob.h" +#include "PixmapButton.h" +#include "LedCheckbox.h" #include "nine_button_selector.h" class vibedView; @@ -110,31 +110,31 @@ private: // String-related - knob * m_pickKnob; - knob * m_pickupKnob; - knob * m_stiffnessKnob; - knob * m_volumeKnob; - knob * m_panKnob; - knob * m_detuneKnob; - knob * m_randomKnob; - knob * m_lengthKnob; - graph * m_graph; + Knob * m_pickKnob; + Knob * m_pickupKnob; + Knob * m_stiffnessKnob; + Knob * m_volumeKnob; + Knob * m_panKnob; + Knob * m_detuneKnob; + Knob * m_randomKnob; + Knob * m_lengthKnob; + Graph * m_graph; nineButtonSelector * m_harmonic; - ledCheckBox * m_impulse; - ledCheckBox * m_power; + LedCheckBox * m_impulse; + LedCheckBox * m_power; // Not in model nineButtonSelector * m_stringSelector; - pixmapButton * m_smoothBtn; - pixmapButton * m_normalizeBtn; + PixmapButton * m_smoothBtn; + PixmapButton * m_normalizeBtn; // From impulse editor - pixmapButton * m_sinWaveBtn; - pixmapButton * m_triangleWaveBtn; - pixmapButton * m_sqrWaveBtn; - pixmapButton * m_sawWaveBtn; - pixmapButton * m_whiteNoiseWaveBtn; - pixmapButton * m_usrWaveBtn; + PixmapButton * m_sinWaveBtn; + PixmapButton * m_triangleWaveBtn; + PixmapButton * m_sqrWaveBtn; + PixmapButton * m_sawWaveBtn; + PixmapButton * m_whiteNoiseWaveBtn; + PixmapButton * m_usrWaveBtn; }; diff --git a/plugins/watsyn/Watsyn.cpp b/plugins/watsyn/Watsyn.cpp index 1d2f8e59b..a29a410a9 100644 --- a/plugins/watsyn/Watsyn.cpp +++ b/plugins/watsyn/Watsyn.cpp @@ -29,7 +29,7 @@ #include "Engine.h" #include "InstrumentTrack.h" #include "templates.h" -#include "tooltip.h" +#include "ToolTip.h" #include "Song.h" #include "lmms_math.h" #include "interpolation.h" @@ -721,29 +721,29 @@ WatsynView::WatsynView( Instrument * _instrument, // button groups next. // graph select buttons - pixmapButton * a1_selectButton = new pixmapButton( this, NULL ); + PixmapButton * a1_selectButton = new PixmapButton( this, NULL ); a1_selectButton -> move( 4, 121 ); a1_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "a1_active" ) ); a1_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "a1_inactive" ) ); - toolTip::add( a1_selectButton, tr( "Select oscillator A1") ); + ToolTip::add( a1_selectButton, tr( "Select oscillator A1") ); - pixmapButton * a2_selectButton = new pixmapButton( this, NULL ); + PixmapButton * a2_selectButton = new PixmapButton( this, NULL ); a2_selectButton -> move( 44, 121 ); a2_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "a2_active" ) ); a2_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "a2_inactive" ) ); - toolTip::add( a2_selectButton, tr( "Select oscillator A2") ); + ToolTip::add( a2_selectButton, tr( "Select oscillator A2") ); - pixmapButton * b1_selectButton = new pixmapButton( this, NULL ); + PixmapButton * b1_selectButton = new PixmapButton( this, NULL ); b1_selectButton -> move( 84, 121 ); b1_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "b1_active" ) ); b1_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "b1_inactive" ) ); - toolTip::add( b1_selectButton, tr( "Select oscillator B1") ); + ToolTip::add( b1_selectButton, tr( "Select oscillator B1") ); - pixmapButton * b2_selectButton = new pixmapButton( this, NULL ); + PixmapButton * b2_selectButton = new PixmapButton( this, NULL ); b2_selectButton -> move( 124, 121 ); b2_selectButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "b2_active" ) ); b2_selectButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "b2_inactive" ) ); - toolTip::add( b2_selectButton, tr( "Select oscillator B2") ); + ToolTip::add( b2_selectButton, tr( "Select oscillator B2") ); m_selectedGraphGroup = new automatableButtonGroup( this ); m_selectedGraphGroup -> addButton( a1_selectButton ); @@ -752,29 +752,29 @@ WatsynView::WatsynView( Instrument * _instrument, m_selectedGraphGroup -> addButton( b2_selectButton ); // A-modulation button group - pixmapButton * amod_mixButton = new pixmapButton( this, NULL ); + PixmapButton * amod_mixButton = new PixmapButton( this, NULL ); amod_mixButton -> move( 4, 50 ); amod_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "amix_active" ) ); amod_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "amix_inactive" ) ); - toolTip::add( amod_mixButton, tr( "Mix output of A2 to A1" ) ); + ToolTip::add( amod_mixButton, tr( "Mix output of A2 to A1" ) ); - pixmapButton * amod_amButton = new pixmapButton( this, NULL ); + PixmapButton * amod_amButton = new PixmapButton( this, NULL ); amod_amButton -> move( 4, 66 ); amod_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "aam_active" ) ); amod_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "aam_inactive" ) ); - toolTip::add( amod_amButton, tr( "Modulate amplitude of A1 with output of A2" ) ); + ToolTip::add( amod_amButton, tr( "Modulate amplitude of A1 with output of A2" ) ); - pixmapButton * amod_rmButton = new pixmapButton( this, NULL ); + PixmapButton * amod_rmButton = new PixmapButton( this, NULL ); amod_rmButton -> move( 4, 82 ); amod_rmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "arm_active" ) ); amod_rmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "arm_inactive" ) ); - toolTip::add( amod_rmButton, tr( "Ring-modulate A1 and A2" ) ); + ToolTip::add( amod_rmButton, tr( "Ring-modulate A1 and A2" ) ); - pixmapButton * amod_pmButton = new pixmapButton( this, NULL ); + PixmapButton * amod_pmButton = new PixmapButton( this, NULL ); amod_pmButton -> move( 4, 98 ); amod_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "apm_active" ) ); amod_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "apm_inactive" ) ); - toolTip::add( amod_pmButton, tr( "Modulate phase of A1 with output of A2" ) ); + ToolTip::add( amod_pmButton, tr( "Modulate phase of A1 with output of A2" ) ); m_aModGroup = new automatableButtonGroup( this ); m_aModGroup -> addButton( amod_mixButton ); @@ -783,29 +783,29 @@ WatsynView::WatsynView( Instrument * _instrument, m_aModGroup -> addButton( amod_pmButton ); // B-modulation button group - pixmapButton * bmod_mixButton = new pixmapButton( this, NULL ); + PixmapButton * bmod_mixButton = new PixmapButton( this, NULL ); bmod_mixButton -> move( 44, 50 ); bmod_mixButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bmix_active" ) ); bmod_mixButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bmix_inactive" ) ); - toolTip::add( bmod_mixButton, tr( "Mix output of B2 to B1" ) ); + ToolTip::add( bmod_mixButton, tr( "Mix output of B2 to B1" ) ); - pixmapButton * bmod_amButton = new pixmapButton( this, NULL ); + PixmapButton * bmod_amButton = new PixmapButton( this, NULL ); bmod_amButton -> move( 44, 66 ); bmod_amButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bam_active" ) ); bmod_amButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bam_inactive" ) ); - toolTip::add( bmod_amButton, tr( "Modulate amplitude of B1 with output of B2" ) ); + ToolTip::add( bmod_amButton, tr( "Modulate amplitude of B1 with output of B2" ) ); - pixmapButton * bmod_rmButton = new pixmapButton( this, NULL ); + PixmapButton * bmod_rmButton = new PixmapButton( this, NULL ); bmod_rmButton -> move( 44, 82 ); bmod_rmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "brm_active" ) ); bmod_rmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "brm_inactive" ) ); - toolTip::add( bmod_rmButton, tr( "Ring-modulate B1 and B2" ) ); + ToolTip::add( bmod_rmButton, tr( "Ring-modulate B1 and B2" ) ); - pixmapButton * bmod_pmButton = new pixmapButton( this, NULL ); + PixmapButton * bmod_pmButton = new PixmapButton( this, NULL ); bmod_pmButton -> move( 44, 98 ); bmod_pmButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "bpm_active" ) ); bmod_pmButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "bpm_inactive" ) ); - toolTip::add( bmod_pmButton, tr( "Modulate phase of B1 with output of B2" ) ); + ToolTip::add( bmod_pmButton, tr( "Modulate phase of B1 with output of B2" ) ); m_bModGroup = new automatableButtonGroup( this ); m_bModGroup -> addButton( bmod_mixButton ); @@ -818,103 +818,103 @@ WatsynView::WatsynView( Instrument * _instrument, pal = QPalette(); pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap("wavegraph") ); // a1 graph - a1_graph = new graph( this, graph::LinearStyle, 224, 105 ); + a1_graph = new Graph( this, Graph::LinearStyle, 224, 105 ); a1_graph->move( 4, 141 ); a1_graph->setAutoFillBackground( true ); a1_graph->setGraphColor( QColor( 0x43, 0xb2, 0xff ) ); - toolTip::add( a1_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + ToolTip::add( a1_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); a1_graph->setPalette( pal ); // a2 graph - a2_graph = new graph( this, graph::LinearStyle, 224, 105 ); + a2_graph = new Graph( this, Graph::LinearStyle, 224, 105 ); a2_graph->move( 4, 141 ); a2_graph->setAutoFillBackground( true ); a2_graph->setGraphColor( QColor( 0x43, 0xb2, 0xff ) ); - toolTip::add( a2_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + ToolTip::add( a2_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); a2_graph->setPalette( pal ); // b1 graph - b1_graph = new graph( this, graph::LinearStyle, 224, 105 ); + b1_graph = new Graph( this, Graph::LinearStyle, 224, 105 ); b1_graph->move( 4, 141 ); b1_graph->setAutoFillBackground( true ); b1_graph->setGraphColor( QColor( 0xfc, 0x54, 0x31 ) ); - toolTip::add( b1_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + ToolTip::add( b1_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); b1_graph->setPalette( pal ); // b2 graph - b2_graph = new graph( this, graph::LinearStyle, 224, 105 ); + b2_graph = new Graph( this, Graph::LinearStyle, 224, 105 ); b2_graph->move( 4, 141 ); b2_graph->setAutoFillBackground( true ); b2_graph->setGraphColor( QColor( 0xfc, 0x54, 0x31 ) ); - toolTip::add( b2_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); + ToolTip::add( b2_graph, tr ( "Draw your own waveform here by dragging your mouse on this graph." ) ); b2_graph->setPalette( pal ); // misc pushbuttons // waveform modifications - m_loadButton = new pixmapButton( this, tr( "Load waveform" ) ); + m_loadButton = new PixmapButton( this, tr( "Load waveform" ) ); m_loadButton -> move ( 173, 121 ); m_loadButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "load_active" ) ); m_loadButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "load_inactive" ) ); - toolTip::add( m_loadButton, tr( "Click to load a waveform from a sample file" ) ); + ToolTip::add( m_loadButton, tr( "Click to load a waveform from a sample file" ) ); - m_phaseLeftButton = new pixmapButton( this, tr( "Phase left" ) ); + m_phaseLeftButton = new PixmapButton( this, tr( "Phase left" ) ); m_phaseLeftButton -> move ( 193, 121 ); m_phaseLeftButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "phl_active" ) ); m_phaseLeftButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "phl_inactive" ) ); - toolTip::add( m_phaseLeftButton, tr( "Click to shift phase by -15 degrees" ) ); + ToolTip::add( m_phaseLeftButton, tr( "Click to shift phase by -15 degrees" ) ); - m_phaseRightButton = new pixmapButton( this, tr( "Phase right" ) ); + m_phaseRightButton = new PixmapButton( this, tr( "Phase right" ) ); m_phaseRightButton -> move ( 210, 121 ); m_phaseRightButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "phr_active" ) ); m_phaseRightButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "phr_inactive" ) ); - toolTip::add( m_phaseRightButton, tr( "Click to shift phase by +15 degrees" ) ); + ToolTip::add( m_phaseRightButton, tr( "Click to shift phase by +15 degrees" ) ); - m_normalizeButton = new pixmapButton( this, tr( "Normalize" ) ); + m_normalizeButton = new PixmapButton( this, tr( "Normalize" ) ); m_normalizeButton -> move ( 230, 121 ); m_normalizeButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "norm_active" ) ); m_normalizeButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "norm_inactive" ) ); - toolTip::add( m_normalizeButton, tr( "Click to normalize" ) ); + ToolTip::add( m_normalizeButton, tr( "Click to normalize" ) ); - m_invertButton = new pixmapButton( this, tr( "Invert" ) ); + m_invertButton = new PixmapButton( this, tr( "Invert" ) ); m_invertButton -> move ( 230, 138 ); m_invertButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "inv_active" ) ); m_invertButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "inv_inactive" ) ); - toolTip::add( m_invertButton, tr( "Click to invert" ) ); + ToolTip::add( m_invertButton, tr( "Click to invert" ) ); - m_smoothButton = new pixmapButton( this, tr( "Smooth" ) ); + m_smoothButton = new PixmapButton( this, tr( "Smooth" ) ); m_smoothButton -> move ( 230, 155 ); m_smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); m_smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - toolTip::add( m_smoothButton, tr( "Click to smooth" ) ); + ToolTip::add( m_smoothButton, tr( "Click to smooth" ) ); // waveforms - m_sinWaveButton = new pixmapButton( this, tr( "Sine wave" ) ); + m_sinWaveButton = new PixmapButton( this, tr( "Sine wave" ) ); m_sinWaveButton -> move ( 230, 176 ); m_sinWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_active" ) ); m_sinWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sin_inactive" ) ); - toolTip::add( m_sinWaveButton, tr( "Click for sine wave" ) ); + ToolTip::add( m_sinWaveButton, tr( "Click for sine wave" ) ); - m_triWaveButton = new pixmapButton( this, tr( "Triangle wave" ) ); + m_triWaveButton = new PixmapButton( this, tr( "Triangle wave" ) ); m_triWaveButton -> move ( 230, 194 ); m_triWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "tri_active" ) ); m_triWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tri_inactive" ) ); - toolTip::add( m_triWaveButton, tr( "Click for triangle wave" ) ); + ToolTip::add( m_triWaveButton, tr( "Click for triangle wave" ) ); - m_sawWaveButton = new pixmapButton( this, tr( "Triangle wave" ) ); + m_sawWaveButton = new PixmapButton( this, tr( "Triangle wave" ) ); m_sawWaveButton -> move ( 230, 212 ); m_sawWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_active" ) ); m_sawWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "saw_inactive" ) ); - toolTip::add( m_sawWaveButton, tr( "Click for saw wave" ) ); + ToolTip::add( m_sawWaveButton, tr( "Click for saw wave" ) ); - m_sqrWaveButton = new pixmapButton( this, tr( "Square wave" ) ); + m_sqrWaveButton = new PixmapButton( this, tr( "Square wave" ) ); m_sqrWaveButton -> move ( 230, 230 ); m_sqrWaveButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sqr_active" ) ); m_sqrWaveButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sqr_inactive" ) ); - toolTip::add( m_sqrWaveButton, tr( "Click for square wave" ) ); + ToolTip::add( m_sqrWaveButton, tr( "Click for square wave" ) ); diff --git a/plugins/watsyn/Watsyn.h b/plugins/watsyn/Watsyn.h index 8f1a92098..b8413f7f8 100644 --- a/plugins/watsyn/Watsyn.h +++ b/plugins/watsyn/Watsyn.h @@ -28,18 +28,18 @@ #include "Instrument.h" #include "InstrumentView.h" -#include "graph.h" +#include "Graph.h" #include "AutomatableModel.h" #include "AutomatableButton.h" #include "TempoSyncKnob.h" #include "NotePlayHandle.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include #include "MemoryManager.h" #define makeknob( name, x, y, hint, unit, oname ) \ - name = new knob( knobStyled, this ); \ + name = new Knob( knobStyled, this ); \ name ->move( x, y ); \ name ->setHintText( tr( hint ) + " ", unit ); \ name ->setObjectName( oname ); \ @@ -320,60 +320,60 @@ private: virtual void modelChanged(); // knobs - knob * a1_volKnob; - knob * a2_volKnob; - knob * b1_volKnob; - knob * b2_volKnob; + Knob * a1_volKnob; + Knob * a2_volKnob; + Knob * b1_volKnob; + Knob * b2_volKnob; - knob * a1_panKnob; - knob * a2_panKnob; - knob * b1_panKnob; - knob * b2_panKnob; + Knob * a1_panKnob; + Knob * a2_panKnob; + Knob * b1_panKnob; + Knob * b2_panKnob; - knob * a1_multKnob; - knob * a2_multKnob; - knob * b1_multKnob; - knob * b2_multKnob; + Knob * a1_multKnob; + Knob * a2_multKnob; + Knob * b1_multKnob; + Knob * b2_multKnob; - knob * a1_ltuneKnob; - knob * a2_ltuneKnob; - knob * b1_ltuneKnob; - knob * b2_ltuneKnob; + Knob * a1_ltuneKnob; + Knob * a2_ltuneKnob; + Knob * b1_ltuneKnob; + Knob * b2_ltuneKnob; - knob * a1_rtuneKnob; - knob * a2_rtuneKnob; - knob * b1_rtuneKnob; - knob * b2_rtuneKnob; + Knob * a1_rtuneKnob; + Knob * a2_rtuneKnob; + Knob * b1_rtuneKnob; + Knob * b2_rtuneKnob; - knob * m_abmixKnob; + Knob * m_abmixKnob; - knob * m_envAmtKnob; + Knob * m_envAmtKnob; TempoSyncKnob * m_envAttKnob; TempoSyncKnob * m_envHoldKnob; TempoSyncKnob * m_envDecKnob; - knob * m_xtalkKnob; + Knob * m_xtalkKnob; automatableButtonGroup * m_selectedGraphGroup; automatableButtonGroup * m_aModGroup; automatableButtonGroup * m_bModGroup; - graph * a1_graph; - graph * a2_graph; - graph * b1_graph; - graph * b2_graph; + Graph * a1_graph; + Graph * a2_graph; + Graph * b1_graph; + Graph * b2_graph; - pixmapButton * m_sinWaveButton; - pixmapButton * m_triWaveButton; - pixmapButton * m_sawWaveButton; - pixmapButton * m_sqrWaveButton; - pixmapButton * m_normalizeButton; - pixmapButton * m_invertButton; - pixmapButton * m_smoothButton; - pixmapButton * m_phaseLeftButton; - pixmapButton * m_phaseRightButton; - pixmapButton * m_loadButton; + PixmapButton * m_sinWaveButton; + PixmapButton * m_triWaveButton; + PixmapButton * m_sawWaveButton; + PixmapButton * m_sqrWaveButton; + PixmapButton * m_normalizeButton; + PixmapButton * m_invertButton; + PixmapButton * m_smoothButton; + PixmapButton * m_phaseLeftButton; + PixmapButton * m_phaseRightButton; + PixmapButton * m_loadButton; }; diff --git a/plugins/waveshaper/waveshaper_control_dialog.cpp b/plugins/waveshaper/waveshaper_control_dialog.cpp index fd808d592..f7cfd22ee 100644 --- a/plugins/waveshaper/waveshaper_control_dialog.cpp +++ b/plugins/waveshaper/waveshaper_control_dialog.cpp @@ -29,10 +29,10 @@ #include "waveshaper_control_dialog.h" #include "waveshaper_controls.h" #include "embed.h" -#include "graph.h" -#include "pixmap_button.h" -#include "tooltip.h" -#include "led_checkbox.h" +#include "Graph.h" +#include "PixmapButton.h" +#include "ToolTip.h" +#include "LedCheckbox.h" waveShaperControlDialog::waveShaperControlDialog( @@ -46,7 +46,7 @@ waveShaperControlDialog::waveShaperControlDialog( setPalette( pal ); setFixedSize( 224, 300 ); - graph * waveGraph = new graph( this, graph::LinearNonCyclicStyle, 204, 205 ); + Graph * waveGraph = new Graph( this, Graph::LinearNonCyclicStyle, 204, 205 ); waveGraph -> move( 10, 32 ); waveGraph -> setModel( &_controls -> m_wavegraphModel ); waveGraph -> setAutoFillBackground( true ); @@ -57,7 +57,7 @@ waveShaperControlDialog::waveShaperControlDialog( waveGraph->setGraphColor( QColor( 170, 255, 255 ) ); waveGraph -> setMaximumSize( 204, 205 ); - knob * inputKnob = new knob( knobBright_26, this); + Knob * inputKnob = new Knob( knobBright_26, this); inputKnob -> setVolumeKnob( true ); inputKnob -> setVolumeRatio( 1.0 ); inputKnob -> move( 14, 251 ); @@ -65,7 +65,7 @@ waveShaperControlDialog::waveShaperControlDialog( inputKnob->setLabel( tr( "INPUT" ) ); inputKnob->setHintText( tr( "Input gain:" ) + " ", "" ); - knob * outputKnob = new knob( knobBright_26, this ); + Knob * outputKnob = new Knob( knobBright_26, this ); outputKnob -> setVolumeKnob( true ); outputKnob -> setVolumeRatio( 1.0 ); outputKnob -> move( 54, 251 ); @@ -73,39 +73,39 @@ waveShaperControlDialog::waveShaperControlDialog( outputKnob->setLabel( tr( "OUTPUT" ) ); outputKnob->setHintText( tr( "Output gain:" ) + " ", "" ); - pixmapButton * resetButton = new pixmapButton( this, tr("Reset waveform") ); + PixmapButton * resetButton = new PixmapButton( this, tr("Reset waveform") ); resetButton -> move( 164, 251 ); resetButton -> resize( 12, 48 ); resetButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_active" ) ); resetButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "reset_inactive" ) ); - toolTip::add( resetButton, tr( "Click here to reset the wavegraph back to default" ) ); + ToolTip::add( resetButton, tr( "Click here to reset the wavegraph back to default" ) ); - pixmapButton * smoothButton = new pixmapButton( this, tr("Smooth waveform") ); + PixmapButton * smoothButton = new PixmapButton( this, tr("Smooth waveform") ); smoothButton -> move( 164, 267 ); smoothButton -> resize( 12, 48 ); smoothButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); smoothButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); - toolTip::add( smoothButton, tr( "Click here to apply smoothing to wavegraph" ) ); + ToolTip::add( smoothButton, tr( "Click here to apply smoothing to wavegraph" ) ); - pixmapButton * addOneButton = new pixmapButton( this, tr("Increase graph amplitude by 1dB") ); + PixmapButton * addOneButton = new PixmapButton( this, tr("Increase graph amplitude by 1dB") ); addOneButton -> move( 133, 251 ); addOneButton -> resize( 12, 29 ); addOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_active" ) ); addOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "add1_inactive" ) ); - toolTip::add( addOneButton, tr( "Click here to increase wavegraph amplitude by 1dB" ) ); + ToolTip::add( addOneButton, tr( "Click here to increase wavegraph amplitude by 1dB" ) ); - pixmapButton * subOneButton = new pixmapButton( this, tr("Decrease graph amplitude by 1dB") ); + PixmapButton * subOneButton = new PixmapButton( this, tr("Decrease graph amplitude by 1dB") ); subOneButton -> move( 133, 267 ); subOneButton -> resize( 12, 29 ); subOneButton -> setActiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_active" ) ); subOneButton -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "sub1_inactive" ) ); - toolTip::add( subOneButton, tr( "Click here to decrease wavegraph amplitude by 1dB" ) ); + ToolTip::add( subOneButton, tr( "Click here to decrease wavegraph amplitude by 1dB" ) ); - ledCheckBox * clipInputToggle = new ledCheckBox( "Clip input", this, - tr( "Clip input" ), ledCheckBox::Green ); + LedCheckBox * clipInputToggle = new LedCheckBox( "Clip input", this, + tr( "Clip input" ), LedCheckBox::Green ); clipInputToggle -> move( 133, 283 ); clipInputToggle -> setModel( &_controls -> m_clipModel ); - toolTip::add( clipInputToggle, tr( "Clip input signal to 0dB" ) ); + ToolTip::add( clipInputToggle, tr( "Clip input signal to 0dB" ) ); connect( resetButton, SIGNAL (clicked () ), _controls, SLOT ( resetClicked() ) ); diff --git a/plugins/waveshaper/waveshaper_controls.cpp b/plugins/waveshaper/waveshaper_controls.cpp index 5091861a6..acc010004 100644 --- a/plugins/waveshaper/waveshaper_controls.cpp +++ b/plugins/waveshaper/waveshaper_controls.cpp @@ -29,7 +29,7 @@ #include "waveshaper_controls.h" #include "waveshaper.h" #include "base64.h" -#include "graph.h" +#include "Graph.h" #include "Engine.h" #include "Song.h" diff --git a/plugins/waveshaper/waveshaper_controls.h b/plugins/waveshaper/waveshaper_controls.h index 3828f1a8b..db54e5273 100644 --- a/plugins/waveshaper/waveshaper_controls.h +++ b/plugins/waveshaper/waveshaper_controls.h @@ -28,8 +28,8 @@ #include "EffectControls.h" #include "waveshaper_control_dialog.h" -#include "knob.h" -#include "graph.h" +#include "Knob.h" +#include "Graph.h" class waveShaperEffect; diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 52f6f2a01..4ba6876c9 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -33,8 +33,8 @@ #include "ZynAddSubFx.h" #include "Engine.h" -#include "knob.h" -#include "led_checkbox.h" +#include "Knob.h" +#include "LedCheckbox.h" #include "DataFile.h" #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" @@ -497,35 +497,35 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent ) l->setVerticalSpacing( 16 ); l->setHorizontalSpacing( 10 ); - m_portamento = new knob( knobBright_26, this ); + m_portamento = new Knob( knobBright_26, this ); m_portamento->setHintText( tr( "Portamento:" ) + "", "" ); m_portamento->setLabel( tr( "PORT" ) ); - m_filterFreq = new knob( knobBright_26, this ); + m_filterFreq = new Knob( knobBright_26, this ); m_filterFreq->setHintText( tr( "Filter Frequency:" ) + "", "" ); m_filterFreq->setLabel( tr( "FREQ" ) ); - m_filterQ = new knob( knobBright_26, this ); + m_filterQ = new Knob( knobBright_26, this ); m_filterQ->setHintText( tr( "Filter Resonance:" ) + "", "" ); m_filterQ->setLabel( tr( "RES" ) ); - m_bandwidth = new knob( knobBright_26, this ); + m_bandwidth = new Knob( knobBright_26, this ); m_bandwidth->setHintText( tr( "Bandwidth:" ) + "", "" ); m_bandwidth->setLabel( tr( "BW" ) ); - m_fmGain = new knob( knobBright_26, this ); + m_fmGain = new Knob( knobBright_26, this ); m_fmGain->setHintText( tr( "FM Gain:" ) + "", "" ); m_fmGain->setLabel( tr( "FM GAIN" ) ); - m_resCenterFreq = new knob( knobBright_26, this ); + m_resCenterFreq = new Knob( knobBright_26, this ); m_resCenterFreq->setHintText( tr( "Resonance center frequency:" ) + "", "" ); m_resCenterFreq->setLabel( tr( "RES CF" ) ); - m_resBandwidth = new knob( knobBright_26, this ); + m_resBandwidth = new Knob( knobBright_26, this ); m_resBandwidth->setHintText( tr( "Resonance bandwidth:" ) + "", "" ); m_resBandwidth->setLabel( tr( "RES BW" ) ); - m_forwardMidiCC = new ledCheckBox( tr( "Forward MIDI Control Changes" ), this ); + m_forwardMidiCC = new LedCheckBox( tr( "Forward MIDI Control Changes" ), this ); m_toggleUIButton = new QPushButton( tr( "Show GUI" ), this ); m_toggleUIButton->setCheckable( true ); diff --git a/plugins/zynaddsubfx/ZynAddSubFx.h b/plugins/zynaddsubfx/ZynAddSubFx.h index 4f501c1b3..76073ce23 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.h +++ b/plugins/zynaddsubfx/ZynAddSubFx.h @@ -40,8 +40,8 @@ class QPushButton; class LocalZynAddSubFx; class ZynAddSubFxView; class NotePlayHandle; -class knob; -class ledCheckBox; +class Knob; +class LedCheckBox; class ZynAddSubFxRemotePlugin : public QObject, public RemotePlugin @@ -149,14 +149,14 @@ private: void modelChanged(); QPushButton * m_toggleUIButton; - knob * m_portamento; - knob * m_filterFreq; - knob * m_filterQ; - knob * m_bandwidth; - knob * m_fmGain; - knob * m_resCenterFreq; - knob * m_resBandwidth; - ledCheckBox * m_forwardMidiCC; + Knob * m_portamento; + Knob * m_filterFreq; + Knob * m_filterQ; + Knob * m_bandwidth; + Knob * m_fmGain; + Knob * m_resCenterFreq; + Knob * m_resBandwidth; + LedCheckBox * m_forwardMidiCC; private slots: diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index 68ca7882b..514dce55c 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -35,7 +35,7 @@ #include "ProjectJournal.h" #include "BBTrackContainer.h" #include "Song.h" -#include "text_float.h" +#include "TextFloat.h" #include "embed.h" @@ -98,7 +98,7 @@ void AutomationPattern::addObject( AutomatableModel * _obj, bool _search_dup ) { if( *it == _obj ) { - textFloat::displayMessage( _obj->displayName(), tr( "Model is already connected " + TextFloat::displayMessage( _obj->displayName(), tr( "Model is already connected " "to this pattern." ), embed::getIconPixmap( "automation" ), 2000 ); return; } diff --git a/src/core/BBTrackContainer.cpp b/src/core/BBTrackContainer.cpp index a2e78e6e4..e7d0f3246 100644 --- a/src/core/BBTrackContainer.cpp +++ b/src/core/BBTrackContainer.cpp @@ -25,7 +25,7 @@ #include "BBTrackContainer.h" #include "bb_track.h" -#include "combobox.h" +#include "ComboBox.h" #include "embed.h" #include "Engine.h" #include "Song.h" diff --git a/src/core/Engine.cpp b/src/core/Engine.cpp index d36c5e486..1d0057fad 100644 --- a/src/core/Engine.cpp +++ b/src/core/Engine.cpp @@ -39,7 +39,7 @@ #include "PianoRoll.h" #include "PresetPreviewPlayHandle.h" #include "ProjectJournal.h" -#include "project_notes.h" +#include "ProjectNotes.h" #include "Plugin.h" #include "SongEditor.h" #include "Song.h" @@ -59,7 +59,7 @@ SongEditor* Engine::s_songEditor = NULL; AutomationEditor * Engine::s_automationEditor = NULL; bbEditor * Engine::s_bbEditor = NULL; PianoRoll* Engine::s_pianoRoll = NULL; -projectNotes * Engine::s_projectNotes = NULL; +ProjectNotes * Engine::s_projectNotes = NULL; ProjectJournal * Engine::s_projectJournal = NULL; Ladspa2LMMS * Engine::s_ladspaManager = NULL; DummyTrackContainer * Engine::s_dummyTC = NULL; @@ -96,7 +96,7 @@ void Engine::init( const bool _has_gui ) s_songEditor = new SongEditor( s_song ); s_fxMixerView = new FxMixerView; s_controllerRackView = new ControllerRackView; - s_projectNotes = new projectNotes; + s_projectNotes = new ProjectNotes; s_bbEditor = new bbEditor( s_bbTrackContainer ); s_pianoRoll = new PianoRoll; s_automationEditor = new AutomationEditor; diff --git a/src/core/Song.cpp b/src/core/Song.cpp index f150129a2..42800c7f0 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -54,12 +54,12 @@ #include "Pattern.h" #include "PianoRoll.h" #include "ProjectJournal.h" -#include "project_notes.h" +#include "ProjectNotes.h" #include "ProjectRenderer.h" -#include "rename_dialog.h" +#include "RenameDialog.h" #include "SongEditor.h" #include "templates.h" -#include "text_float.h" +#include "TextFloat.h" #include "Timeline.h" #include "PeakController.h" @@ -1043,7 +1043,7 @@ bool Song::guiSaveProject() m_fileName = dataFile.nameWithExtension( m_fileName ); if( saveProjectFile( m_fileName ) && Engine::hasGUI() ) { - textFloat::displayMessage( tr( "Project saved" ), + TextFloat::displayMessage( tr( "Project saved" ), tr( "The project %1 is now saved." ).arg( m_fileName ), embed::getIconPixmap( "project_save", 24, 24 ), @@ -1054,7 +1054,7 @@ bool Song::guiSaveProject() } else if( Engine::hasGUI() ) { - textFloat::displayMessage( tr( "Project NOT saved." ), + TextFloat::displayMessage( tr( "Project NOT saved." ), tr( "The project %1 was not saved!" ).arg( m_fileName ), embed::getIconPixmap( "error" ), 4000 ); diff --git a/src/core/Timeline.cpp b/src/core/Timeline.cpp index c48571c6a..46377e661 100644 --- a/src/core/Timeline.cpp +++ b/src/core/Timeline.cpp @@ -35,9 +35,9 @@ #include "embed.h" #include "Engine.h" #include "templates.h" -#include "nstate_button.h" +#include "NStateButton.h" #include "MainWindow.h" -#include "text_float.h" +#include "TextFloat.h" #if QT_VERSION < 0x040800 @@ -123,14 +123,14 @@ Timeline::~Timeline() void Timeline::addToolButtons( QWidget * _tool_bar ) { - nStateButton * autoScroll = new nStateButton( _tool_bar ); + NStateButton * autoScroll = new NStateButton( _tool_bar ); autoScroll->setGeneralToolTip( tr( "Enable/disable auto-scrolling" ) ); autoScroll->addState( embed::getIconPixmap( "autoscroll_on" ) ); autoScroll->addState( embed::getIconPixmap( "autoscroll_off" ) ); connect( autoScroll, SIGNAL( changedState( int ) ), this, SLOT( toggleAutoScroll( int ) ) ); - nStateButton * loopPoints = new nStateButton( _tool_bar ); + NStateButton * loopPoints = new NStateButton( _tool_bar ); loopPoints->setGeneralToolTip( tr( "Enable/disable loop-points" ) ); loopPoints->addState( embed::getIconPixmap( "loop_points_off" ) ); loopPoints->addState( embed::getIconPixmap( "loop_points_on" ) ); @@ -139,7 +139,7 @@ void Timeline::addToolButtons( QWidget * _tool_bar ) connect( this, SIGNAL( loopPointStateLoaded( int ) ), loopPoints, SLOT( changeState( int ) ) ); - nStateButton * behaviourAtStop = new nStateButton( _tool_bar ); + NStateButton * behaviourAtStop = new NStateButton( _tool_bar ); behaviourAtStop->addState( embed::getIconPixmap( "back_to_zero" ), tr( "After stopping go back to begin" ) ); @@ -313,14 +313,14 @@ void Timeline::mousePressEvent( QMouseEvent* event ) if( m_action == MoveLoopBegin ) { delete m_hint; - m_hint = textFloat::displayMessage( tr( "Hint" ), + m_hint = TextFloat::displayMessage( tr( "Hint" ), tr( "Press to disable magnetic loop points." ), embed::getIconPixmap( "hint" ), 0 ); } else if( m_action == MoveLoopEnd ) { delete m_hint; - m_hint = textFloat::displayMessage( tr( "Hint" ), + m_hint = TextFloat::displayMessage( tr( "Hint" ), tr( "Hold to move the begin loop point; Press to disable magnetic loop points." ), embed::getIconPixmap( "hint" ), 0 ); } diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 923c8f792..e9a0e7e9e 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -60,14 +60,14 @@ #include "InstrumentTrack.h" #include "MainWindow.h" #include "DataFile.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "ProjectJournal.h" #include "SampleTrack.h" #include "Song.h" #include "string_pair_drag.h" #include "templates.h" -#include "text_float.h" -#include "tooltip.h" +#include "TextFloat.h" +#include "ToolTip.h" #include "TrackContainer.h" @@ -87,7 +87,7 @@ const int TRACK_OP_BTN_HEIGHT = 14; * beside the cursor as you move or resize elements of a track about. * This pointer keeps track of it, as you only ever need one at a time. */ -textFloat * trackContentObjectView::s_textFloat = NULL; +TextFloat * trackContentObjectView::s_textFloat = NULL; // =========================================================================== @@ -257,7 +257,7 @@ trackContentObjectView::trackContentObjectView( trackContentObject * _tco, { if( s_textFloat == NULL ) { - s_textFloat = new textFloat; + s_textFloat = new TextFloat; s_textFloat->setPixmap( embed::getIconPixmap( "clock" ) ); } @@ -651,7 +651,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) QApplication::setOverrideCursor( c ); s_textFloat->setTitle( tr( "Current position" ) ); delete m_hint; - m_hint = textFloat::displayMessage( tr( "Hint" ), + m_hint = TextFloat::displayMessage( tr( "Hint" ), tr( "Press and drag to make " "a copy." ), embed::getIconPixmap( "hint" ), 0 ); @@ -664,7 +664,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) QApplication::setOverrideCursor( c ); s_textFloat->setTitle( tr( "Current length" ) ); delete m_hint; - m_hint = textFloat::displayMessage( tr( "Hint" ), + m_hint = TextFloat::displayMessage( tr( "Hint" ), tr( "Press for free " "resizing." ), embed::getIconPixmap( "hint" ), 0 ); @@ -1559,7 +1559,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : "track_op_grip" ) ); } - toolTip::add( this, tr( "Press while clicking on move-grip " + ToolTip::add( this, tr( "Press while clicking on move-grip " "to begin a new drag'n'drop-action." ) ); QMenu * to_menu = new QMenu( this ); @@ -1574,15 +1574,15 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : m_trackOps->move( 12, 1 ); m_trackOps->setFocusPolicy( Qt::NoFocus ); m_trackOps->setMenu( to_menu ); - toolTip::add( m_trackOps, tr( "Actions for this track" ) ); + ToolTip::add( m_trackOps, tr( "Actions for this track" ) ); - m_muteBtn = new pixmapButton( this, tr( "Mute" ) ); + m_muteBtn = new PixmapButton( this, tr( "Mute" ) ); m_muteBtn->setActiveGraphic( embed::getIconPixmap( "led_off" ) ); m_muteBtn->setInactiveGraphic( embed::getIconPixmap( "led_green" ) ); m_muteBtn->setCheckable( true ); - m_soloBtn = new pixmapButton( this, tr( "Solo" ) ); + m_soloBtn = new PixmapButton( this, tr( "Solo" ) ); m_soloBtn->setActiveGraphic( embed::getIconPixmap( "led_red" ) ); m_soloBtn->setInactiveGraphic( embed::getIconPixmap( "led_off" ) ); m_soloBtn->setCheckable( true ); @@ -1600,10 +1600,10 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : } m_muteBtn->show(); - toolTip::add( m_muteBtn, tr( "Mute this track" ) ); + ToolTip::add( m_muteBtn, tr( "Mute this track" ) ); m_soloBtn->show(); - toolTip::add( m_soloBtn, tr( "Solo" ) ); + ToolTip::add( m_soloBtn, tr( "Solo" ) ); connect( this, SIGNAL( trackRemovalScheduled( trackView * ) ), m_trackView->trackContainerView(), @@ -2661,7 +2661,7 @@ void trackView::mouseMoveEvent( QMouseEvent * _me ) if( height() < DEFAULT_TRACK_HEIGHT ) { - toolTip::add( this, m_track->m_name ); + ToolTip::add( this, m_track->m_name ); } } diff --git a/src/core/audio/AudioPortAudio.cpp b/src/core/audio/AudioPortAudio.cpp index b67ddab0c..d23baf277 100644 --- a/src/core/audio/AudioPortAudio.cpp +++ b/src/core/audio/AudioPortAudio.cpp @@ -46,7 +46,7 @@ void AudioPortAudioSetupUtil::updateChannels() #include "ConfigManager.h" #include "gui_templates.h" #include "templates.h" -#include "combobox.h" +#include "ComboBox.h" #include "LcdSpinBox.h" @@ -391,14 +391,14 @@ void AudioPortAudioSetupUtil::updateChannels() AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) : AudioDevice::setupWidget( AudioPortAudio::name(), _parent ) { - m_backend = new comboBox( this, "BACKEND" ); + m_backend = new ComboBox( this, "BACKEND" ); m_backend->setGeometry( 64, 15, 260, 20 ); QLabel * backend_lbl = new QLabel( tr( "BACKEND" ), this ); backend_lbl->setFont( pointSize<7>( backend_lbl->font() ) ); backend_lbl->move( 8, 18 ); - m_device = new comboBox( this, "DEVICE" ); + m_device = new ComboBox( this, "DEVICE" ); m_device->setGeometry( 64, 35, 260, 20 ); QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this ); diff --git a/src/gui/AutomationEditor.cpp b/src/gui/AutomationEditor.cpp index 1357dca3e..f47d8165b 100644 --- a/src/gui/AutomationEditor.cpp +++ b/src/gui/AutomationEditor.cpp @@ -51,14 +51,14 @@ #include "MainWindow.h" #include "embed.h" #include "Engine.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "templates.h" #include "gui_templates.h" #include "Timeline.h" -#include "tooltip.h" -#include "tool_button.h" -#include "text_float.h" -#include "combobox.h" +#include "ToolTip.h" +#include "ToolButton.h" +#include "TextFloat.h" +#include "ComboBox.h" #include "BBTrackContainer.h" #include "PianoRoll.h" #include "debug.h" @@ -158,12 +158,12 @@ AutomationEditor::AutomationEditor() : // init control-buttons at the top - m_playButton = new toolButton( embed::getIconPixmap( "play" ), + m_playButton = new ToolButton( embed::getIconPixmap( "play" ), tr( "Play/pause current pattern (Space)" ), this, SLOT( play() ), m_toolBar ); - m_stopButton = new toolButton( embed::getIconPixmap( "stop" ), + m_stopButton = new ToolButton( embed::getIconPixmap( "stop" ), tr( "Stop playing of current pattern (Space)" ), this, SLOT( stop() ), m_toolBar ); @@ -193,14 +193,14 @@ AutomationEditor::AutomationEditor() : SLOT( verScrolled( int ) ) ); // init edit-buttons at the top - m_drawButton = new toolButton( embed::getIconPixmap( "edit_draw" ), + m_drawButton = new ToolButton( embed::getIconPixmap( "edit_draw" ), tr( "Draw mode (Shift+D)" ), this, SLOT( drawButtonToggled() ), m_toolBar ); m_drawButton->setCheckable( true ); m_drawButton->setChecked( true ); - m_eraseButton = new toolButton( embed::getIconPixmap( "edit_erase" ), + m_eraseButton = new ToolButton( embed::getIconPixmap( "edit_erase" ), tr( "Erase mode (Shift+E)" ), this, SLOT( eraseButtonToggled() ), m_toolBar ); @@ -249,7 +249,7 @@ AutomationEditor::AutomationEditor() : "mode. You can also press 'Shift+M' on your keyboard " "to activate this mode." ) );*/ - m_discreteButton = new toolButton( embed::getIconPixmap( + m_discreteButton = new ToolButton( embed::getIconPixmap( "progression_discrete" ), tr( "Discrete progression" ), this, SLOT( discreteButtonToggled() ), @@ -257,14 +257,14 @@ AutomationEditor::AutomationEditor() : m_discreteButton->setCheckable( true ); m_discreteButton->setChecked( true ); - m_linearButton = new toolButton( embed::getIconPixmap( + m_linearButton = new ToolButton( embed::getIconPixmap( "progression_linear" ), tr( "Linear progression" ), this, SLOT( linearButtonToggled() ), m_toolBar ); m_linearButton->setCheckable( true ); - m_cubicHermiteButton = new toolButton( embed::getIconPixmap( + m_cubicHermiteButton = new ToolButton( embed::getIconPixmap( "progression_cubic_hermite" ), tr( "Cubic Hermite progression" ), this, SLOT( @@ -273,7 +273,7 @@ AutomationEditor::AutomationEditor() : m_cubicHermiteButton->setCheckable( true ); // setup tension-stuff - m_tensionKnob = new knob( knobSmall_17, this, "Tension" ); + m_tensionKnob = new Knob( knobSmall_17, this, "Tension" ); m_tensionModel = new FloatModel(1.0, 0.0, 1.0, 0.01); connect( m_tensionModel, SIGNAL( dataChanged() ), this, SLOT( tensionChanged() ) ); @@ -305,17 +305,17 @@ AutomationEditor::AutomationEditor() : "object will change in a smooth curve and ease in to " "the peaks and valleys." ) ); - m_cutButton = new toolButton( embed::getIconPixmap( "edit_cut" ), + m_cutButton = new ToolButton( embed::getIconPixmap( "edit_cut" ), tr( "Cut selected values (Ctrl+X)" ), this, SLOT( cutSelectedValues() ), m_toolBar ); - m_copyButton = new toolButton( embed::getIconPixmap( "edit_copy" ), + m_copyButton = new ToolButton( embed::getIconPixmap( "edit_copy" ), tr( "Copy selected values (Ctrl+C)" ), this, SLOT( copySelectedValues() ), m_toolBar ); - m_pasteButton = new toolButton( embed::getIconPixmap( "edit_paste" ), + m_pasteButton = new ToolButton( embed::getIconPixmap( "edit_paste" ), tr( "Paste values from clipboard " "(Ctrl+V)" ), this, SLOT( pasteValues() ), @@ -338,7 +338,7 @@ AutomationEditor::AutomationEditor() : QLabel * zoom_x_lbl = new QLabel( m_toolBar ); zoom_x_lbl->setPixmap( embed::getIconPixmap( "zoom_x" ) ); - m_zoomingXComboBox = new comboBox( m_toolBar ); + m_zoomingXComboBox = new ComboBox( m_toolBar ); m_zoomingXComboBox->setFixedSize( 80, 22 ); for( int i = 0; i < 6; ++i ) @@ -356,7 +356,7 @@ AutomationEditor::AutomationEditor() : QLabel * zoom_y_lbl = new QLabel( m_toolBar ); zoom_y_lbl->setPixmap( embed::getIconPixmap( "zoom_y" ) ); - m_zoomingYComboBox = new comboBox( m_toolBar ); + m_zoomingYComboBox = new ComboBox( m_toolBar ); m_zoomingYComboBox->setFixedSize( 80, 22 ); m_zoomingYModel.addItem( "Auto" ); @@ -376,7 +376,7 @@ AutomationEditor::AutomationEditor() : QLabel * quantize_lbl = new QLabel( m_toolBar ); quantize_lbl->setPixmap( embed::getIconPixmap( "quantize" ) ); - m_quantizeComboBox = new comboBox( m_toolBar ); + m_quantizeComboBox = new ComboBox( m_toolBar ); m_quantizeComboBox->setFixedSize( 60, 22 ); for( int i = 0; i < 7; ++i ) @@ -2088,7 +2088,7 @@ void AutomationEditor::cubicHermiteButtonToggled() { m_tensionKnob->setModel( m_tensionModel ); m_tensionKnob->setEnabled( true ); - toolTip::add( m_tensionKnob, tr( "Tension value for spline" ) ); + ToolTip::add( m_tensionKnob, tr( "Tension value for spline" ) ); m_tensionKnob->setWhatsThis( tr( "A higher tension value may make a smoother curve " "but overshoot some values. A low tension " @@ -2210,7 +2210,7 @@ void AutomationEditor::copySelectedValues() { m_valuesToCopy[it.key()] = it.value(); } - textFloat::displayMessage( tr( "Values copied" ), + TextFloat::displayMessage( tr( "Values copied" ), tr( "All selected values were copied to the " "clipboard." ), embed::getIconPixmap( "edit_copy" ), 2000 ); diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index ad90a92e9..17c1c6fc1 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -33,9 +33,9 @@ #include "Engine.h" #include "gui_templates.h" #include "ProjectJournal.h" -#include "rename_dialog.h" +#include "RenameDialog.h" #include "string_pair_drag.h" -#include "tooltip.h" +#include "ToolTip.h" QPixmap * AutomationPatternView::s_pat_rec = NULL; @@ -56,7 +56,7 @@ AutomationPatternView::AutomationPatternView( AutomationPattern * _pattern, setFixedHeight( parentWidget()->height() - 2 ); setAutoResizeEnabled( false ); - toolTip::add( this, tr( "double-click to open this pattern in " + ToolTip::add( this, tr( "double-click to open this pattern in " "automation editor" ) ); setStyle( QApplication::style() ); @@ -99,7 +99,7 @@ void AutomationPatternView::resetName() void AutomationPatternView::changeName() { QString s = m_pat->name(); - renameDialog rename_dlg( s ); + RenameDialog rename_dlg( s ); rename_dlg.exec(); m_pat->setName( s ); update(); diff --git a/src/gui/ControllerConnectionDialog.cpp b/src/gui/ControllerConnectionDialog.cpp index 0a31cf075..d4485519a 100644 --- a/src/gui/ControllerConnectionDialog.cpp +++ b/src/gui/ControllerConnectionDialog.cpp @@ -35,12 +35,12 @@ #include "MidiClient.h" #include "MidiPortMenu.h" #include "LcdSpinBox.h" -#include "led_checkbox.h" -#include "combobox.h" -#include "tab_widget.h" -#include "group_box.h" +#include "LedCheckbox.h" +#include "ComboBox.h" +#include "TabWidget.h" +#include "GroupBox.h" #include "Song.h" -#include "tool_button.h" +#include "ToolButton.h" #include "gui_templates.h" #include "embed.h" @@ -137,7 +137,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, setModal( true ); // Midi stuff - m_midiGroupBox = new groupBox( tr( "MIDI CONTROLLER" ), this ); + m_midiGroupBox = new GroupBox( tr( "MIDI CONTROLLER" ), this ); m_midiGroupBox->setGeometry( 8, 10, 240, 80 ); connect( m_midiGroupBox->model(), SIGNAL( dataChanged() ), this, SLOT( midiToggled() ) ); @@ -156,7 +156,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, m_midiAutoDetectCheckBox = - new ledCheckBox( tr("Auto Detect"), + new LedCheckBox( tr("Auto Detect"), m_midiGroupBox, tr("Auto Detect") ); m_midiAutoDetectCheckBox->setModel( &m_midiAutoDetect ); m_midiAutoDetectCheckBox->move( 8, 60 ); @@ -170,7 +170,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, m_readablePorts = new MidiPortMenu( MidiPort::Input ); connect( m_readablePorts, SIGNAL( triggered( QAction * ) ), this, SLOT( enableAutoDetect( QAction * ) ) ); - toolButton * rp_btn = new toolButton( m_midiGroupBox ); + ToolButton * rp_btn = new ToolButton( m_midiGroupBox ); rp_btn->setText( tr( "MIDI-devices to receive " "MIDI-events from" ) ); rp_btn->setIcon( embed::getIconPixmap( "piano" ) ); @@ -181,12 +181,12 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, // User stuff - m_userGroupBox = new groupBox( tr( "USER CONTROLLER" ), this ); + m_userGroupBox = new GroupBox( tr( "USER CONTROLLER" ), this ); m_userGroupBox->setGeometry( 8, 100, 240, 60 ); connect( m_userGroupBox->model(), SIGNAL( dataChanged() ), this, SLOT( userToggled() ) ); - m_userController = new comboBox( m_userGroupBox, "Controller" ); + m_userController = new ComboBox( m_userGroupBox, "Controller" ); m_userController->setGeometry( 10, 24, 200, 22 ); for( int i = 0; i < Engine::getSong()->controllers().size(); ++i ) @@ -197,7 +197,7 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, // Mapping functions - m_mappingBox = new tabWidget( tr( "MAPPING FUNCTION" ), this ); + m_mappingBox = new TabWidget( tr( "MAPPING FUNCTION" ), this ); m_mappingBox->setGeometry( 8, 170, 240, 64 ); m_mappingFunction = new QLineEdit( m_mappingBox ); m_mappingFunction->setGeometry( 10, 20, 170, 16 ); diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 117ad8000..23e37dae9 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -48,7 +48,7 @@ #include "SamplePlayHandle.h" #include "Song.h" #include "string_pair_drag.h" -#include "text_float.h" +#include "TextFloat.h" @@ -424,7 +424,7 @@ void FileBrowserTreeWidget::mousePressEvent(QMouseEvent * me ) // handling() rather than directly creating a SamplePlayHandle if( f->type() == FileItem::SampleFile ) { - textFloat * tf = textFloat::displayMessage( + TextFloat * tf = TextFloat::displayMessage( tr( "Loading sample" ), tr( "Please wait, loading sample for " "preview..." ), diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index 4f1cb0f7f..407c0bd59 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -38,7 +38,7 @@ #include #include "FxMixerView.h" -#include "knob.h" +#include "Knob.h" #include "Engine.h" #include "embed.h" #include "MainWindow.h" @@ -268,13 +268,13 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv, m_fxLine = new FxLine(_parent, _mv, _chIndex); FxMixer * m = Engine::fxMixer(); - m_fader = new fader( &m->effectChannel(_chIndex)->m_volumeModel, + m_fader = new Fader( &m->effectChannel(_chIndex)->m_volumeModel, tr( "FX Fader %1" ).arg( _chIndex ), m_fxLine ); m_fader->move( 16-m_fader->width()/2, m_fxLine->height()- m_fader->height()-5 ); - m_muteBtn = new pixmapButton( m_fxLine, tr( "Mute" ) ); + m_muteBtn = new PixmapButton( m_fxLine, tr( "Mute" ) ); m_muteBtn->setModel( &m->effectChannel(_chIndex)->m_muteModel ); m_muteBtn->setActiveGraphic( embed::getIconPixmap( "led_off" ) ); @@ -282,9 +282,9 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv, embed::getIconPixmap( "led_green" ) ); m_muteBtn->setCheckable( true ); m_muteBtn->move( 9, m_fader->y()-11); - toolTip::add( m_muteBtn, tr( "Mute this FX channel" ) ); + ToolTip::add( m_muteBtn, tr( "Mute this FX channel" ) ); - m_soloBtn = new pixmapButton( m_fxLine, tr( "Solo" ) ); + m_soloBtn = new PixmapButton( m_fxLine, tr( "Solo" ) ); m_soloBtn->setModel( &m->effectChannel(_chIndex)->m_soloModel ); m_soloBtn->setActiveGraphic( embed::getIconPixmap( "led_red" ) ); @@ -294,7 +294,7 @@ FxMixerView::FxChannelView::FxChannelView(QWidget * _parent, FxMixerView * _mv, m_soloBtn->move( 9, m_fader->y()-21); connect(&m->effectChannel(_chIndex)->m_soloModel, SIGNAL( dataChanged() ), _mv, SLOT ( toggledSolo() ) ); - toolTip::add( m_soloBtn, tr( "Solo FX channel" ) ); + ToolTip::add( m_soloBtn, tr( "Solo FX channel" ) ); // Create EffectRack for the channel m_rackView = new EffectRackView( &m->effectChannel(_chIndex)->m_fxChain, _mv->m_racksWidget ); diff --git a/src/gui/LfoControllerDialog.cpp b/src/gui/LfoControllerDialog.cpp index 693207bd9..f604fd93a 100644 --- a/src/gui/LfoControllerDialog.cpp +++ b/src/gui/LfoControllerDialog.cpp @@ -33,16 +33,16 @@ #include "gui_templates.h" #include "embed.h" #include "Engine.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "MainWindow.h" -#include "tooltip.h" +#include "ToolTip.h" #include "LfoController.h" #include "ControllerDialog.h" -#include "knob.h" +#include "Knob.h" #include "TempoSyncKnob.h" -#include "pixmap_button.h" +#include "PixmapButton.h" const int CD_ENV_KNOBS_LBL_Y = 20; const int CD_KNOB_X_SPACING = 32; @@ -70,9 +70,9 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent setWindowIcon( embed::getIconPixmap( "controller" ) ); setFixedSize( 240, 80 ); - toolTip::add( this, tr( "LFO Controller" ) ); + ToolTip::add( this, tr( "LFO Controller" ) ); - m_baseKnob = new knob( knobBright_26, this ); + m_baseKnob = new Knob( knobBright_26, this ); m_baseKnob->setLabel( tr( "BASE" ) ); m_baseKnob->move( CD_LFO_BASE_CD_KNOB_X, CD_LFO_CD_KNOB_Y ); m_baseKnob->setHintText( tr( "Base amount:" ) + " ", "" ); @@ -89,7 +89,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "the faster the effect." ) ); - m_amountKnob = new knob( knobBright_26, this ); + m_amountKnob = new Knob( knobBright_26, this ); m_amountKnob->setLabel( tr( "AMT" ) ); m_amountKnob->move( CD_LFO_AMOUNT_CD_KNOB_X, CD_LFO_CD_KNOB_Y ); m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" ); @@ -99,7 +99,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "control (e.g. volume or cutoff-frequency) will " "be influenced by the LFO." ) ); - m_phaseKnob = new knob( knobBright_26, this ); + m_phaseKnob = new Knob( knobBright_26, this ); m_phaseKnob->setLabel( tr( "PHS" ) ); m_phaseKnob->move( CD_LFO_PHASE_CD_KNOB_X, CD_LFO_CD_KNOB_Y ); m_phaseKnob->setHintText( tr( "Phase offset:" ) + " ", "" + tr( "degrees" ) ); @@ -113,72 +113,72 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent "down. It's the same with a square-wave." ) ); - pixmapButton * sin_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * sin_wave_btn = new PixmapButton( this, NULL ); sin_wave_btn->move( CD_LFO_SHAPES_X, CD_LFO_SHAPES_Y ); sin_wave_btn->setActiveGraphic( embed::getIconPixmap( "sin_wave_active" ) ); sin_wave_btn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); - toolTip::add( sin_wave_btn, + ToolTip::add( sin_wave_btn, tr( "Click here for a sine-wave." ) ); - pixmapButton * triangle_wave_btn = - new pixmapButton( this, NULL ); + PixmapButton * triangle_wave_btn = + new PixmapButton( this, NULL ); triangle_wave_btn->move( CD_LFO_SHAPES_X + 15, CD_LFO_SHAPES_Y ); triangle_wave_btn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); triangle_wave_btn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); - toolTip::add( triangle_wave_btn, + ToolTip::add( triangle_wave_btn, tr( "Click here for a triangle-wave." ) ); - pixmapButton * saw_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * saw_wave_btn = new PixmapButton( this, NULL ); saw_wave_btn->move( CD_LFO_SHAPES_X + 30, CD_LFO_SHAPES_Y ); saw_wave_btn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); saw_wave_btn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); - toolTip::add( saw_wave_btn, + ToolTip::add( saw_wave_btn, tr( "Click here for a saw-wave." ) ); - pixmapButton * sqr_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * sqr_wave_btn = new PixmapButton( this, NULL ); sqr_wave_btn->move( CD_LFO_SHAPES_X + 45, CD_LFO_SHAPES_Y ); sqr_wave_btn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); sqr_wave_btn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); - toolTip::add( sqr_wave_btn, + ToolTip::add( sqr_wave_btn, tr( "Click here for a square-wave." ) ); - pixmapButton * moog_saw_wave_btn = - new pixmapButton( this, NULL ); + PixmapButton * moog_saw_wave_btn = + new PixmapButton( this, NULL ); moog_saw_wave_btn->move( CD_LFO_SHAPES_X, CD_LFO_SHAPES_Y + 15 ); moog_saw_wave_btn->setActiveGraphic( embed::getIconPixmap( "moog_saw_wave_active" ) ); moog_saw_wave_btn->setInactiveGraphic( embed::getIconPixmap( "moog_saw_wave_inactive" ) ); - toolTip::add( moog_saw_wave_btn, + ToolTip::add( moog_saw_wave_btn, tr( "Click here for a a moog saw-wave." ) ); - pixmapButton * exp_wave_btn = new pixmapButton( this, NULL ); + PixmapButton * exp_wave_btn = new PixmapButton( this, NULL ); exp_wave_btn->move( CD_LFO_SHAPES_X + 15, CD_LFO_SHAPES_Y + 15 ); exp_wave_btn->setActiveGraphic( embed::getIconPixmap( "exp_wave_active" ) ); exp_wave_btn->setInactiveGraphic( embed::getIconPixmap( "exp_wave_inactive" ) ); - toolTip::add( exp_wave_btn, + ToolTip::add( exp_wave_btn, tr( "Click here for an exponential wave." ) ); - pixmapButton * white_noise_btn = new pixmapButton( this, NULL ); + PixmapButton * white_noise_btn = new PixmapButton( this, NULL ); white_noise_btn->move( CD_LFO_SHAPES_X + 30, CD_LFO_SHAPES_Y + 15 ); white_noise_btn->setActiveGraphic( embed::getIconPixmap( "white_noise_wave_active" ) ); white_noise_btn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); - toolTip::add( white_noise_btn, + ToolTip::add( white_noise_btn, tr( "Click here for white-noise." ) ); - m_userWaveBtn = new pixmapButton( this, NULL ); + m_userWaveBtn = new PixmapButton( this, NULL ); m_userWaveBtn->move( CD_LFO_SHAPES_X + 45, CD_LFO_SHAPES_Y + 15 ); m_userWaveBtn->setActiveGraphic( embed::getIconPixmap( "usr_wave_active" ) ); @@ -187,7 +187,7 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent connect( m_userWaveBtn, SIGNAL( doubleClicked() ), this, SLOT( askUserDefWave() ) ); - toolTip::add( m_userWaveBtn, + ToolTip::add( m_userWaveBtn, tr( "Click here for a user-defined shape.\nDouble click to pick a file." ) ); m_waveBtnGrp = new automatableButtonGroup( this ); @@ -201,21 +201,21 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent m_waveBtnGrp->addButton( m_userWaveBtn ); - pixmapButton * x1 = new pixmapButton( this, NULL ); + PixmapButton * x1 = new PixmapButton( this, NULL ); x1->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y ); x1->setActiveGraphic( embed::getIconPixmap( "lfo_x1_active" ) ); x1->setInactiveGraphic( embed::getIconPixmap( "lfo_x1_inactive" ) ); - pixmapButton * x100 = new pixmapButton( this, NULL ); + PixmapButton * x100 = new PixmapButton( this, NULL ); x100->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y - 15 ); x100->setActiveGraphic( embed::getIconPixmap( "lfo_x100_active" ) ); x100->setInactiveGraphic( embed::getIconPixmap( "lfo_x100_inactive" ) ); - pixmapButton * d100 = new pixmapButton( this, NULL ); + PixmapButton * d100 = new PixmapButton( this, NULL ); d100->move( CD_LFO_MULTIPLIER_X, CD_LFO_SHAPES_Y + 15 ); d100->setActiveGraphic( embed::getIconPixmap( "lfo_d100_active" ) ); @@ -256,7 +256,7 @@ void LfoControllerDialog::askUserDefWave() if( fileName.isEmpty() == false ) { // TODO: - toolTip::add( m_userWaveBtn, sampleBuffer->audioFile() ); + ToolTip::add( m_userWaveBtn, sampleBuffer->audioFile() ); } } diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 1c6394f6e..2a6c1195b 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -54,11 +54,11 @@ #include "ConfigManager.h" #include "Mixer.h" #include "PluginView.h" -#include "project_notes.h" +#include "ProjectNotes.h" #include "setup_dialog.h" #include "AudioDummy.h" #include "ToolPlugin.h" -#include "tool_button.h" +#include "ToolButton.h" #include "ProjectJournal.h" #include "AutomationEditor.h" #include "templates.h" @@ -348,13 +348,13 @@ void MainWindow::finalize() this, SLOT( aboutLMMS() ) ); // create tool-buttons - toolButton * project_new = new toolButton( + ToolButton * project_new = new ToolButton( embed::getIconPixmap( "project_new" ), tr( "Create new project" ), this, SLOT( createNewProject() ), m_toolBar ); - toolButton * project_new_from_template = new toolButton( + ToolButton * project_new_from_template = new ToolButton( embed::getIconPixmap( "project_new_from_template" ), tr( "Create new project from template" ), this, SLOT( emptySlot() ), @@ -366,37 +366,37 @@ void MainWindow::finalize() connect( m_templatesMenu, SIGNAL( triggered( QAction * ) ), this, SLOT( createNewProjectFromTemplate( QAction * ) ) ); project_new_from_template->setMenu( m_templatesMenu ); - project_new_from_template->setPopupMode( toolButton::InstantPopup ); + project_new_from_template->setPopupMode( ToolButton::InstantPopup ); - toolButton * project_open = new toolButton( + ToolButton * project_open = new ToolButton( embed::getIconPixmap( "project_open" ), tr( "Open existing project" ), this, SLOT( openProject() ), m_toolBar ); - toolButton * project_open_recent = new toolButton( + ToolButton * project_open_recent = new ToolButton( embed::getIconPixmap( "project_open_recent" ), tr( "Recently opened project" ), this, SLOT( emptySlot() ), m_toolBar ); project_open_recent->setMenu( m_recentlyOpenedProjectsMenu ); - project_open_recent->setPopupMode( toolButton::InstantPopup ); + project_open_recent->setPopupMode( ToolButton::InstantPopup ); - toolButton * project_save = new toolButton( + ToolButton * project_save = new ToolButton( embed::getIconPixmap( "project_save" ), tr( "Save current project" ), this, SLOT( saveProject() ), m_toolBar ); - toolButton * project_export = new toolButton( + ToolButton * project_export = new ToolButton( embed::getIconPixmap( "project_export" ), tr( "Export current project" ), Engine::getSong(), SLOT( exportProject() ), m_toolBar ); - toolButton * whatsthis = new toolButton( + ToolButton * whatsthis = new ToolButton( embed::getIconPixmap( "whatsthis" ), tr( "What's this?" ), this, SLOT( enterWhatsThisMode() ), @@ -414,7 +414,7 @@ void MainWindow::finalize() // window-toolbar - toolButton * song_editor_window = new toolButton( + ToolButton * song_editor_window = new ToolButton( embed::getIconPixmap( "songeditor" ), tr( "Show/hide Song-Editor" ) + " (F5)", this, SLOT( toggleSongEditorWin() ), @@ -429,7 +429,7 @@ void MainWindow::finalize() "rap samples) directly into the playlist." ) ); - toolButton * bb_editor_window = new toolButton( + ToolButton * bb_editor_window = new ToolButton( embed::getIconPixmap( "bb_track_btn" ), tr( "Show/hide Beat+Bassline Editor" ) + " (F6)", @@ -445,7 +445,7 @@ void MainWindow::finalize() "that." ) ); - toolButton * piano_roll_window = new toolButton( + ToolButton * piano_roll_window = new ToolButton( embed::getIconPixmap( "piano" ), tr( "Show/hide Piano-Roll" ) + " (F7)", @@ -458,7 +458,7 @@ void MainWindow::finalize() "you can edit melodies in an easy way." ) ); - toolButton * automation_editor_window = new toolButton( + ToolButton * automation_editor_window = new ToolButton( embed::getIconPixmap( "automation" ), tr( "Show/hide Automation Editor" ) + " (F8)", @@ -473,7 +473,7 @@ void MainWindow::finalize() "in an easy way." ) ); - toolButton * fx_mixer_window = new toolButton( + ToolButton * fx_mixer_window = new ToolButton( embed::getIconPixmap( "fx_mixer" ), tr( "Show/hide FX Mixer" ) + " (F9)", this, SLOT( toggleFxMixerWin() ), @@ -485,7 +485,7 @@ void MainWindow::finalize() "for managing effects for your song. You can insert " "effects into different effect-channels." ) ); - toolButton * project_notes_window = new toolButton( + ToolButton * project_notes_window = new ToolButton( embed::getIconPixmap( "project_notes" ), tr( "Show/hide project notes" ) + " (F10)", @@ -497,7 +497,7 @@ void MainWindow::finalize() "project notes window. In this window you can put " "down your project notes.") ); - toolButton * controllers_window = new toolButton( + ToolButton * controllers_window = new ToolButton( embed::getIconPixmap( "controller" ), tr( "Show/hide controller rack" ) + " (F11)", diff --git a/src/gui/PeakControllerDialog.cpp b/src/gui/PeakControllerDialog.cpp index add8eb529..4403a7baa 100644 --- a/src/gui/PeakControllerDialog.cpp +++ b/src/gui/PeakControllerDialog.cpp @@ -35,13 +35,13 @@ #include "embed.h" #include "Engine.h" #include "MainWindow.h" -#include "tooltip.h" +#include "ToolTip.h" #include "PeakController.h" #include "ControllerDialog.h" -#include "knob.h" +#include "Knob.h" #include "TempoSyncKnob.h" -#include "pixmap_button.h" +#include "PixmapButton.h" PeakControllerDialog::PeakControllerDialog( Controller * _model, QWidget * _parent ) : @@ -51,7 +51,7 @@ PeakControllerDialog::PeakControllerDialog( Controller * _model, QWidget * _pare setWindowIcon( embed::getIconPixmap( "controller" ) ); setFixedSize( 256, 64 ); - toolTip::add( this, tr( "LFO Controller" ) ); + ToolTip::add( this, tr( "LFO Controller" ) ); QLabel * l = new QLabel( this ); l->setText( "Use FX's controls" ); diff --git a/src/gui/PianoRoll.cpp b/src/gui/PianoRoll.cpp index 1300aa72f..56bc5b6a0 100644 --- a/src/gui/PianoRoll.cpp +++ b/src/gui/PianoRoll.cpp @@ -49,7 +49,7 @@ #include "PianoRoll.h" #include "BBTrackContainer.h" #include "Clipboard.h" -#include "combobox.h" +#include "ComboBox.h" #include "debug.h" #include "DetuningHelper.h" #include "embed.h" @@ -60,14 +60,14 @@ #include "DataFile.h" #include "Pattern.h" #include "Piano.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "Song.h" #include "SongEditor.h" #include "templates.h" -#include "text_float.h" +#include "TextFloat.h" #include "Timeline.h" -#include "tool_button.h" -#include "text_float.h" +#include "ToolButton.h" +#include "TextFloat.h" typedef AutomationPattern::timeMap timeMap; @@ -126,7 +126,7 @@ QPixmap * PianoRoll::s_toolSelect = NULL; QPixmap * PianoRoll::s_toolMove = NULL; QPixmap * PianoRoll::s_toolOpen = NULL; -textFloat * PianoRoll::s_textFloat = NULL; +TextFloat * PianoRoll::s_textFloat = NULL; // used for drawing of piano PianoRoll::PianoRollKeyTypes PianoRoll::prKeyOrder[] = @@ -285,7 +285,7 @@ PianoRoll::PianoRoll() : // init text-float if( s_textFloat == NULL ) { - s_textFloat = new textFloat; + s_textFloat = new TextFloat; } setAttribute( Qt::WA_OpaquePaintEvent, true ); @@ -328,19 +328,19 @@ PianoRoll::PianoRoll() : // init control-buttons at the top - m_playButton = new toolButton( embed::getIconPixmap( "play" ), + m_playButton = new ToolButton( embed::getIconPixmap( "play" ), tr( "Play/pause current pattern (Space)" ), this, SLOT( play() ), m_toolBar ); - m_recordButton = new toolButton( embed::getIconPixmap( "record" ), + m_recordButton = new ToolButton( embed::getIconPixmap( "record" ), tr( "Record notes from MIDI-device/channel-piano" ), this, SLOT( record() ), m_toolBar ); - m_recordAccompanyButton = new toolButton( + m_recordAccompanyButton = new ToolButton( embed::getIconPixmap( "record_accompany" ), tr( "Record notes from MIDI-device/channel-piano while playing song or BB track" ), this, SLOT( recordAccompany() ), m_toolBar ); - m_stopButton = new toolButton( embed::getIconPixmap( "stop" ), + m_stopButton = new ToolButton( embed::getIconPixmap( "stop" ), tr( "Stop playing of current pattern (Space)" ), this, SLOT( stop() ), m_toolBar ); @@ -384,27 +384,27 @@ PianoRoll::PianoRoll() : SLOT( verScrolled( int ) ) ); // init edit-buttons at the top - m_drawButton = new toolButton( embed::getIconPixmap( "edit_draw" ), + m_drawButton = new ToolButton( embed::getIconPixmap( "edit_draw" ), tr( "Draw mode (Shift+D)" ), this, SLOT( drawButtonToggled() ), m_toolBar ); m_drawButton->setCheckable( true ); m_drawButton->setChecked( true ); - m_eraseButton = new toolButton( embed::getIconPixmap( "edit_erase" ), + m_eraseButton = new ToolButton( embed::getIconPixmap( "edit_erase" ), tr( "Erase mode (Shift+E)" ), this, SLOT( eraseButtonToggled() ), m_toolBar ); m_eraseButton->setCheckable( true ); - m_selectButton = new toolButton( embed::getIconPixmap( + m_selectButton = new ToolButton( embed::getIconPixmap( "edit_select" ), tr( "Select mode (Shift+S)" ), this, SLOT( selectButtonToggled() ), m_toolBar ); m_selectButton->setCheckable( true ); - m_detuneButton = new toolButton( embed::getIconPixmap( "automation"), + m_detuneButton = new ToolButton( embed::getIconPixmap( "automation"), tr( "Detune mode (Shift+T)" ), this, SLOT( detuneButtonToggled() ), m_toolBar ); @@ -440,17 +440,17 @@ PianoRoll::PianoRoll() : "notes from one to another. You can also press " "'Shift+T' on your keyboard to activate this mode." ) ); - m_cutButton = new toolButton( embed::getIconPixmap( "edit_cut" ), + m_cutButton = new ToolButton( embed::getIconPixmap( "edit_cut" ), tr( "Cut selected notes (Ctrl+X)" ), this, SLOT( cutSelectedNotes() ), m_toolBar ); - m_copyButton = new toolButton( embed::getIconPixmap( "edit_copy" ), + m_copyButton = new ToolButton( embed::getIconPixmap( "edit_copy" ), tr( "Copy selected notes (Ctrl+C)" ), this, SLOT( copySelectedNotes() ), m_toolBar ); - m_pasteButton = new toolButton( embed::getIconPixmap( "edit_paste" ), + m_pasteButton = new ToolButton( embed::getIconPixmap( "edit_paste" ), tr( "Paste notes from clipboard " "(Ctrl+V)" ), this, SLOT( pasteNotes() ), @@ -479,7 +479,7 @@ PianoRoll::PianoRoll() : m_zoomingModel.setValue( m_zoomingModel.findText( "100%" ) ); connect( &m_zoomingModel, SIGNAL( dataChanged() ), this, SLOT( zoomingChanged() ) ); - m_zoomingComboBox = new comboBox( m_toolBar ); + m_zoomingComboBox = new ComboBox( m_toolBar ); m_zoomingComboBox->setModel( &m_zoomingModel ); m_zoomingComboBox->setFixedSize( 64, 22 ); @@ -498,7 +498,7 @@ PianoRoll::PianoRoll() : } m_quantizeModel.addItem( "1/192" ); m_quantizeModel.setValue( m_quantizeModel.findText( "1/16" ) ); - m_quantizeComboBox = new comboBox( m_toolBar ); + m_quantizeComboBox = new ComboBox( m_toolBar ); m_quantizeComboBox->setModel( &m_quantizeModel ); m_quantizeComboBox->setFixedSize( 64, 22 ); connect( &m_quantizeModel, SIGNAL( dataChanged() ), @@ -527,7 +527,7 @@ PianoRoll::PianoRoll() : new PixmapLoader( "note_" + pixmaps[i+NUM_EVEN_LENGTHS] ) ); } m_noteLenModel.setValue( 0 ); - m_noteLenComboBox = new comboBox( m_toolBar ); + m_noteLenComboBox = new ComboBox( m_toolBar ); m_noteLenComboBox->setModel( &m_noteLenModel ); m_noteLenComboBox->setFixedSize( 105, 22 ); // Note length change can cause a redraw if Q is set to lock @@ -551,7 +551,7 @@ PianoRoll::PianoRoll() : } m_scaleModel.setValue( 0 ); - m_scaleComboBox = new comboBox( m_toolBar ); + m_scaleComboBox = new ComboBox( m_toolBar ); m_scaleComboBox->setModel( &m_scaleModel ); m_scaleComboBox->setFixedSize( 105, 22 ); // change can update m_semiToneMarkerMenu @@ -573,7 +573,7 @@ PianoRoll::PianoRoll() : } m_chordModel.setValue( 0 ); - m_chordComboBox = new comboBox( m_toolBar ); + m_chordComboBox = new ComboBox( m_toolBar ); m_chordComboBox->setModel( &m_chordModel ); m_chordComboBox->setFixedSize( 105, 22 ); // change can update m_semiToneMarkerMenu diff --git a/src/gui/PianoView.cpp b/src/gui/PianoView.cpp index 64423c036..ece836420 100644 --- a/src/gui/PianoView.cpp +++ b/src/gui/PianoView.cpp @@ -50,7 +50,7 @@ #include "Engine.h" #include "gui_templates.h" #include "InstrumentTrack.h" -#include "knob.h" +#include "Knob.h" #include "string_pair_drag.h" #include "MainWindow.h" #include "MidiEvent.h" diff --git a/src/gui/SongEditor.cpp b/src/gui/SongEditor.cpp index 26db6beac..24d00d922 100644 --- a/src/gui/SongEditor.cpp +++ b/src/gui/SongEditor.cpp @@ -37,18 +37,18 @@ #include "SongEditor.h" #include "AutomatableSlider.h" -#include "combobox.h" +#include "ComboBox.h" #include "ConfigManager.h" -#include "cpuload_widget.h" +#include "CPULoadWidget.h" #include "embed.h" #include "LcdSpinBox.h" #include "MainWindow.h" #include "MeterDialog.h" -#include "text_float.h" +#include "TextFloat.h" #include "Timeline.h" -#include "tool_button.h" -#include "tooltip.h" -#include "visualization_widget.h" +#include "ToolButton.h" +#include "ToolTip.h" +#include "VisualizationWidget.h" #include "TimeDisplayWidget.h" #include "AudioDevice.h" #include "PianoRoll.h" @@ -117,7 +117,7 @@ SongEditor::SongEditor( Song * _song ) : m_tempoSpinBox = new LcdSpinBox( 3, tb, tr( "Tempo" ) ); m_tempoSpinBox->setModel( &m_song->m_tempoModel ); m_tempoSpinBox->setLabel( tr( "TEMPO/BPM" ) ); - toolTip::add( m_tempoSpinBox, tr( "tempo of song" ) ); + ToolTip::add( m_tempoSpinBox, tr( "tempo of song" ) ); m_tempoSpinBox->setWhatsThis( tr( "The tempo of a song is specified in beats per minute " @@ -162,7 +162,7 @@ SongEditor::SongEditor( Song * _song ) : m_masterVolumeSlider->setTickPosition( QSlider::TicksLeft ); m_masterVolumeSlider->setFixedSize( 26, 60 ); m_masterVolumeSlider->setTickInterval( 50 ); - toolTip::add( m_masterVolumeSlider, tr( "master volume" ) ); + ToolTip::add( m_masterVolumeSlider, tr( "master volume" ) ); connect( m_masterVolumeSlider, SIGNAL( logicValueChanged( int ) ), this, SLOT( masterVolumeChanged( int ) ) ); @@ -173,7 +173,7 @@ SongEditor::SongEditor( Song * _song ) : connect( m_masterVolumeSlider, SIGNAL( sliderReleased() ), this, SLOT( masterVolumeReleased() ) ); - m_mvsStatus = new textFloat; + m_mvsStatus = new TextFloat; m_mvsStatus->setTitle( tr( "Master volume" ) ); m_mvsStatus->setPixmap( embed::getIconPixmap( "master_volume" ) ); @@ -195,7 +195,7 @@ SongEditor::SongEditor( Song * _song ) : m_masterPitchSlider->setTickPosition( QSlider::TicksLeft ); m_masterPitchSlider->setFixedSize( 26, 60 ); m_masterPitchSlider->setTickInterval( 12 ); - toolTip::add( m_masterPitchSlider, tr( "master pitch" ) ); + ToolTip::add( m_masterPitchSlider, tr( "master pitch" ) ); connect( m_masterPitchSlider, SIGNAL( logicValueChanged( int ) ), this, SLOT( masterPitchChanged( int ) ) ); connect( m_masterPitchSlider, SIGNAL( sliderPressed() ), this, @@ -205,7 +205,7 @@ SongEditor::SongEditor( Song * _song ) : connect( m_masterPitchSlider, SIGNAL( sliderReleased() ), this, SLOT( masterPitchReleased() ) ); - m_mpsStatus = new textFloat; + m_mpsStatus = new TextFloat; m_mpsStatus->setTitle( tr( "Master pitch" ) ); m_mpsStatus->setPixmap( embed::getIconPixmap( "master_pitch" ) ); @@ -221,10 +221,10 @@ SongEditor::SongEditor( Song * _song ) : vcw_layout->setSpacing( 0 ); //vcw_layout->addStretch(); - vcw_layout->addWidget( new visualizationWidget( + vcw_layout->addWidget( new VisualizationWidget( embed::getIconPixmap( "output_graph" ), vc_w ) ); - vcw_layout->addWidget( new cpuloadWidget( vc_w ) ); + vcw_layout->addWidget( new CPULoadWidget( vc_w ) ); vcw_layout->addStretch(); Engine::mainWindow()->addWidgetToToolBar( vc_w ); @@ -248,17 +248,17 @@ SongEditor::SongEditor( Song * _song ) : // fill own tool-bar - m_playButton = new toolButton( embed::getIconPixmap( "play" ), + m_playButton = new ToolButton( embed::getIconPixmap( "play" ), tr( "Play song (Space)" ), this, SLOT( play() ), m_toolBar ); m_playButton->setObjectName( "playButton" ); - m_recordButton = new toolButton( embed::getIconPixmap( "record" ), + m_recordButton = new ToolButton( embed::getIconPixmap( "record" ), tr( "Record samples from Audio-device" ), this, SLOT( record() ), m_toolBar ); m_recordButton->setObjectName( "recordButton" ); - m_recordAccompanyButton = new toolButton( + m_recordAccompanyButton = new ToolButton( embed::getIconPixmap( "record_accompany" ), tr( "Record samples from Audio-device while playing " "song or BB track" ), @@ -275,37 +275,37 @@ SongEditor::SongEditor( Song * _song ) : m_recordAccompanyButton->setDisabled( true ); } - m_stopButton = new toolButton( embed::getIconPixmap( "stop" ), + m_stopButton = new ToolButton( embed::getIconPixmap( "stop" ), tr( "Stop song (Space)" ), this, SLOT( stop() ), m_toolBar ); m_stopButton->setObjectName( "stopButton" ); - m_addBBTrackButton = new toolButton( embed::getIconPixmap( + m_addBBTrackButton = new ToolButton( embed::getIconPixmap( "add_bb_track" ), tr( "Add beat/bassline" ), m_song, SLOT( addBBTrack() ), m_toolBar ); - m_addSampleTrackButton = new toolButton( embed::getIconPixmap( + m_addSampleTrackButton = new ToolButton( embed::getIconPixmap( "add_sample_track" ), tr( "Add sample-track" ), m_song, SLOT( addSampleTrack() ), m_toolBar ); - m_addAutomationTrackButton = new toolButton( embed::getIconPixmap( + m_addAutomationTrackButton = new ToolButton( embed::getIconPixmap( "add_automation" ), tr( "Add automation-track" ), m_song, SLOT( addAutomationTrack() ), m_toolBar ); - m_drawModeButton = new toolButton( embed::getIconPixmap( + m_drawModeButton = new ToolButton( embed::getIconPixmap( "edit_draw" ), tr( "Draw mode" ), NULL, NULL, m_toolBar ); m_drawModeButton->setCheckable( true ); m_drawModeButton->setChecked( true ); - m_editModeButton = new toolButton( embed::getIconPixmap( + m_editModeButton = new ToolButton( embed::getIconPixmap( "edit_select" ), tr( "Edit mode (select and move)" ), NULL, NULL, m_toolBar ); @@ -343,7 +343,7 @@ SongEditor::SongEditor( Song * _song ) : zoom_lbl->setPixmap( embed::getIconPixmap( "zoom" ) ); // setup zooming-stuff - m_zoomingComboBox = new comboBox( m_toolBar ); + m_zoomingComboBox = new ComboBox( m_toolBar ); m_zoomingComboBox->setFixedSize( 80, 22 ); m_zoomingComboBox->move( 580, 4 ); for( int i = 0; i < 7; ++i ) diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index 13b585106..364a517d5 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -41,7 +41,7 @@ #include "Instrument.h" #include "InstrumentTrack.h" #include "DataFile.h" -#include "rubberband.h" +#include "Rubberband.h" #include "Song.h" #include "string_pair_drag.h" #include "Track.h" @@ -57,7 +57,7 @@ TrackContainerView::TrackContainerView( TrackContainer * _tc ) : m_trackViews(), m_scrollArea( new scrollArea( this ) ), m_ppt( DEFAULT_PIXELS_PER_TACT ), - m_rubberBand( new rubberBand( m_scrollArea ) ), + m_rubberBand( new RubberBand( m_scrollArea ) ), m_origin() { m_tc->setHook( this ); diff --git a/src/gui/bb_editor.cpp b/src/gui/bb_editor.cpp index 3aa0365f3..f95c2513e 100644 --- a/src/gui/bb_editor.cpp +++ b/src/gui/bb_editor.cpp @@ -33,7 +33,7 @@ #include "embed.h" #include "MainWindow.h" #include "Song.h" -#include "tool_button.h" +#include "ToolButton.h" #include "ConfigManager.h" #include "DataFile.h" #include "string_pair_drag.h" @@ -79,34 +79,34 @@ bbEditor::bbEditor( BBTrackContainer* tc ) : } - m_playButton = new toolButton( embed::getIconPixmap( "play" ), + m_playButton = new ToolButton( embed::getIconPixmap( "play" ), tr( "Play/pause current beat/bassline (Space)" ), this, SLOT( play() ), m_toolBar ); - m_stopButton = new toolButton( embed::getIconPixmap( "stop" ), + m_stopButton = new ToolButton( embed::getIconPixmap( "stop" ), tr( "Stop playback of current beat/bassline (Space)" ), this, SLOT( stop() ), m_toolBar ); m_playButton->setObjectName( "playButton" ); m_stopButton->setObjectName( "stopButton" ); - toolButton * add_bb_track = new toolButton( + ToolButton * add_bb_track = new ToolButton( embed::getIconPixmap( "add_bb_track" ), tr( "Add beat/bassline" ), Engine::getSong(), SLOT( addBBTrack() ), m_toolBar ); - toolButton * add_automation_track = new toolButton( + ToolButton * add_automation_track = new ToolButton( embed::getIconPixmap( "add_automation" ), tr( "Add automation-track" ), this, SLOT( addAutomationTrack() ), m_toolBar ); - toolButton * remove_bar = new toolButton( + ToolButton * remove_bar = new ToolButton( embed::getIconPixmap( "step_btn_remove" ), tr( "Remove steps" ), this, SLOT( removeSteps() ), m_toolBar ); - toolButton * add_bar = new toolButton( + ToolButton * add_bar = new ToolButton( embed::getIconPixmap( "step_btn_add" ), tr( "Add steps" ), this, SLOT( addSteps() ), m_toolBar ); @@ -121,7 +121,7 @@ bbEditor::bbEditor( BBTrackContainer* tc ) : tr( "Click here to stop playing of current " "beat/bassline." ) ); - m_bbComboBox = new comboBox( m_toolBar ); + m_bbComboBox = new ComboBox( m_toolBar ); m_bbComboBox->setFixedSize( 200, 22 ); m_bbComboBox->setModel( &tc->m_bbComboBoxModel ); diff --git a/src/gui/setup_dialog.cpp b/src/gui/setup_dialog.cpp index 3fd6b8750..d79ee1ba6 100644 --- a/src/gui/setup_dialog.cpp +++ b/src/gui/setup_dialog.cpp @@ -32,9 +32,9 @@ #include #include "setup_dialog.h" -#include "tab_bar.h" +#include "TabBar.h" #include "tab_button.h" -#include "tab_widget.h" +#include "TabWidget.h" #include "gui_templates.h" #include "Mixer.h" #include "ProjectJournal.h" @@ -42,8 +42,8 @@ #include "embed.h" #include "Engine.h" #include "debug.h" -#include "tooltip.h" -#include "led_checkbox.h" +#include "ToolTip.h" +#include "LedCheckbox.h" #include "LcdSpinBox.h" #include "FileDialog.h" @@ -139,7 +139,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : hlayout->setSpacing( 0 ); hlayout->setMargin( 0 ); - m_tabBar = new tabBar( settings, QBoxLayout::TopToBottom ); + m_tabBar = new TabBar( settings, QBoxLayout::TopToBottom ); m_tabBar->setExclusive( true ); m_tabBar->setFixedWidth( 72 ); @@ -159,7 +159,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : gen_layout->setMargin( 0 ); labelWidget( general, tr( "General settings" ) ); - tabWidget * bufsize_tw = new tabWidget( tr( "BUFFER SIZE" ), general ); + TabWidget * bufsize_tw = new TabWidget( tr( "BUFFER SIZE" ), general ); bufsize_tw->setFixedHeight( 80 ); m_bufSizeSlider = new QSlider( Qt::Horizontal, bufsize_tw ); @@ -182,7 +182,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : bufsize_reset_btn->setGeometry( 290, 40, 28, 28 ); connect( bufsize_reset_btn, SIGNAL( clicked() ), this, SLOT( resetBufSize() ) ); - toolTip::add( bufsize_reset_btn, tr( "Reset to default-value" ) ); + ToolTip::add( bufsize_reset_btn, tr( "Reset to default-value" ) ); QPushButton * bufsize_help_btn = new QPushButton( embed::getIconPixmap( "help" ), "", bufsize_tw ); @@ -191,14 +191,14 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : SLOT( displayBufSizeHelp() ) ); - tabWidget * misc_tw = new tabWidget( tr( "MISC" ), general ); + TabWidget * misc_tw = new TabWidget( tr( "MISC" ), general ); const int XDelta = 10; const int YDelta = 18; const int HeaderSize = 30; int labelNumber = 0; - ledCheckBox * enable_tooltips = new ledCheckBox( + LedCheckBox * enable_tooltips = new LedCheckBox( tr( "Enable tooltips" ), misc_tw ); labelNumber++; @@ -208,7 +208,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : this, SLOT( toggleToolTips( bool ) ) ); - ledCheckBox * restart_msg = new ledCheckBox( + LedCheckBox * restart_msg = new LedCheckBox( tr( "Show restart warning after changing settings" ), misc_tw ); labelNumber++; @@ -218,7 +218,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : this, SLOT( toggleWarnAfterSetup( bool ) ) ); - ledCheckBox * dbv = new ledCheckBox( tr( "Display volume as dBV " ), + LedCheckBox * dbv = new LedCheckBox( tr( "Display volume as dBV " ), misc_tw ); labelNumber++; dbv->move( XDelta, YDelta*labelNumber ); @@ -227,7 +227,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : this, SLOT( toggleDisplaydBV( bool ) ) ); - ledCheckBox * mmpz = new ledCheckBox( + LedCheckBox * mmpz = new LedCheckBox( tr( "Compress project files per default" ), misc_tw ); labelNumber++; @@ -236,7 +236,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( mmpz, SIGNAL( toggled( bool ) ), this, SLOT( toggleMMPZ( bool ) ) ); - ledCheckBox * oneitw = new ledCheckBox( + LedCheckBox * oneitw = new LedCheckBox( tr( "One instrument track window mode" ), misc_tw ); labelNumber++; @@ -245,7 +245,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( oneitw, SIGNAL( toggled( bool ) ), this, SLOT( toggleOneInstrumentTrackWindow( bool ) ) ); - ledCheckBox * hqaudio = new ledCheckBox( + LedCheckBox * hqaudio = new LedCheckBox( tr( "HQ-mode for output audio-device" ), misc_tw ); labelNumber++; @@ -254,7 +254,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( hqaudio, SIGNAL( toggled( bool ) ), this, SLOT( toggleHQAudioDev( bool ) ) ); - ledCheckBox * compacttracks = new ledCheckBox( + LedCheckBox * compacttracks = new LedCheckBox( tr( "Compact track buttons" ), misc_tw ); labelNumber++; @@ -264,7 +264,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : this, SLOT( toggleCompactTrackButtons( bool ) ) ); - ledCheckBox * syncVST = new ledCheckBox( + LedCheckBox * syncVST = new LedCheckBox( tr( "Sync VST plugins to host playback" ), misc_tw ); labelNumber++; @@ -273,7 +273,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( syncVST, SIGNAL( toggled( bool ) ), this, SLOT( toggleSyncVSTPlugins( bool ) ) ); - ledCheckBox * noteLabels = new ledCheckBox( + LedCheckBox * noteLabels = new LedCheckBox( tr( "Enable note labels in piano roll" ), misc_tw ); labelNumber++; @@ -282,7 +282,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( noteLabels, SIGNAL( toggled( bool ) ), this, SLOT( toggleNoteLabels( bool ) ) ); - ledCheckBox * displayWaveform = new ledCheckBox( + LedCheckBox * displayWaveform = new LedCheckBox( tr( "Enable waveform display by default" ), misc_tw ); labelNumber++; @@ -291,7 +291,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( displayWaveform, SIGNAL( toggled( bool ) ), this, SLOT( toggleDisplayWaveform( bool ) ) ); - ledCheckBox * disableAutoquit = new ledCheckBox( + LedCheckBox * disableAutoquit = new LedCheckBox( tr( "Keep effects running even without input" ), misc_tw ); labelNumber++; @@ -325,7 +325,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : labelWidget( paths, tr( "Paths" ) ); // working-dir - tabWidget * lmms_wd_tw = new tabWidget( tr( + TabWidget * lmms_wd_tw = new TabWidget( tr( "LMMS working directory" ).toUpper(), paths ); lmms_wd_tw->setFixedHeight( 48 ); @@ -344,7 +344,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : SLOT( openWorkingDir() ) ); // vst-dir - tabWidget * vst_tw = new tabWidget( tr( + TabWidget * vst_tw = new TabWidget( tr( "VST-plugin directory" ).toUpper(), paths ); vst_tw->setFixedHeight( 48 ); @@ -363,7 +363,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : SLOT( openVSTDir() ) ); // artwork-dir - tabWidget * artwork_tw = new tabWidget( tr( + TabWidget * artwork_tw = new TabWidget( tr( "Artwork directory" ).toUpper(), paths ); artwork_tw->setFixedHeight( 48 ); @@ -384,7 +384,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : // background artwork file - tabWidget * backgroundArtwork_tw = new tabWidget( tr( + TabWidget * backgroundArtwork_tw = new TabWidget( tr( "Background artwork" ).toUpper(), paths ); backgroundArtwork_tw->setFixedHeight( 48 ); @@ -407,7 +407,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : // FL Studio-dir - tabWidget * fl_tw = new tabWidget( tr( + TabWidget * fl_tw = new TabWidget( tr( "FL Studio installation directory" ).toUpper(), paths ); fl_tw->setFixedHeight( 48 ); @@ -425,7 +425,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : connect( fldir_select_btn, SIGNAL( clicked() ), this, SLOT( openFLDir() ) ); // LADSPA-dir - tabWidget * lad_tw = new tabWidget( tr( + TabWidget * lad_tw = new TabWidget( tr( "LADSPA plugin paths" ).toUpper(), paths ); lad_tw->setFixedHeight( 48 ); @@ -445,7 +445,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : #ifdef LMMS_HAVE_STK // STK-dir - tabWidget * stk_tw = new tabWidget( tr( + TabWidget * stk_tw = new TabWidget( tr( "STK rawwave directory" ).toUpper(), paths ); stk_tw->setFixedHeight( 48 ); @@ -466,7 +466,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : #ifdef LMMS_HAVE_FLUIDSYNTH // Soundfont - tabWidget * sf_tw = new tabWidget( tr( + TabWidget * sf_tw = new TabWidget( tr( "Default Soundfont File" ).toUpper(), paths ); sf_tw->setFixedHeight( 48 ); @@ -517,12 +517,12 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : perf_layout->setMargin( 0 ); labelWidget( performance, tr( "Performance settings" ) ); - tabWidget * ui_fx_tw = new tabWidget( tr( "UI effects vs. " + TabWidget * ui_fx_tw = new TabWidget( tr( "UI effects vs. " "performance" ).toUpper(), performance ); ui_fx_tw->setFixedHeight( 80 ); - ledCheckBox * smoothScroll = new ledCheckBox( + LedCheckBox * smoothScroll = new LedCheckBox( tr( "Smooth scroll in Song Editor" ), ui_fx_tw ); smoothScroll->move( 10, 20 ); smoothScroll->setChecked( m_smoothScroll ); @@ -530,7 +530,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : this, SLOT( toggleSmoothScroll( bool ) ) ); - ledCheckBox * autoSave = new ledCheckBox( + LedCheckBox * autoSave = new LedCheckBox( tr( "Enable auto save feature" ), ui_fx_tw ); autoSave->move( 10, 40 ); autoSave->setChecked( m_enableAutoSave ); @@ -538,7 +538,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : this, SLOT( toggleAutoSave( bool ) ) ); - ledCheckBox * animAFP = new ledCheckBox( + LedCheckBox * animAFP = new LedCheckBox( tr( "Show playback cursor in AudioFileProcessor" ), ui_fx_tw ); animAFP->move( 10, 60 ); @@ -560,7 +560,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : audio_layout->setMargin( 0 ); labelWidget( audio, tr( "Audio settings" ) ); - tabWidget * audioiface_tw = new tabWidget( tr( "AUDIO INTERFACE" ), + TabWidget * audioiface_tw = new TabWidget( tr( "AUDIO INTERFACE" ), audio ); audioiface_tw->setFixedHeight( 60 ); @@ -652,7 +652,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : midi_layout->setMargin( 0 ); labelWidget( midi, tr( "MIDI settings" ) ); - tabWidget * midiiface_tw = new tabWidget( tr( "MIDI INTERFACE" ), + TabWidget * midiiface_tw = new TabWidget( tr( "MIDI INTERFACE" ), midi ); midiiface_tw->setFixedHeight( 60 ); diff --git a/src/gui/widgets/cpuload_widget.cpp b/src/gui/widgets/CPULoadWidget.cpp similarity index 89% rename from src/gui/widgets/cpuload_widget.cpp rename to src/gui/widgets/CPULoadWidget.cpp index 522c9e5b8..949107542 100644 --- a/src/gui/widgets/cpuload_widget.cpp +++ b/src/gui/widgets/CPULoadWidget.cpp @@ -1,5 +1,5 @@ /* - * cpuload_widget.cpp - widget for displaying CPU-load (partly based on + * CPULoadWidget.cpp - widget for displaying CPU-load (partly based on * Hydrogen's CPU-load-widget) * * Copyright (c) 2005-2014 Tobias Doerffel @@ -26,13 +26,13 @@ #include -#include "cpuload_widget.h" +#include "CPULoadWidget.h" #include "embed.h" #include "Engine.h" #include "Mixer.h" -cpuloadWidget::cpuloadWidget( QWidget * _parent ) : +CPULoadWidget::CPULoadWidget( QWidget * _parent ) : QWidget( _parent ), m_currentLoad( 0 ), m_temp(), @@ -55,14 +55,14 @@ cpuloadWidget::cpuloadWidget( QWidget * _parent ) : -cpuloadWidget::~cpuloadWidget() +CPULoadWidget::~CPULoadWidget() { } -void cpuloadWidget::paintEvent( QPaintEvent * ) +void CPULoadWidget::paintEvent( QPaintEvent * ) { if( m_changed == true ) { @@ -89,7 +89,7 @@ void cpuloadWidget::paintEvent( QPaintEvent * ) -void cpuloadWidget::updateCpuLoad() +void CPULoadWidget::updateCpuLoad() { // smooth load-values a bit int new_load = ( m_currentLoad + Engine::mixer()->cpuLoad() ) / 2; diff --git a/src/gui/widgets/combobox.cpp b/src/gui/widgets/ComboBox.cpp similarity index 90% rename from src/gui/widgets/combobox.cpp rename to src/gui/widgets/ComboBox.cpp index 18322ad02..950dbf70f 100644 --- a/src/gui/widgets/combobox.cpp +++ b/src/gui/widgets/ComboBox.cpp @@ -1,5 +1,5 @@ /* - * combobox.cpp - implementation of LMMS combobox + * Combobox.cpp - implementation of LMMS combobox * * Copyright (c) 2006-2014 Tobias Doerffel * Copyright (c) 2008-2009 Paul Giblock @@ -24,7 +24,7 @@ */ -#include "combobox.h" +#include "ComboBox.h" #include #include @@ -41,14 +41,14 @@ #include "MainWindow.h" -QPixmap * comboBox::s_background = NULL; -QPixmap * comboBox::s_arrow = NULL; -QPixmap * comboBox::s_arrowSelected = NULL; +QPixmap * ComboBox::s_background = NULL; +QPixmap * ComboBox::s_arrow = NULL; +QPixmap * ComboBox::s_arrowSelected = NULL; const int CB_ARROW_BTN_WIDTH = 20; -comboBox::comboBox( QWidget * _parent, const QString & _name ) : +ComboBox::ComboBox( QWidget * _parent, const QString & _name ) : QWidget( _parent ), IntModelView( new ComboBoxModel( NULL, QString::null, true ), this ), m_menu( this ), @@ -82,13 +82,13 @@ comboBox::comboBox( QWidget * _parent, const QString & _name ) : -comboBox::~comboBox() +ComboBox::~ComboBox() { } -QSize comboBox::sizeHint() const +QSize ComboBox::sizeHint() const { int maxTextWidth = 0; for( int i = 0; model() && i < model()->size(); ++i ) @@ -105,7 +105,7 @@ QSize comboBox::sizeHint() const -void comboBox::contextMenuEvent( QContextMenuEvent * event ) +void ComboBox::contextMenuEvent( QContextMenuEvent * event ) { if( model() == NULL || event->x() <= width() - CB_ARROW_BTN_WIDTH ) { @@ -121,7 +121,7 @@ void comboBox::contextMenuEvent( QContextMenuEvent * event ) -void comboBox::mousePressEvent( QMouseEvent* event ) +void ComboBox::mousePressEvent( QMouseEvent* event ) { if( model() == NULL ) { @@ -175,7 +175,7 @@ void comboBox::mousePressEvent( QMouseEvent* event ) -void comboBox::paintEvent( QPaintEvent * _pe ) +void ComboBox::paintEvent( QPaintEvent * _pe ) { QPainter p( this ); @@ -231,7 +231,7 @@ void comboBox::paintEvent( QPaintEvent * _pe ) -void comboBox::wheelEvent( QWheelEvent* event ) +void ComboBox::wheelEvent( QWheelEvent* event ) { if( model() ) { @@ -244,7 +244,7 @@ void comboBox::wheelEvent( QWheelEvent* event ) -void comboBox::setItem( QAction* item ) +void ComboBox::setItem( QAction* item ) { if( model() ) { diff --git a/src/gui/widgets/ControllerRackView.cpp b/src/gui/widgets/ControllerRackView.cpp index 945c0f65a..7ec3ab711 100644 --- a/src/gui/widgets/ControllerRackView.cpp +++ b/src/gui/widgets/ControllerRackView.cpp @@ -35,7 +35,7 @@ #include "Song.h" #include "embed.h" #include "MainWindow.h" -#include "group_box.h" +#include "GroupBox.h" #include "ControllerRackView.h" #include "ControllerView.h" #include "LfoController.h" diff --git a/src/gui/widgets/ControllerView.cpp b/src/gui/widgets/ControllerView.cpp index 0be6df17a..aaaa3ef1a 100644 --- a/src/gui/widgets/ControllerView.cpp +++ b/src/gui/widgets/ControllerView.cpp @@ -39,9 +39,9 @@ #include "gui_templates.h" #include "embed.h" #include "Engine.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "MainWindow.h" -#include "tooltip.h" +#include "ToolTip.h" ControllerView::ControllerView( Controller * _model, QWidget * _parent ) : diff --git a/src/gui/widgets/EffectRackView.cpp b/src/gui/widgets/EffectRackView.cpp index 6b0192317..b136b16f7 100644 --- a/src/gui/widgets/EffectRackView.cpp +++ b/src/gui/widgets/EffectRackView.cpp @@ -32,7 +32,7 @@ #include "EffectRackView.h" #include "EffectSelectDialog.h" #include "EffectView.h" -#include "group_box.h" +#include "GroupBox.h" EffectRackView::EffectRackView( EffectChain* model, QWidget* parent ) : @@ -42,7 +42,7 @@ EffectRackView::EffectRackView( EffectChain* model, QWidget* parent ) : QVBoxLayout* mainLayout = new QVBoxLayout( this ); mainLayout->setMargin( 5 ); - m_effectsGroupBox = new groupBox( tr( "EFFECTS CHAIN" ) ); + m_effectsGroupBox = new GroupBox( tr( "EFFECTS CHAIN" ) ); mainLayout->addWidget( m_effectsGroupBox ); QVBoxLayout* effectsLayout = new QVBoxLayout( m_effectsGroupBox ); diff --git a/src/gui/widgets/EffectView.cpp b/src/gui/widgets/EffectView.cpp index 7bf1560fc..466b2b0fa 100644 --- a/src/gui/widgets/EffectView.cpp +++ b/src/gui/widgets/EffectView.cpp @@ -38,11 +38,11 @@ #include "embed.h" #include "Engine.h" #include "gui_templates.h" -#include "knob.h" -#include "led_checkbox.h" +#include "Knob.h" +#include "LedCheckbox.h" #include "MainWindow.h" #include "TempoSyncKnob.h" -#include "tooltip.h" +#include "ToolTip.h" EffectView::EffectView( Effect * _model, QWidget * _parent ) : @@ -55,15 +55,15 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : // Disable effects that are of type "DummyEffect" bool isEnabled = !dynamic_cast( effect() ); - m_bypass = new ledCheckBox( this, "", isEnabled ? ledCheckBox::Green : ledCheckBox::Red ); + m_bypass = new LedCheckBox( this, "", isEnabled ? LedCheckBox::Green : LedCheckBox::Red ); m_bypass->move( 3, 3 ); m_bypass->setEnabled( isEnabled ); m_bypass->setWhatsThis( tr( "Toggles the effect on or off." ) ); - toolTip::add( m_bypass, tr( "On/Off" ) ); + ToolTip::add( m_bypass, tr( "On/Off" ) ); - m_wetDry = new knob( knobBright_26, this ); + m_wetDry = new Knob( knobBright_26, this ); m_wetDry->setLabel( tr( "W/D" ) ); m_wetDry->move( 27, 5 ); m_wetDry->setEnabled( isEnabled ); @@ -84,7 +84,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : "run the risk of clipping the tail on delay and reverb effects." ) ); - m_gate = new knob( knobBright_26, this ); + m_gate = new Knob( knobBright_26, this ); m_gate->setLabel( tr( "GATE" ) ); m_gate->move( 93, 5 ); m_gate->setEnabled( isEnabled ); diff --git a/src/gui/widgets/EnvelopeAndLfoView.cpp b/src/gui/widgets/EnvelopeAndLfoView.cpp index 44cbf2fbb..3571c7455 100644 --- a/src/gui/widgets/EnvelopeAndLfoView.cpp +++ b/src/gui/widgets/EnvelopeAndLfoView.cpp @@ -31,16 +31,16 @@ #include "embed.h" #include "Engine.h" #include "gui_templates.h" -#include "knob.h" -#include "led_checkbox.h" +#include "Knob.h" +#include "LedCheckbox.h" #include "Mixer.h" #include "DataFile.h" #include "Oscillator.h" -#include "pixmap_button.h" +#include "PixmapButton.h" #include "string_pair_drag.h" #include "TempoSyncKnob.h" -#include "text_float.h" -#include "tooltip.h" +#include "TextFloat.h" +#include "ToolTip.h" #include "Track.h" @@ -94,7 +94,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : s_lfoGraph = new QPixmap( embed::getIconPixmap( "lfo_graph" ) ); } - m_predelayKnob = new knob( knobBright_26, this ); + m_predelayKnob = new Knob( knobBright_26, this ); m_predelayKnob->setLabel( tr( "DEL" ) ); m_predelayKnob->move( PREDELAY_KNOB_X, ENV_KNOBS_Y ); m_predelayKnob->setHintText( tr( "Predelay:" ) + " ", "" ); @@ -104,7 +104,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "before start of actual envelope." ) ); - m_attackKnob = new knob( knobBright_26, this ); + m_attackKnob = new Knob( knobBright_26, this ); m_attackKnob->setLabel( tr( "ATT" ) ); m_attackKnob->move( ATTACK_KNOB_X, ENV_KNOBS_Y ); m_attackKnob->setHintText( tr( "Attack:" )+" ", "" ); @@ -115,7 +115,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "Choose a small value for instruments like pianos " "and a big value for strings." ) ); - m_holdKnob = new knob( knobBright_26, this ); + m_holdKnob = new Knob( knobBright_26, this ); m_holdKnob->setLabel( tr( "HOLD" ) ); m_holdKnob->move( HOLD_KNOB_X, ENV_KNOBS_Y ); m_holdKnob->setHintText( tr( "Hold:" ) + " ", "" ); @@ -125,7 +125,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "envelope holds attack-level before it begins to " "decrease to sustain-level." ) ); - m_decayKnob = new knob( knobBright_26, this ); + m_decayKnob = new Knob( knobBright_26, this ); m_decayKnob->setLabel( tr( "DEC" ) ); m_decayKnob->move( DECAY_KNOB_X, ENV_KNOBS_Y ); m_decayKnob->setHintText( tr( "Decay:" ) + " ", "" ); @@ -137,7 +137,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "like pianos." ) ); - m_sustainKnob = new knob( knobBright_26, this ); + m_sustainKnob = new Knob( knobBright_26, this ); m_sustainKnob->setLabel( tr( "SUST" ) ); m_sustainKnob->move( SUSTAIN_KNOB_X, ENV_KNOBS_Y ); m_sustainKnob->setHintText( tr( "Sustain:" ) + " ", "" ); @@ -148,7 +148,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "zero." ) ); - m_releaseKnob = new knob( knobBright_26, this ); + m_releaseKnob = new Knob( knobBright_26, this ); m_releaseKnob->setLabel( tr( "REL" ) ); m_releaseKnob->move( RELEASE_KNOB_X, ENV_KNOBS_Y ); m_releaseKnob->setHintText( tr( "Release:" ) + " ", "" ); @@ -160,7 +160,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "strings." ) ); - m_amountKnob = new knob( knobBright_26, this ); + m_amountKnob = new Knob( knobBright_26, this ); m_amountKnob->setLabel( tr( "AMT" ) ); m_amountKnob->move( AMOUNT_KNOB_X, ENV_GRAPH_Y ); m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" ); @@ -173,7 +173,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : - m_lfoPredelayKnob = new knob( knobBright_26, this ); + m_lfoPredelayKnob = new Knob( knobBright_26, this ); m_lfoPredelayKnob->setLabel( tr( "DEL" ) ); m_lfoPredelayKnob->move( LFO_PREDELAY_KNOB_X, LFO_KNOB_Y ); m_lfoPredelayKnob->setHintText( tr( "LFO predelay:" ) + " ", "" ); @@ -183,7 +183,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "LFO starts to oscillate." ) ); - m_lfoAttackKnob = new knob( knobBright_26, this ); + m_lfoAttackKnob = new Knob( knobBright_26, this ); m_lfoAttackKnob->setLabel( tr( "ATT" ) ); m_lfoAttackKnob->move( LFO_ATTACK_KNOB_X, LFO_KNOB_Y ); m_lfoAttackKnob->setHintText( tr( "LFO- attack:" ) + " ", "" ); @@ -203,7 +203,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "the faster will be your effect." ) ); - m_lfoAmountKnob = new knob( knobBright_26, this ); + m_lfoAmountKnob = new Knob( knobBright_26, this ); m_lfoAmountKnob->setLabel( tr( "AMT" ) ); m_lfoAmountKnob->move( LFO_AMOUNT_KNOB_X, LFO_KNOB_Y ); m_lfoAmountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" ); @@ -214,7 +214,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : "be influenced by this LFO." ) ); - pixmapButton * sin_lfo_btn = new pixmapButton( this, NULL ); + PixmapButton * sin_lfo_btn = new PixmapButton( this, NULL ); sin_lfo_btn->move( LFO_SHAPES_X, LFO_SHAPES_Y ); sin_lfo_btn->setActiveGraphic( embed::getIconPixmap( "sin_wave_active" ) ); @@ -223,7 +223,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : sin_lfo_btn->setWhatsThis( tr( "Click here for a sine-wave." ) ); - pixmapButton * triangle_lfo_btn = new pixmapButton( this, NULL ); + PixmapButton * triangle_lfo_btn = new PixmapButton( this, NULL ); triangle_lfo_btn->move( LFO_SHAPES_X+15, LFO_SHAPES_Y ); triangle_lfo_btn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); @@ -232,7 +232,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : triangle_lfo_btn->setWhatsThis( tr( "Click here for a triangle-wave." ) ); - pixmapButton * saw_lfo_btn = new pixmapButton( this, NULL ); + PixmapButton * saw_lfo_btn = new PixmapButton( this, NULL ); saw_lfo_btn->move( LFO_SHAPES_X+30, LFO_SHAPES_Y ); saw_lfo_btn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); @@ -241,7 +241,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : saw_lfo_btn->setWhatsThis( tr( "Click here for a saw-wave for current." ) ); - pixmapButton * sqr_lfo_btn = new pixmapButton( this, NULL ); + PixmapButton * sqr_lfo_btn = new PixmapButton( this, NULL ); sqr_lfo_btn->move( LFO_SHAPES_X+45, LFO_SHAPES_Y ); sqr_lfo_btn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); @@ -250,7 +250,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : sqr_lfo_btn->setWhatsThis( tr( "Click here for a square-wave." ) ); - m_userLfoBtn = new pixmapButton( this, NULL ); + m_userLfoBtn = new PixmapButton( this, NULL ); m_userLfoBtn->move( LFO_SHAPES_X+75, LFO_SHAPES_Y ); m_userLfoBtn->setActiveGraphic( embed::getIconPixmap( "usr_wave_active" ) ); @@ -264,7 +264,7 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : connect( m_userLfoBtn, SIGNAL( toggled( bool ) ), this, SLOT( lfoUserWaveChanged() ) ); - pixmapButton * random_lfo_btn = new pixmapButton( this, NULL ); + PixmapButton * random_lfo_btn = new PixmapButton( this, NULL ); random_lfo_btn->move( LFO_SHAPES_X+60, LFO_SHAPES_Y ); random_lfo_btn->setActiveGraphic( embed::getIconPixmap( "random_wave_active" ) ); @@ -281,23 +281,23 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : m_lfoWaveBtnGrp->addButton( m_userLfoBtn ); m_lfoWaveBtnGrp->addButton( random_lfo_btn ); - m_x100Cb = new ledCheckBox( tr( "FREQ x 100" ), this ); + m_x100Cb = new LedCheckBox( tr( "FREQ x 100" ), this ); m_x100Cb->setFont( pointSizeF( m_x100Cb->font(), 6.5 ) ); m_x100Cb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 36 ); m_x100Cb->setWhatsThis( tr( "Click here if the frequency of this LFO should be " "multiplied by 100." ) ); - toolTip::add( m_x100Cb, tr( "multiply LFO-frequency by 100" ) ); + ToolTip::add( m_x100Cb, tr( "multiply LFO-frequency by 100" ) ); - m_controlEnvAmountCb = new ledCheckBox( tr( "MODULATE ENV-AMOUNT" ), + m_controlEnvAmountCb = new LedCheckBox( tr( "MODULATE ENV-AMOUNT" ), this ); m_controlEnvAmountCb->move( LFO_PREDELAY_KNOB_X, LFO_GRAPH_Y + 54 ); m_controlEnvAmountCb->setFont( pointSizeF( m_controlEnvAmountCb->font(), 6.5 ) ); m_controlEnvAmountCb ->setWhatsThis( tr( "Click here to make the envelope-amount controlled by this " "LFO." ) ); - toolTip::add( m_controlEnvAmountCb, + ToolTip::add( m_controlEnvAmountCb, tr( "control envelope-amount by this LFO" ) ); @@ -580,7 +580,7 @@ void EnvelopeAndLfoView::lfoUserWaveChanged() { if( m_params->m_userWave.frames() <= 1 ) { - textFloat::displayMessage( tr( "Hint" ), + TextFloat::displayMessage( tr( "Hint" ), tr( "Drag a sample from somewhere and drop " "it in this window." ), embed::getIconPixmap( "hint" ), 3000 ); diff --git a/src/gui/widgets/fade_button.cpp b/src/gui/widgets/FadeButton.cpp similarity index 88% rename from src/gui/widgets/fade_button.cpp rename to src/gui/widgets/FadeButton.cpp index 7d7550d92..3495ae959 100644 --- a/src/gui/widgets/fade_button.cpp +++ b/src/gui/widgets/FadeButton.cpp @@ -1,5 +1,5 @@ /* - * fade_button.cpp - implementation of fade-button + * FadeButton.cpp - implementation of fade-button * * Copyright (c) 2005-2009 Tobias Doerffel * @@ -29,14 +29,14 @@ #include #include "embed.h" -#include "fade_button.h" +#include "FadeButton.h" #include "update_event.h" const float FadeDuration = 300; -fadeButton::fadeButton( const QColor & _normal_color, +FadeButton::FadeButton( const QColor & _normal_color, const QColor & _activated_color, QWidget * _parent ) : QAbstractButton( _parent ), m_stateTimer(), @@ -51,14 +51,14 @@ fadeButton::fadeButton( const QColor & _normal_color, -fadeButton::~fadeButton() +FadeButton::~FadeButton() { } -void fadeButton::activate() +void FadeButton::activate() { m_stateTimer.restart(); signalUpdate(); @@ -67,7 +67,7 @@ void fadeButton::activate() -void fadeButton::customEvent( QEvent * ) +void FadeButton::customEvent( QEvent * ) { update(); } @@ -75,7 +75,7 @@ void fadeButton::customEvent( QEvent * ) -void fadeButton::paintEvent( QPaintEvent * _pe ) +void FadeButton::paintEvent( QPaintEvent * _pe ) { QColor col = m_normalColor; if( m_stateTimer.elapsed() < FadeDuration ) @@ -110,7 +110,7 @@ void fadeButton::paintEvent( QPaintEvent * _pe ) -void fadeButton::signalUpdate() +void FadeButton::signalUpdate() { QApplication::postEvent( this, new updateEvent() ); } diff --git a/src/gui/widgets/fader.cpp b/src/gui/widgets/Fader.cpp similarity index 86% rename from src/gui/widgets/fader.cpp rename to src/gui/widgets/Fader.cpp index 69c2b023d..3015d976f 100644 --- a/src/gui/widgets/fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -1,5 +1,5 @@ /* - * fader.cpp - fader-widget used in mixer - partly taken from Hydrogen + * Fader.cpp - fader-widget used in mixer - partly taken from Hydrogen * * Copyright (c) 2008-2012 Tobias Doerffel * @@ -50,21 +50,21 @@ #include #include -#include "fader.h" +#include "Fader.h" #include "embed.h" #include "Engine.h" #include "CaptionMenu.h" #include "ConfigManager.h" -#include "text_float.h" +#include "TextFloat.h" #include "MainWindow.h" -textFloat * fader::s_textFloat = NULL; -QPixmap * fader::s_back = NULL; -QPixmap * fader::s_leds = NULL; -QPixmap * fader::s_knob = NULL; +TextFloat * Fader::s_textFloat = NULL; +QPixmap * Fader::s_back = NULL; +QPixmap * Fader::s_leds = NULL; +QPixmap * Fader::s_knob = NULL; -fader::fader( FloatModel * _model, const QString & _name, QWidget * _parent ) : +Fader::Fader( FloatModel * _model, const QString & _name, QWidget * _parent ) : QWidget( _parent ), FloatModelView( _model, this ), m_model( _model ), @@ -81,7 +81,7 @@ fader::fader( FloatModel * _model, const QString & _name, QWidget * _parent ) : { if( s_textFloat == NULL ) { - s_textFloat = new textFloat; + s_textFloat = new TextFloat; } if( ! s_back ) { @@ -106,14 +106,14 @@ fader::fader( FloatModel * _model, const QString & _name, QWidget * _parent ) : -fader::~fader() +Fader::~Fader() { } -void fader::contextMenuEvent( QContextMenuEvent * _ev ) +void Fader::contextMenuEvent( QContextMenuEvent * _ev ) { CaptionMenu contextMenu( windowTitle() ); addDefaultActions( &contextMenu ); @@ -124,7 +124,7 @@ void fader::contextMenuEvent( QContextMenuEvent * _ev ) -void fader::mouseMoveEvent( QMouseEvent *mouseEvent ) +void Fader::mouseMoveEvent( QMouseEvent *mouseEvent ) { if( m_moveStartPoint >= 0 ) { @@ -141,7 +141,7 @@ void fader::mouseMoveEvent( QMouseEvent *mouseEvent ) -void fader::mousePressEvent( QMouseEvent* mouseEvent ) +void Fader::mousePressEvent( QMouseEvent* mouseEvent ) { if( mouseEvent->button() == Qt::LeftButton && ! ( mouseEvent->modifiers() & Qt::ControlModifier ) ) @@ -169,7 +169,7 @@ void fader::mousePressEvent( QMouseEvent* mouseEvent ) -void fader::mouseDoubleClickEvent( QMouseEvent* mouseEvent ) +void Fader::mouseDoubleClickEvent( QMouseEvent* mouseEvent ) { bool ok; @@ -190,13 +190,13 @@ void fader::mouseDoubleClickEvent( QMouseEvent* mouseEvent ) -void fader::mouseReleaseEvent( QMouseEvent * _me ) +void Fader::mouseReleaseEvent( QMouseEvent * _me ) { s_textFloat->hide(); } -void fader::wheelEvent ( QWheelEvent *ev ) +void Fader::wheelEvent ( QWheelEvent *ev ) { ev->accept(); @@ -217,7 +217,7 @@ void fader::wheelEvent ( QWheelEvent *ev ) /// /// Set peak value (0.0 .. 1.0) /// -void fader::setPeak( float fPeak, float &targetPeak, float &persistentPeak, QTime &lastPeakTime ) +void Fader::setPeak( float fPeak, float &targetPeak, float &persistentPeak, QTime &lastPeakTime ) { if( fPeak < m_fMinPeak ) { @@ -248,14 +248,14 @@ void fader::setPeak( float fPeak, float &targetPeak, float &persistentPeak, QTim -void fader::setPeak_L( float fPeak ) +void Fader::setPeak_L( float fPeak ) { setPeak( fPeak, m_fPeakValue_L, m_persistentPeak_L, m_lastPeakTime_L ); } -void fader::setPeak_R( float fPeak ) +void Fader::setPeak_R( float fPeak ) { setPeak( fPeak, m_fPeakValue_R, m_persistentPeak_R, m_lastPeakTime_R ); } @@ -263,7 +263,7 @@ void fader::setPeak_R( float fPeak ) // update tooltip showing value and adjust position while changing fader value -void fader::updateTextFloat() +void Fader::updateTextFloat() { if( ConfigManager::inst()->value( "app", "displaydbv" ).toInt() ) { @@ -278,7 +278,7 @@ void fader::updateTextFloat() } -inline int fader::calculateDisplayPeak( float fPeak ) +inline int Fader::calculateDisplayPeak( float fPeak ) { int peak = (int)( 116 - ( fPeak / ( m_fMaxPeak - m_fMinPeak ) ) * 116.0 ); @@ -286,7 +286,7 @@ inline int fader::calculateDisplayPeak( float fPeak ) else return peak; } -void fader::paintEvent( QPaintEvent * ev) +void Fader::paintEvent( QPaintEvent * ev) { QPainter painter(this); @@ -324,22 +324,22 @@ void fader::paintEvent( QPaintEvent * ev) } -QColor fader::peakGreen() const +QColor Fader::peakGreen() const { return m_peakGreen; } -QColor fader::peakRed() const +QColor Fader::peakRed() const { return m_peakRed; } -void fader::setPeakGreen( const QColor & c ) +void Fader::setPeakGreen( const QColor & c ) { m_peakGreen = c; } -void fader::setPeakRed( const QColor & c ) +void Fader::setPeakRed( const QColor & c ) { m_peakRed = c; } diff --git a/src/gui/widgets/FxLine.cpp b/src/gui/widgets/FxLine.cpp index cc394acd9..36baa782f 100644 --- a/src/gui/widgets/FxLine.cpp +++ b/src/gui/widgets/FxLine.cpp @@ -62,7 +62,7 @@ FxLine::FxLine( QWidget * _parent, FxMixerView * _mv, int _channelIndex) : setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) ); // mixer sends knob - m_sendKnob = new knob( knobBright_26, this, tr("Channel send amount") ); + m_sendKnob = new Knob( knobBright_26, this, tr("Channel send amount") ); m_sendKnob->move( 3, 22 ); m_sendKnob->setVisible(false); diff --git a/src/gui/widgets/graph.cpp b/src/gui/widgets/Graph.cpp similarity index 94% rename from src/gui/widgets/graph.cpp rename to src/gui/widgets/Graph.cpp index fcab26f1c..fa3607906 100644 --- a/src/gui/widgets/graph.cpp +++ b/src/gui/widgets/Graph.cpp @@ -1,5 +1,5 @@ /* - * graph.cpp - a QT widget for displaying and manipulating waveforms + * Graph.cpp - a QT widget for displaying and manipulating waveforms * * Copyright (c) 2006-2007 Andreas Brandmaier * 2008 Paul Giblock @@ -27,14 +27,14 @@ #include #include -#include "graph.h" +#include "Graph.h" #include "string_pair_drag.h" #include "SampleBuffer.h" #include "Oscillator.h" #include "Engine.h" -graph::graph( QWidget * _parent, graphStyle _style, int _width, +Graph::Graph( QWidget * _parent, graphStyle _style, int _width, int _height ) : QWidget( _parent ), /* TODO: size, background? */ @@ -58,18 +58,18 @@ graph::graph( QWidget * _parent, graphStyle _style, int _width, } -graph::~graph() +Graph::~Graph() { } -void graph::setForeground( const QPixmap &_pixmap ) +void Graph::setForeground( const QPixmap &_pixmap ) { m_foreground = _pixmap; } -void graph::setGraphColor( QColor _graphcol ) +void Graph::setGraphColor( QColor _graphcol ) { m_graphColor = _graphcol; } @@ -102,7 +102,7 @@ void graph::loadSampleFromFile( const QString & _filename ) -void graph::mouseMoveEvent ( QMouseEvent * _me ) +void Graph::mouseMoveEvent ( QMouseEvent * _me ) { // get position int x = _me->x(); @@ -155,7 +155,7 @@ void graph::mouseMoveEvent ( QMouseEvent * _me ) -void graph::mousePressEvent( QMouseEvent * _me ) +void Graph::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton ) { @@ -189,7 +189,7 @@ void graph::mousePressEvent( QMouseEvent * _me ) } } -void graph::drawLineAt( int _x, int _y, int _lastx ) +void Graph::drawLineAt( int _x, int _y, int _lastx ) { float minVal = model()->minValue(); float maxVal = model()->maxValue(); @@ -228,7 +228,7 @@ void graph::drawLineAt( int _x, int _y, int _lastx ) model()->samplesChanged( start, end ); } -void graph::changeSampleAt( int _x, int _y ) +void Graph::changeSampleAt( int _x, int _y ) { float minVal = model()->minValue(); float maxVal = model()->maxValue(); @@ -255,7 +255,7 @@ void graph::changeSampleAt( int _x, int _y ) -void graph::mouseReleaseEvent( QMouseEvent * _me ) +void Graph::mouseReleaseEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton ) { @@ -268,7 +268,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me ) -void graph::paintEvent( QPaintEvent * ) +void Graph::paintEvent( QPaintEvent * ) { QPainter p( this ); @@ -289,7 +289,7 @@ void graph::paintEvent( QPaintEvent * ) switch( m_graphStyle ) { - case graph::LinearStyle: + case Graph::LinearStyle: p.setRenderHints( QPainter::Antialiasing, true ); for( int i=0; i < length; i++ ) @@ -313,7 +313,7 @@ void graph::paintEvent( QPaintEvent * ) break; - case graph::NearestStyle: + case Graph::NearestStyle: for( int i=0; i < length; i++ ) { p.drawLine(2+static_cast(i*xscale), @@ -334,7 +334,7 @@ void graph::paintEvent( QPaintEvent * ) 2+static_cast( ( (*samps)[length] - maxVal ) * yscale ) ); break; - case graph::LinearNonCyclicStyle: + case Graph::LinearNonCyclicStyle: p.setRenderHints( QPainter::Antialiasing, true ); for( int i=0; i < length; i++ ) @@ -353,7 +353,7 @@ void graph::paintEvent( QPaintEvent * ) p.setRenderHints( QPainter::Antialiasing, false ); break; - case graph::BarStyle: + case Graph::BarStyle: for( int i=0; i <= length; i++ ) { p.fillRect( 2+static_cast( i*xscale ), @@ -391,7 +391,7 @@ void graph::paintEvent( QPaintEvent * ) -void graph::dropEvent( QDropEvent * _de ) +void Graph::dropEvent( QDropEvent * _de ) { QString type = stringPairDrag::decodeKey( _de ); QString value = stringPairDrag::decodeValue( _de ); @@ -404,7 +404,7 @@ void graph::dropEvent( QDropEvent * _de ) } } -void graph::dragEnterEvent( QDragEnterEvent * _dee ) +void Graph::dragEnterEvent( QDragEnterEvent * _dee ) { if( stringPairDrag::processDragEnterEvent( _dee, QString( "samplefile" ) ) == false ) @@ -415,7 +415,7 @@ void graph::dragEnterEvent( QDragEnterEvent * _dee ) -void graph::modelChanged() +void Graph::modelChanged() { graphModel * gModel = castModel(); @@ -427,14 +427,14 @@ void graph::modelChanged() } -void graph::updateGraph( int _startPos, int _endPos ) +void Graph::updateGraph( int _startPos, int _endPos ) { // Can optimize by only drawing changed position update(); } -void graph::updateGraph() +void Graph::updateGraph() { updateGraph( 0, model()->length() - 1 ); } diff --git a/src/gui/widgets/group_box.cpp b/src/gui/widgets/GroupBox.cpp similarity index 89% rename from src/gui/widgets/group_box.cpp rename to src/gui/widgets/GroupBox.cpp index e5200b923..b6145076f 100644 --- a/src/gui/widgets/group_box.cpp +++ b/src/gui/widgets/GroupBox.cpp @@ -1,5 +1,5 @@ /* - * group_box.cpp - groupbox for LMMS + * GroupBox.cpp - groupbox for LMMS * * Copyright (c) 2005-2009 Tobias Doerffel * @@ -31,13 +31,13 @@ #include -#include "group_box.h" +#include "GroupBox.h" #include "embed.h" #include "gui_templates.h" -groupBox::groupBox( const QString & _caption, QWidget * _parent ) : +GroupBox::GroupBox( const QString & _caption, QWidget * _parent ) : QWidget( _parent ), BoolModelView( NULL, this ), m_caption( _caption ), @@ -45,7 +45,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) : { updatePixmap(); - m_led = new pixmapButton( this, _caption ); + m_led = new PixmapButton( this, _caption ); m_led->setCheckable( true ); m_led->move( 3, 0 ); m_led->setActiveGraphic( embed::getIconPixmap( "led_green" ) ); @@ -59,7 +59,7 @@ groupBox::groupBox( const QString & _caption, QWidget * _parent ) : -groupBox::~groupBox() +GroupBox::~GroupBox() { delete m_led; } @@ -67,7 +67,7 @@ groupBox::~groupBox() -void groupBox::modelChanged() +void GroupBox::modelChanged() { m_led->setModel( model() ); } @@ -75,7 +75,7 @@ void groupBox::modelChanged() -void groupBox::mousePressEvent( QMouseEvent * _me ) +void GroupBox::mousePressEvent( QMouseEvent * _me ) { if( _me->y() > 1 && _me->y() < 13 && _me->button() == Qt::LeftButton ) { @@ -86,7 +86,7 @@ void groupBox::mousePressEvent( QMouseEvent * _me ) -void groupBox::resizeEvent( QResizeEvent * _ev ) +void GroupBox::resizeEvent( QResizeEvent * _ev ) { updatePixmap(); QWidget::resizeEvent( _ev ); @@ -94,7 +94,7 @@ void groupBox::resizeEvent( QResizeEvent * _ev ) -void groupBox::updatePixmap() +void GroupBox::updatePixmap() { QColor bg_color = QApplication::palette().color( QPalette::Active, QPalette::Background ); diff --git a/src/gui/widgets/InstrumentFunctionViews.cpp b/src/gui/widgets/InstrumentFunctionViews.cpp index c93e4160c..d0f55f2c3 100644 --- a/src/gui/widgets/InstrumentFunctionViews.cpp +++ b/src/gui/widgets/InstrumentFunctionViews.cpp @@ -27,24 +27,24 @@ #include "InstrumentFunctions.h" #include "InstrumentFunctionViews.h" -#include "combobox.h" +#include "ComboBox.h" #include "embed.h" #include "Engine.h" -#include "group_box.h" +#include "GroupBox.h" #include "gui_templates.h" -#include "knob.h" -#include "pixmap_button.h" +#include "Knob.h" +#include "PixmapButton.h" #include "TempoSyncKnob.h" -#include "tooltip.h" +#include "ToolTip.h" InstrumentFunctionNoteStackingView::InstrumentFunctionNoteStackingView( InstrumentFunctionNoteStacking* cc, QWidget* parent ) : QWidget( parent ), ModelView( NULL, this ), m_cc( cc ), - m_chordsGroupBox( new groupBox( tr( "STACKING" ) ) ), - m_chordsComboBox( new comboBox() ), - m_chordRangeKnob( new knob( knobBright_26 ) ) + m_chordsGroupBox( new GroupBox( tr( "STACKING" ) ) ), + m_chordsComboBox( new ComboBox() ), + m_chordRangeKnob( new Knob( knobBright_26 ) ) { QHBoxLayout* topLayout = new QHBoxLayout( this ); topLayout->setMargin( 0 ); @@ -100,13 +100,13 @@ InstrumentFunctionArpeggioView::InstrumentFunctionArpeggioView( InstrumentFuncti QWidget( parent ), ModelView( NULL, this ), m_a( arp ), - m_arpGroupBox( new groupBox( tr( "ARPEGGIO" ) ) ), - m_arpComboBox( new comboBox() ), - m_arpRangeKnob( new knob( knobBright_26 ) ), + m_arpGroupBox( new GroupBox( tr( "ARPEGGIO" ) ) ), + m_arpComboBox( new ComboBox() ), + m_arpRangeKnob( new Knob( knobBright_26 ) ), m_arpTimeKnob( new TempoSyncKnob( knobBright_26 ) ), - m_arpGateKnob( new knob( knobBright_26 ) ), - m_arpDirectionComboBox( new comboBox() ), - m_arpModeComboBox( new comboBox() ) + m_arpGateKnob( new Knob( knobBright_26 ) ), + m_arpDirectionComboBox( new ComboBox() ), + m_arpModeComboBox( new ComboBox() ) { QHBoxLayout* topLayout = new QHBoxLayout( this ); topLayout->setMargin( 0 ); diff --git a/src/gui/widgets/InstrumentMidiIOView.cpp b/src/gui/widgets/InstrumentMidiIOView.cpp index c741b4751..e312b8096 100644 --- a/src/gui/widgets/InstrumentMidiIOView.cpp +++ b/src/gui/widgets/InstrumentMidiIOView.cpp @@ -31,12 +31,12 @@ #include "MidiPortMenu.h" #include "Engine.h" #include "embed.h" -#include "group_box.h" +#include "GroupBox.h" #include "gui_templates.h" #include "LcdSpinBox.h" #include "MidiClient.h" #include "Mixer.h" -#include "tooltip.h" +#include "ToolTip.h" @@ -48,7 +48,7 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setMargin( 5 ); - m_midiInputGroupBox = new groupBox( tr( "ENABLE MIDI INPUT" ) ); + m_midiInputGroupBox = new GroupBox( tr( "ENABLE MIDI INPUT" ) ); layout->addWidget( m_midiInputGroupBox ); QHBoxLayout* midiInputLayout = new QHBoxLayout( m_midiInputGroupBox ); @@ -76,7 +76,7 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : - m_midiOutputGroupBox = new groupBox( tr( "ENABLE MIDI OUTPUT" ) ); + m_midiOutputGroupBox = new GroupBox( tr( "ENABLE MIDI OUTPUT" ) ); layout->addWidget( m_midiOutputGroupBox ); QHBoxLayout* midiOutputLayout = new QHBoxLayout( m_midiOutputGroupBox ); @@ -138,7 +138,7 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : #define PROVIDE_CUSTOM_BASE_VELOCITY_UI #ifdef PROVIDE_CUSTOM_BASE_VELOCITY_UI - groupBox* baseVelocityGroupBox = new groupBox( tr( "CUSTOM BASE VELOCITY" ) ); + GroupBox* baseVelocityGroupBox = new GroupBox( tr( "CUSTOM BASE VELOCITY" ) ); layout->addWidget( baseVelocityGroupBox ); QVBoxLayout* baseVelocityLayout = new QVBoxLayout( baseVelocityGroupBox ); diff --git a/src/gui/widgets/InstrumentSoundShapingView.cpp b/src/gui/widgets/InstrumentSoundShapingView.cpp index ffc794711..b5c923e21 100644 --- a/src/gui/widgets/InstrumentSoundShapingView.cpp +++ b/src/gui/widgets/InstrumentSoundShapingView.cpp @@ -27,11 +27,11 @@ #include "InstrumentSoundShapingView.h" #include "EnvelopeAndLfoParameters.h" #include "EnvelopeAndLfoView.h" -#include "combobox.h" -#include "group_box.h" +#include "ComboBox.h" +#include "GroupBox.h" #include "gui_templates.h" -#include "knob.h" -#include "tab_widget.h" +#include "Knob.h" +#include "TabWidget.h" @@ -52,7 +52,7 @@ InstrumentSoundShapingView::InstrumentSoundShapingView( QWidget * _parent ) : ModelView( NULL, this ), m_ss( NULL ) { - m_targetsTabWidget = new tabWidget( tr( "TARGET" ), this ); + m_targetsTabWidget = new TabWidget( tr( "TARGET" ), this ); m_targetsTabWidget->setGeometry( TARGETS_TABWIDGET_X, TARGETS_TABWIDGET_Y, TARGETS_TABWIDGET_WIDTH, @@ -80,13 +80,13 @@ InstrumentSoundShapingView::InstrumentSoundShapingView( QWidget * _parent ) : } - m_filterGroupBox = new groupBox( tr( "FILTER" ), this ); + m_filterGroupBox = new GroupBox( tr( "FILTER" ), this ); m_filterGroupBox->setGeometry( FILTER_GROUPBOX_X, FILTER_GROUPBOX_Y, FILTER_GROUPBOX_WIDTH, FILTER_GROUPBOX_HEIGHT ); - m_filterComboBox = new comboBox( m_filterGroupBox ); + m_filterComboBox = new ComboBox( m_filterGroupBox ); m_filterComboBox->setGeometry( 14, 22, 120, 22 ); m_filterComboBox->setFont( pointSize<8>( m_filterComboBox->font() ) ); @@ -96,7 +96,7 @@ InstrumentSoundShapingView::InstrumentSoundShapingView( QWidget * _parent ) : "for changing the characteristics of a sound." ) ); - m_filterCutKnob = new knob( knobBright_26, m_filterGroupBox ); + m_filterCutKnob = new Knob( knobBright_26, m_filterGroupBox ); m_filterCutKnob->setLabel( tr( "FREQ" ) ); m_filterCutKnob->move( 140, 18 ); m_filterCutKnob->setHintText( tr( "cutoff frequency:" ) + " ", " " + tr( "Hz" ) ); @@ -109,7 +109,7 @@ InstrumentSoundShapingView::InstrumentSoundShapingView( QWidget * _parent ) : "frequencies below cutoff frequency, and so on..." ) ); - m_filterResKnob = new knob( knobBright_26, m_filterGroupBox ); + m_filterResKnob = new Knob( knobBright_26, m_filterGroupBox ); m_filterResKnob->setLabel( tr( "RESO" ) ); m_filterResKnob->move( 196, 18 ); m_filterResKnob->setHintText( tr( "Resonance:" ) + " ", "" ); diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/Knob.cpp similarity index 87% rename from src/gui/widgets/knob.cpp rename to src/gui/widgets/Knob.cpp index 8fda84463..da2670302 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/Knob.cpp @@ -1,5 +1,5 @@ /* - * knob.cpp - powerful knob-widget + * Knob.cpp - powerful knob-widget * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -36,7 +36,7 @@ #endif #include "lmms_math.h" -#include "knob.h" +#include "Knob.h" #include "CaptionMenu.h" #include "ConfigManager.h" #include "ControllerConnection.h" @@ -48,10 +48,10 @@ #include "Song.h" #include "string_pair_drag.h" #include "templates.h" -#include "text_float.h" +#include "TextFloat.h" -textFloat * knob::s_textFloat = NULL; +TextFloat * Knob::s_textFloat = NULL; @@ -66,14 +66,14 @@ textFloat * knob::s_textFloat = NULL; m_buttonPressed( false ), \ m_angle( -10 ) -knob::knob( knobTypes _knob_num, QWidget * _parent, const QString & _name ) : +Knob::Knob( knobTypes _knob_num, QWidget * _parent, const QString & _name ) : DEFAULT_KNOB_INITIALIZER_LIST, m_knobNum( _knob_num ) { initUi( _name ); } -knob::knob( QWidget * _parent, const QString & _name ) : +Knob::Knob( QWidget * _parent, const QString & _name ) : DEFAULT_KNOB_INITIALIZER_LIST, m_knobNum( knobBright_26 ) { @@ -85,11 +85,11 @@ knob::knob( QWidget * _parent, const QString & _name ) : -void knob::initUi( const QString & _name ) +void Knob::initUi( const QString & _name ) { if( s_textFloat == NULL ) { - s_textFloat = new textFloat; + s_textFloat = new TextFloat; } setWindowTitle( _name ); @@ -105,7 +105,7 @@ void knob::initUi( const QString & _name ) -void knob::onKnobNumUpdated() +void Knob::onKnobNumUpdated() { if( m_knobNum != knobStyled ) { @@ -119,7 +119,7 @@ void knob::onKnobNumUpdated() -knob::~knob() +Knob::~Knob() { if( m_knobPixmap ) { @@ -130,7 +130,7 @@ knob::~knob() -void knob::setLabel( const QString & _txt ) +void Knob::setLabel( const QString & _txt ) { m_label = _txt; if( m_knobPixmap ) @@ -145,7 +145,7 @@ void knob::setLabel( const QString & _txt ) -void knob::setTotalAngle( float _angle ) +void Knob::setTotalAngle( float _angle ) { if( _angle < 10.0 ) { @@ -162,28 +162,28 @@ void knob::setTotalAngle( float _angle ) -float knob::innerRadius() const +float Knob::innerRadius() const { return m_innerRadius; } -void knob::setInnerRadius( float _r ) +void Knob::setInnerRadius( float _r ) { m_innerRadius = _r; } -float knob::outerRadius() const +float Knob::outerRadius() const { return m_outerRadius; } -void knob::setOuterRadius( float _r ) +void Knob::setOuterRadius( float _r ) { m_outerRadius = _r; } @@ -191,7 +191,7 @@ void knob::setOuterRadius( float _r ) -knobTypes knob::knobNum() const +knobTypes Knob::knobNum() const { return m_knobNum; } @@ -199,7 +199,7 @@ knobTypes knob::knobNum() const -void knob::setknobNum( knobTypes _k ) +void Knob::setknobNum( knobTypes _k ) { if( m_knobNum != _k ) { @@ -211,91 +211,91 @@ void knob::setknobNum( knobTypes _k ) -QPointF knob::centerPoint() const +QPointF Knob::centerPoint() const { return m_centerPoint; } -float knob::centerPointX() const +float Knob::centerPointX() const { return m_centerPoint.x(); } -void knob::setCenterPointX( float _c ) +void Knob::setCenterPointX( float _c ) { m_centerPoint.setX( _c ); } -float knob::centerPointY() const +float Knob::centerPointY() const { return m_centerPoint.y(); } -void knob::setCenterPointY( float _c ) +void Knob::setCenterPointY( float _c ) { m_centerPoint.setY( _c ); } -float knob::lineWidth() const +float Knob::lineWidth() const { return m_lineWidth; } -void knob::setLineWidth( float _w ) +void Knob::setLineWidth( float _w ) { m_lineWidth = _w; } -QColor knob::outerColor() const +QColor Knob::outerColor() const { return m_outerColor; } -void knob::setOuterColor( const QColor & _c ) +void Knob::setOuterColor( const QColor & _c ) { m_outerColor = _c; } -QColor knob::lineColor() const +QColor Knob::lineColor() const { return m_lineColor; } -void knob::setlineColor( const QColor & _c ) +void Knob::setlineColor( const QColor & _c ) { m_lineColor = _c; } -QColor knob::arcColor() const +QColor Knob::arcColor() const { return m_arcColor; } -void knob::setarcColor( const QColor & _c ) +void Knob::setarcColor( const QColor & _c ) { m_arcColor = _c; } @@ -303,7 +303,7 @@ void knob::setarcColor( const QColor & _c ) -QLineF knob::calculateLine( const QPointF & _mid, float _radius, float _innerRadius ) const +QLineF Knob::calculateLine( const QPointF & _mid, float _radius, float _innerRadius ) const { const float rarc = m_angle * F_PI / 180.0; const float ca = cos( rarc ); @@ -315,7 +315,7 @@ QLineF knob::calculateLine( const QPointF & _mid, float _radius, float _innerRad -bool knob::updateAngle() +bool Knob::updateAngle() { int angle = 0; if( model() && model()->maxValue() != model()->minValue() ) @@ -333,7 +333,7 @@ bool knob::updateAngle() -void knob::drawKnob( QPainter * _p ) +void Knob::drawKnob( QPainter * _p ) { if( updateAngle() == false && !m_cache.isNull() ) { @@ -454,7 +454,7 @@ void knob::drawKnob( QPainter * _p ) _p->drawImage( 0, 0, m_cache ); } -float knob::getValue( const QPoint & _p ) +float Knob::getValue( const QPoint & _p ) { float value; @@ -473,7 +473,7 @@ float knob::getValue( const QPoint & _p ) -void knob::contextMenuEvent( QContextMenuEvent * ) +void Knob::contextMenuEvent( QContextMenuEvent * ) { // for the case, the user clicked right while pressing left mouse- // button, the context-menu appears while mouse-cursor is still hidden @@ -492,14 +492,14 @@ void knob::contextMenuEvent( QContextMenuEvent * ) } -void knob::toggleScale() +void Knob::toggleScale() { model()->setScaleLogarithmic( ! model()->isScaleLogarithmic() ); } -void knob::dragEnterEvent( QDragEnterEvent * _dee ) +void Knob::dragEnterEvent( QDragEnterEvent * _dee ) { stringPairDrag::processDragEnterEvent( _dee, "float_value," "automatable_model" ); @@ -508,7 +508,7 @@ void knob::dragEnterEvent( QDragEnterEvent * _dee ) -void knob::dropEvent( QDropEvent * _de ) +void Knob::dropEvent( QDropEvent * _de ) { QString type = stringPairDrag::decodeKey( _de ); QString val = stringPairDrag::decodeValue( _de ); @@ -533,7 +533,7 @@ void knob::dropEvent( QDropEvent * _de ) -void knob::mousePressEvent( QMouseEvent * _me ) +void Knob::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton && ! ( _me->modifiers() & Qt::ControlModifier ) && @@ -576,7 +576,7 @@ void knob::mousePressEvent( QMouseEvent * _me ) -void knob::mouseMoveEvent( QMouseEvent * _me ) +void Knob::mouseMoveEvent( QMouseEvent * _me ) { if( m_buttonPressed && _me->pos() != m_origMousePos ) { @@ -592,7 +592,7 @@ void knob::mouseMoveEvent( QMouseEvent * _me ) -void knob::mouseReleaseEvent( QMouseEvent* event ) +void Knob::mouseReleaseEvent( QMouseEvent* event ) { if( event && event->button() == Qt::LeftButton ) { @@ -615,7 +615,7 @@ void knob::mouseReleaseEvent( QMouseEvent* event ) -void knob::focusOutEvent( QFocusEvent * _fe ) +void Knob::focusOutEvent( QFocusEvent * _fe ) { // make sure we don't loose mouse release event mouseReleaseEvent( NULL ); @@ -625,7 +625,7 @@ void knob::focusOutEvent( QFocusEvent * _fe ) -void knob::mouseDoubleClickEvent( QMouseEvent * ) +void Knob::mouseDoubleClickEvent( QMouseEvent * ) { enterValue(); } @@ -633,7 +633,7 @@ void knob::mouseDoubleClickEvent( QMouseEvent * ) -void knob::paintEvent( QPaintEvent * _me ) +void Knob::paintEvent( QPaintEvent * _me ) { QPainter p( this ); @@ -655,7 +655,7 @@ void knob::paintEvent( QPaintEvent * _me ) -void knob::wheelEvent( QWheelEvent * _we ) +void Knob::wheelEvent( QWheelEvent * _we ) { _we->accept(); const int inc = ( _we->delta() > 0 ) ? 1 : -1; @@ -672,7 +672,7 @@ void knob::wheelEvent( QWheelEvent * _we ) -void knob::setPosition( const QPoint & _p ) +void Knob::setPosition( const QPoint & _p ) { const float value = getValue( _p ) + m_leftOver; const float step = model()->step(); @@ -715,7 +715,7 @@ void knob::setPosition( const QPoint & _p ) -void knob::enterValue() +void Knob::enterValue() { bool ok; float new_val; @@ -759,7 +759,7 @@ void knob::enterValue() -void knob::friendlyUpdate() +void Knob::friendlyUpdate() { if( model()->controllerConnection() == NULL || model()->controllerConnection()->getController()->frequentUpdates() == false || @@ -772,7 +772,7 @@ void knob::friendlyUpdate() -QString knob::displayValue() const +QString Knob::displayValue() const { if( isVolumeKnob() && ConfigManager::inst()->value( "app", "displaydbv" ).toInt() ) @@ -788,7 +788,7 @@ QString knob::displayValue() const -void knob::doConnections() +void Knob::doConnections() { if( model() != NULL ) { @@ -803,7 +803,7 @@ void knob::doConnections() -void knob::displayHelp() +void Knob::displayHelp() { QWhatsThis::showText( mapToGlobal( rect().bottomRight() ), whatsThis() ); diff --git a/src/gui/widgets/LadspaControlView.cpp b/src/gui/widgets/LadspaControlView.cpp index c782712f5..558237ba6 100644 --- a/src/gui/widgets/LadspaControlView.cpp +++ b/src/gui/widgets/LadspaControlView.cpp @@ -28,9 +28,9 @@ #include "LadspaControl.h" #include "LadspaControlView.h" #include "LadspaBase.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "TempoSyncKnob.h" -#include "tooltip.h" +#include "ToolTip.h" LadspaControlView::LadspaControlView( QWidget * _parent, @@ -43,24 +43,24 @@ LadspaControlView::LadspaControlView( QWidget * _parent, layout->setMargin( 0 ); layout->setSpacing( 0 ); - ledCheckBox * link = NULL; + LedCheckBox * link = NULL; if( m_ctl->m_link ) { - link = new ledCheckBox( "", this ); + link = new LedCheckBox( "", this ); link->setModel( &m_ctl->m_linkEnabledModel ); - toolTip::add( link, tr( "Link channels" ) ); + ToolTip::add( link, tr( "Link channels" ) ); layout->addWidget( link ); } - knob * knb = NULL; + Knob * knb = NULL; switch( m_ctl->port()->data_type ) { case TOGGLED: { - ledCheckBox * toggle = new ledCheckBox( - m_ctl->port()->name, this, QString::null, ledCheckBox::Green ); + LedCheckBox * toggle = new LedCheckBox( + m_ctl->port()->name, this, QString::null, LedCheckBox::Green ); toggle->setModel( m_ctl->toggledModel() ); layout->addWidget( toggle ); if( link != NULL ) @@ -78,7 +78,7 @@ LadspaControlView::LadspaControlView( QWidget * _parent, case INTEGER: case FLOATING: - knb = new knob( knobBright_26, this, m_ctl->port()->name ); + knb = new Knob( knobBright_26, this, m_ctl->port()->name ); break; case TIME: diff --git a/src/gui/widgets/led_checkbox.cpp b/src/gui/widgets/LedCheckbox.cpp similarity index 84% rename from src/gui/widgets/led_checkbox.cpp rename to src/gui/widgets/LedCheckbox.cpp index ec97c447f..cce0b975b 100644 --- a/src/gui/widgets/led_checkbox.cpp +++ b/src/gui/widgets/LedCheckbox.cpp @@ -1,5 +1,5 @@ /* - * led_checkbox.cpp - class ledCheckBox, an improved QCheckBox + * LedCheckbox.cpp - class LedCheckBox, an improved QCheckBox * * Copyright (c) 2005-2014 Tobias Doerffel * @@ -26,12 +26,12 @@ #include #include -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "embed.h" #include "gui_templates.h" -static const QString names[ledCheckBox::NumColors] = +static const QString names[LedCheckBox::NumColors] = { "led_yellow", "led_green", "led_red" } ; @@ -43,7 +43,7 @@ static const QString names[ledCheckBox::NumColors] = #define DEFAULT_LEDCHECKBOX_INITIALIZER_LIST \ AutomatableButton( _parent, _name ) -ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent, +LedCheckBox::LedCheckBox( const QString & _text, QWidget * _parent, const QString & _name, LedColors _color ) : DEFAULT_LEDCHECKBOX_INITIALIZER_LIST, m_text( _text ) @@ -54,7 +54,7 @@ ledCheckBox::ledCheckBox( const QString & _text, QWidget * _parent, -ledCheckBox::ledCheckBox( QWidget * _parent, +LedCheckBox::LedCheckBox( QWidget * _parent, const QString & _name, LedColors _color ) : DEFAULT_LEDCHECKBOX_INITIALIZER_LIST { @@ -65,7 +65,7 @@ ledCheckBox::ledCheckBox( QWidget * _parent, -ledCheckBox::~ledCheckBox() +LedCheckBox::~LedCheckBox() { delete m_ledOnPixmap; delete m_ledOffPixmap; @@ -74,7 +74,7 @@ ledCheckBox::~ledCheckBox() -void ledCheckBox::setText( const QString &s ) +void LedCheckBox::setText( const QString &s ) { m_text = s; onTextUpdated(); @@ -83,7 +83,7 @@ void ledCheckBox::setText( const QString &s ) -void ledCheckBox::paintEvent( QPaintEvent * ) +void LedCheckBox::paintEvent( QPaintEvent * ) { QPainter p( this ); p.setFont( pointSize<7>( font() ) ); @@ -106,7 +106,7 @@ void ledCheckBox::paintEvent( QPaintEvent * ) -void ledCheckBox::initUi( LedColors _color ) +void LedCheckBox::initUi( LedColors _color ) { setCheckable( true ); @@ -125,7 +125,7 @@ void ledCheckBox::initUi( LedColors _color ) -void ledCheckBox::onTextUpdated() +void LedCheckBox::onTextUpdated() { setFixedSize( m_ledOffPixmap->width() + 5 + QFontMetrics( font() ).width( text() ), m_ledOffPixmap->height() ); } diff --git a/src/gui/widgets/nstate_button.cpp b/src/gui/widgets/NStateButton.cpp similarity index 79% rename from src/gui/widgets/nstate_button.cpp rename to src/gui/widgets/NStateButton.cpp index 22de066e1..c05f311a5 100644 --- a/src/gui/widgets/nstate_button.cpp +++ b/src/gui/widgets/NStateButton.cpp @@ -1,5 +1,5 @@ /* - * nstate_button.cpp - implementation of n-state-button + * NStateButton.cpp - implementation of n-state-button * * Copyright (c) 2005-2006 Tobias Doerffel * @@ -25,14 +25,14 @@ #include -#include "nstate_button.h" +#include "NStateButton.h" #include "embed.h" -#include "tooltip.h" +#include "ToolTip.h" -nStateButton::nStateButton( QWidget * _parent ) : - toolButton( _parent ), +NStateButton::NStateButton( QWidget * _parent ) : + ToolButton( _parent ), m_generalToolTip( "" ), m_curState( -1 ) { @@ -41,7 +41,7 @@ nStateButton::nStateButton( QWidget * _parent ) : -nStateButton::~nStateButton() +NStateButton::~NStateButton() { while( m_states.size() ) { @@ -52,7 +52,7 @@ nStateButton::~nStateButton() -void nStateButton::addState( const QPixmap & _pm, const QString & _tooltip ) +void NStateButton::addState( const QPixmap & _pm, const QString & _tooltip ) { m_states.push_back( qMakePair( _pm, _tooltip ) ); // first inserted pixmap? @@ -68,7 +68,7 @@ void nStateButton::addState( const QPixmap & _pm, const QString & _tooltip ) -void nStateButton::changeState( int _n ) +void NStateButton::changeState( int _n ) { if( _n >= 0 && _n < (int) m_states.size() ) { @@ -78,7 +78,7 @@ void nStateButton::changeState( int _n ) ( m_states[m_curState].second != "" ) ? m_states[m_curState].second : m_generalToolTip; - toolTip::add( this, _tooltip ); + ToolTip::add( this, _tooltip ); setIcon( m_states[m_curState].first ); @@ -88,13 +88,13 @@ void nStateButton::changeState( int _n ) -void nStateButton::mousePressEvent( QMouseEvent * _me ) +void NStateButton::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton && m_states.size() ) { changeState( ( ++m_curState ) % m_states.size() ); } - toolButton::mousePressEvent( _me ); + ToolButton::mousePressEvent( _me ); } diff --git a/src/gui/widgets/pixmap_button.cpp b/src/gui/widgets/PixmapButton.cpp similarity index 78% rename from src/gui/widgets/pixmap_button.cpp rename to src/gui/widgets/PixmapButton.cpp index 3f1d0f4fb..e647c5e23 100644 --- a/src/gui/widgets/pixmap_button.cpp +++ b/src/gui/widgets/PixmapButton.cpp @@ -1,5 +1,5 @@ /* - * pixmap_button.cpp - implementation of pixmap-button (often used as "themed" + * PixmapButton.cpp - implementation of pixmap-button (often used as "themed" * checkboxes/radiobuttons etc) * * Copyright (c) 2004-2013 Tobias Doerffel @@ -27,13 +27,13 @@ #include #include -#include "pixmap_button.h" +#include "PixmapButton.h" #include "MainWindow.h" #include "embed.h" -pixmapButton::pixmapButton( QWidget * _parent, const QString & _name ) : +PixmapButton::PixmapButton( QWidget * _parent, const QString & _name ) : AutomatableButton( _parent, _name ), m_activePixmap(), m_inactivePixmap(), @@ -46,14 +46,14 @@ pixmapButton::pixmapButton( QWidget * _parent, const QString & _name ) : -pixmapButton::~pixmapButton() +PixmapButton::~PixmapButton() { } -void pixmapButton::paintEvent( QPaintEvent * ) +void PixmapButton::paintEvent( QPaintEvent * ) { QPainter p( this ); @@ -74,7 +74,7 @@ void pixmapButton::paintEvent( QPaintEvent * ) -void pixmapButton::mousePressEvent( QMouseEvent * _me ) +void PixmapButton::mousePressEvent( QMouseEvent * _me ) { // Show pressing graphics if this isn't checkable if( !isCheckable() ) @@ -89,7 +89,7 @@ void pixmapButton::mousePressEvent( QMouseEvent * _me ) -void pixmapButton::mouseReleaseEvent( QMouseEvent * _me ) +void PixmapButton::mouseReleaseEvent( QMouseEvent * _me ) { AutomatableButton::mouseReleaseEvent( _me ); @@ -103,7 +103,7 @@ void pixmapButton::mouseReleaseEvent( QMouseEvent * _me ) -void pixmapButton::mouseDoubleClickEvent( QMouseEvent * _me ) +void PixmapButton::mouseDoubleClickEvent( QMouseEvent * _me ) { emit doubleClicked(); _me->accept(); @@ -112,7 +112,7 @@ void pixmapButton::mouseDoubleClickEvent( QMouseEvent * _me ) -void pixmapButton::setActiveGraphic( const QPixmap & _pm ) +void PixmapButton::setActiveGraphic( const QPixmap & _pm ) { m_activePixmap = _pm; resize( m_activePixmap.width(), m_activePixmap.height() ); @@ -121,7 +121,7 @@ void pixmapButton::setActiveGraphic( const QPixmap & _pm ) -void pixmapButton::setInactiveGraphic( const QPixmap & _pm, bool _update ) +void PixmapButton::setInactiveGraphic( const QPixmap & _pm, bool _update ) { m_inactivePixmap = _pm; if( _update ) diff --git a/src/gui/widgets/project_notes.cpp b/src/gui/widgets/ProjectNotes.cpp similarity index 92% rename from src/gui/widgets/project_notes.cpp rename to src/gui/widgets/ProjectNotes.cpp index e94b0f549..bc6908f50 100644 --- a/src/gui/widgets/project_notes.cpp +++ b/src/gui/widgets/ProjectNotes.cpp @@ -1,5 +1,5 @@ /* - * project_notes.cpp - implementation of project-notes-editor + * ProjectNotes.cpp - implementation of project-notes-editor * * Copyright (c) 2005-2008 Tobias Doerffel * @@ -23,7 +23,7 @@ */ -#include "project_notes.h" +#include "ProjectNotes.h" #include #include @@ -44,7 +44,7 @@ -projectNotes::projectNotes() : +ProjectNotes::ProjectNotes() : QMainWindow( Engine::mainWindow()->workspace() ) { m_edit = new QTextEdit( this ); @@ -80,14 +80,14 @@ projectNotes::projectNotes() : -projectNotes::~projectNotes() +ProjectNotes::~ProjectNotes() { } -void projectNotes::clear() +void ProjectNotes::clear() { m_edit->setHtml( tr( "Put down your project notes here." ) ); m_edit->selectAll(); @@ -100,7 +100,7 @@ void projectNotes::clear() -void projectNotes::setText( const QString & _text ) +void ProjectNotes::setText( const QString & _text ) { m_edit->setHtml( _text ); } @@ -108,7 +108,7 @@ void projectNotes::setText( const QString & _text ) -void projectNotes::setupActions() +void ProjectNotes::setupActions() { QToolBar * tb = addToolBar( tr( "Edit Actions" ) ); QAction * a; @@ -246,7 +246,7 @@ void projectNotes::setupActions() -void projectNotes::textBold() +void ProjectNotes::textBold() { m_edit->setFontWeight( m_actionTextBold->isChecked() ? QFont::Bold : QFont::Normal ); @@ -256,7 +256,7 @@ void projectNotes::textBold() -void projectNotes::textUnderline() +void ProjectNotes::textUnderline() { m_edit->setFontUnderline( m_actionTextUnderline->isChecked() ); Engine::getSong()->setModified(); @@ -265,7 +265,7 @@ void projectNotes::textUnderline() -void projectNotes::textItalic() +void ProjectNotes::textItalic() { m_edit->setFontItalic( m_actionTextItalic->isChecked() ); Engine::getSong()->setModified(); @@ -274,7 +274,7 @@ void projectNotes::textItalic() -void projectNotes::textFamily( const QString & _f ) +void ProjectNotes::textFamily( const QString & _f ) { m_edit->setFontFamily( _f ); m_edit->viewport()->setFocus(); @@ -284,7 +284,7 @@ void projectNotes::textFamily( const QString & _f ) -void projectNotes::textSize( const QString & _p ) +void ProjectNotes::textSize( const QString & _p ) { m_edit->setFontPointSize( _p.toInt() ); m_edit->viewport()->setFocus(); @@ -294,7 +294,7 @@ void projectNotes::textSize( const QString & _p ) -void projectNotes::textColor() +void ProjectNotes::textColor() { QColor col = QColorDialog::getColor( m_edit->textColor(), this ); if ( !col.isValid() ) @@ -310,7 +310,7 @@ void projectNotes::textColor() -void projectNotes::textAlign( QAction * _a ) +void ProjectNotes::textAlign( QAction * _a ) { if( _a == m_actionAlignLeft ) { @@ -333,7 +333,7 @@ void projectNotes::textAlign( QAction * _a ) -void projectNotes::formatChanged( const QTextCharFormat & _f ) +void ProjectNotes::formatChanged( const QTextCharFormat & _f ) { QFont font = _f.font(); m_comboFont->lineEdit()->setText( font.family() ); @@ -352,7 +352,7 @@ void projectNotes::formatChanged( const QTextCharFormat & _f ) -void projectNotes::alignmentChanged( int _a ) +void ProjectNotes::alignmentChanged( int _a ) { if ( _a & Qt::AlignLeft ) { @@ -376,7 +376,7 @@ void projectNotes::alignmentChanged( int _a ) -void projectNotes::saveSettings( QDomDocument & _doc, QDomElement & _this ) +void ProjectNotes::saveSettings( QDomDocument & _doc, QDomElement & _this ) { MainWindow::saveWidgetState( this, _this ); @@ -387,7 +387,7 @@ void projectNotes::saveSettings( QDomDocument & _doc, QDomElement & _this ) -void projectNotes::loadSettings( const QDomElement & _this ) +void ProjectNotes::loadSettings( const QDomElement & _this ) { MainWindow::restoreWidgetState( this, _this ); m_edit->setHtml( _this.text() ); diff --git a/src/gui/widgets/rename_dialog.cpp b/src/gui/widgets/RenameDialog.cpp similarity index 83% rename from src/gui/widgets/rename_dialog.cpp rename to src/gui/widgets/RenameDialog.cpp index 965c7507e..2e443f241 100644 --- a/src/gui/widgets/rename_dialog.cpp +++ b/src/gui/widgets/RenameDialog.cpp @@ -1,5 +1,5 @@ /* - * rename_dialog.cpp - implementation of dialog for renaming something + * RenameDialog.cpp - implementation of dialog for renaming something * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -26,11 +26,11 @@ #include #include -#include "rename_dialog.h" +#include "RenameDialog.h" -renameDialog::renameDialog( QString & _string ) : +RenameDialog::RenameDialog( QString & _string ) : QDialog(), m_stringToEdit( _string ), m_originalString( _string ) @@ -49,14 +49,14 @@ renameDialog::renameDialog( QString & _string ) : -renameDialog::~renameDialog() +RenameDialog::~RenameDialog() { } -void renameDialog::keyPressEvent( QKeyEvent * _ke ) +void RenameDialog::keyPressEvent( QKeyEvent * _ke ) { if( _ke->key() == Qt::Key_Escape ) { @@ -68,7 +68,7 @@ void renameDialog::keyPressEvent( QKeyEvent * _ke ) -void renameDialog::textChanged( const QString & _new_string ) +void RenameDialog::textChanged( const QString & _new_string ) { m_stringToEdit = _new_string; } diff --git a/src/gui/widgets/rubberband.cpp b/src/gui/widgets/Rubberband.cpp similarity index 85% rename from src/gui/widgets/rubberband.cpp rename to src/gui/widgets/Rubberband.cpp index 7de558cf4..eedec42d3 100644 --- a/src/gui/widgets/rubberband.cpp +++ b/src/gui/widgets/Rubberband.cpp @@ -1,5 +1,5 @@ /* - * rubberband.cpp - rubberband - either own implementation for Qt3 or wrapper + * Rubberband.cpp - rubberband - either own implementation for Qt3 or wrapper * for Qt4 * * Copyright (c) 2006-2011 Tobias Doerffel @@ -24,10 +24,10 @@ */ -#include "rubberband.h" +#include "Rubberband.h" -rubberBand::rubberBand( QWidget * _parent ) : +RubberBand::RubberBand( QWidget * _parent ) : QRubberBand( Rectangle, _parent ) { } @@ -35,14 +35,14 @@ rubberBand::rubberBand( QWidget * _parent ) : -rubberBand::~rubberBand() +RubberBand::~RubberBand() { } -QVector rubberBand::selectedObjects() const +QVector RubberBand::selectedObjects() const { QVector so = selectableObjects(); for( QVector::iterator it = so.begin(); @@ -63,7 +63,7 @@ QVector rubberBand::selectedObjects() const -void rubberBand::resizeEvent( QResizeEvent * _re ) +void RubberBand::resizeEvent( QResizeEvent * _re ) { QRubberBand::resizeEvent( _re ); if( isEnabled() ) @@ -83,7 +83,7 @@ void rubberBand::resizeEvent( QResizeEvent * _re ) -QVector rubberBand::selectableObjects() const +QVector RubberBand::selectableObjects() const { QVector so; if( parentWidget() == NULL ) diff --git a/src/gui/widgets/SideBar.cpp b/src/gui/widgets/SideBar.cpp index 8e92dfbf9..409fbf771 100644 --- a/src/gui/widgets/SideBar.cpp +++ b/src/gui/widgets/SideBar.cpp @@ -28,7 +28,7 @@ #include "SideBar.h" #include "SideBarWidget.h" -#include "tooltip.h" +#include "ToolTip.h" // internal helper class allowing to create QToolButtons with @@ -120,7 +120,7 @@ void SideBar::appendTab( SideBarWidget * _sbw ) _sbw->hide(); _sbw->setMinimumWidth( 200 ); - toolTip::add( btn, _sbw->title() ); + ToolTip::add( btn, _sbw->title() ); } diff --git a/src/gui/widgets/tab_bar.cpp b/src/gui/widgets/TabBar.cpp similarity index 88% rename from src/gui/widgets/tab_bar.cpp rename to src/gui/widgets/TabBar.cpp index 065b7541c..e5bcf3db2 100644 --- a/src/gui/widgets/tab_bar.cpp +++ b/src/gui/widgets/TabBar.cpp @@ -1,5 +1,5 @@ /* - * tab_bar.cpp - implementation of tab-bar + * TabBar.cpp - implementation of tab-bar * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -23,14 +23,14 @@ */ -#include "tab_bar.h" +#include "TabBar.h" #include "tab_button.h" #include "gui_templates.h" -#include "tooltip.h" +#include "ToolTip.h" -tabBar::tabBar( QWidget * _parent, QBoxLayout::Direction _dir ) : +TabBar::TabBar( QWidget * _parent, QBoxLayout::Direction _dir ) : QWidget( _parent ), m_layout( new QBoxLayout( _dir, this ) ), m_exclusive( false ) @@ -44,14 +44,14 @@ tabBar::tabBar( QWidget * _parent, QBoxLayout::Direction _dir ) : -tabBar::~tabBar() +TabBar::~TabBar() { } -tabButton * tabBar::addTab( QWidget * _w, const QString & _text, int _id, +tabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, bool _add_stretch, bool _text_is_tooltip ) { // already tab with id? @@ -69,7 +69,7 @@ tabButton * tabBar::addTab( QWidget * _w, const QString & _text, int _id, b->show(); if( _text_is_tooltip ) { - toolTip::add( b, _text ); + ToolTip::add( b, _text ); } // small workaround, because QBoxLayout::addWidget(...) doesn't @@ -104,7 +104,7 @@ tabButton * tabBar::addTab( QWidget * _w, const QString & _text, int _id, -void tabBar::removeTab( int _id ) +void TabBar::removeTab( int _id ) { // find tab-button and delete it if( m_tabs.find( _id ) != m_tabs.end() ) @@ -117,7 +117,7 @@ void tabBar::removeTab( int _id ) -void tabBar::setActiveTab( int _id ) +void TabBar::setActiveTab( int _id ) { setTabState( _id, true ); hideAll( _id ); @@ -134,7 +134,7 @@ void tabBar::setActiveTab( int _id ) -int tabBar::activeTab() +int TabBar::activeTab() { QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) @@ -150,7 +150,7 @@ int tabBar::activeTab() -bool tabBar::tabState( int _id ) +bool TabBar::tabState( int _id ) { if( m_tabs.find( _id ) == m_tabs.end() ) { @@ -162,7 +162,7 @@ bool tabBar::tabState( int _id ) -void tabBar::setTabState( int _id, bool _checked ) +void TabBar::setTabState( int _id, bool _checked ) { if( m_tabs.find( _id ) != m_tabs.end() ) { @@ -173,7 +173,7 @@ void tabBar::setTabState( int _id, bool _checked ) -void tabBar::hideAll( int _exception ) +void TabBar::hideAll( int _exception ) { QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) @@ -200,7 +200,7 @@ void tabBar::hideAll( int _exception ) -void tabBar::tabClicked( int _id ) +void TabBar::tabClicked( int _id ) { if( m_exclusive == true && activeTab() == -1 ) { @@ -226,7 +226,7 @@ void tabBar::tabClicked( int _id ) -bool tabBar::allHidden() +bool TabBar::allHidden() { QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) diff --git a/src/gui/widgets/tab_widget.cpp b/src/gui/widgets/TabWidget.cpp similarity index 91% rename from src/gui/widgets/tab_widget.cpp rename to src/gui/widgets/TabWidget.cpp index 56a53da9a..b29b27c70 100644 --- a/src/gui/widgets/tab_widget.cpp +++ b/src/gui/widgets/TabWidget.cpp @@ -1,5 +1,5 @@ /* - * tab_widget.cpp - tabwidget for LMMS + * TabWidget.cpp - tabwidget for LMMS * * Copyright (c) 2005-2014 Tobias Doerffel * @@ -23,7 +23,7 @@ */ -#include "tab_widget.h" +#include "TabWidget.h" #include #include @@ -34,7 +34,7 @@ -tabWidget::tabWidget( const QString & _caption, QWidget * _parent ) : +TabWidget::TabWidget( const QString & _caption, QWidget * _parent ) : QWidget( _parent ), m_activeTab( 0 ), m_caption( _caption ), @@ -54,14 +54,14 @@ tabWidget::tabWidget( const QString & _caption, QWidget * _parent ) : -tabWidget::~tabWidget() +TabWidget::~TabWidget() { } -void tabWidget::addTab( QWidget * _w, const QString & _name, int _idx ) +void TabWidget::addTab( QWidget * _w, const QString & _name, int _idx ) { setFont( pointSize<8>( font() ) ); widgetDesc d = { _w, _name, fontMetrics().width( _name ) + 10 } ; @@ -87,7 +87,7 @@ void tabWidget::addTab( QWidget * _w, const QString & _name, int _idx ) -void tabWidget::setActiveTab( int _idx ) +void TabWidget::setActiveTab( int _idx ) { if( m_widgets.contains( _idx ) ) { @@ -106,7 +106,7 @@ void tabWidget::setActiveTab( int _idx ) -void tabWidget::mousePressEvent( QMouseEvent * _me ) +void TabWidget::mousePressEvent( QMouseEvent * _me ) { if( _me->y() > 1 && _me->y() < 13 ) { @@ -130,7 +130,7 @@ void tabWidget::mousePressEvent( QMouseEvent * _me ) -void tabWidget::resizeEvent( QResizeEvent * ) +void TabWidget::resizeEvent( QResizeEvent * ) { for( widgetStack::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it ) @@ -143,7 +143,7 @@ void tabWidget::resizeEvent( QResizeEvent * ) -void tabWidget::paintEvent( QPaintEvent * _pe ) +void TabWidget::paintEvent( QPaintEvent * _pe ) { setFont( pointSize<8>( font() ) ); QPainter p( this ); @@ -210,7 +210,7 @@ void tabWidget::paintEvent( QPaintEvent * _pe ) -void tabWidget::wheelEvent( QWheelEvent * _we ) +void TabWidget::wheelEvent( QWheelEvent * _we ) { if (_we->y() > m_tabheight) return; diff --git a/src/gui/widgets/tempo_sync_knob.cpp b/src/gui/widgets/TempoSyncKnob.cpp similarity index 99% rename from src/gui/widgets/tempo_sync_knob.cpp rename to src/gui/widgets/TempoSyncKnob.cpp index b08961421..0022691e0 100644 --- a/src/gui/widgets/tempo_sync_knob.cpp +++ b/src/gui/widgets/TempoSyncKnob.cpp @@ -38,7 +38,7 @@ TempoSyncKnob::TempoSyncKnob( knobTypes _knob_num, QWidget * _parent, const QString & _name ) : - knob( _knob_num, _parent, _name ), + Knob( _knob_num, _parent, _name ), m_tempoSyncIcon( embed::getIconPixmap( "tempo_sync" ) ), m_tempoSyncDescription( tr( "Tempo Sync" ) ), m_custom( NULL ) diff --git a/src/gui/widgets/text_float.cpp b/src/gui/widgets/TextFloat.cpp similarity index 84% rename from src/gui/widgets/text_float.cpp rename to src/gui/widgets/TextFloat.cpp index cd063c580..9947b09cd 100644 --- a/src/gui/widgets/text_float.cpp +++ b/src/gui/widgets/TextFloat.cpp @@ -1,5 +1,5 @@ /* - * text_float.cpp - class textFloat, a floating text-label + * TextFloat.cpp - class textFloat, a floating text-label * * Copyright (c) 2005-2010 Tobias Doerffel * @@ -26,14 +26,14 @@ #include #include -#include "text_float.h" +#include "TextFloat.h" #include "gui_templates.h" #include "MainWindow.h" #include "Engine.h" -textFloat::textFloat() : +TextFloat::TextFloat() : QWidget( Engine::mainWindow(), Qt::ToolTip ), m_title(), m_text(), @@ -50,7 +50,7 @@ textFloat::textFloat() : -void textFloat::setTitle( const QString & _title ) +void TextFloat::setTitle( const QString & _title ) { m_title = _title; updateSize(); @@ -59,7 +59,7 @@ void textFloat::setTitle( const QString & _title ) -void textFloat::setText( const QString & _text ) +void TextFloat::setText( const QString & _text ) { m_text = _text; updateSize(); @@ -68,7 +68,7 @@ void textFloat::setText( const QString & _text ) -void textFloat::setPixmap( const QPixmap & _pixmap ) +void TextFloat::setPixmap( const QPixmap & _pixmap ) { m_pixmap = _pixmap; updateSize(); @@ -77,7 +77,7 @@ void textFloat::setPixmap( const QPixmap & _pixmap ) -void textFloat::setVisibilityTimeOut( int _msecs ) +void TextFloat::setVisibilityTimeOut( int _msecs ) { QTimer::singleShot( _msecs, this, SLOT( hide() ) ); show(); @@ -86,11 +86,11 @@ void textFloat::setVisibilityTimeOut( int _msecs ) -textFloat * textFloat::displayMessage( const QString & _msg, int _timeout, +TextFloat * TextFloat::displayMessage( const QString & _msg, int _timeout, QWidget * _parent, int _add_y_margin ) { QWidget * mw = Engine::mainWindow(); - textFloat * tf = new textFloat; + TextFloat * tf = new TextFloat; if( _parent != NULL ) { tf->moveGlobal( _parent, QPoint( _parent->width() + 2, 0 ) ); @@ -112,12 +112,12 @@ textFloat * textFloat::displayMessage( const QString & _msg, int _timeout, -textFloat * textFloat::displayMessage( const QString & _title, +TextFloat * TextFloat::displayMessage( const QString & _title, const QString & _msg, const QPixmap & _pixmap, int _timeout, QWidget * _parent ) { - textFloat * tf = displayMessage( _msg, _timeout, _parent, 16 ); + TextFloat * tf = displayMessage( _msg, _timeout, _parent, 16 ); tf->setTitle( _title ); tf->setPixmap( _pixmap ); return( tf ); @@ -126,7 +126,7 @@ textFloat * textFloat::displayMessage( const QString & _title, -void textFloat::paintEvent( QPaintEvent * _pe ) +void TextFloat::paintEvent( QPaintEvent * _pe ) { QStyleOption opt; opt.init( this ); @@ -166,7 +166,7 @@ void textFloat::paintEvent( QPaintEvent * _pe ) -void textFloat::mousePressEvent( QMouseEvent * ) +void TextFloat::mousePressEvent( QMouseEvent * ) { close(); } @@ -174,7 +174,7 @@ void textFloat::mousePressEvent( QMouseEvent * ) -void textFloat::updateSize() +void TextFloat::updateSize() { QFontMetrics metrics( pointSize<8>( font() ) ); QRect textBound = metrics.boundingRect( m_text ); diff --git a/src/gui/widgets/TimeDisplayWidget.cpp b/src/gui/widgets/TimeDisplayWidget.cpp index 93375f0b9..d2afe9240 100644 --- a/src/gui/widgets/TimeDisplayWidget.cpp +++ b/src/gui/widgets/TimeDisplayWidget.cpp @@ -27,7 +27,7 @@ #include "TimeDisplayWidget.h" #include "MainWindow.h" #include "Engine.h" -#include "tooltip.h" +#include "ToolTip.h" #include "Song.h" @@ -48,7 +48,7 @@ TimeDisplayWidget::TimeDisplayWidget() : setMaximumHeight( 32 ); - toolTip::add( this, tr( "click to change time units" ) ); + ToolTip::add( this, tr( "click to change time units" ) ); // update labels of LCD spinboxes setDisplayMode( m_displayMode ); diff --git a/src/gui/widgets/tool_button.cpp b/src/gui/widgets/ToolButton.cpp similarity index 80% rename from src/gui/widgets/tool_button.cpp rename to src/gui/widgets/ToolButton.cpp index 437bdb4ff..d2031abc6 100644 --- a/src/gui/widgets/tool_button.cpp +++ b/src/gui/widgets/ToolButton.cpp @@ -1,5 +1,5 @@ /* - * tool_button.cpp - implementation of LMMS-tool-button for common (cool) look + * ToolButton.cpp - implementation of LMMS-tool-button for common (cool) look * * Copyright (c) 2005-2006 Tobias Doerffel * @@ -23,16 +23,16 @@ */ -#include "tool_button.h" -#include "tooltip.h" +#include "ToolButton.h" +#include "ToolTip.h" -const QColor toolButton::s_stdColor = QColor( 216, 216, 216 ); -const QColor toolButton::s_hlColor = QColor( 240, 240, 240 ); +const QColor ToolButton::s_stdColor = QColor( 216, 216, 216 ); +const QColor ToolButton::s_hlColor = QColor( 240, 240, 240 ); -toolButton::toolButton( const QPixmap & _pixmap, const QString & _tooltip, +ToolButton::ToolButton( const QPixmap & _pixmap, const QString & _tooltip, QObject * _receiver, const char * _slot, QWidget * _parent ) : QToolButton( _parent ), @@ -50,7 +50,7 @@ toolButton::toolButton( const QPixmap & _pixmap, const QString & _tooltip, { connect( this, SIGNAL( clicked() ), _receiver, _slot ); } - toolTip::add( this, _tooltip ); + ToolTip::add( this, _tooltip ); setFixedSize( 30, 30 ); setIcon( _pixmap ); leaveEvent( NULL ); @@ -61,14 +61,14 @@ toolButton::toolButton( const QPixmap & _pixmap, const QString & _tooltip, -toolButton::~toolButton() +ToolButton::~ToolButton() { } -void toolButton::enterEvent( QEvent * ) +void ToolButton::enterEvent( QEvent * ) { QPalette pal = palette(); pal.setColor( backgroundRole(), m_colorHighlighted ); @@ -80,7 +80,7 @@ void toolButton::enterEvent( QEvent * ) -void toolButton::leaveEvent( QEvent * ) +void ToolButton::leaveEvent( QEvent * ) { QPalette pal = palette(); pal.setColor( backgroundRole(), m_colorStandard ); @@ -92,7 +92,7 @@ void toolButton::leaveEvent( QEvent * ) -void toolButton::toggledBool( bool _on ) +void ToolButton::toggledBool( bool _on ) { if( _on == true ) { diff --git a/src/gui/widgets/tooltip.cpp b/src/gui/widgets/ToolTip.cpp similarity index 88% rename from src/gui/widgets/tooltip.cpp rename to src/gui/widgets/ToolTip.cpp index 9014803db..e51b72e69 100644 --- a/src/gui/widgets/tooltip.cpp +++ b/src/gui/widgets/ToolTip.cpp @@ -1,5 +1,5 @@ /* - * tooltip.cpp - namespace toolTip, a tooltip-wrapper for LMMS + * ToolTip.cpp - namespace toolTip, a tooltip-wrapper for LMMS * * Copyright (c) 2005-2006 Tobias Doerffel * @@ -25,11 +25,11 @@ #include -#include "tooltip.h" +#include "ToolTip.h" #include "ConfigManager.h" -void toolTip::add( QWidget * _w, const QString & _txt ) +void ToolTip::add( QWidget * _w, const QString & _txt ) { if( !ConfigManager::inst()->value( "tooltips", "disabled" ).toInt() ) { diff --git a/src/gui/widgets/track_label_button.cpp b/src/gui/widgets/TrackLabelButton.cpp similarity index 82% rename from src/gui/widgets/track_label_button.cpp rename to src/gui/widgets/TrackLabelButton.cpp index 53ff02bcd..5f3e359ba 100644 --- a/src/gui/widgets/track_label_button.cpp +++ b/src/gui/widgets/TrackLabelButton.cpp @@ -1,5 +1,5 @@ /* - * track_label_button.cpp - implementation of class trackLabelButton, a label + * TrackLabelButton.cpp - implementation of class trackLabelButton, a label * which is renamable by double-clicking it * * Copyright (c) 2004-2008 Tobias Doerffel @@ -28,9 +28,9 @@ #include -#include "track_label_button.h" +#include "TrackLabelButton.h" #include "embed.h" -#include "rename_dialog.h" +#include "RenameDialog.h" #include "InstrumentTrack.h" #include "Instrument.h" #include "ConfigManager.h" @@ -38,7 +38,7 @@ -trackLabelButton::trackLabelButton( trackView * _tv, QWidget * _parent ) : +TrackLabelButton::TrackLabelButton( trackView * _tv, QWidget * _parent ) : QToolButton( _parent ), m_trackView( _tv ), m_iconName() @@ -68,17 +68,17 @@ trackLabelButton::trackLabelButton( trackView * _tv, QWidget * _parent ) : -trackLabelButton::~trackLabelButton() +TrackLabelButton::~TrackLabelButton() { } -void trackLabelButton::rename() +void TrackLabelButton::rename() { QString txt = m_trackView->getTrack()->name(); - renameDialog rename_dlg( txt ); + RenameDialog rename_dlg( txt ); rename_dlg.exec(); if( txt != text() ) { @@ -89,7 +89,7 @@ void trackLabelButton::rename() -void trackLabelButton::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackLabelButton::dragEnterEvent( QDragEnterEvent * _dee ) { m_trackView->dragEnterEvent( _dee ); } @@ -97,7 +97,7 @@ void trackLabelButton::dragEnterEvent( QDragEnterEvent * _dee ) -void trackLabelButton::dropEvent( QDropEvent * _de ) +void TrackLabelButton::dropEvent( QDropEvent * _de ) { m_trackView->dropEvent( _de ); setChecked( true ); @@ -106,7 +106,7 @@ void trackLabelButton::dropEvent( QDropEvent * _de ) -void trackLabelButton::mousePressEvent( QMouseEvent * _me ) +void TrackLabelButton::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::RightButton ) { @@ -121,7 +121,7 @@ void trackLabelButton::mousePressEvent( QMouseEvent * _me ) -void trackLabelButton::mouseDoubleClickEvent( QMouseEvent * _me ) +void TrackLabelButton::mouseDoubleClickEvent( QMouseEvent * _me ) { rename(); } @@ -129,7 +129,7 @@ void trackLabelButton::mouseDoubleClickEvent( QMouseEvent * _me ) -void trackLabelButton::paintEvent( QPaintEvent * _pe ) +void TrackLabelButton::paintEvent( QPaintEvent * _pe ) { if( m_trackView->getTrack()->type() == Track::InstrumentTrack ) { diff --git a/src/gui/widgets/visualization_widget.cpp b/src/gui/widgets/VisualizationWidget.cpp similarity index 88% rename from src/gui/widgets/visualization_widget.cpp rename to src/gui/widgets/VisualizationWidget.cpp index c6a738b1c..e7e21d589 100644 --- a/src/gui/widgets/visualization_widget.cpp +++ b/src/gui/widgets/VisualizationWidget.cpp @@ -1,5 +1,5 @@ /* - * visualization_widget.cpp - widget for visualization of sound-data + * VisualizationWidget.cpp - widget for visualization of sound-data * * Copyright (c) 2005-2009 Tobias Doerffel * @@ -26,19 +26,19 @@ #include #include -#include "visualization_widget.h" +#include "VisualizationWidget.h" #include "gui_templates.h" #include "MainWindow.h" #include "embed.h" #include "Engine.h" -#include "tooltip.h" +#include "ToolTip.h" #include "Song.h" #include "ConfigManager.h" -visualizationWidget::visualizationWidget( const QPixmap & _bg, QWidget * _p, +VisualizationWidget::VisualizationWidget( const QPixmap & _bg, QWidget * _p, visualizationTypes _vtype ) : QWidget( _p ), s_background( _bg ), @@ -55,14 +55,14 @@ visualizationWidget::visualizationWidget( const QPixmap & _bg, QWidget * _p, Engine::mixer()->clearAudioBuffer( m_buffer, frames ); - toolTip::add( this, tr( "click to enable/disable visualization of " + ToolTip::add( this, tr( "click to enable/disable visualization of " "master-output" ) ); } -visualizationWidget::~visualizationWidget() +VisualizationWidget::~VisualizationWidget() { delete[] m_buffer; delete[] m_points; @@ -71,7 +71,7 @@ visualizationWidget::~visualizationWidget() -void visualizationWidget::updateAudioBuffer() +void VisualizationWidget::updateAudioBuffer() { if( !Engine::getSong()->isExporting() ) { @@ -85,7 +85,7 @@ void visualizationWidget::updateAudioBuffer() -void visualizationWidget::setActive( bool _active ) +void VisualizationWidget::setActive( bool _active ) { m_active = _active; if( m_active ) @@ -114,7 +114,7 @@ void visualizationWidget::setActive( bool _active ) -void visualizationWidget::paintEvent( QPaintEvent * ) +void VisualizationWidget::paintEvent( QPaintEvent * ) { QPainter p( this ); @@ -181,7 +181,7 @@ void visualizationWidget::paintEvent( QPaintEvent * ) -void visualizationWidget::mousePressEvent( QMouseEvent * _me ) +void VisualizationWidget::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton ) { diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index 9d6a22e89..e82a310f0 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -31,7 +31,7 @@ #include "ProjectJournal.h" #include "string_pair_drag.h" #include "TrackContainerView.h" -#include "track_label_button.h" +#include "TrackLabelButton.h" AutomationTrack::AutomationTrack( TrackContainer* tc, bool _hidden ) : @@ -131,7 +131,7 @@ AutomationTrackView::AutomationTrackView( AutomationTrack * _at, TrackContainerV trackView( _at, tcv ) { setFixedHeight( 32 ); - trackLabelButton * tlb = new trackLabelButton( this, + TrackLabelButton * tlb = new TrackLabelButton( this, getTrackSettingsWidget() ); tlb->setIcon( embed::getIconPixmap( "automation_track" ) ); tlb->move( 3, 1 ); diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 01d6a8b9e..0d288603d 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -54,14 +54,14 @@ #include "FxMixerView.h" #include "InstrumentSoundShaping.h" #include "InstrumentSoundShapingView.h" -#include "fade_button.h" +#include "FadeButton.h" #include "gui_templates.h" #include "Instrument.h" #include "InstrumentFunctionViews.h" #include "InstrumentMidiIOView.h" -#include "knob.h" +#include "Knob.h" #include "LcdSpinBox.h" -#include "led_checkbox.h" +#include "LedCheckbox.h" #include "MainWindow.h" #include "MidiClient.h" #include "MidiPortMenu.h" @@ -73,9 +73,9 @@ #include "SamplePlayHandle.h" #include "Song.h" #include "string_pair_drag.h" -#include "tab_widget.h" -#include "tooltip.h" -#include "track_label_button.h" +#include "TabWidget.h" +#include "ToolTip.h" +#include "TrackLabelButton.h" #include "ValueBuffer.h" #include "volume.h" @@ -821,7 +821,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV setAcceptDrops( true ); setFixedHeight( 32 ); - m_tlb = new trackLabelButton( this, getTrackSettingsWidget() ); + m_tlb = new TrackLabelButton( this, getTrackSettingsWidget() ); m_tlb->setCheckable( true ); m_tlb->setIcon( embed::getIconPixmap( "instrument_track" ) ); m_tlb->move( 3, 1 ); @@ -845,7 +845,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV widgetWidth = DEFAULT_SETTINGS_WIDGET_WIDTH; } - m_volumeKnob = new knob( knobSmall_17, getTrackSettingsWidget(), + m_volumeKnob = new Knob( knobSmall_17, getTrackSettingsWidget(), tr( "Volume" ) ); m_volumeKnob->setVolumeKnob( true ); m_volumeKnob->setModel( &_it->m_volumeModel ); @@ -855,7 +855,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV m_volumeKnob->show(); m_volumeKnob->setWhatsThis( tr( volume_help ) ); - m_panningKnob = new knob( knobSmall_17, getTrackSettingsWidget(), + m_panningKnob = new Knob( knobSmall_17, getTrackSettingsWidget(), tr( "Panning" ) ); m_panningKnob->setModel( &_it->m_panningModel ); m_panningKnob->setHintText( tr( "Panning:" ) + " ", "%" ); @@ -898,7 +898,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV m_midiInputAction->setText( tr( "Input" ) ); m_midiOutputAction->setText( tr( "Output" ) ); - m_activityIndicator = new fadeButton( QApplication::palette().color( QPalette::Active, + m_activityIndicator = new FadeButton( QApplication::palette().color( QPalette::Active, QPalette::Background), QApplication::palette().color( QPalette::Active, QPalette::BrightText ), @@ -1155,7 +1155,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : vlayout->setMargin( 0 ); vlayout->setSpacing( 0 ); - tabWidget* generalSettingsWidget = new tabWidget( tr( "GENERAL SETTINGS" ), this ); + TabWidget* generalSettingsWidget = new TabWidget( tr( "GENERAL SETTINGS" ), this ); QVBoxLayout* generalSettingsLayout = new QVBoxLayout( generalSettingsWidget ); @@ -1174,7 +1174,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : basicControlsLayout->setSpacing( 3 ); // set up volume knob - m_volumeKnob = new knob( knobBright_26, NULL, tr( "Instrument volume" ) ); + m_volumeKnob = new Knob( knobBright_26, NULL, tr( "Instrument volume" ) ); m_volumeKnob->setVolumeKnob( true ); m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" ); m_volumeKnob->setLabel( tr( "VOL" ) ); @@ -1184,7 +1184,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : basicControlsLayout->addWidget( m_volumeKnob ); // set up panning knob - m_panningKnob = new knob( knobBright_26, NULL, tr( "Panning" ) ); + m_panningKnob = new Knob( knobBright_26, NULL, tr( "Panning" ) ); m_panningKnob->setHintText( tr( "Panning:" ) + " ", "" ); m_panningKnob->setLabel( tr( "PAN" ) ); @@ -1192,7 +1192,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : basicControlsLayout->addStretch(); // set up pitch knob - m_pitchKnob = new knob( knobBright_26, NULL, tr( "Pitch" ) ); + m_pitchKnob = new Knob( knobBright_26, NULL, tr( "Pitch" ) ); m_pitchKnob->setHintText( tr( "Pitch:" ) + " ", " " + tr( "cents" ) ); m_pitchKnob->setLabel( tr( "PITCH" ) ); @@ -1219,7 +1219,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : connect( saveSettingsBtn, SIGNAL( clicked() ), this, SLOT( saveSettingsBtnClicked() ) ); - toolTip::add( saveSettingsBtn, tr( "Save current instrument track settings in a preset file" ) ); + ToolTip::add( saveSettingsBtn, tr( "Save current instrument track settings in a preset file" ) ); saveSettingsBtn->setWhatsThis( tr( "Click here, if you want to save current instrument track settings in a preset file. " "Later you can load this preset by double-clicking it in the preset-browser." ) ); @@ -1229,7 +1229,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : generalSettingsLayout->addLayout( basicControlsLayout ); - m_tabWidget = new tabWidget( "", this ); + m_tabWidget = new TabWidget( "", this ); m_tabWidget->setFixedHeight( INSTRUMENT_HEIGHT + 10 ); diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index da8060313..0752e8eed 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -41,11 +41,11 @@ #include "Engine.h" #include "PianoRoll.h" #include "TrackContainer.h" -#include "rename_dialog.h" +#include "RenameDialog.h" #include "SampleBuffer.h" #include "AudioSampleRecorder.h" #include "Song.h" -#include "tooltip.h" +#include "ToolTip.h" #include "BBTrackContainer.h" #include "string_pair_drag.h" #include "MainWindow.h" @@ -637,7 +637,7 @@ PatternView::PatternView( Pattern* pattern, trackView* parent ) : setFixedHeight( parentWidget()->height() - 2 ); setAutoResizeEnabled( false ); - toolTip::add( this, + ToolTip::add( this, tr( "double-click to open this pattern in piano-roll\n" "use mouse wheel to set volume of a step" ) ); setStyle( QApplication::style() ); @@ -687,7 +687,7 @@ void PatternView::resetName() void PatternView::changeName() { QString s = m_pat->name(); - renameDialog rename_dlg( s ); + RenameDialog rename_dlg( s ); rename_dlg.exec(); m_pat->setName( s ); } diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 802ce00a2..2f90c960d 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -37,15 +37,15 @@ #include "Song.h" #include "embed.h" #include "Engine.h" -#include "tooltip.h" +#include "ToolTip.h" #include "AudioPort.h" #include "SamplePlayHandle.h" #include "SampleRecordHandle.h" #include "string_pair_drag.h" -#include "knob.h" +#include "Knob.h" #include "MainWindow.h" #include "EffectRackView.h" -#include "track_label_button.h" +#include "TrackLabelButton.h" #include "ConfigManager.h" @@ -221,7 +221,7 @@ void SampleTCOView::updateSample() update(); // set tooltip to filename so that user can see what sample this // sample-tco contains - toolTip::add( this, ( m_tco->m_sampleBuffer->audioFile() != "" ) ? + ToolTip::add( this, ( m_tco->m_sampleBuffer->audioFile() != "" ) ? m_tco->m_sampleBuffer->audioFile() : tr( "double-click to select sample" ) ); } @@ -525,7 +525,7 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) : { setFixedHeight( 32 ); - trackLabelButton * tlb = new trackLabelButton( this, + TrackLabelButton * tlb = new TrackLabelButton( this, getTrackSettingsWidget() ); connect( tlb, SIGNAL( clicked( bool ) ), this, SLOT( showEffects() ) ); @@ -533,7 +533,7 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) : tlb->move( 3, 1 ); tlb->show(); - m_volumeKnob = new knob( knobSmall_17, getTrackSettingsWidget(), + m_volumeKnob = new Knob( knobSmall_17, getTrackSettingsWidget(), tr( "Track volume" ) ); m_volumeKnob->setVolumeKnob( true ); m_volumeKnob->setModel( &_t->m_volumeModel ); diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index d537cc62e..53f35511a 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -35,11 +35,11 @@ #include "gui_templates.h" #include "MainWindow.h" #include "Mixer.h" -#include "rename_dialog.h" +#include "RenameDialog.h" #include "Song.h" #include "SongEditor.h" #include "templates.h" -#include "track_label_button.h" +#include "TrackLabelButton.h" @@ -292,7 +292,7 @@ void bbTCOView::resetName() void bbTCOView::changeName() { QString s = m_bbTCO->name(); - renameDialog rename_dlg( s ); + RenameDialog rename_dlg( s ); rename_dlg.exec(); m_bbTCO->setName( s ); } @@ -585,7 +585,7 @@ bbTrackView::bbTrackView( bbTrack * _bbt, TrackContainerView* tcv ) : // too), so disable it setAcceptDrops( false ); - m_trackLabel = new trackLabelButton( this, getTrackSettingsWidget() ); + m_trackLabel = new TrackLabelButton( this, getTrackSettingsWidget() ); m_trackLabel->setIcon( embed::getIconPixmap( "bb_track" ) ); m_trackLabel->move( 3, 1 ); m_trackLabel->show(); From 7d4f179b4b7dec878826d433efabfbccd6365a73 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 10:27:25 +0100 Subject: [PATCH 16/21] Rename a lot of files * about_dialog -> AboutDialog * bb_editor -> BBEditor * export_project_dialog -> ExportProjectDialog * setup_dialog -> SetupDialog * string_pair_drag -> StringPairDrag --- include/{about_dialog.h => AboutDialog.h} | 2 +- include/{bb_editor.h => BBEditor.h} | 2 +- include/{export_project_dialog.h => ExportProjectDialog.h} | 2 +- include/{setup_dialog.h => SetupDialog.h} | 2 +- include/{string_pair_drag.h => StringPairDrag.h} | 2 +- plugins/audio_file_processor/audio_file_processor.cpp | 2 +- plugins/patman/patman.cpp | 2 +- plugins/vestige/vestige.cpp | 2 +- plugins/zynaddsubfx/ZynAddSubFx.cpp | 2 +- src/core/Engine.cpp | 2 +- src/core/Song.cpp | 4 ++-- src/core/Track.cpp | 4 ++-- src/core/audio/AudioFileDevice.cpp | 2 +- src/gui/{about_dialog.cpp => AboutDialog.cpp} | 4 ++-- src/gui/AutomatableModelView.cpp | 2 +- src/gui/AutomationPatternView.cpp | 2 +- src/gui/{bb_editor.cpp => BBEditor.cpp} | 6 +++--- .../{export_project_dialog.cpp => ExportProjectDialog.cpp} | 4 ++-- src/gui/FileBrowser.cpp | 2 +- src/gui/InstrumentView.cpp | 2 +- src/gui/MainWindow.cpp | 6 +++--- src/gui/PianoView.cpp | 2 +- src/gui/PluginBrowser.cpp | 2 +- src/gui/{setup_dialog.cpp => SetupDialog.cpp} | 4 ++-- src/gui/{string_pair_drag.cpp => StringPairDrag.cpp} | 4 ++-- src/gui/TrackContainerView.cpp | 2 +- src/gui/widgets/AutomatableButton.cpp | 2 +- src/gui/widgets/EnvelopeAndLfoView.cpp | 2 +- src/gui/widgets/Graph.cpp | 2 +- src/gui/widgets/Knob.cpp | 2 +- src/tracks/AutomationTrack.cpp | 2 +- src/tracks/InstrumentTrack.cpp | 2 +- src/tracks/Pattern.cpp | 2 +- src/tracks/SampleTrack.cpp | 2 +- src/tracks/bb_track.cpp | 2 +- 35 files changed, 45 insertions(+), 45 deletions(-) rename include/{about_dialog.h => AboutDialog.h} (95%) rename include/{bb_editor.h => BBEditor.h} (97%) rename include/{export_project_dialog.h => ExportProjectDialog.h} (96%) rename include/{setup_dialog.h => SetupDialog.h} (98%) rename include/{string_pair_drag.h => StringPairDrag.h} (95%) rename src/gui/{about_dialog.cpp => AboutDialog.cpp} (96%) rename src/gui/{bb_editor.cpp => BBEditor.cpp} (98%) rename src/gui/{export_project_dialog.cpp => ExportProjectDialog.cpp} (98%) rename src/gui/{setup_dialog.cpp => SetupDialog.cpp} (99%) rename src/gui/{string_pair_drag.cpp => StringPairDrag.cpp} (96%) diff --git a/include/about_dialog.h b/include/AboutDialog.h similarity index 95% rename from include/about_dialog.h rename to include/AboutDialog.h index afab10727..b2c1f4504 100644 --- a/include/about_dialog.h +++ b/include/AboutDialog.h @@ -1,5 +1,5 @@ /* - * about_dialog.h - declaration of class aboutDialog + * AboutDialog.h - declaration of class aboutDialog * * Copyright (c) 2004-2008 Tobias Doerffel * diff --git a/include/bb_editor.h b/include/BBEditor.h similarity index 97% rename from include/bb_editor.h rename to include/BBEditor.h index adaf8600a..24701b074 100644 --- a/include/bb_editor.h +++ b/include/BBEditor.h @@ -1,5 +1,5 @@ /* - * bb_editor.h - view-component of BB-Editor + * BBEditor.h - view-component of BB-Editor * * Copyright (c) 2004-2014 Tobias Doerffel * diff --git a/include/export_project_dialog.h b/include/ExportProjectDialog.h similarity index 96% rename from include/export_project_dialog.h rename to include/ExportProjectDialog.h index 3de343800..e8ce98b76 100644 --- a/include/export_project_dialog.h +++ b/include/ExportProjectDialog.h @@ -1,5 +1,5 @@ /* - * export_project_dialog.h - declaration of class exportProjectDialog which is + * ExportProjectDialog.h - declaration of class exportProjectDialog which is * responsible for exporting project * * Copyright (c) 2004-2012 Tobias Doerffel diff --git a/include/setup_dialog.h b/include/SetupDialog.h similarity index 98% rename from include/setup_dialog.h rename to include/SetupDialog.h index fd726cf9b..75e0490aa 100644 --- a/include/setup_dialog.h +++ b/include/SetupDialog.h @@ -1,5 +1,5 @@ /* - * setup_dialog.h - dialog for setting up LMMS + * SetupDialog.h - dialog for setting up LMMS * * Copyright (c) 2005-2014 Tobias Doerffel * diff --git a/include/string_pair_drag.h b/include/StringPairDrag.h similarity index 95% rename from include/string_pair_drag.h rename to include/StringPairDrag.h index 733ae14d1..bf3b02a48 100644 --- a/include/string_pair_drag.h +++ b/include/StringPairDrag.h @@ -1,5 +1,5 @@ /* - * string_pair_drag.h - class stringPairDrag which provides general support + * StringPairDrag.h - class stringPairDrag which provides general support * for drag'n'drop of string-pairs * * Copyright (c) 2005-2007 Tobias Doerffel diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index dc56750e6..582d2cd07 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -39,7 +39,7 @@ #include "interpolation.h" #include "gui_templates.h" #include "ToolTip.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "DataFile.h" #include "embed.cpp" diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index fc094f4e1..710b1af0b 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -36,7 +36,7 @@ #include "NotePlayHandle.h" #include "PixmapButton.h" #include "Song.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "ToolTip.h" #include "FileDialog.h" diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 69349b3bf..92f1b1586 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -39,7 +39,7 @@ #include "VstPlugin.h" #include "MainWindow.h" #include "PixmapButton.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "TextFloat.h" #include "ToolTip.h" #include "FileDialog.h" diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index 4ba6876c9..c551c388a 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -39,7 +39,7 @@ #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" #include "gui_templates.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "RemoteZynAddSubFx.h" #include "LocalZynAddSubFx.h" #include "ControllerConnection.h" diff --git a/src/core/Engine.cpp b/src/core/Engine.cpp index 1d0057fad..d639a85af 100644 --- a/src/core/Engine.cpp +++ b/src/core/Engine.cpp @@ -25,7 +25,7 @@ #include "Engine.h" #include "AutomationEditor.h" -#include "bb_editor.h" +#include "BBEditor.h" #include "BBTrackContainer.h" #include "ConfigManager.h" #include "ControllerRackView.h" diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 42800c7f0..7b5307241 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -33,7 +33,7 @@ #include "Song.h" #include "AutomationTrack.h" #include "AutomationEditor.h" -#include "bb_editor.h" +#include "BBEditor.h" #include "bb_track.h" #include "BBTrackContainer.h" #include "ConfigManager.h" @@ -41,7 +41,7 @@ #include "ControllerConnection.h" #include "embed.h" #include "EnvelopeAndLfoParameters.h" -#include "export_project_dialog.h" +#include "ExportProjectDialog.h" #include "FxMixer.h" #include "FxMixerView.h" #include "ImportFilter.h" diff --git a/src/core/Track.cpp b/src/core/Track.cpp index e9a0e7e9e..422a5c5a7 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -49,7 +49,7 @@ #include "AutomationPattern.h" #include "AutomationTrack.h" -#include "bb_editor.h" +#include "BBEditor.h" #include "bb_track.h" #include "BBTrackContainer.h" #include "ConfigManager.h" @@ -64,7 +64,7 @@ #include "ProjectJournal.h" #include "SampleTrack.h" #include "Song.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "templates.h" #include "TextFloat.h" #include "ToolTip.h" diff --git a/src/core/audio/AudioFileDevice.cpp b/src/core/audio/AudioFileDevice.cpp index 813b522e4..8a49080c0 100644 --- a/src/core/audio/AudioFileDevice.cpp +++ b/src/core/audio/AudioFileDevice.cpp @@ -26,7 +26,7 @@ #include #include "AudioFileDevice.h" -#include "export_project_dialog.h" +#include "ExportProjectDialog.h" AudioFileDevice::AudioFileDevice( const sample_rate_t _sample_rate, diff --git a/src/gui/about_dialog.cpp b/src/gui/AboutDialog.cpp similarity index 96% rename from src/gui/about_dialog.cpp rename to src/gui/AboutDialog.cpp index f482f49ee..c02e81acd 100644 --- a/src/gui/about_dialog.cpp +++ b/src/gui/AboutDialog.cpp @@ -1,5 +1,5 @@ /* - * about_dialog.cpp - implementation of about-dialog + * AboutDialog.cpp - implementation of about-dialog * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -24,7 +24,7 @@ #include "lmmsversion.h" -#include "about_dialog.h" +#include "AboutDialog.h" #include "embed.h" #include "Engine.h" #include "MainWindow.h" diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 98926f714..23ba71edf 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -31,7 +31,7 @@ #include "ControllerConnection.h" #include "embed.h" #include "MainWindow.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index 17c1c6fc1..6ffb1c536 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -34,7 +34,7 @@ #include "gui_templates.h" #include "ProjectJournal.h" #include "RenameDialog.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "ToolTip.h" diff --git a/src/gui/bb_editor.cpp b/src/gui/BBEditor.cpp similarity index 98% rename from src/gui/bb_editor.cpp rename to src/gui/BBEditor.cpp index f95c2513e..41e29f9ab 100644 --- a/src/gui/bb_editor.cpp +++ b/src/gui/BBEditor.cpp @@ -1,5 +1,5 @@ /* - * bb_editor.cpp - basic main-window for editing of beats and basslines + * BBEditor.cpp - basic main-window for editing of beats and basslines * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -28,7 +28,7 @@ #include #include -#include "bb_editor.h" +#include "BBEditor.h" #include "BBTrackContainer.h" #include "embed.h" #include "MainWindow.h" @@ -36,7 +36,7 @@ #include "ToolButton.h" #include "ConfigManager.h" #include "DataFile.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "TrackContainer.h" #include "Pattern.h" diff --git a/src/gui/export_project_dialog.cpp b/src/gui/ExportProjectDialog.cpp similarity index 98% rename from src/gui/export_project_dialog.cpp rename to src/gui/ExportProjectDialog.cpp index 931529944..575feced2 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/ExportProjectDialog.cpp @@ -1,5 +1,5 @@ /* - * export_project_dialog.cpp - implementation of dialog for exporting project + * ExportProjectDialog.cpp - implementation of dialog for exporting project * * Copyright (c) 2004-2013 Tobias Doerffel * @@ -26,7 +26,7 @@ #include #include -#include "export_project_dialog.h" +#include "ExportProjectDialog.h" #include "Song.h" #include "Engine.h" #include "MainWindow.h" diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 23e37dae9..ba88682bc 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -47,7 +47,7 @@ #include "PresetPreviewPlayHandle.h" #include "SamplePlayHandle.h" #include "Song.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "TextFloat.h" diff --git a/src/gui/InstrumentView.cpp b/src/gui/InstrumentView.cpp index 60814ea8b..dedbaef8b 100644 --- a/src/gui/InstrumentView.cpp +++ b/src/gui/InstrumentView.cpp @@ -28,7 +28,7 @@ #include "embed.h" #include "Instrument.h" #include "InstrumentTrack.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" InstrumentView::InstrumentView( Instrument * _Instrument, QWidget * _parent ) : diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 2a6c1195b..e2ca40e49 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -37,7 +37,7 @@ #include "lmmsversion.h" #include "MainWindow.h" -#include "bb_editor.h" +#include "BBEditor.h" #include "SongEditor.h" #include "Song.h" #include "PianoRoll.h" @@ -46,7 +46,7 @@ #include "FxMixerView.h" #include "InstrumentTrack.h" #include "PianoView.h" -#include "about_dialog.h" +#include "AboutDialog.h" #include "ControllerRackView.h" #include "FileBrowser.h" #include "PluginBrowser.h" @@ -55,7 +55,7 @@ #include "Mixer.h" #include "PluginView.h" #include "ProjectNotes.h" -#include "setup_dialog.h" +#include "SetupDialog.h" #include "AudioDummy.h" #include "ToolPlugin.h" #include "ToolButton.h" diff --git a/src/gui/PianoView.cpp b/src/gui/PianoView.cpp index ece836420..225ad83ee 100644 --- a/src/gui/PianoView.cpp +++ b/src/gui/PianoView.cpp @@ -51,7 +51,7 @@ #include "gui_templates.h" #include "InstrumentTrack.h" #include "Knob.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "MainWindow.h" #include "MidiEvent.h" #include "templates.h" diff --git a/src/gui/PluginBrowser.cpp b/src/gui/PluginBrowser.cpp index a768a98a3..bb5da6286 100644 --- a/src/gui/PluginBrowser.cpp +++ b/src/gui/PluginBrowser.cpp @@ -33,7 +33,7 @@ #include "debug.h" #include "templates.h" #include "gui_templates.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" bool pluginBefore( const Plugin::Descriptor& d1, const Plugin::Descriptor& d2 ) diff --git a/src/gui/setup_dialog.cpp b/src/gui/SetupDialog.cpp similarity index 99% rename from src/gui/setup_dialog.cpp rename to src/gui/SetupDialog.cpp index d79ee1ba6..ba1173c0a 100644 --- a/src/gui/setup_dialog.cpp +++ b/src/gui/SetupDialog.cpp @@ -1,5 +1,5 @@ /* - * setup_dialog.cpp - dialog for setting up LMMS + * SetupDialog.cpp - dialog for setting up LMMS * * Copyright (c) 2005-2014 Tobias Doerffel * @@ -31,7 +31,7 @@ #include #include -#include "setup_dialog.h" +#include "SetupDialog.h" #include "TabBar.h" #include "tab_button.h" #include "TabWidget.h" diff --git a/src/gui/string_pair_drag.cpp b/src/gui/StringPairDrag.cpp similarity index 96% rename from src/gui/string_pair_drag.cpp rename to src/gui/StringPairDrag.cpp index d1f84efb6..98b030b19 100644 --- a/src/gui/string_pair_drag.cpp +++ b/src/gui/StringPairDrag.cpp @@ -1,5 +1,5 @@ /* - * string_pair_drag.cpp - class stringPairDrag which provides general support + * StringPairDrag.cpp - class stringPairDrag which provides general support * for drag'n'drop of string-pairs and which is the base * for all drag'n'drop-actions within LMMS * @@ -30,7 +30,7 @@ #include -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "Engine.h" #include "MainWindow.h" diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index 364a517d5..d64fe57f3 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -43,7 +43,7 @@ #include "DataFile.h" #include "Rubberband.h" #include "Song.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "Track.h" diff --git a/src/gui/widgets/AutomatableButton.cpp b/src/gui/widgets/AutomatableButton.cpp index 7680ac894..0a83d1469 100644 --- a/src/gui/widgets/AutomatableButton.cpp +++ b/src/gui/widgets/AutomatableButton.cpp @@ -32,7 +32,7 @@ #include "Engine.h" #include "embed.h" #include "MainWindow.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" diff --git a/src/gui/widgets/EnvelopeAndLfoView.cpp b/src/gui/widgets/EnvelopeAndLfoView.cpp index 3571c7455..bbbcd90f7 100644 --- a/src/gui/widgets/EnvelopeAndLfoView.cpp +++ b/src/gui/widgets/EnvelopeAndLfoView.cpp @@ -37,7 +37,7 @@ #include "DataFile.h" #include "Oscillator.h" #include "PixmapButton.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "TempoSyncKnob.h" #include "TextFloat.h" #include "ToolTip.h" diff --git a/src/gui/widgets/Graph.cpp b/src/gui/widgets/Graph.cpp index fa3607906..10a78287c 100644 --- a/src/gui/widgets/Graph.cpp +++ b/src/gui/widgets/Graph.cpp @@ -28,7 +28,7 @@ #include #include "Graph.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "SampleBuffer.h" #include "Oscillator.h" #include "Engine.h" diff --git a/src/gui/widgets/Knob.cpp b/src/gui/widgets/Knob.cpp index da2670302..376f57116 100644 --- a/src/gui/widgets/Knob.cpp +++ b/src/gui/widgets/Knob.cpp @@ -46,7 +46,7 @@ #include "MainWindow.h" #include "ProjectJournal.h" #include "Song.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "templates.h" #include "TextFloat.h" diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index e82a310f0..27ddd395a 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -29,7 +29,7 @@ #include "Engine.h" #include "embed.h" #include "ProjectJournal.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "TrackContainerView.h" #include "TrackLabelButton.h" diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 0d288603d..00f94da03 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -72,7 +72,7 @@ #include "PluginView.h" #include "SamplePlayHandle.h" #include "Song.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "TabWidget.h" #include "ToolTip.h" #include "TrackLabelButton.h" diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 0752e8eed..f9b65096f 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -47,7 +47,7 @@ #include "Song.h" #include "ToolTip.h" #include "BBTrackContainer.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "MainWindow.h" diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index 2f90c960d..ecd26a80c 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -41,7 +41,7 @@ #include "AudioPort.h" #include "SamplePlayHandle.h" #include "SampleRecordHandle.h" -#include "string_pair_drag.h" +#include "StringPairDrag.h" #include "Knob.h" #include "MainWindow.h" #include "EffectRackView.h" diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index 53f35511a..2d4903c50 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -27,7 +27,7 @@ #include #include -#include "bb_editor.h" +#include "BBEditor.h" #include "bb_track.h" #include "BBTrackContainer.h" #include "embed.h" From 95798da9d002f7b029594a5a28431aab5ecf4378 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 10:39:02 +0100 Subject: [PATCH 17/21] Rename a lot of classes * aboutDialog -> AboutDialog * bbEditor -> BBEditor * exportProjectDialog -> ExportProjectDialog * setupDialog -> SetupDialog * stringPairDrag -> StringPairDrag --- include/AboutDialog.h | 6 +- include/BBEditor.h | 6 +- include/BBTrackContainer.h | 2 +- include/Engine.h | 6 +- include/ExportProjectDialog.h | 8 +- include/Pattern.h | 2 +- include/SetupDialog.h | 6 +- include/StringPairDrag.h | 8 +- .../audio_file_processor.cpp | 8 +- plugins/patman/patman.cpp | 8 +- plugins/vestige/vestige.cpp | 16 ++-- plugins/zynaddsubfx/ZynAddSubFx.cpp | 8 +- src/core/Engine.cpp | 4 +- src/core/Song.cpp | 2 +- src/core/Track.cpp | 30 +++---- src/core/audio/AudioFileDevice.cpp | 4 +- src/gui/AboutDialog.cpp | 2 +- src/gui/AutomatableModelView.cpp | 2 +- src/gui/AutomationPatternView.cpp | 6 +- src/gui/BBEditor.cpp | 28 +++---- src/gui/ExportProjectDialog.cpp | 22 ++--- src/gui/FileBrowser.cpp | 10 +-- src/gui/MainWindow.cpp | 8 +- src/gui/PianoView.cpp | 2 +- src/gui/PluginBrowser.cpp | 2 +- src/gui/SetupDialog.cpp | 80 +++++++++---------- src/gui/StringPairDrag.cpp | 16 ++-- src/gui/TrackContainerView.cpp | 6 +- src/gui/widgets/AutomatableButton.cpp | 2 +- src/gui/widgets/EnvelopeAndLfoView.cpp | 8 +- src/gui/widgets/Graph.cpp | 6 +- src/gui/widgets/Knob.cpp | 8 +- src/tracks/AutomationTrack.cpp | 6 +- src/tracks/InstrumentTrack.cpp | 6 +- src/tracks/SampleTrack.cpp | 10 +-- 35 files changed, 177 insertions(+), 177 deletions(-) diff --git a/include/AboutDialog.h b/include/AboutDialog.h index b2c1f4504..788dc7a11 100644 --- a/include/AboutDialog.h +++ b/include/AboutDialog.h @@ -1,5 +1,5 @@ /* - * AboutDialog.h - declaration of class aboutDialog + * AboutDialog.h - declaration of class AboutDialog * * Copyright (c) 2004-2008 Tobias Doerffel * @@ -31,10 +31,10 @@ #include "ui_about_dialog.h" -class aboutDialog : public QDialog, public Ui::AboutDialog +class AboutDialog : public QDialog, public Ui::AboutDialog { public: - aboutDialog( void ); + AboutDialog( void ); } ; diff --git a/include/BBEditor.h b/include/BBEditor.h index 24701b074..84b99a0da 100644 --- a/include/BBEditor.h +++ b/include/BBEditor.h @@ -34,12 +34,12 @@ class ComboBox; class ToolButton; -class bbEditor : public TrackContainerView +class BBEditor : public TrackContainerView { Q_OBJECT public: - bbEditor( BBTrackContainer * _tc ); - virtual ~bbEditor(); + BBEditor( BBTrackContainer * _tc ); + virtual ~BBEditor(); virtual inline bool fixedTCOs() const { diff --git a/include/BBTrackContainer.h b/include/BBTrackContainer.h index 691bea13c..203b877b1 100644 --- a/include/BBTrackContainer.h +++ b/include/BBTrackContainer.h @@ -74,7 +74,7 @@ private: ComboBoxModel m_bbComboBoxModel; - friend class bbEditor; + friend class BBEditor; } ; diff --git a/include/Engine.h b/include/Engine.h index d317b52c4..b7839f817 100644 --- a/include/Engine.h +++ b/include/Engine.h @@ -34,7 +34,7 @@ #include "export.h" class AutomationEditor; -class bbEditor; +class BBEditor; class BBTrackContainer; class DummyTrackContainer; class FxMixer; @@ -113,7 +113,7 @@ public: return s_songEditor; } - static bbEditor * getBBEditor() + static BBEditor * getBBEditor() { return s_bbEditor; } @@ -189,7 +189,7 @@ private: static FxMixerView * s_fxMixerView; static SongEditor* s_songEditor; static AutomationEditor * s_automationEditor; - static bbEditor * s_bbEditor; + static BBEditor * s_bbEditor; static PianoRoll* s_pianoRoll; static ProjectNotes * s_projectNotes; static Ladspa2LMMS * s_ladspaManager; diff --git a/include/ExportProjectDialog.h b/include/ExportProjectDialog.h index e8ce98b76..46ab7fdb2 100644 --- a/include/ExportProjectDialog.h +++ b/include/ExportProjectDialog.h @@ -1,5 +1,5 @@ /* - * ExportProjectDialog.h - declaration of class exportProjectDialog which is + * ExportProjectDialog.h - declaration of class ExportProjectDialog which is * responsible for exporting project * * Copyright (c) 2004-2012 Tobias Doerffel @@ -34,12 +34,12 @@ #include "ProjectRenderer.h" -class exportProjectDialog : public QDialog, public Ui::ExportProjectDialog +class ExportProjectDialog : public QDialog, public Ui::ExportProjectDialog { Q_OBJECT public: - exportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export ); - virtual ~exportProjectDialog(); + ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export ); + virtual ~ExportProjectDialog(); protected: diff --git a/include/Pattern.h b/include/Pattern.h index 5deb67c45..584966c87 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -138,7 +138,7 @@ private: int m_steps; friend class PatternView; - friend class bbEditor; + friend class BBEditor; signals: diff --git a/include/SetupDialog.h b/include/SetupDialog.h index 75e0490aa..96d865f40 100644 --- a/include/SetupDialog.h +++ b/include/SetupDialog.h @@ -41,7 +41,7 @@ class QSlider; class TabBar; -class setupDialog : public QDialog +class SetupDialog : public QDialog { Q_OBJECT public: @@ -54,8 +54,8 @@ public: MidiSettings } ; - setupDialog( ConfigTabs _tab_to_open = GeneralSettings ); - virtual ~setupDialog(); + SetupDialog( ConfigTabs _tab_to_open = GeneralSettings ); + virtual ~SetupDialog(); protected slots: diff --git a/include/StringPairDrag.h b/include/StringPairDrag.h index bf3b02a48..ca6591bbc 100644 --- a/include/StringPairDrag.h +++ b/include/StringPairDrag.h @@ -1,5 +1,5 @@ /* - * StringPairDrag.h - class stringPairDrag which provides general support + * StringPairDrag.h - class StringPairDrag which provides general support * for drag'n'drop of string-pairs * * Copyright (c) 2005-2007 Tobias Doerffel @@ -36,12 +36,12 @@ class QPixmap; -class EXPORT stringPairDrag : public QDrag +class EXPORT StringPairDrag : public QDrag { public: - stringPairDrag( const QString & _key, const QString & _value, + StringPairDrag( const QString & _key, const QString & _value, const QPixmap & _icon, QWidget * _w ); - ~stringPairDrag(); + ~StringPairDrag(); static bool processDragEnterEvent( QDragEnterEvent * _dee, const QString & _allowed_keys ); diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index 582d2cd07..d18145b70 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -605,10 +605,10 @@ AudioFileProcessorView::~AudioFileProcessorView() void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee ) { - if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) ) + if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) ) { QString txt = _dee->mimeData()->data( - stringPairDrag::mimeType() ); + StringPairDrag::mimeType() ); if( txt.section( ':', 0, 0 ) == QString( "tco_%1" ).arg( Track::SampleTrack ) ) { @@ -634,8 +634,8 @@ void AudioFileProcessorView::dragEnterEvent( QDragEnterEvent * _dee ) void AudioFileProcessorView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == "samplefile" ) { castModel()->setAudioFile( value ); diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index 710b1af0b..b488ed72e 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -588,10 +588,10 @@ void PatmanView::updateFilename( void ) void PatmanView::dragEnterEvent( QDragEnterEvent * _dee ) { - if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) ) + if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) ) { QString txt = _dee->mimeData()->data( - stringPairDrag::mimeType() ); + StringPairDrag::mimeType() ); if( txt.section( ':', 0, 0 ) == "samplefile" ) { _dee->acceptProposedAction(); @@ -612,8 +612,8 @@ void PatmanView::dragEnterEvent( QDragEnterEvent * _dee ) void PatmanView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == "samplefile" ) { m_pi->setFile( value ); diff --git a/plugins/vestige/vestige.cpp b/plugins/vestige/vestige.cpp index 92f1b1586..e1dee04d5 100644 --- a/plugins/vestige/vestige.cpp +++ b/plugins/vestige/vestige.cpp @@ -791,10 +791,10 @@ void VestigeInstrumentView::noteOffAll( void ) void VestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee ) { - if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) ) + if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) ) { QString txt = _dee->mimeData()->data( - stringPairDrag::mimeType() ); + StringPairDrag::mimeType() ); if( txt.section( ':', 0, 0 ) == "vstplugin" ) { _dee->acceptProposedAction(); @@ -815,8 +815,8 @@ void VestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee ) void VestigeInstrumentView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == "vstplugin" ) { m_vi->loadFile( value ); @@ -1105,10 +1105,10 @@ void manageVestigeInstrumentView::setParameter( void ) void manageVestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee ) { - if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) ) + if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) ) { QString txt = _dee->mimeData()->data( - stringPairDrag::mimeType() ); + StringPairDrag::mimeType() ); if( txt.section( ':', 0, 0 ) == "vstplugin" ) { _dee->acceptProposedAction(); @@ -1129,8 +1129,8 @@ void manageVestigeInstrumentView::dragEnterEvent( QDragEnterEvent * _dee ) void manageVestigeInstrumentView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == "vstplugin" ) { m_vi->loadFile( value ); diff --git a/plugins/zynaddsubfx/ZynAddSubFx.cpp b/plugins/zynaddsubfx/ZynAddSubFx.cpp index c551c388a..b4ba7f15a 100644 --- a/plugins/zynaddsubfx/ZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/ZynAddSubFx.cpp @@ -571,10 +571,10 @@ ZynAddSubFxView::~ZynAddSubFxView() void ZynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee ) { - if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) ) + if( _dee->mimeData()->hasFormat( StringPairDrag::mimeType() ) ) { QString txt = _dee->mimeData()->data( - stringPairDrag::mimeType() ); + StringPairDrag::mimeType() ); if( txt.section( ':', 0, 0 ) == "pluginpresetfile" ) { _dee->acceptProposedAction(); @@ -595,8 +595,8 @@ void ZynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee ) void ZynAddSubFxView::dropEvent( QDropEvent * _de ) { - const QString type = stringPairDrag::decodeKey( _de ); - const QString value = stringPairDrag::decodeValue( _de ); + const QString type = StringPairDrag::decodeKey( _de ); + const QString value = StringPairDrag::decodeValue( _de ); if( type == "pluginpresetfile" ) { castModel()->loadFile( value ); diff --git a/src/core/Engine.cpp b/src/core/Engine.cpp index d639a85af..67a6a669f 100644 --- a/src/core/Engine.cpp +++ b/src/core/Engine.cpp @@ -57,7 +57,7 @@ BBTrackContainer * Engine::s_bbTrackContainer = NULL; Song * Engine::s_song = NULL; SongEditor* Engine::s_songEditor = NULL; AutomationEditor * Engine::s_automationEditor = NULL; -bbEditor * Engine::s_bbEditor = NULL; +BBEditor * Engine::s_bbEditor = NULL; PianoRoll* Engine::s_pianoRoll = NULL; ProjectNotes * Engine::s_projectNotes = NULL; ProjectJournal * Engine::s_projectJournal = NULL; @@ -97,7 +97,7 @@ void Engine::init( const bool _has_gui ) s_fxMixerView = new FxMixerView; s_controllerRackView = new ControllerRackView; s_projectNotes = new ProjectNotes; - s_bbEditor = new bbEditor( s_bbTrackContainer ); + s_bbEditor = new BBEditor( s_bbTrackContainer ); s_pianoRoll = new PianoRoll; s_automationEditor = new AutomationEditor; diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 7b5307241..8bc7f5c80 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -1221,7 +1221,7 @@ void Song::exportProject(bool multiExport) } const QString export_file_name = efd.selectedFiles()[0] + suffix; - exportProjectDialog epd( export_file_name, Engine::mainWindow(), multiExport ); + ExportProjectDialog epd( export_file_name, Engine::mainWindow(), multiExport ); epd.exec(); } } diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 422a5c5a7..663eb98ad 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -446,7 +446,7 @@ void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) } else { - stringPairDrag::processDragEnterEvent( _dee, "tco_" + + StringPairDrag::processDragEnterEvent( _dee, "tco_" + QString::number( m_tco->getTrack()->type() ) ); } } @@ -465,8 +465,8 @@ void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) */ void trackContentObjectView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); // Track must be the same type to paste into if( type != ( "tco_" + QString::number( m_tco->getTrack()->type() ) ) ) @@ -628,7 +628,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) 128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation ); - new stringPairDrag( QString( "tco_%1" ).arg( + new StringPairDrag( QString( "tco_%1" ).arg( m_tco->getTrack()->type() ), dataFile.toString(), thumbnail, this ); } @@ -750,7 +750,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) 128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation ); - new stringPairDrag( QString( "tco_%1" ).arg( + new StringPairDrag( QString( "tco_%1" ).arg( m_tco->getTrack()->type() ), dataFile.toString(), thumbnail, this ); } @@ -881,7 +881,7 @@ void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me ) { // If the CopySelection was chosen as the action due to mouse movement, // it will have been cleared. At this point Toggle is the desired action. - // An active stringPairDrag will prevent this method from being called, + // An active StringPairDrag will prevent this method from being called, // so a real CopySelection would not have occurred. if( m_action == CopySelection || ( m_action == ToggleSelected && mouseMovedDistance( _me, 2 ) == false ) ) @@ -1245,7 +1245,7 @@ void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) } else { - stringPairDrag::processDragEnterEvent( _dee, "tco_" + + StringPairDrag::processDragEnterEvent( _dee, "tco_" + QString::number( getTrack()->type() ) ); } } @@ -1261,8 +1261,8 @@ void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData ) { Track * t = getTrack(); - QString type = stringPairDrag::decodeMimeKey( mimeData ); - QString value = stringPairDrag::decodeMimeValue( mimeData ); + QString type = StringPairDrag::decodeMimeKey( mimeData ); + QString value = StringPairDrag::decodeMimeValue( mimeData ); // We can only paste into tracks of the same type if( type != ( "tco_" + QString::number( t->type() ) ) || @@ -1335,8 +1335,8 @@ bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) return false; } - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); getTrack()->addJournalCheckPoint(); @@ -1642,7 +1642,7 @@ void trackOperationsWidget::mousePressEvent( QMouseEvent * _me ) { DataFile dataFile( DataFile::DragNDropData ); m_trackView->getTrack()->saveState( dataFile, dataFile.content() ); - new stringPairDrag( QString( "track_%1" ).arg( + new StringPairDrag( QString( "track_%1" ).arg( m_trackView->getTrack()->type() ), dataFile.toString(), QPixmap::grabWidget( m_trackView->getTrackSettingsWidget() ), @@ -2511,7 +2511,7 @@ void trackView::modelChanged() */ void trackView::dragEnterEvent( QDragEnterEvent * _dee ) { - stringPairDrag::processDragEnterEvent( _dee, "track_" + + StringPairDrag::processDragEnterEvent( _dee, "track_" + QString::number( m_track->type() ) ); } @@ -2528,8 +2528,8 @@ void trackView::dragEnterEvent( QDragEnterEvent * _dee ) */ void trackView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == ( "track_" + QString::number( m_track->type() ) ) ) { // value contains our XML-data so simply create a diff --git a/src/core/audio/AudioFileDevice.cpp b/src/core/audio/AudioFileDevice.cpp index 8a49080c0..b04cc4ebd 100644 --- a/src/core/audio/AudioFileDevice.cpp +++ b/src/core/audio/AudioFileDevice.cpp @@ -51,8 +51,8 @@ AudioFileDevice::AudioFileDevice( const sample_rate_t _sample_rate, if( m_outputFile.open( QFile::WriteOnly | QFile::Truncate ) == false ) { QMessageBox::critical( NULL, - exportProjectDialog::tr( "Could not open file" ), - exportProjectDialog::tr( "Could not open file %1 " + ExportProjectDialog::tr( "Could not open file" ), + ExportProjectDialog::tr( "Could not open file %1 " "for writing.\nPlease make " "sure you have write-" "permission to the file and " diff --git a/src/gui/AboutDialog.cpp b/src/gui/AboutDialog.cpp index c02e81acd..a5b2390d5 100644 --- a/src/gui/AboutDialog.cpp +++ b/src/gui/AboutDialog.cpp @@ -32,7 +32,7 @@ -aboutDialog::aboutDialog() : +AboutDialog::AboutDialog() : QDialog( Engine::mainWindow() ), Ui::AboutDialog() { diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 23ba71edf..3a13ed5c7 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -146,7 +146,7 @@ void AutomatableModelView::mousePressEvent( QMouseEvent* event ) { if( event->button() == Qt::LeftButton && event->modifiers() & Qt::ControlModifier ) { - new stringPairDrag( "automatable_model", QString::number( modelUntyped()->id() ), QPixmap(), widget() ); + new StringPairDrag( "automatable_model", QString::number( modelUntyped()->id() ), QPixmap(), widget() ); event->accept(); } else if( event->button() == Qt::MidButton ) diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index 6ffb1c536..0760e1242 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -361,7 +361,7 @@ void AutomationPatternView::paintEvent( QPaintEvent * ) void AutomationPatternView::dragEnterEvent( QDragEnterEvent * _dee ) { - stringPairDrag::processDragEnterEvent( _dee, "automatable_model" ); + StringPairDrag::processDragEnterEvent( _dee, "automatable_model" ); if( !_dee->isAccepted() ) { trackContentObjectView::dragEnterEvent( _dee ); @@ -373,8 +373,8 @@ void AutomationPatternView::dragEnterEvent( QDragEnterEvent * _dee ) void AutomationPatternView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString val = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString val = StringPairDrag::decodeValue( _de ); if( type == "automatable_model" ) { AutomatableModel * mod = dynamic_cast( diff --git a/src/gui/BBEditor.cpp b/src/gui/BBEditor.cpp index 41e29f9ab..1115a2614 100644 --- a/src/gui/BBEditor.cpp +++ b/src/gui/BBEditor.cpp @@ -43,7 +43,7 @@ -bbEditor::bbEditor( BBTrackContainer* tc ) : +BBEditor::BBEditor( BBTrackContainer* tc ) : TrackContainerView( tc ), m_bbtc( tc ) { @@ -154,15 +154,15 @@ bbEditor::bbEditor( BBTrackContainer* tc ) : -bbEditor::~bbEditor() +BBEditor::~BBEditor() { } -void bbEditor::dropEvent( QDropEvent * de ) +void BBEditor::dropEvent( QDropEvent * de ) { - QString type = stringPairDrag::decodeKey( de ); - QString value = stringPairDrag::decodeValue( de ); + QString type = StringPairDrag::decodeKey( de ); + QString value = StringPairDrag::decodeValue( de ); if( type.left( 6 ) == "track_" ) { @@ -181,7 +181,7 @@ void bbEditor::dropEvent( QDropEvent * de ) } -void bbEditor::removeBBView( int _bb ) +void BBEditor::removeBBView( int _bb ) { foreach( trackView* view, trackViews() ) { @@ -192,7 +192,7 @@ void bbEditor::removeBBView( int _bb ) -void bbEditor::setPauseIcon( bool pause ) +void BBEditor::setPauseIcon( bool pause ) { if( pause == true ) { @@ -207,7 +207,7 @@ void bbEditor::setPauseIcon( bool pause ) -void bbEditor::play() +void BBEditor::play() { if( Engine::getSong()->playMode() != Song::Mode_PlayBB ) { @@ -222,7 +222,7 @@ void bbEditor::play() -void bbEditor::stop() +void BBEditor::stop() { Engine::getSong()->stop(); } @@ -230,7 +230,7 @@ void bbEditor::stop() -void bbEditor::updatePosition() +void BBEditor::updatePosition() { //realignTracks(); emit positionChanged( m_currentPosition ); @@ -239,7 +239,7 @@ void bbEditor::updatePosition() -void bbEditor::addAutomationTrack() +void BBEditor::addAutomationTrack() { (void) Track::create( Track::AutomationTrack, model() ); } @@ -247,7 +247,7 @@ void bbEditor::addAutomationTrack() -void bbEditor::addSteps() +void BBEditor::addSteps() { TrackContainer::TrackList tl = model()->tracks(); @@ -265,7 +265,7 @@ void bbEditor::addSteps() -void bbEditor::removeSteps() +void BBEditor::removeSteps() { TrackContainer::TrackList tl = model()->tracks(); @@ -283,7 +283,7 @@ void bbEditor::removeSteps() -void bbEditor::keyPressEvent( QKeyEvent * _ke ) +void BBEditor::keyPressEvent( QKeyEvent * _ke ) { if ( _ke->key() == Qt::Key_Space ) { diff --git a/src/gui/ExportProjectDialog.cpp b/src/gui/ExportProjectDialog.cpp index 575feced2..9d95c1b73 100644 --- a/src/gui/ExportProjectDialog.cpp +++ b/src/gui/ExportProjectDialog.cpp @@ -34,7 +34,7 @@ #include "bb_track.h" -exportProjectDialog::exportProjectDialog( const QString & _file_name, +ExportProjectDialog::ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export=false ) : QDialog( _parent ), Ui::ExportProjectDialog(), @@ -86,7 +86,7 @@ exportProjectDialog::exportProjectDialog( const QString & _file_name, -exportProjectDialog::~exportProjectDialog() +ExportProjectDialog::~ExportProjectDialog() { for( RenderVector::ConstIterator it = m_renderers.begin(); @@ -99,7 +99,7 @@ exportProjectDialog::~exportProjectDialog() -void exportProjectDialog::reject() +void ExportProjectDialog::reject() { for( RenderVector::ConstIterator it = m_renderers.begin(); it != m_renderers.end(); ++it ) { @@ -115,7 +115,7 @@ void exportProjectDialog::reject() -void exportProjectDialog::accept() +void ExportProjectDialog::accept() { // If more to render, kick off next render job if( m_renderers.isEmpty() == false ) @@ -140,7 +140,7 @@ void exportProjectDialog::accept() -void exportProjectDialog::closeEvent( QCloseEvent * _ce ) +void ExportProjectDialog::closeEvent( QCloseEvent * _ce ) { for( RenderVector::ConstIterator it = m_renderers.begin(); it != m_renderers.end(); ++it ) { @@ -159,7 +159,7 @@ void exportProjectDialog::closeEvent( QCloseEvent * _ce ) -void exportProjectDialog::popRender() +void ExportProjectDialog::popRender() { if( m_multiExport && m_tracksToRender.isEmpty() == false ) { @@ -189,7 +189,7 @@ void exportProjectDialog::popRender() -void exportProjectDialog::multiRender() +void ExportProjectDialog::multiRender() { m_dirName = m_fileName; QString path = QDir(m_fileName).filePath("text.txt"); @@ -246,7 +246,7 @@ void exportProjectDialog::multiRender() -ProjectRenderer* exportProjectDialog::prepRender() +ProjectRenderer* ExportProjectDialog::prepRender() { Mixer::qualitySettings qs = Mixer::qualitySettings( @@ -270,7 +270,7 @@ ProjectRenderer* exportProjectDialog::prepRender() -void exportProjectDialog::render( ProjectRenderer* renderer ) +void ExportProjectDialog::render( ProjectRenderer* renderer ) { if( renderer->isReady() ) @@ -290,7 +290,7 @@ void exportProjectDialog::render( ProjectRenderer* renderer ) -void exportProjectDialog::startBtnClicked() +void ExportProjectDialog::startBtnClicked() { m_ft = ProjectRenderer::NumFileFormats; @@ -335,7 +335,7 @@ void exportProjectDialog::startBtnClicked() -void exportProjectDialog::updateTitleBar( int _prog ) +void ExportProjectDialog::updateTitleBar( int _prog ) { Engine::mainWindow()->setWindowTitle( tr( "Rendering: %1%" ).arg( _prog ) ); diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index ba88682bc..ac84e404a 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -474,29 +474,29 @@ void FileBrowserTreeWidget::mouseMoveEvent( QMouseEvent * me ) switch( f->type() ) { case FileItem::PresetFile: - new stringPairDrag( f->handling() == FileItem::LoadAsPreset ? + new StringPairDrag( f->handling() == FileItem::LoadAsPreset ? "presetfile" : "pluginpresetfile", f->fullName(), embed::getIconPixmap( "preset_file" ), this ); break; case FileItem::SampleFile: - new stringPairDrag( "samplefile", f->fullName(), + new StringPairDrag( "samplefile", f->fullName(), embed::getIconPixmap( "sample_file" ), this ); break; case FileItem::SoundFontFile: - new stringPairDrag( "soundfontfile", f->fullName(), + new StringPairDrag( "soundfontfile", f->fullName(), embed::getIconPixmap( "soundfont_file" ), this ); break; case FileItem::VstPluginFile: - new stringPairDrag( "vstpluginfile", f->fullName(), + new StringPairDrag( "vstpluginfile", f->fullName(), embed::getIconPixmap( "vst_plugin_file" ), this ); break; case FileItem::MidiFile: // don't allow dragging FLP-files as FLP import filter clears project // without asking // case fileItem::FlpFile: - new stringPairDrag( "importedproject", f->fullName(), + new StringPairDrag( "importedproject", f->fullName(), embed::getIconPixmap( "midi_file" ), this ); break; diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index e2ca40e49..ec2d46787 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -519,14 +519,14 @@ void MainWindow::finalize() { ConfigManager::inst()->setValue( "app", "configured", "1" ); // no, so show it that user can setup everything - setupDialog sd; + SetupDialog sd; sd.exec(); } // look whether mixer could use a audio-interface beside AudioDummy else if( Engine::mixer()->audioDevName() == AudioDummy::name() ) { // no, so we offer setup-dialog with audio-settings... - setupDialog sd( setupDialog::AudioSettings ); + SetupDialog sd( SetupDialog::AudioSettings ); sd.exec(); } } @@ -834,7 +834,7 @@ bool MainWindow::saveProjectAsNewVersion() void MainWindow::showSettingsDialog() { - setupDialog sd; + SetupDialog sd; sd.exec(); } @@ -843,7 +843,7 @@ void MainWindow::showSettingsDialog() void MainWindow::aboutLMMS() { - aboutDialog().exec(); + AboutDialog().exec(); } diff --git a/src/gui/PianoView.cpp b/src/gui/PianoView.cpp index 225ad83ee..8b74c628b 100644 --- a/src/gui/PianoView.cpp +++ b/src/gui/PianoView.cpp @@ -482,7 +482,7 @@ void PianoView::mousePressEvent( QMouseEvent * _me ) { if( _me->modifiers() & Qt::ControlModifier ) { - new stringPairDrag( "automatable_model", + new StringPairDrag( "automatable_model", QString::number( m_piano->instrumentTrack()->baseNoteModel()->id() ), QPixmap(), this ); _me->accept(); diff --git a/src/gui/PluginBrowser.cpp b/src/gui/PluginBrowser.cpp index bb5da6286..e42164c60 100644 --- a/src/gui/PluginBrowser.cpp +++ b/src/gui/PluginBrowser.cpp @@ -211,7 +211,7 @@ void PluginDescWidget::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton ) { - new stringPairDrag( "instrument", m_pluginDescriptor.name, + new StringPairDrag( "instrument", m_pluginDescriptor.name, m_logo, this ); leaveEvent( _me ); } diff --git a/src/gui/SetupDialog.cpp b/src/gui/SetupDialog.cpp index ba1173c0a..f919ee6bf 100644 --- a/src/gui/SetupDialog.cpp +++ b/src/gui/SetupDialog.cpp @@ -84,7 +84,7 @@ inline void labelWidget( QWidget * _w, const QString & _txt ) -setupDialog::setupDialog( ConfigTabs _tab_to_open ) : +SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) : m_bufferSize( ConfigManager::inst()->value( "mixer", "framesperaudiobuffer" ).toInt() ), m_toolTips( !ConfigManager::inst()->value( "tooltips", @@ -782,7 +782,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) : -setupDialog::~setupDialog() +SetupDialog::~SetupDialog() { Engine::projectJournal()->setJournalling( true ); } @@ -790,7 +790,7 @@ setupDialog::~setupDialog() -void setupDialog::accept() +void SetupDialog::accept() { ConfigManager::inst()->setValue( "mixer", "framesperaudiobuffer", QString::number( m_bufferSize ) ); @@ -870,7 +870,7 @@ void setupDialog::accept() -void setupDialog::setBufferSize( int _value ) +void SetupDialog::setBufferSize( int _value ) { const int step = DEFAULT_BUFFER_SIZE / 64; if( _value > step && _value % step ) @@ -903,7 +903,7 @@ void setupDialog::setBufferSize( int _value ) -void setupDialog::resetBufSize() +void SetupDialog::resetBufSize() { setBufferSize( DEFAULT_BUFFER_SIZE / 64 ); } @@ -911,7 +911,7 @@ void setupDialog::resetBufSize() -void setupDialog::displayBufSizeHelp() +void SetupDialog::displayBufSizeHelp() { QWhatsThis::showText( QCursor::pos(), tr( "Here you can setup the internal buffer-size " @@ -926,7 +926,7 @@ void setupDialog::displayBufSizeHelp() -void setupDialog::toggleToolTips( bool _enabled ) +void SetupDialog::toggleToolTips( bool _enabled ) { m_toolTips = _enabled; } @@ -934,7 +934,7 @@ void setupDialog::toggleToolTips( bool _enabled ) -void setupDialog::toggleWarnAfterSetup( bool _enabled ) +void SetupDialog::toggleWarnAfterSetup( bool _enabled ) { m_warnAfterSetup = _enabled; } @@ -942,7 +942,7 @@ void setupDialog::toggleWarnAfterSetup( bool _enabled ) -void setupDialog::toggleDisplaydBV( bool _enabled ) +void SetupDialog::toggleDisplaydBV( bool _enabled ) { m_displaydBV = _enabled; } @@ -950,7 +950,7 @@ void setupDialog::toggleDisplaydBV( bool _enabled ) -void setupDialog::toggleMMPZ( bool _enabled ) +void SetupDialog::toggleMMPZ( bool _enabled ) { m_MMPZ = _enabled; } @@ -958,7 +958,7 @@ void setupDialog::toggleMMPZ( bool _enabled ) -void setupDialog::toggleHQAudioDev( bool _enabled ) +void SetupDialog::toggleHQAudioDev( bool _enabled ) { m_hqAudioDev = _enabled; } @@ -966,14 +966,14 @@ void setupDialog::toggleHQAudioDev( bool _enabled ) -void setupDialog::toggleSmoothScroll( bool _enabled ) +void SetupDialog::toggleSmoothScroll( bool _enabled ) { m_smoothScroll = _enabled; } -void setupDialog::toggleAutoSave( bool _enabled ) +void SetupDialog::toggleAutoSave( bool _enabled ) { m_enableAutoSave = _enabled; } @@ -983,7 +983,7 @@ void setupDialog::toggleAutoSave( bool _enabled ) -void setupDialog::toggleCompactTrackButtons( bool _enabled ) +void SetupDialog::toggleCompactTrackButtons( bool _enabled ) { m_compactTrackButtons = _enabled; } @@ -992,36 +992,36 @@ void setupDialog::toggleCompactTrackButtons( bool _enabled ) -void setupDialog::toggleSyncVSTPlugins( bool _enabled ) +void SetupDialog::toggleSyncVSTPlugins( bool _enabled ) { m_syncVSTPlugins = _enabled; } -void setupDialog::toggleAnimateAFP( bool _enabled ) +void SetupDialog::toggleAnimateAFP( bool _enabled ) { m_animateAFP = _enabled; } -void setupDialog::toggleNoteLabels( bool en ) +void SetupDialog::toggleNoteLabels( bool en ) { m_printNoteLabels = en; } -void setupDialog::toggleDisplayWaveform( bool en ) +void SetupDialog::toggleDisplayWaveform( bool en ) { m_displayWaveform = en; } -void setupDialog::toggleDisableAutoquit( bool en ) +void SetupDialog::toggleDisableAutoquit( bool en ) { m_disableAutoQuit = en; } -void setupDialog::toggleOneInstrumentTrackWindow( bool _enabled ) +void SetupDialog::toggleOneInstrumentTrackWindow( bool _enabled ) { m_oneInstrumentTrackWindow = _enabled; } @@ -1030,7 +1030,7 @@ void setupDialog::toggleOneInstrumentTrackWindow( bool _enabled ) -void setupDialog::openWorkingDir() +void SetupDialog::openWorkingDir() { QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose LMMS working directory" ), m_workingDir ); @@ -1043,7 +1043,7 @@ void setupDialog::openWorkingDir() -void setupDialog::setWorkingDir( const QString & _wd ) +void SetupDialog::setWorkingDir( const QString & _wd ) { m_workingDir = _wd; } @@ -1051,7 +1051,7 @@ void setupDialog::setWorkingDir( const QString & _wd ) -void setupDialog::openVSTDir() +void SetupDialog::openVSTDir() { QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose your VST-plugin directory" ), @@ -1065,7 +1065,7 @@ void setupDialog::openVSTDir() -void setupDialog::setVSTDir( const QString & _vd ) +void SetupDialog::setVSTDir( const QString & _vd ) { m_vstDir = _vd; } @@ -1073,7 +1073,7 @@ void setupDialog::setVSTDir( const QString & _vd ) -void setupDialog::openArtworkDir() +void SetupDialog::openArtworkDir() { QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose artwork-theme directory" ), @@ -1087,7 +1087,7 @@ void setupDialog::openArtworkDir() -void setupDialog::setArtworkDir( const QString & _ad ) +void SetupDialog::setArtworkDir( const QString & _ad ) { m_artworkDir = _ad; } @@ -1095,7 +1095,7 @@ void setupDialog::setArtworkDir( const QString & _ad ) -void setupDialog::openFLDir() +void SetupDialog::openFLDir() { QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose FL Studio installation directory" ), @@ -1109,7 +1109,7 @@ void setupDialog::openFLDir() -void setupDialog::openLADSPADir() +void SetupDialog::openLADSPADir() { QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose LADSPA plugin directory" ), @@ -1131,7 +1131,7 @@ void setupDialog::openLADSPADir() -void setupDialog::openSTKDir() +void SetupDialog::openSTKDir() { #ifdef LMMS_HAVE_STK QString new_dir = FileDialog::getExistingDirectory( this, @@ -1147,7 +1147,7 @@ void setupDialog::openSTKDir() -void setupDialog::openDefaultSoundfont() +void SetupDialog::openDefaultSoundfont() { #ifdef LMMS_HAVE_FLUIDSYNTH QString new_file = FileDialog::getOpenFileName( this, @@ -1164,7 +1164,7 @@ void setupDialog::openDefaultSoundfont() -void setupDialog::openBackgroundArtwork() +void SetupDialog::openBackgroundArtwork() { QList fileTypesList = QImageReader::supportedImageFormats(); QString fileTypes; @@ -1196,7 +1196,7 @@ void setupDialog::openBackgroundArtwork() -void setupDialog::setFLDir( const QString & _fd ) +void SetupDialog::setFLDir( const QString & _fd ) { m_flDir = _fd; } @@ -1204,7 +1204,7 @@ void setupDialog::setFLDir( const QString & _fd ) -void setupDialog::setLADSPADir( const QString & _fd ) +void SetupDialog::setLADSPADir( const QString & _fd ) { m_ladDir = _fd; } @@ -1212,7 +1212,7 @@ void setupDialog::setLADSPADir( const QString & _fd ) -void setupDialog::setSTKDir( const QString & _fd ) +void SetupDialog::setSTKDir( const QString & _fd ) { #ifdef LMMS_HAVE_STK m_stkDir = _fd; @@ -1222,7 +1222,7 @@ void setupDialog::setSTKDir( const QString & _fd ) -void setupDialog::setDefaultSoundfont( const QString & _sf ) +void SetupDialog::setDefaultSoundfont( const QString & _sf ) { #ifdef LMMS_HAVE_FLUIDSYNTH m_defaultSoundfont = _sf; @@ -1232,7 +1232,7 @@ void setupDialog::setDefaultSoundfont( const QString & _sf ) -void setupDialog::setBackgroundArtwork( const QString & _ba ) +void SetupDialog::setBackgroundArtwork( const QString & _ba ) { #ifdef LMMS_HAVE_FLUIDSYNTH m_backgroundArtwork = _ba; @@ -1242,7 +1242,7 @@ void setupDialog::setBackgroundArtwork( const QString & _ba ) -void setupDialog::audioInterfaceChanged( const QString & _iface ) +void SetupDialog::audioInterfaceChanged( const QString & _iface ) { for( AswMap::iterator it = m_audioIfaceSetupWidgets.begin(); it != m_audioIfaceSetupWidgets.end(); ++it ) @@ -1256,7 +1256,7 @@ void setupDialog::audioInterfaceChanged( const QString & _iface ) -void setupDialog::displayAudioHelp() +void SetupDialog::displayAudioHelp() { QWhatsThis::showText( QCursor::pos(), tr( "Here you can select your preferred " @@ -1272,7 +1272,7 @@ void setupDialog::displayAudioHelp() -void setupDialog::midiInterfaceChanged( const QString & _iface ) +void SetupDialog::midiInterfaceChanged( const QString & _iface ) { for( MswMap::iterator it = m_midiIfaceSetupWidgets.begin(); it != m_midiIfaceSetupWidgets.end(); ++it ) @@ -1286,7 +1286,7 @@ void setupDialog::midiInterfaceChanged( const QString & _iface ) -void setupDialog::displayMIDIHelp() +void SetupDialog::displayMIDIHelp() { QWhatsThis::showText( QCursor::pos(), tr( "Here you can select your preferred " diff --git a/src/gui/StringPairDrag.cpp b/src/gui/StringPairDrag.cpp index 98b030b19..ac0347530 100644 --- a/src/gui/StringPairDrag.cpp +++ b/src/gui/StringPairDrag.cpp @@ -1,5 +1,5 @@ /* - * StringPairDrag.cpp - class stringPairDrag which provides general support + * StringPairDrag.cpp - class StringPairDrag which provides general support * for drag'n'drop of string-pairs and which is the base * for all drag'n'drop-actions within LMMS * @@ -35,7 +35,7 @@ #include "MainWindow.h" -stringPairDrag::stringPairDrag( const QString & _key, const QString & _value, +StringPairDrag::StringPairDrag( const QString & _key, const QString & _value, const QPixmap & _icon, QWidget * _w ) : QDrag( _w ) { @@ -60,7 +60,7 @@ stringPairDrag::stringPairDrag( const QString & _key, const QString & _value, -stringPairDrag::~stringPairDrag() +StringPairDrag::~StringPairDrag() { // during a drag, we might have lost key-press-events, so reset // modifiers of main-win @@ -73,7 +73,7 @@ stringPairDrag::~stringPairDrag() -bool stringPairDrag::processDragEnterEvent( QDragEnterEvent * _dee, +bool StringPairDrag::processDragEnterEvent( QDragEnterEvent * _dee, const QString & _allowed_keys ) { if( !_dee->mimeData()->hasFormat( mimeType() ) ) @@ -93,7 +93,7 @@ bool stringPairDrag::processDragEnterEvent( QDragEnterEvent * _dee, -QString stringPairDrag::decodeMimeKey( const QMimeData * mimeData ) +QString StringPairDrag::decodeMimeKey( const QMimeData * mimeData ) { return( QString( mimeData->data( mimeType() ) ).section( ':', 0, 0 ) ); } @@ -101,7 +101,7 @@ QString stringPairDrag::decodeMimeKey( const QMimeData * mimeData ) -QString stringPairDrag::decodeMimeValue( const QMimeData * mimeData ) +QString StringPairDrag::decodeMimeValue( const QMimeData * mimeData ) { return( QString( mimeData->data( mimeType() ) ).section( ':', 1, -1 ) ); } @@ -109,7 +109,7 @@ QString stringPairDrag::decodeMimeValue( const QMimeData * mimeData ) -QString stringPairDrag::decodeKey( QDropEvent * _de ) +QString StringPairDrag::decodeKey( QDropEvent * _de ) { return decodeMimeKey( _de->mimeData() ); } @@ -117,7 +117,7 @@ QString stringPairDrag::decodeKey( QDropEvent * _de ) -QString stringPairDrag::decodeValue( QDropEvent * _de ) +QString StringPairDrag::decodeValue( QDropEvent * _de ) { return decodeMimeValue( _de->mimeData() ); } diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index d64fe57f3..4f78aad78 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -305,7 +305,7 @@ void TrackContainerView::clearAllTracks() void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee ) { - stringPairDrag::processDragEnterEvent( _dee, + StringPairDrag::processDragEnterEvent( _dee, QString( "presetfile,pluginpresetfile,samplefile,instrument," "importedproject,soundfontfile,vstpluginfile," "track_%1,track_%2" ). @@ -318,8 +318,8 @@ void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee ) void TrackContainerView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == "instrument" ) { InstrumentTrack * it = dynamic_cast( diff --git a/src/gui/widgets/AutomatableButton.cpp b/src/gui/widgets/AutomatableButton.cpp index 0a83d1469..1e482d7f7 100644 --- a/src/gui/widgets/AutomatableButton.cpp +++ b/src/gui/widgets/AutomatableButton.cpp @@ -129,7 +129,7 @@ void AutomatableButton::mousePressEvent( QMouseEvent * _me ) { // A group, we must get process it instead AutomatableModelView* groupView = (AutomatableModelView*)m_group; - new stringPairDrag( "automatable_model", + new StringPairDrag( "automatable_model", QString::number( groupView->modelUntyped()->id() ), QPixmap(), widget() ); // TODO: ^^ Maybe use a predefined icon instead of the button they happened to select diff --git a/src/gui/widgets/EnvelopeAndLfoView.cpp b/src/gui/widgets/EnvelopeAndLfoView.cpp index bbbcd90f7..5143a42e2 100644 --- a/src/gui/widgets/EnvelopeAndLfoView.cpp +++ b/src/gui/widgets/EnvelopeAndLfoView.cpp @@ -376,7 +376,7 @@ void EnvelopeAndLfoView::mousePressEvent( QMouseEvent * _me ) void EnvelopeAndLfoView::dragEnterEvent( QDragEnterEvent * _dee ) { - stringPairDrag::processDragEnterEvent( _dee, + StringPairDrag::processDragEnterEvent( _dee, QString( "samplefile,tco_%1" ).arg( Track::SampleTrack ) ); } @@ -386,12 +386,12 @@ void EnvelopeAndLfoView::dragEnterEvent( QDragEnterEvent * _dee ) void EnvelopeAndLfoView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == "samplefile" ) { m_params->m_userWave.setAudioFile( - stringPairDrag::decodeValue( _de ) ); + StringPairDrag::decodeValue( _de ) ); m_userLfoBtn->model()->setValue( true ); _de->accept(); } diff --git a/src/gui/widgets/Graph.cpp b/src/gui/widgets/Graph.cpp index 10a78287c..009bf4b3b 100644 --- a/src/gui/widgets/Graph.cpp +++ b/src/gui/widgets/Graph.cpp @@ -393,8 +393,8 @@ void Graph::paintEvent( QPaintEvent * ) void Graph::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString value = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString value = StringPairDrag::decodeValue( _de ); if( type == "samplefile" ) { @@ -406,7 +406,7 @@ void Graph::dropEvent( QDropEvent * _de ) void Graph::dragEnterEvent( QDragEnterEvent * _dee ) { - if( stringPairDrag::processDragEnterEvent( _dee, + if( StringPairDrag::processDragEnterEvent( _dee, QString( "samplefile" ) ) == false ) { _dee->ignore(); diff --git a/src/gui/widgets/Knob.cpp b/src/gui/widgets/Knob.cpp index 376f57116..e5d8be854 100644 --- a/src/gui/widgets/Knob.cpp +++ b/src/gui/widgets/Knob.cpp @@ -501,7 +501,7 @@ void Knob::toggleScale() void Knob::dragEnterEvent( QDragEnterEvent * _dee ) { - stringPairDrag::processDragEnterEvent( _dee, "float_value," + StringPairDrag::processDragEnterEvent( _dee, "float_value," "automatable_model" ); } @@ -510,8 +510,8 @@ void Knob::dragEnterEvent( QDragEnterEvent * _dee ) void Knob::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString val = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString val = StringPairDrag::decodeValue( _de ); if( type == "float_value" ) { model()->setValue( val.toFloat() ); @@ -563,7 +563,7 @@ void Knob::mousePressEvent( QMouseEvent * _me ) else if( _me->button() == Qt::LeftButton && Engine::mainWindow()->isShiftPressed() == true ) { - new stringPairDrag( "float_value", + new StringPairDrag( "float_value", QString::number( model()->value() ), QPixmap(), this ); } diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index 27ddd395a..b05f3fe69 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -151,7 +151,7 @@ AutomationTrackView::~AutomationTrackView() void AutomationTrackView::dragEnterEvent( QDragEnterEvent * _dee ) { - stringPairDrag::processDragEnterEvent( _dee, "automatable_model" ); + StringPairDrag::processDragEnterEvent( _dee, "automatable_model" ); } @@ -159,8 +159,8 @@ void AutomationTrackView::dragEnterEvent( QDragEnterEvent * _dee ) void AutomationTrackView::dropEvent( QDropEvent * _de ) { - QString type = stringPairDrag::decodeKey( _de ); - QString val = stringPairDrag::decodeValue( _de ); + QString type = StringPairDrag::decodeKey( _de ); + QString val = StringPairDrag::decodeValue( _de ); if( type == "automatable_model" ) { AutomatableModel * mod = dynamic_cast( diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 00f94da03..17ac527f5 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -1492,7 +1492,7 @@ void InstrumentTrackWindow::focusInEvent( QFocusEvent* ) void InstrumentTrackWindow::dragEnterEventGeneric( QDragEnterEvent* event ) { - stringPairDrag::processDragEnterEvent( event, "instrument,presetfile,pluginpresetfile" ); + StringPairDrag::processDragEnterEvent( event, "instrument,presetfile,pluginpresetfile" ); } @@ -1508,8 +1508,8 @@ void InstrumentTrackWindow::dragEnterEvent( QDragEnterEvent* event ) void InstrumentTrackWindow::dropEvent( QDropEvent* event ) { - QString type = stringPairDrag::decodeKey( event ); - QString value = stringPairDrag::decodeValue( event ); + QString type = StringPairDrag::decodeKey( event ); + QString value = StringPairDrag::decodeValue( event ); if( type == "instrument" ) { diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index ecd26a80c..d25ab2806 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -267,7 +267,7 @@ void SampleTCOView::contextMenuEvent( QContextMenuEvent * _cme ) void SampleTCOView::dragEnterEvent( QDragEnterEvent * _dee ) { - if( stringPairDrag::processDragEnterEvent( _dee, + if( StringPairDrag::processDragEnterEvent( _dee, "samplefile,sampledata" ) == false ) { trackContentObjectView::dragEnterEvent( _dee ); @@ -279,15 +279,15 @@ void SampleTCOView::dragEnterEvent( QDragEnterEvent * _dee ) void SampleTCOView::dropEvent( QDropEvent * _de ) { - if( stringPairDrag::decodeKey( _de ) == "samplefile" ) + if( StringPairDrag::decodeKey( _de ) == "samplefile" ) { - m_tco->setSampleFile( stringPairDrag::decodeValue( _de ) ); + m_tco->setSampleFile( StringPairDrag::decodeValue( _de ) ); _de->accept(); } - else if( stringPairDrag::decodeKey( _de ) == "sampledata" ) + else if( StringPairDrag::decodeKey( _de ) == "sampledata" ) { m_tco->m_sampleBuffer->loadFromBase64( - stringPairDrag::decodeValue( _de ) ); + StringPairDrag::decodeValue( _de ) ); m_tco->updateLength(); update(); _de->accept(); From 6d4a6ed9cd5e12b7172f01493c0d7f3a784e5eaf Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 10:53:47 +0100 Subject: [PATCH 18/21] Rename bbTrack, trackContentObject and friends --- include/AutomationPattern.h | 4 +- include/AutomationPatternView.h | 6 +- include/AutomationTrack.h | 6 +- include/{bb_track.h => BBTrack.h} | 46 ++-- include/BBTrackContainer.h | 2 +- include/InstrumentTrack.h | 6 +- include/Pattern.h | 10 +- include/SamplePlayHandle.h | 6 +- include/SampleRecordHandle.h | 4 +- include/SampleTrack.h | 14 +- include/Track.h | 94 ++++---- include/TrackContainerView.h | 16 +- include/TrackLabelButton.h | 6 +- plugins/HydrogenImport/HydrogenImport.cpp | 6 +- plugins/flp_import/FlpImport.cpp | 8 +- src/core/AutomationPattern.cpp | 12 +- src/core/BBTrackContainer.cpp | 10 +- src/core/DataFile.cpp | 2 +- src/core/SamplePlayHandle.cpp | 2 +- src/core/SampleRecordHandle.cpp | 2 +- src/core/Song.cpp | 6 +- src/core/Track.cpp | 266 +++++++++++----------- src/gui/AutomationPatternView.cpp | 10 +- src/gui/BBEditor.cpp | 2 +- src/gui/ExportProjectDialog.cpp | 2 +- src/gui/TrackContainerView.cpp | 24 +- src/gui/widgets/TrackLabelButton.cpp | 2 +- src/tracks/AutomationTrack.cpp | 10 +- src/tracks/{bb_track.cpp => BBTrack.cpp} | 106 ++++----- src/tracks/InstrumentTrack.cpp | 18 +- src/tracks/Pattern.cpp | 16 +- src/tracks/SampleTrack.cpp | 26 +-- 32 files changed, 375 insertions(+), 375 deletions(-) rename include/{bb_track.h => BBTrack.h} (79%) rename src/tracks/{bb_track.cpp => BBTrack.cpp} (82%) diff --git a/include/AutomationPattern.h b/include/AutomationPattern.h index ffe44318f..b6259b3c5 100644 --- a/include/AutomationPattern.h +++ b/include/AutomationPattern.h @@ -38,7 +38,7 @@ class MidiTime; -class EXPORT AutomationPattern : public trackContentObject +class EXPORT AutomationPattern : public TrackContentObject { Q_OBJECT public: @@ -148,7 +148,7 @@ public: void processMidiTime( const MidiTime & _time ); - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); static bool isAutomated( const AutomatableModel * _m ); diff --git a/include/AutomationPatternView.h b/include/AutomationPatternView.h index 23f68b559..2c2a6c96b 100644 --- a/include/AutomationPatternView.h +++ b/include/AutomationPatternView.h @@ -30,7 +30,7 @@ class AutomationPattern; -class AutomationPatternView : public trackContentObjectView +class AutomationPatternView : public TrackContentObjectView { Q_OBJECT @@ -39,7 +39,7 @@ class AutomationPatternView : public trackContentObjectView Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - AutomationPatternView( AutomationPattern * _pat, trackView * _parent ); + AutomationPatternView( AutomationPattern * _pat, TrackView * _parent ); virtual ~AutomationPatternView(); public slots: @@ -59,7 +59,7 @@ protected: virtual void resizeEvent( QResizeEvent * _re ) { m_needsUpdate = true; - trackContentObjectView::resizeEvent( _re ); + TrackContentObjectView::resizeEvent( _re ); } virtual void dragEnterEvent( QDragEnterEvent * _dee ); virtual void dropEvent( QDropEvent * _de ); diff --git a/include/AutomationTrack.h b/include/AutomationTrack.h index 84bb618da..e9af8e9f6 100644 --- a/include/AutomationTrack.h +++ b/include/AutomationTrack.h @@ -44,8 +44,8 @@ public: return "automationtrack"; } - virtual trackView * createView( TrackContainerView* ); - virtual trackContentObject * createTCO( const MidiTime & _pos ); + virtual TrackView * createView( TrackContainerView* ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ); @@ -58,7 +58,7 @@ private: -class AutomationTrackView : public trackView +class AutomationTrackView : public TrackView { public: AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv ); diff --git a/include/bb_track.h b/include/BBTrack.h similarity index 79% rename from include/bb_track.h rename to include/BBTrack.h index 6017e9bd5..b822c8e2b 100644 --- a/include/bb_track.h +++ b/include/BBTrack.h @@ -1,5 +1,5 @@ /* - * bb_track.h - class bbTrack, a wrapper for using bbEditor + * BBTrack.h - class BBTrack, a wrapper for using bbEditor * (which is a singleton-class) as track * * Copyright (c) 2004-2014 Tobias Doerffel @@ -36,11 +36,11 @@ class TrackLabelButton; class TrackContainer; -class bbTCO : public trackContentObject +class BBTCO : public TrackContentObject { public: - bbTCO( Track * _track ); - virtual ~bbTCO(); + BBTCO( Track * _track ); + virtual ~BBTCO(); virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); virtual void loadSettings( const QDomElement & _this ); @@ -71,25 +71,25 @@ public: int bbTrackIndex(); - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); private: QColor m_color; bool m_useStyleColor; - friend class bbTCOView; + friend class BBTCOView; } ; -class bbTCOView : public trackContentObjectView +class BBTCOView : public TrackContentObjectView { Q_OBJECT public: - bbTCOView( trackContentObject * _tco, trackView * _tv ); - virtual ~bbTCOView(); + BBTCOView( TrackContentObject * _tco, TrackView * _tv ); + virtual ~BBTCOView(); QColor color() const { @@ -113,30 +113,30 @@ protected: private: - bbTCO * m_bbTCO; + BBTCO * m_bbTCO; } ; -class EXPORT bbTrack : public Track +class EXPORT BBTrack : public Track { Q_OBJECT public: - bbTrack( TrackContainer* tc ); - virtual ~bbTrack(); + BBTrack( TrackContainer* tc ); + virtual ~BBTrack(); virtual bool play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _tco_num = -1 ); - virtual trackView * createView( TrackContainerView* tcv ); - virtual trackContentObject * createTCO( const MidiTime & _pos ); + virtual TrackView * createView( TrackContainerView* tcv ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ); virtual void loadTrackSpecificSettings( const QDomElement & _this ); - static bbTrack * findBBTrack( int _bb_num ); + static BBTrack * findBBTrack( int _bb_num ); static void swapBBTracks( Track * _track1, Track * _track2 ); int index() @@ -188,27 +188,27 @@ protected: private: QList m_disabledTracks; - typedef QMap infoMap; + typedef QMap infoMap; static infoMap s_infoMap; static QColor * s_lastTCOColor; - friend class bbTrackView; + friend class BBTrackView; } ; -class bbTrackView : public trackView +class BBTrackView : public TrackView { Q_OBJECT public: - bbTrackView( bbTrack* bbt, TrackContainerView* tcv ); - virtual ~bbTrackView(); + BBTrackView( BBTrack* bbt, TrackContainerView* tcv ); + virtual ~BBTrackView(); virtual bool close(); - const bbTrack * getBBTrack() const + const BBTrack * getBBTrack() const { return( m_bbTrack ); } @@ -219,7 +219,7 @@ public slots: private: - bbTrack * m_bbTrack; + BBTrack * m_bbTrack; TrackLabelButton * m_trackLabel; } ; diff --git a/include/BBTrackContainer.h b/include/BBTrackContainer.h index 203b877b1..a224495f0 100644 --- a/include/BBTrackContainer.h +++ b/include/BBTrackContainer.h @@ -58,7 +58,7 @@ public: void swapBB( int _bb1, int _bb2 ); - void updateBBTrack( trackContentObject * _tco ); + void updateBBTrack( TrackContentObject * _tco ); void fixIncorrectPositions(); void createTCOsForBB( int _bb ); diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index 3aeb6f6ae..04b93997f 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -125,10 +125,10 @@ public: virtual bool play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _tco_num = -1 ); // create new view for me - virtual trackView * createView( TrackContainerView* tcv ); + virtual TrackView * createView( TrackContainerView* tcv ); // create new track-content-object = pattern - virtual trackContentObject * createTCO( const MidiTime & _pos ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); // called by track @@ -269,7 +269,7 @@ private: -class InstrumentTrackView : public trackView +class InstrumentTrackView : public TrackView { Q_OBJECT public: diff --git a/include/Pattern.h b/include/Pattern.h index 584966c87..163b3429b 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -46,7 +46,7 @@ class SampleBuffer; -class EXPORT Pattern : public trackContentObject +class EXPORT Pattern : public TrackContentObject { Q_OBJECT public: @@ -110,7 +110,7 @@ public: bool empty(); - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); using Model::dataChanged; @@ -148,7 +148,7 @@ signals: -class PatternView : public trackContentObjectView +class PatternView : public TrackContentObjectView { Q_OBJECT @@ -156,7 +156,7 @@ class PatternView : public trackContentObjectView Q_PROPERTY( QColor fgColor READ fgColor WRITE setFgColor ) Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - PatternView( Pattern* pattern, trackView* parent ); + PatternView( Pattern* pattern, TrackView* parent ); virtual ~PatternView(); @@ -179,7 +179,7 @@ protected: virtual void resizeEvent( QResizeEvent * _re ) { m_needsUpdate = true; - trackContentObjectView::resizeEvent( _re ); + TrackContentObjectView::resizeEvent( _re ); } virtual void wheelEvent( QWheelEvent * _we ); diff --git a/include/SamplePlayHandle.h b/include/SamplePlayHandle.h index d77f9cef9..847277a5b 100644 --- a/include/SamplePlayHandle.h +++ b/include/SamplePlayHandle.h @@ -29,7 +29,7 @@ #include "SampleBuffer.h" #include "AutomatableModel.h" -class bbTrack; +class BBTrack; class SampleTCO; class Track; class AudioPort; @@ -64,7 +64,7 @@ public: m_doneMayReturnTrue = _enable; } - void setBBTrack( bbTrack * _bb_track ) + void setBBTrack( BBTrack * _bb_track ) { m_bbTrack = _bb_track; } @@ -88,7 +88,7 @@ private: FloatModel * m_volumeModel; Track * m_track; - bbTrack * m_bbTrack; + BBTrack * m_bbTrack; } ; diff --git a/include/SampleRecordHandle.h b/include/SampleRecordHandle.h index 4d3626cb6..b6a444396 100644 --- a/include/SampleRecordHandle.h +++ b/include/SampleRecordHandle.h @@ -32,7 +32,7 @@ #include "Mixer.h" #include "SampleBuffer.h" -class bbTrack; +class BBTrack; class SampleTCO; class Track; @@ -62,7 +62,7 @@ private: MidiTime m_minLength; Track * m_track; - bbTrack * m_bbTrack; + BBTrack * m_bbTrack; SampleTCO * m_tco; } ; diff --git a/include/SampleTrack.h b/include/SampleTrack.h index 4912f90e3..440b10e7e 100644 --- a/include/SampleTrack.h +++ b/include/SampleTrack.h @@ -35,7 +35,7 @@ class Knob; class SampleBuffer; -class SampleTCO : public trackContentObject +class SampleTCO : public TrackContentObject { Q_OBJECT mapPropertyFromModel(bool,isRecord,setRecord,m_recordModel); @@ -60,7 +60,7 @@ public: MidiTime sampleLength() const; - virtual trackContentObjectView * createView( trackView * _tv ); + virtual TrackContentObjectView * createView( TrackView * _tv ); public slots: @@ -85,7 +85,7 @@ signals: -class SampleTCOView : public trackContentObjectView +class SampleTCOView : public TrackContentObjectView { Q_OBJECT @@ -94,7 +94,7 @@ class SampleTCOView : public trackContentObjectView Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - SampleTCOView( SampleTCO * _tco, trackView * _tv ); + SampleTCOView( SampleTCO * _tco, TrackView * _tv ); virtual ~SampleTCOView(); @@ -127,8 +127,8 @@ public: virtual bool play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _tco_num = -1 ); - virtual trackView * createView( TrackContainerView* tcv ); - virtual trackContentObject * createTCO( const MidiTime & _pos ); + virtual TrackView * createView( TrackContainerView* tcv ); + virtual TrackContentObject * createTCO( const MidiTime & _pos ); virtual void saveTrackSpecificSettings( QDomDocument & _doc, @@ -157,7 +157,7 @@ private: -class SampleTrackView : public trackView +class SampleTrackView : public TrackView { Q_OBJECT public: diff --git a/include/Track.h b/include/Track.h index 778e422b2..8c7e05f23 100644 --- a/include/Track.h +++ b/include/Track.h @@ -47,11 +47,11 @@ class QPushButton; class PixmapButton; class TextFloat; class Track; -class trackContentObjectView; +class TrackContentObjectView; class TrackContainer; class TrackContainerView; -class trackContentWidget; -class trackView; +class TrackContentWidget; +class TrackView; typedef QWidget trackSettingsWidget; @@ -73,15 +73,15 @@ const int DEFAULT_TRACK_HEIGHT = 32; const int TCO_BORDER_WIDTH = 2; -class trackContentObject : public Model, public JournallingObject +class TrackContentObject : public Model, public JournallingObject { Q_OBJECT MM_OPERATORS mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel); mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel); public: - trackContentObject( Track * _track ); - virtual ~trackContentObject(); + TrackContentObject( Track * _track ); + virtual ~TrackContentObject(); inline Track * getTrack() const { @@ -124,7 +124,7 @@ public: virtual void movePosition( const MidiTime & _pos ); virtual void changeLength( const MidiTime & _length ); - virtual trackContentObjectView * createView( trackView * _tv ) = 0; + virtual TrackContentObjectView * createView( TrackView * _tv ) = 0; inline void selectViewOnCreate( bool select ) { @@ -168,13 +168,13 @@ private: bool m_selectViewOnCreate; - friend class trackContentObjectView; + friend class TrackContentObjectView; } ; -class trackContentObjectView : public selectableObject, public ModelView +class TrackContentObjectView : public selectableObject, public ModelView { Q_OBJECT @@ -183,12 +183,12 @@ class trackContentObjectView : public selectableObject, public ModelView Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor ) public: - trackContentObjectView( trackContentObject * _tco, trackView * _tv ); - virtual ~trackContentObjectView(); + TrackContentObjectView( TrackContentObject * _tco, TrackView * _tv ); + virtual ~TrackContentObjectView(); bool fixedTCOs(); - inline trackContentObject * getTrackContentObject() + inline TrackContentObject * getTrackContentObject() { return m_tco; } @@ -219,12 +219,12 @@ protected: void setAutoResizeEnabled( bool _e = false ); float pixelsPerTact(); - inline trackView * getTrackView() + inline TrackView * getTrackView() { return m_trackView; } - DataFile createTCODataFiles(const QVector & tcos) const; + DataFile createTCODataFiles(const QVector & tcos) const; protected slots: @@ -245,8 +245,8 @@ private: static TextFloat * s_textFloat; - trackContentObject * m_tco; - trackView * m_trackView; + TrackContentObject * m_tco; + TrackView * m_trackView; Actions m_action; bool m_autoResize; QPoint m_initialMousePos; @@ -274,7 +274,7 @@ private: -class trackContentWidget : public QWidget, public JournallingObject +class TrackContentWidget : public QWidget, public JournallingObject { Q_OBJECT @@ -283,14 +283,14 @@ class trackContentWidget : public QWidget, public JournallingObject Q_PROPERTY( QBrush lighterColor READ lighterColor WRITE setLighterColor ) public: - trackContentWidget( trackView * _parent ); - virtual ~trackContentWidget(); + TrackContentWidget( TrackView * _parent ); + virtual ~TrackContentWidget(); /*! \brief Updates the background tile pixmap. */ void updateBackground(); - void addTCOView( trackContentObjectView * _tcov ); - void removeTCOView( trackContentObjectView * _tcov ); + void addTCOView( TrackContentObjectView * _tcov ); + void removeTCOView( TrackContentObjectView * _tcov ); void removeTCOView( int _tco_num ) { if( _tco_num >= 0 && _tco_num < m_tcoViews.size() ) @@ -345,9 +345,9 @@ private: Track * getTrack(); MidiTime getPosition( int _mouse_x ); - trackView * m_trackView; + TrackView * m_trackView; - typedef QVector tcoViewVector; + typedef QVector tcoViewVector; tcoViewVector m_tcoViews; QPixmap m_background; @@ -361,12 +361,12 @@ private: -class trackOperationsWidget : public QWidget +class TrackOperationsWidget : public QWidget { Q_OBJECT public: - trackOperationsWidget( trackView * _parent ); - ~trackOperationsWidget(); + TrackOperationsWidget( TrackView * _parent ); + ~TrackOperationsWidget(); protected: @@ -385,17 +385,17 @@ private slots: private: static QPixmap * s_grip; - trackView * m_trackView; + TrackView * m_trackView; QPushButton * m_trackOps; PixmapButton * m_muteBtn; PixmapButton * m_soloBtn; - friend class trackView; + friend class TrackView; signals: - void trackRemovalScheduled( trackView * _t ); + void trackRemovalScheduled( TrackView * _t ); } ; @@ -411,7 +411,7 @@ class EXPORT Track : public Model, public JournallingObject mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel); mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel); public: - typedef QVector tcoVector; + typedef QVector tcoVector; enum TrackTypes { @@ -444,8 +444,8 @@ public: const f_cnt_t _frame_base, int _tco_num = -1 ) = 0; - virtual trackView * createView( TrackContainerView * _view ) = 0; - virtual trackContentObject * createTCO( const MidiTime & _pos ) = 0; + virtual TrackView * createView( TrackContainerView * _view ) = 0; + virtual TrackContentObject * createTCO( const MidiTime & _pos ) = 0; virtual void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ) = 0; @@ -460,15 +460,15 @@ public: m_simpleSerializingMode = true; } - // -- for usage by trackContentObject only --------------- - trackContentObject * addTCO( trackContentObject * _tco ); - void removeTCO( trackContentObject * _tco ); + // -- for usage by TrackContentObject only --------------- + TrackContentObject * addTCO( TrackContentObject * _tco ); + void removeTCO( TrackContentObject * _tco ); // ------------------------------------------------------- void deleteTCOs(); int numOfTCOs(); - trackContentObject * getTCO( int _tco_num ); - int getTCONum( trackContentObject * _tco ); + TrackContentObject * getTCO( int _tco_num ); + int getTCONum( TrackContentObject * _tco ); const tcoVector & getTCOs() const { @@ -549,25 +549,25 @@ private: QMutex m_processingLock; - friend class trackView; + friend class TrackView; signals: void destroyedTrack(); void nameChanged(); - void trackContentObjectAdded( trackContentObject * ); + void trackContentObjectAdded( TrackContentObject * ); } ; -class trackView : public QWidget, public ModelView, public JournallingObject +class TrackView : public QWidget, public ModelView, public JournallingObject { Q_OBJECT public: - trackView( Track * _track, TrackContainerView* tcv ); - virtual ~trackView(); + TrackView( Track * _track, TrackContainerView* tcv ); + virtual ~TrackView(); inline const Track * getTrack() const { @@ -584,7 +584,7 @@ public: return m_trackContainerView; } - inline trackOperationsWidget * getTrackOperationsWidget() + inline TrackOperationsWidget * getTrackOperationsWidget() { return( &m_trackOperationsWidget ); } @@ -594,7 +594,7 @@ public: return( &m_trackSettingsWidget ); } - inline trackContentWidget * getTrackContentWidget() + inline TrackContentWidget * getTrackContentWidget() { return( &m_trackContentWidget ); } @@ -651,9 +651,9 @@ private: Track * m_track; TrackContainerView * m_trackContainerView; - trackOperationsWidget m_trackOperationsWidget; + TrackOperationsWidget m_trackOperationsWidget; trackSettingsWidget m_trackSettingsWidget; - trackContentWidget m_trackContentWidget; + TrackContentWidget m_trackContentWidget; Actions m_action; @@ -662,7 +662,7 @@ private: private slots: - void createTCOView( trackContentObject * _tco ); + void createTCOView( TrackContentObject * _tco ); } ; diff --git a/include/TrackContainerView.h b/include/TrackContainerView.h index f4762f873..2745f86a4 100644 --- a/include/TrackContainerView.h +++ b/include/TrackContainerView.h @@ -73,7 +73,7 @@ public: void setPixelsPerTact( int _ppt ); - const trackView * trackViewAt( const int _y ) const; + const TrackView * trackViewAt( const int _y ) const; virtual bool allowRubberband() const; @@ -102,12 +102,12 @@ public: return m_tc; } - void moveTrackViewUp( trackView * _tv ); - void moveTrackViewDown( trackView * _tv ); + void moveTrackViewUp( TrackView * _tv ); + void moveTrackViewDown( TrackView * _tv ); // -- for usage by trackView only --------------- - trackView * addTrackView( trackView * _tv ); - void removeTrackView( trackView * _tv ); + TrackView * addTrackView( TrackView * _tv ); + void removeTrackView( TrackView * _tv ); // ------------------------------------------------------- void clearAllTracks(); @@ -121,13 +121,13 @@ public: public slots: void realignTracks(); void createTrackView( Track * _t ); - void deleteTrackView( trackView * _tv ); + void deleteTrackView( TrackView * _tv ); protected: static const int DEFAULT_PIXELS_PER_TACT = 16; - const QList & trackViews() const + const QList & trackViews() const { return( m_trackViews ); } @@ -164,7 +164,7 @@ private: } ; TrackContainer* m_tc; - typedef QList trackViewList; + typedef QList trackViewList; trackViewList m_trackViews; scrollArea * m_scrollArea; diff --git a/include/TrackLabelButton.h b/include/TrackLabelButton.h index 5dcb9ad13..7af8f495e 100644 --- a/include/TrackLabelButton.h +++ b/include/TrackLabelButton.h @@ -29,14 +29,14 @@ #include -class trackView; +class TrackView; class TrackLabelButton : public QToolButton { Q_OBJECT public: - TrackLabelButton( trackView * _tv, QWidget * _parent ); + TrackLabelButton( TrackView * _tv, QWidget * _parent ); virtual ~TrackLabelButton(); @@ -53,7 +53,7 @@ protected: private: - trackView * m_trackView; + TrackView * m_trackView; QString m_iconName; } ; diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 6cfe648d8..f86cdffd7 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -15,7 +15,7 @@ #include "Note.h" #include "Pattern.h" #include "Track.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "Instrument.h" @@ -305,8 +305,8 @@ bool HydrogenImport::readSong() patternId = ( QDomNode ) patternId.nextSiblingElement( "patternID" ); int i = pattern_id[patId]+song_num_tracks; - Track *t = ( bbTrack * ) s->tracks().at( i ); - trackContentObject *tco = t->createTCO( pos ); + Track *t = ( BBTrack * ) s->tracks().at( i ); + TrackContentObject *tco = t->createTCO( pos ); tco->movePosition( pos ); diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index cbd0100a2..499bfb646 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -33,7 +33,7 @@ #include "NotePlayHandle.h" #include "AutomationPattern.h" #include "basic_filters.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "ComboBox.h" #include "ConfigManager.h" @@ -1434,13 +1434,13 @@ else int cur_progress = 0; // create BB tracks - QList bb_tracks; + QList bb_tracks; QList i_tracks; while( Engine::getBBTrackContainer()->numOfBBs() <= p.maxPatterns ) { const int cur_pat = bb_tracks.size(); - bbTrack * bbt = dynamic_cast( + BBTrack * bbt = dynamic_cast( Track::create( Track::BBTrack, Engine::getSong() ) ); if( p.patternNames.contains( cur_pat ) ) { @@ -1752,7 +1752,7 @@ p->putValue( jt->pos, value, false ); { continue; } - trackContentObject * tco = bb_tracks[it->pattern]->createTCO( MidiTime() ); + TrackContentObject * tco = bb_tracks[it->pattern]->createTCO( MidiTime() ); tco->movePosition( it->position ); if( it->length != DefaultTicksPerTact ) { diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index 514dce55c..9164e733d 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -44,7 +44,7 @@ const float AutomationPattern::DEFAULT_MAX_VALUE = 1; AutomationPattern::AutomationPattern( AutomationTrack * _auto_track ) : - trackContentObject( _auto_track ), + TrackContentObject( _auto_track ), m_autoTrack( _auto_track ), m_objects(), m_tension( 1.0 ), @@ -60,7 +60,7 @@ AutomationPattern::AutomationPattern( AutomationTrack * _auto_track ) : AutomationPattern::AutomationPattern( const AutomationPattern & _pat_to_copy ) : - trackContentObject( _pat_to_copy.m_autoTrack ), + TrackContentObject( _pat_to_copy.m_autoTrack ), m_autoTrack( _pat_to_copy.m_autoTrack ), m_objects( _pat_to_copy.m_objects ), m_tension( _pat_to_copy.m_tension ), @@ -387,7 +387,7 @@ float *AutomationPattern::valuesAfter( const MidiTime & _time ) const void AutomationPattern::saveSettings( QDomDocument & _doc, QDomElement & _this ) { _this.setAttribute( "pos", startPosition() ); - _this.setAttribute( "len", trackContentObject::length() ); + _this.setAttribute( "len", TrackContentObject::length() ); _this.setAttribute( "name", name() ); _this.setAttribute( "prog", QString::number( progressionType() ) ); _this.setAttribute( "tens", QString::number( getTension() ) ); @@ -459,9 +459,9 @@ void AutomationPattern::loadSettings( const QDomElement & _this ) const QString AutomationPattern::name() const { - if( !trackContentObject::name().isEmpty() ) + if( !TrackContentObject::name().isEmpty() ) { - return trackContentObject::name(); + return TrackContentObject::name(); } if( !m_objects.isEmpty() && m_objects.first() != NULL ) { @@ -511,7 +511,7 @@ void AutomationPattern::processMidiTime( const MidiTime & time ) -trackContentObjectView * AutomationPattern::createView( trackView * _tv ) +TrackContentObjectView * AutomationPattern::createView( TrackView * _tv ) { return new AutomationPatternView( this, _tv ); } diff --git a/src/core/BBTrackContainer.cpp b/src/core/BBTrackContainer.cpp index e7d0f3246..7bf59f1d7 100644 --- a/src/core/BBTrackContainer.cpp +++ b/src/core/BBTrackContainer.cpp @@ -24,7 +24,7 @@ #include "BBTrackContainer.h" -#include "bb_track.h" +#include "BBTrack.h" #include "ComboBox.h" #include "embed.h" #include "Engine.h" @@ -152,9 +152,9 @@ void BBTrackContainer::swapBB( int _bb1, int _bb2 ) -void BBTrackContainer::updateBBTrack( trackContentObject * _tco ) +void BBTrackContainer::updateBBTrack( TrackContentObject * _tco ) { - bbTrack * t = bbTrack::findBBTrack( _tco->startPosition() / + BBTrack * t = BBTrack::findBBTrack( _tco->startPosition() / DefaultTicksPerTact ); if( t != NULL ) { @@ -211,7 +211,7 @@ void BBTrackContainer::updateComboBox() for( int i = 0; i < numOfBBs(); ++i ) { - bbTrack * bbt = bbTrack::findBBTrack( i ); + BBTrack * bbt = BBTrack::findBBTrack( i ); m_bbComboBoxModel.addItem( bbt->name() ); } setCurrentBB( cur_bb ); @@ -253,7 +253,7 @@ void BBTrackContainer::createTCOsForBB( int _bb ) while( tl[i]->numOfTCOs() < _bb + 1 ) { MidiTime position = MidiTime( tl[i]->numOfTCOs(), 0 ); - trackContentObject * tco = tl[i]->createTCO( position ); + TrackContentObject * tco = tl[i]->createTCO( position ); tco->movePosition( position ); tco->changeLength( MidiTime( 1, 0 ) ); } diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 3eec74935..ff0bf0d9b 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -43,7 +43,7 @@ #include "base64.h" // bbTCO::defaultColor() -#include "bb_track.h" +#include "BBTrack.h" diff --git a/src/core/SamplePlayHandle.cpp b/src/core/SamplePlayHandle.cpp index e1b9d99dd..a881a5f8e 100644 --- a/src/core/SamplePlayHandle.cpp +++ b/src/core/SamplePlayHandle.cpp @@ -24,7 +24,7 @@ #include "SamplePlayHandle.h" #include "AudioPort.h" -#include "bb_track.h" +#include "BBTrack.h" #include "Engine.h" #include "InstrumentTrack.h" #include "Pattern.h" diff --git a/src/core/SampleRecordHandle.cpp b/src/core/SampleRecordHandle.cpp index abfb78051..dc850cb70 100644 --- a/src/core/SampleRecordHandle.cpp +++ b/src/core/SampleRecordHandle.cpp @@ -24,7 +24,7 @@ #include "SampleRecordHandle.h" -#include "bb_track.h" +#include "BBTrack.h" #include "Engine.h" #include "InstrumentTrack.h" #include "Pattern.h" diff --git a/src/core/Song.cpp b/src/core/Song.cpp index 8bc7f5c80..12f66ec7f 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -34,7 +34,7 @@ #include "AutomationTrack.h" #include "AutomationEditor.h" #include "BBEditor.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "ConfigManager.h" #include "ControllerRackView.h" @@ -220,7 +220,7 @@ void Song::processNextBuffer() { tco_num = Engine::getBBTrackContainer()-> currentBB(); - track_list.push_back( bbTrack::findBBTrack( + track_list.push_back( BBTrack::findBBTrack( tco_num ) ); } break; @@ -673,7 +673,7 @@ void Song::removeBar() void Song::addBBTrack() { Track * t = Track::create( Track::BBTrack, this ); - Engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); + Engine::getBBTrackContainer()->setCurrentBB( dynamic_cast( t )->index() ); } diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 663eb98ad..188d57e08 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -50,7 +50,7 @@ #include "AutomationPattern.h" #include "AutomationTrack.h" #include "BBEditor.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "ConfigManager.h" #include "Clipboard.h" @@ -87,19 +87,19 @@ const int TRACK_OP_BTN_HEIGHT = 14; * beside the cursor as you move or resize elements of a track about. * This pointer keeps track of it, as you only ever need one at a time. */ -TextFloat * trackContentObjectView::s_textFloat = NULL; +TextFloat * TrackContentObjectView::s_textFloat = NULL; // =========================================================================== -// trackContentObject +// TrackContentObject // =========================================================================== -/*! \brief Create a new trackContentObject +/*! \brief Create a new TrackContentObject * * Creates a new track content object for the given track. * * \param _track The track that will contain the new object */ -trackContentObject::trackContentObject( Track * _track ) : +TrackContentObject::TrackContentObject( Track * _track ) : Model( _track ), m_track( _track ), m_name( QString::null ), @@ -121,12 +121,12 @@ trackContentObject::trackContentObject( Track * _track ) : -/*! \brief Destroy a trackContentObject +/*! \brief Destroy a TrackContentObject * * Destroys the given track content object. * */ -trackContentObject::~trackContentObject() +TrackContentObject::~TrackContentObject() { emit destroyedTCO(); @@ -139,14 +139,14 @@ trackContentObject::~trackContentObject() -/*! \brief Move this trackContentObject's position in time +/*! \brief Move this TrackContentObject's position in time * * If the track content object has moved, update its position. We * also add a journal entry for undo and update the display. * * \param _pos The new position of the track content object. */ -void trackContentObject::movePosition( const MidiTime & _pos ) +void TrackContentObject::movePosition( const MidiTime & _pos ) { if( m_startPosition != _pos ) { @@ -159,14 +159,14 @@ void trackContentObject::movePosition( const MidiTime & _pos ) -/*! \brief Change the length of this trackContentObject +/*! \brief Change the length of this TrackContentObject * * If the track content object's length has chaanged, update it. We * also add a journal entry for undo and update the display. * * \param _length The new length of the track content object. */ -void trackContentObject::changeLength( const MidiTime & _length ) +void TrackContentObject::changeLength( const MidiTime & _length ) { if( m_length != _length ) { @@ -179,11 +179,11 @@ void trackContentObject::changeLength( const MidiTime & _length ) -/*! \brief Copy this trackContentObject to the clipboard. +/*! \brief Copy this TrackContentObject to the clipboard. * * Copies this track content object to the clipboard. */ -void trackContentObject::copy() +void TrackContentObject::copy() { Clipboard::copy( this ); } @@ -191,13 +191,13 @@ void trackContentObject::copy() -/*! \brief Pastes this trackContentObject into a track. +/*! \brief Pastes this TrackContentObject into a track. * * Pastes this track content object into a track. * * \param _je The journal entry to undo */ -void trackContentObject::paste() +void TrackContentObject::paste() { if( Clipboard::getContent( nodeName() ) != NULL ) { @@ -210,7 +210,7 @@ void trackContentObject::paste() -/*! \brief Mutes this trackContentObject +/*! \brief Mutes this TrackContentObject * * Restore the previous state of this track content object. This will * restore the position or the length of the track content object @@ -218,7 +218,7 @@ void trackContentObject::paste() * * \param _je The journal entry to undo */ -void trackContentObject::toggleMute() +void TrackContentObject::toggleMute() { m_mutedModel.setValue( !m_mutedModel.value() ); emit dataChanged(); @@ -241,8 +241,8 @@ void trackContentObject::toggleMute() * \param _tco The track content object to be displayed * \param _tv The track view that will contain the new object */ -trackContentObjectView::trackContentObjectView( trackContentObject * _tco, - trackView * _tv ) : +TrackContentObjectView::TrackContentObjectView( TrackContentObject * _tco, + TrackView * _tv ) : selectableObject( _tv->getTrackContentWidget() ), ModelView( NULL, this ), m_tco( _tco ), @@ -290,7 +290,7 @@ trackContentObjectView::trackContentObjectView( trackContentObject * _tco, * Destroys the given track content object view. * */ -trackContentObjectView::~trackContentObjectView() +TrackContentObjectView::~TrackContentObjectView() { delete m_hint; // we have to give our track-container the focus because otherwise the @@ -311,7 +311,7 @@ trackContentObjectView::~trackContentObjectView() * \todo What the hell is a TCO here - track content object? And in * what circumstance are they fixed? */ -bool trackContentObjectView::fixedTCOs() +bool TrackContentObjectView::fixedTCOs() { return m_trackView->trackContainerView()->fixedTCOs(); } @@ -320,19 +320,19 @@ bool trackContentObjectView::fixedTCOs() // qproperty access functions, to be inherited & used by TCOviews //! \brief CSS theming qproperty access method -QColor trackContentObjectView::fgColor() const +QColor TrackContentObjectView::fgColor() const { return m_fgColor; } //! \brief CSS theming qproperty access method -QColor trackContentObjectView::textColor() const +QColor TrackContentObjectView::textColor() const { return m_textColor; } //! \brief CSS theming qproperty access method -void trackContentObjectView::setFgColor( const QColor & _c ) +void TrackContentObjectView::setFgColor( const QColor & _c ) { m_fgColor = QColor( _c ); } //! \brief CSS theming qproperty access method -void trackContentObjectView::setTextColor( const QColor & _c ) +void TrackContentObjectView::setTextColor( const QColor & _c ) { m_textColor = QColor( _c ); } @@ -343,7 +343,7 @@ void trackContentObjectView::setTextColor( const QColor & _c ) * * \return Boolean state of whether the QWidget was able to close. */ -bool trackContentObjectView::close() +bool TrackContentObjectView::close() { m_trackView->getTrackContentWidget()->removeTCOView( this ); return QWidget::close(); @@ -359,7 +359,7 @@ bool trackContentObjectView::close() * scheduled for later deletion rather than closed immediately. * */ -void trackContentObjectView::remove() +void TrackContentObjectView::remove() { m_trackView->getTrack()->addJournalCheckPoint(); @@ -376,7 +376,7 @@ void trackContentObjectView::remove() * Perform the 'cut' action of the clipboard - copies the track content * object to the clipboard and then removes it from the track. */ -void trackContentObjectView::cut() +void TrackContentObjectView::cut() { m_tco->copy(); remove(); @@ -392,7 +392,7 @@ void trackContentObjectView::cut() * the track content object's length in pixels adding in the border. * */ -void trackContentObjectView::updateLength() +void TrackContentObjectView::updateLength() { if( fixedTCOs() ) { @@ -418,7 +418,7 @@ void trackContentObjectView::updateLength() * view's length. * */ -void trackContentObjectView::updatePosition() +void TrackContentObjectView::updatePosition() { m_trackView->getTrackContentWidget()->changePosition(); // moving a TCO can result in change of song-length etc., @@ -436,9 +436,9 @@ void trackContentObjectView::updatePosition() * * \param _dee The QDragEnterEvent to watch. */ -void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) { - trackContentWidget * tcw = getTrackView()->getTrackContentWidget(); + TrackContentWidget * tcw = getTrackView()->getTrackContentWidget(); MidiTime tcoPos = MidiTime( m_tco->startPosition().getTact(), 0 ); if( tcw->canPasteSelection( tcoPos, _dee->mimeData() ) == false ) { @@ -463,7 +463,7 @@ void trackContentObjectView::dragEnterEvent( QDragEnterEvent * _dee ) * * \param _de The QDropEvent to handle. */ -void trackContentObjectView::dropEvent( QDropEvent * _de ) +void TrackContentObjectView::dropEvent( QDropEvent * _de ) { QString type = StringPairDrag::decodeKey( _de ); QString value = StringPairDrag::decodeValue( _de ); @@ -477,7 +477,7 @@ void trackContentObjectView::dropEvent( QDropEvent * _de ) // Defer to rubberband paste if we're in that mode if( m_trackView->trackContainerView()->allowRubberband() == true ) { - trackContentWidget * tcw = getTrackView()->getTrackContentWidget(); + TrackContentWidget * tcw = getTrackView()->getTrackContentWidget(); MidiTime tcoPos = MidiTime( m_tco->startPosition().getTact(), 0 ); if( tcw->pasteSelection( tcoPos, _de ) == true ) { @@ -489,7 +489,7 @@ void trackContentObjectView::dropEvent( QDropEvent * _de ) // Don't allow pasting a tco into itself. QObject* qwSource = _de->source(); if( qwSource != NULL && - dynamic_cast( qwSource ) == this ) + dynamic_cast( qwSource ) == this ) { return; } @@ -511,7 +511,7 @@ void trackContentObjectView::dropEvent( QDropEvent * _de ) * * \param _e The QEvent to watch. */ -void trackContentObjectView::leaveEvent( QEvent * _e ) +void TrackContentObjectView::leaveEvent( QEvent * _e ) { while( QApplication::overrideCursor() != NULL ) { @@ -532,15 +532,15 @@ void trackContentObjectView::leaveEvent( QEvent * _e ) * * \param tcos The trackContectObjects to save in a DataFile */ -DataFile trackContentObjectView::createTCODataFiles( - const QVector & tcoViews) const +DataFile TrackContentObjectView::createTCODataFiles( + const QVector & tcoViews) const { Track * t = m_trackView->getTrack(); TrackContainer * tc = t->trackContainer(); DataFile dataFile( DataFile::DragNDropData ); QDomElement tcoParent = dataFile.createElement( "tcos" ); - typedef QVector tcoViewVector; + typedef QVector tcoViewVector; for( tcoViewVector::const_iterator it = tcoViews.begin(); it != tcoViews.end(); ++it ) { @@ -587,7 +587,7 @@ DataFile trackContentObjectView::createTCODataFiles( * * \param _me The QMouseEvent to handle. */ -void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) +void TrackContentObjectView::mousePressEvent( QMouseEvent * _me ) { setInitialMousePos( _me->pos() ); if( m_trackView->trackContainerView()->allowRubberband() == true && @@ -621,7 +621,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) _me->modifiers() & Qt::ControlModifier ) { // start drag-action - QVector tcoViews; + QVector tcoViews; tcoViews.push_back( this ); DataFile dataFile = createTCODataFiles( tcoViews ); QPixmap thumbnail = QPixmap::grabWidget( this ).scaled( @@ -714,7 +714,7 @@ void trackContentObjectView::mousePressEvent( QMouseEvent * _me ) * \param _me The QMouseEvent to handle. * \todo what does the final else case do here? */ -void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) +void TrackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) { if( m_action == CopySelection ) { @@ -728,14 +728,14 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) m_action = NoAction; // Collect all selected TCOs - QVector tcoViews; + QVector tcoViews; QVector so = m_trackView->trackContainerView()->selectedObjects(); for( QVector::iterator it = so.begin(); it != so.end(); ++it ) { - trackContentObjectView * tcov = - dynamic_cast( *it ); + TrackContentObjectView * tcov = + dynamic_cast( *it ); if( tcov != NULL ) { tcoViews.push_back( tcov ); @@ -789,27 +789,27 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) const int dx = _me->x() - m_initialMousePos.x(); QVector so = m_trackView->trackContainerView()->selectedObjects(); - QVector tcos; + QVector tcos; MidiTime smallest_pos, t; // find out smallest position of all selected objects for not // moving an object before zero for( QVector::iterator it = so.begin(); it != so.end(); ++it ) { - trackContentObjectView * tcov = - dynamic_cast( *it ); + TrackContentObjectView * tcov = + dynamic_cast( *it ); if( tcov == NULL ) { continue; } - trackContentObject * tco = tcov->m_tco; + TrackContentObject * tco = tcov->m_tco; tcos.push_back( tco ); smallest_pos = qMin( smallest_pos, (int)tco->startPosition() + static_cast( dx * MidiTime::ticksPerTact() / ppt ) ); } - for( QVector::iterator it = tcos.begin(); + for( QVector::iterator it = tcos.begin(); it != tcos.end(); ++it ) { t = ( *it )->startPosition() + @@ -877,7 +877,7 @@ void trackContentObjectView::mouseMoveEvent( QMouseEvent * _me ) * * \param _me The QMouseEvent to handle. */ -void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me ) +void TrackContentObjectView::mouseReleaseEvent( QMouseEvent * _me ) { // If the CopySelection was chosen as the action due to mouse movement, // it will have been cleared. At this point Toggle is the desired action. @@ -911,7 +911,7 @@ void trackContentObjectView::mouseReleaseEvent( QMouseEvent * _me ) * * \param _cme The QContextMenuEvent to add the actions to. */ -void trackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme ) +void TrackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme ) { if( _cme->modifiers() ) { @@ -949,7 +949,7 @@ void trackContentObjectView::contextMenuEvent( QContextMenuEvent * _cme ) * * \return the number of pixels per tact (bar). */ -float trackContentObjectView::pixelsPerTact() +float TrackContentObjectView::pixelsPerTact() { return m_trackView->trackContainerView()->pixelsPerTact(); } @@ -962,7 +962,7 @@ float trackContentObjectView::pixelsPerTact() * \param _e The boolean state of whether this track content object view * is allowed to resize. */ -void trackContentObjectView::setAutoResizeEnabled( bool _e ) +void TrackContentObjectView::setAutoResizeEnabled( bool _e ) { m_autoResize = _e; } @@ -975,7 +975,7 @@ void trackContentObjectView::setAutoResizeEnabled( bool _e ) * \param _me The QMouseEvent. * \param distance The threshold distance that the mouse has moved to return true. */ -bool trackContentObjectView::mouseMovedDistance( QMouseEvent * _me, int distance ) +bool TrackContentObjectView::mouseMovedDistance( QMouseEvent * _me, int distance ) { QPoint dPos = mapToGlobal( _me->pos() ) - m_initialMouseGlobalPos; const int pixelsMoved = dPos.manhattanLength(); @@ -996,7 +996,7 @@ bool trackContentObjectView::mouseMovedDistance( QMouseEvent * _me, int distance * * \param _track The parent track. */ -trackContentWidget::trackContentWidget( trackView * _parent ) : +TrackContentWidget::TrackContentWidget( TrackView * _parent ) : QWidget( _parent ), m_trackView( _parent ) { @@ -1018,14 +1018,14 @@ trackContentWidget::trackContentWidget( trackView * _parent ) : * * Destroys the trackContentWidget. */ -trackContentWidget::~trackContentWidget() +TrackContentWidget::~TrackContentWidget() { } -void trackContentWidget::updateBackground() +void TrackContentWidget::updateBackground() { const int tactsPerBar = 4; const TrackContainerView * tcv = m_trackView->trackContainerView(); @@ -1074,9 +1074,9 @@ void trackContentWidget::updateBackground() * * \param _tcov The trackContentObjectView to add. */ -void trackContentWidget::addTCOView( trackContentObjectView * _tcov ) +void TrackContentWidget::addTCOView( TrackContentObjectView * _tcov ) { - trackContentObject * tco = _tcov->getTrackContentObject(); + TrackContentObject * tco = _tcov->getTrackContentObject(); m_tcoViews.push_back( _tcov ); @@ -1094,7 +1094,7 @@ void trackContentWidget::addTCOView( trackContentObjectView * _tcov ) * * \param _tcov The trackContentObjectView to add. */ -void trackContentWidget::removeTCOView( trackContentObjectView * _tcov ) +void TrackContentWidget::removeTCOView( TrackContentObjectView * _tcov ) { tcoViewVector::iterator it = qFind( m_tcoViews.begin(), m_tcoViews.end(), @@ -1112,7 +1112,7 @@ void trackContentWidget::removeTCOView( trackContentObjectView * _tcov ) /*! \brief Update ourselves by updating all the tCOViews attached. * */ -void trackContentWidget::update() +void TrackContentWidget::update() { for( tcoViewVector::iterator it = m_tcoViews.begin(); it != m_tcoViews.end(); ++it ) @@ -1132,7 +1132,7 @@ void trackContentWidget::update() * * \param _new_pos The MIDI time to move to. */ -void trackContentWidget::changePosition( const MidiTime & _new_pos ) +void TrackContentWidget::changePosition( const MidiTime & _new_pos ) { if( m_trackView->trackContainerView() == Engine::getBBEditor() ) { @@ -1183,8 +1183,8 @@ void trackContentWidget::changePosition( const MidiTime & _new_pos ) for( tcoViewVector::iterator it = m_tcoViews.begin(); it != m_tcoViews.end(); ++it ) { - trackContentObjectView * tcov = *it; - trackContentObject * tco = tcov->getTrackContentObject(); + TrackContentObjectView * tcov = *it; + TrackContentObject * tco = tcov->getTrackContentObject(); tco->changeLength( tco->length() ); @@ -1220,7 +1220,7 @@ void trackContentWidget::changePosition( const MidiTime & _new_pos ) * * \param _mouse_x the mouse's current X position in pixels. */ -MidiTime trackContentWidget::getPosition( int _mouse_x ) +MidiTime TrackContentWidget::getPosition( int _mouse_x ) { TrackContainerView * tv = m_trackView->trackContainerView(); return MidiTime( tv->currentPosition() + @@ -1236,7 +1236,7 @@ MidiTime trackContentWidget::getPosition( int _mouse_x ) * * \param _dee the Drag Enter Event to respond to */ -void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) { MidiTime tcoPos = MidiTime( getPosition( _dee->pos().x() ).getTact(), 0 ); if( canPasteSelection( tcoPos, _dee->mimeData() ) == false ) @@ -1258,7 +1258,7 @@ void trackContentWidget::dragEnterEvent( QDragEnterEvent * _dee ) * \param tcoPos the position of the TCO slot being pasted on * \param _de the DropEvent generated */ -bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData ) +bool TrackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * mimeData ) { Track * t = getTrack(); QString type = StringPairDrag::decodeMimeKey( mimeData ); @@ -1328,7 +1328,7 @@ bool trackContentWidget::canPasteSelection( MidiTime tcoPos, const QMimeData * m * \param tcoPos the position of the TCO slot being pasted on * \param _de the DropEvent generated */ -bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) +bool TrackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) { if( canPasteSelection( tcoPos, _de->mimeData() ) == false ) { @@ -1393,7 +1393,7 @@ bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) MidiTime delta = offset + ( oldTact - grabbedTCOTact ); MidiTime pos = tcoPos + delta; - trackContentObject * tco = t->createTCO( pos ); + TrackContentObject * tco = t->createTCO( pos ); tco->restoreState( tcoElement ); tco->movePosition( pos ); if( allowRubberband == true ) @@ -1412,7 +1412,7 @@ bool trackContentWidget::pasteSelection( MidiTime tcoPos, QDropEvent * _de ) * * \param _de the Drop Event to respond to */ -void trackContentWidget::dropEvent( QDropEvent * _de ) +void TrackContentWidget::dropEvent( QDropEvent * _de ) { MidiTime tcoPos = MidiTime( getPosition( _de->pos().x() ).getTact(), 0 ); if( pasteSelection( tcoPos, _de ) == true ) @@ -1428,7 +1428,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de ) * * \param _me the mouse press event to respond to */ -void trackContentWidget::mousePressEvent( QMouseEvent * _me ) +void TrackContentWidget::mousePressEvent( QMouseEvent * _me ) { if( m_trackView->trackContainerView()->allowRubberband() == true ) { @@ -1443,7 +1443,7 @@ void trackContentWidget::mousePressEvent( QMouseEvent * _me ) { const MidiTime pos = getPosition( _me->x() ).getTact() * MidiTime::ticksPerTact(); - trackContentObject * tco = getTrack()->createTCO( pos ); + TrackContentObject * tco = getTrack()->createTCO( pos ); tco->saveJournallingState( false ); tco->movePosition( pos ); @@ -1459,7 +1459,7 @@ void trackContentWidget::mousePressEvent( QMouseEvent * _me ) * * \param _pe the Paint Event to respond to */ -void trackContentWidget::paintEvent( QPaintEvent * _pe ) +void TrackContentWidget::paintEvent( QPaintEvent * _pe ) { // Assume even-pixels-per-tact. Makes sense, should be like this anyways const TrackContainerView * tcv = m_trackView->trackContainerView(); @@ -1480,7 +1480,7 @@ void trackContentWidget::paintEvent( QPaintEvent * _pe ) * * \param resizeEvent the resize event to pass to base class */ -void trackContentWidget::resizeEvent( QResizeEvent * resizeEvent ) +void TrackContentWidget::resizeEvent( QResizeEvent * resizeEvent ) { // Update backgroud updateBackground(); @@ -1494,7 +1494,7 @@ void trackContentWidget::resizeEvent( QResizeEvent * resizeEvent ) /*! \brief Return the track shown by the trackContentWidget * */ -Track * trackContentWidget::getTrack() +Track * TrackContentWidget::getTrack() { return m_trackView->getTrack(); } @@ -1506,7 +1506,7 @@ Track * trackContentWidget::getTrack() * * \param _pos_start the starting position of the Widget (from getPosition()) */ -MidiTime trackContentWidget::endPosition( const MidiTime & _pos_start ) +MidiTime TrackContentWidget::endPosition( const MidiTime & _pos_start ) { const float ppt = m_trackView->trackContainerView()->pixelsPerTact(); const int w = width(); @@ -1518,19 +1518,19 @@ MidiTime trackContentWidget::endPosition( const MidiTime & _pos_start ) // qproperty access methods //! \brief CSS theming qproperty access method -QBrush trackContentWidget::darkerColor() const +QBrush TrackContentWidget::darkerColor() const { return m_darkerColor; } //! \brief CSS theming qproperty access method -QBrush trackContentWidget::lighterColor() const +QBrush TrackContentWidget::lighterColor() const { return m_lighterColor; } //! \brief CSS theming qproperty access method -void trackContentWidget::setDarkerColor( const QBrush & c ) +void TrackContentWidget::setDarkerColor( const QBrush & c ) { m_darkerColor = c; } //! \brief CSS theming qproperty access method -void trackContentWidget::setLighterColor( const QBrush & c ) +void TrackContentWidget::setLighterColor( const QBrush & c ) { m_lighterColor = c; } @@ -1540,7 +1540,7 @@ void trackContentWidget::setLighterColor( const QBrush & c ) // =========================================================================== -QPixmap * trackOperationsWidget::s_grip = NULL; /*!< grip pixmap */ +QPixmap * TrackOperationsWidget::s_grip = NULL; /*!< grip pixmap */ /*! \brief Create a new trackOperationsWidget @@ -1549,7 +1549,7 @@ QPixmap * trackOperationsWidget::s_grip = NULL; /*!< grip pixmap */ * * \param _parent the trackView to contain this widget */ -trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : +TrackOperationsWidget::TrackOperationsWidget( TrackView * _parent ) : QWidget( _parent ), /*!< The parent widget */ m_trackView( _parent ) /*!< The parent track view */ { @@ -1605,9 +1605,9 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : m_soloBtn->show(); ToolTip::add( m_soloBtn, tr( "Solo" ) ); - connect( this, SIGNAL( trackRemovalScheduled( trackView * ) ), + connect( this, SIGNAL( trackRemovalScheduled( TrackView * ) ), m_trackView->trackContainerView(), - SLOT( deleteTrackView( trackView * ) ), + SLOT( deleteTrackView( TrackView * ) ), Qt::QueuedConnection ); } @@ -1617,7 +1617,7 @@ trackOperationsWidget::trackOperationsWidget( trackView * _parent ) : /*! \brief Destroy an existing trackOperationsWidget * */ -trackOperationsWidget::~trackOperationsWidget() +TrackOperationsWidget::~TrackOperationsWidget() { } @@ -1634,7 +1634,7 @@ trackOperationsWidget::~trackOperationsWidget() * * \param _me The mouse event to respond to. */ -void trackOperationsWidget::mousePressEvent( QMouseEvent * _me ) +void TrackOperationsWidget::mousePressEvent( QMouseEvent * _me ) { if( _me->button() == Qt::LeftButton && _me->modifiers() & Qt::ControlModifier && @@ -1670,7 +1670,7 @@ void trackOperationsWidget::mousePressEvent( QMouseEvent * _me ) * \todo Flesh this out a bit - is it correct? * \param _pe The paint event to respond to */ -void trackOperationsWidget::paintEvent( QPaintEvent * _pe ) +void TrackOperationsWidget::paintEvent( QPaintEvent * _pe ) { QPainter p( this ); p.fillRect( rect(), palette().brush(QPalette::Background) ); @@ -1695,14 +1695,14 @@ void trackOperationsWidget::paintEvent( QPaintEvent * _pe ) /*! \brief Clone this track * */ -void trackOperationsWidget::cloneTrack() +void TrackOperationsWidget::cloneTrack() { m_trackView->getTrack()->clone(); } /*! \brief Clear this track - clears all TCOs from the track */ -void trackOperationsWidget::clearTrack() +void TrackOperationsWidget::clearTrack() { Track * t = m_trackView->getTrack(); t->lock(); @@ -1715,7 +1715,7 @@ void trackOperationsWidget::clearTrack() /*! \brief Remove this track from the track list * */ -void trackOperationsWidget::removeTrack() +void TrackOperationsWidget::removeTrack() { emit trackRemovalScheduled( m_trackView ); } @@ -1731,7 +1731,7 @@ void trackOperationsWidget::removeTrack() * on all TCOs (same should be added for sample tracks when * sampletrack recording is implemented) */ -void trackOperationsWidget::updateMenu() +void TrackOperationsWidget::updateMenu() { QMenu * to_menu = m_trackOps->menu(); to_menu->clear(); @@ -1761,7 +1761,7 @@ void trackOperationsWidget::updateMenu() } -void trackOperationsWidget::recordingOn() +void TrackOperationsWidget::recordingOn() { AutomationTrackView * atv = dynamic_cast( m_trackView ); if( atv ) @@ -1777,7 +1777,7 @@ void trackOperationsWidget::recordingOn() } -void trackOperationsWidget::recordingOff() +void TrackOperationsWidget::recordingOff() { AutomationTrackView * atv = dynamic_cast( m_trackView ); if( atv ) @@ -1831,7 +1831,7 @@ Track::Track( TrackTypes _type, TrackContainer * _tc ) : * If the track container is a Beat+Bassline container, step through * its list of tracks and remove us. * - * Then delete the trackContentObject's contents, remove this track from + * Then delete the TrackContentObject's contents, remove this track from * the track container. * * Finally step through this track's automation and forget all of them. @@ -1865,7 +1865,7 @@ Track * Track::create( TrackTypes _tt, TrackContainer * _tc ) switch( _tt ) { case InstrumentTrack: t = new ::InstrumentTrack( _tc ); break; - case BBTrack: t = new bbTrack( _tc ); break; + case BBTrack: t = new ::BBTrack( _tc ); break; case SampleTrack: t = new ::SampleTrack( _tc ); break; // case EVENT_TRACK: // case VIDEO_TRACK: @@ -1971,7 +1971,7 @@ void Track::saveSettings( QDomDocument & _doc, QDomElement & _this ) /*! \brief Load the settings from a file * * We load the track's type and muted state and solo state, then clear out our - * current trackContentObject. + * current TrackContentObject. * * Then we step through the QDomElement's children and load the * track-specific settings and trackContentObjects states from it @@ -2028,7 +2028,7 @@ void Track::loadSettings( const QDomElement & _this ) else if( !node.toElement().attribute( "metadata" ).toInt() ) { - trackContentObject * tco = createTCO( + TrackContentObject * tco = createTCO( MidiTime( 0 ) ); tco->restoreState( node.toElement() ); saveJournallingState( false ); @@ -2048,11 +2048,11 @@ void Track::loadSettings( const QDomElement & _this ) -/*! \brief Add another trackContentObject into this track +/*! \brief Add another TrackContentObject into this track * - * \param _tco The trackContentObject to attach to this track. + * \param _tco The TrackContentObject to attach to this track. */ -trackContentObject * Track::addTCO( trackContentObject * _tco ) +TrackContentObject * Track::addTCO( TrackContentObject * _tco ) { m_trackContentObjects.push_back( _tco ); @@ -2064,11 +2064,11 @@ trackContentObject * Track::addTCO( trackContentObject * _tco ) -/*! \brief Remove a given trackContentObject from this track +/*! \brief Remove a given TrackContentObject from this track * - * \param _tco The trackContentObject to remove from this track. + * \param _tco The TrackContentObject to remove from this track. */ -void Track::removeTCO( trackContentObject * _tco ) +void Track::removeTCO( TrackContentObject * _tco ) { tcoVector::iterator it = qFind( m_trackContentObjects.begin(), m_trackContentObjects.end(), @@ -2107,19 +2107,19 @@ int Track::numOfTCOs() -/*! \brief Get a trackContentObject by number +/*! \brief Get a TrackContentObject by number * * If the TCO number is less than our TCO array size then fetch that * numbered object from the array. Otherwise we warn the user that * we've somehow requested a TCO that is too large, and create a new * TCO for them. - * \param _tco_number The number of the trackContentObject to fetch. - * \return the given trackContentObject or a new one if out of range. + * \param _tco_number The number of the TrackContentObject to fetch. + * \return the given TrackContentObject or a new one if out of range. * \todo reject TCO numbers less than zero. * \todo if we create a TCO here, should we somehow attach it to the * track? */ -trackContentObject * Track::getTCO( int _tco_num ) +TrackContentObject * Track::getTCO( int _tco_num ) { if( _tco_num < m_trackContentObjects.size() ) { @@ -2134,12 +2134,12 @@ trackContentObject * Track::getTCO( int _tco_num ) -/*! \brief Determine the given trackContentObject's number in our array. +/*! \brief Determine the given TrackContentObject's number in our array. * - * \param _tco The trackContentObject to search for. + * \param _tco The TrackContentObject to search for. * \return its number in our array. */ -int Track::getTCONum( trackContentObject * _tco ) +int Track::getTCONum( TrackContentObject * _tco ) { // for( int i = 0; i < getTrackContentWidget()->numOfTCOs(); ++i ) tcoVector::iterator it = qFind( m_trackContentObjects.begin(), @@ -2179,7 +2179,7 @@ void Track::getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start, for( tcoVector::iterator it_o = m_trackContentObjects.begin(); it_o != m_trackContentObjects.end(); ++it_o ) { - trackContentObject * tco = ( *it_o ); + TrackContentObject * tco = ( *it_o ); int s = tco->startPosition(); int e = tco->endPosition(); if( ( s <= _end ) && ( e >= _start ) ) @@ -2215,8 +2215,8 @@ void Track::getTCOsInRange( tcoVector & _tco_v, const MidiTime & _start, * First, we arrange to swap the positions of the two TCOs in the * trackContentObjects list. Then we swap their start times as well. * - * \param _tco_num1 The first trackContentObject to swap. - * \param _tco_num2 The second trackContentObject to swap. + * \param _tco_num1 The first TrackContentObject to swap. + * \param _tco_num2 The second TrackContentObject to swap. */ void Track::swapPositionOfTCOs( int _tco_num1, int _tco_num2 ) { @@ -2371,7 +2371,7 @@ void Track::toggleSolo() * \param _tcv The track Container View for us to be displayed in. * \todo Is my description of these properties correct? */ -trackView::trackView( Track * _track, TrackContainerView * _tcv ) : +TrackView::TrackView( Track * _track, TrackContainerView * _tcv ) : QWidget( _tcv->contentWidget() ), /*!< The Track Container View's content widget. */ ModelView( NULL, this ), /*!< The model view of this track */ m_track( _track ), /*!< The track we're displaying */ @@ -2404,8 +2404,8 @@ trackView::trackView( Track * _track, TrackContainerView * _tcv ) : connect( m_track, SIGNAL( destroyedTrack() ), this, SLOT( close() ) ); connect( m_track, - SIGNAL( trackContentObjectAdded( trackContentObject * ) ), - this, SLOT( createTCOView( trackContentObject * ) ), + SIGNAL( trackContentObjectAdded( TrackContentObject * ) ), + this, SLOT( createTCOView( TrackContentObject * ) ), Qt::QueuedConnection ); connect( &m_track->m_mutedModel, SIGNAL( dataChanged() ), @@ -2430,7 +2430,7 @@ trackView::trackView( Track * _track, TrackContainerView * _tcv ) : /*! \brief Destroy this track View. * */ -trackView::~trackView() +TrackView::~TrackView() { } @@ -2441,7 +2441,7 @@ trackView::~trackView() * * \param _re the Resize Event to handle. */ -void trackView::resizeEvent( QResizeEvent * _re ) +void TrackView::resizeEvent( QResizeEvent * _re ) { if( ConfigManager::inst()->value( "ui", "compacttrackbuttons" ).toInt() ) @@ -2463,7 +2463,7 @@ void trackView::resizeEvent( QResizeEvent * _re ) /*! \brief Update this track View and all its content objects. * */ -void trackView::update() +void TrackView::update() { m_trackContentWidget.update(); if( !m_trackContainerView->fixedTCOs() ) @@ -2479,7 +2479,7 @@ void trackView::update() /*! \brief Close this track View. * */ -bool trackView::close() +bool TrackView::close() { m_trackContainerView->removeTrackView( this ); return QWidget::close(); @@ -2491,7 +2491,7 @@ bool trackView::close() /*! \brief Register that the model of this track View has changed. * */ -void trackView::modelChanged() +void TrackView::modelChanged() { m_track = castModel(); assert( m_track != NULL ); @@ -2509,7 +2509,7 @@ void trackView::modelChanged() * * \param _dee the DragEnterEvent to start. */ -void trackView::dragEnterEvent( QDragEnterEvent * _dee ) +void TrackView::dragEnterEvent( QDragEnterEvent * _dee ) { StringPairDrag::processDragEnterEvent( _dee, "track_" + QString::number( m_track->type() ) ); @@ -2526,7 +2526,7 @@ void trackView::dragEnterEvent( QDragEnterEvent * _dee ) * * \param _de the DropEvent to handle. */ -void trackView::dropEvent( QDropEvent * _de ) +void TrackView::dropEvent( QDropEvent * _de ) { QString type = StringPairDrag::decodeKey( _de ); QString value = StringPairDrag::decodeValue( _de ); @@ -2558,7 +2558,7 @@ void trackView::dropEvent( QDropEvent * _de ) * * \param _me the MouseEvent to handle. */ -void trackView::mousePressEvent( QMouseEvent * _me ) +void TrackView::mousePressEvent( QMouseEvent * _me ) { // If previously dragged too small, restore on shift-leftclick if( height() < DEFAULT_TRACK_HEIGHT && @@ -2622,7 +2622,7 @@ void trackView::mousePressEvent( QMouseEvent * _me ) * * \param _me the MouseEvent to handle. */ -void trackView::mouseMoveEvent( QMouseEvent * _me ) +void TrackView::mouseMoveEvent( QMouseEvent * _me ) { if( m_trackContainerView->allowRubberband() == true ) @@ -2633,7 +2633,7 @@ void trackView::mouseMoveEvent( QMouseEvent * _me ) { // look which track-widget the mouse-cursor is over const int y_pos = m_trackContainerView->contentWidget()->mapFromGlobal( _me->globalPos() ).y(); - const trackView * track_at_y = m_trackContainerView->trackViewAt( y_pos ); + const TrackView * track_at_y = m_trackContainerView->trackViewAt( y_pos ); // debug code // qDebug( "y position %d", y_pos ); @@ -2671,7 +2671,7 @@ void trackView::mouseMoveEvent( QMouseEvent * _me ) * * \param _me the MouseEvent to handle. */ -void trackView::mouseReleaseEvent( QMouseEvent * _me ) +void TrackView::mouseReleaseEvent( QMouseEvent * _me ) { m_action = NoAction; while( QApplication::overrideCursor() != NULL ) @@ -2690,7 +2690,7 @@ void trackView::mouseReleaseEvent( QMouseEvent * _me ) * * \param _pe the PaintEvent to start. */ -void trackView::paintEvent( QPaintEvent * _pe ) +void TrackView::paintEvent( QPaintEvent * _pe ) { QStyleOption opt; opt.initFrom( this ); @@ -2701,14 +2701,14 @@ void trackView::paintEvent( QPaintEvent * _pe ) -/*! \brief Create a trackContentObject View in this track View. +/*! \brief Create a TrackContentObject View in this track View. * - * \param _tco the trackContentObject to create the view for. + * \param _tco the TrackContentObject to create the view for. * \todo is this a good description for what this method does? */ -void trackView::createTCOView( trackContentObject * _tco ) +void TrackView::createTCOView( TrackContentObject * _tco ) { - trackContentObjectView * tv = _tco->createView( this ); + TrackContentObjectView * tv = _tco->createView( this ); if( _tco->getSelectViewOnCreate() == true ) { tv->setSelected( true ); diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index 0760e1242..17fbb559f 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -41,8 +41,8 @@ QPixmap * AutomationPatternView::s_pat_rec = NULL; AutomationPatternView::AutomationPatternView( AutomationPattern * _pattern, - trackView * _parent ) : - trackContentObjectView( _pattern, _parent ), + TrackView * _parent ) : + TrackContentObjectView( _pattern, _parent ), m_pat( _pattern ), m_paintPixmap(), m_needsUpdate( true ) @@ -82,7 +82,7 @@ void AutomationPatternView::update() { m_pat->changeLength( m_pat->length() ); } - trackContentObjectView::update(); + TrackContentObjectView::update(); } @@ -364,7 +364,7 @@ void AutomationPatternView::dragEnterEvent( QDragEnterEvent * _dee ) StringPairDrag::processDragEnterEvent( _dee, "automatable_model" ); if( !_dee->isAccepted() ) { - trackContentObjectView::dragEnterEvent( _dee ); + TrackContentObjectView::dragEnterEvent( _dee ); } } @@ -394,7 +394,7 @@ void AutomationPatternView::dropEvent( QDropEvent * _de ) } else { - trackContentObjectView::dropEvent( _de ); + TrackContentObjectView::dropEvent( _de ); } } diff --git a/src/gui/BBEditor.cpp b/src/gui/BBEditor.cpp index 1115a2614..d57da6441 100644 --- a/src/gui/BBEditor.cpp +++ b/src/gui/BBEditor.cpp @@ -183,7 +183,7 @@ void BBEditor::dropEvent( QDropEvent * de ) void BBEditor::removeBBView( int _bb ) { - foreach( trackView* view, trackViews() ) + foreach( TrackView* view, trackViews() ) { view->getTrackContentWidget()->removeTCOView( _bb ); } diff --git a/src/gui/ExportProjectDialog.cpp b/src/gui/ExportProjectDialog.cpp index 9d95c1b73..2133729fb 100644 --- a/src/gui/ExportProjectDialog.cpp +++ b/src/gui/ExportProjectDialog.cpp @@ -31,7 +31,7 @@ #include "Engine.h" #include "MainWindow.h" #include "BBTrackContainer.h" -#include "bb_track.h" +#include "BBTrack.h" ExportProjectDialog::ExportProjectDialog( const QString & _file_name, diff --git a/src/gui/TrackContainerView.cpp b/src/gui/TrackContainerView.cpp index 4f78aad78..94c72d278 100644 --- a/src/gui/TrackContainerView.cpp +++ b/src/gui/TrackContainerView.cpp @@ -33,7 +33,7 @@ #include "TrackContainerView.h" #include "TrackContainer.h" -#include "bb_track.h" +#include "BBTrack.h" #include "MainWindow.h" #include "debug.h" #include "FileBrowser.h" @@ -120,7 +120,7 @@ void TrackContainerView::loadSettings( const QDomElement & _this ) -trackView * TrackContainerView::addTrackView( trackView * _tv ) +TrackView * TrackContainerView::addTrackView( TrackView * _tv ) { m_trackViews.push_back( _tv ); m_scrollLayout->addWidget( _tv ); @@ -134,7 +134,7 @@ trackView * TrackContainerView::addTrackView( trackView * _tv ) -void TrackContainerView::removeTrackView( trackView * _tv ) +void TrackContainerView::removeTrackView( TrackView * _tv ) { int index = m_trackViews.indexOf( _tv ); if( index != -1 ) @@ -155,14 +155,14 @@ void TrackContainerView::removeTrackView( trackView * _tv ) -void TrackContainerView::moveTrackViewUp( trackView * _tv ) +void TrackContainerView::moveTrackViewUp( TrackView * _tv ) { for( int i = 1; i < m_trackViews.size(); ++i ) { - trackView * t = m_trackViews[i]; + TrackView * t = m_trackViews[i]; if( t == _tv ) { - bbTrack::swapBBTracks( t->getTrack(), + BBTrack::swapBBTracks( t->getTrack(), m_trackViews[i - 1]->getTrack() ); m_scrollLayout->removeWidget( t ); m_scrollLayout->insertWidget( i - 1, t ); @@ -177,14 +177,14 @@ void TrackContainerView::moveTrackViewUp( trackView * _tv ) -void TrackContainerView::moveTrackViewDown( trackView * _tv ) +void TrackContainerView::moveTrackViewDown( TrackView * _tv ) { for( int i = 0; i < m_trackViews.size()-1; ++i ) { - trackView * t = m_trackViews[i]; + TrackView * t = m_trackViews[i]; if( t == _tv ) { - bbTrack::swapBBTracks( t->getTrack(), + BBTrack::swapBBTracks( t->getTrack(), m_trackViews[i + 1]->getTrack() ); m_scrollLayout->removeWidget( t ); m_scrollLayout->insertWidget( i + 1, t ); @@ -228,7 +228,7 @@ void TrackContainerView::createTrackView( Track * _t ) -void TrackContainerView::deleteTrackView( trackView * _tv ) +void TrackContainerView::deleteTrackView( TrackView * _tv ) { //m_tc->addJournalCheckPoint(); @@ -242,7 +242,7 @@ void TrackContainerView::deleteTrackView( trackView * _tv ) -const trackView * TrackContainerView::trackViewAt( const int _y ) const +const TrackView * TrackContainerView::trackViewAt( const int _y ) const { const int abs_y = _y + m_scrollArea->verticalScrollBar()->value(); int y_cnt = 0; @@ -293,7 +293,7 @@ void TrackContainerView::clearAllTracks() { while( !m_trackViews.empty() ) { - trackView * tv = m_trackViews.takeLast(); + TrackView * tv = m_trackViews.takeLast(); Track * t = tv->getTrack(); delete tv; delete t; diff --git a/src/gui/widgets/TrackLabelButton.cpp b/src/gui/widgets/TrackLabelButton.cpp index 5f3e359ba..150300564 100644 --- a/src/gui/widgets/TrackLabelButton.cpp +++ b/src/gui/widgets/TrackLabelButton.cpp @@ -38,7 +38,7 @@ -TrackLabelButton::TrackLabelButton( trackView * _tv, QWidget * _parent ) : +TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : QToolButton( _parent ), m_trackView( _tv ), m_iconName() diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index b05f3fe69..baf3f1ec7 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -61,7 +61,7 @@ bool AutomationTrack::play( const MidiTime & _start, const fpp_t _frames, tcoVector tcos; if( _tco_num >= 0 ) { - trackContentObject * tco = getTCO( _tco_num ); + TrackContentObject * tco = getTCO( _tco_num ); tcos.push_back( tco ); } else @@ -90,7 +90,7 @@ bool AutomationTrack::play( const MidiTime & _start, const fpp_t _frames, -trackView * AutomationTrack::createView( TrackContainerView* tcv ) +TrackView * AutomationTrack::createView( TrackContainerView* tcv ) { return new AutomationTrackView( this, tcv ); } @@ -98,7 +98,7 @@ trackView * AutomationTrack::createView( TrackContainerView* tcv ) -trackContentObject * AutomationTrack::createTCO( const MidiTime & ) +TrackContentObject * AutomationTrack::createTCO( const MidiTime & ) { return new AutomationPattern( this ); } @@ -128,7 +128,7 @@ void AutomationTrack::loadTrackSpecificSettings( const QDomElement & _this ) AutomationTrackView::AutomationTrackView( AutomationTrack * _at, TrackContainerView* tcv ) : - trackView( _at, tcv ) + TrackView( _at, tcv ) { setFixedHeight( 32 ); TrackLabelButton * tlb = new TrackLabelButton( this, @@ -181,7 +181,7 @@ void AutomationTrackView::dropEvent( QDropEvent * _de ) pos.setTicks( 0 ); } - trackContentObject * tco = getTrack()->createTCO( pos ); + TrackContentObject * tco = getTrack()->createTCO( pos ); AutomationPattern * pat = dynamic_cast( tco ); pat->addObject( mod ); pat->movePosition( pos ); diff --git a/src/tracks/bb_track.cpp b/src/tracks/BBTrack.cpp similarity index 82% rename from src/tracks/bb_track.cpp rename to src/tracks/BBTrack.cpp index 2d4903c50..5a76d56a0 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/BBTrack.cpp @@ -1,5 +1,5 @@ /* - * bb_track.cpp - implementation of class bbTrack and bbTCO + * BBTrack.cpp - implementation of class BBTrack and bbTCO * * Copyright (c) 2004-2014 Tobias Doerffel * @@ -28,7 +28,7 @@ #include #include "BBEditor.h" -#include "bb_track.h" +#include "BBTrack.h" #include "BBTrackContainer.h" #include "embed.h" #include "Engine.h" @@ -43,11 +43,11 @@ -bbTrack::infoMap bbTrack::s_infoMap; +BBTrack::infoMap BBTrack::s_infoMap; -bbTCO::bbTCO( Track * _track ) : - trackContentObject( _track ), +BBTCO::BBTCO( Track * _track ) : + TrackContentObject( _track ), m_color( 128, 128, 128 ), m_useStyleColor( true ) { @@ -63,14 +63,14 @@ bbTCO::bbTCO( Track * _track ) : -bbTCO::~bbTCO() +BBTCO::~BBTCO() { } -void bbTCO::saveSettings( QDomDocument & doc, QDomElement & element ) +void BBTCO::saveSettings( QDomDocument & doc, QDomElement & element ) { element.setAttribute( "name", name() ); if( element.parentNode().nodeName() == "clipboard" ) @@ -98,7 +98,7 @@ void bbTCO::saveSettings( QDomDocument & doc, QDomElement & element ) -void bbTCO::loadSettings( const QDomElement & element ) +void BBTCO::loadSettings( const QDomElement & element ) { setName( element.attribute( "name" ) ); if( element.attribute( "pos" ).toInt() >= 0 ) @@ -142,16 +142,16 @@ void bbTCO::loadSettings( const QDomElement & element ) -int bbTCO::bbTrackIndex() +int BBTCO::bbTrackIndex() { - return dynamic_cast( getTrack() )->index(); + return dynamic_cast( getTrack() )->index(); } -trackContentObjectView * bbTCO::createView( trackView * _tv ) +TrackContentObjectView * BBTCO::createView( TrackView * _tv ) { - return new bbTCOView( this, _tv ); + return new BBTCOView( this, _tv ); } @@ -163,23 +163,23 @@ trackContentObjectView * bbTCO::createView( trackView * _tv ) -bbTCOView::bbTCOView( trackContentObject * _tco, trackView * _tv ) : - trackContentObjectView( _tco, _tv ), - m_bbTCO( dynamic_cast( _tco ) ) +BBTCOView::BBTCOView( TrackContentObject * _tco, TrackView * _tv ) : + TrackContentObjectView( _tco, _tv ), + m_bbTCO( dynamic_cast( _tco ) ) { } -bbTCOView::~bbTCOView() +BBTCOView::~BBTCOView() { } -void bbTCOView::constructContextMenu( QMenu * _cm ) +void BBTCOView::constructContextMenu( QMenu * _cm ) { QAction * a = new QAction( embed::getIconPixmap( "bb_track" ), tr( "Open in Beat+Bassline-Editor" ), @@ -203,7 +203,7 @@ void bbTCOView::constructContextMenu( QMenu * _cm ) -void bbTCOView::mouseDoubleClickEvent( QMouseEvent * ) +void BBTCOView::mouseDoubleClickEvent( QMouseEvent * ) { openInBBEditor(); } @@ -211,7 +211,7 @@ void bbTCOView::mouseDoubleClickEvent( QMouseEvent * ) -void bbTCOView::paintEvent( QPaintEvent * ) +void BBTCOView::paintEvent( QPaintEvent * ) { QPainter p( this ); @@ -271,7 +271,7 @@ void bbTCOView::paintEvent( QPaintEvent * ) -void bbTCOView::openInBBEditor() +void BBTCOView::openInBBEditor() { Engine::getBBTrackContainer()->setCurrentBB( m_bbTCO->bbTrackIndex() ); @@ -281,7 +281,7 @@ void bbTCOView::openInBBEditor() -void bbTCOView::resetName() +void BBTCOView::resetName() { m_bbTCO->setName( m_bbTCO->getTrack()->name() ); } @@ -289,7 +289,7 @@ void bbTCOView::resetName() -void bbTCOView::changeName() +void BBTCOView::changeName() { QString s = m_bbTCO->name(); RenameDialog rename_dlg( s ); @@ -300,7 +300,7 @@ void bbTCOView::changeName() -void bbTCOView::changeColor() +void BBTCOView::changeColor() { QColor new_color = QColorDialog::getColor( m_bbTCO->m_color ); if( ! new_color.isValid() ) @@ -315,7 +315,7 @@ void bbTCOView::changeColor() selected.begin(); it != selected.end(); ++it ) { - bbTCOView * bb_tcov = dynamic_cast( *it ); + BBTCOView * bb_tcov = dynamic_cast( *it ); if( bb_tcov ) { bb_tcov->setColor( new_color ); @@ -330,7 +330,7 @@ void bbTCOView::changeColor() /** \brief Makes the BB pattern use the colour defined in the stylesheet */ -void bbTCOView::resetColor() +void BBTCOView::resetColor() { if( ! m_bbTCO->m_useStyleColor ) { @@ -338,12 +338,12 @@ void bbTCOView::resetColor() Engine::getSong()->setModified(); update(); } - bbTrack::clearLastTCOColor(); + BBTrack::clearLastTCOColor(); } -void bbTCOView::setColor( QColor new_color ) +void BBTCOView::setColor( QColor new_color ) { if( new_color.rgb() != m_bbTCO->color() ) { @@ -352,17 +352,17 @@ void bbTCOView::setColor( QColor new_color ) Engine::getSong()->setModified(); update(); } - bbTrack::setLastTCOColor( new_color ); + BBTrack::setLastTCOColor( new_color ); } -QColor * bbTrack::s_lastTCOColor = NULL; +QColor * BBTrack::s_lastTCOColor = NULL; -bbTrack::bbTrack( TrackContainer* tc ) : - Track( BBTrack, tc ) +BBTrack::BBTrack( TrackContainer* tc ) : + Track( Track::BBTrack, tc ) { int bbNum = s_infoMap.size(); s_infoMap[this] = bbNum; @@ -378,7 +378,7 @@ bbTrack::bbTrack( TrackContainer* tc ) : -bbTrack::~bbTrack() +BBTrack::~BBTrack() { Engine::mixer()->removePlayHandles( this ); @@ -404,7 +404,7 @@ bbTrack::~bbTrack() // play _frames frames of given TCO within starting with _start -bool bbTrack::play( const MidiTime & _start, const fpp_t _frames, +bool BBTrack::play( const MidiTime & _start, const fpp_t _frames, const f_cnt_t _offset, int _tco_num ) { if( isMuted() ) @@ -447,17 +447,17 @@ bool bbTrack::play( const MidiTime & _start, const fpp_t _frames, -trackView * bbTrack::createView( TrackContainerView* tcv ) +TrackView * BBTrack::createView( TrackContainerView* tcv ) { - return new bbTrackView( this, tcv ); + return new BBTrackView( this, tcv ); } -trackContentObject * bbTrack::createTCO( const MidiTime & _pos ) +TrackContentObject * BBTrack::createTCO( const MidiTime & _pos ) { - bbTCO * bbtco = new bbTCO( this ); + BBTCO * bbtco = new BBTCO( this ); if( s_lastTCOColor ) { bbtco->setColor( *s_lastTCOColor ); @@ -469,7 +469,7 @@ trackContentObject * bbTrack::createTCO( const MidiTime & _pos ) -void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc, +void BBTrack::saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _this ) { // _this.setAttribute( "icon", m_trackLabel->pixmapFile() ); @@ -491,7 +491,7 @@ void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc, -void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) +void BBTrack::loadTrackSpecificSettings( const QDomElement & _this ) { /* if( _this.attribute( "icon" ) != "" ) { @@ -526,7 +526,7 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) restoreState( node.toElement() ); } } -/* doesn't work yet because bbTrack-ctor also sets current bb so if +/* doesn't work yet because BBTrack-ctor also sets current bb so if bb-tracks are created after this function is called, this doesn't help at all.... if( _this.attribute( "current" ).toInt() ) @@ -538,8 +538,8 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this ) -// return pointer to bbTrack specified by _bb_num -bbTrack * bbTrack::findBBTrack( int _bb_num ) +// return pointer to BBTrack specified by _bb_num +BBTrack * BBTrack::findBBTrack( int _bb_num ) { for( infoMap::iterator it = s_infoMap.begin(); it != s_infoMap.end(); ++it ) @@ -555,10 +555,10 @@ bbTrack * bbTrack::findBBTrack( int _bb_num ) -void bbTrack::swapBBTracks( Track * _track1, Track * _track2 ) +void BBTrack::swapBBTracks( Track * _track1, Track * _track2 ) { - bbTrack * t1 = dynamic_cast( _track1 ); - bbTrack * t2 = dynamic_cast( _track2 ); + BBTrack * t1 = dynamic_cast( _track1 ); + BBTrack * t2 = dynamic_cast( _track2 ); if( t1 != NULL && t2 != NULL ) { qSwap( s_infoMap[t1], s_infoMap[t2] ); @@ -576,8 +576,8 @@ void bbTrack::swapBBTracks( Track * _track1, Track * _track2 ) -bbTrackView::bbTrackView( bbTrack * _bbt, TrackContainerView* tcv ) : - trackView( _bbt, tcv ), +BBTrackView::BBTrackView( BBTrack * _bbt, TrackContainerView* tcv ) : + TrackView( _bbt, tcv ), m_bbTrack( _bbt ) { setFixedHeight( 32 ); @@ -597,24 +597,24 @@ bbTrackView::bbTrackView( bbTrack * _bbt, TrackContainerView* tcv ) : -bbTrackView::~bbTrackView() +BBTrackView::~BBTrackView() { - Engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); + Engine::getBBEditor()->removeBBView( BBTrack::s_infoMap[m_bbTrack] ); } -bool bbTrackView::close() +bool BBTrackView::close() { - Engine::getBBEditor()->removeBBView( bbTrack::s_infoMap[m_bbTrack] ); - return trackView::close(); + Engine::getBBEditor()->removeBBView( BBTrack::s_infoMap[m_bbTrack] ); + return TrackView::close(); } -void bbTrackView::clickedTrackLabel() +void BBTrackView::clickedTrackLabel() { Engine::getBBTrackContainer()->setCurrentBB( m_bbTrack->index() ); Engine::getBBEditor()->show(); diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 17ac527f5..4e16bcae0 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -41,7 +41,7 @@ #include "InstrumentTrack.h" #include "AudioPort.h" #include "AutomationPattern.h" -#include "bb_track.h" +#include "BBTrack.h" #include "ConfigManager.h" #include "ControllerConnection.h" #include "debug.h" @@ -574,12 +574,12 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, const float frames_per_tick = Engine::framesPerTick(); tcoVector tcos; - bbTrack * bb_track = NULL; + ::BBTrack * bb_track = NULL; if( _tco_num >= 0 ) { - trackContentObject * tco = getTCO( _tco_num ); + TrackContentObject * tco = getTCO( _tco_num ); tcos.push_back( tco ); - bb_track = bbTrack::findBBTrack( _tco_num ); + bb_track = BBTrack::findBBTrack( _tco_num ); } else { @@ -667,7 +667,7 @@ bool InstrumentTrack::play( const MidiTime & _start, const fpp_t _frames, -trackContentObject * InstrumentTrack::createTCO( const MidiTime & ) +TrackContentObject * InstrumentTrack::createTCO( const MidiTime & ) { return new Pattern( this ); } @@ -675,7 +675,7 @@ trackContentObject * InstrumentTrack::createTCO( const MidiTime & ) -trackView * InstrumentTrack::createView( TrackContainerView* tcv ) +TrackView * InstrumentTrack::createView( TrackContainerView* tcv ) { return new InstrumentTrackView( this, tcv ); } @@ -814,7 +814,7 @@ QQueue InstrumentTrackView::s_windowCache; InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tcv ) : - trackView( _it, tcv ), + TrackView( _it, tcv ), m_window( NULL ), m_lastPos( -1, -1 ) { @@ -1040,7 +1040,7 @@ void InstrumentTrackView::dragEnterEvent( QDragEnterEvent * _dee ) InstrumentTrackWindow::dragEnterEventGeneric( _dee ); if( !_dee->isAccepted() ) { - trackView::dragEnterEvent( _dee ); + TrackView::dragEnterEvent( _dee ); } } @@ -1050,7 +1050,7 @@ void InstrumentTrackView::dragEnterEvent( QDragEnterEvent * _dee ) void InstrumentTrackView::dropEvent( QDropEvent * _de ) { getInstrumentTrackWindow()->dropEvent( _de ); - trackView::dropEvent( _de ); + TrackView::dropEvent( _de ); } diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index f9b65096f..5306b2185 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -59,7 +59,7 @@ QPixmap * PatternView::s_stepBtnOffLight = NULL; Pattern::Pattern( InstrumentTrack * _instrument_track ) : - trackContentObject( _instrument_track ), + TrackContentObject( _instrument_track ), m_instrumentTrack( _instrument_track ), m_patternType( BeatPattern ), m_steps( MidiTime::stepsPerTact() ) @@ -72,7 +72,7 @@ Pattern::Pattern( InstrumentTrack * _instrument_track ) : Pattern::Pattern( const Pattern& other ) : - trackContentObject( other.m_instrumentTrack ), + TrackContentObject( other.m_instrumentTrack ), m_instrumentTrack( other.m_instrumentTrack ), m_patternType( other.m_patternType ), m_steps( other.m_steps ) @@ -471,7 +471,7 @@ void Pattern::removeSteps() -trackContentObjectView * Pattern::createView( trackView * _tv ) +TrackContentObjectView * Pattern::createView( TrackView * _tv ) { return new PatternView( this, _tv ); } @@ -601,8 +601,8 @@ void Pattern::changeTimeSignature() -PatternView::PatternView( Pattern* pattern, trackView* parent ) : - trackContentObjectView( pattern, parent ), +PatternView::PatternView( Pattern* pattern, TrackView* parent ) : + TrackContentObjectView( pattern, parent ), m_pat( pattern ), m_paintPixmap(), m_needsUpdate( true ) @@ -660,7 +660,7 @@ void PatternView::update() { m_needsUpdate = true; m_pat->changeLength( m_pat->length() ); - trackContentObjectView::update(); + TrackContentObjectView::update(); } @@ -811,7 +811,7 @@ void PatternView::mousePressEvent( QMouseEvent * _me ) // if not in beat/bassline -mode, let parent class handle the event { - trackContentObjectView::mousePressEvent( _me ); + TrackContentObjectView::mousePressEvent( _me ); } } @@ -871,7 +871,7 @@ void PatternView::wheelEvent( QWheelEvent * _we ) } else { - trackContentObjectView::wheelEvent( _we ); + TrackContentObjectView::wheelEvent( _we ); } } diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index d25ab2806..da5c8caf4 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -50,7 +50,7 @@ SampleTCO::SampleTCO( Track * _track ) : - trackContentObject( _track ), + TrackContentObject( _track ), m_sampleBuffer( new SampleBuffer ) { saveJournallingState( false ); @@ -76,7 +76,7 @@ SampleTCO::~SampleTCO() void SampleTCO::changeLength( const MidiTime & _length ) { - trackContentObject::changeLength( qMax( static_cast( _length ), DefaultTicksPerTact ) ); + TrackContentObject::changeLength( qMax( static_cast( _length ), DefaultTicksPerTact ) ); } @@ -178,7 +178,7 @@ void SampleTCO::loadSettings( const QDomElement & _this ) -trackContentObjectView * SampleTCO::createView( trackView * _tv ) +TrackContentObjectView * SampleTCO::createView( TrackView * _tv ) { return new SampleTCOView( this, _tv ); } @@ -192,8 +192,8 @@ trackContentObjectView * SampleTCO::createView( trackView * _tv ) -SampleTCOView::SampleTCOView( SampleTCO * _tco, trackView * _tv ) : - trackContentObjectView( _tco, _tv ), +SampleTCOView::SampleTCOView( SampleTCO * _tco, TrackView * _tv ) : + TrackContentObjectView( _tco, _tv ), m_tco( _tco ) { // update UI and tooltip @@ -270,7 +270,7 @@ void SampleTCOView::dragEnterEvent( QDragEnterEvent * _dee ) if( StringPairDrag::processDragEnterEvent( _dee, "samplefile,sampledata" ) == false ) { - trackContentObjectView::dragEnterEvent( _dee ); + TrackContentObjectView::dragEnterEvent( _dee ); } } @@ -295,7 +295,7 @@ void SampleTCOView::dropEvent( QDropEvent * _de ) } else { - trackContentObjectView::dropEvent( _de ); + TrackContentObjectView::dropEvent( _de ); } } @@ -312,7 +312,7 @@ void SampleTCOView::mousePressEvent( QMouseEvent * _me ) } else { - trackContentObjectView::mousePressEvent( _me ); + TrackContentObjectView::mousePressEvent( _me ); } } @@ -429,7 +429,7 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames, for( int i = 0; i < numOfTCOs(); ++i ) { - trackContentObject * tco = getTCO( i ); + TrackContentObject * tco = getTCO( i ); if( tco->startPosition() != _start ) { continue; @@ -468,7 +468,7 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames, -trackView * SampleTrack::createView( TrackContainerView* tcv ) +TrackView * SampleTrack::createView( TrackContainerView* tcv ) { return new SampleTrackView( this, tcv ); } @@ -476,7 +476,7 @@ trackView * SampleTrack::createView( TrackContainerView* tcv ) -trackContentObject * SampleTrack::createTCO( const MidiTime & ) +TrackContentObject * SampleTrack::createTCO( const MidiTime & ) { return new SampleTCO( this ); } @@ -521,7 +521,7 @@ void SampleTrack::loadTrackSpecificSettings( const QDomElement & _this ) SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) : - trackView( _t, tcv ) + TrackView( _t, tcv ) { setFixedHeight( 32 ); @@ -594,7 +594,7 @@ void SampleTrackView::modelChanged() SampleTrack * st = castModel(); m_volumeKnob->setModel( &st->m_volumeModel ); - trackView::modelChanged(); + TrackView::modelChanged(); } From d57b51142d65d8a258f7bf14f9871b7c3d821470 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 10:59:35 +0100 Subject: [PATCH 19/21] Rename basicFilters/basic_filters.h --- include/{basic_filters.h => BasicFilters.h} | 12 ++++++------ include/NotePlayHandle.h | 4 ++-- plugins/DualFilter/DualFilter.cpp | 6 +++--- plugins/DualFilter/DualFilter.h | 6 +++--- plugins/DualFilter/DualFilterControls.cpp | 10 +++++----- plugins/flp_import/FlpImport.cpp | 20 ++++++++++---------- src/core/InstrumentSoundShaping.cpp | 6 +++--- src/core/NotePlayHandle.cpp | 2 +- 8 files changed, 33 insertions(+), 33 deletions(-) rename include/{basic_filters.h => BasicFilters.h} (98%) diff --git a/include/basic_filters.h b/include/BasicFilters.h similarity index 98% rename from include/basic_filters.h rename to include/BasicFilters.h index 0a8553a47..8842b0dc9 100644 --- a/include/basic_filters.h +++ b/include/BasicFilters.h @@ -1,5 +1,5 @@ /* - * basic_filters.h - simple but powerful filter-class with most used filters + * BasicFilters.h - simple but powerful filter-class with most used filters * * original file by ??? * modified and enhanced by Tobias Doerffel @@ -49,7 +49,7 @@ //#include template -class basicFilters +class BasicFilters { MM_OPERATORS public: @@ -106,14 +106,14 @@ public: : Moog; if( m_subFilter == NULL ) { - m_subFilter = new basicFilters( + m_subFilter = new BasicFilters( static_cast( m_sampleRate ) ); } m_subFilter->m_type = m_type; } - inline basicFilters( const sample_rate_t _sample_rate ) : + inline BasicFilters( const sample_rate_t _sample_rate ) : m_doubleFilter( false ), m_sampleRate( (float) _sample_rate ), m_sampleRatio( 1.0f / m_sampleRate ), @@ -123,7 +123,7 @@ public: clearHistory(); } - inline ~basicFilters() + inline ~BasicFilters() { delete m_subFilter; } @@ -756,7 +756,7 @@ private: float m_sampleRate; float m_sampleRatio; - basicFilters * m_subFilter; + BasicFilters * m_subFilter; } ; diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index e0f0bcdaf..d2cf1c0fc 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -37,7 +37,7 @@ class InstrumentTrack; class NotePlayHandle; -template class basicFilters; +template class BasicFilters; typedef QList NotePlayHandleList; typedef QList ConstNotePlayHandleList; @@ -47,7 +47,7 @@ class EXPORT NotePlayHandle : public PlayHandle, public Note MM_OPERATORS public: void * m_pluginData; - basicFilters<> * m_filter; + BasicFilters<> * m_filter; // specifies origin of NotePlayHandle enum Origins diff --git a/plugins/DualFilter/DualFilter.cpp b/plugins/DualFilter/DualFilter.cpp index e0c55eec8..352840eac 100644 --- a/plugins/DualFilter/DualFilter.cpp +++ b/plugins/DualFilter/DualFilter.cpp @@ -26,7 +26,7 @@ #include "DualFilter.h" #include "embed.cpp" -#include "basic_filters.h" +#include "BasicFilters.h" extern "C" @@ -53,8 +53,8 @@ DualFilterEffect::DualFilterEffect( Model* parent, const Descriptor::SubPluginFe Effect( &dualfilter_plugin_descriptor, parent, key ), m_dfControls( this ) { - m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); - m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); + m_filter1 = new BasicFilters<2>( Engine::mixer()->processingSampleRate() ); + m_filter2 = new BasicFilters<2>( Engine::mixer()->processingSampleRate() ); // ensure filters get updated m_filter1changed = true; diff --git a/plugins/DualFilter/DualFilter.h b/plugins/DualFilter/DualFilter.h index c1baae79d..851531333 100644 --- a/plugins/DualFilter/DualFilter.h +++ b/plugins/DualFilter/DualFilter.h @@ -29,7 +29,7 @@ #include "Effect.h" #include "DualFilterControls.h" -#include "basic_filters.h" +#include "BasicFilters.h" class DualFilterEffect : public Effect { @@ -47,8 +47,8 @@ public: private: DualFilterControls m_dfControls; - basicFilters<2> * m_filter1; - basicFilters<2> * m_filter2; + BasicFilters<2> * m_filter1; + BasicFilters<2> * m_filter2; bool m_filter1changed; bool m_filter2changed; diff --git a/plugins/DualFilter/DualFilterControls.cpp b/plugins/DualFilter/DualFilterControls.cpp index 10ae56771..c7f2ba48a 100644 --- a/plugins/DualFilter/DualFilterControls.cpp +++ b/plugins/DualFilter/DualFilterControls.cpp @@ -30,7 +30,7 @@ #include "DualFilter.h" #include "Engine.h" #include "Song.h" -#include "basic_filters.h" +#include "BasicFilters.h" #include "embed.h" DualFilterControls::DualFilterControls( DualFilterEffect* effect ) : @@ -40,7 +40,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) : m_enabled1Model( true, this, tr( "Filter 1 enabled" ) ), m_filter1Model( this, tr( "Filter 1 type" ) ), m_cut1Model( 7000.0f, 1.0f, 14000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ), - m_res1Model( 0.5, basicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ), + m_res1Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ), m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ), m_mixModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Mix" ) ), @@ -48,7 +48,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) : m_enabled2Model( true, this, tr( "Filter 2 enabled" ) ), m_filter2Model( this, tr( "Filter 2 type" ) ), m_cut2Model( 7000.0f, 1.0f, 14000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ), - m_res2Model( 0.5, basicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ), + m_res2Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ), m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) ) { m_filter1Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) ); @@ -108,8 +108,8 @@ void DualFilterControls::updateFilters() delete m_effect->m_filter1; delete m_effect->m_filter2; - m_effect->m_filter1 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); - m_effect->m_filter2 = new basicFilters<2>( Engine::mixer()->processingSampleRate() ); + m_effect->m_filter1 = new BasicFilters<2>( Engine::mixer()->processingSampleRate() ); + m_effect->m_filter2 = new BasicFilters<2>( Engine::mixer()->processingSampleRate() ); // flag filters as needing recalculation diff --git a/plugins/flp_import/FlpImport.cpp b/plugins/flp_import/FlpImport.cpp index 499bfb646..8fc869dfc 100644 --- a/plugins/flp_import/FlpImport.cpp +++ b/plugins/flp_import/FlpImport.cpp @@ -32,7 +32,7 @@ #include "FlpImport.h" #include "NotePlayHandle.h" #include "AutomationPattern.h" -#include "basic_filters.h" +#include "BasicFilters.h" #include "BBTrack.h" #include "BBTrackContainer.h" #include "ComboBox.h" @@ -462,7 +462,7 @@ struct FL_Channel : public FL_Plugin sampleUseLoopPoints( false ), instrumentPlugin( NULL ), envelopes(), - filterType( basicFilters<>::LowPass ), + filterType( BasicFilters<>::LowPass ), filterCut( 10000 ), filterRes( 0.1 ), filterEnabled( false ), @@ -595,14 +595,14 @@ bool FlpImport::tryImport( TrackContainer* tc ) { const int mappedFilter[] = { - basicFilters<>::LowPass,// fast LP - basicFilters<>::LowPass, - basicFilters<>::BandPass_CSG, - basicFilters<>::HiPass, - basicFilters<>::Notch, - basicFilters<>::NumFilters+basicFilters<>::LowPass, - basicFilters<>::LowPass, - basicFilters<>::NumFilters+basicFilters<>::LowPass + BasicFilters<>::LowPass,// fast LP + BasicFilters<>::LowPass, + BasicFilters<>::BandPass_CSG, + BasicFilters<>::HiPass, + BasicFilters<>::Notch, + BasicFilters<>::NumFilters+BasicFilters<>::LowPass, + BasicFilters<>::LowPass, + BasicFilters<>::NumFilters+BasicFilters<>::LowPass } ; const InstrumentFunctionArpeggio::ArpDirections mappedArpDir[] = diff --git a/src/core/InstrumentSoundShaping.cpp b/src/core/InstrumentSoundShaping.cpp index 70d8f98d3..b95bacc15 100644 --- a/src/core/InstrumentSoundShaping.cpp +++ b/src/core/InstrumentSoundShaping.cpp @@ -25,7 +25,7 @@ #include #include "InstrumentSoundShaping.h" -#include "basic_filters.h" +#include "BasicFilters.h" #include "embed.h" #include "Engine.h" #include "EnvelopeAndLfoParameters.h" @@ -63,7 +63,7 @@ InstrumentSoundShaping::InstrumentSoundShaping( m_filterEnabledModel( false, this ), m_filterModel( this, tr( "Filter type" ) ), m_filterCutModel( 14000.0, 1.0, 14000.0, 1.0, this, tr( "Cutoff frequency" ) ), - m_filterResModel( 0.5, basicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance" ) ) + m_filterResModel( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance" ) ) { for( int i = 0; i < NumTargets; ++i ) { @@ -161,7 +161,7 @@ void InstrumentSoundShaping::processAudioBuffer( sampleFrame* buffer, if( n->m_filter == NULL ) { - n->m_filter = new basicFilters<>( Engine::mixer()->processingSampleRate() ); + n->m_filter = new BasicFilters<>( Engine::mixer()->processingSampleRate() ); } n->m_filter->setFilterType( m_filterModel.value() ); diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 4e3f798fc..e2d3e743d 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -24,7 +24,7 @@ */ #include "NotePlayHandle.h" -#include "basic_filters.h" +#include "BasicFilters.h" #include "ConfigManager.h" #include "DetuningHelper.h" #include "InstrumentSoundShaping.h" From 497c792871314bc7a7965f2af941bf452c375127 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 11:03:35 +0100 Subject: [PATCH 20/21] Rename tabButton/tab_button --- include/TabBar.h | 6 +++--- include/{tab_button.h => TabButton.h} | 8 ++++---- plugins/ladspa_browser/ladspa_browser.cpp | 2 +- src/gui/SetupDialog.cpp | 2 +- src/gui/widgets/TabBar.cpp | 14 +++++++------- 5 files changed, 16 insertions(+), 16 deletions(-) rename include/{tab_button.h => TabButton.h} (88%) diff --git a/include/TabBar.h b/include/TabBar.h index 9cfe1dd96..dde54b049 100644 --- a/include/TabBar.h +++ b/include/TabBar.h @@ -33,7 +33,7 @@ #include "export.h" -class tabButton; +class TabButton; class EXPORT TabBar : public QWidget @@ -44,7 +44,7 @@ public: QBoxLayout::Direction _dir = QBoxLayout::LeftToRight ); virtual ~TabBar(); - tabButton * addTab( QWidget * _w, const QString & _text, + TabButton * addTab( QWidget * _w, const QString & _text, int _id, bool _add_stretch = false, bool _text_is_tooltip = false ); void removeTab( int _id ); @@ -73,7 +73,7 @@ protected slots: private: - QMap > m_tabs; + QMap > m_tabs; QBoxLayout * m_layout; bool m_exclusive; diff --git a/include/tab_button.h b/include/TabButton.h similarity index 88% rename from include/tab_button.h rename to include/TabButton.h index f6ae54a03..94f0d9b6b 100644 --- a/include/tab_button.h +++ b/include/TabButton.h @@ -1,5 +1,5 @@ /* - * tab_button.h - declaration of class tabButton + * TabButton.h - declaration of class TabButton * * Copyright (c) 2005-2007 Tobias Doerffel * @@ -29,11 +29,11 @@ #include -class tabButton : public QPushButton +class TabButton : public QPushButton { Q_OBJECT public: - tabButton( const QString & _text, int _id, QWidget * _parent ) : + TabButton( const QString & _text, int _id, QWidget * _parent ) : QPushButton( _text, _parent ), m_id( _id ) { @@ -42,7 +42,7 @@ public: SLOT( slotClicked() ) ); } - ~tabButton() + ~TabButton() { } diff --git a/plugins/ladspa_browser/ladspa_browser.cpp b/plugins/ladspa_browser/ladspa_browser.cpp index 3f6e6cb9b..535a6a470 100644 --- a/plugins/ladspa_browser/ladspa_browser.cpp +++ b/plugins/ladspa_browser/ladspa_browser.cpp @@ -36,7 +36,7 @@ #include "ladspa_description.h" #include "ladspa_port_dialog.h" #include "TabBar.h" -#include "tab_button.h" +#include "TabButton.h" #include "embed.cpp" diff --git a/src/gui/SetupDialog.cpp b/src/gui/SetupDialog.cpp index f919ee6bf..a29114f8b 100644 --- a/src/gui/SetupDialog.cpp +++ b/src/gui/SetupDialog.cpp @@ -33,7 +33,7 @@ #include "SetupDialog.h" #include "TabBar.h" -#include "tab_button.h" +#include "TabButton.h" #include "TabWidget.h" #include "gui_templates.h" #include "Mixer.h" diff --git a/src/gui/widgets/TabBar.cpp b/src/gui/widgets/TabBar.cpp index e5bcf3db2..325767ad1 100644 --- a/src/gui/widgets/TabBar.cpp +++ b/src/gui/widgets/TabBar.cpp @@ -24,7 +24,7 @@ #include "TabBar.h" -#include "tab_button.h" +#include "TabButton.h" #include "gui_templates.h" #include "ToolTip.h" @@ -51,7 +51,7 @@ TabBar::~TabBar() -tabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, +TabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, bool _add_stretch, bool _text_is_tooltip ) { // already tab with id? @@ -62,7 +62,7 @@ tabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, } QString caption = ( _text_is_tooltip ) ? QString( "" ) : _text; // create tab-button - tabButton * b = new tabButton( caption, _id, this ); + TabButton * b = new TabButton( caption, _id, this ); connect( b, SIGNAL( clicked( int ) ), this, SLOT( tabClicked( int ) ) ); b->setIconSize( QSize( 48, 48 ) ); b->setFixedSize( 64, 64 ); @@ -75,7 +75,7 @@ tabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, // small workaround, because QBoxLayout::addWidget(...) doesn't // work properly, so we first have to remove all tabs from the // layout and them add them in the correct order - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { m_layout->removeWidget( it.value().first ); @@ -136,7 +136,7 @@ void TabBar::setActiveTab( int _id ) int TabBar::activeTab() { - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { if( tabState( it.key() ) == true ) @@ -175,7 +175,7 @@ void TabBar::setTabState( int _id, bool _checked ) void TabBar::hideAll( int _exception ) { - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { if( it.key() != _exception ) @@ -228,7 +228,7 @@ void TabBar::tabClicked( int _id ) bool TabBar::allHidden() { - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { if( !it.value().second->isHidden() ) From 3f172c5a4c21279d555af03324dac6c965f24d9d Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 11:33:01 +0100 Subject: [PATCH 21/21] Rename tranformable_auto_model to TransformableAutoModel I think this class isn't even used, probably safe to remove? --- ...ransformable_auto_model.h => TransformableAutoModel.h} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename include/{transformable_auto_model.h => TransformableAutoModel.h} (89%) diff --git a/include/transformable_auto_model.h b/include/TransformableAutoModel.h similarity index 89% rename from include/transformable_auto_model.h rename to include/TransformableAutoModel.h index ab9862e1b..9aadea0d7 100644 --- a/include/transformable_auto_model.h +++ b/include/TransformableAutoModel.h @@ -1,5 +1,5 @@ /* - * transformable_auto_model.h - template transformableAutoModel + * TransformableAutoModel.h - template transformableAutoModel * * Copyright (c) 2008 Tobias Doerffel * @@ -41,10 +41,10 @@ struct AutoModelTransformer template -class transformableAutoModel : public AutomatableModel +class TransformableAutoModel : public AutomatableModel { public: - transformableAutoModel( const AutoModelTransformer * _transformer, + TransformableAutoModel( const AutoModelTransformer * _transformer, const T _val = 0, const T _min = 0, const T _max = 0, @@ -57,7 +57,7 @@ public: { } - inline virtual ~transformableAutoModel() + inline virtual ~TransformableAutoModel() { }