From ce2d898da23a83c03db84c91e63901f4bce8f473 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 14 Jun 2022 19:27:20 +0200 Subject: [PATCH 01/17] Correctly upgrade projects saved by LMMS forks (#6424) * Do project file upgrades based on file version and not on LMMS version * Do upgrade after version check --- src/core/DataFile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 8248be8f3..2fe9b88d9 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -1922,8 +1922,6 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile ) ProjectVersion createdWith = root.attribute("creatorversion"); ProjectVersion openedWith = LMMS_VERSION; - if (createdWith < openedWith) { upgrade(); } - if (createdWith.setCompareType(ProjectVersion::Minor) != openedWith.setCompareType(ProjectVersion::Minor) && getGUI() != nullptr && root.attribute("type") == "song" @@ -1941,6 +1939,9 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile ) } } + // Perform upgrade routines + if (m_fileVersion < UPGRADE_METHODS.size()) { upgrade(); } + m_content = root.elementsByTagName(typeName(m_type)).item(0).toElement(); } From 5879d7eaa70ea45c5dd5fabf7f66acc4c82e52be Mon Sep 17 00:00:00 2001 From: luzpaz Date: Fri, 17 Jun 2022 23:25:53 -0400 Subject: [PATCH 02/17] Fix typo in doc/lmms.1 (#6429) --- doc/lmms.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/lmms.1 b/doc/lmms.1 index 71bad64de..6a3b1e04b 100644 --- a/doc/lmms.1 +++ b/doc/lmms.1 @@ -42,7 +42,7 @@ Render given project file. .IP "\fBrendertracks\fP \fIproject\fP [\fIoptions\fP...] Render each track to a different file. .IP "\fBupgrade\fP \fIin\fP [\fIout\fP] -Upgrade file \fIin\fP and save as \fIout\fP. Standard out is used if no output file is specifed. +Upgrade file \fIin\fP and save as \fIout\fP. Standard out is used if no output file is specified. .SH GLOBAL OPTIONS @@ -58,7 +58,7 @@ Show version information and exit. .SH OPTIONS IF NO ACTION IS GIVEN .IP "\fB\ --geometry\fP \fIgeometry\fP -Specify the prefered size and position of the main window. +Specify the preferred size and position of the main window. .br \fIgeometry\fP syntax is \fIxsize\fPx\fIysize\fP+\fIxoffset\fP+\fIyoffset\fP. .br From 371f7f506dd6b6552d36863dbe627e3dbd021327 Mon Sep 17 00:00:00 2001 From: Shmuel H Date: Tue, 7 May 2019 08:34:11 +0300 Subject: [PATCH 03/17] AudioEngine: Introduce `RequestChangesGuard`: a RAII verion of requestChangeInModel. Deprecate direct calls to requestChangeInModel. --- include/AudioEngine.h | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/include/AudioEngine.h b/include/AudioEngine.h index 9cf010426..a86f540cb 100644 --- a/include/AudioEngine.h +++ b/include/AudioEngine.h @@ -62,6 +62,46 @@ class LMMS_EXPORT AudioEngine : public QObject { Q_OBJECT public: + /** + * @brief RAII helper for requestChangesInModel. + * Used by AudioEngine::requestChangesGuard. + */ + class RequestChangesGuard { + friend class AudioEngine; + + private: + RequestChangesGuard(AudioEngine* audioEngine) + : m_audioEngine{audioEngine} + { + m_audioEngine->requestChangeInModel(); + } + public: + + RequestChangesGuard() + : m_audioEngine{nullptr} + { + } + + RequestChangesGuard(RequestChangesGuard&& other) + : RequestChangesGuard() + { + std::swap(other.m_audioEngine, m_audioEngine); + } + + // Disallow copy. + RequestChangesGuard(const RequestChangesGuard&) = delete; + RequestChangesGuard& operator=(const RequestChangesGuard&) = delete; + + ~RequestChangesGuard() { + if (m_audioEngine) { + m_audioEngine->doneChangeInModel(); + } + } + + private: + AudioEngine* m_audioEngine; + }; + struct qualitySettings { enum Mode @@ -309,6 +349,11 @@ public: void requestChangeInModel(); void doneChangeInModel(); + RequestChangesGuard requestChangesGuard() + { + return RequestChangesGuard{this}; + } + static bool isAudioDevNameValid(QString name); static bool isMidiDevNameValid(QString name); From 7227c89847a5472f322ae6a0702027dda18b0bc7 Mon Sep 17 00:00:00 2001 From: Levin Oehlmann Date: Sun, 19 Jun 2022 20:08:46 +0200 Subject: [PATCH 04/17] Namespace `lmms` (#6174) This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules. Also, this PR changes back `LmmsCore` to `Engine`, reverting c5199213068cdce59ddc2cffab07f5bcdecfc325 . Co-authored-by: allejok96 --- data/locale/ar.ts | 2 +- data/locale/bs.ts | 2 +- data/locale/ca.ts | 2 +- data/locale/cs.ts | 2 +- data/locale/de.ts | 2 +- data/locale/el.ts | 2 +- data/locale/en.ts | 2 +- data/locale/eo.ts | 2 +- data/locale/es.ts | 2 +- data/locale/eu.ts | 2 +- data/locale/fa.ts | 2 +- data/locale/fr.ts | 2 +- data/locale/gl.ts | 2 +- data/locale/he.ts | 2 +- data/locale/hi_IN.ts | 2 +- data/locale/hu_HU.ts | 2 +- data/locale/id.ts | 2 +- data/locale/it.ts | 2 +- data/locale/ja.ts | 2 +- data/locale/ka.ts | 2 +- data/locale/ko.ts | 2 +- data/locale/ms_MY.ts | 2 +- data/locale/nb.ts | 2 +- data/locale/nl.ts | 2 +- data/locale/oc.ts | 2 +- data/locale/pl.ts | 2 +- data/locale/pt.ts | 2 +- data/locale/ro.ts | 2 +- data/locale/ru.ts | 2 +- data/locale/sl.ts | 2 +- data/locale/sr.ts | 2 +- data/locale/sv.ts | 2 +- data/locale/tr.ts | 2 +- data/locale/uk.ts | 2 +- data/locale/zh_CN.ts | 2 +- data/locale/zh_TW.ts | 2 +- data/themes/classic/style.css | 160 +++++++++-------- data/themes/default/style.css | 168 +++++++++--------- include/AboutDialog.h | 3 + include/ActionGroup.h | 5 + include/AudioAlsa.h | 6 +- include/AudioAlsaSetupWidget.h | 9 +- include/AudioDevice.h | 8 +- include/AudioDeviceSetupWidget.h | 3 + include/AudioDummy.h | 7 +- include/AudioEngine.h | 14 +- include/AudioEngineProfiler.h | 5 + include/AudioEngineWorkerThread.h | 7 +- include/AudioFileDevice.h | 3 + include/AudioFileFlac.h | 6 + include/AudioFileMP3.h | 6 +- include/AudioFileOgg.h | 6 +- include/AudioFileWave.h | 5 + include/AudioJack.h | 18 +- include/AudioOss.h | 20 ++- include/AudioPort.h | 4 + include/AudioPortAudio.h | 48 +++-- include/AudioPulseAudio.h | 16 +- include/AudioSampleRecorder.h | 4 + include/AudioSdl.h | 9 +- include/AudioSndio.h | 15 +- include/AudioSoundIo.h | 11 +- include/AutomatableButton.h | 3 + include/AutomatableModel.h | 9 +- include/AutomatableModelView.h | 5 + include/AutomatableSlider.h | 3 + include/AutomationClip.h | 17 +- include/AutomationClipView.h | 10 ++ include/AutomationEditor.h | 18 +- include/AutomationNode.h | 4 + include/AutomationTrack.h | 6 +- include/AutomationTrackView.h | 10 ++ include/BandLimitedWave.h | 4 + include/BasicFilters.h | 5 + include/BufferManager.h | 12 +- include/CPULoadWidget.h | 6 + include/CaptionMenu.h | 5 +- include/Clip.h | 15 +- include/ClipView.h | 13 +- include/Clipboard.h | 6 +- include/ColorChooser.h | 13 ++ include/ComboBox.h | 5 + include/ComboBoxModel.h | 3 + include/ConfigManager.h | 12 +- include/ControlLayout.h | 10 +- include/Controller.h | 19 +- include/ControllerConnection.h | 13 +- include/ControllerConnectionDialog.h | 14 +- include/ControllerDialog.h | 10 ++ include/ControllerRackView.h | 20 ++- include/ControllerView.h | 9 +- include/Controls.h | 36 ++-- include/CustomTextKnob.h | 7 + include/DataFile.h | 9 +- include/Delay.h | 6 + include/DeprecationHelper.h | 6 + include/DetuningHelper.h | 5 + include/DrumSynth.h | 6 + include/DspEffectLibrary.h | 4 +- include/DummyEffect.h | 13 +- include/DummyInstrument.h | 10 +- include/DummyPlugin.h | 9 +- include/Editor.h | 9 +- include/Effect.h | 16 +- include/EffectChain.h | 14 +- include/EffectControlDialog.h | 10 ++ include/EffectControls.h | 13 +- include/EffectRackView.h | 11 +- include/EffectSelectDialog.h | 5 + include/EffectView.h | 12 +- include/Engine.h | 36 ++-- include/EnvelopeAndLfoParameters.h | 13 +- include/EnvelopeAndLfoView.h | 10 ++ include/ExportFilter.h | 6 + include/ExportProjectDialog.h | 8 + include/FadeButton.h | 6 + include/Fader.h | 6 + include/FifoBuffer.h | 6 + include/FileBrowser.h | 21 ++- include/FileDialog.h | 9 +- include/Graph.h | 17 +- include/GroupBox.h | 3 + include/GuiApplication.h | 5 + include/ImportFilter.h | 5 + include/InlineAutomation.h | 4 + include/Instrument.h | 6 + include/InstrumentFunctionViews.h | 16 +- include/InstrumentFunctions.h | 15 +- include/InstrumentMidiIOView.h | 16 +- include/InstrumentMiscView.h | 13 +- include/InstrumentPlayHandle.h | 6 + include/InstrumentSoundShaping.h | 12 +- include/InstrumentSoundShapingView.h | 6 + include/InstrumentTrack.h | 32 +++- include/InstrumentTrackView.h | 8 +- include/InstrumentTrackWindow.h | 21 ++- include/InstrumentView.h | 6 + include/IoHelper.h | 28 ++- include/JournallingObject.h | 4 + include/Keymap.h | 5 + include/Knob.h | 8 + include/Ladspa2LMMS.h | 8 +- include/LadspaBase.h | 6 + include/LadspaControl.h | 15 +- include/LadspaControlView.h | 10 ++ include/LadspaManager.h | 6 + include/LcdFloatSpinBox.h | 5 + include/LcdSpinBox.h | 4 + include/LcdWidget.h | 5 + include/LedCheckBox.h | 6 + include/LeftRightNav.h | 6 + include/LfoController.h | 26 ++- include/LinkedModelGroupViews.h | 25 ++- include/LinkedModelGroups.h | 12 +- include/LmmsPalette.h | 5 + include/LmmsStyle.h | 6 + include/LocaleHelper.h | 7 +- include/LocklessAllocator.h | 7 + include/LocklessList.h | 5 + include/LocklessRingBuffer.h | 6 + include/Lv2Basics.h | 5 + include/Lv2ControlBase.h | 7 + include/Lv2Evbuf.h | 8 + include/Lv2Features.h | 7 + include/Lv2Manager.h | 6 + include/Lv2Options.h | 6 + include/Lv2Ports.h | 10 +- include/Lv2Proc.h | 7 + include/Lv2SubPluginFeatures.h | 7 + include/Lv2UridCache.h | 8 + include/Lv2UridMap.h | 8 + include/Lv2ViewBase.h | 26 ++- include/MainApplication.h | 8 + include/MainWindow.h | 13 ++ include/MemoryHelper.h | 7 + include/MemoryManager.h | 7 + include/MeterDialog.h | 5 + include/MeterModel.h | 6 + include/MicroTimer.h | 5 + include/Microtuner.h | 5 + include/MicrotunerConfig.h | 7 + include/Midi.h | 7 + include/MidiAlsaRaw.h | 8 +- include/MidiAlsaSeq.h | 11 +- include/MidiApple.h | 9 +- include/MidiCCRackView.h | 14 +- include/MidiClient.h | 7 +- include/MidiClip.h | 16 +- include/MidiClipView.h | 20 ++- include/MidiController.h | 14 +- include/MidiDummy.h | 6 + include/MidiEvent.h | 5 + include/MidiEventProcessor.h | 5 + include/MidiEventToByteSeq.h | 7 + include/MidiJack.h | 9 +- include/MidiOss.h | 9 +- include/MidiPort.h | 19 +- include/MidiPortMenu.h | 3 + include/MidiSetupWidget.h | 7 + include/MidiSndio.h | 12 +- include/MidiWinMM.h | 9 +- include/MixHelpers.h | 8 +- include/Mixer.h | 6 + include/MixerLine.h | 14 +- include/MixerLineLcdSpinBox.h | 7 + include/MixerView.h | 8 + include/Model.h | 4 + include/ModelView.h | 3 + include/ModelVisitor.h | 7 + include/NStateButton.h | 6 + include/Note.h | 7 + include/NotePlayHandle.h | 6 + include/Oscillator.h | 6 + include/OscillatorConstants.h | 6 +- include/Oscilloscope.h | 8 +- include/OutputSettings.h | 8 + include/PathUtil.h | 28 ++- include/PatternClip.h | 6 +- include/PatternClipView.h | 8 + include/PatternEditor.h | 15 +- include/PatternStore.h | 11 +- include/PatternTrack.h | 19 +- include/PatternTrackView.h | 11 ++ include/PeakController.h | 16 +- include/PerfLog.h | 7 + include/Piano.h | 7 + include/PianoRoll.h | 32 +++- include/PianoView.h | 9 + include/Pitch.h | 7 + include/PixmapButton.h | 6 + include/PlayHandle.h | 4 + include/Plugin.h | 19 +- include/PluginBrowser.h | 4 + include/PluginFactory.h | 6 + include/PluginIssue.h | 7 + include/PluginView.h | 4 + include/PositionLine.h | 5 + include/PresetPreviewPlayHandle.h | 5 + include/ProjectJournal.h | 7 + include/ProjectNotes.h | 5 + include/ProjectRenderer.h | 7 + include/ProjectVersion.h | 7 + include/QuadratureLfo.h | 7 + include/RaiiHelpers.h | 6 + include/RecentProjectsMenu.h | 31 ++++ include/RemotePlugin.h | 12 +- include/RemotePluginBase.h | 21 ++- include/RemotePluginClient.h | 5 + include/RenameDialog.h | 4 + include/RenderManager.h | 7 + include/RingBuffer.h | 9 + include/RmsHelper.h | 7 + include/RowTableView.h | 4 + include/Rubberband.h | 5 + include/SampleBuffer.h | 8 +- include/SampleClip.h | 17 +- include/SampleClipView.h | 12 ++ include/SamplePlayHandle.h | 6 + include/SampleRecordHandle.h | 6 + include/SampleTrack.h | 19 +- include/SampleTrackView.h | 13 +- include/SampleTrackWindow.h | 9 +- include/Scale.h | 6 + include/SendButtonIndicator.h | 36 ++++ include/SerializingObject.h | 5 + include/SetupDialog.h | 9 + include/SharedMemory.h | 10 +- include/SideBar.h | 6 + include/SideBarWidget.h | 6 + include/Song.h | 29 ++- include/SongEditor.h | 21 ++- include/StepRecorder.h | 21 ++- include/StepRecorderWidget.h | 7 +- include/StringPairDrag.h | 5 + include/SubWindow.h | 8 + include/SweepOscillator.h | 4 + include/TabBar.h | 6 + include/TabButton.h | 6 + include/TabWidget.h | 6 + include/TemplatesMenu.h | 31 ++++ include/TempoSyncKnob.h | 5 + include/TempoSyncKnobModel.h | 19 +- include/TextFloat.h | 5 + include/ThreadableJob.h | 5 + include/TimeDisplayWidget.h | 4 + include/TimeLineWidget.h | 11 +- include/TimePos.h | 5 + include/ToolButton.h | 4 + include/ToolPlugin.h | 8 + include/ToolPluginView.h | 11 ++ include/Track.h | 20 ++- include/TrackContainer.h | 13 +- include/TrackContainerView.h | 43 +++-- include/TrackContentWidget.h | 17 +- include/TrackLabelButton.h | 6 + include/TrackOperationsWidget.h | 8 +- include/TrackRenameLineEdit.h | 5 + include/TrackView.h | 17 +- include/ValueBuffer.h | 7 + include/VersionedSaveDialog.h | 7 + include/VstSyncController.h | 6 + include/VstSyncData.h | 7 + include/aeffectx.h | 2 +- include/base64.h | 6 +- include/denormals.h | 26 ++- include/embed.h | 8 +- include/endian_handling.h | 7 + include/fft_helpers.h | 6 + include/gui_templates.h | 4 + include/interpolation.h | 5 +- include/lmms_basics.h | 7 + include/lmms_constants.h | 7 + include/lmms_math.h | 6 + include/panning.h | 7 + include/panning_constants.h | 7 + include/shared_object.h | 6 + include/volume.h | 7 + plugins/Amplifier/Amplifier.cpp | 4 + plugins/Amplifier/Amplifier.h | 6 + plugins/Amplifier/AmplifierControlDialog.cpp | 6 + plugins/Amplifier/AmplifierControlDialog.h | 10 ++ plugins/Amplifier/AmplifierControls.cpp | 4 +- plugins/Amplifier/AmplifierControls.h | 16 +- .../AudioFileProcessor/AudioFileProcessor.cpp | 28 +-- .../AudioFileProcessor/AudioFileProcessor.h | 52 ++++-- plugins/BassBooster/BassBooster.cpp | 6 + plugins/BassBooster/BassBooster.h | 5 + .../BassBooster/BassBoosterControlDialog.cpp | 6 + .../BassBooster/BassBoosterControlDialog.h | 9 + plugins/BassBooster/BassBoosterControls.cpp | 6 +- plugins/BassBooster/BassBoosterControls.h | 11 +- plugins/BitInvader/BitInvader.cpp | 15 +- plugins/BitInvader/BitInvader.h | 18 +- plugins/Bitcrush/Bitcrush.cpp | 7 + plugins/Bitcrush/Bitcrush.h | 8 + plugins/Bitcrush/BitcrushControlDialog.cpp | 7 + plugins/Bitcrush/BitcrushControlDialog.h | 12 ++ plugins/Bitcrush/BitcrushControls.cpp | 7 + plugins/Bitcrush/BitcrushControls.h | 13 +- plugins/CarlaBase/Carla.cpp | 38 +++- plugins/CarlaBase/Carla.h | 152 +++++++++------- plugins/CarlaPatchbay/CarlaPatchbay.cpp | 7 + plugins/CarlaRack/CarlaRack.cpp | 7 + plugins/Compressor/Compressor.cpp | 6 + plugins/Compressor/Compressor.h | 9 +- .../Compressor/CompressorControlDialog.cpp | 7 + plugins/Compressor/CompressorControlDialog.h | 27 ++- plugins/Compressor/CompressorControls.cpp | 3 + plugins/Compressor/CompressorControls.h | 11 +- plugins/CrossoverEQ/CrossoverEQ.cpp | 7 + plugins/CrossoverEQ/CrossoverEQ.h | 7 + .../CrossoverEQ/CrossoverEQControlDialog.cpp | 7 + .../CrossoverEQ/CrossoverEQControlDialog.h | 13 ++ plugins/CrossoverEQ/CrossoverEQControls.cpp | 7 + plugins/CrossoverEQ/CrossoverEQControls.h | 12 +- plugins/Delay/DelayControls.cpp | 6 + plugins/Delay/DelayControls.h | 12 +- plugins/Delay/DelayControlsDialog.cpp | 6 +- plugins/Delay/DelayControlsDialog.h | 12 ++ plugins/Delay/DelayEffect.cpp | 6 + plugins/Delay/DelayEffect.h | 6 + plugins/Delay/Lfo.cpp | 6 +- plugins/Delay/Lfo.h | 7 + plugins/Delay/StereoDelay.cpp | 8 +- plugins/Delay/StereoDelay.h | 7 + plugins/DualFilter/DualFilter.cpp | 6 + plugins/DualFilter/DualFilter.h | 7 + .../DualFilter/DualFilterControlDialog.cpp | 14 +- plugins/DualFilter/DualFilterControlDialog.h | 11 ++ plugins/DualFilter/DualFilterControls.cpp | 8 +- plugins/DualFilter/DualFilterControls.h | 13 +- .../DynamicsProcessor/DynamicsProcessor.cpp | 6 + plugins/DynamicsProcessor/DynamicsProcessor.h | 6 +- .../DynamicsProcessorControlDialog.cpp | 5 + .../DynamicsProcessorControlDialog.h | 11 ++ .../DynamicsProcessorControls.cpp | 6 +- .../DynamicsProcessorControls.h | 13 +- plugins/Eq/EqControls.cpp | 10 +- plugins/Eq/EqControls.h | 16 +- plugins/Eq/EqControlsDialog.cpp | 6 + plugins/Eq/EqControlsDialog.h | 12 ++ plugins/Eq/EqCurve.cpp | 7 + plugins/Eq/EqCurve.h | 6 + plugins/Eq/EqEffect.cpp | 7 + plugins/Eq/EqEffect.h | 5 + plugins/Eq/EqFader.h | 7 + plugins/Eq/EqFilter.h | 5 + plugins/Eq/EqParameterWidget.cpp | 6 + plugins/Eq/EqParameterWidget.h | 16 +- plugins/Eq/EqSpectrumView.cpp | 11 ++ plugins/Eq/EqSpectrumView.h | 12 +- plugins/Flanger/FlangerControls.cpp | 5 + plugins/Flanger/FlangerControls.h | 12 +- plugins/Flanger/FlangerControlsDialog.cpp | 6 +- plugins/Flanger/FlangerControlsDialog.h | 13 ++ plugins/Flanger/FlangerEffect.cpp | 7 + plugins/Flanger/FlangerEffect.h | 6 + plugins/Flanger/MonoDelay.cpp | 7 + plugins/Flanger/MonoDelay.h | 7 + plugins/Flanger/Noise.cpp | 7 + plugins/Flanger/Noise.h | 7 + plugins/FreeBoy/FreeBoy.cpp | 16 +- plugins/FreeBoy/FreeBoy.h | 25 ++- plugins/FreeBoy/Gb_Apu_Buffer.cpp | 6 + plugins/FreeBoy/Gb_Apu_Buffer.h | 7 + plugins/GigPlayer/GigPlayer.cpp | 15 +- plugins/GigPlayer/GigPlayer.h | 28 ++- plugins/GigPlayer/PatchesDialog.cpp | 6 + plugins/GigPlayer/PatchesDialog.h | 7 + plugins/HydrogenImport/HydrogenImport.cpp | 7 + plugins/HydrogenImport/HydrogenImport.h | 9 +- plugins/HydrogenImport/LocalFileMng.h | 8 + plugins/HydrogenImport/local_file_mgr.cpp | 5 + plugins/Kicker/Kicker.cpp | 15 +- plugins/Kicker/Kicker.h | 23 ++- plugins/Kicker/KickerOsc.h | 5 + plugins/LadspaBrowser/LadspaBrowser.cpp | 16 +- plugins/LadspaBrowser/LadspaBrowser.h | 22 ++- plugins/LadspaBrowser/LadspaDescription.cpp | 7 +- plugins/LadspaBrowser/LadspaDescription.h | 7 +- plugins/LadspaBrowser/LadspaPortDialog.cpp | 7 +- plugins/LadspaBrowser/LadspaPortDialog.h | 5 +- plugins/LadspaEffect/LadspaControlDialog.cpp | 9 +- plugins/LadspaEffect/LadspaControlDialog.h | 17 +- plugins/LadspaEffect/LadspaControls.cpp | 6 +- plugins/LadspaEffect/LadspaControls.h | 14 +- plugins/LadspaEffect/LadspaEffect.cpp | 7 +- plugins/LadspaEffect/LadspaEffect.h | 6 + .../LadspaEffect/LadspaSubPluginFeatures.cpp | 5 + .../LadspaEffect/LadspaSubPluginFeatures.h | 8 +- plugins/Lb302/Lb302.cpp | 13 +- plugins/Lb302/Lb302.h | 25 ++- plugins/Lv2Effect/Lv2Effect.cpp | 5 + plugins/Lv2Effect/Lv2Effect.h | 7 + plugins/Lv2Effect/Lv2FxControlDialog.cpp | 4 + plugins/Lv2Effect/Lv2FxControlDialog.h | 9 + plugins/Lv2Effect/Lv2FxControls.cpp | 8 +- plugins/Lv2Effect/Lv2FxControls.h | 16 +- plugins/Lv2Instrument/Lv2Instrument.cpp | 14 +- plugins/Lv2Instrument/Lv2Instrument.h | 24 ++- plugins/MidiExport/MidiExport.cpp | 6 + plugins/MidiExport/MidiExport.h | 7 +- plugins/MidiImport/MidiImport.cpp | 16 +- plugins/MidiImport/MidiImport.h | 7 +- plugins/Monstro/Monstro.cpp | 19 +- plugins/Monstro/Monstro.h | 31 +++- plugins/MultitapEcho/MultitapEcho.cpp | 7 + plugins/MultitapEcho/MultitapEcho.h | 6 + .../MultitapEchoControlDialog.cpp | 6 + .../MultitapEcho/MultitapEchoControlDialog.h | 13 ++ plugins/MultitapEcho/MultitapEchoControls.cpp | 6 + plugins/MultitapEcho/MultitapEchoControls.h | 11 +- plugins/Nes/Nes.cpp | 15 +- plugins/Nes/Nes.h | 26 ++- plugins/OpulenZ/OpulenZ.cpp | 13 +- plugins/OpulenZ/OpulenZ.h | 20 ++- plugins/Organic/Organic.cpp | 18 +- plugins/Organic/Organic.h | 24 ++- plugins/Patman/Patman.cpp | 16 +- plugins/Patman/Patman.h | 17 +- .../PeakControllerEffect.cpp | 6 + .../PeakControllerEffect.h | 7 + .../PeakControllerEffectControlDialog.cpp | 4 + .../PeakControllerEffectControlDialog.h | 9 + .../PeakControllerEffectControls.cpp | 7 +- .../PeakControllerEffectControls.h | 13 +- plugins/ReverbSC/ReverbSC.cpp | 7 + plugins/ReverbSC/ReverbSC.h | 8 + plugins/ReverbSC/ReverbSCControlDialog.cpp | 7 + plugins/ReverbSC/ReverbSCControlDialog.h | 11 ++ plugins/ReverbSC/ReverbSCControls.cpp | 7 + plugins/ReverbSC/ReverbSCControls.h | 13 +- plugins/Sf2Player/PatchesDialog.cpp | 5 +- plugins/Sf2Player/PatchesDialog.h | 5 + plugins/Sf2Player/Sf2Player.cpp | 15 +- plugins/Sf2Player/Sf2Player.h | 36 ++-- plugins/Sf2Player/fluidsynthshims.h | 1 + plugins/Sfxr/Sfxr.cpp | 17 +- plugins/Sfxr/Sfxr.h | 19 +- plugins/Sid/SidInstrument.cpp | 16 +- plugins/Sid/SidInstrument.h | 24 ++- plugins/SpectrumAnalyzer/Analyzer.cpp | 5 + plugins/SpectrumAnalyzer/Analyzer.h | 6 + plugins/SpectrumAnalyzer/DataprocLauncher.h | 7 + plugins/SpectrumAnalyzer/SaControls.cpp | 10 +- plugins/SpectrumAnalyzer/SaControls.h | 22 ++- plugins/SpectrumAnalyzer/SaControlsDialog.cpp | 6 + plugins/SpectrumAnalyzer/SaControlsDialog.h | 12 +- plugins/SpectrumAnalyzer/SaProcessor.cpp | 5 + plugins/SpectrumAnalyzer/SaProcessor.h | 7 + plugins/SpectrumAnalyzer/SaSpectrumView.cpp | 5 + plugins/SpectrumAnalyzer/SaSpectrumView.h | 15 ++ plugins/SpectrumAnalyzer/SaWaterfallView.cpp | 7 + plugins/SpectrumAnalyzer/SaWaterfallView.h | 15 +- plugins/StereoEnhancer/StereoEnhancer.cpp | 6 + plugins/StereoEnhancer/StereoEnhancer.h | 5 + .../StereoEnhancerControlDialog.cpp | 6 +- .../StereoEnhancerControlDialog.h | 10 ++ .../StereoEnhancer/StereoEnhancerControls.cpp | 7 +- .../StereoEnhancer/StereoEnhancerControls.h | 12 +- plugins/StereoMatrix/StereoMatrix.cpp | 7 + plugins/StereoMatrix/StereoMatrix.h | 7 +- .../StereoMatrixControlDialog.cpp | 5 + .../StereoMatrix/StereoMatrixControlDialog.h | 10 ++ plugins/StereoMatrix/StereoMatrixControls.cpp | 6 + plugins/StereoMatrix/StereoMatrixControls.h | 12 +- plugins/Stk/Mallets/Mallets.cpp | 16 +- plugins/Stk/Mallets/Mallets.h | 24 ++- plugins/TripleOscillator/TripleOscillator.cpp | 14 +- plugins/TripleOscillator/TripleOscillator.h | 28 ++- plugins/Vectorscope/VecControls.cpp | 10 +- plugins/Vectorscope/VecControls.h | 19 +- plugins/Vectorscope/VecControlsDialog.cpp | 6 + plugins/Vectorscope/VecControlsDialog.h | 13 ++ plugins/Vectorscope/VectorView.cpp | 6 + plugins/Vectorscope/VectorView.h | 10 ++ plugins/Vectorscope/Vectorscope.cpp | 5 + plugins/Vectorscope/Vectorscope.h | 6 + plugins/Vestige/Vestige.cpp | 42 ++++- plugins/Vestige/Vestige.h | 33 +++- plugins/Vibed/NineButtonSelector.cpp | 6 + plugins/Vibed/NineButtonSelector.h | 15 +- plugins/Vibed/StringContainer.cpp | 6 + plugins/Vibed/StringContainer.h | 6 + plugins/Vibed/Vibed.cpp | 25 +-- plugins/Vibed/Vibed.h | 40 +++-- plugins/Vibed/VibratingString.cpp | 5 + plugins/Vibed/VibratingString.h | 7 + plugins/VstBase/RemoteVstPlugin.cpp | 34 ++-- plugins/VstBase/VstPlugin.cpp | 26 +-- plugins/VstBase/VstPlugin.h | 7 +- plugins/VstBase/communication.h | 5 +- plugins/VstBase/vst_base.cpp | 5 + plugins/VstEffect/VstEffect.cpp | 12 +- plugins/VstEffect/VstEffect.h | 10 +- plugins/VstEffect/VstEffectControlDialog.cpp | 6 + plugins/VstEffect/VstEffectControlDialog.h | 19 +- plugins/VstEffect/VstEffectControls.cpp | 16 +- plugins/VstEffect/VstEffectControls.h | 30 +++- plugins/VstEffect/VstSubPluginFeatures.cpp | 4 + plugins/VstEffect/VstSubPluginFeatures.h | 6 +- plugins/Watsyn/Watsyn.cpp | 13 +- plugins/Watsyn/Watsyn.h | 23 ++- plugins/WaveShaper/WaveShaper.cpp | 6 + plugins/WaveShaper/WaveShaper.h | 4 +- .../WaveShaper/WaveShaperControlDialog.cpp | 5 + plugins/WaveShaper/WaveShaperControlDialog.h | 10 ++ plugins/WaveShaper/WaveShaperControls.cpp | 6 +- plugins/WaveShaper/WaveShaperControls.h | 13 +- plugins/Xpressive/ExprSynth.cpp | 8 + plugins/Xpressive/ExprSynth.h | 13 +- plugins/Xpressive/Xpressive.cpp | 135 +++++++------- plugins/Xpressive/Xpressive.h | 41 +++-- plugins/ZynAddSubFx/LocalZynAddSubFx.cpp | 8 +- plugins/ZynAddSubFx/LocalZynAddSubFx.h | 10 +- plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp | 1 + plugins/ZynAddSubFx/RemoteZynAddSubFx.h | 9 +- plugins/ZynAddSubFx/ZynAddSubFx.cpp | 28 ++- plugins/ZynAddSubFx/ZynAddSubFx.h | 48 +++-- plugins/ZynAddSubFx/zynaddsubfx | 2 +- src/common/RemotePluginBase.cpp | 6 + src/common/SharedMemory.cpp | 6 +- src/core/AudioEngine.cpp | 6 + src/core/AudioEngineProfiler.cpp | 3 + src/core/AudioEngineWorkerThread.cpp | 5 +- src/core/AutomatableModel.cpp | 12 +- src/core/AutomationClip.cpp | 13 +- src/core/AutomationNode.cpp | 5 + src/core/BandLimitedWave.cpp | 5 + src/core/BufferManager.cpp | 14 +- src/core/Clip.cpp | 6 +- src/core/Clipboard.cpp | 7 +- src/core/ComboBoxModel.cpp | 5 +- src/core/ConfigManager.cpp | 16 +- src/core/Controller.cpp | 13 +- src/core/ControllerConnection.cpp | 5 +- src/core/DataFile.cpp | 27 ++- src/core/DrumSynth.cpp | 5 + src/core/Effect.cpp | 8 +- src/core/EffectChain.cpp | 6 + src/core/Engine.cpp | 53 +++--- src/core/EnvelopeAndLfoParameters.cpp | 5 +- src/core/ImportFilter.cpp | 4 + src/core/InlineAutomation.cpp | 5 + src/core/Instrument.cpp | 7 + src/core/InstrumentFunctions.cpp | 6 + src/core/InstrumentPlayHandle.cpp | 7 + src/core/InstrumentSoundShaping.cpp | 5 +- src/core/JournallingObject.cpp | 3 + src/core/Keymap.cpp | 7 + src/core/Ladspa2LMMS.cpp | 7 + src/core/LadspaControl.cpp | 6 +- src/core/LadspaManager.cpp | 6 + src/core/LfoController.cpp | 12 +- src/core/LinkedModelGroups.cpp | 9 +- src/core/LocklessAllocator.cpp | 6 + src/core/MemoryHelper.cpp | 6 + src/core/MemoryManager.cpp | 7 + src/core/MeterModel.cpp | 9 +- src/core/MicroTimer.cpp | 5 + src/core/Microtuner.cpp | 6 + src/core/MixHelpers.cpp | 4 +- src/core/Mixer.cpp | 7 + src/core/Model.cpp | 4 +- src/core/ModelVisitor.cpp | 7 + src/core/Note.cpp | 6 + src/core/NotePlayHandle.cpp | 6 + src/core/Oscillator.cpp | 5 +- src/core/PathUtil.cpp | 5 +- src/core/PatternClip.cpp | 10 +- src/core/PatternStore.cpp | 4 + src/core/PeakController.cpp | 11 +- src/core/PerfLog.cpp | 8 + src/core/Piano.cpp | 6 + src/core/PlayHandle.cpp | 5 + src/core/Plugin.cpp | 14 +- src/core/PluginFactory.cpp | 18 +- src/core/PluginIssue.cpp | 9 +- src/core/PresetPreviewPlayHandle.cpp | 5 +- src/core/ProjectJournal.cpp | 4 + src/core/ProjectRenderer.cpp | 6 + src/core/ProjectVersion.cpp | 5 + src/core/RemotePlugin.cpp | 6 + src/core/RenderManager.cpp | 7 + src/core/RingBuffer.cpp | 4 + src/core/SampleBuffer.cpp | 10 +- src/core/SampleClip.cpp | 16 +- src/core/SamplePlayHandle.cpp | 5 +- src/core/SampleRecordHandle.cpp | 6 +- src/core/Scale.cpp | 6 + src/core/SerializingObject.cpp | 5 +- src/core/Song.cpp | 16 +- src/core/StepRecorder.cpp | 8 +- src/core/TempoSyncKnobModel.cpp | 14 +- src/core/TimePos.cpp | 6 + src/core/ToolPlugin.cpp | 6 + src/core/Track.cpp | 14 +- src/core/TrackContainer.cpp | 14 +- src/core/ValueBuffer.cpp | 7 + src/core/VstSyncController.cpp | 8 +- src/core/audio/AudioAlsa.cpp | 4 + src/core/audio/AudioDevice.cpp | 4 +- src/core/audio/AudioFileDevice.cpp | 7 +- src/core/audio/AudioFileFlac.cpp | 5 + src/core/audio/AudioFileMP3.cpp | 4 + src/core/audio/AudioFileOgg.cpp | 4 + src/core/audio/AudioFileWave.cpp | 3 + src/core/audio/AudioJack.cpp | 12 +- src/core/audio/AudioOss.cpp | 8 +- src/core/audio/AudioPort.cpp | 4 + src/core/audio/AudioPortAudio.cpp | 14 ++ src/core/audio/AudioPulseAudio.cpp | 7 +- src/core/audio/AudioSampleRecorder.cpp | 5 +- src/core/audio/AudioSdl.cpp | 5 + src/core/audio/AudioSndio.cpp | 8 +- src/core/audio/AudioSoundIo.cpp | 6 + src/core/base64.cpp | 5 +- src/core/fft_helpers.cpp | 7 + src/core/lv2/Lv2Basics.cpp | 5 + src/core/lv2/Lv2ControlBase.cpp | 3 + src/core/lv2/Lv2Evbuf.cpp | 7 + src/core/lv2/Lv2Features.cpp | 6 + src/core/lv2/Lv2Manager.cpp | 4 +- src/core/lv2/Lv2Options.cpp | 6 + src/core/lv2/Lv2Ports.cpp | 6 +- src/core/lv2/Lv2Proc.cpp | 4 + src/core/lv2/Lv2SubPluginFeatures.cpp | 6 + src/core/lv2/Lv2UridCache.cpp | 7 + src/core/lv2/Lv2UridMap.cpp | 7 + src/core/main.cpp | 10 +- src/core/midi/MidiAlsaRaw.cpp | 8 +- src/core/midi/MidiAlsaSeq.cpp | 12 +- src/core/midi/MidiApple.cpp | 9 +- src/core/midi/MidiClient.cpp | 5 + src/core/midi/MidiController.cpp | 7 +- src/core/midi/MidiEventToByteSeq.cpp | 6 + src/core/midi/MidiJack.cpp | 7 +- src/core/midi/MidiOss.cpp | 7 +- src/core/midi/MidiPort.cpp | 8 + src/core/midi/MidiSndio.cpp | 7 + src/core/midi/MidiWinMM.cpp | 8 +- src/gui/ActionGroup.cpp | 5 + src/gui/AudioAlsaSetupWidget.cpp | 4 + src/gui/AudioDeviceSetupWidget.cpp | 4 + src/gui/AutomatableModelView.cpp | 11 +- src/gui/ControlLayout.cpp | 5 + src/gui/ControllerDialog.cpp | 5 +- src/gui/ControllerRackView.cpp | 13 +- src/gui/ControllerView.cpp | 6 + src/gui/Controls.cpp | 4 + src/gui/EffectControlDialog.cpp | 7 +- src/gui/EffectRackView.cpp | 17 +- src/gui/EffectView.cpp | 5 + src/gui/FileBrowser.cpp | 7 + src/gui/GuiApplication.cpp | 23 ++- src/gui/LadspaControlView.cpp | 6 +- src/gui/LfoControllerDialog.cpp | 5 + src/gui/LinkedModelGroupViews.cpp | 4 + src/gui/LmmsPalette.cpp | 5 +- src/gui/LmmsStyle.cpp | 8 + src/gui/Lv2ViewBase.cpp | 4 + src/gui/MainApplication.cpp | 7 + src/gui/MainWindow.cpp | 6 + src/gui/MicrotunerConfig.cpp | 6 + src/gui/MidiCCRackView.cpp | 6 + src/gui/MidiSetupWidget.cpp | 8 + src/gui/MixerLine.cpp | 7 + src/gui/MixerView.cpp | 7 + src/gui/ModelView.cpp | 3 + src/gui/PeakControllerDialog.cpp | 4 + src/gui/PluginBrowser.cpp | 10 +- src/gui/ProjectNotes.cpp | 5 + src/gui/RowTableView.cpp | 7 +- src/gui/SampleTrackWindow.cpp | 8 +- src/gui/SendButtonIndicator.cpp | 7 + src/gui/SideBar.cpp | 6 +- src/gui/SideBarWidget.cpp | 7 +- src/gui/StringPairDrag.cpp | 7 + src/gui/SubWindow.cpp | 5 + src/gui/ToolPluginView.cpp | 4 + src/gui/clips/AutomationClipView.cpp | 6 + src/gui/clips/ClipView.cpp | 6 + src/gui/clips/MidiClipView.cpp | 7 + src/gui/clips/PatternClipView.cpp | 7 + src/gui/clips/SampleClipView.cpp | 7 + src/gui/editors/AutomationEditor.cpp | 14 +- src/gui/editors/Editor.cpp | 5 + src/gui/editors/PatternEditor.cpp | 5 + src/gui/editors/PianoRoll.cpp | 42 +++-- src/gui/editors/PositionLine.cpp | 6 + src/gui/editors/Rubberband.cpp | 9 +- src/gui/editors/SongEditor.cpp | 15 +- src/gui/editors/StepRecorderWidget.cpp | 5 + src/gui/editors/TimeLineWidget.cpp | 6 + src/gui/editors/TrackContainerView.cpp | 58 +++--- src/gui/embed.cpp | 6 +- src/gui/instrument/EnvelopeAndLfoView.cpp | 8 + .../instrument/InstrumentFunctionViews.cpp | 5 +- src/gui/instrument/InstrumentMidiIOView.cpp | 5 + src/gui/instrument/InstrumentMiscView.cpp | 7 + .../instrument/InstrumentSoundShapingView.cpp | 5 +- src/gui/instrument/InstrumentTrackWindow.cpp | 17 ++ src/gui/instrument/InstrumentView.cpp | 4 + src/gui/instrument/PianoView.cpp | 6 +- src/gui/menus/MidiPortMenu.cpp | 4 +- src/gui/menus/RecentProjectsMenu.cpp | 7 + src/gui/menus/TemplatesMenu.cpp | 8 + src/gui/modals/AboutDialog.cpp | 4 + src/gui/modals/ColorChooser.cpp | 5 + src/gui/modals/ControllerConnectionDialog.cpp | 8 +- src/gui/modals/EffectSelectDialog.cpp | 8 +- src/gui/modals/EffectSelectDialog.ui | 2 +- src/gui/modals/ExportProjectDialog.cpp | 4 + src/gui/modals/FileDialog.cpp | 6 + src/gui/modals/RenameDialog.cpp | 5 + src/gui/modals/SetupDialog.cpp | 7 + src/gui/modals/VersionedSaveDialog.cpp | 7 + src/gui/tracks/AutomationTrackView.cpp | 10 +- src/gui/tracks/FadeButton.cpp | 6 + src/gui/tracks/InstrumentTrackView.cpp | 6 + src/gui/tracks/PatternTrackView.cpp | 6 + src/gui/tracks/SampleTrackView.cpp | 7 + src/gui/tracks/TrackContentWidget.cpp | 10 +- src/gui/tracks/TrackLabelButton.cpp | 6 +- src/gui/tracks/TrackOperationsWidget.cpp | 9 +- src/gui/tracks/TrackRenameLineEdit.cpp | 5 + src/gui/tracks/TrackView.cpp | 10 +- src/gui/widgets/AutomatableButton.cpp | 4 +- src/gui/widgets/AutomatableSlider.cpp | 4 +- src/gui/widgets/CPULoadWidget.cpp | 9 +- src/gui/widgets/CaptionMenu.cpp | 5 + src/gui/widgets/ComboBox.cpp | 4 +- src/gui/widgets/CustomTextKnob.cpp | 7 + src/gui/widgets/Fader.cpp | 6 + src/gui/widgets/Graph.cpp | 13 +- src/gui/widgets/GroupBox.cpp | 6 + src/gui/widgets/Knob.cpp | 7 + src/gui/widgets/LcdFloatSpinBox.cpp | 6 + src/gui/widgets/LcdSpinBox.cpp | 3 + src/gui/widgets/LcdWidget.cpp | 4 +- src/gui/widgets/LedCheckBox.cpp | 7 +- src/gui/widgets/LeftRightNav.cpp | 6 + src/gui/widgets/MeterDialog.cpp | 5 + src/gui/widgets/MixerLineLcdSpinBox.cpp | 7 + src/gui/widgets/NStateButton.cpp | 6 + src/gui/widgets/Oscilloscope.cpp | 13 +- src/gui/widgets/PixmapButton.cpp | 6 +- src/gui/widgets/TabBar.cpp | 10 +- src/gui/widgets/TabWidget.cpp | 6 + src/gui/widgets/TempoSyncKnob.cpp | 8 +- src/gui/widgets/TextFloat.cpp | 5 +- src/gui/widgets/TimeDisplayWidget.cpp | 4 + src/gui/widgets/ToolButton.cpp | 6 + src/tracks/AutomationTrack.cpp | 10 +- src/tracks/InstrumentTrack.cpp | 11 +- src/tracks/MidiClip.cpp | 30 ++-- src/tracks/PatternTrack.cpp | 10 +- src/tracks/SampleTrack.cpp | 13 +- tests/check-strings/check-strings | 20 ++- tests/main.cpp | 2 +- tests/src/core/AutomatableModelTest.cpp | 4 + tests/src/core/ProjectVersionTest.cpp | 2 + tests/src/core/RelativePathsTest.cpp | 2 + tests/src/tracks/AutomationTrackTest.cpp | 14 ++ 804 files changed, 6609 insertions(+), 1478 deletions(-) diff --git a/data/locale/ar.ts b/data/locale/ar.ts index 8e989509d..1f159c42a 100644 --- a/data/locale/ar.ts +++ b/data/locale/ar.ts @@ -7156,7 +7156,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/bs.ts b/data/locale/bs.ts index 013585b5f..506b401bd 100644 --- a/data/locale/bs.ts +++ b/data/locale/bs.ts @@ -4416,7 +4416,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/ca.ts b/data/locale/ca.ts index 3512b4871..765cf3b60 100644 --- a/data/locale/ca.ts +++ b/data/locale/ca.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/cs.ts b/data/locale/cs.ts index 7951c75b9..0ed175022 100644 --- a/data/locale/cs.ts +++ b/data/locale/cs.ts @@ -7157,7 +7157,7 @@ Poklepejte pro výběr souboru. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/de.ts b/data/locale/de.ts index ef4d94634..51ca7d562 100644 --- a/data/locale/de.ts +++ b/data/locale/de.ts @@ -7156,7 +7156,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/el.ts b/data/locale/el.ts index b543854d3..320a6657f 100644 --- a/data/locale/el.ts +++ b/data/locale/el.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/en.ts b/data/locale/en.ts index b58d27f30..e52ae39ab 100644 --- a/data/locale/en.ts +++ b/data/locale/en.ts @@ -7157,7 +7157,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/eo.ts b/data/locale/eo.ts index b133d8029..005ee8100 100644 --- a/data/locale/eo.ts +++ b/data/locale/eo.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/es.ts b/data/locale/es.ts index 8fb164421..4fc4951ef 100644 --- a/data/locale/es.ts +++ b/data/locale/es.ts @@ -7156,7 +7156,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/eu.ts b/data/locale/eu.ts index 9642a3ff2..25c165f81 100644 --- a/data/locale/eu.ts +++ b/data/locale/eu.ts @@ -7436,7 +7436,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/fa.ts b/data/locale/fa.ts index 4e72345fd..181ca0ca1 100644 --- a/data/locale/fa.ts +++ b/data/locale/fa.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/fr.ts b/data/locale/fr.ts index 85f443309..2c65444a8 100644 --- a/data/locale/fr.ts +++ b/data/locale/fr.ts @@ -7448,7 +7448,7 @@ Double-cliquez pour choisir un fichier. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/gl.ts b/data/locale/gl.ts index 38a80a5da..cf04fd5d4 100644 --- a/data/locale/gl.ts +++ b/data/locale/gl.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/he.ts b/data/locale/he.ts index 783b473b7..ee5a23613 100644 --- a/data/locale/he.ts +++ b/data/locale/he.ts @@ -7156,7 +7156,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/hi_IN.ts b/data/locale/hi_IN.ts index 5ba65acd6..15550231f 100644 --- a/data/locale/hi_IN.ts +++ b/data/locale/hi_IN.ts @@ -7157,7 +7157,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/hu_HU.ts b/data/locale/hu_HU.ts index f82ff12c4..836059946 100644 --- a/data/locale/hu_HU.ts +++ b/data/locale/hu_HU.ts @@ -7162,7 +7162,7 @@ Kattints duplán egy fájl kiválasztásához. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/id.ts b/data/locale/id.ts index b55f6c98c..e381ea726 100644 --- a/data/locale/id.ts +++ b/data/locale/id.ts @@ -7160,7 +7160,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/it.ts b/data/locale/it.ts index 29865352a..ff146d471 100644 --- a/data/locale/it.ts +++ b/data/locale/it.ts @@ -7169,7 +7169,7 @@ Fai doppio click per scegliere un file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/ja.ts b/data/locale/ja.ts index 28fda3123..e10ca5118 100644 --- a/data/locale/ja.ts +++ b/data/locale/ja.ts @@ -7157,7 +7157,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/ka.ts b/data/locale/ka.ts index b48b3f2b0..1956d8d04 100644 --- a/data/locale/ka.ts +++ b/data/locale/ka.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/ko.ts b/data/locale/ko.ts index 78cfbdd5c..7373b5ca9 100644 --- a/data/locale/ko.ts +++ b/data/locale/ko.ts @@ -7160,7 +7160,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/ms_MY.ts b/data/locale/ms_MY.ts index 533efdcad..209d51d10 100644 --- a/data/locale/ms_MY.ts +++ b/data/locale/ms_MY.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/nb.ts b/data/locale/nb.ts index 41865ef0c..3675b7f58 100644 --- a/data/locale/nb.ts +++ b/data/locale/nb.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/nl.ts b/data/locale/nl.ts index 2eaa6b154..ad630a249 100644 --- a/data/locale/nl.ts +++ b/data/locale/nl.ts @@ -7158,7 +7158,7 @@ Dubbelklikken om een bestand te kiezen. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/oc.ts b/data/locale/oc.ts index 8df1aa1a1..58c81c964 100644 --- a/data/locale/oc.ts +++ b/data/locale/oc.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/pl.ts b/data/locale/pl.ts index 340be33d8..bb0c64ede 100644 --- a/data/locale/pl.ts +++ b/data/locale/pl.ts @@ -7441,7 +7441,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/pt.ts b/data/locale/pt.ts index f94f22920..b375e289f 100644 --- a/data/locale/pt.ts +++ b/data/locale/pt.ts @@ -7158,7 +7158,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/ro.ts b/data/locale/ro.ts index ca148f452..eceb45a64 100644 --- a/data/locale/ro.ts +++ b/data/locale/ro.ts @@ -7156,7 +7156,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/ru.ts b/data/locale/ru.ts index 40e385d2c..8235f291f 100644 --- a/data/locale/ru.ts +++ b/data/locale/ru.ts @@ -7178,7 +7178,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/sl.ts b/data/locale/sl.ts index dd9680976..3ad55a4c0 100644 --- a/data/locale/sl.ts +++ b/data/locale/sl.ts @@ -7155,7 +7155,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/sr.ts b/data/locale/sr.ts index a8c1fd96d..9b90164ab 100644 --- a/data/locale/sr.ts +++ b/data/locale/sr.ts @@ -3550,7 +3550,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/sv.ts b/data/locale/sv.ts index 882524c50..4963b07a9 100644 --- a/data/locale/sv.ts +++ b/data/locale/sv.ts @@ -7447,7 +7447,7 @@ Dubbelklicka för att välja en fil. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/tr.ts b/data/locale/tr.ts index fa4ccb696..387be6d8b 100644 --- a/data/locale/tr.ts +++ b/data/locale/tr.ts @@ -7449,7 +7449,7 @@ Bir dosya seçmek için çift tıklayın. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/uk.ts b/data/locale/uk.ts index 84cc81899..50df10e4b 100644 --- a/data/locale/uk.ts +++ b/data/locale/uk.ts @@ -7156,7 +7156,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/zh_CN.ts b/data/locale/zh_CN.ts index 301d54362..63b22df99 100644 --- a/data/locale/zh_CN.ts +++ b/data/locale/zh_CN.ts @@ -7166,7 +7166,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/locale/zh_TW.ts b/data/locale/zh_TW.ts index a190c831c..791a45599 100644 --- a/data/locale/zh_TW.ts +++ b/data/locale/zh_TW.ts @@ -7156,7 +7156,7 @@ Double click to pick a file. - LmmsCore + Engine Generating wavetables diff --git a/data/themes/classic/style.css b/data/themes/classic/style.css index ea3cbf4a2..58ec5dc09 100644 --- a/data/themes/classic/style.css +++ b/data/themes/classic/style.css @@ -11,12 +11,12 @@ QMdiArea { background-image: url(resources:background_artwork.png); } -Knob { +lmms--gui--Knob { qproperty-lineInactiveColor: rgb(120, 120, 120); qproperty-arcInactiveColor: rgba(120, 120, 120, 70); } -AutomationEditor { +lmms--gui--AutomationEditor { background-color: rgb(0, 0, 0); color: #e0e0e0; qproperty-backgroundShade: rgba(255, 255, 255, 15); @@ -70,7 +70,7 @@ QToolTip { color: #4afd85; } -TextFloat { +lmms--gui--TextFloat { border-radius: 4px; background: qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:0.5, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(50, 50, 50, 220)); opacity: 175; @@ -130,18 +130,18 @@ QMenu::indicator:selected { background-color: #747474; } -FileBrowser QCheckBox +lmms--gui--FileBrowser QCheckBox { font-size: 10px; color: white; } -PositionLine { +lmms--gui--PositionLine { qproperty-tailGradient: false; qproperty-lineColor: rgb(255, 255, 255); } -PianoRoll { +lmms--gui--PianoRoll { background-color: rgb(0, 0, 0); qproperty-backgroundShade: rgba( 255, 255, 255, 10 ); qproperty-noteModeColor: rgb( 255, 255, 255 ); @@ -182,7 +182,7 @@ PianoRoll { qproperty-textShadow: rgb( 240, 240, 240 ); } -TabWidget { +lmms--gui--TabWidget { background-color: #5b6571; qproperty-tabText: rgba(255, 255, 255, 180); qproperty-tabTitleText: #fff; @@ -191,13 +191,13 @@ TabWidget { qproperty-tabBorder: #3c434b; } -GroupBox { +lmms--gui--GroupBox { background-color: #5b6571; } /* main toolbar oscilloscope - can have transparent bg now */ -Oscilloscope { +lmms--gui--Oscilloscope { background: none; border: none; qproperty-normalColor: rgb(71, 253, 133); @@ -206,7 +206,7 @@ Oscilloscope { /* main toolbar cpu load widget - this can have transparent bg now */ -CPULoadWidget { +lmms--gui--CPULoadWidget { border: none; background: url(resources:cpuload_bg.png); } @@ -335,19 +335,19 @@ QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarr /* background for song editor and pattern editor */ -TrackContainerView QFrame{ +lmms--gui--TrackContainerView QFrame{ background-color: #49515b; } /* background for track controls */ -TrackView > QWidget { +lmms--gui--TrackView > QWidget { background-color: #5b6571; } /* autoscroll, loop, stop behaviour toggle buttons */ /* track background colors */ -TrackContentWidget { +lmms--gui--TrackContentWidget { qproperty-darkerColor: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb( 50, 50, 50 ), stop:0.33 rgb( 20, 20, 20 ), stop:1 rgb( 15, 15, 15 ) ); qproperty-lighterColor: qlineargradient(x1:0, y1:0, x2:0, y2:1, @@ -359,7 +359,7 @@ TrackContentWidget { /* gear button in tracks */ -TrackOperationsWidget > QPushButton { +lmms--gui--TrackOperationsWidget > QPushButton { max-height: 26px; max-width: 26px; min-height: 26px; @@ -368,7 +368,7 @@ TrackOperationsWidget > QPushButton { border: none; } -TrackOperationsWidget > QPushButton::menu-indicator { +lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator { image: url(resources:trackop.png); subcontrol-origin: padding; subcontrol-position: center; @@ -376,12 +376,12 @@ TrackOperationsWidget > QPushButton::menu-indicator { top: 1px; } -TrackOperationsWidget > QPushButton::menu-indicator:hover { +lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:hover { image: url(resources:trackop_h.png); } -TrackOperationsWidget > QPushButton::menu-indicator:pressed, -TrackOperationsWidget > QPushButton::menu-indicator:checked { +lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:pressed, +lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:checked { image: url(resources:trackop_c.png); position: relative; top: 2px; @@ -395,13 +395,13 @@ TrackOperationsWidget > QPushButton::menu-indicator:checked { /* font sizes */ -Sf2InstrumentView > QLabel { +lmms--gui--Sf2InstrumentView > QLabel { font-size:10px; } /* main toolbar sliders (master vol, master pitch) */ -AutomatableSlider::groove:vertical { +lmms--gui--AutomatableSlider::groove:vertical { background: rgba(0,0,0, 128); border: 1px inset rgba(100,100,100, 64); border-radius: 2px; @@ -409,7 +409,7 @@ AutomatableSlider::groove:vertical { margin: 2px 2px; } -AutomatableSlider::handle:vertical { +lmms--gui--AutomatableSlider::handle:vertical { background: none; border-image: url(resources:main_slider.png); width: 26px; @@ -425,13 +425,13 @@ QTabWidget, QTabWidget QWidget { /* window that shows up when you add effects */ -EffectSelectDialog QScrollArea { +lmms--gui--EffectSelectDialog QScrollArea { background: #5b6571; } /* the inner boxes in LADSPA effect windows */ -EffectControlDialog QGroupBox { +lmms--gui--EffectControlDialog QGroupBox { background: #49515b; margin-top: 1ex; padding: 10px 2px 1px; @@ -441,7 +441,7 @@ EffectControlDialog QGroupBox { /* the inner box titles when present (channel 1, channel 2...) */ -EffectControlDialog QGroupBox::title { +lmms--gui--EffectControlDialog QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top left; background: #7b838d; @@ -531,7 +531,7 @@ QToolButton::menu-button { /* track label buttons - the part that contains the icon and track title */ -TrackLabelButton { +lmms--gui--TrackLabelButton { background-color: #5b6571; color: #c9c9c9; font-size: 11px; @@ -541,7 +541,7 @@ TrackLabelButton { padding: 2px 1px; } -TrackLabelButton:hover { +lmms--gui--TrackLabelButton:hover { background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:0.5, stop:0 #5b6571, stop:0.75 #7b838d, stop:1 #7b838d ); color: white; border: 1px solid rgba(0,0,0,64); @@ -549,7 +549,7 @@ TrackLabelButton:hover { margin: 0px; } -TrackLabelButton:pressed { +lmms--gui--TrackLabelButton:pressed { background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.3 #5b6571, stop:1 #6b7581 ); color: white; border: 1px solid rgba(0,0,0,64); @@ -557,7 +557,7 @@ TrackLabelButton:pressed { font-weight: bold; } -TrackLabelButton:checked { +lmms--gui--TrackLabelButton:checked { background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.3 #5b6571, stop:1 #6b7581 ); color: white; border: 1px solid rgba(0,0,0,128); @@ -565,50 +565,52 @@ TrackLabelButton:checked { font-weight: bold; } -TrackLabelButton:checked:hover { +lmms--gui--TrackLabelButton:checked:hover { background-color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:0.5, stop:0 #5b6571, stop:0.75 #7b838d, stop:1 #7b838d ); } -TrackLabelButton:checked:pressed { +lmms--gui--TrackLabelButton:checked:pressed { background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #49515b, stop:0.3 #5b6571, stop:1 #6b7581 ); } /* sidebar, sidebar buttons */ -SideBar { +lmms--gui--SideBar { background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop: 0 #98a2a7, stop: 1.0 #5b646f); } -SideBar QToolButton { +lmms--gui--SideBar QToolButton { font-size: 12px; } /* Instrument plugin list */ -PluginDescWidget { +lmms--gui--PluginDescWidget { background-color: #e0e0e0; color: #404040; border: 1px solid rgb(64, 64, 64); margin: 0px; } -PluginDescWidget:hover { +lmms--gui--PluginDescWidget:hover { background-color: #e0e0e0; } /* piano widget */ -PianoView { +lmms--gui--PianoView { background-color: #14171a; } /* font sizes for text buttons */ -MixerView QPushButton, EffectRackView QPushButton, ControllerRackView QPushButton { +lmms--gui--MixerView QPushButton, +lmms--gui--EffectRackView QPushButton, +lmms--gui--ControllerRackView QPushButton { font-size: 10px; } -MixerLine { +lmms--gui--MixerLine { background: #5b6571; color: #e0e0e0; qproperty-backgroundActive: qlineargradient(spread:reflect, x1:0, y1:0, x2:1, y2:0, @@ -620,13 +622,13 @@ MixerLine { } /* persistent peak markers for fx peak meters */ -Fader { +lmms--gui--Fader { qproperty-peakGreen: rgb( 74, 253, 133); qproperty-peakYellow: rgb(224, 222, 18); qproperty-peakRed: rgb( 255, 100, 100); } -TimeLineWidget { +lmms--gui--TimeLineWidget { /* font-size only supports px and pt. */ font-size: 7pt; /* lengths also support em. This will make sure that the height @@ -654,7 +656,7 @@ QTreeView { alternate-background-color: #747474; } -TrackContainerView QLabel +lmms--gui--TrackContainerView QLabel { background: none; } @@ -662,7 +664,7 @@ TrackContainerView QLabel /* Clips */ /* common clip colors */ -ClipView { +lmms--gui--ClipView { qproperty-mutedColor: rgb( 128, 128, 128 ); qproperty-mutedBackgroundColor: rgb( 80, 80, 80 ); qproperty-selectedColor: rgb( 0, 125, 255 ); @@ -679,7 +681,7 @@ ClipView { } /* MIDI (instrument) clip */ -MidiClipView { +lmms--gui--MidiClipView { background-color: rgb( 119, 199, 216 ); color: rgb( 187, 227, 236 ); @@ -690,24 +692,24 @@ MidiClipView { } /* sample track clip */ -SampleClipView { +lmms--gui--SampleClipView { background-color: rgba(42,51,59,255); color: #FF8F05; } /* automation clip */ -AutomationClipView { +lmms--gui--AutomationClipView { background-color: #99afff; color: rgb( 204, 215, 255 ); } /* pattern clip */ -PatternClipView { +lmms--gui--PatternClipView { background-color: rgb( 128, 182, 175 ); /* default colour for pattern tracks */ } /* Subwindows in MDI-Area */ -SubWindow { +lmms--gui--SubWindow { color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #4b525c, stop: 1.0 #31363d); qproperty-activeColor: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, @@ -717,21 +719,21 @@ SubWindow { } /* Subwindow title text */ -SubWindow > QLabel { +lmms--gui--SubWindow > QLabel { color: rgb( 255, 255, 255 ); font-size: 12px; font-style: normal; } /* SubWindow titlebar button */ -SubWindow > QPushButton { +lmms--gui--SubWindow > QPushButton { background-color: rgba( 255, 255, 255, 0% ); border-width: 0px; border-color: none; border-style: none; } -SubWindow > QPushButton:hover{ +lmms--gui--SubWindow > QPushButton:hover{ background-color: rgba( 255, 255, 255, 15% ); border-width: 1px; border-color: rgba( 0, 0, 0, 20% ); @@ -742,7 +744,7 @@ SubWindow > QPushButton:hover{ /* Plugins */ -TripleOscillatorView Knob { +lmms--gui--TripleOscillatorView lmms--gui--Knob { color: rgb(255, 255, 255); qproperty-outerColor: rgb(255, 255, 255); qproperty-innerRadius: 2; @@ -753,7 +755,7 @@ TripleOscillatorView Knob { } -KickerInstrumentView Knob#smallKnob { +lmms--gui--KickerInstrumentView lmms--gui--Knob#smallKnob { color: #595959; qproperty-outerColor: black; qproperty-innerRadius: 3; @@ -764,7 +766,7 @@ KickerInstrumentView Knob#smallKnob { } -KickerInstrumentView Knob#largeKnob { +lmms--gui--KickerInstrumentView lmms--gui--Knob#largeKnob { color: #0c3b89; qproperty-outerColor: #519fff; qproperty-innerRadius: 12.0; @@ -775,7 +777,7 @@ KickerInstrumentView Knob#largeKnob { } -AudioFileProcessorView Knob { +lmms--gui--AudioFileProcessorView lmms--gui--Knob { color: rgb(240, 147, 14); qproperty-outerColor: rgb(30, 35, 37); qproperty-innerRadius: 4; @@ -785,7 +787,7 @@ AudioFileProcessorView Knob { qproperty-lineWidth: 3; } -OrganicInstrumentView Knob { +lmms--gui--OrganicInstrumentView lmms--gui--Knob { color: rgb(124, 207, 98); qproperty-outerColor: rgb(13, 42, 4); qproperty-innerRadius: 2; @@ -795,13 +797,13 @@ OrganicInstrumentView Knob { qproperty-lineWidth: 1.5; } -OrganicInstrumentView Knob#harmKnob { +lmms--gui--OrganicInstrumentView lmms--gui--Knob#harmKnob { color: rgb(205, 98, 216); qproperty-outerColor: rgb(18, 4, 18); } -OrganicInstrumentView Knob#fx1Knob, -OrganicInstrumentView Knob#volKnob { +lmms--gui--OrganicInstrumentView lmms--gui--Knob#fx1Knob, +lmms--gui--OrganicInstrumentView lmms--gui--Knob#volKnob { color: rgb(157, 157, 157); qproperty-outerColor: rgb(37, 37, 37); qproperty-innerRadius: 4; @@ -811,7 +813,7 @@ OrganicInstrumentView Knob#volKnob { qproperty-lineWidth: 2; } -Sf2InstrumentView Knob { +lmms--gui--Sf2InstrumentView lmms--gui--Knob { color: #ff00ea; qproperty-outerColor: rgb(20, 5, 18); qproperty-innerRadius: 2; @@ -821,7 +823,7 @@ Sf2InstrumentView Knob { qproperty-lineWidth: 2; } -SfxrInstrumentView Knob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob { color: #000; qproperty-outerColor: rgb(194, 177, 145); qproperty-innerRadius: 2; @@ -829,42 +831,42 @@ SfxrInstrumentView Knob { qproperty-lineWidth: 2; } -SfxrInstrumentView Knob#envKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#envKnob { color: #263352; qproperty-outerColor: #4b66a4; } -SfxrInstrumentView Knob#freqKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#freqKnob { color: #1e4a22; qproperty-outerColor: #3c9544; } -SfxrInstrumentView Knob#changeKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#changeKnob { color: #591c1c; qproperty-outerColor: #b23737; } -SfxrInstrumentView Knob#sqrKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#sqrKnob { color: #3b2714; qproperty-outerColor: #724c27; } -SfxrInstrumentView Knob#repeatKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#repeatKnob { color: #292929; qproperty-outerColor: #515151; } -SfxrInstrumentView Knob#phaserKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#phaserKnob { color: #144c4d; qproperty-outerColor: #299899; } -SfxrInstrumentView Knob#filterKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#filterKnob { color: #47224c; qproperty-outerColor: #8e4397; } -OpulenzInstrumentView Knob { +lmms--gui--OpulenzInstrumentView lmms--gui--Knob { color: rgb(128,128,128); qproperty-outerColor: rgb(255,255,255); qproperty-innerRadius: 2; @@ -872,7 +874,7 @@ OpulenzInstrumentView Knob { qproperty-lineWidth: 2; } -SidInstrumentView Knob { +lmms--gui--SidInstrumentView lmms--gui--Knob { color: rgb(113,95,80); qproperty-outerColor: rgb( 255,255,255 ); qproperty-innerRadius: 2; @@ -880,7 +882,7 @@ SidInstrumentView Knob { qproperty-lineWidth: 2; } -WatsynView Knob { +lmms--gui--WatsynView lmms--gui--Knob { qproperty-innerRadius: 1; qproperty-outerRadius: 7; qproperty-centerPointX: 9.5; @@ -888,17 +890,17 @@ WatsynView Knob { qproperty-lineWidth: 2; } -WatsynView Knob#aKnob { +lmms--gui--WatsynView lmms--gui--Knob#aKnob { color: #43b2ff; qproperty-outerColor: #43b2ff; } -WatsynView Knob#bKnob { +lmms--gui--WatsynView lmms--gui--Knob#bKnob { color: #fc5431; qproperty-outerColor: #fc5431; } -WatsynView Knob#mixKnob { +lmms--gui--WatsynView lmms--gui--Knob#mixKnob { color: #43ff82; qproperty-outerColor: #43ff82; qproperty-outerRadius: 13; @@ -906,17 +908,17 @@ WatsynView Knob#mixKnob { qproperty-centerPointY: 15.5; } -WatsynView Knob#mixenvKnob { +lmms--gui--WatsynView lmms--gui--Knob#mixenvKnob { color: #43ff82; qproperty-outerColor: #43ff82; } -WatsynView Knob#xtalkKnob { +lmms--gui--WatsynView lmms--gui--Knob#xtalkKnob { color: #fb50fb; qproperty-outerColor: #fb50fb; } -MonstroView Knob { +lmms--gui--MonstroView lmms--gui--Knob { color: #ffffff; qproperty-outerColor: #aaaaaa; qproperty-outerRadius: 9; @@ -926,7 +928,7 @@ MonstroView Knob { qproperty-lineWidth: 2.5; } -NesInstrumentView Knob { +lmms--gui--NesInstrumentView lmms--gui--Knob { color: #e7231b; qproperty-outerColor: #fff; qproperty-outerRadius: 11.0; @@ -936,7 +938,7 @@ NesInstrumentView Knob { qproperty-lineWidth: 2; } -CompressorControlDialog { +lmms--gui--CompressorControlDialog { qproperty-inVolAreaColor: rgba(209, 216, 228, 17); qproperty-inVolColor: rgba(209, 216, 228, 100); qproperty-outVolAreaColor: rgba(209, 216, 228, 30); @@ -950,7 +952,7 @@ CompressorControlDialog { qproperty-resetColor: rgba(200, 100, 15, 200); } -CompressorControlDialog Knob { +lmms--gui--CompressorControlDialog lmms--gui--Knob { color: #2fcc71; qproperty-outerColor: #2fcc71; qproperty-lineWidth: 2; @@ -958,7 +960,7 @@ CompressorControlDialog Knob { /* palette information */ -LmmsPalette { +lmms--gui--LmmsPalette { qproperty-background: #5b6571; qproperty-windowText: #f0f0f0; qproperty-base: #808080; diff --git a/data/themes/default/style.css b/data/themes/default/style.css index b10e493e7..f4c651c9e 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -40,18 +40,18 @@ QMdiArea { background-color: #111314; } -FileBrowser QCheckBox +lmms--gui--FileBrowser QCheckBox { font-size: 10px; color: white; } -Knob { +lmms--gui--Knob { qproperty-lineInactiveColor: rgb(120, 120, 120); qproperty-arcInactiveColor: rgba(120, 120, 120, 70); } -AutomationEditor { +lmms--gui--AutomationEditor { color: #ffffff; background-color: #141616; qproperty-backgroundShade: rgba(255, 255, 255, 15); @@ -100,7 +100,7 @@ QToolTip { color: #d1d8e4; } -TextFloat { +lmms--gui--TextFloat { background: #040506; color: #d1d8e4; } @@ -168,12 +168,12 @@ QMenu::indicator:selected { background-color: #101213; } -PositionLine { +lmms--gui--PositionLine { qproperty-tailGradient: true; qproperty-lineColor: rgb(255, 255, 255); } -PianoRoll { +lmms--gui--PianoRoll { background-color: #141616; qproperty-backgroundShade: rgba(255, 255, 255, 10); qproperty-noteModeColor: #0bd556; @@ -214,7 +214,7 @@ PianoRoll { qproperty-textShadow: #fff; } -TabWidget { +lmms--gui--TabWidget { background-color: #262b30; qproperty-tabText: rgba(255, 255, 255, 180); qproperty-tabTitleText: #fff; @@ -223,13 +223,13 @@ TabWidget { qproperty-tabBorder: #181b1f; } -GroupBox { +lmms--gui--GroupBox { background-color: #262b30; } /* main toolbar oscilloscope - can have transparent bg now */ -Oscilloscope { +lmms--gui--Oscilloscope { background: none; border: none; qproperty-normalColor: rgb(71, 253, 133); @@ -238,7 +238,7 @@ Oscilloscope { /* main toolbar cpu load widget - this can have transparent bg now */ -CPULoadWidget { +lmms--gui--CPULoadWidget { border: none; background: url(resources:cpuload_bg.png); } @@ -308,7 +308,7 @@ QScrollBar::handle:horizontal:disabled, QScrollBar::handle:vertical:disabled { border: none; } -EffectRackView QScrollBar::handle:vertical:disabled { +lmms--gui--EffectRackView QScrollBar::handle:vertical:disabled { background: #3f4750; border: none; border-radius: 4px; @@ -366,17 +366,17 @@ QScrollBar::left-arrow:horizontal:disabled { background-image: url(resources:sba QScrollBar::right-arrow:horizontal:disabled { background-image: url(resources:sbarrow_right_d.png);} QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up_d.png);} QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down_d.png);} -EffectRackView QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up.png);} -EffectRackView QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down.png);} +lmms--gui--EffectRackView QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up.png);} +lmms--gui--EffectRackView QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down.png);} /* background for song editor and pattern editor */ -TrackContainerView QFrame { +lmms--gui--TrackContainerView QFrame { background-color: #262b30; } /* background for track controls */ -TrackView > QWidget { +lmms--gui--TrackView > QWidget { background-color: #3B424A; } @@ -384,7 +384,7 @@ TrackView > QWidget { /* autoscroll, loop, stop behaviour toggle buttons */ /* track background colors */ -TrackContentWidget { +lmms--gui--TrackContentWidget { qproperty-darkerColor: #0C0E0F; qproperty-lighterColor: #14151A; qproperty-gridColor: #262B30; @@ -394,7 +394,7 @@ TrackContentWidget { /* gear button in tracks */ -TrackOperationsWidget > QPushButton { +lmms--gui--TrackOperationsWidget > QPushButton { max-height: 26px; max-width: 26px; min-height: 26px; @@ -403,7 +403,7 @@ TrackOperationsWidget > QPushButton { border: none; } -TrackOperationsWidget > QPushButton::menu-indicator { +lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator { image: url(resources:trackop.png); subcontrol-origin: padding; subcontrol-position: center; @@ -411,8 +411,8 @@ TrackOperationsWidget > QPushButton::menu-indicator { top: 1px; } -TrackOperationsWidget > QPushButton::menu-indicator:pressed, -TrackOperationsWidget > QPushButton::menu-indicator:checked { +lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:pressed, +lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:checked { image: url(resources:trackop.png); position: relative; top: 2px; @@ -420,13 +420,13 @@ TrackOperationsWidget > QPushButton::menu-indicator:checked { /* font sizes */ -Sf2InstrumentView > QLabel { +lmms--gui--Sf2InstrumentView > QLabel { font-size:10px; } /* main toolbar sliders (master vol, master pitch) */ -AutomatableSlider::groove:vertical { +lmms--gui--AutomatableSlider::groove:vertical { background: #040506; border: none; border-radius: 2px; @@ -434,7 +434,7 @@ AutomatableSlider::groove:vertical { margin: 2px 2px; } -AutomatableSlider::handle:vertical { +lmms--gui--AutomatableSlider::handle:vertical { background: none; border-image: url(resources:main_slider.png); width: 26px; @@ -445,13 +445,13 @@ AutomatableSlider::handle:vertical { /* window that shows up when you add effects */ -EffectSelectDialog QScrollArea { +lmms--gui--EffectSelectDialog QScrollArea { background: #262b30; } /* the inner boxes in LADSPA effect windows */ -EffectControlDialog QGroupBox { +lmms--gui--EffectControlDialog QGroupBox { background: #262b30; margin-top: 1ex; padding: 10px 2px 1px; @@ -461,7 +461,7 @@ EffectControlDialog QGroupBox { /* the inner box titles when present (channel 1, channel 2...) */ -EffectControlDialog QGroupBox::title { +lmms--gui--EffectControlDialog QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top center; background: #262b30; @@ -543,7 +543,7 @@ QToolButton::menu-button { /* track label buttons - the part that contains the icon and track title */ -TrackLabelButton { +lmms--gui--TrackLabelButton { background-color: #3B424A; border: 1px solid #3B424A; font-size: 11px; @@ -551,7 +551,7 @@ TrackLabelButton { padding: 2px 1px; } -TrackLabelButton:hover { +lmms--gui--TrackLabelButton:hover { background: #3B424A; border: 1px solid #515B66; border-radius: none; @@ -560,7 +560,7 @@ TrackLabelButton:hover { padding: 2px 1px; } -TrackLabelButton:pressed { +lmms--gui--TrackLabelButton:pressed { background: #262B30; border-radius: none; font-size: 11px; @@ -568,7 +568,7 @@ TrackLabelButton:pressed { padding: 2px 1px; } -TrackLabelButton:checked { +lmms--gui--TrackLabelButton:checked { border: 1px solid #485059; background: #1C1F24; background-image: url(resources:track_shadow_p.png); @@ -578,7 +578,7 @@ TrackLabelButton:checked { padding: 2px 1px; } -TrackLabelButton:checked:pressed { +lmms--gui--TrackLabelButton:checked:pressed { border: 1px solid #2f353b; background: #0e1012; background-image: url(resources:track_shadow_p.png); @@ -589,30 +589,30 @@ TrackLabelButton:checked:pressed { /* sidebar, sidebar buttons */ -SideBar { +lmms--gui--SideBar { subcontrol-position: center; background: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, stop:0 #1D2122, stop:1 #262B30); } -SideBar QToolButton { +lmms--gui--SideBar QToolButton { background: none; border: none; font-size: 12px; } -SideBar QToolButton:hover { +lmms--gui--SideBar QToolButton:hover { background: none; border: none; font-size: 12px; } -SideBar QToolButton:pressed { +lmms--gui--SideBar QToolButton:pressed { background: none; border: none; font-size: 12px; } -SideBar QToolButton:checked { +lmms--gui--SideBar QToolButton:checked { background: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, stop:0 #4b525b, stop:1 #2f333a); border: none; font-size: 12px; @@ -620,7 +620,7 @@ SideBar QToolButton:checked { /* Instrument plugin list */ -PluginDescWidget { +lmms--gui--PluginDescWidget { border-top: 1px solid #3E474F; border-bottom: 1px solid #101314; border-radius: 2px; @@ -630,24 +630,26 @@ PluginDescWidget { margin: 0px; } -PluginDescWidget:hover { +lmms--gui--PluginDescWidget:hover { background: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, stop:0 #7C8799, stop:1 #343840); color: #d1d8e4; } /* piano widget */ -PianoView { +lmms--gui--PianoView { background-color: #14171a; } /* font sizes for text buttons */ -MixerView QPushButton, EffectRackView QPushButton, ControllerRackView QPushButton { +lmms--gui--MixerView QPushButton, +lmms--gui--EffectRackView QPushButton, +lmms--gui--ControllerRackView QPushButton { font-size: 10px; } -MixerLine { +lmms--gui--MixerLine { background: #14161A; color: #d1d8e4; qproperty-backgroundActive: #3B424A; @@ -658,13 +660,13 @@ MixerLine { } /* persistent peak markers for fx peak meters */ -Fader { +lmms--gui--Fader { qproperty-peakGreen: #0ad45c; qproperty-peakYellow: #d6ec52; qproperty-peakRed: #c12038; } -TimeLineWidget { +lmms--gui--TimeLineWidget { /* font-size only supports px and pt. */ font-size: 7pt; /* lengths also support em. This will make sure that the height @@ -700,7 +702,7 @@ QTreeView { alternate-background-color: #111314; } -TrackContainerView QLabel +lmms--gui--TrackContainerView QLabel { background: none; } @@ -708,7 +710,7 @@ TrackContainerView QLabel /* Clips */ /* common clip colors */ -ClipView { +lmms--gui--ClipView { qproperty-mutedColor: rgba(255,255,255,100); qproperty-mutedBackgroundColor: #373d48; qproperty-selectedColor: #006B65; @@ -725,7 +727,7 @@ ClipView { } /* MIDI (instrument) clip */ -MidiClipView { +lmms--gui--MidiClipView { background-color: #21A14F; color: rgba(255,255,255,220); @@ -736,24 +738,24 @@ MidiClipView { } /* sample track clip */ -SampleClipView { +lmms--gui--SampleClipView { background-color: rgba(42,51,59,255); color: #FF8F05; } /* automation clip */ -AutomationClipView { +lmms--gui--AutomationClipView { background-color: #663DE1; color: rgba(255,255,255,90); } /* pattern clip */ -PatternClipView { +lmms--gui--PatternClipView { background-color: #20BDB2; /* default colour for pattern tracks */ } /* Subwindows in MDI-Area */ -SubWindow { +lmms--gui--SubWindow { color: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, stop:0 #090909, stop:0.05 #3D454F, stop:1 #262B30); qproperty-activeColor: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1 stop:0 #090909, stop:0.05 #636c7a, stop:1 #343840); qproperty-textShadowColor: #000; @@ -761,21 +763,21 @@ SubWindow { } /* Subwindow title text */ -SubWindow > QLabel { +lmms--gui--SubWindow > QLabel { color: #d1d8e4; font-size: 12px; font-style: normal; } /* SubWindow titlebar button */ -SubWindow > QPushButton { +lmms--gui--SubWindow > QPushButton { background-color: rgba( 255, 255, 255, 0% ); border-width: 0px; border-color: none; border-style: none; } -SubWindow > QPushButton:hover{ +lmms--gui--SubWindow > QPushButton:hover{ background-color: rgba( 255, 255, 255, 15% ); border-width: 1px; border-color: rgba( 0, 0, 0, 20% ); @@ -786,7 +788,7 @@ SubWindow > QPushButton:hover{ /* Plugins */ -TripleOscillatorView Knob { +lmms--gui--TripleOscillatorView lmms--gui--Knob { color: rgb(255,255,255); qproperty-outerColor: rgb(255,255,255); qproperty-innerRadius: 2; @@ -797,7 +799,7 @@ TripleOscillatorView Knob { } -KickerInstrumentView Knob#smallKnob { +lmms--gui--KickerInstrumentView lmms--gui--Knob#smallKnob { color: #595959; qproperty-outerColor: black; qproperty-innerRadius: 3; @@ -808,7 +810,7 @@ KickerInstrumentView Knob#smallKnob { } -KickerInstrumentView Knob#largeKnob { +lmms--gui--KickerInstrumentView lmms--gui--Knob#largeKnob { color: #0c3b89; qproperty-outerColor: #519fff; qproperty-innerRadius: 12.0; @@ -819,7 +821,7 @@ KickerInstrumentView Knob#largeKnob { } -AudioFileProcessorView Knob { +lmms--gui--AudioFileProcessorView lmms--gui--Knob { color: rgb(240, 147, 14); qproperty-outerColor: rgb(30, 35, 37); qproperty-innerRadius: 4; @@ -829,7 +831,7 @@ AudioFileProcessorView Knob { qproperty-lineWidth: 3; } -OrganicInstrumentView Knob { +lmms--gui--OrganicInstrumentView lmms--gui--Knob { color: rgb(124, 207, 98); qproperty-outerColor: rgb(13, 42, 4); qproperty-innerRadius: 2; @@ -839,13 +841,13 @@ OrganicInstrumentView Knob { qproperty-lineWidth: 1.5; } -OrganicInstrumentView Knob#harmKnob { +lmms--gui--OrganicInstrumentView lmms--gui--Knob#harmKnob { color: rgb(205, 98, 216); qproperty-outerColor: rgb(18, 4, 18); } -OrganicInstrumentView Knob#fx1Knob, -OrganicInstrumentView Knob#volKnob { +lmms--gui--OrganicInstrumentView lmms--gui--Knob#fx1Knob, +lmms--gui--OrganicInstrumentView lmms--gui--Knob#volKnob { color: rgb(157, 157, 157); qproperty-outerColor: rgb(37, 37, 37); qproperty-innerRadius: 4; @@ -855,7 +857,7 @@ OrganicInstrumentView Knob#volKnob { qproperty-lineWidth: 2; } -Sf2InstrumentView Knob { +lmms--gui--Sf2InstrumentView lmms--gui--Knob { color: #ff00ea; qproperty-outerColor: rgb(20, 5, 18); qproperty-innerRadius: 2; @@ -865,7 +867,7 @@ Sf2InstrumentView Knob { qproperty-lineWidth: 2; } -SfxrInstrumentView Knob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob { color: #000; qproperty-outerColor: rgb(194, 177, 145); qproperty-innerRadius: 2; @@ -873,42 +875,42 @@ SfxrInstrumentView Knob { qproperty-lineWidth: 2; } -SfxrInstrumentView Knob#envKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#envKnob { color: #263352; qproperty-outerColor: #4b66a4; } -SfxrInstrumentView Knob#freqKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#freqKnob { color: #1e4a22; qproperty-outerColor: #3c9544; } -SfxrInstrumentView Knob#changeKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#changeKnob { color: #591c1c; qproperty-outerColor: #b23737; } -SfxrInstrumentView Knob#sqrKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#sqrKnob { color: #3b2714; qproperty-outerColor: #724c27; } -SfxrInstrumentView Knob#repeatKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#repeatKnob { color: #292929; qproperty-outerColor: #515151; } -SfxrInstrumentView Knob#phaserKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#phaserKnob { color: #144c4d; qproperty-outerColor: #299899; } -SfxrInstrumentView Knob#filterKnob { +lmms--gui--SfxrInstrumentView lmms--gui--Knob#filterKnob { color: #47224c; qproperty-outerColor: #8e4397; } -OpulenzInstrumentView Knob { +lmms--gui--OpulenzInstrumentView lmms--gui--Knob { color: rgb(128,128,128); qproperty-outerColor: rgb(255,255,255); qproperty-innerRadius: 2; @@ -916,7 +918,7 @@ OpulenzInstrumentView Knob { qproperty-lineWidth: 2; } -SidInstrumentView Knob { +lmms--gui--SidInstrumentView lmms--gui--Knob { color: rgb(113,95,80); qproperty-outerColor: rgb( 255,255,255 ); qproperty-innerRadius: 2; @@ -924,7 +926,7 @@ SidInstrumentView Knob { qproperty-lineWidth: 2; } -WatsynView Knob { +lmms--gui--WatsynView lmms--gui--Knob { qproperty-innerRadius: 1; qproperty-outerRadius: 7; qproperty-centerPointX: 9.5; @@ -932,17 +934,17 @@ WatsynView Knob { qproperty-lineWidth: 2; } -WatsynView Knob#aKnob { +lmms--gui--WatsynView lmms--gui--Knob#aKnob { color: #43b2ff; qproperty-outerColor: #43b2ff; } -WatsynView Knob#bKnob { +lmms--gui--WatsynView lmms--gui--Knob#bKnob { color: #fc5431; qproperty-outerColor: #fc5431; } -WatsynView Knob#mixKnob { +lmms--gui--WatsynView lmms--gui--Knob#mixKnob { color: #43ff82; qproperty-outerColor: #43ff82; qproperty-outerRadius: 13; @@ -950,17 +952,17 @@ WatsynView Knob#mixKnob { qproperty-centerPointY: 15.5; } -WatsynView Knob#mixenvKnob { +lmms--gui--WatsynView lmms--gui--Knob#mixenvKnob { color: #43ff82; qproperty-outerColor: #43ff82; } -WatsynView Knob#xtalkKnob { +lmms--gui--WatsynView lmms--gui--Knob#xtalkKnob { color: #fb50fb; qproperty-outerColor: #fb50fb; } -MonstroView Knob { +lmms--gui--MonstroView lmms--gui--Knob { color: #ffffff; qproperty-outerColor: #aaaaaa; qproperty-outerRadius: 9; @@ -970,7 +972,7 @@ MonstroView Knob { qproperty-lineWidth: 2.5; } -NesInstrumentView Knob { +lmms--gui--NesInstrumentView lmms--gui--Knob { color: #e7231b; qproperty-outerColor: #fff; qproperty-outerRadius: 11.0; @@ -980,7 +982,7 @@ NesInstrumentView Knob { qproperty-lineWidth: 2; } -CompressorControlDialog { +lmms--gui--CompressorControlDialog { qproperty-inVolAreaColor: rgba(209, 216, 228, 17); qproperty-inVolColor: rgba(209, 216, 228, 100); qproperty-outVolAreaColor: rgba(209, 216, 228, 30); @@ -994,7 +996,7 @@ CompressorControlDialog { qproperty-resetColor: rgba(200, 100, 15, 200); } -CompressorControlDialog Knob { +lmms--gui--CompressorControlDialog lmms--gui--Knob { color: #2fcc71; qproperty-outerColor: #2fcc71; qproperty-lineWidth: 2; @@ -1002,7 +1004,7 @@ CompressorControlDialog Knob { /* palette information */ -LmmsPalette { +lmms--gui--LmmsPalette { qproperty-background: #262b30; qproperty-windowText: #1de276; qproperty-base: #101213; diff --git a/include/AboutDialog.h b/include/AboutDialog.h index 93aca988d..c7d65023f 100644 --- a/include/AboutDialog.h +++ b/include/AboutDialog.h @@ -30,6 +30,8 @@ #include "ui_about_dialog.h" +namespace lmms::gui +{ class AboutDialog : public QDialog, public Ui::AboutDialog { @@ -38,6 +40,7 @@ public: } ; +} // namespace lmms::gui #endif diff --git a/include/ActionGroup.h b/include/ActionGroup.h index 226e39136..0fe9d78ed 100644 --- a/include/ActionGroup.h +++ b/include/ActionGroup.h @@ -28,6 +28,9 @@ #include +namespace lmms::gui +{ + /// \brief Convenience subclass of QActionGroup /// /// This class provides the same functionality as QActionGroup, but in addition @@ -54,4 +57,6 @@ private: QList m_actions; }; +} // namespace lmms::gui + #endif diff --git a/include/AudioAlsa.h b/include/AudioAlsa.h index c8452d003..e1024b030 100644 --- a/include/AudioAlsa.h +++ b/include/AudioAlsa.h @@ -37,6 +37,8 @@ #include "AudioDevice.h" +namespace lmms +{ class AudioAlsa : public QThread, public AudioDevice { @@ -102,6 +104,8 @@ private: } ; -#endif +} // namespace lmms + +#endif // LMMS_HAVE_ALSA #endif diff --git a/include/AudioAlsaSetupWidget.h b/include/AudioAlsaSetupWidget.h index db88558a7..9e168934e 100644 --- a/include/AudioAlsaSetupWidget.h +++ b/include/AudioAlsaSetupWidget.h @@ -35,8 +35,11 @@ class QComboBox; -class LcdSpinBox; +namespace lmms::gui +{ + +class LcdSpinBox; class AudioAlsaSetupWidget : public AudioDeviceSetupWidget { @@ -59,6 +62,8 @@ private: AudioAlsa::DeviceInfoCollection m_deviceInfos; }; -#endif +} // namespace lmms::gui + +#endif // LMMS_HAVE_ALSA #endif diff --git a/include/AudioDevice.h b/include/AudioDevice.h index 627ba470c..6b4e9939a 100644 --- a/include/AudioDevice.h +++ b/include/AudioDevice.h @@ -30,10 +30,13 @@ #include "lmms_basics.h" +class QThread; + +namespace lmms +{ class AudioEngine; class AudioPort; -class QThread; class AudioDevice @@ -153,7 +156,8 @@ private: surroundSampleFrame * m_buffer; -} ; +}; +} // namespace lmms #endif diff --git a/include/AudioDeviceSetupWidget.h b/include/AudioDeviceSetupWidget.h index 9b82300bb..6bf656e0a 100644 --- a/include/AudioDeviceSetupWidget.h +++ b/include/AudioDeviceSetupWidget.h @@ -27,6 +27,8 @@ #include "TabWidget.h" +namespace lmms::gui +{ class AudioDeviceSetupWidget : public TabWidget { @@ -41,5 +43,6 @@ public: virtual void show(); }; +} // namespace lmms::gui #endif diff --git a/include/AudioDummy.h b/include/AudioDummy.h index a0f2c528e..f2c198bbc 100644 --- a/include/AudioDummy.h +++ b/include/AudioDummy.h @@ -30,6 +30,8 @@ #include "AudioEngine.h" #include "MicroTimer.h" +namespace lmms +{ class AudioDummy : public QThread, public AudioDevice { @@ -52,11 +54,11 @@ public: } - class setupWidget : public AudioDeviceSetupWidget + class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ) : - AudioDeviceSetupWidget( AudioDummy::name(), _parent ) + gui::AudioDeviceSetupWidget( AudioDummy::name(), _parent ) { } @@ -114,5 +116,6 @@ private: } ; +} // namespace lmms #endif diff --git a/include/AudioEngine.h b/include/AudioEngine.h index a86f540cb..08e03a113 100644 --- a/include/AudioEngine.h +++ b/include/AudioEngine.h @@ -39,9 +39,13 @@ #include "PlayHandle.h" +namespace lmms +{ + class AudioDevice; class MidiClient; class AudioPort; +class AudioEngineWorkerThread; const fpp_t MINIMUM_BUFFER_SIZE = 32; @@ -54,10 +58,6 @@ const int BYTES_PER_SURROUND_FRAME = sizeof( surroundSampleFrame ); const float OUTPUT_SAMPLE_MULTIPLIER = 32767.0f; - -class AudioEngineWorkerThread; - - class LMMS_EXPORT AudioEngine : public QObject { Q_OBJECT @@ -361,7 +361,7 @@ public: signals: void qualitySettingsChanged(); void sampleRateChanged(); - void nextAudioBuffer( const surroundSampleFrame * buffer ); + void nextAudioBuffer( const lmms::surroundSampleFrame * buffer ); private: @@ -471,9 +471,11 @@ private: bool m_waitingForWrite; - friend class LmmsCore; + friend class Engine; friend class AudioEngineWorkerThread; friend class ProjectRenderer; } ; +} // namespace lmms + #endif diff --git a/include/AudioEngineProfiler.h b/include/AudioEngineProfiler.h index 19f0b612b..136c6dbea 100644 --- a/include/AudioEngineProfiler.h +++ b/include/AudioEngineProfiler.h @@ -30,6 +30,9 @@ #include "lmms_basics.h" #include "MicroTimer.h" +namespace lmms +{ + class AudioEngineProfiler { public: @@ -57,4 +60,6 @@ private: QFile m_outputFile; }; +} // namespace lmms + #endif diff --git a/include/AudioEngineWorkerThread.h b/include/AudioEngineWorkerThread.h index f86d41c9a..811f75753 100644 --- a/include/AudioEngineWorkerThread.h +++ b/include/AudioEngineWorkerThread.h @@ -29,8 +29,12 @@ #include -class AudioEngine; class QWaitCondition; + +namespace lmms +{ + +class AudioEngine; class ThreadableJob; class AudioEngineWorkerThread : public QThread @@ -115,5 +119,6 @@ private: volatile bool m_quit; } ; +} // namespace lmms #endif diff --git a/include/AudioFileDevice.h b/include/AudioFileDevice.h index c21a55c4c..937cd9d00 100644 --- a/include/AudioFileDevice.h +++ b/include/AudioFileDevice.h @@ -31,6 +31,8 @@ #include "AudioDevice.h" #include "OutputSettings.h" +namespace lmms +{ class AudioFileDevice : public AudioDevice { @@ -74,5 +76,6 @@ typedef AudioFileDevice * ( * AudioFileDeviceInstantiaton ) AudioEngine* audioEngine, bool & successful ); +} // namespace lmms #endif diff --git a/include/AudioFileFlac.h b/include/AudioFileFlac.h index 75e86d368..675ab21d9 100644 --- a/include/AudioFileFlac.h +++ b/include/AudioFileFlac.h @@ -30,6 +30,9 @@ #include "AudioFileDevice.h" #include +namespace lmms +{ + class AudioFileFlac: public AudioFileDevice { public: @@ -71,4 +74,7 @@ private: }; + +} // namespace lmms + #endif //AUDIO_FILE_FLAC_H diff --git a/include/AudioFileMP3.h b/include/AudioFileMP3.h index ab72ed689..16c3617a8 100644 --- a/include/AudioFileMP3.h +++ b/include/AudioFileMP3.h @@ -34,6 +34,8 @@ #include "lame/lame.h" +namespace lmms +{ class AudioFileMP3 : public AudioFileDevice { @@ -69,6 +71,8 @@ private: lame_t m_lame; }; -#endif +} // namespace lmms + +#endif // LMMS_HAVE_MP3LAME #endif diff --git a/include/AudioFileOgg.h b/include/AudioFileOgg.h index 9c7337e9c..7e6921015 100644 --- a/include/AudioFileOgg.h +++ b/include/AudioFileOgg.h @@ -34,6 +34,8 @@ #include "AudioFileDevice.h" +namespace lmms +{ class AudioFileOgg : public AudioFileDevice { @@ -107,6 +109,8 @@ private: } ; -#endif +} // namespace lmms + +#endif // LMMS_HAVE_OGGVORBIS #endif diff --git a/include/AudioFileWave.h b/include/AudioFileWave.h index d8e537859..e9425dd86 100644 --- a/include/AudioFileWave.h +++ b/include/AudioFileWave.h @@ -31,6 +31,8 @@ #include +namespace lmms +{ class AudioFileWave : public AudioFileDevice { @@ -66,4 +68,7 @@ private: SNDFILE * m_sf; } ; + +} // namespace lmms + #endif diff --git a/include/AudioJack.h b/include/AudioJack.h index e74ac4782..648bb157d 100644 --- a/include/AudioJack.h +++ b/include/AudioJack.h @@ -41,9 +41,17 @@ #include "AudioDeviceSetupWidget.h" class QLineEdit; -class LcdSpinBox; + +namespace lmms +{ + class MidiJack; +namespace gui +{ +class LcdSpinBox; +} + class AudioJack : public QObject, public AudioDevice { @@ -66,7 +74,7 @@ public: } - class setupWidget : public AudioDeviceSetupWidget +class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); @@ -76,7 +84,7 @@ public: private: QLineEdit * m_clientName; - LcdSpinBox * m_channels; + gui::LcdSpinBox * m_channels; } ; @@ -132,6 +140,8 @@ signals: } ; -#endif +} // namespace lmms + +#endif // LMMS_HAVE_JACK #endif diff --git a/include/AudioOss.h b/include/AudioOss.h index b1b5d839c..4a552040b 100644 --- a/include/AudioOss.h +++ b/include/AudioOss.h @@ -34,10 +34,17 @@ #include "AudioDevice.h" #include "AudioDeviceSetupWidget.h" - -class LcdSpinBox; class QLineEdit; +namespace lmms +{ + +namespace gui +{ +class LcdSpinBox; +} + + class AudioOss : public QThread, public AudioDevice { @@ -54,7 +61,7 @@ public: static QString probeDevice(); - class setupWidget : public AudioDeviceSetupWidget +class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); @@ -64,7 +71,7 @@ public: private: QLineEdit * m_device; - LcdSpinBox * m_channels; + gui::LcdSpinBox * m_channels; } ; @@ -81,7 +88,8 @@ private: } ; - -#endif +} // namespace lmms + +#endif // LMMS_HAVE_OSS #endif diff --git a/include/AudioPort.h b/include/AudioPort.h index 0f6c931d9..5a2645784 100644 --- a/include/AudioPort.h +++ b/include/AudioPort.h @@ -32,6 +32,9 @@ #include "MemoryManager.h" #include "PlayHandle.h" +namespace lmms +{ + class EffectChain; class FloatModel; class BoolModel; @@ -133,5 +136,6 @@ private: } ; +} // namespace lmms #endif diff --git a/include/AudioPortAudio.h b/include/AudioPortAudio.h index 2d78af1c4..10dab74eb 100644 --- a/include/AudioPortAudio.h +++ b/include/AudioPortAudio.h @@ -30,9 +30,28 @@ #include "lmmsconfig.h" #include "ComboBoxModel.h" +#ifdef LMMS_HAVE_PORTAUDIO + +# include + +# include "AudioDevice.h" +# include "AudioDeviceSetupWidget.h" + +# if defined paNeverDropInput || defined paNonInterleaved +# define PORTAUDIO_V19 +# else +# define PORTAUDIO_V18 +# endif + +#endif + + +namespace lmms +{ + class AudioPortAudioSetupUtil : public QObject { - Q_OBJECT +Q_OBJECT public slots: void updateBackends(); void updateDevices(); @@ -41,26 +60,17 @@ public slots: public: ComboBoxModel m_backendModel; ComboBoxModel m_deviceModel; -} ; +}; #ifdef LMMS_HAVE_PORTAUDIO -#include - - -#include "AudioDevice.h" -#include "AudioDeviceSetupWidget.h" - -#if defined paNeverDropInput || defined paNonInterleaved -# define PORTAUDIO_V19 -#else -# define PORTAUDIO_V18 -#endif - +namespace gui +{ class ComboBox; class LcdSpinBox; +} class AudioPortAudio : public AudioDevice @@ -80,7 +90,7 @@ public: unsigned long _framesPerBuffer ); - class setupWidget : public AudioDeviceSetupWidget + class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); @@ -90,8 +100,8 @@ public: virtual void show(); private: - ComboBox * m_backend; - ComboBox * m_device; + gui::ComboBox * m_backend; + gui::ComboBox * m_device; AudioPortAudioSetupUtil m_setupUtil; } ; @@ -149,6 +159,8 @@ private: } ; -#endif +#endif // LMMS_HAVE_PORTAUDIO + +} // namespace lmms #endif diff --git a/include/AudioPulseAudio.h b/include/AudioPulseAudio.h index 3fe098d68..70da08087 100644 --- a/include/AudioPulseAudio.h +++ b/include/AudioPulseAudio.h @@ -36,10 +36,16 @@ #include "AudioDevice.h" #include "AudioDeviceSetupWidget.h" - -class LcdSpinBox; class QLineEdit; +namespace lmms +{ + +namespace gui +{ +class LcdSpinBox; +} + class AudioPulseAudio : public QThread, public AudioDevice { @@ -56,7 +62,7 @@ public: static QString probeDevice(); - class setupWidget : public AudioDeviceSetupWidget + class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); @@ -66,7 +72,7 @@ public: private: QLineEdit * m_device; - LcdSpinBox * m_channels; + gui::LcdSpinBox * m_channels; } ; @@ -94,6 +100,8 @@ private: } ; +} // namespace lmms + #endif #endif diff --git a/include/AudioSampleRecorder.h b/include/AudioSampleRecorder.h index f5d5985c1..294ffa17d 100644 --- a/include/AudioSampleRecorder.h +++ b/include/AudioSampleRecorder.h @@ -31,6 +31,9 @@ #include "AudioDevice.h" +namespace lmms +{ + class SampleBuffer; @@ -54,5 +57,6 @@ private: } ; +} // namespace lmms #endif diff --git a/include/AudioSdl.h b/include/AudioSdl.h index 307973013..b49e2ebe9 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -41,6 +41,8 @@ class QLineEdit; +namespace lmms +{ class AudioSdl : public AudioDevice { @@ -55,7 +57,7 @@ public: } - class setupWidget : public AudioDeviceSetupWidget + class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); @@ -108,6 +110,9 @@ private: } ; -#endif + +} // namespace lmms + +#endif // LMMS_HAVE_SDL #endif diff --git a/include/AudioSndio.h b/include/AudioSndio.h index 94fcfa93b..5fb7c78fc 100644 --- a/include/AudioSndio.h +++ b/include/AudioSndio.h @@ -36,9 +36,16 @@ #include "AudioDevice.h" #include "AudioDeviceSetupWidget.h" -class LcdSpinBox; class QLineEdit; +namespace lmms +{ + +namespace gui +{ +class LcdSpinBox; +} + class AudioSndio : public QThread, public AudioDevice { @@ -52,7 +59,7 @@ public: return QT_TRANSLATE_NOOP( "AudioDeviceSetupWidget", "sndio" ); } - class setupWidget : public AudioDeviceSetupWidget + class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); @@ -62,7 +69,7 @@ public: private: QLineEdit * m_device; - LcdSpinBox * m_channels; + gui::LcdSpinBox * m_channels; } ; private: @@ -78,6 +85,8 @@ private: } ; +} // namespace lmms + #endif /* LMMS_HAVE_SNDIO */ #endif /* _AUDIO_SNDIO_H */ diff --git a/include/AudioSoundIo.h b/include/AudioSoundIo.h index 5dbd35250..411f4ab22 100644 --- a/include/AudioSoundIo.h +++ b/include/AudioSoundIo.h @@ -37,8 +37,14 @@ #include "AudioDevice.h" #include "AudioDeviceSetupWidget.h" +namespace lmms +{ + +namespace gui +{ class ComboBox; class LcdSpinBox; +} // Exists only to work around "Error: Meta object features not supported for nested classes" class AudioSoundIoSetupUtil : public QObject @@ -134,6 +140,9 @@ private: }; -#endif + +} // namespace lmms + +#endif // LMMS_HAVE_SOUNDIO #endif diff --git a/include/AutomatableButton.h b/include/AutomatableButton.h index d7859a10c..fefaf70e3 100644 --- a/include/AutomatableButton.h +++ b/include/AutomatableButton.h @@ -30,6 +30,8 @@ #include "AutomatableModelView.h" +namespace lmms::gui +{ class automatableButtonGroup; @@ -105,5 +107,6 @@ private: } ; +} // namespace lmms::gui #endif diff --git a/include/AutomatableModel.h b/include/AutomatableModel.h index 2f4b31467..672abaf81 100644 --- a/include/AutomatableModel.h +++ b/include/AutomatableModel.h @@ -35,6 +35,10 @@ #include "MemoryManager.h" #include "ModelVisitor.h" + +namespace lmms +{ + // simple way to map a property of a view to a model #define mapPropertyFromModelPtr(type,getfunc,setfunc,modelname) \ public: \ @@ -416,7 +420,7 @@ private: signals: void initValueChanged( float val ); - void destroyed( jo_id_t id ); + void destroyed( lmms::jo_id_t id ); } ; @@ -502,5 +506,8 @@ public: typedef QMap AutomatedValueMap; + +} // namespace lmms + #endif diff --git a/include/AutomatableModelView.h b/include/AutomatableModelView.h index a59961185..fa8926c0c 100644 --- a/include/AutomatableModelView.h +++ b/include/AutomatableModelView.h @@ -32,6 +32,9 @@ class QMenu; class QMouseEvent; +namespace lmms::gui +{ + class LMMS_EXPORT AutomatableModelView : public ModelView { public: @@ -132,5 +135,7 @@ using FloatModelView = TypedModelView; using IntModelView = TypedModelView; using BoolModelView = TypedModelView; +} // namespace lmms::gui + #endif diff --git a/include/AutomatableSlider.h b/include/AutomatableSlider.h index b51ef1e3f..d6a95f5d8 100644 --- a/include/AutomatableSlider.h +++ b/include/AutomatableSlider.h @@ -31,6 +31,8 @@ #include "AutomatableModelView.h" +namespace lmms::gui +{ class AutomatableSlider : public QSlider, public IntModelView { @@ -73,5 +75,6 @@ private slots: typedef IntModel sliderModel; +} // namespace lmms::gui #endif diff --git a/include/AutomationClip.h b/include/AutomationClip.h index 22af90ed1..376c1e9e7 100644 --- a/include/AutomationClip.h +++ b/include/AutomationClip.h @@ -34,9 +34,17 @@ #include "Clip.h" +namespace lmms +{ + class AutomationTrack; class TimePos; +namespace gui +{ +class AutomationClipView; +} // namespace gui + class LMMS_EXPORT AutomationClip : public Clip @@ -152,7 +160,7 @@ public: static const QString classNodeName() { return "automationclip"; } QString nodeName() const override { return classNodeName(); } - ClipView * createView( TrackView * _tv ) override; + gui::ClipView * createView( gui::TrackView * _tv ) override; static bool isAutomated( const AutomatableModel * _m ); @@ -168,7 +176,7 @@ public: public slots: void clear(); - void objectDestroyed( jo_id_t ); + void objectDestroyed( lmms::jo_id_t ); void flipY( int min, int max ); void flipY(); void flipX( int length = -1 ); @@ -204,7 +212,7 @@ private: static const float DEFAULT_MIN_VALUE; static const float DEFAULT_MAX_VALUE; - friend class AutomationClipView; + friend class gui::AutomationClipView; friend class AutomationNode; } ; @@ -242,4 +250,7 @@ inline int POS(AutomationClip::TimemapIterator it) return it.key(); } + +} // namespace lmms + #endif diff --git a/include/AutomationClipView.h b/include/AutomationClipView.h index 641a58699..0b80ad2eb 100644 --- a/include/AutomationClipView.h +++ b/include/AutomationClipView.h @@ -29,8 +29,14 @@ #include "ClipView.h" +namespace lmms +{ + class AutomationClip; +namespace gui +{ + class AutomationClipView : public ClipView { @@ -75,4 +81,8 @@ private: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/AutomationEditor.h b/include/AutomationEditor.h index c655ffcdf..d9d1b0a10 100644 --- a/include/AutomationEditor.h +++ b/include/AutomationEditor.h @@ -40,9 +40,16 @@ class QPainter; class QPixmap; class QScrollBar; -class ComboBox; -class Knob; +namespace lmms +{ + class NotePlayHandle; + +namespace gui +{ + +class Knob; +class ComboBox; class TimeLineWidget; @@ -128,7 +135,7 @@ protected slots: void setProgressionType(int type); void setTension(); - void updatePosition( const TimePos & t ); + void updatePosition( const lmms::TimePos & t ); void zoomingXChanged(); void zoomingYChanged(); @@ -234,7 +241,7 @@ private: signals: void currentClipChanged(); - void positionChanged( const TimePos & ); + void positionChanged( const lmms::TimePos & ); } ; @@ -293,5 +300,8 @@ private: ComboBox * m_quantizeComboBox; }; +} // namespace gui + +} // namespace lmms #endif diff --git a/include/AutomationNode.h b/include/AutomationNode.h index 6cd445662..11bd6d57d 100644 --- a/include/AutomationNode.h +++ b/include/AutomationNode.h @@ -26,6 +26,9 @@ #ifndef AUTOMATION_NODE_H #define AUTOMATION_NODE_H +namespace lmms +{ + class AutomationClip; @@ -151,5 +154,6 @@ private: float m_outTangent; }; +} // namespace lmms #endif diff --git a/include/AutomationTrack.h b/include/AutomationTrack.h index dc33f76c3..1bbc77b1c 100644 --- a/include/AutomationTrack.h +++ b/include/AutomationTrack.h @@ -29,6 +29,8 @@ #include "Track.h" +namespace lmms +{ class AutomationTrack : public Track { @@ -45,7 +47,7 @@ public: return "automationtrack"; } - TrackView * createView( TrackContainerView* ) override; + gui::TrackView * createView( gui::TrackContainerView* ) override; Clip* createClip(const TimePos & pos) override; virtual void saveTrackSpecificSettings( QDomDocument & _doc, @@ -58,4 +60,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/AutomationTrackView.h b/include/AutomationTrackView.h index 5ed993213..b5bafe58e 100644 --- a/include/AutomationTrackView.h +++ b/include/AutomationTrackView.h @@ -28,8 +28,14 @@ #include "TrackView.h" +namespace lmms +{ + class AutomationTrack; +namespace gui +{ + class AutomationTrackView : public TrackView { @@ -42,4 +48,8 @@ public: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/BandLimitedWave.h b/include/BandLimitedWave.h index 1cd8d69ed..30d28d4a1 100644 --- a/include/BandLimitedWave.h +++ b/include/BandLimitedWave.h @@ -36,6 +36,9 @@ class QString; #include "Engine.h" #include "AudioEngine.h" +namespace lmms +{ + constexpr int MAXLEN = 11; constexpr int MIPMAPSIZE = 2 << ( MAXLEN + 1 ); constexpr int MIPMAPSIZE3 = 3 << ( MAXLEN + 1 ); @@ -168,5 +171,6 @@ public: static QString s_wavetableDir; }; +} // namespace lmms #endif diff --git a/include/BasicFilters.h b/include/BasicFilters.h index 07cdda06b..10b5b24b7 100644 --- a/include/BasicFilters.h +++ b/include/BasicFilters.h @@ -43,6 +43,9 @@ #include "interpolation.h" #include "MemoryManager.h" +namespace lmms +{ + template class BasicFilters; template @@ -913,4 +916,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/BufferManager.h b/include/BufferManager.h index 20390644b..57729918e 100644 --- a/include/BufferManager.h +++ b/include/BufferManager.h @@ -29,10 +29,14 @@ #include "lmms_export.h" #include "lmms_basics.h" +namespace lmms +{ + + class LMMS_EXPORT BufferManager { public: - static void init( fpp_t framesPerPeriod ); + static void init( fpp_t fpp ); static sampleFrame * acquire(); // audio-buffer-mgm static void clear( sampleFrame * ab, const f_cnt_t frames, @@ -42,6 +46,12 @@ public: const f_cnt_t offset = 0 ); #endif static void release( sampleFrame * buf ); + +private: + static fpp_t s_framesPerPeriod; }; + +} // namespace lmms + #endif diff --git a/include/CPULoadWidget.h b/include/CPULoadWidget.h index a5da11663..9cf275fb3 100644 --- a/include/CPULoadWidget.h +++ b/include/CPULoadWidget.h @@ -34,6 +34,10 @@ #include "lmms_basics.h" +namespace lmms::gui +{ + + class CPULoadWidget : public QWidget { Q_OBJECT @@ -64,4 +68,6 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/CaptionMenu.h b/include/CaptionMenu.h index e6531fe31..2309cec6f 100644 --- a/include/CaptionMenu.h +++ b/include/CaptionMenu.h @@ -30,6 +30,9 @@ #include "lmms_export.h" +namespace lmms::gui +{ + /// /// \brief A context menu with a caption /// @@ -42,6 +45,6 @@ public: } ; - +} // namespace lmms::gui #endif diff --git a/include/Clip.h b/include/Clip.h index 7b42fc91b..5c70aeaba 100644 --- a/include/Clip.h +++ b/include/Clip.h @@ -30,11 +30,20 @@ #include "AutomatableModel.h" +namespace lmms +{ + class Track; -class ClipView; class TrackContainer; + +namespace gui +{ + +class ClipView; class TrackView; +} // namespace gui + class LMMS_EXPORT Clip : public Model, public JournallingObject { @@ -116,7 +125,7 @@ public: virtual void movePosition( const TimePos & pos ); virtual void changeLength( const TimePos & length ); - virtual ClipView * createView( TrackView * tv ) = 0; + virtual gui::ClipView * createView( gui::TrackView * tv ) = 0; inline void selectViewOnCreate( bool select ) { @@ -177,4 +186,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/ClipView.h b/include/ClipView.h index b3fd20920..00a8b261e 100644 --- a/include/ClipView.h +++ b/include/ClipView.h @@ -36,9 +36,16 @@ class QMenu; class QContextMenuEvent; +namespace lmms +{ + class DataFile; -class TextFloat; class Clip; + +namespace gui +{ + +class TextFloat; class TrackView; @@ -241,4 +248,8 @@ private: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/Clipboard.h b/include/Clipboard.h index 168134e9d..1c2dcb647 100644 --- a/include/Clipboard.h +++ b/include/Clipboard.h @@ -30,8 +30,9 @@ class QMimeData; -namespace Clipboard +namespace lmms::Clipboard { + enum class MimeType { StringPair, @@ -64,6 +65,7 @@ namespace Clipboard break; } } -} ; + +} // namespace lmms::Clipboard #endif diff --git a/include/ColorChooser.h b/include/ColorChooser.h index ac2a1b62d..9b3389c47 100644 --- a/include/ColorChooser.h +++ b/include/ColorChooser.h @@ -21,12 +21,19 @@ * */ +#ifndef COLOR_CHOOSER_H +#define COLOR_CHOOSER_H + #include #include #include #include #include +namespace lmms::gui +{ + + class ColorChooser: public QColorDialog { public: @@ -57,3 +64,9 @@ private: //! Generate a nice palette, with adjustable value static QVector nicePalette (int); }; + + +} // namespace lmms::gui + +#endif + diff --git a/include/ComboBox.h b/include/ComboBox.h index 1f7dd43ff..412279d15 100644 --- a/include/ComboBox.h +++ b/include/ComboBox.h @@ -32,6 +32,9 @@ #include "ComboBoxModel.h" #include "AutomatableModelView.h" +namespace lmms::gui +{ + class LMMS_EXPORT ComboBox : public QWidget, public IntModelView { Q_OBJECT @@ -78,4 +81,6 @@ private slots: } ; +} // namespace lmms::gui + #endif diff --git a/include/ComboBoxModel.h b/include/ComboBoxModel.h index a3c2a082b..faff03620 100644 --- a/include/ComboBoxModel.h +++ b/include/ComboBoxModel.h @@ -32,6 +32,8 @@ #include "AutomatableModel.h" #include "embed.h" +namespace lmms +{ class LMMS_EXPORT ComboBoxModel : public IntModel { @@ -91,5 +93,6 @@ private: } ; +} // namespace lmms #endif diff --git a/include/ConfigManager.h b/include/ConfigManager.h index e9b2783ab..6aa7fc037 100644 --- a/include/ConfigManager.h +++ b/include/ConfigManager.h @@ -37,7 +37,11 @@ #include "lmms_export.h" -class LmmsCore; +namespace lmms +{ + + +class Engine; const QString PROJECTS_PATH = "projects/"; const QString TEMPLATE_PATH = "templates/"; @@ -304,6 +308,10 @@ private: settingsMap m_settings; - friend class LmmsCore; + friend class Engine; }; + + +} // namespace lmms + #endif diff --git a/include/ControlLayout.h b/include/ControlLayout.h index 601820107..8c629f8e1 100644 --- a/include/ControlLayout.h +++ b/include/ControlLayout.h @@ -76,9 +76,15 @@ #include #include #include + class QLayoutItem; class QRect; class QString; +class QLineEdit; + + +namespace lmms::gui +{ /** Layout for controls (models) @@ -128,9 +134,11 @@ private: // relevant dimension is width, as later, heightForWidth() will be called // 400 looks good and is ~4 knobs in a row constexpr const static int m_minWidth = 400; - class QLineEdit* m_searchBar; + QLineEdit* m_searchBar; //! name of search bar, must be ASCII sorted before any alpha numerics static constexpr const char* s_searchBarName = "!!searchBar!!"; }; +} // namespace lmms::gui + #endif // CONTROLLAYOUT_H diff --git a/include/Controller.h b/include/Controller.h index 092c684e0..c2e5205d2 100644 --- a/include/Controller.h +++ b/include/Controller.h @@ -33,10 +33,20 @@ #include "JournallingObject.h" #include "ValueBuffer.h" -class ControllerDialog; +namespace lmms +{ + class Controller; class ControllerConnection; +namespace gui +{ + +class ControllerDialog; + +} // namespace gui + + typedef QVector ControllerVector; @@ -132,7 +142,7 @@ public: bool hasModel( const Model * m ) const; public slots: - virtual ControllerDialog * createDialog( QWidget * _parent ); + virtual gui::ControllerDialog * createDialog( QWidget * _parent ); virtual void setName( const QString & _new_name ) { @@ -169,9 +179,12 @@ signals: // The value changed while the audio engine isn't running (i.e: MIDI CC) void valueChanged(); - friend class ControllerDialog; + friend class gui::ControllerDialog; } ; + +} // namespace lmms + #endif diff --git a/include/ControllerConnection.h b/include/ControllerConnection.h index 68fd2dc89..50b98539c 100644 --- a/include/ControllerConnection.h +++ b/include/ControllerConnection.h @@ -37,8 +37,16 @@ #include "JournallingObject.h" #include "ValueBuffer.h" +namespace lmms +{ + class ControllerConnection; +namespace gui +{ +class ControllerConnectionDialog; +} + typedef QVector ControllerConnectionVector; @@ -115,8 +123,11 @@ signals: // The value changed while the audio engine isn't running (i.e: MIDI CC) void valueChanged(); - friend class ControllerConnectionDialog; + friend class gui::ControllerConnectionDialog; }; + +} // namespace lmms + #endif diff --git a/include/ControllerConnectionDialog.h b/include/ControllerConnectionDialog.h index 95e55ce79..62980987f 100644 --- a/include/ControllerConnectionDialog.h +++ b/include/ControllerConnectionDialog.h @@ -38,7 +38,15 @@ class QLineEdit; class QListView; class QScrollArea; + +namespace lmms +{ + class AutoDetectMidiController; + +namespace gui +{ + class ComboBox; class GroupBox; class TabWidget; @@ -47,7 +55,6 @@ class LedCheckBox; class MidiPortMenu; - class ControllerConnectionDialog : public QDialog { Q_OBJECT @@ -99,4 +106,9 @@ private: AutoDetectMidiController * m_midiController; } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/ControllerDialog.h b/include/ControllerDialog.h index 05e8f3bfe..0592cadf3 100644 --- a/include/ControllerDialog.h +++ b/include/ControllerDialog.h @@ -30,8 +30,13 @@ #include "ModelView.h" +namespace lmms +{ + class Controller; +namespace gui +{ class ControllerDialog : public QWidget, public ModelView { @@ -51,4 +56,9 @@ protected: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/ControllerRackView.h b/include/ControllerRackView.h index 9ef2d9b7f..6d60562f6 100644 --- a/include/ControllerRackView.h +++ b/include/ControllerRackView.h @@ -36,9 +36,17 @@ class QPushButton; class QScrollArea; class QVBoxLayout; -class ControllerView; + +namespace lmms +{ + class Controller; +namespace gui +{ + +class ControllerView; + class ControllerRackView : public QWidget, public SerializingObject { @@ -57,9 +65,9 @@ public: public slots: - void deleteController( ControllerView * _view ); - void onControllerAdded( Controller * ); - void onControllerRemoved( Controller * ); + void deleteController( lmms::gui::ControllerView * _view ); + void onControllerAdded( lmms::Controller * ); + void onControllerRemoved( lmms::Controller * ); protected: void closeEvent( QCloseEvent * _ce ) override; @@ -80,4 +88,8 @@ private: int m_nextIndex; } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/ControllerView.h b/include/ControllerView.h index d1284845e..2e18e1320 100644 --- a/include/ControllerView.h +++ b/include/ControllerView.h @@ -36,6 +36,10 @@ class QLabel; class QPushButton; class QMdiSubWindow; +namespace lmms::gui +{ + + class LedCheckBox; @@ -64,7 +68,7 @@ public slots: void renameController(); signals: - void deleteController( ControllerView * _view ); + void deleteController( lmms::gui::ControllerView * _view ); protected: @@ -81,4 +85,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/Controls.h b/include/Controls.h index 414258368..af2a5fa71 100644 --- a/include/Controls.h +++ b/include/Controls.h @@ -34,8 +34,20 @@ class QString; class QWidget; +class QLabel; + +namespace lmms +{ + class AutomatableModel; +namespace gui +{ + +class AutomatableModelView; +class Knob; +class ComboBox; +class LedCheckBox; /** These classes provide @@ -52,7 +64,7 @@ public: virtual void setModel(AutomatableModel* model) = 0; virtual AutomatableModel* model() = 0; - virtual class AutomatableModelView* modelView() = 0; + virtual AutomatableModelView* modelView() = 0; virtual ~Control(); }; @@ -60,7 +72,7 @@ public: class KnobControl : public Control { - class Knob* m_knob; + Knob* m_knob; public: void setText(const QString& text) override; @@ -68,7 +80,7 @@ public: void setModel(AutomatableModel* model) override; FloatModel* model() override; - class AutomatableModelView* modelView() override; + AutomatableModelView* modelView() override; KnobControl(QWidget* parent = nullptr); ~KnobControl() override; @@ -78,8 +90,8 @@ public: class ComboControl : public Control { QWidget* m_widget; - class ComboBox* m_combo; - class QLabel* m_label; + ComboBox* m_combo; + QLabel* m_label; public: void setText(const QString& text) override; @@ -87,7 +99,7 @@ public: void setModel(AutomatableModel* model) override; ComboBoxModel* model() override; - class AutomatableModelView* modelView() override; + AutomatableModelView* modelView() override; ComboControl(QWidget* parent = nullptr); ~ComboControl() override; @@ -104,7 +116,7 @@ public: void setModel(AutomatableModel* model) override; IntModel* model() override; - class AutomatableModelView* modelView() override; + AutomatableModelView* modelView() override; LcdControl(int numDigits, QWidget* parent = nullptr); ~LcdControl() override; @@ -114,7 +126,7 @@ public: class CheckControl : public Control { QWidget* m_widget; - class LedCheckBox* m_checkBox; + LedCheckBox* m_checkBox; QLabel* m_label; public: @@ -122,12 +134,16 @@ public: QWidget* topWidget() override; void setModel(AutomatableModel* model) override; - BoolModel *model() override; - class AutomatableModelView* modelView() override; + BoolModel* model() override; + AutomatableModelView* modelView() override; CheckControl(QWidget* parent = nullptr); ~CheckControl() override; }; +} // namespace gui + +} // namespace lmms + #endif // CONTROLS_H diff --git a/include/CustomTextKnob.h b/include/CustomTextKnob.h index aa7b9d573..403799ff0 100644 --- a/include/CustomTextKnob.h +++ b/include/CustomTextKnob.h @@ -4,6 +4,10 @@ #include "Knob.h" +namespace lmms::gui +{ + + class LMMS_EXPORT CustomTextKnob : public Knob { protected: @@ -27,4 +31,7 @@ protected: QString m_value_text; } ; + +} // namespace lmms::gui + #endif diff --git a/include/DataFile.h b/include/DataFile.h index 0600e85d4..c17b3546f 100644 --- a/include/DataFile.h +++ b/include/DataFile.h @@ -33,9 +33,14 @@ #include "lmms_export.h" #include "MemoryManager.h" -class ProjectVersion; class QTextStream; +namespace lmms +{ + +class ProjectVersion; + + class LMMS_EXPORT DataFile : public QDomDocument { MM_OPERATORS @@ -155,4 +160,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/Delay.h b/include/Delay.h index 5be1ac183..404782f90 100644 --- a/include/Delay.h +++ b/include/Delay.h @@ -32,6 +32,9 @@ #include "interpolation.h" #include "MemoryManager.h" +namespace lmms +{ + // brief usage // Classes: @@ -360,4 +363,7 @@ typedef CombFeedfwd<2> StereoCombFeedfwd; typedef CombFeedbackDualtap<2> StereoCombFeedbackDualtap; typedef AllpassDelay<2> StereoAllpassDelay; + +} // namespace lmms + #endif diff --git a/include/DeprecationHelper.h b/include/DeprecationHelper.h index bef4ea9b9..7786665a3 100644 --- a/include/DeprecationHelper.h +++ b/include/DeprecationHelper.h @@ -30,6 +30,9 @@ #include #include +namespace lmms +{ + /** * @brief horizontalAdvance is a backwards-compatible adapter for * QFontMetrics::horizontalAdvance and width functions. @@ -60,4 +63,7 @@ inline QPoint position(QWheelEvent *wheelEvent) return wheelEvent->pos(); #endif } + +} // namespace lmms + #endif // DEPRECATIONHELPER_H diff --git a/include/DetuningHelper.h b/include/DetuningHelper.h index 2157b6ba8..7444b8b22 100644 --- a/include/DetuningHelper.h +++ b/include/DetuningHelper.h @@ -29,6 +29,9 @@ #include "InlineAutomation.h" #include "MemoryManager.h" +namespace lmms +{ + class DetuningHelper : public InlineAutomation { Q_OBJECT @@ -61,4 +64,6 @@ public: } ; +} // namespace lmms + #endif diff --git a/include/DrumSynth.h b/include/DrumSynth.h index f7e9b1d4c..79383a6d4 100644 --- a/include/DrumSynth.h +++ b/include/DrumSynth.h @@ -32,6 +32,9 @@ class QString; +namespace lmms +{ + class DrumSynth { public: DrumSynth() {}; @@ -51,4 +54,7 @@ class DrumSynth { }; + +} // namespace lmms + #endif diff --git a/include/DspEffectLibrary.h b/include/DspEffectLibrary.h index bf175df6d..df7588116 100644 --- a/include/DspEffectLibrary.h +++ b/include/DspEffectLibrary.h @@ -31,7 +31,7 @@ #include "lmms_basics.h" -namespace DspEffectLibrary +namespace lmms::DspEffectLibrary { template @@ -329,7 +329,7 @@ namespace DspEffectLibrary } ; -} ; +} // namespace lmms::DspEffectLibrary #endif diff --git a/include/DummyEffect.h b/include/DummyEffect.h index 6bb8c873e..8d0f769b6 100644 --- a/include/DummyEffect.h +++ b/include/DummyEffect.h @@ -31,6 +31,12 @@ #include "EffectControls.h" #include "EffectControlDialog.h" +namespace lmms +{ + +namespace gui +{ + class Knob; @@ -44,6 +50,7 @@ public: } ; +} class DummyEffectControls : public EffectControls { @@ -75,9 +82,9 @@ public: return "DummyControls"; } - EffectControlDialog * createView() override + gui::EffectControlDialog * createView() override { - return new DummyEffectControlDialog( this ); + return new gui::DummyEffectControlDialog( this ); } } ; @@ -144,4 +151,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/DummyInstrument.h b/include/DummyInstrument.h index ebfcfbefe..27246e6eb 100644 --- a/include/DummyInstrument.h +++ b/include/DummyInstrument.h @@ -35,6 +35,10 @@ #include "AudioEngine.h" +namespace lmms +{ + + class DummyInstrument : public Instrument { public: @@ -66,11 +70,13 @@ public: return "dummyinstrument"; } - PluginView * instantiateView( QWidget * _parent ) override + gui::PluginView * instantiateView( QWidget * _parent ) override { - return new InstrumentViewFixedSize( this, _parent ); + return new gui::InstrumentViewFixedSize( this, _parent ); } } ; +} // namespace lmms + #endif diff --git a/include/DummyPlugin.h b/include/DummyPlugin.h index 61a399889..313649526 100644 --- a/include/DummyPlugin.h +++ b/include/DummyPlugin.h @@ -30,6 +30,9 @@ #include "PluginView.h" +namespace lmms +{ + class DummyPlugin : public Plugin { public: @@ -57,12 +60,14 @@ public: protected: - PluginView * instantiateView( QWidget * _parent ) override + gui::PluginView * instantiateView( QWidget * _parent ) override { - return new PluginView( this, _parent ); + return new gui::PluginView( this, _parent ); } } ; +} // namesplace lmms + #endif diff --git a/include/Editor.h b/include/Editor.h index d755608a6..88cd84654 100644 --- a/include/Editor.h +++ b/include/Editor.h @@ -28,14 +28,17 @@ #include #include +class QAction; + +namespace lmms::gui +{ + static const int Quantizations[] = { 1, 2, 4, 8, 16, 32, 64, 3, 6, 12, 24, 48, 96, 192 }; -class QAction; - class DropToolBar; /// \brief Superclass for editors with a toolbar. @@ -108,4 +111,6 @@ protected: }; +} // namespace lmms::gui + #endif diff --git a/include/Effect.h b/include/Effect.h index 6d1fea6bf..abd65f207 100644 --- a/include/Effect.h +++ b/include/Effect.h @@ -33,9 +33,19 @@ #include "TempoSyncKnobModel.h" #include "MemoryManager.h" +namespace lmms +{ + class EffectChain; class EffectControls; +namespace gui +{ + +class EffectView; + +} // namespace gui + class LMMS_EXPORT Effect : public Plugin { @@ -170,7 +180,7 @@ protected: */ void checkGate( double _out_sum ); - PluginView * instantiateView( QWidget * ) override; + gui::PluginView* instantiateView( QWidget * ) override; // some effects might not be capable of higher sample-rates so they can // sample it down before processing and back after processing @@ -221,7 +231,7 @@ private: SRC_STATE * m_srcState[2]; - friend class EffectView; + friend class gui::EffectView; friend class EffectChain; } ; @@ -231,4 +241,6 @@ typedef Effect::Descriptor::SubPluginFeatures::Key EffectKey; typedef Effect::Descriptor::SubPluginFeatures::KeyList EffectKeyList; +} // namespace lmms + #endif diff --git a/include/EffectChain.h b/include/EffectChain.h index 9ebc4d534..ca7648761 100644 --- a/include/EffectChain.h +++ b/include/EffectChain.h @@ -30,8 +30,18 @@ #include "SerializingObject.h" #include "AutomatableModel.h" +namespace lmms +{ + class Effect; +namespace gui +{ + +class EffectRackView; + +} // namespace gui + class LMMS_EXPORT EffectChain : public Model, public SerializingObject { @@ -65,7 +75,7 @@ private: BoolModel m_enabledModel; - friend class EffectRackView; + friend class gui::EffectRackView; signals: @@ -73,5 +83,7 @@ signals: } ; +} // namespace lmms + #endif diff --git a/include/EffectControlDialog.h b/include/EffectControlDialog.h index 4a59489da..ec0ef3f1d 100644 --- a/include/EffectControlDialog.h +++ b/include/EffectControlDialog.h @@ -30,9 +30,15 @@ #include "ModelView.h" +namespace lmms +{ + class EffectControls; +namespace gui +{ + class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView { Q_OBJECT @@ -54,4 +60,8 @@ protected: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/EffectControls.h b/include/EffectControls.h index 6af7a7d6c..b8e7d0041 100644 --- a/include/EffectControls.h +++ b/include/EffectControls.h @@ -29,8 +29,16 @@ #include "JournallingObject.h" #include "Effect.h" +namespace lmms +{ + + +namespace gui +{ + class EffectControlDialog; +} // namespace gui class EffectControls : public JournallingObject, public Model { @@ -48,7 +56,7 @@ public: } virtual int controlCount() = 0; - virtual EffectControlDialog * createView() = 0; + virtual gui::EffectControlDialog * createView() = 0; void setViewVisible( bool _visible ) @@ -73,4 +81,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/include/EffectRackView.h b/include/EffectRackView.h index b590d8eb1..014a07dfe 100644 --- a/include/EffectRackView.h +++ b/include/EffectRackView.h @@ -35,6 +35,9 @@ class QScrollArea; class QVBoxLayout; +namespace lmms::gui +{ + class EffectView; class GroupBox; @@ -50,9 +53,9 @@ public: public slots: void clearViews(); - void moveUp( EffectView* view ); - void moveDown( EffectView* view ); - void deletePlugin( EffectView* view ); + void moveUp( lmms::gui::EffectView* view ); + void moveDown( lmms::gui::EffectView* view ); + void deletePlugin( lmms::gui::EffectView* view ); private slots: @@ -83,4 +86,6 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/EffectSelectDialog.h b/include/EffectSelectDialog.h index 19e0ca05f..bf1b6ba04 100644 --- a/include/EffectSelectDialog.h +++ b/include/EffectSelectDialog.h @@ -34,6 +34,9 @@ namespace Ui { class EffectSelectDialog; } +namespace lmms::gui +{ + class EffectSelectDialog : public QDialog { @@ -65,5 +68,7 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/EffectView.h b/include/EffectView.h index a2509dc5b..9f30575e9 100644 --- a/include/EffectView.h +++ b/include/EffectView.h @@ -35,6 +35,9 @@ class QLabel; class QPushButton; class QMdiSubWindow; +namespace lmms::gui +{ + class EffectControlDialog; class Knob; class LedCheckBox; @@ -68,9 +71,9 @@ public slots: signals: - void moveUp( EffectView * _plugin ); - void moveDown( EffectView * _plugin ); - void deletePlugin( EffectView * _plugin ); + void moveUp( lmms::gui::EffectView * _plugin ); + void moveDown( lmms::gui::EffectView * _plugin ); + void deletePlugin( lmms::gui::EffectView * _plugin ); protected: @@ -90,4 +93,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/Engine.h b/include/Engine.h index 531e24220..b63308cde 100644 --- a/include/Engine.h +++ b/include/Engine.h @@ -34,6 +34,9 @@ #include "lmms_export.h" #include "lmms_basics.h" +namespace lmms +{ + class AudioEngine; class Mixer; class PatternStore; @@ -41,20 +44,13 @@ class ProjectJournal; class Song; class Ladspa2LMMS; +namespace gui +{ +class GuiApplication; +} -// Note: This class is called 'LmmsCore' instead of 'Engine' because of naming -// conflicts caused by ZynAddSubFX. See https://github.com/LMMS/lmms/issues/2269 -// and https://github.com/LMMS/lmms/pull/2118 for more details. -// -// The workaround was to rename Lmms' Engine so that it has a different symbol -// name in the object files, but typedef it back to 'Engine' and keep it inside -// of Engine.h so that the rest of the codebase can be oblivious to this issue -// (and it could be fixed without changing every single file). -class LmmsCore; -typedef LmmsCore Engine; - -class LMMS_EXPORT LmmsCore : public QObject +class LMMS_EXPORT Engine : public QObject { Q_OBJECT public: @@ -110,11 +106,11 @@ public: static void updateFramesPerTick(); - static inline LmmsCore * inst() + static inline Engine * inst() { if( s_instanceOfMe == nullptr ) { - s_instanceOfMe = new LmmsCore(); + s_instanceOfMe = new Engine(); } return s_instanceOfMe; } @@ -130,9 +126,9 @@ private: // small helper function which sets the pointer to NULL before actually deleting // the object it refers to template - static inline void deleteHelper( T * * ptr ) + static inline void deleteHelper(T** ptr) { - T * tmp = *ptr; + T* tmp = *ptr; *ptr = nullptr; delete tmp; } @@ -149,15 +145,17 @@ private: #ifdef LMMS_HAVE_LV2 static class Lv2Manager* s_lv2Manager; #endif - static Ladspa2LMMS * s_ladspaManager; + static Ladspa2LMMS* s_ladspaManager; static void* s_dndPluginKey; // even though most methods are static, an instance is needed for Qt slots/signals - static LmmsCore * s_instanceOfMe; + static Engine* s_instanceOfMe; - friend class GuiApplication; + friend class gui::GuiApplication; }; +} // namespace lmms + #endif diff --git a/include/EnvelopeAndLfoParameters.h b/include/EnvelopeAndLfoParameters.h index 42502800e..0a4a0d0f2 100644 --- a/include/EnvelopeAndLfoParameters.h +++ b/include/EnvelopeAndLfoParameters.h @@ -33,6 +33,15 @@ #include "TempoSyncKnobModel.h" #include "lmms_basics.h" +namespace lmms +{ + +namespace gui +{ + +class EnvelopeAndLfoView; + +} class LMMS_EXPORT EnvelopeAndLfoParameters : public Model, public JournallingObject { @@ -179,8 +188,10 @@ private: void updateLfoShapeData(); - friend class EnvelopeAndLfoView; + friend class gui::EnvelopeAndLfoView; } ; +} // namespace lmms + #endif diff --git a/include/EnvelopeAndLfoView.h b/include/EnvelopeAndLfoView.h index f6d4fd0a8..2067f9291 100644 --- a/include/EnvelopeAndLfoView.h +++ b/include/EnvelopeAndLfoView.h @@ -33,8 +33,14 @@ class QPaintEvent; class QPixmap; +namespace lmms +{ + class EnvelopeAndLfoParameters; +namespace gui +{ + class automatableButtonGroup; class Knob; class LedCheckBox; @@ -94,4 +100,8 @@ private: float m_randomGraph; } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/ExportFilter.h b/include/ExportFilter.h index e60faef3a..29cb1c711 100644 --- a/include/ExportFilter.h +++ b/include/ExportFilter.h @@ -32,6 +32,10 @@ #include "Plugin.h" +namespace lmms +{ + + class LMMS_EXPORT ExportFilter : public Plugin { public: @@ -63,4 +67,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/ExportProjectDialog.h b/include/ExportProjectDialog.h index 06c1e3011..5e4418a28 100644 --- a/include/ExportProjectDialog.h +++ b/include/ExportProjectDialog.h @@ -34,6 +34,10 @@ #include "ProjectRenderer.h" #include "RenderManager.h" +namespace lmms::gui +{ + + class ExportProjectDialog : public QDialog, public Ui::ExportProjectDialog { Q_OBJECT @@ -63,4 +67,8 @@ private: std::unique_ptr m_renderManager; } ; + +} // namespace lmms::gui + + #endif diff --git a/include/FadeButton.h b/include/FadeButton.h index dfffe93a2..ee0936ca7 100644 --- a/include/FadeButton.h +++ b/include/FadeButton.h @@ -31,6 +31,10 @@ #include +namespace lmms::gui +{ + + class FadeButton : public QAbstractButton { Q_OBJECT @@ -71,4 +75,6 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/Fader.h b/include/Fader.h index 86d7f0b96..355684c4a 100644 --- a/include/Fader.h +++ b/include/Fader.h @@ -55,6 +55,9 @@ #include "AutomatableModelView.h" +namespace lmms::gui +{ + class TextFloat; @@ -169,4 +172,7 @@ private: } ; +} // namespace lmms::gui + + #endif diff --git a/include/FifoBuffer.h b/include/FifoBuffer.h index 5bbf8b702..d49e367c0 100644 --- a/include/FifoBuffer.h +++ b/include/FifoBuffer.h @@ -28,6 +28,10 @@ #include +namespace lmms +{ + + template class FifoBuffer { @@ -88,4 +92,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/FileBrowser.h b/include/FileBrowser.h index d99c619e9..eb50dd1bb 100644 --- a/include/FileBrowser.h +++ b/include/FileBrowser.h @@ -37,13 +37,18 @@ class QLineEdit; -class FileItem; +namespace lmms +{ + class InstrumentTrack; -class FileBrowserTreeWidget; class PlayHandle; class TrackContainer; +namespace gui +{ +class FileItem; +class FileBrowserTreeWidget; class FileBrowser : public SideBarWidget { @@ -142,11 +147,11 @@ private: private slots: void activateListItem( QTreeWidgetItem * item, int column ); - void openInNewInstrumentTrack( FileItem* item, bool songEditor ); - bool openInNewSampleTrack( FileItem* item ); - void sendToActiveInstrumentTrack( FileItem* item ); + void openInNewInstrumentTrack( lmms::gui::FileItem* item, bool songEditor ); + bool openInNewSampleTrack( lmms::gui::FileItem* item ); + void sendToActiveInstrumentTrack( lmms::gui::FileItem* item ); void updateDirectory( QTreeWidgetItem * item ); - void openContainingFolder( FileItem* item ); + void openContainingFolder( lmms::gui::FileItem* item ); } ; @@ -281,4 +286,8 @@ private: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/FileDialog.h b/include/FileDialog.h index 6e29703b8..ed5d2f231 100644 --- a/include/FileDialog.h +++ b/include/FileDialog.h @@ -30,6 +30,10 @@ #include "lmms_export.h" +namespace lmms::gui +{ + + class LMMS_EXPORT FileDialog : public QFileDialog { Q_OBJECT @@ -50,4 +54,7 @@ public: void clearSelection(); }; -#endif // FILEDIALOG_HPP + +} // namespace lmms::gui + +#endif // FILEDIALOG_H diff --git a/include/Graph.h b/include/Graph.h index 2a6fc4f8a..7a9599f12 100644 --- a/include/Graph.h +++ b/include/Graph.h @@ -35,8 +35,15 @@ #include "ModelView.h" #include "lmms_basics.h" +namespace lmms +{ + + class graphModel; +namespace gui +{ + class LMMS_EXPORT Graph : public QWidget, public ModelView { @@ -116,6 +123,9 @@ private: } ; +} // namespace gui + + /** @brief 2 dimensional function plot @@ -137,7 +147,7 @@ public: graphModel( float _min, float _max, int _size, - :: Model * _parent, + Model * _parent, bool _default_constructed = false, float _step = 0.0 ); @@ -211,8 +221,11 @@ private: float m_maxValue; float m_step; - friend class Graph; + friend class gui::Graph; }; + +} // namespace lmms + #endif diff --git a/include/GroupBox.h b/include/GroupBox.h index 77b0ec578..6a282fedb 100644 --- a/include/GroupBox.h +++ b/include/GroupBox.h @@ -34,6 +34,8 @@ class QPixmap; +namespace lmms::gui +{ class GroupBox : public QWidget, public BoolModelView { @@ -70,6 +72,7 @@ private: } ; +} // namespace lmms::gui #endif diff --git a/include/GuiApplication.h b/include/GuiApplication.h index ee5e83e2b..84697175f 100644 --- a/include/GuiApplication.h +++ b/include/GuiApplication.h @@ -32,6 +32,9 @@ class QLabel; +namespace lmms::gui +{ + class AutomationEditorWindow; class ControllerRackView; class MixerView; @@ -88,4 +91,6 @@ private: // Short-hand function LMMS_EXPORT GuiApplication* getGUI(); +} // namespace lmms::gui + #endif // GUIAPPLICATION_H diff --git a/include/ImportFilter.h b/include/ImportFilter.h index ef58cce24..60eca6f80 100644 --- a/include/ImportFilter.h +++ b/include/ImportFilter.h @@ -30,6 +30,9 @@ #include "Plugin.h" +namespace lmms +{ + class TrackContainer; @@ -109,4 +112,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/InlineAutomation.h b/include/InlineAutomation.h index 1ce486fde..453184329 100644 --- a/include/InlineAutomation.h +++ b/include/InlineAutomation.h @@ -29,6 +29,8 @@ #include "AutomationClip.h" #include "shared_object.h" +namespace lmms +{ class InlineAutomation : public FloatModel, public sharedObject { @@ -95,4 +97,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/Instrument.h b/include/Instrument.h index c3cd56272..7ec3c66be 100644 --- a/include/Instrument.h +++ b/include/Instrument.h @@ -33,6 +33,8 @@ #include "Plugin.h" #include "TimePos.h" +namespace lmms +{ // forward-declarations class InstrumentTrack; @@ -146,6 +148,10 @@ private: } ; + Q_DECLARE_OPERATORS_FOR_FLAGS(Instrument::Flags) + +} // namespace lmms + #endif diff --git a/include/InstrumentFunctionViews.h b/include/InstrumentFunctionViews.h index 6536a8db7..bf4b07668 100644 --- a/include/InstrumentFunctionViews.h +++ b/include/InstrumentFunctionViews.h @@ -30,15 +30,20 @@ #include class QLabel; -class ComboBox; -class GroupBox; -class Knob; -class TempoSyncKnob; + +namespace lmms +{ class InstrumentFunctionArpeggio; class InstrumentFunctionNoteStacking; +namespace gui +{ +class ComboBox; +class GroupBox; +class Knob; +class TempoSyncKnob; class InstrumentFunctionNoteStackingView : public QWidget, public ModelView { @@ -90,5 +95,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/include/InstrumentFunctions.h b/include/InstrumentFunctions.h index e1591ea27..ef1d17902 100644 --- a/include/InstrumentFunctions.h +++ b/include/InstrumentFunctions.h @@ -31,10 +31,19 @@ #include "TempoSyncKnobModel.h" #include "ComboBoxModel.h" +namespace lmms +{ class InstrumentTrack; class NotePlayHandle; +namespace gui +{ + +class InstrumentFunctionNoteStackingView; +class InstrumentFunctionArpeggioView; + +} class InstrumentFunctionNoteStacking : public Model, public JournallingObject @@ -149,7 +158,7 @@ private: FloatModel m_chordRangeModel; - friend class InstrumentFunctionNoteStackingView; + friend class gui::InstrumentFunctionNoteStackingView; } ; @@ -207,9 +216,11 @@ private: friend class InstrumentTrack; - friend class InstrumentFunctionArpeggioView; + friend class gui::InstrumentFunctionArpeggioView; } ; +} // namespace lmms + #endif diff --git a/include/InstrumentMidiIOView.h b/include/InstrumentMidiIOView.h index 9b1e5adfd..399aee890 100644 --- a/include/InstrumentMidiIOView.h +++ b/include/InstrumentMidiIOView.h @@ -30,12 +30,19 @@ #include "ModelView.h" +class QToolButton; + +namespace lmms +{ + +class InstrumentTrack; + +namespace gui +{ class GroupBox; class LcdSpinBox; -class QToolButton; class LedCheckBox; -class InstrumentTrack; class InstrumentMidiIOView : public QWidget, public ModelView @@ -65,4 +72,9 @@ private: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/InstrumentMiscView.h b/include/InstrumentMiscView.h index 6024436e8..25e16395d 100644 --- a/include/InstrumentMiscView.h +++ b/include/InstrumentMiscView.h @@ -29,10 +29,16 @@ #include +namespace lmms +{ + +class InstrumentTrack; + +namespace gui +{ class ComboBox; class GroupBox; -class InstrumentTrack; class LedCheckBox; @@ -60,4 +66,9 @@ private: LedCheckBox *m_rangeImportCheckbox; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/InstrumentPlayHandle.h b/include/InstrumentPlayHandle.h index ac5fc3222..2d7bfa587 100644 --- a/include/InstrumentPlayHandle.h +++ b/include/InstrumentPlayHandle.h @@ -30,6 +30,9 @@ #include "NotePlayHandle.h" #include "lmms_export.h" +namespace lmms +{ + class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle { public: @@ -81,4 +84,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/include/InstrumentSoundShaping.h b/include/InstrumentSoundShaping.h index b037f615a..00208392d 100644 --- a/include/InstrumentSoundShaping.h +++ b/include/InstrumentSoundShaping.h @@ -27,11 +27,19 @@ #include "ComboBoxModel.h" +namespace lmms +{ + class InstrumentTrack; class EnvelopeAndLfoParameters; class NotePlayHandle; +namespace gui +{ +class InstrumentSoundShapingView; +} + class InstrumentSoundShaping : public Model, public JournallingObject { @@ -77,9 +85,11 @@ private: static const char *const targetNames[InstrumentSoundShaping::NumTargets][3]; - friend class InstrumentSoundShapingView; + friend class gui::InstrumentSoundShapingView; } ; +} // namespace lmms + #endif diff --git a/include/InstrumentSoundShapingView.h b/include/InstrumentSoundShapingView.h index 06d53232c..9b4efcfab 100644 --- a/include/InstrumentSoundShapingView.h +++ b/include/InstrumentSoundShapingView.h @@ -32,6 +32,9 @@ class QLabel; +namespace lmms::gui +{ + class EnvelopeAndLfoView; class ComboBox; class GroupBox; @@ -67,4 +70,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index 952884829..d05da176b 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -39,9 +39,23 @@ #include "Track.h" +namespace lmms +{ + + class Instrument; class DataFile; +namespace gui +{ + +class InstrumentTrackView; +class InstrumentTrackWindow; +class InstrumentMiscView; +class MidiCCRackView; + +} // namespace gui + class LMMS_EXPORT InstrumentTrack : public Track, public MidiEventProcessor { @@ -111,7 +125,7 @@ public: virtual bool play( const TimePos & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _clip_num = -1 ) override; // create new view for me - TrackView * createView( TrackContainerView* tcv ) override; + gui::TrackView* createView( gui::TrackContainerView* tcv ) override; // create new track-content-object = clip Clip* createClip(const TimePos & pos) override; @@ -223,8 +237,8 @@ public: signals: void instrumentChanged(); - void midiNoteOn( const Note& ); - void midiNoteOff( const Note& ); + void midiNoteOn( const lmms::Note& ); + void midiNoteOff( const lmms::Note& ); void nameChanged(); void newNote(); void endNote(); @@ -294,12 +308,16 @@ private: std::unique_ptr m_midiCCEnable; std::unique_ptr m_midiCCModel[MidiControllerCount]; - friend class InstrumentTrackView; - friend class InstrumentTrackWindow; + friend class gui::InstrumentTrackView; + friend class gui::InstrumentTrackWindow; friend class NotePlayHandle; - friend class InstrumentMiscView; - friend class MidiCCRackView; + friend class gui::InstrumentMiscView; + friend class gui::MidiCCRackView; } ; + + +} // namespace lmms + #endif diff --git a/include/InstrumentTrackView.h b/include/InstrumentTrackView.h index d863d6c19..a5297b332 100644 --- a/include/InstrumentTrackView.h +++ b/include/InstrumentTrackView.h @@ -30,6 +30,10 @@ #include "InstrumentTrack.h" +namespace lmms::gui +{ + + class InstrumentTrackWindow; class Knob; class MidiCCRackView; @@ -114,5 +118,7 @@ private: friend class InstrumentTrackWindow; } ; -#endif +} // namespace lmms::gui + +#endif diff --git a/include/InstrumentTrackWindow.h b/include/InstrumentTrackWindow.h index a215e08f9..cd208c165 100644 --- a/include/InstrumentTrackWindow.h +++ b/include/InstrumentTrackWindow.h @@ -30,6 +30,17 @@ #include "ModelView.h" #include "SerializingObject.h" +class QLabel; +class QLineEdit; +class QWidget; + +namespace lmms +{ + +class InstrumentTrack; + +namespace gui +{ class EffectRackView; class MixerLineLcdSpinBox; @@ -38,7 +49,6 @@ class InstrumentFunctionNoteStackingView; class InstrumentMidiIOView; class InstrumentMiscView; class InstrumentSoundShapingView; -class InstrumentTrack; class InstrumentTrackShapingView; class InstrumentTrackView; class Knob; @@ -46,9 +56,6 @@ class LcdSpinBox; class LeftRightNav; class PianoView; class PluginView; -class QLabel; -class QLineEdit; -class QWidget; class TabWidget; @@ -157,5 +164,9 @@ private: friend class InstrumentTrackView; } ; -#endif +} // namespace gui + +} // namespace lmms + +#endif diff --git a/include/InstrumentView.h b/include/InstrumentView.h index 838ed2d91..695e8c477 100644 --- a/include/InstrumentView.h +++ b/include/InstrumentView.h @@ -29,6 +29,10 @@ #include "Instrument.h" #include "PluginView.h" + +namespace lmms::gui +{ + class InstrumentTrackWindow; @@ -70,4 +74,6 @@ public: } ; +} // namespace lmms::gui + #endif diff --git a/include/IoHelper.h b/include/IoHelper.h index 35ee8cb87..4f08f5087 100644 --- a/include/IoHelper.h +++ b/include/IoHelper.h @@ -27,9 +27,23 @@ #include - #ifdef _WIN32 #include +#endif + +#ifdef LMMS_BUILD_WIN32 +#include +#else +#ifdef LMMS_HAVE_UNISTD_H +#include +#endif +#endif + +namespace lmms +{ + + +#ifdef _WIN32 std::wstring toWString(const std::string& s) { @@ -44,15 +58,9 @@ std::wstring toWString(const std::string& s) MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, s.data(), s.length(), &ret[0], len); return ret; } + #endif -#ifdef LMMS_BUILD_WIN32 -#include -#else -#ifdef LMMS_HAVE_UNISTD_H -#include -#endif -#endif FILE* F_OPEN_UTF8(std::string const& fname, const char* mode){ #ifdef LMMS_BUILD_WIN32 @@ -62,6 +70,7 @@ FILE* F_OPEN_UTF8(std::string const& fname, const char* mode){ #endif } + int fileToDescriptor(FILE* f, bool closeFile = true) { int fh; @@ -76,3 +85,6 @@ int fileToDescriptor(FILE* f, bool closeFile = true) if (closeFile) {fclose(f);} return fh; } + + +} // namespace lmms \ No newline at end of file diff --git a/include/JournallingObject.h b/include/JournallingObject.h index 9e0322591..cd853dc7f 100644 --- a/include/JournallingObject.h +++ b/include/JournallingObject.h @@ -30,6 +30,8 @@ #include "lmms_basics.h" #include "SerializingObject.h" +namespace lmms +{ class LMMS_EXPORT JournallingObject : public SerializingObject { @@ -99,5 +101,7 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/Keymap.h b/include/Keymap.h index 08a27c473..6286f8362 100644 --- a/include/Keymap.h +++ b/include/Keymap.h @@ -31,6 +31,9 @@ #include "SerializingObject.h" +namespace lmms +{ + class Keymap : public QObject, public SerializingObject { Q_OBJECT @@ -75,4 +78,6 @@ private: float m_baseFreq; //!< frequency of the base note (usually A4 @440 Hz) }; +} // namespace lmms + #endif diff --git a/include/Knob.h b/include/Knob.h index f27328aa9..16ac7ed01 100644 --- a/include/Knob.h +++ b/include/Knob.h @@ -36,6 +36,11 @@ class QPixmap; + +namespace lmms::gui +{ + + class TextFloat; enum knobTypes @@ -206,4 +211,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/Ladspa2LMMS.h b/include/Ladspa2LMMS.h index 28fa25b89..63db75cd9 100644 --- a/include/Ladspa2LMMS.h +++ b/include/Ladspa2LMMS.h @@ -30,6 +30,9 @@ #include "LadspaManager.h" +namespace lmms +{ + //! Class responsible for sorting found plugins (by LadspaManager) //! into categories class LMMS_EXPORT Ladspa2LMMS : public LadspaManager @@ -73,8 +76,11 @@ private: l_sortable_plugin_t m_analysisTools; l_sortable_plugin_t m_otherPlugins; - friend class LmmsCore; + friend class Engine; } ; + +} // namespace lmms + #endif diff --git a/include/LadspaBase.h b/include/LadspaBase.h index be4576f55..68e91dd7a 100644 --- a/include/LadspaBase.h +++ b/include/LadspaBase.h @@ -29,6 +29,10 @@ #include "LadspaManager.h" #include "Plugin.h" +namespace lmms +{ + + class LadspaControl; @@ -88,4 +92,6 @@ inline Plugin::Descriptor::SubPluginFeatures::Key ladspaKeyToSubPluginKey( } +} // namespace lmms + #endif diff --git a/include/LadspaControl.h b/include/LadspaControl.h index 34f6c9ae2..8b6fe3d19 100644 --- a/include/LadspaControl.h +++ b/include/LadspaControl.h @@ -32,9 +32,19 @@ #include "TempoSyncKnobModel.h" #include "ValueBuffer.h" +namespace lmms +{ + typedef struct PortDescription port_desc_t; +namespace gui +{ + +class LadspaControlView; + +} // namespace gui + class LMMS_EXPORT LadspaControl : public Model, public JournallingObject { @@ -115,8 +125,11 @@ private: TempoSyncKnobModel m_tempoSyncKnobModel; - friend class LadspaControlView; + friend class gui::LadspaControlView; } ; + +} // namespace lmms + #endif diff --git a/include/LadspaControlView.h b/include/LadspaControlView.h index d2d0ca44d..15eb722a7 100644 --- a/include/LadspaControlView.h +++ b/include/LadspaControlView.h @@ -30,8 +30,13 @@ #include "ModelView.h" +namespace lmms +{ + class LadspaControl; +namespace gui +{ class LMMS_EXPORT LadspaControlView : public QWidget, public ModelView { @@ -45,4 +50,9 @@ private: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/LadspaManager.h b/include/LadspaManager.h index a87511161..565a7c898 100644 --- a/include/LadspaManager.h +++ b/include/LadspaManager.h @@ -40,6 +40,9 @@ #include "lmms_basics.h" +namespace lmms +{ + const float NOHINT = -99342.2243f; typedef QPair ladspa_key_t; @@ -346,4 +349,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/include/LcdFloatSpinBox.h b/include/LcdFloatSpinBox.h index 034168fbb..ab0de304e 100644 --- a/include/LcdFloatSpinBox.h +++ b/include/LcdFloatSpinBox.h @@ -32,6 +32,9 @@ #include "LcdWidget.h" #include "AutomatableModelView.h" +namespace lmms::gui +{ + class LMMS_EXPORT LcdFloatSpinBox : public QWidget, public FloatModelView { @@ -80,4 +83,6 @@ signals: using LcdFloatSpinBoxModel = FloatModel; +} // namespace lmms::gui + #endif diff --git a/include/LcdSpinBox.h b/include/LcdSpinBox.h index 91ac8b4a7..1c30bfcf6 100644 --- a/include/LcdSpinBox.h +++ b/include/LcdSpinBox.h @@ -29,6 +29,8 @@ #include "LcdWidget.h" #include "AutomatableModelView.h" +namespace lmms::gui +{ class LMMS_EXPORT LcdSpinBox : public LcdWidget, public IntModelView { @@ -86,4 +88,6 @@ signals: typedef IntModel LcdSpinBoxModel; +} // namespace lmms::gui + #endif diff --git a/include/LcdWidget.h b/include/LcdWidget.h index a04e7ae91..aad1d189a 100644 --- a/include/LcdWidget.h +++ b/include/LcdWidget.h @@ -31,6 +31,9 @@ #include "lmms_export.h" +namespace lmms::gui +{ + class LMMS_EXPORT LcdWidget : public QWidget { Q_OBJECT @@ -112,4 +115,6 @@ private: }; +} // namespace lmms::gui + #endif diff --git a/include/LedCheckBox.h b/include/LedCheckBox.h index f5477704f..8eac9b562 100644 --- a/include/LedCheckBox.h +++ b/include/LedCheckBox.h @@ -32,6 +32,9 @@ class QPixmap; +namespace lmms::gui +{ + class LMMS_EXPORT LedCheckBox : public AutomatableButton { Q_OBJECT @@ -78,4 +81,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/LeftRightNav.h b/include/LeftRightNav.h index 4f3f4ecbb..df72193dc 100644 --- a/include/LeftRightNav.h +++ b/include/LeftRightNav.h @@ -28,6 +28,9 @@ #include "PixmapButton.h" +namespace lmms::gui +{ + class LeftRightNav : public QWidget { Q_OBJECT @@ -45,4 +48,7 @@ private: PixmapButton m_rightBtn; }; + +} // namespace lmms::gui + #endif \ No newline at end of file diff --git a/include/LfoController.h b/include/LfoController.h index 8fc35fd09..6ee136a14 100644 --- a/include/LfoController.h +++ b/include/LfoController.h @@ -34,11 +34,21 @@ #include "TempoSyncKnobModel.h" #include "Oscillator.h" +namespace lmms +{ + +namespace gui +{ + class automatableButtonGroup; -class Knob; class LedCheckBox; -class TempoSyncKnob; class PixmapButton; +class Knob; +class TempoSyncKnob; + +class LfoControllerDialog; + +} class LfoController : public Controller @@ -55,7 +65,7 @@ public: public slots: - ControllerDialog * createDialog( QWidget * _parent ) override; + gui::ControllerDialog * createDialog( QWidget * _parent ) override; protected: @@ -83,11 +93,12 @@ protected slots: void updateSampleFunction(); void updateDuration(); - friend class LfoControllerDialog; + friend class gui::LfoControllerDialog; } ; - +namespace gui +{ class LfoControllerDialog : public ControllerDialog { @@ -120,4 +131,9 @@ private slots: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/LinkedModelGroupViews.h b/include/LinkedModelGroupViews.h index a70480d5c..50ef03596 100644 --- a/include/LinkedModelGroupViews.h +++ b/include/LinkedModelGroupViews.h @@ -31,6 +31,19 @@ #include +namespace lmms +{ + + +class LinkedModelGroup; +class LinkedModelGroups; + + +namespace gui +{ + +class Control; + /** @file LinkedModelGroupViews.h See Lv2ViewBase.h for example usage @@ -55,17 +68,17 @@ public: @param colNum numbers of columns for the controls (link LEDs not counted) */ - LinkedModelGroupView(QWidget *parent, class LinkedModelGroup* model, + LinkedModelGroupView(QWidget* parent, LinkedModelGroup* model, std::size_t colNum); ~LinkedModelGroupView(); //! Reconnect models if model changed - void modelChanged(class LinkedModelGroup *linkedModelGroup); + void modelChanged(LinkedModelGroup* linkedModelGroup); protected: //! Add a control to this widget //! @warning This widget will own this control, do not free it - void addControl(class Control *ctrl, const std::string &id, + void addControl(Control* ctrl, const std::string &id, const std::string& display, bool removable); void removeControl(const QString &key); @@ -94,7 +107,7 @@ protected: ~LinkedModelGroupsView() = default; //! Reconnect models if model changed; to be called by child virtuals - void modelChanged(class LinkedModelGroups* ctrlBase); + void modelChanged(LinkedModelGroups* ctrlBase); private: //! The base class must return the addressed group view, @@ -103,4 +116,8 @@ private: }; +} // namespace gui + +} // namespace lmms + #endif // LINKEDMODELGROUPVIEWS_H diff --git a/include/LinkedModelGroups.h b/include/LinkedModelGroups.h index 770518076..9fa0fefa6 100644 --- a/include/LinkedModelGroups.h +++ b/include/LinkedModelGroups.h @@ -31,6 +31,12 @@ #include "Model.h" +class QDomDocument; +class QDomElement; + +namespace lmms +{ + /** @file LinkedModelGroups.h See Lv2ControlBase.h and Lv2Proc.h for example usage @@ -107,8 +113,8 @@ signals: // (who would kno if the client is Qt, i.e. it may not have slots at all) // In this case you'd e.g. send the UI something like // "/added " - void modelAdded(AutomatableModel* added); - void modelRemoved(AutomatableModel* removed); + void modelAdded(lmms::AutomatableModel* added); + void modelRemoved(lmms::AutomatableModel* removed); public: AutomatableModel* getModel(const std::string& s) @@ -170,4 +176,6 @@ public: }; +} // namespace lmms + #endif // LINKEDMODELGROUPS_H diff --git a/include/LmmsPalette.h b/include/LmmsPalette.h index a8ee5d1c8..87ea18687 100644 --- a/include/LmmsPalette.h +++ b/include/LmmsPalette.h @@ -30,6 +30,10 @@ #define LMMSPALETTE_H +namespace lmms::gui +{ + + class LMMS_EXPORT LmmsPalette : public QWidget { Q_OBJECT @@ -83,5 +87,6 @@ private: +} // namespace lmms::gui #endif diff --git a/include/LmmsStyle.h b/include/LmmsStyle.h index ccf14396c..a4c9edd31 100644 --- a/include/LmmsStyle.h +++ b/include/LmmsStyle.h @@ -30,6 +30,9 @@ #include +namespace lmms::gui +{ + class LmmsStyle : public QProxyStyle { @@ -92,4 +95,7 @@ private: }; + +} // namespace lmms::gui + #endif diff --git a/include/LocaleHelper.h b/include/LocaleHelper.h index c5d9d4c46..b071a1596 100644 --- a/include/LocaleHelper.h +++ b/include/LocaleHelper.h @@ -33,8 +33,9 @@ #include #include -namespace LocaleHelper +namespace lmms::LocaleHelper { + inline double toDouble(QString str, bool* ok = nullptr) { bool isOkay; @@ -62,6 +63,8 @@ inline float toFloat(QString str, bool* ok = nullptr) } return static_cast(d); } -} + + +} // namespace lmms::LocaleHelper #endif // LOCALEHELPER_H diff --git a/include/LocklessAllocator.h b/include/LocklessAllocator.h index d7977480e..17f5ebfb5 100644 --- a/include/LocklessAllocator.h +++ b/include/LocklessAllocator.h @@ -28,6 +28,11 @@ #include #include + +namespace lmms +{ + + class LocklessAllocator { public: @@ -79,4 +84,6 @@ public: } ; +} // namespace lmms + #endif diff --git a/include/LocklessList.h b/include/LocklessList.h index 05df56f41..44b718059 100644 --- a/include/LocklessList.h +++ b/include/LocklessList.h @@ -29,6 +29,9 @@ #include +namespace lmms +{ + template class LocklessList { @@ -92,4 +95,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/LocklessRingBuffer.h b/include/LocklessRingBuffer.h index 5950b842f..60f8ab989 100644 --- a/include/LocklessRingBuffer.h +++ b/include/LocklessRingBuffer.h @@ -32,6 +32,9 @@ #include "../src/3rdparty/ringbuffer/include/ringbuffer/ringbuffer.h" +namespace lmms +{ + //! A convenience layer for a realtime-safe and thread-safe multi-reader ringbuffer template class LocklessRingBuffer @@ -83,4 +86,7 @@ private: QWaitCondition *m_notifier; }; + +} // namespace lmms + #endif //LOCKLESSRINGBUFFER_H diff --git a/include/Lv2Basics.h b/include/Lv2Basics.h index 0003f83e8..b935e6a02 100644 --- a/include/Lv2Basics.h +++ b/include/Lv2Basics.h @@ -36,6 +36,9 @@ #include #include +namespace lmms +{ + struct LilvNodeDeleter { void operator()(LilvNode* n) { lilv_node_free(n); } @@ -63,5 +66,7 @@ QString qStringFromPortName(const LilvPlugin* plug, const LilvPort* port); //! Return port name as std::string, everything will be freed automatically std::string stdStringFromPortName(const LilvPlugin* plug, const LilvPort* port); +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2BASICS_H diff --git a/include/Lv2ControlBase.h b/include/Lv2ControlBase.h index 6b72bec5d..c6b08db8c 100644 --- a/include/Lv2ControlBase.h +++ b/include/Lv2ControlBase.h @@ -37,6 +37,10 @@ #include "lmms_export.h" #include "Plugin.h" +namespace lmms +{ + + class Lv2Proc; class PluginIssue; @@ -155,5 +159,8 @@ private: const LilvPlugin* m_plugin; }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2_CONTROL_BASE_H diff --git a/include/Lv2Evbuf.h b/include/Lv2Evbuf.h index 9cf6a6801..2f569f7d6 100644 --- a/include/Lv2Evbuf.h +++ b/include/Lv2Evbuf.h @@ -39,6 +39,11 @@ #include + +namespace lmms +{ + + /** An abstract/opaque LV2 event buffer. */ @@ -144,6 +149,9 @@ lv2_evbuf_write( LV2_Evbuf_Iterator* iter, uint32_t size, const uint8_t* data); + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2_EVBUF_H diff --git a/include/Lv2Features.h b/include/Lv2Features.h index 272bb3a4d..033273f31 100644 --- a/include/Lv2Features.h +++ b/include/Lv2Features.h @@ -33,6 +33,10 @@ #include #include "Lv2Manager.h" + +namespace lmms +{ + /** Feature container @@ -75,6 +79,9 @@ private: std::map m_featureByUri; }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2FEATURES_H diff --git a/include/Lv2Manager.h b/include/Lv2Manager.h index dbea510ce..7c4a4bcb7 100644 --- a/include/Lv2Manager.h +++ b/include/Lv2Manager.h @@ -39,6 +39,9 @@ #include "Plugin.h" +namespace lmms +{ + /* all Lv2 classes in relation (use our "4 spaces per tab rule" to view): @@ -158,6 +161,9 @@ private: bool isSubclassOf(const LilvPluginClass *clvss, const char *uriStr); }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2MANAGER_H diff --git a/include/Lv2Options.h b/include/Lv2Options.h index 1453de2ea..32225ea89 100644 --- a/include/Lv2Options.h +++ b/include/Lv2Options.h @@ -41,6 +41,9 @@ #include "Lv2Manager.h" #include "Lv2UridCache.h" +namespace lmms +{ + /** Option container @@ -99,6 +102,9 @@ private: std::map> m_optionValues; }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2OPTIONS_H diff --git a/include/Lv2Ports.h b/include/Lv2Ports.h index 529200793..22a051a21 100644 --- a/include/Lv2Ports.h +++ b/include/Lv2Ports.h @@ -36,6 +36,11 @@ #include "lmms_basics.h" #include "PluginIssue.h" + +namespace lmms +{ + + struct ConnectPortVisitor; typedef struct LV2_Evbuf_Impl LV2_Evbuf; @@ -200,7 +205,7 @@ private: bool m_sidechain; // the only case when data of m_buffer may be referenced: - friend struct ::ConnectPortVisitor; + friend struct lmms::ConnectPortVisitor; }; struct AtomSeq : public VisitablePort @@ -261,5 +266,8 @@ const Target* dcast(const PortBase* base) } // namespace Lv2Ports + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2PORTS_H diff --git a/include/Lv2Proc.h b/include/Lv2Proc.h index 06185a9ac..31a694044 100644 --- a/include/Lv2Proc.h +++ b/include/Lv2Proc.h @@ -40,6 +40,10 @@ #include "../src/3rdparty/ringbuffer/include/ringbuffer/ringbuffer.h" #include "TimePos.h" + +namespace lmms +{ + class PluginIssue; // forward declare port structs/enums @@ -212,5 +216,8 @@ private: static AutoLilvNode uri(const char* uriStr); }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2PROC_H diff --git a/include/Lv2SubPluginFeatures.h b/include/Lv2SubPluginFeatures.h index fee3c3812..9ba2c76cb 100644 --- a/include/Lv2SubPluginFeatures.h +++ b/include/Lv2SubPluginFeatures.h @@ -36,6 +36,10 @@ #include "lmms_export.h" #include "Plugin.h" +namespace lmms +{ + + class LMMS_EXPORT Lv2SubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures { private: @@ -57,6 +61,9 @@ public: const Plugin::Descriptor *desc, KeyList &kl) const override; }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif diff --git a/include/Lv2UridCache.h b/include/Lv2UridCache.h index e50fd4bab..bae42d318 100644 --- a/include/Lv2UridCache.h +++ b/include/Lv2UridCache.h @@ -31,6 +31,11 @@ #include + +namespace lmms +{ + + //! Cached URIDs for fast access (for use in real-time code) class Lv2UridCache { @@ -65,5 +70,8 @@ private: template<> struct Lv2UridCache::IdForType { static constexpr auto value = Id::atom_Float; }; template<> struct Lv2UridCache::IdForType { static constexpr auto value = Id::atom_Int; }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2URIDCACHE_H diff --git a/include/Lv2UridMap.h b/include/Lv2UridMap.h index 39cfcc44f..9db9cb0c2 100644 --- a/include/Lv2UridMap.h +++ b/include/Lv2UridMap.h @@ -35,6 +35,11 @@ #include #include + +namespace lmms +{ + + /** * Complete implementation of the Lv2 Urid Map extension */ @@ -66,5 +71,8 @@ public: LV2_URID_Unmap* unmapFeature() { return &m_unmapFeature; } }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2URIDMAP_H diff --git a/include/Lv2ViewBase.h b/include/Lv2ViewBase.h index 6eafbde88..74a0bd876 100644 --- a/include/Lv2ViewBase.h +++ b/include/Lv2ViewBase.h @@ -35,10 +35,23 @@ #include "lmms_export.h" #include "Lv2Basics.h" + +class QPushButton; +class QMdiSubWindow; + +namespace lmms +{ + + class Lv2Proc; class Lv2ControlBase; +namespace gui +{ + +class LedCheckBox; + //! View for one processor, Lv2ViewBase contains 2 of those for mono plugins class Lv2ViewProc : public LinkedModelGroupView { @@ -61,9 +74,9 @@ protected: ~Lv2ViewBase(); // these widgets must be connected by child widgets - class QPushButton *m_reloadPluginButton = nullptr; - class QPushButton *m_toggleUIButton = nullptr; - class QPushButton *m_helpButton = nullptr; + QPushButton* m_reloadPluginButton = nullptr; + QPushButton* m_toggleUIButton = nullptr; + QPushButton* m_helpButton = nullptr; void toggleUI(); void toggleHelp(bool visible); @@ -87,10 +100,13 @@ private: //! Numbers of controls per row; must be multiple of 2 for mono effects const int m_colNum = 6; - class QMdiSubWindow* m_helpWindow = nullptr; - class LedCheckBox *m_multiChannelLink; + QMdiSubWindow* m_helpWindow = nullptr; }; +} // namespace gui + +} // namespace lmms + #endif // LMMS_HAVE_LV2 #endif // LV2VIEWBASE_H diff --git a/include/MainApplication.h b/include/MainApplication.h index d28900213..04bc82226 100644 --- a/include/MainApplication.h +++ b/include/MainApplication.h @@ -34,6 +34,11 @@ #include #endif + +namespace lmms::gui +{ + + #if defined(LMMS_BUILD_WIN32) class MainApplication : public QApplication, public QAbstractNativeEventFilter #else @@ -56,4 +61,7 @@ private: QString m_queuedFile; }; + +} // namespace lmms::gui + #endif // MAINAPPLICATION_H diff --git a/include/MainWindow.h b/include/MainWindow.h index 145023161..8fbc20e6a 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -37,10 +37,18 @@ class QDomElement; class QGridLayout; class QMdiArea; +namespace lmms +{ + class ConfigManager; + +namespace gui +{ + class PluginView; class SubWindow; class ToolButton; +class GuiApplication; class MainWindow : public QMainWindow @@ -250,4 +258,9 @@ signals: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/MemoryHelper.h b/include/MemoryHelper.h index f5c5bf11b..1def9d9c4 100644 --- a/include/MemoryHelper.h +++ b/include/MemoryHelper.h @@ -27,6 +27,10 @@ #include +namespace lmms +{ + + /** * Helper class to alocate aligned memory and free it. */ @@ -40,5 +44,8 @@ public: private: }; + +} // namespace lmms + #endif diff --git a/include/MemoryManager.h b/include/MemoryManager.h index a5899d922..014071617 100644 --- a/include/MemoryManager.h +++ b/include/MemoryManager.h @@ -32,6 +32,10 @@ #include "lmms_export.h" +namespace lmms +{ + + class LMMS_EXPORT MemoryManager { public: @@ -99,4 +103,7 @@ void MM_FREE(T* ptr) MemoryManager::free(ptr); } + +} // namespace lmms + #endif diff --git a/include/MeterDialog.h b/include/MeterDialog.h index da254c7c7..e606a4482 100644 --- a/include/MeterDialog.h +++ b/include/MeterDialog.h @@ -30,6 +30,9 @@ #include "ModelView.h" +namespace lmms::gui +{ + class LcdSpinBox; @@ -49,4 +52,6 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/MeterModel.h b/include/MeterModel.h index 2b98bed0b..bcd3fa2b2 100644 --- a/include/MeterModel.h +++ b/include/MeterModel.h @@ -27,6 +27,9 @@ #include "AutomatableModel.h" +namespace lmms +{ + class MeterModel : public Model { @@ -62,4 +65,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/include/MicroTimer.h b/include/MicroTimer.h index 2026619e2..2eaf28b97 100644 --- a/include/MicroTimer.h +++ b/include/MicroTimer.h @@ -27,6 +27,9 @@ #include +namespace lmms +{ + class MicroTimer { using time_point = std::chrono::steady_clock::time_point; @@ -43,4 +46,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/Microtuner.h b/include/Microtuner.h index 9ac732817..934739ff5 100644 --- a/include/Microtuner.h +++ b/include/Microtuner.h @@ -29,6 +29,9 @@ #include "ComboBoxModel.h" #include "JournallingObject.h" +namespace lmms +{ + class LMMS_EXPORT Microtuner : public Model, public JournallingObject { Q_OBJECT @@ -68,4 +71,6 @@ private: }; +} // namespace lmms + #endif diff --git a/include/MicrotunerConfig.h b/include/MicrotunerConfig.h index 58752026c..690587dd5 100644 --- a/include/MicrotunerConfig.h +++ b/include/MicrotunerConfig.h @@ -35,6 +35,10 @@ class QLineEdit; class QPlainTextEdit; +namespace lmms::gui +{ + + class LMMS_EXPORT MicrotunerConfig : public QWidget, public SerializingObject { Q_OBJECT @@ -89,4 +93,7 @@ private: FloatModel m_baseFreqModel; //!< model for spinbox of currently edited base note frequency }; + +} // namespace lmms::gui + #endif diff --git a/include/Midi.h b/include/Midi.h index b922ac41f..9a97ae6e4 100644 --- a/include/Midi.h +++ b/include/Midi.h @@ -28,6 +28,10 @@ #include "lmms_basics.h" +namespace lmms +{ + + enum MidiEventTypes { // messages @@ -137,4 +141,7 @@ const int MidiMinPanning = -128; const int MidiMinPitchBend = 0; const int MidiMaxPitchBend = 16383; + +} // namespace lmms + #endif diff --git a/include/MidiAlsaRaw.h b/include/MidiAlsaRaw.h index 60bf1e685..3ab2b8af7 100644 --- a/include/MidiAlsaRaw.h +++ b/include/MidiAlsaRaw.h @@ -40,6 +40,9 @@ struct pollfd; +namespace lmms +{ + class MidiAlsaRaw : public QThread, public MidiClientRaw { Q_OBJECT @@ -77,6 +80,9 @@ private: } ; -#endif + +} // namespace lmms + +#endif // LMMS_HAVE_ALSA #endif diff --git a/include/MidiAlsaSeq.h b/include/MidiAlsaSeq.h index bbb3f7242..8a2d3a098 100644 --- a/include/MidiAlsaSeq.h +++ b/include/MidiAlsaSeq.h @@ -42,6 +42,10 @@ struct pollfd; +namespace lmms +{ + + class MidiAlsaSeq : public QThread, public MidiClient { Q_OBJECT @@ -113,7 +117,7 @@ public: private slots: - void changeQueueTempo( bpm_t _bpm ); + void changeQueueTempo( lmms::bpm_t _bpm ); void updatePortList(); @@ -149,7 +153,10 @@ signals: } ; -#endif + +} // namespace lmms + +#endif // LMMS_HAVE_ALSA #endif diff --git a/include/MidiApple.h b/include/MidiApple.h index 4ea4805e5..d2a901698 100644 --- a/include/MidiApple.h +++ b/include/MidiApple.h @@ -38,6 +38,10 @@ class QLineEdit; +namespace lmms +{ + + class MidiApple : public QObject, public MidiClient { Q_OBJECT @@ -146,7 +150,10 @@ signals: } ; -#endif + +} // namespace lmms + +#endif // LMMS_BUILD_APPLE #endif diff --git a/include/MidiCCRackView.h b/include/MidiCCRackView.h index 982e06048..59f1de020 100644 --- a/include/MidiCCRackView.h +++ b/include/MidiCCRackView.h @@ -6,9 +6,16 @@ #include "Midi.h" #include "SerializingObject.h" -class GroupBox; +namespace lmms +{ + class InstrumentTrack; + +namespace gui +{ + class Knob; +class GroupBox; class MidiCCRackView : public QWidget, public SerializingObject { @@ -37,4 +44,9 @@ private: }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/MidiClient.h b/include/MidiClient.h index 384a664ce..835d2e46a 100644 --- a/include/MidiClient.h +++ b/include/MidiClient.h @@ -31,9 +31,13 @@ #include "MidiEvent.h" +class QObject; + + +namespace lmms +{ class MidiPort; -class QObject; class TimePos; @@ -167,6 +171,7 @@ private: } ; +} // namespace lmms #endif diff --git a/include/MidiClip.h b/include/MidiClip.h index 036f2771c..173ca5699 100644 --- a/include/MidiClip.h +++ b/include/MidiClip.h @@ -31,8 +31,17 @@ #include "Note.h" +namespace lmms +{ + + class InstrumentTrack; +namespace gui +{ +class MidiClipView; +} + class LMMS_EXPORT MidiClip : public Clip { @@ -100,7 +109,7 @@ public: bool empty(); - ClipView * createView( TrackView * _tv ) override; + gui::ClipView * createView( gui::TrackView * _tv ) override; using Model::dataChanged; @@ -136,13 +145,14 @@ private: MidiClip * adjacentMidiClipByOffset(int offset) const; - friend class MidiClipView; + friend class gui::MidiClipView; signals: - void destroyedMidiClip( MidiClip* ); + void destroyedMidiClip( lmms::MidiClip* ); } ; +} // namespace lmms #endif diff --git a/include/MidiClipView.h b/include/MidiClipView.h index 82e552a8c..c9f1c3e1e 100644 --- a/include/MidiClipView.h +++ b/include/MidiClipView.h @@ -26,12 +26,17 @@ #define MIDI_CLIP_VIEW_H #include - #include "ClipView.h" +namespace lmms +{ + class MidiClip; - - + +namespace gui +{ + + class MidiClipView : public ClipView { Q_OBJECT @@ -58,7 +63,7 @@ public: void setMutedNoteBorderColor(QColor const & color) { m_mutedNoteBorderColor = color; } public slots: - MidiClip* getMidiClip(); + lmms::MidiClip* getMidiClip(); void update() override; @@ -96,7 +101,10 @@ private: bool m_legacySEPattern; } ; - - + + +} // namespace gui + +} // namespace lmms #endif diff --git a/include/MidiController.h b/include/MidiController.h index 74b408f86..533f8ff03 100644 --- a/include/MidiController.h +++ b/include/MidiController.h @@ -33,8 +33,16 @@ #include "MidiPort.h" +namespace lmms +{ + class MidiPort; +namespace gui +{ +class ControllerConnectionDialog; +} + class MidiController : public Controller, public MidiEventProcessor { @@ -61,7 +69,7 @@ public: public slots: - ControllerDialog * createDialog( QWidget * _parent ) override; + gui::ControllerDialog* createDialog( QWidget * _parent ) override; void updateName(); @@ -76,10 +84,12 @@ protected: float m_lastValue; float m_previousValue; - friend class ControllerConnectionDialog; + friend class gui::ControllerConnectionDialog; friend class AutoDetectMidiController; } ; +} // namespace lmms + #endif diff --git a/include/MidiDummy.h b/include/MidiDummy.h index f809d3c36..8744c6aa2 100644 --- a/include/MidiDummy.h +++ b/include/MidiDummy.h @@ -28,6 +28,10 @@ #include "MidiClient.h" +namespace lmms +{ + + class MidiDummy : public MidiClientRaw { public: @@ -63,4 +67,6 @@ protected: } ; +} // namespace lmms + #endif diff --git a/include/MidiEvent.h b/include/MidiEvent.h index 29a3c5df6..e73a7d1a8 100644 --- a/include/MidiEvent.h +++ b/include/MidiEvent.h @@ -30,6 +30,9 @@ #include "panning_constants.h" #include "volume.h" +namespace lmms +{ + class MidiEvent { public: @@ -225,4 +228,6 @@ private: Source m_source; } ; +} // namespace lmms + #endif diff --git a/include/MidiEventProcessor.h b/include/MidiEventProcessor.h index 3ded20430..1398f4b6d 100644 --- a/include/MidiEventProcessor.h +++ b/include/MidiEventProcessor.h @@ -29,6 +29,9 @@ #include "MemoryManager.h" #include "TimePos.h" +namespace lmms +{ + // all classes being able to process MIDI-events should inherit from this class MidiEventProcessor { @@ -48,4 +51,6 @@ public: } ; +} // namespace lmms + #endif diff --git a/include/MidiEventToByteSeq.h b/include/MidiEventToByteSeq.h index fba8cdeb4..f2e36f50a 100644 --- a/include/MidiEventToByteSeq.h +++ b/include/MidiEventToByteSeq.h @@ -30,6 +30,10 @@ #include "lmms_export.h" + +namespace lmms +{ + /** Write MIDI event into byte sequence. @@ -44,4 +48,7 @@ std::size_t LMMS_EXPORT writeToByteSeq( const class MidiEvent& ev, uint8_t* data, std::size_t bufsize ); + +} // namespace lmms + #endif // MIDIEVENTTOBYTESEQ_H diff --git a/include/MidiJack.h b/include/MidiJack.h index f12f9cebf..16d09d431 100644 --- a/include/MidiJack.h +++ b/include/MidiJack.h @@ -39,10 +39,14 @@ #include "MidiClient.h" +class QLineEdit; + +namespace lmms +{ + constexpr size_t JACK_MIDI_BUFFER_MAX = 64; /* events */ class AudioJack; -class QLineEdit; class MidiJack : public QThread, public MidiClientRaw { @@ -93,6 +97,9 @@ private: }; + +} // namespace lmms + #endif // LMMS_HAVE_JACK #endif // MIDIJACK_H diff --git a/include/MidiOss.h b/include/MidiOss.h index 68b970bc5..30f78bec1 100644 --- a/include/MidiOss.h +++ b/include/MidiOss.h @@ -35,6 +35,9 @@ #include "MidiClient.h" +namespace lmms +{ + class MidiOss : public QThread, public MidiClientRaw { @@ -69,7 +72,11 @@ private: } ; -#endif + +} // namespace lmms + + +#endif // LMMS_HAVE_OSS #endif diff --git a/include/MidiPort.h b/include/MidiPort.h index b057f5d6c..3d3ceffdb 100644 --- a/include/MidiPort.h +++ b/include/MidiPort.h @@ -34,11 +34,21 @@ #include "TimePos.h" #include "AutomatableModel.h" +namespace lmms +{ class MidiClient; class MidiEvent; class MidiEventProcessor; + +namespace gui +{ + class MidiPortMenu; +class ControllerConnectionDialog; +class InstrumentMidiIOView; + +} // class for abstraction of MIDI-port @@ -129,8 +139,8 @@ public: void invalidateCilent(); - MidiPortMenu* m_readablePortsMenu; - MidiPortMenu* m_writablePortsMenu; + gui::MidiPortMenu* m_readablePortsMenu; + gui::MidiPortMenu* m_writablePortsMenu; public slots: @@ -165,8 +175,8 @@ private: Map m_writablePorts; - friend class ControllerConnectionDialog; - friend class InstrumentMidiIOView; + friend class gui::ControllerConnectionDialog; + friend class gui::InstrumentMidiIOView; signals: @@ -179,5 +189,6 @@ signals: typedef QList MidiPortList; +} // namespace lmms #endif diff --git a/include/MidiPortMenu.h b/include/MidiPortMenu.h index ce39c4aac..7f7689edc 100644 --- a/include/MidiPortMenu.h +++ b/include/MidiPortMenu.h @@ -33,6 +33,8 @@ class QAction; +namespace lmms::gui +{ class MidiPortMenu : public QMenu, public ModelView { @@ -57,5 +59,6 @@ private: } ; +} // namespace lmms::gui #endif diff --git a/include/MidiSetupWidget.h b/include/MidiSetupWidget.h index fcaa29408..4021db142 100644 --- a/include/MidiSetupWidget.h +++ b/include/MidiSetupWidget.h @@ -30,6 +30,10 @@ class QLineEdit; +namespace lmms::gui +{ + + class MidiSetupWidget : public TabWidget { Q_OBJECT @@ -53,4 +57,7 @@ private: }; + +} // namespace lmms::gui + #endif diff --git a/include/MidiSndio.h b/include/MidiSndio.h index 2042a16ad..07c42186d 100644 --- a/include/MidiSndio.h +++ b/include/MidiSndio.h @@ -32,10 +32,15 @@ #include - #include "MidiClient.h" +struct mio_hdl; + +namespace lmms +{ + + class MidiSndio : public QThread, public MidiClientRaw { Q_OBJECT @@ -61,10 +66,13 @@ protected: void run(void) override; private: - struct mio_hdl *m_hdl; + mio_hdl *m_hdl; volatile bool m_quit; } ; + +} // namespace lmms + #endif /* LMMS_HAVE_SNDIO */ #endif /* _MIDI_SNDIO_H */ diff --git a/include/MidiWinMM.h b/include/MidiWinMM.h index cbb139983..7cc7f0f77 100644 --- a/include/MidiWinMM.h +++ b/include/MidiWinMM.h @@ -38,6 +38,10 @@ class QLineEdit; +namespace lmms +{ + + class MidiWinMM : public QObject, public MidiClient { Q_OBJECT @@ -141,7 +145,10 @@ signals: } ; -#endif + +} // namespace lmms + +#endif // LMMS_BUILD_WIN32 #endif diff --git a/include/MixHelpers.h b/include/MixHelpers.h index 872319f82..6599b40ec 100644 --- a/include/MixHelpers.h +++ b/include/MixHelpers.h @@ -27,6 +27,9 @@ #include "lmms_basics.h" +namespace lmms +{ + class ValueBuffer; namespace MixHelpers { @@ -73,7 +76,10 @@ void multiplyAndAddMultiplied( sampleFrame* dst, const sampleFrame* src, float c /*! \brief Multiply dst by coeffDst and add samples from srcLeft/srcRight multiplied by coeffSrc */ void multiplyAndAddMultipliedJoined( sampleFrame* dst, const sample_t* srcLeft, const sample_t* srcRight, float coeffDst, float coeffSrc, int frames ); -} +} // namespace MixHelpers + + +} // namespace lmms #endif diff --git a/include/Mixer.h b/include/Mixer.h index 7a6e3d0ff..36aa9f5d0 100644 --- a/include/Mixer.h +++ b/include/Mixer.h @@ -34,6 +34,10 @@ #include +namespace lmms +{ + + class MixerRoute; typedef QVector MixerRouteVector; @@ -220,4 +224,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/MixerLine.h b/include/MixerLine.h index 4f7f7242f..12ac3df75 100644 --- a/include/MixerLine.h +++ b/include/MixerLine.h @@ -23,16 +23,18 @@ * */ -#ifndef MIXER_LINE_H -#define MIXER_LINE_H +#ifndef MIXERLINE_H +#define MIXERLINE_H #include - - - class QGraphicsView; class QLineEdit; + +namespace lmms::gui +{ + + class Knob; class LcdWidget; class MixerView; @@ -113,4 +115,6 @@ private slots: }; +} // namespace lmms::gui + #endif // MIXERLINE_H diff --git a/include/MixerLineLcdSpinBox.h b/include/MixerLineLcdSpinBox.h index 6de8fcb47..7e739093d 100644 --- a/include/MixerLineLcdSpinBox.h +++ b/include/MixerLineLcdSpinBox.h @@ -27,6 +27,10 @@ #include "LcdSpinBox.h" +namespace lmms::gui +{ + + class TrackView; @@ -49,4 +53,7 @@ private: TrackView * m_tv; }; + +} // namespace lmms::gui + #endif diff --git a/include/MixerView.h b/include/MixerView.h index 6c586a607..5e63194c9 100644 --- a/include/MixerView.h +++ b/include/MixerView.h @@ -38,6 +38,11 @@ #include "EffectRackView.h" class QButtonGroup; + + +namespace lmms::gui +{ + class MixerLine; class LMMS_EXPORT MixerView : public QWidget, public ModelView, @@ -131,4 +136,7 @@ private: friend class MixerChannelView; } ; + +} // namespace lmms::gui + #endif diff --git a/include/Model.h b/include/Model.h index 623d3a9f9..1c96de21c 100644 --- a/include/Model.h +++ b/include/Model.h @@ -30,6 +30,8 @@ #include "lmms_export.h" +namespace lmms +{ class LMMS_EXPORT Model : public QObject { @@ -88,5 +90,7 @@ signals: } ; +} // namespace lmms + #endif diff --git a/include/ModelView.h b/include/ModelView.h index 7aad9ce7f..a858dc7ec 100644 --- a/include/ModelView.h +++ b/include/ModelView.h @@ -28,6 +28,8 @@ #include #include "Model.h" +namespace lmms::gui +{ class LMMS_EXPORT ModelView { @@ -81,6 +83,7 @@ private: } ; +} // namespace lmms::gui #endif diff --git a/include/ModelVisitor.h b/include/ModelVisitor.h index f9d156e30..cf0740b1c 100644 --- a/include/ModelVisitor.h +++ b/include/ModelVisitor.h @@ -25,6 +25,10 @@ #ifndef MODELVISITOR_H #define MODELVISITOR_H +namespace lmms +{ + + class AutomatableModel; class BoolModel; class IntModel; @@ -61,4 +65,7 @@ public: virtual ~ConstModelVisitor(); }; + +} // namespace lmms + #endif // MODELVISITOR_H diff --git a/include/NStateButton.h b/include/NStateButton.h index 10cb151ae..ff48593a7 100644 --- a/include/NStateButton.h +++ b/include/NStateButton.h @@ -32,6 +32,9 @@ #include "ToolButton.h" +namespace lmms::gui +{ + class NStateButton : public ToolButton { @@ -72,4 +75,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/Note.h b/include/Note.h index 31ba6995e..d6e0b85c2 100644 --- a/include/Note.h +++ b/include/Note.h @@ -33,6 +33,11 @@ #include "SerializingObject.h" #include "TimePos.h" + +namespace lmms +{ + + class DetuningHelper; @@ -247,4 +252,6 @@ private: typedef QVector NoteVector; +} // namespace lmms + #endif diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index 778acd46e..396d00e71 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -35,6 +35,10 @@ #include "MemoryManager.h" class QReadWriteLock; + +namespace lmms +{ + class InstrumentTrack; class NotePlayHandle; @@ -359,4 +363,6 @@ private: }; +} // namespace lmms + #endif diff --git a/include/Oscillator.h b/include/Oscillator.h index da9bea4eb..e9f64008c 100644 --- a/include/Oscillator.h +++ b/include/Oscillator.h @@ -37,6 +37,10 @@ #include "OscillatorConstants.h" #include "SampleBuffer.h" +namespace lmms +{ + + class IntModel; @@ -307,4 +311,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/OscillatorConstants.h b/include/OscillatorConstants.h index dcdad8dc4..47b13a875 100644 --- a/include/OscillatorConstants.h +++ b/include/OscillatorConstants.h @@ -30,8 +30,9 @@ #include "lmms_basics.h" -namespace OscillatorConstants +namespace lmms::OscillatorConstants { + // Limit wavetables to the audible audio spectrum const int MAX_FREQ = 20000; // Minimum size of table to have all audible bands for midi note 1 (i.e. 20 000 Hz / 8.176 Hz) @@ -51,7 +52,8 @@ namespace OscillatorConstants // - wavetable: a table containing one period of a wave, with frequency content optimized for a specific pitch. typedef std::array wavetable_t; typedef std::array waveform_t; -}; +} // namespace lmms::OscillatorConstants + #endif // OSCILLATORCONSTANTS_H diff --git a/include/Oscilloscope.h b/include/Oscilloscope.h index 4072df478..4404fd98b 100644 --- a/include/Oscilloscope.h +++ b/include/Oscilloscope.h @@ -31,6 +31,9 @@ #include "lmms_basics.h" +namespace lmms::gui +{ + class Oscilloscope : public QWidget { @@ -57,7 +60,7 @@ protected: protected slots: - void updateAudioBuffer( const surroundSampleFrame * buffer ); + void updateAudioBuffer( const lmms::surroundSampleFrame * buffer ); private: QColor const & determineLineColor(float level) const; @@ -73,4 +76,7 @@ private: QColor m_clippingColor; } ; + +} // namespace lmms::gui + #endif // OSCILLOSCOPE_H diff --git a/include/OutputSettings.h b/include/OutputSettings.h index 4a375d244..03e3333ac 100644 --- a/include/OutputSettings.h +++ b/include/OutputSettings.h @@ -28,6 +28,11 @@ #include "lmms_basics.h" + +namespace lmms +{ + + class OutputSettings { public: @@ -112,4 +117,7 @@ private: double m_compressionLevel; }; + +} // namespace lmms + #endif diff --git a/include/PathUtil.h b/include/PathUtil.h index b1eec517e..8b1ef1097 100644 --- a/include/PathUtil.h +++ b/include/PathUtil.h @@ -1,3 +1,27 @@ +/* + * PathUtil.h + * + * Copyright (c) 2019-2022 Spekular + * + * This file is part of LMMS - https://lmms.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + #ifndef PATHUTIL_H #define PATHUTIL_H @@ -5,7 +29,7 @@ #include -namespace PathUtil +namespace lmms::PathUtil { enum class Base { Absolute, ProjectDir, FactorySample, UserSample, UserVST, Preset, UserLADSPA, DefaultLADSPA, UserSoundfont, DefaultSoundfont, UserGIG, DefaultGIG, @@ -44,6 +68,6 @@ namespace PathUtil //! Defaults to an absolute path if all bases fail. QString LMMS_EXPORT toShortestRelative(const QString & input, bool allowLocal = false); -} +} // namespace lmms::PathUtil #endif diff --git a/include/PatternClip.h b/include/PatternClip.h index a6543267b..a1beb00f5 100644 --- a/include/PatternClip.h +++ b/include/PatternClip.h @@ -28,6 +28,9 @@ #include "Clip.h" +namespace lmms +{ + /*! \brief Dummy clip for PatternTracks * * Only used in the Song (Editor). See PatternStore.h for more info. @@ -47,12 +50,13 @@ public: int patternIndex(); - ClipView * createView( TrackView * _tv ) override; + gui::ClipView * createView( gui::TrackView * _tv ) override; private: friend class PatternClipView; } ; +} // namespace lmms #endif diff --git a/include/PatternClipView.h b/include/PatternClipView.h index 9cda17688..d66de70f0 100644 --- a/include/PatternClipView.h +++ b/include/PatternClipView.h @@ -31,8 +31,13 @@ #include "ClipView.h" +namespace lmms +{ + class PatternClip; +namespace gui +{ class PatternClipView : public ClipView { @@ -65,5 +70,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/include/PatternEditor.h b/include/PatternEditor.h index 03861c1b0..15b141580 100644 --- a/include/PatternEditor.h +++ b/include/PatternEditor.h @@ -30,8 +30,14 @@ #include "Editor.h" #include "TrackContainerView.h" +namespace lmms +{ class PatternStore; + +namespace gui +{ + class ComboBox; @@ -69,11 +75,9 @@ private: }; - - class PatternEditorWindow : public Editor { - Q_OBJECT +Q_OBJECT public: PatternEditorWindow(PatternStore* ps); ~PatternEditorWindow(); @@ -90,4 +94,9 @@ private: ComboBox* m_patternComboBox; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/PatternStore.h b/include/PatternStore.h index e11328c16..39b65d1c1 100644 --- a/include/PatternStore.h +++ b/include/PatternStore.h @@ -29,6 +29,13 @@ #include "TrackContainer.h" #include "ComboBoxModel.h" +namespace lmms +{ + +namespace gui +{ + class PatternEditorWindow; +} /* * PatternStore is the backend of Pattern Editor: @@ -100,9 +107,11 @@ private: // Where the pattern selection combo box is - friend class PatternEditorWindow; + friend class gui::PatternEditorWindow; } ; +} // namespace lmms + #endif diff --git a/include/PatternTrack.h b/include/PatternTrack.h index c594b4cf5..a8e7a505c 100644 --- a/include/PatternTrack.h +++ b/include/PatternTrack.h @@ -31,9 +31,19 @@ #include "Track.h" -class TrackLabelButton; +namespace lmms +{ + class TrackContainer; +namespace gui +{ + +class TrackLabelButton; +class PatternTrackView; + +} // namespace gui + /*! Track type used in the Song (Editor) to reference a pattern in the PatternStore */ class LMMS_EXPORT PatternTrack : public Track @@ -44,8 +54,9 @@ public: virtual ~PatternTrack(); virtual bool play( const TimePos & _start, const fpp_t _frames, + const f_cnt_t _frame_base, int _clip_num = -1 ) override; - TrackView * createView( TrackContainerView* tcv ) override; + gui::TrackView * createView( gui::TrackContainerView* tcv ) override; Clip* createClip(const TimePos & pos) override; virtual void saveTrackSpecificSettings( QDomDocument & _doc, @@ -86,9 +97,11 @@ private: typedef QMap infoMap; static infoMap s_infoMap; - friend class PatternTrackView; + friend class gui::PatternTrackView; } ; +} // namespace lmms + #endif diff --git a/include/PatternTrackView.h b/include/PatternTrackView.h index ecc209f04..41f8fac33 100644 --- a/include/PatternTrackView.h +++ b/include/PatternTrackView.h @@ -29,7 +29,14 @@ #include "TrackView.h" +namespace lmms +{ + class PatternTrack; + +namespace gui +{ + class TrackLabelButton; @@ -59,4 +66,8 @@ private: +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/PeakController.h b/include/PeakController.h index 341d4f47a..d50c0b06f 100644 --- a/include/PeakController.h +++ b/include/PeakController.h @@ -30,6 +30,10 @@ class QWidget; +namespace lmms +{ + + class PeakControllerEffect; typedef QVector PeakControllerEffectVector; @@ -56,7 +60,7 @@ public: public slots: - ControllerDialog * createDialog( QWidget * _parent ) override; + gui::ControllerDialog * createDialog( QWidget * _parent ) override; void handleDestroyedEffect( ); void updateCoeffs(); @@ -80,7 +84,8 @@ private: bool m_coeffNeedsUpdate; } ; - +namespace gui +{ class PeakControllerDialog : public ControllerDialog { @@ -96,6 +101,11 @@ protected: PeakController * m_peakController; -} ; +}; + + +} // namespace gui + +} // namespace lmms #endif diff --git a/include/PerfLog.h b/include/PerfLog.h index 5d1efc14c..b8cc35f45 100644 --- a/include/PerfLog.h +++ b/include/PerfLog.h @@ -28,6 +28,10 @@ #include #include +namespace lmms +{ + + /// \brief CPU time point /// /// Represents a point in CPU time (not wall-clock time) intended for measuring @@ -70,4 +74,7 @@ class PerfLogTimer PerfTime begin_time; }; + +} // namespace lmms + #endif diff --git a/include/Piano.h b/include/Piano.h index ece3abb06..b9f5e9797 100644 --- a/include/Piano.h +++ b/include/Piano.h @@ -28,6 +28,10 @@ #include "Note.h" #include "Model.h" +namespace lmms +{ + + class InstrumentTrack; class MidiEventProcessor; @@ -82,5 +86,8 @@ private: } ; + +} // namespace lmms + #endif diff --git a/include/PianoRoll.h b/include/PianoRoll.h index f00e8a79c..73a2e5b76 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -47,13 +47,23 @@ class QString; class QMenu; class QToolButton; -class ComboBox; +namespace lmms +{ + + class NotePlayHandle; class MidiClip; + + +namespace gui +{ + +class ComboBox; class PositionLine; class TextFloat; class TimeLineWidget; + class PianoRoll : public QWidget { Q_OBJECT @@ -186,8 +196,8 @@ protected slots: bool toggleStepRecording(); void stop(); - void startRecordNote( const Note & n ); - void finishRecordNote( const Note & n ); + void startRecordNote( const lmms::Note & n ); + void finishRecordNote( const lmms::Note & n ); void horScrolled( int new_pos ); void verScrolled( int new_pos ); @@ -199,23 +209,23 @@ protected slots: void pasteNotes(); bool deleteSelectedNotes(); - void updatePosition(const TimePos & t ); - void updatePositionAccompany(const TimePos & t ); - void updatePositionStepRecording(const TimePos & t ); + void updatePosition(const lmms::TimePos & t ); + void updatePositionAccompany(const lmms::TimePos & t ); + void updatePositionStepRecording(const lmms::TimePos & t ); void zoomingChanged(); void zoomingYChanged(); void quantizeChanged(); void noteLengthChanged(); void keyChanged(); - void quantizeNotes(QuantizeActions mode = QuantizeBoth); + void quantizeNotes(lmms::gui::PianoRoll::QuantizeActions mode = QuantizeBoth); void updateSemiToneMarkerMenu(); void changeNoteEditMode( int i ); void markSemiTone(int i, bool fromMenu = true); - void hideMidiClip( MidiClip* clip ); + void hideMidiClip( lmms::MidiClip* clip ); void selectRegionFromPixels( int xStart, int xEnd ); @@ -484,7 +494,7 @@ private: QBrush m_blackKeyDisabledBackground; signals: - void positionChanged( const TimePos & ); + void positionChanged( const lmms::TimePos & ); } ; @@ -559,4 +569,8 @@ private: }; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/PianoView.h b/include/PianoView.h index 888549431..7a6ab6479 100644 --- a/include/PianoView.h +++ b/include/PianoView.h @@ -31,8 +31,13 @@ #include "AutomatableModel.h" #include "ModelView.h" +namespace lmms +{ + class Piano; +namespace gui +{ class PianoView : public QWidget, public ModelView { @@ -94,4 +99,8 @@ signals: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/Pitch.h b/include/Pitch.h index 17de48b94..3f58785ea 100644 --- a/include/Pitch.h +++ b/include/Pitch.h @@ -27,6 +27,10 @@ #include +namespace lmms +{ + + typedef int16_t pitch_t; constexpr pitch_t CentsPerSemitone = 100; @@ -34,4 +38,7 @@ constexpr pitch_t MinPitchDefault = -CentsPerSemitone; constexpr pitch_t MaxPitchDefault = CentsPerSemitone; constexpr pitch_t DefaultPitch = 0; + +} // namespace lmms + #endif diff --git a/include/PixmapButton.h b/include/PixmapButton.h index e2fb58885..f4062826d 100644 --- a/include/PixmapButton.h +++ b/include/PixmapButton.h @@ -30,6 +30,9 @@ #include "AutomatableButton.h" +namespace lmms::gui +{ + class LMMS_EXPORT PixmapButton : public AutomatableButton { @@ -62,4 +65,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/PlayHandle.h b/include/PlayHandle.h index 6de358acd..53457f916 100644 --- a/include/PlayHandle.h +++ b/include/PlayHandle.h @@ -36,6 +36,9 @@ class QThread; +namespace lmms +{ + class Track; class AudioPort; @@ -162,5 +165,6 @@ private: typedef QList PlayHandleList; typedef QList ConstPlayHandleList; +} // namespace lmms #endif diff --git a/include/Plugin.h b/include/Plugin.h index fb9ebd567..b50d81116 100644 --- a/include/Plugin.h +++ b/include/Plugin.h @@ -35,9 +35,18 @@ class QWidget; -class PixmapLoader; -class PluginView; +namespace lmms +{ + class AutomatableModel; +class PixmapLoader; + +namespace gui +{ + +class PluginView; + +} /** Abstract representation of a plugin @@ -286,11 +295,11 @@ public: static Plugin * instantiate(const QString& pluginName, Model * parent, void *data); //! Create a view for the model - PluginView * createView( QWidget * parent ); + gui::PluginView * createView( QWidget * parent ); protected: //! Create a view for the model - virtual PluginView* instantiateView( QWidget * ) = 0; + virtual gui::PluginView* instantiateView( QWidget * ) = 0; void collectErrorForUI( QString errMsg ); @@ -305,4 +314,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/PluginBrowser.h b/include/PluginBrowser.h index 9c74ed643..0b2a59d15 100644 --- a/include/PluginBrowser.h +++ b/include/PluginBrowser.h @@ -33,6 +33,8 @@ class QLineEdit; class QTreeWidget; +namespace lmms::gui +{ class PluginBrowser : public SideBarWidget { @@ -81,4 +83,6 @@ private: }; +} // namespace lmms::gui + #endif diff --git a/include/PluginFactory.h b/include/PluginFactory.h index 80627f351..c0e2ff8e0 100644 --- a/include/PluginFactory.h +++ b/include/PluginFactory.h @@ -38,6 +38,9 @@ class QLibrary; +namespace lmms +{ + class LMMS_EXPORT PluginFactory { public: @@ -105,4 +108,7 @@ private: //Short-hand function LMMS_EXPORT PluginFactory* getPluginFactory(); + +} // namespace lmms + #endif // PLUGINFACTORY_H diff --git a/include/PluginIssue.h b/include/PluginIssue.h index 8bfad5bf1..f0fa275f3 100644 --- a/include/PluginIssue.h +++ b/include/PluginIssue.h @@ -28,6 +28,10 @@ #include #include + +namespace lmms +{ + //! Types of issues that can cause LMMS to not load a plugin //! LMMS Plugins should use this to indicate errors enum PluginIssueType @@ -79,4 +83,7 @@ public: QDebug operator<<(QDebug stream, const PluginIssue& iss); +} // namespace lmms + + #endif // PLUGINISSUE_H diff --git a/include/PluginView.h b/include/PluginView.h index 476d65acf..2c06b9ba2 100644 --- a/include/PluginView.h +++ b/include/PluginView.h @@ -30,6 +30,8 @@ #include "Plugin.h" #include "ModelView.h" +namespace lmms::gui +{ class LMMS_EXPORT PluginView : public QWidget, public ModelView { @@ -43,4 +45,6 @@ public: } ; +} // namespace lmms::gui + #endif diff --git a/include/PositionLine.h b/include/PositionLine.h index e9ec8c3d5..cc1313e57 100644 --- a/include/PositionLine.h +++ b/include/PositionLine.h @@ -28,6 +28,9 @@ #include +namespace lmms::gui +{ + class PositionLine : public QWidget { Q_OBJECT @@ -46,4 +49,6 @@ private: QColor m_lineColor; }; +} // namespace lmms::gui + #endif diff --git a/include/PresetPreviewPlayHandle.h b/include/PresetPreviewPlayHandle.h index fcdecf6b8..9dd151330 100644 --- a/include/PresetPreviewPlayHandle.h +++ b/include/PresetPreviewPlayHandle.h @@ -28,6 +28,9 @@ #include "NotePlayHandle.h" +namespace lmms +{ + class DataFile; class InstrumentTrack; @@ -64,4 +67,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/ProjectJournal.h b/include/ProjectJournal.h index f8b9e642b..69e0752cb 100644 --- a/include/ProjectJournal.h +++ b/include/ProjectJournal.h @@ -31,6 +31,11 @@ #include "lmms_basics.h" #include "DataFile.h" + +namespace lmms +{ + + class JournallingObject; @@ -119,5 +124,7 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/ProjectNotes.h b/include/ProjectNotes.h index 03add4b04..fda5c9b51 100644 --- a/include/ProjectNotes.h +++ b/include/ProjectNotes.h @@ -35,6 +35,9 @@ class QComboBox; class QTextCharFormat; class QTextEdit; +namespace lmms::gui +{ + class LMMS_EXPORT ProjectNotes : public QMainWindow, public SerializingObject { @@ -89,4 +92,6 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/ProjectRenderer.h b/include/ProjectRenderer.h index ce5d6af3c..bd61c4730 100644 --- a/include/ProjectRenderer.h +++ b/include/ProjectRenderer.h @@ -32,6 +32,10 @@ #include "lmms_export.h" +namespace lmms +{ + + class LMMS_EXPORT ProjectRenderer : public QThread { Q_OBJECT @@ -96,4 +100,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/include/ProjectVersion.h b/include/ProjectVersion.h index d72704ba3..5be259c97 100644 --- a/include/ProjectVersion.h +++ b/include/ProjectVersion.h @@ -32,6 +32,10 @@ #include +namespace lmms +{ + + /*! \brief Version number parsing and comparison * * Parses and compares version information. i.e. "1.0.3" < "1.0.10" @@ -75,4 +79,7 @@ inline bool operator>=(const ProjectVersion & v1, const ProjectVersion & v2) { r inline bool operator==(const ProjectVersion & v1, const ProjectVersion & v2) { return ProjectVersion::compare(v1, v2) == 0; } inline bool operator!=(const ProjectVersion & v1, const ProjectVersion & v2) { return ProjectVersion::compare(v1, v2) != 0; } + +} // namespace lmms + #endif diff --git a/include/QuadratureLfo.h b/include/QuadratureLfo.h index b530937b0..42d4d32c0 100644 --- a/include/QuadratureLfo.h +++ b/include/QuadratureLfo.h @@ -27,6 +27,10 @@ #include "lmms_math.h" +namespace lmms +{ + + class QuadratureLfo { public: @@ -93,4 +97,7 @@ private: }; + +} // namespace lmms + #endif // QUADRATURELFO_H diff --git a/include/RaiiHelpers.h b/include/RaiiHelpers.h index bebd91ff9..0cfa2c4ac 100644 --- a/include/RaiiHelpers.h +++ b/include/RaiiHelpers.h @@ -27,6 +27,10 @@ #include #include + +namespace lmms +{ + template class NullableResource { @@ -57,4 +61,6 @@ struct NullableResourceDeleter template using UniqueNullableResource = std::unique_ptr>; +} // namespace lmms + #endif // RAII_HELPERS_H diff --git a/include/RecentProjectsMenu.h b/include/RecentProjectsMenu.h index b3837ee2e..ac3638298 100644 --- a/include/RecentProjectsMenu.h +++ b/include/RecentProjectsMenu.h @@ -1,8 +1,36 @@ +/* + * RecentProjectsMenu.h + * + * Copyright (c) 2004-2022 Tobias Doerffel + * + * This file is part of LMMS - https://lmms.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + #ifndef RECENTPROJECTSMENU_H #define RECENTPROJECTSMENU_H #include +namespace lmms::gui +{ + + class RecentProjectsMenu : public QMenu { Q_OBJECT @@ -14,4 +42,7 @@ private slots: void openProject(QAction * _action ); }; + +} // namespace lmms::gui + #endif // RECENTPROJECTSMENU_H diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index 615cce2c8..ec08896e2 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -28,6 +28,10 @@ #include "RemotePluginBase.h" #include "SharedMemory.h" +namespace lmms +{ + + class RemotePlugin; class ProcessWatcher : public QThread @@ -70,7 +74,7 @@ public: return true; #else return m_process.state() != QProcess::NotRunning; -#endif +#endif // DEBUG_REMOTE_PLUGIN } bool init( const QString &pluginExecutable, bool waitForInitDoneMsg, QStringList extraArgs = {} ); @@ -166,7 +170,7 @@ private: #ifndef SYNC_WITH_SHM_FIFO int m_server; QString m_socketFile; -#endif +#endif // not SYNC_WITH_SHM_FIFO friend class ProcessWatcher; @@ -176,9 +180,13 @@ private slots: void processErrored(QProcess::ProcessError err ); } ; + LMMS_EXPORT inline std::string QSTR_TO_STDSTR(QString const& qstr) { return qstr.toStdString(); } + +} // namespace lmms + #endif // REMOTE_PLUGIN_H diff --git a/include/RemotePluginBase.h b/include/RemotePluginBase.h index a5646ad11..4d5627a92 100644 --- a/include/RemotePluginBase.h +++ b/include/RemotePluginBase.h @@ -47,11 +47,11 @@ #include #include #include -#else +#else // !(LMMS_HAVE_SYS_IPC_H && LMMS_HAVE_SEMAPHORE_H) #ifdef LMMS_HAVE_UNISTD_H #include #endif -#endif +#endif // !(LMMS_HAVE_SYS_IPC_H && LMMS_HAVE_SEMAPHORE_H) #ifdef LMMS_HAVE_LOCALE_H #include @@ -69,9 +69,9 @@ #ifndef SYNC_WITH_SHM_FIFO #include #include -#endif +#endif // SYNC_WITH_SHM_FIFO -#else +#else // BUILD_REMOTE_PLUGIN_CLIENT #include "lmms_export.h" #include #include @@ -81,13 +81,20 @@ #ifndef SYNC_WITH_SHM_FIFO #include #include +#endif // SYNC_WITH_SHM_FIFO + +#endif // BUILD_REMOTE_PLUGIN_CLIENT + +#ifdef SYNC_WITH_SHM_FIFO +#include "SharedMemory.h" #endif -#endif +namespace lmms +{ + #ifdef SYNC_WITH_SHM_FIFO -#include "SharedMemory.h" // sometimes we need to exchange bigger messages (e.g. for VST parameter dumps) // so set a usable value here @@ -669,4 +676,6 @@ private: } ; +} // namespace lmms + #endif // REMOTE_PLUGIN_BASE_H diff --git a/include/RemotePluginClient.h b/include/RemotePluginClient.h index 94f05af0f..69a9d41e9 100644 --- a/include/RemotePluginClient.h +++ b/include/RemotePluginClient.h @@ -40,6 +40,9 @@ #include "SharedMemory.h" +namespace lmms +{ + class RemotePluginClient : public RemotePluginBase { public: @@ -355,4 +358,6 @@ void RemotePluginClient::doProcessing() } +} // namespace lmms + #endif // REMOTE_PLUGIN_CLIENT_H diff --git a/include/RenameDialog.h b/include/RenameDialog.h index 8f526badd..c1e30b9d8 100644 --- a/include/RenameDialog.h +++ b/include/RenameDialog.h @@ -32,6 +32,8 @@ class QLineEdit; +namespace lmms::gui +{ class RenameDialog : public QDialog { @@ -58,4 +60,6 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/RenderManager.h b/include/RenderManager.h index 935983702..ff59cb953 100644 --- a/include/RenderManager.h +++ b/include/RenderManager.h @@ -32,6 +32,10 @@ #include "OutputSettings.h" +namespace lmms +{ + + class RenderManager : public QObject { Q_OBJECT @@ -78,4 +82,7 @@ private: QVector m_unmuted; } ; + +} // namespace lmms + #endif diff --git a/include/RingBuffer.h b/include/RingBuffer.h index 46539c0ea..efb5afd39 100644 --- a/include/RingBuffer.h +++ b/include/RingBuffer.h @@ -32,6 +32,11 @@ #include "lmms_basics.h" #include "MemoryManager.h" + +namespace lmms +{ + + /** \brief A basic LMMS ring buffer for single-thread use. For thread and realtime safe alternative see LocklessRingBuffer. */ class LMMS_EXPORT RingBuffer : public QObject @@ -216,4 +221,8 @@ private: volatile unsigned int m_position; }; + + +} // namespace lmms + #endif diff --git a/include/RmsHelper.h b/include/RmsHelper.h index f5f2770fa..19b7da89c 100644 --- a/include/RmsHelper.h +++ b/include/RmsHelper.h @@ -28,6 +28,11 @@ #include "lmms_math.h" + +namespace lmms +{ + + class RmsHelper { public: @@ -91,4 +96,6 @@ private: }; +} // namespace lmms + #endif diff --git a/include/RowTableView.h b/include/RowTableView.h index a7b07c2c8..fc55383a1 100644 --- a/include/RowTableView.h +++ b/include/RowTableView.h @@ -27,6 +27,9 @@ #include +namespace lmms::gui +{ + class RowDelegate; @@ -51,5 +54,6 @@ private: } ; +} // namespace lmms::gui #endif diff --git a/include/Rubberband.h b/include/Rubberband.h index 21e699d85..1332a932d 100644 --- a/include/Rubberband.h +++ b/include/Rubberband.h @@ -30,6 +30,9 @@ #include #include +namespace lmms::gui +{ + class selectableObject : public QWidget { @@ -91,5 +94,7 @@ private: }; +} // namespace lmms::gui + #endif diff --git a/include/SampleBuffer.h b/include/SampleBuffer.h index 991d9d140..b556fccbe 100644 --- a/include/SampleBuffer.h +++ b/include/SampleBuffer.h @@ -44,6 +44,9 @@ class QPainter; class QRect; +namespace lmms +{ + // values for buffer margins, used for various libsamplerate interpolation modes // the array positions correspond to the converter_type parameter values in libsamplerate // if there appears problems with playback on some interpolation mode, then the value for that mode @@ -281,8 +284,8 @@ public: public slots: void setAudioFile(const QString & audioFile); void loadFromBase64(const QString & data); - void setStartFrame(const f_cnt_t s); - void setEndFrame(const f_cnt_t e); + void setStartFrame(const lmms::f_cnt_t s); + void setEndFrame(const lmms::f_cnt_t e); void setAmplification(float a); void setReversed(bool on); void sampleRateChanged(); @@ -351,5 +354,6 @@ signals: } ; +} // namespace lmms #endif diff --git a/include/SampleClip.h b/include/SampleClip.h index 7c4f9cf60..52a2d6209 100644 --- a/include/SampleClip.h +++ b/include/SampleClip.h @@ -27,8 +27,18 @@ #include "Clip.h" +namespace lmms +{ + class SampleBuffer; +namespace gui +{ + +class SampleClipView; + +} // namespace gui + class SampleClip : public Clip { @@ -59,14 +69,14 @@ public: TimePos sampleLength() const; void setSampleStartFrame( f_cnt_t startFrame ); void setSamplePlayLength( f_cnt_t length ); - ClipView * createView( TrackView * _tv ) override; + gui::ClipView * createView( gui::TrackView * _tv ) override; bool isPlaying() const; void setIsPlaying(bool isPlaying); public slots: - void setSampleBuffer( SampleBuffer* sb ); + void setSampleBuffer( lmms::SampleBuffer* sb ); void setSampleFile( const QString & _sf ); void updateLength(); void toggleRecord(); @@ -79,7 +89,7 @@ private: BoolModel m_recordModel; bool m_isPlaying; - friend class SampleClipView; + friend class gui::SampleClipView; signals: @@ -88,5 +98,6 @@ signals: } ; +} // namespace lmms #endif diff --git a/include/SampleClipView.h b/include/SampleClipView.h index c18e6ab5a..d5218e28a 100644 --- a/include/SampleClipView.h +++ b/include/SampleClipView.h @@ -27,8 +27,17 @@ #include "ClipView.h" + + +namespace lmms +{ + class SampleClip; +namespace gui +{ + + class SampleClipView : public ClipView { Q_OBJECT @@ -60,5 +69,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/include/SamplePlayHandle.h b/include/SamplePlayHandle.h index 04360a26e..d27591df3 100644 --- a/include/SamplePlayHandle.h +++ b/include/SamplePlayHandle.h @@ -30,6 +30,10 @@ #include "AutomatableModel.h" #include "PlayHandle.h" +namespace lmms +{ + + class PatternTrack; class SampleClip; class Track; @@ -94,4 +98,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/SampleRecordHandle.h b/include/SampleRecordHandle.h index f5ebb2201..724f4216d 100644 --- a/include/SampleRecordHandle.h +++ b/include/SampleRecordHandle.h @@ -32,6 +32,10 @@ #include "PlayHandle.h" #include "TimePos.h" +namespace lmms +{ + + class PatternTrack; class SampleBuffer; class SampleClip; @@ -69,4 +73,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/SampleTrack.h b/include/SampleTrack.h index 5ca5741b8..677e04889 100644 --- a/include/SampleTrack.h +++ b/include/SampleTrack.h @@ -30,6 +30,18 @@ #include "Track.h" +namespace lmms +{ + +namespace gui +{ + +class SampleTrackView; +class SampleTrackWindow; + +} // namespace gui + + class SampleTrack : public Track { Q_OBJECT @@ -39,7 +51,7 @@ public: virtual bool play( const TimePos & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _clip_num = -1 ) override; - TrackView * createView( TrackContainerView* tcv ) override; + gui::TrackView * createView( gui::TrackContainerView* tcv ) override; Clip* createClip(const TimePos & pos) override; @@ -90,11 +102,12 @@ private: - friend class SampleTrackView; - friend class SampleTrackWindow; + friend class gui::SampleTrackView; + friend class gui::SampleTrackWindow; } ; +} // namespace lmms #endif \ No newline at end of file diff --git a/include/SampleTrackView.h b/include/SampleTrackView.h index 7d3e550c2..1223f999d 100644 --- a/include/SampleTrackView.h +++ b/include/SampleTrackView.h @@ -28,8 +28,16 @@ #include "TrackView.h" -class Knob; +namespace lmms +{ + class SampleTrack; + + +namespace gui +{ + +class Knob; class SampleTrackWindow; class TrackLabelButton; @@ -97,5 +105,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif \ No newline at end of file diff --git a/include/SampleTrackWindow.h b/include/SampleTrackWindow.h index 85c175564..dd670fd09 100644 --- a/include/SampleTrackWindow.h +++ b/include/SampleTrackWindow.h @@ -34,10 +34,14 @@ #include "SampleTrack.h" #include "SerializingObject.h" +class QLineEdit; + +namespace lmms::gui +{ + class EffectRackView; class Knob; class MixerLineLcdSpinBox; -class QLineEdit; class SampleTrackView; @@ -96,4 +100,7 @@ private: +} // namespace lmms::gui + + #endif diff --git a/include/Scale.h b/include/Scale.h index a9321fe40..3a92dd689 100644 --- a/include/Scale.h +++ b/include/Scale.h @@ -32,6 +32,9 @@ #include "SerializingObject.h" +namespace lmms +{ + class Interval : public SerializingObject { public: @@ -83,4 +86,7 @@ private: }; + +} // namespace lmms + #endif diff --git a/include/SendButtonIndicator.h b/include/SendButtonIndicator.h index 33d8cac64..ec4a90db3 100644 --- a/include/SendButtonIndicator.h +++ b/include/SendButtonIndicator.h @@ -1,13 +1,44 @@ +/* + * SendButtonIndicator.h + * + * Copyright (c) 2014-2022 Tobias Doerffel + * + * This file is part of LMMS - https://lmms.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ #ifndef SENDBUTTONINDICATOR_H #define SENDBUTTONINDICATOR_H #include +namespace lmms +{ + class FloatModel; + +namespace gui +{ + class MixerLine; class MixerView; + class SendButtonIndicator : public QLabel { public: @@ -27,4 +58,9 @@ private: FloatModel * getSendModel(); }; + +} // namespace gui + +} // namespace lmms + #endif // SENDBUTTONINDICATOR_H diff --git a/include/SerializingObject.h b/include/SerializingObject.h index aba8c7b0f..e32d5d046 100644 --- a/include/SerializingObject.h +++ b/include/SerializingObject.h @@ -33,6 +33,9 @@ class QDomDocument; class QDomElement; +namespace lmms +{ + class SerializingObjectHook; @@ -96,5 +99,7 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/SetupDialog.h b/include/SetupDialog.h index d0878e462..28668d8e9 100644 --- a/include/SetupDialog.h +++ b/include/SetupDialog.h @@ -42,6 +42,11 @@ class QLabel; class QLineEdit; class QSlider; + +namespace lmms::gui +{ + + class TabBar; class SetupDialog : public QDialog @@ -208,4 +213,8 @@ private: QLabel * restartWarningLbl; }; + + +} // namespace lmms::gui + #endif diff --git a/include/SharedMemory.h b/include/SharedMemory.h index bc649110b..32a40ff25 100644 --- a/include/SharedMemory.h +++ b/include/SharedMemory.h @@ -28,7 +28,12 @@ #include #include -namespace detail { + +namespace lmms +{ + +namespace detail +{ class SharedMemoryImpl; @@ -67,6 +72,7 @@ private: } // namespace detail + template class SharedMemory { @@ -140,4 +146,6 @@ private: detail::SharedMemoryData m_data; }; +} // namespace lmms + #endif // SHARED_MEMORY_H diff --git a/include/SideBar.h b/include/SideBar.h index 7ed52efc3..70bac6385 100644 --- a/include/SideBar.h +++ b/include/SideBar.h @@ -30,6 +30,10 @@ #include class QToolButton; + +namespace lmms::gui +{ + class SideBarWidget; @@ -54,4 +58,6 @@ private: } ; +} // namespace lmms::gui + #endif diff --git a/include/SideBarWidget.h b/include/SideBarWidget.h index 95c6ab9ed..71a33a3ce 100644 --- a/include/SideBarWidget.h +++ b/include/SideBarWidget.h @@ -31,6 +31,9 @@ class QPushButton; +namespace lmms::gui +{ + class SideBarWidget : public QWidget { @@ -84,4 +87,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/Song.h b/include/Song.h index ae8c697b5..cfe63a2ea 100644 --- a/include/Song.h +++ b/include/Song.h @@ -37,12 +37,22 @@ #include "MeterModel.h" #include "VstSyncController.h" +namespace lmms +{ class AutomationTrack; class Keymap; class MidiClip; class Scale; + +namespace gui +{ + class TimeLineWidget; +class SongEditor; +class ControllerRackView; + +} const bpm_t MinTempo = 10; @@ -114,7 +124,7 @@ public: { return m_jumped; } - TimeLineWidget * m_timeLine; + gui::TimeLineWidget * m_timeLine; private: float m_currentFrame; @@ -361,7 +371,7 @@ public slots: void record(); void playAndRecord(); void playPattern(); - void playMidiClip( const MidiClip * midiClipToPlay, bool loop = true ); + void playMidiClip( const lmms::MidiClip * midiClipToPlay, bool loop = true ); void togglePause(); void stop(); @@ -492,20 +502,19 @@ private: AutomatedValueMap m_oldAutomatedValues; - friend class LmmsCore; - friend class SongEditor; - friend class mainWindow; - friend class ControllerRackView; + friend class Engine; + friend class gui::SongEditor; + friend class gui::ControllerRackView; signals: void projectLoaded(); void playbackStateChanged(); void playbackPositionChanged(); void lengthChanged( int bars ); - void tempoChanged( bpm_t newBPM ); + void tempoChanged( lmms::bpm_t newBPM ); void timeSignatureChanged( int oldTicksPerBar, int ticksPerBar ); - void controllerAdded( Controller * ); - void controllerRemoved( Controller * ); + void controllerAdded( lmms::Controller * ); + void controllerRemoved( lmms::Controller * ); void updateSampleTracks(); void stopped(); void modified(); @@ -515,4 +524,6 @@ signals: } ; +} // namespace lmms + #endif diff --git a/include/SongEditor.h b/include/SongEditor.h index db52f7352..29a9be0bf 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -34,14 +34,22 @@ class QLabel; class QScrollBar; +namespace lmms +{ + +class Song; +class ComboBoxModel; + +namespace gui +{ + + class ActionGroup; class AutomatableSlider; class ComboBox; -class ComboBoxModel; class LcdSpinBox; class MeterDialog; class PositionLine; -class Song; class TextFloat; class TimeLineWidget; @@ -74,13 +82,13 @@ public slots: void stopSelectRegion(); void updateRubberband(); - void setEditMode( EditMode mode ); + void setEditMode( lmms::gui::SongEditor::EditMode mode ); void setEditModeDraw(); void setEditModeKnife(); void setEditModeSelect(); void toggleProportionalSnap(); - void updatePosition( const TimePos & t ); + void updatePosition( const lmms::TimePos & t ); void updatePositionLine(); void selectAllClips( bool select ); @@ -215,4 +223,9 @@ private: QAction* m_removeBarAction; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/StepRecorder.h b/include/StepRecorder.h index 864faef4b..b89fadb15 100644 --- a/include/StepRecorder.h +++ b/include/StepRecorder.h @@ -28,18 +28,26 @@ #include "Note.h" -class MidiClip; -class PianoRoll; class QKeyEvent; class QMouseEvent; + +namespace lmms +{ + +class MidiClip; + +namespace gui +{ +class PianoRoll; class StepRecorderWidget; +} // namespace gui class StepRecorder : public QObject { Q_OBJECT public: - StepRecorder(PianoRoll& pianoRoll, StepRecorderWidget& stepRecorderWidget); + StepRecorder(gui::PianoRoll& pianoRoll, gui::StepRecorderWidget& stepRecorderWidget); void initialize(); void start(const TimePos& currentPosition,const TimePos& stepLength); @@ -81,8 +89,8 @@ class StepRecorder : public QObject bool allCurStepNotesReleased(); - PianoRoll& m_pianoRoll; - StepRecorderWidget& m_stepRecorderWidget; + gui::PianoRoll& m_pianoRoll; + gui::StepRecorderWidget& m_stepRecorderWidget; bool m_isRecording = false; TimePos m_curStepStartPos = 0; @@ -141,4 +149,7 @@ class StepRecorder : public QObject bool m_isStepInProgress = false; }; + +} // namespace lmms + #endif //STEP_RECORDER_H diff --git a/include/StepRecorderWidget.h b/include/StepRecorderWidget.h index 512ab5b35..4067b0001 100644 --- a/include/StepRecorderWidget.h +++ b/include/StepRecorderWidget.h @@ -28,6 +28,9 @@ #include "TimePos.h" +namespace lmms::gui +{ + class StepRecorderWidget : public QWidget { Q_OBJECT @@ -87,7 +90,9 @@ private: const int m_marginRight; signals: - void positionChanged(const TimePos & t); + void positionChanged(const lmms::TimePos & t); } ; +} // namespace lmms::gui + #endif //STEP_RECOREDER_WIDGET_H diff --git a/include/StringPairDrag.h b/include/StringPairDrag.h index 969a12eec..9da2381b0 100644 --- a/include/StringPairDrag.h +++ b/include/StringPairDrag.h @@ -35,6 +35,9 @@ class QPixmap; +namespace lmms::gui +{ + class LMMS_EXPORT StringPairDrag : public QDrag { @@ -50,4 +53,6 @@ public: } ; +} // namespace lmms::gui + #endif diff --git a/include/SubWindow.h b/include/SubWindow.h index 113db636a..3c73a9dde 100644 --- a/include/SubWindow.h +++ b/include/SubWindow.h @@ -38,6 +38,10 @@ class QPushButton; class QResizeEvent; class QWidget; +namespace lmms::gui +{ + + /** * @brief The SubWindow class * @@ -96,4 +100,8 @@ private slots: void focusChanged( QMdiSubWindow * subWindow ); }; + + +} // namespace lmms::gui + #endif diff --git a/include/SweepOscillator.h b/include/SweepOscillator.h index 0e54e6cce..2e795be3b 100644 --- a/include/SweepOscillator.h +++ b/include/SweepOscillator.h @@ -28,6 +28,8 @@ #include "Oscillator.h" #include "DspEffectLibrary.h" +namespace lmms +{ template class SweepOscillator @@ -67,4 +69,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/TabBar.h b/include/TabBar.h index 46226618b..9239aef94 100644 --- a/include/TabBar.h +++ b/include/TabBar.h @@ -33,6 +33,10 @@ #include "lmms_export.h" +namespace lmms::gui +{ + + class TabButton; @@ -85,4 +89,6 @@ signals: } ; +} // namespace lmms::gui + #endif diff --git a/include/TabButton.h b/include/TabButton.h index ffb425d71..d5d70fcac 100644 --- a/include/TabButton.h +++ b/include/TabButton.h @@ -28,6 +28,9 @@ #include +namespace lmms::gui +{ + class TabButton : public QPushButton { @@ -63,4 +66,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/TabWidget.h b/include/TabWidget.h index d4a3ec3c9..fdd0123da 100644 --- a/include/TabWidget.h +++ b/include/TabWidget.h @@ -29,6 +29,9 @@ #include #include +namespace lmms::gui +{ + const int TEXT_TAB_HEIGHT = 14; const int GRAPHIC_TAB_HEIGHT = 17; @@ -106,4 +109,7 @@ private: QColor m_tabBorder; // The TabWidget's borders color. } ; + +} // namespace lmms::gui + #endif diff --git a/include/TemplatesMenu.h b/include/TemplatesMenu.h index 049f1f47e..45c7bce4b 100644 --- a/include/TemplatesMenu.h +++ b/include/TemplatesMenu.h @@ -1,9 +1,37 @@ +/* + * TemplatesMenu.h + * + * Copyright (c) 2004-2022 Tobias Doerffel + * + * This file is part of LMMS - https://lmms.io + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ #ifndef TEMPLATESMENU_H #define TEMPLATESMENU_H #include #include + +namespace lmms::gui +{ + + class TemplatesMenu : public QMenu { Q_OBJECT @@ -18,4 +46,7 @@ private slots: }; + +} // namespace lmms::gui + #endif // TEMPLATESMENU_H diff --git a/include/TempoSyncKnob.h b/include/TempoSyncKnob.h index 3e9fc9738..22a21f3dc 100644 --- a/include/TempoSyncKnob.h +++ b/include/TempoSyncKnob.h @@ -32,6 +32,9 @@ #include "Knob.h" #include "TempoSyncKnobModel.h" +namespace lmms::gui +{ + class MeterDialog; class LMMS_EXPORT TempoSyncKnob : public Knob @@ -79,4 +82,6 @@ private: +} // namespace lmms::gui + #endif diff --git a/include/TempoSyncKnobModel.h b/include/TempoSyncKnobModel.h index b9512aa1a..1e6decfb9 100644 --- a/include/TempoSyncKnobModel.h +++ b/include/TempoSyncKnobModel.h @@ -30,6 +30,17 @@ class QAction; +namespace lmms +{ + +namespace gui +{ + +class TempoSyncKnob; + +} // namespace gui + + class LMMS_EXPORT TempoSyncKnobModel : public FloatModel { Q_OBJECT @@ -72,7 +83,7 @@ public: void setScale( float _new_scale ); signals: - void syncModeChanged( TempoSyncMode _new_mode ); + void syncModeChanged( lmms::TempoSyncKnobModel::TempoSyncMode _new_mode ); void scaleChanged( float _new_scale ); @@ -86,7 +97,7 @@ public slots: protected slots: - void calculateTempoSyncTime( bpm_t _bpm ); + void calculateTempoSyncTime( lmms::bpm_t _bpm ); void updateCustom(); @@ -98,8 +109,10 @@ private: MeterModel m_custom; - friend class TempoSyncKnob; + friend class gui::TempoSyncKnob; } ; +} // namespace lmms + #endif diff --git a/include/TextFloat.h b/include/TextFloat.h index 1df7ed46a..580c3b979 100644 --- a/include/TextFloat.h +++ b/include/TextFloat.h @@ -31,6 +31,8 @@ #include "lmms_export.h" +namespace lmms::gui +{ class LMMS_EXPORT TextFloat : public QWidget { @@ -79,4 +81,7 @@ private: }; + +} // namespace lmms::gui + #endif diff --git a/include/ThreadableJob.h b/include/ThreadableJob.h index b2b20e9be..8e714ae19 100644 --- a/include/ThreadableJob.h +++ b/include/ThreadableJob.h @@ -29,6 +29,9 @@ #include +namespace lmms +{ + class ThreadableJob { public: @@ -85,4 +88,6 @@ protected: std::atomic m_state; } ; +} // namespace lmms + #endif diff --git a/include/TimeDisplayWidget.h b/include/TimeDisplayWidget.h index 303ce6d5e..d8e38333a 100644 --- a/include/TimeDisplayWidget.h +++ b/include/TimeDisplayWidget.h @@ -31,6 +31,8 @@ #include "LcdWidget.h" +namespace lmms::gui +{ class TimeDisplayWidget : public QWidget { @@ -67,4 +69,6 @@ private: } ; +} // namespace lmms::gui + #endif // TIME_DISPLAY_WIDGET_H diff --git a/include/TimeLineWidget.h b/include/TimeLineWidget.h index 7809c042e..4cbddcda4 100644 --- a/include/TimeLineWidget.h +++ b/include/TimeLineWidget.h @@ -33,6 +33,10 @@ class QPixmap; class QToolBar; + +namespace lmms::gui +{ + class NStateButton; class TextFloat; class SongEditor; @@ -175,7 +179,7 @@ signals: public slots: - void updatePosition( const TimePos & ); + void updatePosition( const lmms::TimePos & ); void updatePosition() { updatePosition( TimePos() ); @@ -247,7 +251,7 @@ private: signals: - void positionChanged( const TimePos & _t ); + void positionChanged( const lmms::TimePos & _t ); void loopPointStateLoaded( int _n ); void positionMarkerMoved(); void loadBehaviourAtStop( int _n ); @@ -255,4 +259,7 @@ signals: } ; + +} // namespace lmms::gui + #endif diff --git a/include/TimePos.h b/include/TimePos.h index 8b758d9b4..808eede25 100644 --- a/include/TimePos.h +++ b/include/TimePos.h @@ -31,6 +31,9 @@ #include "lmms_export.h" #include "lmms_basics.h" +namespace lmms +{ + // note: a bar was erroneously called "tact" in older versions of LMMS const int DefaultTicksPerBar = 192; const int DefaultStepsPerBar = 16; @@ -113,4 +116,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/include/ToolButton.h b/include/ToolButton.h index 2f64d45b8..c6e80b4c2 100644 --- a/include/ToolButton.h +++ b/include/ToolButton.h @@ -28,6 +28,8 @@ #include +namespace lmms::gui +{ class ToolButton : public QToolButton { @@ -45,5 +47,7 @@ public: } ; +} // namespace lmms::gui + #endif diff --git a/include/ToolPlugin.h b/include/ToolPlugin.h index 8a65147ac..899c31906 100644 --- a/include/ToolPlugin.h +++ b/include/ToolPlugin.h @@ -29,6 +29,11 @@ #include "Plugin.h" + +namespace lmms +{ + + class LMMS_EXPORT ToolPlugin : public Plugin { public: @@ -42,4 +47,7 @@ public: } ; + +} // namespace lmms + #endif diff --git a/include/ToolPluginView.h b/include/ToolPluginView.h index 2b64caaaf..0b702fd1b 100644 --- a/include/ToolPluginView.h +++ b/include/ToolPluginView.h @@ -28,8 +28,15 @@ #include "PluginView.h" +namespace lmms +{ + class ToolPlugin; +namespace gui +{ + + class LMMS_EXPORT ToolPluginView : public PluginView { public: @@ -38,4 +45,8 @@ public: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/include/Track.h b/include/Track.h index d00ac3783..ec069c38f 100644 --- a/include/Track.h +++ b/include/Track.h @@ -34,11 +34,21 @@ #include "lmms_basics.h" +namespace lmms +{ + class TimePos; class TrackContainer; -class TrackContainerView; class Clip; + + +namespace gui +{ + class TrackView; +class TrackContainerView; + +} /*! The minimum track height in pixels @@ -93,7 +103,8 @@ public: const f_cnt_t frameBase, int clipNum = -1 ) = 0; - virtual TrackView * createView( TrackContainerView * view ) = 0; + + virtual gui::TrackView * createView( gui::TrackContainerView * view ) = 0; virtual Clip * createClip( const TimePos & pos ) = 0; virtual void saveTrackSpecificSettings( QDomDocument & doc, @@ -233,16 +244,17 @@ private: QColor m_color; bool m_hasColor; - friend class TrackView; + friend class gui::TrackView; signals: void destroyedTrack(); void nameChanged(); - void clipAdded( Clip * ); + void clipAdded( lmms::Clip * ); void colorChanged(); } ; +} // namespace lmms #endif diff --git a/include/TrackContainer.h b/include/TrackContainer.h index 18139a0da..beb7564ad 100644 --- a/include/TrackContainer.h +++ b/include/TrackContainer.h @@ -31,11 +31,19 @@ #include "Track.h" #include "JournallingObject.h" +namespace lmms +{ class AutomationClip; class InstrumentTrack; + +namespace gui +{ + class TrackContainerView; +} + class LMMS_EXPORT TrackContainer : public Model, public JournallingObject { @@ -96,7 +104,7 @@ public: virtual AutomatedValueMap automatedValuesAt(TimePos time, int clipNum = -1) const; signals: - void trackAdded( Track * _track ); + void trackAdded( lmms::Track * _track ); protected: static AutomatedValueMap automatedValuesFromTracks(const TrackList &tracks, TimePos timeStart, int clipNum = -1); @@ -109,10 +117,11 @@ private: TrackContainerTypes m_TrackContainerType; - friend class TrackContainerView; + friend class gui::TrackContainerView; friend class Track; } ; +} // namespace lmms #endif diff --git a/include/TrackContainerView.h b/include/TrackContainerView.h index 00267bfe8..edcffeb2f 100644 --- a/include/TrackContainerView.h +++ b/include/TrackContainerView.h @@ -39,11 +39,32 @@ class QVBoxLayout; +namespace lmms +{ + class InstrumentTrack; class Track; class TrackContainer; -class TrackView; +class InstrumentLoaderThread : public QThread +{ +Q_OBJECT +public: + InstrumentLoaderThread( QObject *parent = 0, InstrumentTrack *it = 0, + QString name = "" ); + + void run() override; + +private: + InstrumentTrack *m_it; + QString m_name; + QThread *m_containerThread; +}; + +namespace gui +{ + +class TrackView; class TrackContainerView : public QWidget, public ModelView, public JournallingObject, @@ -132,8 +153,8 @@ public: public slots: void realignTracks(); - TrackView * createTrackView( Track * _t ); - void deleteTrackView( TrackView * _tv ); + lmms::gui::TrackView * createTrackView( lmms::Track * _t ); + void deleteTrackView( lmms::gui::TrackView * _tv ); void dropEvent( QDropEvent * _de ) override; void dragEnterEvent( QDragEnterEvent * _dee ) override; @@ -188,24 +209,14 @@ private: signals: - void positionChanged( const TimePos & _pos ); + void positionChanged( const lmms::TimePos & _pos ); } ; -class InstrumentLoaderThread : public QThread -{ - Q_OBJECT -public: - InstrumentLoaderThread( QObject *parent = 0, InstrumentTrack *it = 0, - QString name = "" ); - void run() override; +} // namespace gui -private: - InstrumentTrack *m_it; - QString m_name; - QThread *m_containerThread; -}; +} // namespace lmms #endif diff --git a/include/TrackContentWidget.h b/include/TrackContentWidget.h index d3bf60488..228a3e739 100644 --- a/include/TrackContentWidget.h +++ b/include/TrackContentWidget.h @@ -33,10 +33,16 @@ class QMimeData; -class Track; -class ClipView; -class TrackView; +namespace lmms +{ +class Track; + +namespace gui +{ + +class TrackView; +class ClipView; class TrackContentWidget : public QWidget, public JournallingObject { @@ -86,7 +92,7 @@ public: public slots: void update(); - void changePosition( const TimePos & newPos = TimePos( -1 ) ); + void changePosition( const lmms::TimePos & newPos = TimePos( -1 ) ); protected: enum ContextMenuAction @@ -139,5 +145,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/include/TrackLabelButton.h b/include/TrackLabelButton.h index a46f418e9..3be64adee 100644 --- a/include/TrackLabelButton.h +++ b/include/TrackLabelButton.h @@ -28,6 +28,9 @@ #include +namespace lmms::gui +{ + class TrackView; class TrackRenameLineEdit; @@ -66,4 +69,7 @@ private: } ; + +} // namespace lmms::gui + #endif diff --git a/include/TrackOperationsWidget.h b/include/TrackOperationsWidget.h index 7680aa7b4..92f1a889c 100644 --- a/include/TrackOperationsWidget.h +++ b/include/TrackOperationsWidget.h @@ -29,6 +29,9 @@ class QPushButton; +namespace lmms::gui +{ + class PixmapButton; class TrackView; @@ -70,8 +73,11 @@ private: friend class TrackView; signals: - void trackRemovalScheduled( TrackView * t ); + void trackRemovalScheduled( lmms::gui::TrackView * t ); } ; + +} // namespace lmms::gui + #endif diff --git a/include/TrackRenameLineEdit.h b/include/TrackRenameLineEdit.h index e681a2d21..4b13ff9b7 100644 --- a/include/TrackRenameLineEdit.h +++ b/include/TrackRenameLineEdit.h @@ -29,6 +29,9 @@ #include +namespace lmms::gui +{ + class TrackRenameLineEdit : public QLineEdit { Q_OBJECT @@ -43,4 +46,6 @@ private: QString m_oldName; } ; +} // namespace lmms::gui + #endif diff --git a/include/TrackView.h b/include/TrackView.h index 4467ecbdb..2f5c5ed28 100644 --- a/include/TrackView.h +++ b/include/TrackView.h @@ -37,12 +37,20 @@ class QMenu; -class FadeButton; +namespace lmms +{ + class Track; -class TrackContainerView; class Clip; +namespace gui +{ + +class FadeButton; +class TrackContainerView; + + const int DEFAULT_SETTINGS_WIDGET_WIDTH = 224; const int TRACK_OP_WIDTH = 78; // This shaves 150-ish pixels off track buttons, @@ -161,11 +169,14 @@ private: private slots: - void createClipView( Clip * clip ); + void createClipView( lmms::Clip * clip ); void muteChanged(); } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/include/ValueBuffer.h b/include/ValueBuffer.h index f9869de88..24c8e0daa 100644 --- a/include/ValueBuffer.h +++ b/include/ValueBuffer.h @@ -31,6 +31,10 @@ #include "MemoryManager.h" #include "lmms_export.h" +namespace lmms +{ + + class LMMS_EXPORT ValueBuffer : public std::vector { MM_OPERATORS @@ -50,4 +54,7 @@ public: void interpolate(float start, float end); }; + +} // namespace lmms + #endif diff --git a/include/VersionedSaveDialog.h b/include/VersionedSaveDialog.h index bb4894500..79ab516b0 100644 --- a/include/VersionedSaveDialog.h +++ b/include/VersionedSaveDialog.h @@ -32,6 +32,10 @@ #include "Song.h" class QLineEdit; + +namespace lmms::gui +{ + class LedCheckBox; class SaveOptionsWidget : public QWidget { @@ -62,4 +66,7 @@ public slots: void decrementVersion(); }; + +} // namespace lmms::gui + #endif // VERSIONEDSAVEDIALOG_H diff --git a/include/VstSyncController.h b/include/VstSyncController.h index ec7d9820c..947a65ea2 100644 --- a/include/VstSyncController.h +++ b/include/VstSyncController.h @@ -31,6 +31,9 @@ #include "SharedMemory.h" #include "VstSyncData.h" +namespace lmms +{ + class VstSyncController : public QObject { @@ -78,4 +81,7 @@ private: SharedMemory m_shm; }; + +} // namespace lmms + #endif diff --git a/include/VstSyncData.h b/include/VstSyncData.h index ac1bed218..bf4d42b80 100644 --- a/include/VstSyncData.h +++ b/include/VstSyncData.h @@ -26,6 +26,10 @@ #ifndef VST_SYNC_DATA_H #define VST_SYNC_DATA_H +namespace lmms +{ + + // VST sync frequency (in ms), how often will be VST plugin synced // keep it power of two if possible (not used by now) //#define VST_SNC_TIMER 1 @@ -55,4 +59,7 @@ struct VstSyncData #endif } ; + +} // namespace lmms + #endif diff --git a/include/aeffectx.h b/include/aeffectx.h index 7cdfcfe7d..5ba81e6a0 100644 --- a/include/aeffectx.h +++ b/include/aeffectx.h @@ -36,6 +36,7 @@ #define VST_CALL_CONV #endif + template constexpr int32_t CCONST(T a, T b, T c, T d) { @@ -299,5 +300,4 @@ public: typedef intptr_t (VST_CALL_CONV * audioMasterCallback)( AEffect * , int32_t, int32_t, intptr_t, void * , float ); - #endif diff --git a/include/base64.h b/include/base64.h index a0557fe0d..f52d90d13 100644 --- a/include/base64.h +++ b/include/base64.h @@ -30,9 +30,9 @@ #include #include - -namespace base64 +namespace lmms::base64 { + inline void encode( const char * _data, const int _size, QString & _dst ) { @@ -51,6 +51,6 @@ namespace base64 QVariant decode( const QString & _b64, QVariant::Type _force_type = QVariant::Invalid ); -} +} // namespace lmms::base64 #endif diff --git a/include/denormals.h b/include/denormals.h index e08669b2b..e99e767a3 100644 --- a/include/denormals.h +++ b/include/denormals.h @@ -8,26 +8,36 @@ #include #ifdef __GNUC__ #include -#endif +#endif // __GNUC__ +#endif // __SSE__ + + +namespace lmms +{ + +#ifdef __SSE__ // Intel® 64 and IA-32 Architectures Software Developer’s Manual, // Volume 1: Basic Architecture, // 11.6.3 Checking for the DAZ Flag in the MXCSR Register -int inline can_we_daz() { +int inline can_we_daz() +{ alignas(16) unsigned char buffer[512] = {0}; #if defined(LMMS_HOST_X86) _fxsave(buffer); #elif defined(LMMS_HOST_X86_64) _fxsave64(buffer); -#endif +#endif // defined(LLMS_HOST_X86) // Bit 6 of the MXCSR_MASK, i.e. in the lowest byte, // tells if we can use the DAZ flag. return ((buffer[28] & (1 << 6)) != 0); } -#endif + +#endif // __SSE__ // Set denormal protection for this thread. -void inline disable_denormals() { +void inline disable_denormals() +{ #ifdef __SSE__ /* Setting DAZ might freeze systems not supporting it */ if (can_we_daz()) { @@ -35,8 +45,10 @@ void inline disable_denormals() { } /* FTZ flag */ _MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON ); -#endif +#endif // __SSE__ } -#endif +} // namespace lmms + +#endif // DENORMALS_H diff --git a/include/embed.h b/include/embed.h index ea3e3417e..5dd6a41a2 100644 --- a/include/embed.h +++ b/include/embed.h @@ -32,6 +32,9 @@ #include "lmms_basics.h" +namespace lmms +{ + namespace embed { @@ -63,8 +66,8 @@ inline QPixmap getIconPixmap( const QString& _name, //QString getText( const char * _name ); } -#endif +#endif // PLUGIN_NAME class PixmapLoader @@ -133,8 +136,9 @@ public: } } ; -#endif +#endif // PLUGIN_NAME +} // namespace lmms #endif diff --git a/include/endian_handling.h b/include/endian_handling.h index 09953a0ac..b3d122fa3 100644 --- a/include/endian_handling.h +++ b/include/endian_handling.h @@ -30,6 +30,10 @@ #include "lmms_basics.h" +namespace lmms +{ + + inline bool isLittleEndian() { return( QSysInfo::ByteOrder == QSysInfo::LittleEndian ); @@ -50,4 +54,7 @@ inline int32_t swap32IfBE( int32_t i ) ( ( i & 0x000000ff ) << 24 ) ); } + +} // namespace lmms + #endif diff --git a/include/fft_helpers.h b/include/fft_helpers.h index 88183fb19..8ba0fc7a0 100644 --- a/include/fft_helpers.h +++ b/include/fft_helpers.h @@ -32,6 +32,9 @@ #include #include +namespace lmms +{ + // NOTE: FFT_BUFFER_SIZE should be considered deprecated! // It is used by Eq plugin and some older code here, but this should be a user // switchable parameter, not a constant. Use a value from FFT_BLOCK_SIZES @@ -103,4 +106,7 @@ int LMMS_EXPORT absspec(const fftwf_complex *complex_buffer, float *absspec_buff int LMMS_EXPORT compressbands(const float * _absspec_buffer, float * _compressedband, int _num_old, int _num_new, int _bottom, int _top); + +} // namespace lmms + #endif diff --git a/include/gui_templates.h b/include/gui_templates.h index 073cb50f1..ee0ccdbf6 100644 --- a/include/gui_templates.h +++ b/include/gui_templates.h @@ -32,6 +32,8 @@ #include #include +namespace lmms +{ // return DPI-independent font-size - font with returned font-size has always @@ -65,4 +67,6 @@ inline QFont pointSizeF( QFont _f, float SIZE ) } +} // namespace lmms + #endif diff --git a/include/interpolation.h b/include/interpolation.h index cb324cd76..3a74334e4 100644 --- a/include/interpolation.h +++ b/include/interpolation.h @@ -34,6 +34,9 @@ #include "lmms_constants.h" #include "lmms_math.h" +namespace lmms +{ + inline float hermiteInterpolate( float x0, float x1, float x2, float x3, float frac_pos ) { @@ -135,6 +138,6 @@ inline float lagrangeInterpolate( float v0, float v1, float v2, float v3, float - +} // namespace lmms #endif diff --git a/include/lmms_basics.h b/include/lmms_basics.h index cda591c0d..3f7057ef7 100644 --- a/include/lmms_basics.h +++ b/include/lmms_basics.h @@ -35,6 +35,10 @@ #include +namespace lmms +{ + + typedef int32_t bar_t; typedef int32_t tick_t; typedef uint8_t volume_t; @@ -143,4 +147,7 @@ constexpr const char* UI_CTRL_KEY = "Ctrl"; #endif + +} // namespace lmms + #endif diff --git a/include/lmms_constants.h b/include/lmms_constants.h index f5a86bc88..7796f6bdf 100644 --- a/include/lmms_constants.h +++ b/include/lmms_constants.h @@ -25,6 +25,10 @@ #ifndef LMMS_CONSTANTS_H #define LMMS_CONSTANTS_H +namespace lmms +{ + + constexpr long double LD_PI = 3.14159265358979323846264338327950288419716939937510; constexpr long double LD_2PI = LD_PI * 2.0; constexpr long double LD_PI_2 = LD_PI * 0.5; @@ -96,4 +100,7 @@ constexpr int ARANGE_LOUD_END = 0; constexpr int ARANGE_SILENT_START = -60; constexpr int ARANGE_SILENT_END = -10; + +} // namespace lmms + #endif diff --git a/include/lmms_math.h b/include/lmms_math.h index aa043170c..e1de09936 100644 --- a/include/lmms_math.h +++ b/include/lmms_math.h @@ -33,6 +33,9 @@ #include +namespace lmms +{ + #ifdef __INTEL_COMPILER static inline float absFraction( const float _x ) @@ -323,4 +326,7 @@ static inline T absMin( T a, T b ) return qAbs(a) < qAbs(b) ? a : b; } + +} // namespace lmms + #endif diff --git a/include/panning.h b/include/panning.h index 6f65c8295..1521ec984 100644 --- a/include/panning.h +++ b/include/panning.h @@ -31,6 +31,10 @@ #include "Midi.h" #include "volume.h" +namespace lmms +{ + + inline StereoVolumeVector panningToVolumeVector( panning_t _p, float _scale = 1.0f ) { @@ -49,4 +53,7 @@ inline int panningToMidi( panning_t _p ) ( (float)( MidiMaxPanning - MidiMinPanning ) ) ); } + +} // namespace lmms + #endif diff --git a/include/panning_constants.h b/include/panning_constants.h index cf335ccfb..00a5c3291 100644 --- a/include/panning_constants.h +++ b/include/panning_constants.h @@ -26,9 +26,16 @@ #ifndef PANNING_CONSTANTS_H #define PANNING_CONSTANTS_H +namespace lmms +{ + + constexpr panning_t PanningRight = ( 0 + 100 ); constexpr panning_t PanningLeft = - PanningRight; constexpr panning_t PanningCenter = 0; constexpr panning_t DefaultPanning = PanningCenter; + +} // namespace lmms + #endif diff --git a/include/shared_object.h b/include/shared_object.h index efb8ba5d6..e68186336 100644 --- a/include/shared_object.h +++ b/include/shared_object.h @@ -28,6 +28,9 @@ #include +namespace lmms +{ + class sharedObject { public: @@ -82,4 +85,7 @@ private: std::atomic_int m_referenceCount; } ; + +} // namespace lmms + #endif diff --git a/include/volume.h b/include/volume.h index bb9fff228..eaf5ab9ff 100644 --- a/include/volume.h +++ b/include/volume.h @@ -28,6 +28,10 @@ #include "lmms_basics.h" +namespace lmms +{ + + constexpr volume_t MinVolume = 0; constexpr volume_t MaxVolume = 200; constexpr volume_t DefaultVolume = 100; @@ -37,4 +41,7 @@ typedef struct float vol[2]; } StereoVolumeVector; + +} // namespace lmms + #endif diff --git a/plugins/Amplifier/Amplifier.cpp b/plugins/Amplifier/Amplifier.cpp index 2dfdc9d8c..ced43f1e2 100644 --- a/plugins/Amplifier/Amplifier.cpp +++ b/plugins/Amplifier/Amplifier.cpp @@ -28,6 +28,9 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + extern "C" { @@ -145,3 +148,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } +} // namespace lmms \ No newline at end of file diff --git a/plugins/Amplifier/Amplifier.h b/plugins/Amplifier/Amplifier.h index 843c25bdb..941971ae7 100644 --- a/plugins/Amplifier/Amplifier.h +++ b/plugins/Amplifier/Amplifier.h @@ -30,6 +30,9 @@ #include "Effect.h" #include "AmplifierControls.h" +namespace lmms +{ + class AmplifierEffect : public Effect { public: @@ -50,4 +53,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/plugins/Amplifier/AmplifierControlDialog.cpp b/plugins/Amplifier/AmplifierControlDialog.cpp index ad2846edb..34114e90b 100644 --- a/plugins/Amplifier/AmplifierControlDialog.cpp +++ b/plugins/Amplifier/AmplifierControlDialog.cpp @@ -30,6 +30,9 @@ #include "Knob.h" +namespace lmms::gui +{ + AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) : EffectControlDialog( controls ) @@ -67,3 +70,6 @@ AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) : rightKnob->setLabel( tr( "RIGHT" ) ); rightKnob->setHintText( tr( "Right gain:" ) , "%" ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Amplifier/AmplifierControlDialog.h b/plugins/Amplifier/AmplifierControlDialog.h index d0d7d0aa3..6362d5f72 100644 --- a/plugins/Amplifier/AmplifierControlDialog.h +++ b/plugins/Amplifier/AmplifierControlDialog.h @@ -28,10 +28,15 @@ #include "EffectControlDialog.h" +namespace lmms +{ class AmplifierControls; +namespace gui +{ + class AmplifierControlDialog : public EffectControlDialog { Q_OBJECT @@ -43,4 +48,9 @@ public: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Amplifier/AmplifierControls.cpp b/plugins/Amplifier/AmplifierControls.cpp index 70876be11..307730460 100644 --- a/plugins/Amplifier/AmplifierControls.cpp +++ b/plugins/Amplifier/AmplifierControls.cpp @@ -29,6 +29,8 @@ #include "AmplifierControls.h" #include "Amplifier.h" +namespace lmms +{ AmplifierControls::AmplifierControls( AmplifierEffect* effect ) : EffectControls( effect ), @@ -75,6 +77,6 @@ void AmplifierControls::saveSettings( QDomDocument& doc, QDomElement& _this ) } - +} // namespace lmms diff --git a/plugins/Amplifier/AmplifierControls.h b/plugins/Amplifier/AmplifierControls.h index f0f950fd1..7eaa0f099 100644 --- a/plugins/Amplifier/AmplifierControls.h +++ b/plugins/Amplifier/AmplifierControls.h @@ -29,9 +29,16 @@ #include "EffectControls.h" #include "AmplifierControlDialog.h" +namespace lmms +{ class AmplifierEffect; +namespace gui +{ +class AmplifierControlDialog; +} + class AmplifierControls : public EffectControls { @@ -54,9 +61,9 @@ public: return 4; } - virtual EffectControlDialog* createView() + virtual gui::EffectControlDialog* createView() { - return new AmplifierControlDialog( this ); + return new gui::AmplifierControlDialog( this ); } @@ -70,9 +77,12 @@ private: FloatModel m_leftModel; FloatModel m_rightModel; - friend class AmplifierControlDialog; + friend class gui::AmplifierControlDialog; friend class AmplifierEffect; } ; + +} // namespace lmms + #endif diff --git a/plugins/AudioFileProcessor/AudioFileProcessor.cpp b/plugins/AudioFileProcessor/AudioFileProcessor.cpp index d3c13511b..b5e991a2c 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessor.cpp +++ b/plugins/AudioFileProcessor/AudioFileProcessor.cpp @@ -47,6 +47,11 @@ #include "embed.h" #include "plugin_export.h" + +namespace lmms +{ + + extern "C" { @@ -110,13 +115,6 @@ AudioFileProcessor::AudioFileProcessor( InstrumentTrack * _instrument_track ) : -AudioFileProcessor::~AudioFileProcessor() -{ -} - - - - void AudioFileProcessor::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) { @@ -312,9 +310,9 @@ int AudioFileProcessor::getBeatLen( NotePlayHandle * _n ) const -PluginView * AudioFileProcessor::instantiateView( QWidget * _parent ) +gui::PluginView* AudioFileProcessor::instantiateView( QWidget * _parent ) { - return new AudioFileProcessorView( this, _parent ); + return new gui::AudioFileProcessorView( this, _parent ); } @@ -442,6 +440,8 @@ void AudioFileProcessor::pointChanged( void ) +namespace gui +{ QPixmap * AudioFileProcessorView::s_artwork = nullptr; @@ -548,8 +548,8 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, m_waveView = 0; newWaveView(); - connect( castModel(), SIGNAL( isPlaying( f_cnt_t ) ), - m_waveView, SLOT( isPlaying( f_cnt_t ) ) ); + connect( castModel(), SIGNAL( isPlaying( lmms::f_cnt_t ) ), + m_waveView, SLOT( isPlaying( lmms::f_cnt_t ) ) ); qRegisterMetaType( "f_cnt_t" ); @@ -1242,7 +1242,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; } @@ -1273,6 +1273,7 @@ bool AudioFileProcessorWaveView::knob::checkBound( double _v ) const } +} // namespace gui @@ -1288,3 +1289,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main(Model * model, void *) } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/AudioFileProcessor/AudioFileProcessor.h b/plugins/AudioFileProcessor/AudioFileProcessor.h index 532a16114..30fcbc502 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessor.h +++ b/plugins/AudioFileProcessor/AudioFileProcessor.h @@ -35,9 +35,20 @@ #include "SampleBuffer.h" #include "Knob.h" + +namespace lmms +{ + +namespace gui +{ class automatableButtonGroup; -class ComboBox; +class PluginView; +class InstrumentViewFixedSize; +class Knob; class PixmapButton; +class ComboBox; +class AudioFileProcessorView; +} class AudioFileProcessor : public Instrument @@ -45,28 +56,27 @@ class AudioFileProcessor : public Instrument Q_OBJECT public: AudioFileProcessor( InstrumentTrack * _instrument_track ); - virtual ~AudioFileProcessor(); - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, - QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, + QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual void loadFile( const QString & _file ); + void loadFile( const QString & _file ) override; - virtual QString nodeName() const; + QString nodeName() const override; virtual int getBeatLen( NotePlayHandle * _n ) const; - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return 128; } - virtual PluginView * instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; public slots: @@ -84,7 +94,7 @@ private slots: signals: - void isPlaying( f_cnt_t _current_frame ); + void isPlaying( lmms::f_cnt_t _current_frame ); private: @@ -104,16 +114,18 @@ private: f_cnt_t m_nextPlayStartPoint; bool m_nextPlayBackwards; - friend class AudioFileProcessorView; + friend class gui::AudioFileProcessorView; } ; +namespace gui +{ class AudioFileProcessorWaveView; -class AudioFileProcessorView : public InstrumentViewFixedSize +class AudioFileProcessorView : public gui::InstrumentViewFixedSize { Q_OBJECT public: @@ -143,7 +155,7 @@ private: Knob * m_endKnob; Knob * m_loopKnob; - PixmapButton * m_openAudioFileButton; + gui::PixmapButton * m_openAudioFileButton; PixmapButton * m_reverseButton; automatableButtonGroup * m_loopGroup; PixmapButton * m_stutterButton; @@ -174,7 +186,7 @@ public: loop } ; - class knob : public ::Knob + class knob : public Knob { const AudioFileProcessorWaveView * m_waveView; const Knob * m_relatedKnob; @@ -182,7 +194,7 @@ public: public: knob( QWidget * _parent ) : - ::Knob( knobBright_26, _parent ), + Knob( knobBright_26, _parent ), m_waveView( 0 ), m_relatedKnob( 0 ) { @@ -223,7 +235,7 @@ public slots: QWidget::update(); } - void isPlaying( f_cnt_t _current_frame ); + void isPlaying( lmms::f_cnt_t _current_frame ); private: @@ -287,6 +299,8 @@ private: } ; +} // namespace gui +} // namespace lmms #endif diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index f01e70720..b8ea271ee 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -27,6 +27,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -155,3 +159,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } + +} // namespace lmms \ No newline at end of file diff --git a/plugins/BassBooster/BassBooster.h b/plugins/BassBooster/BassBooster.h index d3db6e220..9edca3b22 100644 --- a/plugins/BassBooster/BassBooster.h +++ b/plugins/BassBooster/BassBooster.h @@ -30,6 +30,8 @@ #include "DspEffectLibrary.h" #include "BassBoosterControls.h" +namespace lmms +{ class BassBoosterEffect : public Effect { @@ -60,4 +62,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/plugins/BassBooster/BassBoosterControlDialog.cpp b/plugins/BassBooster/BassBoosterControlDialog.cpp index f7513e13e..f1e60c3ff 100644 --- a/plugins/BassBooster/BassBoosterControlDialog.cpp +++ b/plugins/BassBooster/BassBoosterControlDialog.cpp @@ -32,6 +32,9 @@ #include "Knob.h" +namespace lmms::gui +{ + BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* controls ) : EffectControlDialog( controls ) @@ -69,3 +72,6 @@ BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* control tl->addLayout( l ); setLayout( tl ); } + + +} // namespace lmms::gui diff --git a/plugins/BassBooster/BassBoosterControlDialog.h b/plugins/BassBooster/BassBoosterControlDialog.h index ec636e808..89a60fa1a 100644 --- a/plugins/BassBooster/BassBoosterControlDialog.h +++ b/plugins/BassBooster/BassBoosterControlDialog.h @@ -27,9 +27,13 @@ #include "EffectControlDialog.h" +namespace lmms +{ class BassBoosterControls; +namespace gui +{ class BassBoosterControlDialog : public EffectControlDialog { @@ -42,4 +46,9 @@ public: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/BassBooster/BassBoosterControls.cpp b/plugins/BassBooster/BassBoosterControls.cpp index 195f00801..cda00043b 100644 --- a/plugins/BassBooster/BassBoosterControls.cpp +++ b/plugins/BassBooster/BassBoosterControls.cpp @@ -28,6 +28,8 @@ #include "BassBoosterControls.h" #include "BassBooster.h" +namespace lmms +{ BassBoosterControls::BassBoosterControls( BassBoosterEffect* effect ) : @@ -66,6 +68,4 @@ void BassBoosterControls::saveSettings( QDomDocument& doc, QDomElement& _this ) } - - - +} // namespace lmms diff --git a/plugins/BassBooster/BassBoosterControls.h b/plugins/BassBooster/BassBoosterControls.h index e7b61348a..c67ce4d7a 100644 --- a/plugins/BassBooster/BassBoosterControls.h +++ b/plugins/BassBooster/BassBoosterControls.h @@ -28,6 +28,8 @@ #include "EffectControls.h" #include "BassBoosterControlDialog.h" +namespace lmms +{ class BassBoosterEffect; @@ -53,9 +55,9 @@ public: return 3; } - virtual EffectControlDialog* createView() + virtual gui::EffectControlDialog* createView() { - return new BassBoosterControlDialog( this ); + return new gui::BassBoosterControlDialog( this ); } @@ -68,8 +70,11 @@ private: FloatModel m_gainModel; FloatModel m_ratioModel; - friend class BassBoosterControlDialog; + friend class gui::BassBoosterControlDialog; friend class BassBoosterEffect; } ; + +} // namespace lmms + #endif diff --git a/plugins/BitInvader/BitInvader.cpp b/plugins/BitInvader/BitInvader.cpp index 60c933949..55dd97386 100644 --- a/plugins/BitInvader/BitInvader.cpp +++ b/plugins/BitInvader/BitInvader.cpp @@ -42,6 +42,10 @@ #include "plugin_export.h" +namespace lmms +{ + + static const int wavetableSize = 200; static const float defaultNormalizationFactor = 1.0f; @@ -325,15 +329,16 @@ void BitInvader::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * BitInvader::instantiateView( QWidget * _parent ) +gui::PluginView * BitInvader::instantiateView( QWidget * _parent ) { - return( new BitInvaderView( this, _parent ) ); + return( new gui::BitInvaderView( this, _parent ) ); } - +namespace gui +{ BitInvaderView::BitInvaderView( Instrument * _instrument, @@ -571,6 +576,7 @@ void BitInvaderView::normalizeToggled( bool value ) } +} // namespace gui extern "C" @@ -584,3 +590,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/BitInvader/BitInvader.h b/plugins/BitInvader/BitInvader.h index 64d5bbfda..cce524beb 100644 --- a/plugins/BitInvader/BitInvader.h +++ b/plugins/BitInvader/BitInvader.h @@ -33,11 +33,18 @@ #include "Graph.h" #include "MemoryManager.h" -class oscillator; +namespace lmms +{ + + +namespace gui +{ class BitInvaderView; class Knob; class LedCheckBox; class PixmapButton; +} + class BSynth { @@ -85,7 +92,7 @@ public: return( 64 ); } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView * instantiateView( QWidget * _parent ); protected slots: void lengthChanged(); @@ -103,10 +110,12 @@ private: float m_normalizeFactor; - friend class BitInvaderView; + friend class gui::BitInvaderView; } ; +namespace gui +{ class BitInvaderView : public InstrumentViewFixedSize { @@ -153,5 +162,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/Bitcrush/Bitcrush.cpp b/plugins/Bitcrush/Bitcrush.cpp index 206f6307d..13f880623 100644 --- a/plugins/Bitcrush/Bitcrush.cpp +++ b/plugins/Bitcrush/Bitcrush.cpp @@ -27,6 +27,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + const int OS_RATE = 5; const float OS_RATIO = 1.0f / OS_RATE; const float CUTOFF_RATIO = 0.353553391f; @@ -251,3 +255,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Bitcrush/Bitcrush.h b/plugins/Bitcrush/Bitcrush.h index f309021e1..670742e20 100644 --- a/plugins/Bitcrush/Bitcrush.h +++ b/plugins/Bitcrush/Bitcrush.h @@ -31,6 +31,11 @@ #include "BitcrushControls.h" #include "BasicFilters.h" + +namespace lmms +{ + + class BitcrushEffect : public Effect { public: @@ -78,4 +83,7 @@ private: friend class BitcrushControls; }; + +} // namespace lmms + #endif diff --git a/plugins/Bitcrush/BitcrushControlDialog.cpp b/plugins/Bitcrush/BitcrushControlDialog.cpp index 43117f00b..ddf41508a 100755 --- a/plugins/Bitcrush/BitcrushControlDialog.cpp +++ b/plugins/Bitcrush/BitcrushControlDialog.cpp @@ -32,6 +32,10 @@ #include "LedCheckBox.h" #include "Knob.h" +namespace lmms::gui +{ + + BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) : EffectControlDialog( controls ) { @@ -110,3 +114,6 @@ BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) : levels->setLabel( tr( "QUANT" ) ); levels->setHintText( tr( "Levels:" ) , "" ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Bitcrush/BitcrushControlDialog.h b/plugins/Bitcrush/BitcrushControlDialog.h index c56b94c5a..49d5bce7e 100644 --- a/plugins/Bitcrush/BitcrushControlDialog.h +++ b/plugins/Bitcrush/BitcrushControlDialog.h @@ -29,8 +29,15 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class BitcrushControls; + +namespace gui +{ + class BitcrushControlDialog : public EffectControlDialog { Q_OBJECT @@ -41,4 +48,9 @@ public: } }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Bitcrush/BitcrushControls.cpp b/plugins/Bitcrush/BitcrushControls.cpp index 19886aa75..9acd7d7c0 100644 --- a/plugins/Bitcrush/BitcrushControls.cpp +++ b/plugins/Bitcrush/BitcrushControls.cpp @@ -29,6 +29,10 @@ #include "BitcrushControls.h" #include "Bitcrush.h" +namespace lmms +{ + + BitcrushControls::BitcrushControls( BitcrushEffect * eff ) : EffectControls( eff ), @@ -86,3 +90,6 @@ void BitcrushControls::sampleRateChanged() { m_effect->sampleRateChanged(); } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Bitcrush/BitcrushControls.h b/plugins/Bitcrush/BitcrushControls.h index 02c969196..ed69dd704 100644 --- a/plugins/Bitcrush/BitcrushControls.h +++ b/plugins/Bitcrush/BitcrushControls.h @@ -29,6 +29,10 @@ #include "EffectControls.h" #include "BitcrushControlDialog.h" +namespace lmms +{ + + class BitcrushEffect; class BitcrushControls : public EffectControls @@ -50,9 +54,9 @@ public: return( 9 ); } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog * createView() { - return( new BitcrushControlDialog( this ) ); + return( new gui::BitcrushControlDialog( this ) ); } private slots: @@ -75,8 +79,11 @@ private: BoolModel m_rateEnabled; BoolModel m_depthEnabled; - friend class BitcrushControlDialog; + friend class gui::BitcrushControlDialog; friend class BitcrushEffect; }; + +} // namespace lmms + #endif diff --git a/plugins/CarlaBase/Carla.cpp b/plugins/CarlaBase/Carla.cpp index a09b2367d..6082f00da 100644 --- a/plugins/CarlaBase/Carla.cpp +++ b/plugins/CarlaBase/Carla.cpp @@ -58,6 +58,9 @@ #include "embed.h" +namespace lmms +{ + // this doesn't seem to be defined anywhere static const double ticksPerBeat = 48.0; @@ -145,6 +148,7 @@ static const char* host_ui_save_file(NativeHostHandle, bool isDir, const char* t // ----------------------------------------------------------------------- + CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay) : Instrument(instrumentTrack, descriptor), kIsPatchbay(isPatchbay), @@ -575,7 +579,7 @@ bool CarlaInstrument::handleMidiEvent(const MidiEvent& event, const TimePos&, f_ return true; } -PluginView* CarlaInstrument::instantiateView(QWidget* parent) +gui::PluginView* CarlaInstrument::instantiateView(QWidget* parent) { // Disable plugin focus per https://bugreports.qt.io/browse/QTBUG-30181 #ifndef CARLA_OS_MAC @@ -592,7 +596,7 @@ PluginView* CarlaInstrument::instantiateView(QWidget* parent) //fHost.uiName = strdup(parent->windowTitle().toUtf8().constData()); fHost.uiName = strdup(kIsPatchbay ? "CarlaPatchbay-LMMS" : "CarlaRack-LMMS"); - return new CarlaInstrumentView(this, parent); + return new gui::CarlaInstrumentView(this, parent); } void CarlaInstrument::sampleRateChanged() @@ -602,6 +606,9 @@ void CarlaInstrument::sampleRateChanged() // ------------------------------------------------------------------- +namespace gui +{ + CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument* const instrument, QWidget* const parent) : InstrumentViewFixedSize(instrument, parent), fHandle(instrument->fHandle), @@ -847,6 +854,17 @@ CarlaParamsView::CarlaParamsView(CarlaInstrumentView* const instrumentView, QWid splitter->addWidget(outputFrame); verticalLayout->addWidget(splitter); +#if QT_VERSION < 0x50C00 + // Workaround for a bug in Qt versions below 5.12, + // where argument-dependent-lookup fails for QFlags operators + // declared inside a namepsace. + // This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h + // See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348 + + using ::operator|; + +#endif + // -- Sub window CarlaParamsSubWindow* win = new CarlaParamsSubWindow(getGUI()->mainWindow()->workspace()->viewport(), Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint); @@ -1043,6 +1061,17 @@ void CarlaParamsView::windowResized() void CarlaParamsView::addKnob(uint32_t index) { +#if QT_VERSION < 0x50C00 + // Workaround for a bug in Qt versions below 5.12, + // where argument-dependent-lookup fails for QFlags operators + // declared inside a namepsace. + // This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h + // See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348 + + using ::operator|; + +#endif + bool output = m_carlaInstrument->m_paramModels[index]->isOutput(); if (output) { @@ -1111,3 +1140,8 @@ void CarlaParamsView::clearKnobs() m_curOutColumn = 0; m_curOutRow = 0; } + + +} // namespace gui + +} // namespace lmms \ No newline at end of file diff --git a/plugins/CarlaBase/Carla.h b/plugins/CarlaBase/Carla.h index 98662014b..2010ac3c4 100644 --- a/plugins/CarlaBase/Carla.h +++ b/plugins/CarlaBase/Carla.h @@ -65,8 +65,16 @@ class QLineEdit; class QStringListModel; class QScrollArea; + +namespace lmms +{ + +namespace gui +{ class CarlaParamsView; +class CarlaInstrumentView; class Knob; +} class CarlaParamFloatModel : public FloatModel { @@ -161,9 +169,79 @@ private: // ------------------------------------------------------------------- +class CARLABASE_EXPORT CarlaInstrument : public Instrument +{ + Q_OBJECT + +public: + static const uint32_t kMaxMidiEvents = 512; + + CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay); + virtual ~CarlaInstrument(); + + // Carla NativeHostDescriptor functions + uint32_t handleGetBufferSize() const; + double handleGetSampleRate() const; + bool handleIsOffline() const; + const NativeTimeInfo* handleGetTimeInfo() const; + void handleUiParameterChanged(const uint32_t index, const float value) const; + void handleUiClosed(); + intptr_t handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt); + + // LMMS functions + virtual Flags flags() const; + virtual QString nodeName() const; + virtual void saveSettings(QDomDocument& doc, QDomElement& parent); + virtual void loadSettings(const QDomElement& elem); + virtual void play(sampleFrame* workingBuffer); + virtual bool handleMidiEvent(const MidiEvent& event, const TimePos& time, f_cnt_t offset); + virtual gui::PluginView* instantiateView(QWidget* parent); + +signals: + void uiClosed(); + void paramsUpdated(); + +private slots: + void sampleRateChanged(); + void refreshParams(bool init = false); + void clearParamModels(); + void paramModelChanged(uint32_t index); + void updateParamModel(uint32_t index); + +private: + const bool kIsPatchbay; + + NativePluginHandle fHandle; + NativeHostDescriptor fHost; + const NativePluginDescriptor* fDescriptor; + + uint32_t fMidiEventCount; + NativeMidiEvent fMidiEvents[kMaxMidiEvents]; + NativeTimeInfo fTimeInfo; + + // this is only needed because note-offs are being sent during play + QMutex fMutex; + + uint8_t m_paramGroupCount; + QList m_paramModels; + QDomElement m_settingsElem; + + QCompleter* m_paramsCompleter; + QStringListModel* m_completerModel; + + friend class gui::CarlaInstrumentView; + friend class gui::CarlaParamsView; +}; + + +// ------------------------------------------------------------------- + +namespace gui +{ + class CarlaParamsSubWindow : public SubWindow { - Q_OBJECT +Q_OBJECT signals: void uiClosed(); @@ -212,73 +290,6 @@ private: bool mousePress = false; }; -// ------------------------------------------------------------------- - -class CARLABASE_EXPORT CarlaInstrument : public Instrument -{ - Q_OBJECT - -public: - static const uint32_t kMaxMidiEvents = 512; - - CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay); - virtual ~CarlaInstrument(); - - // Carla NativeHostDescriptor functions - uint32_t handleGetBufferSize() const; - double handleGetSampleRate() const; - bool handleIsOffline() const; - const NativeTimeInfo* handleGetTimeInfo() const; - void handleUiParameterChanged(const uint32_t index, const float value) const; - void handleUiClosed(); - intptr_t handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt); - - // LMMS functions - virtual Flags flags() const; - virtual QString nodeName() const; - virtual void saveSettings(QDomDocument& doc, QDomElement& parent); - virtual void loadSettings(const QDomElement& elem); - virtual void play(sampleFrame* workingBuffer); - virtual bool handleMidiEvent(const MidiEvent& event, const TimePos& time, f_cnt_t offset); - virtual PluginView* instantiateView(QWidget* parent); - -signals: - void uiClosed(); - void paramsUpdated(); - -private slots: - void sampleRateChanged(); - void refreshParams(bool init = false); - void clearParamModels(); - void paramModelChanged(uint32_t index); - void updateParamModel(uint32_t index); - -private: - const bool kIsPatchbay; - - NativePluginHandle fHandle; - NativeHostDescriptor fHost; - const NativePluginDescriptor* fDescriptor; - - uint32_t fMidiEventCount; - NativeMidiEvent fMidiEvents[kMaxMidiEvents]; - NativeTimeInfo fTimeInfo; - - // this is only needed because note-offs are being sent during play - QMutex fMutex; - - uint8_t m_paramGroupCount; - QList m_paramModels; - QDomElement m_settingsElem; - - QCompleter* m_paramsCompleter; - QStringListModel* m_completerModel; - - friend class CarlaInstrumentView; - friend class CarlaParamsView; -}; - - // ------------------------------------------------------------------- class CarlaInstrumentView : public InstrumentViewFixedSize @@ -365,4 +376,9 @@ private: QStringListModel* m_groupFilterModel; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/CarlaPatchbay/CarlaPatchbay.cpp b/plugins/CarlaPatchbay/CarlaPatchbay.cpp index 0c9ca9f01..7f5b2060e 100644 --- a/plugins/CarlaPatchbay/CarlaPatchbay.cpp +++ b/plugins/CarlaPatchbay/CarlaPatchbay.cpp @@ -28,6 +28,10 @@ #include "plugin_export.h" #include "InstrumentTrack.h" +namespace lmms +{ + + extern "C" { @@ -51,3 +55,6 @@ PLUGIN_EXPORT Plugin* lmms_plugin_main(Model* m, void*) } } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/CarlaRack/CarlaRack.cpp b/plugins/CarlaRack/CarlaRack.cpp index d8f0ac978..ad2dd00b8 100644 --- a/plugins/CarlaRack/CarlaRack.cpp +++ b/plugins/CarlaRack/CarlaRack.cpp @@ -28,6 +28,10 @@ #include "plugin_export.h" #include "InstrumentTrack.h" +namespace lmms +{ + + extern "C" { @@ -51,3 +55,6 @@ PLUGIN_EXPORT Plugin* lmms_plugin_main(Model* m, void*) } } + + +} // namespace lmms diff --git a/plugins/Compressor/Compressor.cpp b/plugins/Compressor/Compressor.cpp index 6728f403f..606888633 100755 --- a/plugins/Compressor/Compressor.cpp +++ b/plugins/Compressor/Compressor.cpp @@ -29,6 +29,10 @@ #include "lmms_math.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -662,3 +666,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main(Model* parent, void* data) } + +} // namespace lmms diff --git a/plugins/Compressor/Compressor.h b/plugins/Compressor/Compressor.h index 374f3f8b6..9b81d9b70 100755 --- a/plugins/Compressor/Compressor.h +++ b/plugins/Compressor/Compressor.h @@ -31,6 +31,10 @@ #include "Effect.h" +namespace lmms +{ + + constexpr float COMP_LOG = -2.2; class CompressorEffect : public Effect @@ -145,7 +149,10 @@ private: bool m_redrawThreshold = true; friend class CompressorControls; - friend class CompressorControlDialog; + friend class gui::CompressorControlDialog; } ; + +} // namespace lmms + #endif diff --git a/plugins/Compressor/CompressorControlDialog.cpp b/plugins/Compressor/CompressorControlDialog.cpp index 106aa7a1d..2f9fed9c2 100755 --- a/plugins/Compressor/CompressorControlDialog.cpp +++ b/plugins/Compressor/CompressorControlDialog.cpp @@ -39,6 +39,10 @@ #include "MainWindow.h" #include "PixmapButton.h" +namespace lmms::gui +{ + + CompressorControlDialog::CompressorControlDialog(CompressorControls* controls) : EffectControlDialog(controls), m_controls(controls), @@ -762,3 +766,6 @@ void CompressorControlDialog::resetCompressorView() m_autoReleaseKnob->move(m_controlsBoxX + 590, m_controlsBoxY + 38); lookaheadButton->move(m_controlsBoxX + 202, m_controlsBoxY + 171); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Compressor/CompressorControlDialog.h b/plugins/Compressor/CompressorControlDialog.h index f20a1d220..1324d7e26 100755 --- a/plugins/Compressor/CompressorControlDialog.h +++ b/plugins/Compressor/CompressorControlDialog.h @@ -31,6 +31,18 @@ #include "EffectControlDialog.h" +class QLabel; + +namespace lmms +{ + +constexpr float COMP_NOISE_FLOOR = 0.000001;// -120 dbFs + +class CompressorControls; + + +namespace gui +{ constexpr int COMP_MILLI_PER_PIXEL = 6; constexpr int MIN_COMP_SCREEN_X = 800; @@ -47,16 +59,11 @@ constexpr int COMP_BOX_Y = 280; constexpr float COMP_GRID_SPACING = 3.f;// 3 db per grid line constexpr float COMP_GRID_MAX = 96.f;// Can't zoom out past 96 db -constexpr float COMP_NOISE_FLOOR = 0.000001;// -120 dbFs - - - class automatableButtonGroup; -class CompressorControls; -class EqFader; class Knob; class PixmapButton; -class QLabel; +class EqFader; + class CompressorControlDialog : public EffectControlDialog { @@ -213,4 +220,10 @@ private: friend class CompressorControls; } ; + + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Compressor/CompressorControls.cpp b/plugins/Compressor/CompressorControls.cpp index 01d44c245..81247e900 100755 --- a/plugins/Compressor/CompressorControls.cpp +++ b/plugins/Compressor/CompressorControls.cpp @@ -29,6 +29,8 @@ #include +namespace lmms +{ CompressorControls::CompressorControls(CompressorEffect* effect) : EffectControls(effect), @@ -143,3 +145,4 @@ void CompressorControls::loadSettings(const QDomElement& _this) } +} // namespace lmms \ No newline at end of file diff --git a/plugins/Compressor/CompressorControls.h b/plugins/Compressor/CompressorControls.h index 233b89ddf..852781f38 100755 --- a/plugins/Compressor/CompressorControls.h +++ b/plugins/Compressor/CompressorControls.h @@ -29,6 +29,8 @@ #include "EffectControls.h" +namespace lmms +{ class CompressorEffect; @@ -51,9 +53,9 @@ public: return 28; } - EffectControlDialog* createView() override + gui::EffectControlDialog* createView() override { - return new CompressorControlDialog(this); + return new gui::CompressorControlDialog(this); } private: @@ -93,9 +95,12 @@ private: float m_outPeakL; float m_outPeakR; - friend class CompressorControlDialog; + friend class gui::CompressorControlDialog; friend class CompressorEffect; } ; + +} // namespace lmms + #endif diff --git a/plugins/CrossoverEQ/CrossoverEQ.cpp b/plugins/CrossoverEQ/CrossoverEQ.cpp index 92a3f6a6d..d915afc23 100644 --- a/plugins/CrossoverEQ/CrossoverEQ.cpp +++ b/plugins/CrossoverEQ/CrossoverEQ.cpp @@ -29,6 +29,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -222,3 +226,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/CrossoverEQ/CrossoverEQ.h b/plugins/CrossoverEQ/CrossoverEQ.h index d1f76c1e6..4e5872f0c 100644 --- a/plugins/CrossoverEQ/CrossoverEQ.h +++ b/plugins/CrossoverEQ/CrossoverEQ.h @@ -31,6 +31,10 @@ #include "CrossoverEQControls.h" #include "BasicFilters.h" +namespace lmms +{ + + class CrossoverEQEffect : public Effect { public: @@ -74,4 +78,7 @@ private: friend class CrossoverEQControls; }; + +} // namespace lmms + #endif diff --git a/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp b/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp index 7cf2d0c5b..225068177 100644 --- a/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp +++ b/plugins/CrossoverEQ/CrossoverEQControlDialog.cpp @@ -32,6 +32,10 @@ #include "Knob.h" #include "Fader.h" +namespace lmms::gui +{ + + CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * controls ) : EffectControlDialog( controls ) { @@ -110,3 +114,6 @@ CrossoverEQControlDialog::CrossoverEQControlDialog( CrossoverEQControls * contro mute4->setModel( & controls->m_mute4 ); mute4->setToolTip(tr("Mute band 4")); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/CrossoverEQ/CrossoverEQControlDialog.h b/plugins/CrossoverEQ/CrossoverEQControlDialog.h index e1e9f013d..f28366557 100644 --- a/plugins/CrossoverEQ/CrossoverEQControlDialog.h +++ b/plugins/CrossoverEQ/CrossoverEQControlDialog.h @@ -30,8 +30,16 @@ #include #include "EffectControlDialog.h" +namespace lmms +{ + + class CrossoverEQControls; + +namespace gui +{ + class CrossoverEQControlDialog : public EffectControlDialog { Q_OBJECT @@ -47,4 +55,9 @@ private: QPixmap m_fader_knob; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/CrossoverEQ/CrossoverEQControls.cpp b/plugins/CrossoverEQ/CrossoverEQControls.cpp index 19c1163a3..9758d804a 100644 --- a/plugins/CrossoverEQ/CrossoverEQControls.cpp +++ b/plugins/CrossoverEQ/CrossoverEQControls.cpp @@ -27,6 +27,10 @@ #include "CrossoverEQControls.h" #include "CrossoverEQ.h" +namespace lmms +{ + + CrossoverEQControls::CrossoverEQControls( CrossoverEQEffect * eff ) : EffectControls( eff ), m_effect( eff ), @@ -115,3 +119,6 @@ void CrossoverEQControls::sampleRateChanged() { m_effect->sampleRateChanged(); } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/CrossoverEQ/CrossoverEQControls.h b/plugins/CrossoverEQ/CrossoverEQControls.h index 3823a8370..7f9417365 100644 --- a/plugins/CrossoverEQ/CrossoverEQControls.h +++ b/plugins/CrossoverEQ/CrossoverEQControls.h @@ -30,6 +30,9 @@ #include "EffectControls.h" #include "CrossoverEQControlDialog.h" +namespace lmms +{ + class CrossoverEQEffect; class CrossoverEQControls : public EffectControls @@ -51,9 +54,9 @@ public: return( 11 ); } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog * createView() { - return( new CrossoverEQControlDialog( this ) ); + return( new gui::CrossoverEQControlDialog( this ) ); } private slots: @@ -79,8 +82,11 @@ private: BoolModel m_mute3; BoolModel m_mute4; - friend class CrossoverEQControlDialog; + friend class gui::CrossoverEQControlDialog; friend class CrossoverEQEffect; }; + +} // namespace lmms + #endif diff --git a/plugins/Delay/DelayControls.cpp b/plugins/Delay/DelayControls.cpp index d4b3220a9..b31488f72 100644 --- a/plugins/Delay/DelayControls.cpp +++ b/plugins/Delay/DelayControls.cpp @@ -28,6 +28,9 @@ #include "DelayEffect.h" #include "Engine.h" +namespace lmms +{ + DelayControls::DelayControls( DelayEffect* effect ): EffectControls( effect ), m_effect ( effect ), @@ -72,3 +75,6 @@ void DelayControls::changeSampleRate() { m_effect->changeSampleRate(); } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Delay/DelayControls.h b/plugins/Delay/DelayControls.h index c912a453e..4f4b193f4 100644 --- a/plugins/Delay/DelayControls.h +++ b/plugins/Delay/DelayControls.h @@ -28,10 +28,13 @@ #include "EffectControls.h" #include "DelayControlsDialog.h" +namespace lmms +{ class DelayEffect; + class DelayControls : public EffectControls { Q_OBJECT @@ -49,9 +52,9 @@ public: virtual int controlCount(){ return 5; } - virtual EffectControlDialog* createView() + virtual gui::EffectControlDialog* createView() { - return new DelayControlsDialog( this ); + return new gui::DelayControlsDialog( this ); } float m_outPeakL; @@ -69,8 +72,11 @@ private: TempoSyncKnobModel m_lfoAmountModel; FloatModel m_outGainModel; - friend class DelayControlsDialog; + friend class gui::DelayControlsDialog; friend class DelayEffect; }; + +} // namespace lmms + #endif // DELAYCONTROLS_H diff --git a/plugins/Delay/DelayControlsDialog.cpp b/plugins/Delay/DelayControlsDialog.cpp index db59b3f39..0354667f5 100755 --- a/plugins/Delay/DelayControlsDialog.cpp +++ b/plugins/Delay/DelayControlsDialog.cpp @@ -31,7 +31,8 @@ #include #include - +namespace lmms::gui +{ DelayControlsDialog::DelayControlsDialog( DelayControls *controls ) : @@ -152,3 +153,6 @@ void XyPad::mouseMoveEvent(QMouseEvent *event) m_yModel->setValue( m_yModel->minValue() + ( event->y() * yInc ) ); } } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Delay/DelayControlsDialog.h b/plugins/Delay/DelayControlsDialog.h index 4b2c0af41..9ab349d4e 100644 --- a/plugins/Delay/DelayControlsDialog.h +++ b/plugins/Delay/DelayControlsDialog.h @@ -27,9 +27,16 @@ #include "EffectControlDialog.h" +namespace lmms +{ + + class DelayControls; class FloatModel; +namespace gui +{ + class DelayControlsDialog : public EffectControlDialog { Q_OBJECT @@ -59,4 +66,9 @@ private: bool m_acceptInput; }; + +} // namespace gui + +} // namespace lmms + #endif // DELAYCONTROLSDIALOG_H diff --git a/plugins/Delay/DelayEffect.cpp b/plugins/Delay/DelayEffect.cpp index 1377498b0..5ce29f8ec 100644 --- a/plugins/Delay/DelayEffect.cpp +++ b/plugins/Delay/DelayEffect.cpp @@ -30,6 +30,10 @@ #include "plugin_export.h" #include "StereoDelay.h" +namespace lmms +{ + + extern "C" { @@ -166,3 +170,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) }} + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Delay/DelayEffect.h b/plugins/Delay/DelayEffect.h index c409458ed..2757d6cc4 100644 --- a/plugins/Delay/DelayEffect.h +++ b/plugins/Delay/DelayEffect.h @@ -28,6 +28,9 @@ #include "Effect.h" #include "DelayControls.h" +namespace lmms +{ + class Lfo; class StereoDelay; @@ -51,4 +54,7 @@ private: float m_currentLength; }; + +} // namespace lmms + #endif // DELAYEFFECT_H diff --git a/plugins/Delay/Lfo.cpp b/plugins/Delay/Lfo.cpp index 0360263ef..5a449243a 100644 --- a/plugins/Delay/Lfo.cpp +++ b/plugins/Delay/Lfo.cpp @@ -26,7 +26,8 @@ #include - +namespace lmms +{ Lfo::Lfo( int samplerate ) @@ -45,3 +46,6 @@ float Lfo::tick() return output; } + + +} // namespace lmms diff --git a/plugins/Delay/Lfo.h b/plugins/Delay/Lfo.h index 10b7e2fc0..cb2d13f11 100644 --- a/plugins/Delay/Lfo.h +++ b/plugins/Delay/Lfo.h @@ -28,6 +28,10 @@ #include "lmms_constants.h" +namespace lmms +{ + + class Lfo { public: @@ -77,4 +81,7 @@ private: int m_samplerate; }; + +} // namespace lmms + #endif // LFO_H diff --git a/plugins/Delay/StereoDelay.cpp b/plugins/Delay/StereoDelay.cpp index bdbd63404..e4b8b5641 100644 --- a/plugins/Delay/StereoDelay.cpp +++ b/plugins/Delay/StereoDelay.cpp @@ -25,6 +25,9 @@ #include "StereoDelay.h" #include "lmms_basics.h" +namespace lmms +{ + StereoDelay::StereoDelay( int maxTime, int sampleRate ) { @@ -87,7 +90,4 @@ void StereoDelay::setSampleRate( int sampleRate ) } - - - - +} // namespace lmms diff --git a/plugins/Delay/StereoDelay.h b/plugins/Delay/StereoDelay.h index afea59b9a..0ea0efeed 100644 --- a/plugins/Delay/StereoDelay.h +++ b/plugins/Delay/StereoDelay.h @@ -27,6 +27,10 @@ #include "lmms_basics.h" + +namespace lmms +{ + class StereoDelay { public: @@ -57,4 +61,7 @@ private: float m_maxTime; }; + +} // namespace lmms + #endif // STEREODELAY_H diff --git a/plugins/DualFilter/DualFilter.cpp b/plugins/DualFilter/DualFilter.cpp index 19bed5436..2279ae37d 100644 --- a/plugins/DualFilter/DualFilter.cpp +++ b/plugins/DualFilter/DualFilter.cpp @@ -29,6 +29,10 @@ #include "BasicFilters.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -229,3 +233,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } + +} // namespace lmms diff --git a/plugins/DualFilter/DualFilter.h b/plugins/DualFilter/DualFilter.h index a8eb82075..bfc9dc81b 100644 --- a/plugins/DualFilter/DualFilter.h +++ b/plugins/DualFilter/DualFilter.h @@ -31,6 +31,10 @@ #include "DualFilterControls.h" #include "BasicFilters.h" +namespace lmms +{ + + class DualFilterEffect : public Effect { public: @@ -62,4 +66,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/plugins/DualFilter/DualFilterControlDialog.cpp b/plugins/DualFilter/DualFilterControlDialog.cpp index c6c56befd..0b23f4b8a 100755 --- a/plugins/DualFilter/DualFilterControlDialog.cpp +++ b/plugins/DualFilter/DualFilterControlDialog.cpp @@ -31,12 +31,16 @@ #include "ComboBox.h" #include "gui_templates.h" +namespace lmms::gui +{ + + #define makeknob( name, x, y, model, label, hint, unit ) \ Knob * name = new Knob( knobBright_26, this); \ - name -> move( x, y ); \ - name ->setModel( &controls-> model ); \ - name ->setLabel( label ); \ - name ->setHintText( hint, unit ); + (name) -> move( x, y ); \ + (name) ->setModel( &controls-> model ); \ + (name) ->setLabel( label ); \ + (name) ->setHintText( hint, unit ); @@ -83,3 +87,5 @@ DualFilterControlDialog::DualFilterControlDialog( DualFilterControls* controls ) m_filter2ComboBox->setModel( &controls->m_filter2Model ); } + +} // namespace lmms::gui diff --git a/plugins/DualFilter/DualFilterControlDialog.h b/plugins/DualFilter/DualFilterControlDialog.h index f839864d8..a6ac46954 100644 --- a/plugins/DualFilter/DualFilterControlDialog.h +++ b/plugins/DualFilter/DualFilterControlDialog.h @@ -28,9 +28,15 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class DualFilterControls; +namespace gui +{ + class DualFilterControlDialog : public EffectControlDialog { @@ -43,4 +49,9 @@ public: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/DualFilter/DualFilterControls.cpp b/plugins/DualFilter/DualFilterControls.cpp index 7d54c7c78..e862e6ae1 100644 --- a/plugins/DualFilter/DualFilterControls.cpp +++ b/plugins/DualFilter/DualFilterControls.cpp @@ -32,6 +32,10 @@ #include "embed.h" #include "Engine.h" +namespace lmms +{ + + DualFilterControls::DualFilterControls( DualFilterEffect* effect ) : EffectControls( effect ), m_effect( effect ), @@ -156,6 +160,4 @@ void DualFilterControls::saveSettings( QDomDocument& _doc, QDomElement& _this ) } - - - +} // namespace lmms diff --git a/plugins/DualFilter/DualFilterControls.h b/plugins/DualFilter/DualFilterControls.h index 9713f657a..586b2d15a 100644 --- a/plugins/DualFilter/DualFilterControls.h +++ b/plugins/DualFilter/DualFilterControls.h @@ -30,6 +30,10 @@ #include "DualFilterControlDialog.h" #include "ComboBoxModel.h" +namespace lmms +{ + + class DualFilterEffect; @@ -54,9 +58,9 @@ public: return 11; } - virtual EffectControlDialog* createView() + virtual gui::EffectControlDialog* createView() { - return new DualFilterControlDialog( this ); + return new gui::DualFilterControlDialog( this ); } @@ -80,9 +84,12 @@ private: FloatModel m_res2Model; FloatModel m_gain2Model; - friend class DualFilterControlDialog; + friend class gui::DualFilterControlDialog; friend class DualFilterEffect; } ; + +} // namespace lmms + #endif diff --git a/plugins/DynamicsProcessor/DynamicsProcessor.cpp b/plugins/DynamicsProcessor/DynamicsProcessor.cpp index 5ead265b2..85f1d94f4 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessor.cpp +++ b/plugins/DynamicsProcessor/DynamicsProcessor.cpp @@ -32,6 +32,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -244,3 +248,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data ) } + +} // namespace lmms diff --git a/plugins/DynamicsProcessor/DynamicsProcessor.h b/plugins/DynamicsProcessor/DynamicsProcessor.h index 34e10287c..91763e682 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessor.h +++ b/plugins/DynamicsProcessor/DynamicsProcessor.h @@ -30,6 +30,9 @@ #include "Effect.h" #include "DynamicsProcessorControls.h" +namespace lmms +{ + class RmsHelper; @@ -68,7 +71,6 @@ private: } ; - - +} // namespace lmms #endif diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp index e8ac87ab5..fb0fee445 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp +++ b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.cpp @@ -32,6 +32,9 @@ #include "Knob.h" #include "PixmapButton.h" +namespace lmms::gui +{ + DynProcControlDialog::DynProcControlDialog( DynProcControls * _controls ) : @@ -151,3 +154,5 @@ DynProcControlDialog::DynProcControlDialog( _controls, SLOT( subOneClicked() ) ); } + +} // namespace lmms::gui diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h index 29f8288c8..0b4091b30 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h +++ b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h @@ -28,10 +28,16 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class DynProcControls; +namespace gui +{ + class DynProcControlDialog : public EffectControlDialog { Q_OBJECT @@ -46,4 +52,9 @@ private: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControls.cpp b/plugins/DynamicsProcessor/DynamicsProcessorControls.cpp index 263a2a793..f4bd8c77a 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControls.cpp +++ b/plugins/DynamicsProcessor/DynamicsProcessorControls.cpp @@ -33,6 +33,9 @@ #include "Engine.h" #include "Song.h" +namespace lmms +{ + #define onedB 1.1220184543019633f @@ -154,5 +157,4 @@ void DynProcControls::subOneClicked() } - - +} // namespace lmms diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControls.h b/plugins/DynamicsProcessor/DynamicsProcessorControls.h index a292b3f9a..cb9aebb6a 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControls.h +++ b/plugins/DynamicsProcessor/DynamicsProcessorControls.h @@ -30,6 +30,10 @@ #include "DynamicsProcessorControlDialog.h" #include "Graph.h" +namespace lmms +{ + + class DynProcEffect; @@ -63,9 +67,9 @@ public: return( 6 ); } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog * createView() { - return( new DynProcControlDialog( this ) ); + return( new gui::DynProcControlDialog( this ) ); } @@ -89,9 +93,12 @@ private: graphModel m_wavegraphModel; IntModel m_stereomodeModel; - friend class DynProcControlDialog; + friend class gui::DynProcControlDialog; friend class DynProcEffect; } ; + +} // namespace lmms + #endif diff --git a/plugins/Eq/EqControls.cpp b/plugins/Eq/EqControls.cpp index f33a64675..ad1ffa2ac 100644 --- a/plugins/Eq/EqControls.cpp +++ b/plugins/Eq/EqControls.cpp @@ -30,6 +30,9 @@ #include "EqEffect.h" +namespace lmms +{ + EqControls::EqControls( EqEffect *effect ) : EffectControls( effect ), @@ -149,9 +152,9 @@ void EqControls::loadSettings( const QDomElement &_this ) m_analyseOutModel.loadSettings( _this, "AnalyseOut" ); } -EffectControlDialog*EqControls::createView() +gui::EffectControlDialog* EqControls::createView() { - return new EqControlsDialog( this ); + return new gui::EqControlsDialog( this ); } @@ -202,3 +205,6 @@ void EqControls::saveSettings( QDomDocument &doc, QDomElement &parent ) m_analyseInModel.saveSettings( doc, parent, "AnalyseIn" ); m_analyseOutModel.saveSettings( doc, parent, "AnalyseOut" ); } + + +} // namespace lmms diff --git a/plugins/Eq/EqControls.h b/plugins/Eq/EqControls.h index b314454ea..8a2061cce 100644 --- a/plugins/Eq/EqControls.h +++ b/plugins/Eq/EqControls.h @@ -28,9 +28,17 @@ #include "EffectControls.h" #include "EqSpectrumView.h" +namespace lmms +{ + class EqEffect; +namespace gui +{ +class EqControlsDialog; +} + class EqControls : public EffectControls { Q_OBJECT @@ -54,7 +62,7 @@ public: return 42; } - virtual EffectControlDialog* createView(); + virtual gui::EffectControlDialog* createView(); float m_inPeakL; float m_inPeakR; @@ -126,7 +134,11 @@ private: BoolModel m_analyseInModel; BoolModel m_analyseOutModel; - friend class EqControlsDialog; + friend class gui::EqControlsDialog; friend class EqEffect; }; + + +} // namespace lmms + #endif // EQCONTROLS_H diff --git a/plugins/Eq/EqControlsDialog.cpp b/plugins/Eq/EqControlsDialog.cpp index 57fdee6f3..c044e2b80 100644 --- a/plugins/Eq/EqControlsDialog.cpp +++ b/plugins/Eq/EqControlsDialog.cpp @@ -38,6 +38,9 @@ #include "EqParameterWidget.h" #include "EqSpectrumView.h" +namespace lmms::gui +{ + EqControlsDialog::EqControlsDialog( EqControls *controls ) : EffectControlDialog( controls ), @@ -234,3 +237,6 @@ EqBand* EqControlsDialog::setBand(int index, BoolModel* active, FloatModel* freq filterModels->lp48 = lp48; return filterModels; } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Eq/EqControlsDialog.h b/plugins/Eq/EqControlsDialog.h index b79354355..297737699 100644 --- a/plugins/Eq/EqControlsDialog.h +++ b/plugins/Eq/EqControlsDialog.h @@ -28,10 +28,17 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class BoolModel; class FloatModel; class EqControls; + +namespace gui +{ + class EqBand; class EqParameterWidget; @@ -57,4 +64,9 @@ private: int m_originalHeight; }; + +} // namespace gui + +} // namespace lmms + #endif // EQCONTROLSDIALOG_H diff --git a/plugins/Eq/EqCurve.cpp b/plugins/Eq/EqCurve.cpp index be664b774..704231284 100644 --- a/plugins/Eq/EqCurve.cpp +++ b/plugins/Eq/EqCurve.cpp @@ -33,6 +33,10 @@ #include "lmms_constants.h" +namespace lmms::gui +{ + + EqHandle::EqHandle( int num, int x, int y ): m_numb( num ), m_width( x ), @@ -815,3 +819,6 @@ void EqCurve::setModelChanged( bool mc ) { m_modelChanged = mc; } + + +} // namespace lmms::gui diff --git a/plugins/Eq/EqCurve.h b/plugins/Eq/EqCurve.h index 6bc3f8871..c7e7d0688 100644 --- a/plugins/Eq/EqCurve.h +++ b/plugins/Eq/EqCurve.h @@ -28,6 +28,9 @@ #include +namespace lmms::gui +{ + enum{ highpass=1, @@ -134,4 +137,7 @@ private: float m_scale; }; + +} // namespace lmms::gui + #endif // EQCURVE_H diff --git a/plugins/Eq/EqEffect.cpp b/plugins/Eq/EqEffect.cpp index 3b46143e6..7a9b5b15e 100644 --- a/plugins/Eq/EqEffect.cpp +++ b/plugins/Eq/EqEffect.cpp @@ -30,6 +30,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -363,3 +367,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Eq/EqEffect.h b/plugins/Eq/EqEffect.h index b94ddef26..3697a11e2 100644 --- a/plugins/Eq/EqEffect.h +++ b/plugins/Eq/EqEffect.h @@ -28,6 +28,8 @@ #include "EqControls.h" #include "EqFilter.h" +namespace lmms +{ class EqEffect : public Effect @@ -95,4 +97,7 @@ private: void setBandPeaks( EqAnalyser * fft , int ); }; + +} // namespace lmms + #endif // EQEFFECT_H diff --git a/plugins/Eq/EqFader.h b/plugins/Eq/EqFader.h index 0df66f7b7..1601081e9 100644 --- a/plugins/Eq/EqFader.h +++ b/plugins/Eq/EqFader.h @@ -32,6 +32,9 @@ #include "MainWindow.h" #include "TextFloat.h" +namespace lmms::gui +{ + class EqFader : public Fader { @@ -112,4 +115,8 @@ private: FloatModel* m_model; }; + + +} // namespace lmms::gui + #endif // EQFADER_H diff --git a/plugins/Eq/EqFilter.h b/plugins/Eq/EqFilter.h index 5223fdeda..7361c751c 100644 --- a/plugins/Eq/EqFilter.h +++ b/plugins/Eq/EqFilter.h @@ -28,6 +28,10 @@ #include "BasicFilters.h" #include "lmms_math.h" +namespace lmms +{ + + /// /// \brief The EqFilter class. /// A wrapper for the StereoBiQuad class, giving it freq, res, and gain controls. @@ -454,6 +458,7 @@ protected: }; +} // namespace lmms #endif // EQFILTER_H diff --git a/plugins/Eq/EqParameterWidget.cpp b/plugins/Eq/EqParameterWidget.cpp index a919f2773..393421291 100644 --- a/plugins/Eq/EqParameterWidget.cpp +++ b/plugins/Eq/EqParameterWidget.cpp @@ -38,6 +38,9 @@ #include "lmms_constants.h" +namespace lmms::gui +{ + EqParameterWidget::EqParameterWidget( QWidget *parent, EqControls * controls ) : QWidget( parent ), @@ -245,3 +248,6 @@ EqBand::EqBand() : peakR( 0 ) { } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Eq/EqParameterWidget.h b/plugins/Eq/EqParameterWidget.h index 28d01efbe..abfe5a9bb 100644 --- a/plugins/Eq/EqParameterWidget.h +++ b/plugins/Eq/EqParameterWidget.h @@ -30,11 +30,19 @@ #include +namespace lmms +{ + class BoolModel; class EqControls; +class FloatModel; + + +namespace gui +{ + class EqCurve; class EqHandle; -class FloatModel; class EqBand { @@ -93,4 +101,10 @@ private slots: void updateModels(); void updateHandle(); }; + + +} // namespace gui + +} // namespace lmms + #endif // EQPARAMETERWIDGET_H diff --git a/plugins/Eq/EqSpectrumView.cpp b/plugins/Eq/EqSpectrumView.cpp index e65a12ea9..24e812049 100644 --- a/plugins/Eq/EqSpectrumView.cpp +++ b/plugins/Eq/EqSpectrumView.cpp @@ -33,6 +33,10 @@ #include "MainWindow.h" #include "lmms_constants.h" +namespace lmms +{ + + EqAnalyser::EqAnalyser() : m_framesFilledUp ( 0 ), m_energy ( 0 ), @@ -176,6 +180,8 @@ void EqAnalyser::clear() +namespace gui +{ EqSpectrumView::EqSpectrumView(EqAnalyser *b, QWidget *_parent) : QWidget( _parent ), @@ -298,3 +304,8 @@ void EqSpectrumView::periodicalUpdate() m_analyser->setActive( isVisible() ); update(); } + + +} // namespace gui + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Eq/EqSpectrumView.h b/plugins/Eq/EqSpectrumView.h index 40a24868d..c9bfebeb5 100644 --- a/plugins/Eq/EqSpectrumView.h +++ b/plugins/Eq/EqSpectrumView.h @@ -29,6 +29,9 @@ #include "fft_helpers.h" #include "lmms_basics.h" +namespace lmms +{ + const int MAX_BANDS = 2048; class EqAnalyser @@ -63,7 +66,8 @@ private: }; - +namespace gui +{ class EqSpectrumView : public QWidget { @@ -96,4 +100,10 @@ private: float bandToFreq ( int index ); }; + + +} // namespace gui + +} // namespace lmms + #endif // EQSPECTRUMVIEW_H diff --git a/plugins/Flanger/FlangerControls.cpp b/plugins/Flanger/FlangerControls.cpp index 1b4007b38..7402216ee 100644 --- a/plugins/Flanger/FlangerControls.cpp +++ b/plugins/Flanger/FlangerControls.cpp @@ -29,6 +29,8 @@ #include "Engine.h" #include "Song.h" +namespace lmms +{ FlangerControls::FlangerControls( FlangerEffect *effect ) : @@ -91,3 +93,6 @@ void FlangerControls::changedPlaybackState() { m_effect->restartLFO(); } + + +} // namespace lmms diff --git a/plugins/Flanger/FlangerControls.h b/plugins/Flanger/FlangerControls.h index 54ef38a1c..1d112bc99 100644 --- a/plugins/Flanger/FlangerControls.h +++ b/plugins/Flanger/FlangerControls.h @@ -28,6 +28,9 @@ #include "EffectControls.h" #include "FlangerControlsDialog.h" +namespace lmms +{ + class FlangerEffect; @@ -49,9 +52,9 @@ public: { return 7; } - virtual EffectControlDialog* createView() + virtual gui::EffectControlDialog* createView() { - return new FlangerControlsDialog( this ); + return new gui::FlangerControlsDialog( this ); } private slots: @@ -68,9 +71,12 @@ private: FloatModel m_whiteNoiseAmountModel; BoolModel m_invertFeedbackModel; - friend class FlangerControlsDialog; + friend class gui::FlangerControlsDialog; friend class FlangerEffect; }; + +} // namespace lmms + #endif // FLANGERCONTROLS_H diff --git a/plugins/Flanger/FlangerControlsDialog.cpp b/plugins/Flanger/FlangerControlsDialog.cpp index 3c9b463fb..5edab2894 100644 --- a/plugins/Flanger/FlangerControlsDialog.cpp +++ b/plugins/Flanger/FlangerControlsDialog.cpp @@ -29,7 +29,8 @@ #include "LedCheckBox.h" #include "TempoSyncKnob.h" - +namespace lmms::gui +{ FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) : @@ -89,3 +90,6 @@ FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) : } + + +} // namespace lmms::gui diff --git a/plugins/Flanger/FlangerControlsDialog.h b/plugins/Flanger/FlangerControlsDialog.h index 3e27bda47..6aed1b6b4 100644 --- a/plugins/Flanger/FlangerControlsDialog.h +++ b/plugins/Flanger/FlangerControlsDialog.h @@ -27,8 +27,16 @@ #include "EffectControlDialog.h" +namespace lmms +{ + + class FlangerControls; +namespace gui +{ + + class FlangerControlsDialog : public EffectControlDialog { Q_OBJECT @@ -39,4 +47,9 @@ public: } }; + +} // namespace gui + +} // namespace lmms + #endif // FLANGERCONTROLSDIALOG_H diff --git a/plugins/Flanger/FlangerEffect.cpp b/plugins/Flanger/FlangerEffect.cpp index 2668b63c5..71cf96e18 100644 --- a/plugins/Flanger/FlangerEffect.cpp +++ b/plugins/Flanger/FlangerEffect.cpp @@ -28,6 +28,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -161,3 +165,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } }} + + +} // namespace lmms diff --git a/plugins/Flanger/FlangerEffect.h b/plugins/Flanger/FlangerEffect.h index 630513ade..d32429194 100644 --- a/plugins/Flanger/FlangerEffect.h +++ b/plugins/Flanger/FlangerEffect.h @@ -36,6 +36,9 @@ class MonoDelay; class Noise; class QuadratureLfo; +namespace lmms +{ + class FlangerEffect : public Effect { @@ -59,4 +62,7 @@ private: }; + +} // namespace lmms + #endif // FLANGEREFFECT_H diff --git a/plugins/Flanger/MonoDelay.cpp b/plugins/Flanger/MonoDelay.cpp index d43e5b99d..3ec028968 100644 --- a/plugins/Flanger/MonoDelay.cpp +++ b/plugins/Flanger/MonoDelay.cpp @@ -25,6 +25,10 @@ #include "MonoDelay.h" #include "string.h" +namespace lmms +{ + + MonoDelay::MonoDelay( int maxTime , int sampleRate ) { m_buffer = 0; @@ -74,3 +78,6 @@ void MonoDelay::setSampleRate( int sampleRate ) m_buffer = new sample_t[( int )( sampleRate * m_maxTime ) ]; memset( m_buffer, 0, sizeof(float) * ( int )( sampleRate * m_maxTime ) ); } + + +} // namespace lmms diff --git a/plugins/Flanger/MonoDelay.h b/plugins/Flanger/MonoDelay.h index 52898bfe4..2e9324a7d 100644 --- a/plugins/Flanger/MonoDelay.h +++ b/plugins/Flanger/MonoDelay.h @@ -27,6 +27,10 @@ #include "lmms_basics.h" +namespace lmms +{ + + class MonoDelay { public: @@ -57,4 +61,7 @@ private: float m_maxTime; }; + +} // namespace lmms + #endif // MONODELAY_H diff --git a/plugins/Flanger/Noise.cpp b/plugins/Flanger/Noise.cpp index f2acb16fe..263fb7c45 100644 --- a/plugins/Flanger/Noise.cpp +++ b/plugins/Flanger/Noise.cpp @@ -25,6 +25,10 @@ #include "Noise.h" #include "lmms_math.h" +namespace lmms +{ + + Noise::Noise() { inv_randmax = 1.0/FAST_RAND_MAX; /* for range of 0 - 1.0 */ @@ -37,3 +41,6 @@ float Noise::tick() { return (float) ((2.0 * fast_rand() * inv_randmax) - 1.0); } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Flanger/Noise.h b/plugins/Flanger/Noise.h index 9a3106f3e..9f6e2f2e1 100644 --- a/plugins/Flanger/Noise.h +++ b/plugins/Flanger/Noise.h @@ -25,6 +25,10 @@ #ifndef NOISE_H #define NOISE_H +namespace lmms +{ + + class Noise { public: @@ -34,4 +38,7 @@ private: double inv_randmax; }; + +} // namespace lmms + #endif // NOISE_H diff --git a/plugins/FreeBoy/FreeBoy.cpp b/plugins/FreeBoy/FreeBoy.cpp index 55c7dd79b..67a7ac019 100644 --- a/plugins/FreeBoy/FreeBoy.cpp +++ b/plugins/FreeBoy/FreeBoy.cpp @@ -41,6 +41,10 @@ #include "plugin_export.h" +namespace lmms +{ + + const blip_time_t FRAME_LENGTH = 70224; const long CLOCK_RATE = 4194304; @@ -427,12 +431,16 @@ void FreeBoyInstrument::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * FreeBoyInstrument::instantiateView( QWidget * _parent ) +gui::PluginView * FreeBoyInstrument::instantiateView( QWidget * _parent ) { - return( new FreeBoyInstrumentView( this, _parent ) ); + return( new gui::FreeBoyInstrumentView( this, _parent ) ); } +namespace gui +{ + + class FreeBoyKnob : public Knob { public: @@ -721,6 +729,9 @@ void FreeBoyInstrumentView::modelChanged() m_graph->setModel( &p->m_graphModel ); } + +} // namespace gui + extern "C" { @@ -735,3 +746,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } +} // namespace lmms \ No newline at end of file diff --git a/plugins/FreeBoy/FreeBoy.h b/plugins/FreeBoy/FreeBoy.h index a6bef0af2..6f92b41e9 100644 --- a/plugins/FreeBoy/FreeBoy.h +++ b/plugins/FreeBoy/FreeBoy.h @@ -32,10 +32,19 @@ #include "InstrumentView.h" #include "Graph.h" +namespace lmms +{ + +class NotePlayHandle; + + +namespace gui +{ +class PixmapButton; class FreeBoyInstrumentView; class Knob; -class NotePlayHandle; -class PixmapButton; +} + class FreeBoyInstrument : public Instrument { @@ -57,7 +66,7 @@ public: virtual f_cnt_t desiredReleaseFrames() const; - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); /*public slots: @@ -107,10 +116,14 @@ private: blip_time_t m_time; blip_time_t fakeClock() { return m_time += 4; } - friend class FreeBoyInstrumentView; + friend class gui::FreeBoyInstrumentView; } ; +namespace gui +{ + + class FreeBoyInstrumentView : public InstrumentViewFixedSize { Q_OBJECT @@ -162,4 +175,8 @@ private: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/FreeBoy/Gb_Apu_Buffer.cpp b/plugins/FreeBoy/Gb_Apu_Buffer.cpp index 0cd8662ac..f261bc9c0 100644 --- a/plugins/FreeBoy/Gb_Apu_Buffer.cpp +++ b/plugins/FreeBoy/Gb_Apu_Buffer.cpp @@ -22,6 +22,10 @@ */ #include "Gb_Apu_Buffer.h" +namespace lmms +{ + + Gb_Apu_Buffer::Gb_Apu_Buffer() {} Gb_Apu_Buffer::~Gb_Apu_Buffer() {} @@ -51,3 +55,5 @@ void Gb_Apu_Buffer::bass_freq(int freq) { m_buf.bass_freq(freq); } + +} // namespace lmms diff --git a/plugins/FreeBoy/Gb_Apu_Buffer.h b/plugins/FreeBoy/Gb_Apu_Buffer.h index 5228b7b8a..0b025bea0 100644 --- a/plugins/FreeBoy/Gb_Apu_Buffer.h +++ b/plugins/FreeBoy/Gb_Apu_Buffer.h @@ -27,6 +27,10 @@ #include "Multi_Buffer.h" #include "MemoryManager.h" +namespace lmms +{ + + class Gb_Apu_Buffer : public Gb_Apu { MM_OPERATORS public: @@ -44,5 +48,8 @@ private: Stereo_Buffer m_buf; }; + +} // namespace lmms + #endif diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index b2239d895..e3d37baa9 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -55,6 +55,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -703,9 +707,9 @@ void GigInstrument::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * GigInstrument::instantiateView( QWidget * _parent ) +gui::PluginView* GigInstrument::instantiateView( QWidget * _parent ) { - return new GigInstrumentView( this, _parent ); + return new gui::GigInstrumentView( this, _parent ); } @@ -907,6 +911,9 @@ void GigInstrument::updateSampleRate() +namespace gui +{ + class gigKnob : public Knob { @@ -1094,6 +1101,7 @@ void GigInstrumentView::showPatchDialog() } +} // namespace gui // Store information related to playing a sample from the GIG file @@ -1396,3 +1404,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } } + + +} // namespace lmms diff --git a/plugins/GigPlayer/GigPlayer.h b/plugins/GigPlayer/GigPlayer.h index 288146b60..c192ee4ae 100644 --- a/plugins/GigPlayer/GigPlayer.h +++ b/plugins/GigPlayer/GigPlayer.h @@ -41,11 +41,21 @@ #include "MemoryManager.h" #include "gig.h" -class GigInstrumentView; + +class QLabel; + + +namespace lmms +{ + + class NotePlayHandle; +namespace gui +{ class PatchesDialog; -class QLabel; +class GigInstrumentView; +} @@ -261,7 +271,7 @@ public: return IsSingleStreamed|IsNotBendable; } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); QString getCurrentPatchName(); @@ -283,8 +293,8 @@ private: // Part of the UI QString m_filename; - LcdSpinBoxModel m_bankNum; - LcdSpinBoxModel m_patchNum; + gui::LcdSpinBoxModel m_bankNum; + gui::LcdSpinBoxModel m_patchNum; FloatModel m_gain; @@ -322,7 +332,7 @@ private: // samples void addSamples( GigNote & gignote, bool wantReleaseSample ); - friend class GigInstrumentView; + friend class gui::GigInstrumentView; signals: void fileLoading(); @@ -332,6 +342,8 @@ signals: } ; +namespace gui +{ class GigInstrumentView : public InstrumentViewFixedSize @@ -367,4 +379,8 @@ protected slots: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/GigPlayer/PatchesDialog.cpp b/plugins/GigPlayer/PatchesDialog.cpp index 3d75dd216..a5066c2af 100644 --- a/plugins/GigPlayer/PatchesDialog.cpp +++ b/plugins/GigPlayer/PatchesDialog.cpp @@ -27,6 +27,9 @@ #include +namespace lmms::gui +{ + // Custom list-view item (as for numerical sort purposes...) class PatchItem : public QTreeWidgetItem @@ -408,3 +411,6 @@ void PatchesDialog::progChanged( QTreeWidgetItem * curr, QTreeWidgetItem * prev // Stabilize the form. stabilizeForm(); } + + +} // namespace lmms::gui diff --git a/plugins/GigPlayer/PatchesDialog.h b/plugins/GigPlayer/PatchesDialog.h index ae00f660a..c43b4cb5c 100644 --- a/plugins/GigPlayer/PatchesDialog.h +++ b/plugins/GigPlayer/PatchesDialog.h @@ -36,6 +36,10 @@ //---------------------------------------------------------------------------- // qsynthPresetForm -- UI wrapper form. +namespace lmms::gui +{ + + class PatchesDialog : public QDialog, private Ui::PatchesDialog { Q_OBJECT @@ -88,4 +92,7 @@ private: QLabel * m_patchLabel; }; + +} // namespace lmms::gui + #endif diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 7e13d2351..9dc0950fb 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -14,6 +14,11 @@ #include "plugin_export.h" #define MAX_LAYERS 4 + +namespace lmms +{ + + extern "C" { @@ -351,3 +356,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data ) } + +} // namespace lmms diff --git a/plugins/HydrogenImport/HydrogenImport.h b/plugins/HydrogenImport/HydrogenImport.h index d19d1e8dd..657d61f0c 100644 --- a/plugins/HydrogenImport/HydrogenImport.h +++ b/plugins/HydrogenImport/HydrogenImport.h @@ -5,6 +5,9 @@ #include "ImportFilter.h" +namespace lmms +{ + class HydrogenImport : public ImportFilter { @@ -14,12 +17,16 @@ public: virtual ~HydrogenImport(); - virtual PluginView * instantiateView( QWidget * ) + virtual gui::PluginView* instantiateView( QWidget * ) { return( nullptr ); } private: virtual bool tryImport( TrackContainer* tc ); }; + + +} // namespace lmms + #endif diff --git a/plugins/HydrogenImport/LocalFileMng.h b/plugins/HydrogenImport/LocalFileMng.h index 217f95f34..0aaf7d1c8 100644 --- a/plugins/HydrogenImport/LocalFileMng.h +++ b/plugins/HydrogenImport/LocalFileMng.h @@ -7,6 +7,10 @@ #include #include +namespace lmms +{ + + class LocalFileMng { public: @@ -25,5 +29,9 @@ public: static QDomDocument openXmlDocument( const QString& filename ); std::vector m_allPatternList; }; + + +} // namespace lmms + #endif //LFILEMNG_H diff --git a/plugins/HydrogenImport/local_file_mgr.cpp b/plugins/HydrogenImport/local_file_mgr.cpp index 3ca6572a9..227440501 100644 --- a/plugins/HydrogenImport/local_file_mgr.cpp +++ b/plugins/HydrogenImport/local_file_mgr.cpp @@ -8,6 +8,9 @@ #include "LocalFileMng.h" +namespace lmms +{ + /* New QtXml based methods */ @@ -227,3 +230,5 @@ QDomDocument LocalFileMng::openXmlDocument( const QString& filename ) return doc; } + +} // namespace lmms diff --git a/plugins/Kicker/Kicker.cpp b/plugins/Kicker/Kicker.cpp index de14f4af7..4c5fa77f8 100644 --- a/plugins/Kicker/Kicker.cpp +++ b/plugins/Kicker/Kicker.cpp @@ -40,6 +40,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -220,12 +224,14 @@ void KickerInstrument::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * KickerInstrument::instantiateView( QWidget * _parent ) +gui::PluginView * KickerInstrument::instantiateView( QWidget * _parent ) { - return new KickerInstrumentView( this, _parent ); + return new gui::KickerInstrumentView( this, _parent ); } +namespace gui +{ class KickerKnob : public Knob @@ -361,7 +367,7 @@ void KickerInstrumentView::modelChanged() } - +} // namespace gui extern "C" @@ -377,5 +383,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * m, void * ) } - - +} // namespace lmms diff --git a/plugins/Kicker/Kicker.h b/plugins/Kicker/Kicker.h index f63f68c9c..f48a5ab12 100644 --- a/plugins/Kicker/Kicker.h +++ b/plugins/Kicker/Kicker.h @@ -32,17 +32,22 @@ #include "InstrumentView.h" #include "TempoSyncKnobModel.h" -class Knob; -class LedCheckBox; - +namespace lmms +{ #define KICKER_PRESET_VERSION 1 -class KickerInstrumentView; class NotePlayHandle; +namespace gui +{ +class Knob; +class LedCheckBox; +class KickerInstrumentView; +} + class KickerInstrument : public Instrument { @@ -70,7 +75,7 @@ public: return( 512 ); } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); private: @@ -90,11 +95,14 @@ private: IntModel m_versionModel; - friend class KickerInstrumentView; + friend class gui::KickerInstrumentView; } ; +namespace gui +{ + class KickerInstrumentView : public InstrumentViewFixedSize { @@ -123,5 +131,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/Kicker/KickerOsc.h b/plugins/Kicker/KickerOsc.h index 1375725b3..3a263ffc8 100644 --- a/plugins/Kicker/KickerOsc.h +++ b/plugins/Kicker/KickerOsc.h @@ -33,6 +33,9 @@ #include "interpolation.h" #include "MemoryManager.h" +namespace lmms +{ + template class KickerOsc @@ -107,4 +110,6 @@ private: }; +} // namespace lmms + #endif diff --git a/plugins/LadspaBrowser/LadspaBrowser.cpp b/plugins/LadspaBrowser/LadspaBrowser.cpp index 97282c309..d40b855fd 100644 --- a/plugins/LadspaBrowser/LadspaBrowser.cpp +++ b/plugins/LadspaBrowser/LadspaBrowser.cpp @@ -41,6 +41,9 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + extern "C" { @@ -93,7 +96,8 @@ QString LadspaBrowser::nodeName() const - +namespace gui +{ LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) : @@ -189,8 +193,8 @@ QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt, layout->addSpacing( 10 ); LadspaDescription * description = new LadspaDescription( tab, _type ); - connect( description, SIGNAL( doubleClicked( const ladspa_key_t & ) ), - SLOT( showPorts( const ladspa_key_t & ) ) ); + connect( description, SIGNAL( doubleClicked( const ::lmms::ladspa_key_t & ) ), + SLOT( showPorts( const ::lmms::ladspa_key_t & ) ) ); layout->addWidget( description, 1 ); return tab; @@ -199,13 +203,13 @@ QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt, -void LadspaBrowserView::showPorts( const ladspa_key_t & _key ) +void LadspaBrowserView::showPorts( const ::lmms::ladspa_key_t & _key ) { LadspaPortDialog ports( _key ); ports.exec(); } +} // namespace gui - - +} // namespace lmms diff --git a/plugins/LadspaBrowser/LadspaBrowser.h b/plugins/LadspaBrowser/LadspaBrowser.h index 69c9d6263..f1f88872c 100644 --- a/plugins/LadspaBrowser/LadspaBrowser.h +++ b/plugins/LadspaBrowser/LadspaBrowser.h @@ -31,9 +31,16 @@ #include "ToolPlugin.h" #include "ToolPluginView.h" -class TabBar; +namespace lmms +{ +namespace gui +{ + + +class TabBar; + class LadspaBrowserView : public ToolPluginView { Q_OBJECT @@ -43,7 +50,7 @@ public: public slots: - void showPorts( const ladspa_key_t & _key ); + void showPorts( const ::lmms::ladspa_key_t & _key ); private: @@ -52,7 +59,10 @@ private: QWidget * createTab( QWidget * _parent, const QString & _txt, LadspaPluginType _type ); -} ; +}; + + +} // namespace gui class LadspaBrowser : public ToolPlugin @@ -61,9 +71,9 @@ public: LadspaBrowser(); virtual ~LadspaBrowser(); - virtual PluginView * instantiateView( QWidget * ) + virtual gui::PluginView* instantiateView( QWidget * ) { - return new LadspaBrowserView( this ); + return new gui::LadspaBrowserView( this ); } virtual QString nodeName() const; @@ -83,4 +93,6 @@ public: } ; +} // namespace lmms + #endif diff --git a/plugins/LadspaBrowser/LadspaDescription.cpp b/plugins/LadspaBrowser/LadspaDescription.cpp index 49c16a695..5b2364d6f 100644 --- a/plugins/LadspaBrowser/LadspaDescription.cpp +++ b/plugins/LadspaBrowser/LadspaDescription.cpp @@ -36,6 +36,9 @@ #include "Ladspa2LMMS.h" +namespace lmms::gui +{ + LadspaDescription::LadspaDescription( QWidget * _parent, LadspaPluginType _type ) : @@ -215,6 +218,4 @@ void LadspaDescription::onDoubleClicked( QListWidgetItem * _item ) } - - - +} // namespace lmms::gui diff --git a/plugins/LadspaBrowser/LadspaDescription.h b/plugins/LadspaBrowser/LadspaDescription.h index 01495663a..0e54acd32 100644 --- a/plugins/LadspaBrowser/LadspaDescription.h +++ b/plugins/LadspaBrowser/LadspaDescription.h @@ -35,6 +35,9 @@ class QListWidgetItem; class QScrollArea; +namespace lmms::gui +{ + class LadspaDescription : public QWidget { @@ -45,7 +48,7 @@ public: signals: - void doubleClicked( const ladspa_key_t & ); + void doubleClicked( const ::lmms::ladspa_key_t & ); private: @@ -64,6 +67,6 @@ private slots: } ; - +} // namespace lmms::gui #endif diff --git a/plugins/LadspaBrowser/LadspaPortDialog.cpp b/plugins/LadspaBrowser/LadspaPortDialog.cpp index 20f25ece2..ab542ce00 100644 --- a/plugins/LadspaBrowser/LadspaPortDialog.cpp +++ b/plugins/LadspaBrowser/LadspaPortDialog.cpp @@ -33,6 +33,9 @@ #include "Engine.h" #include "Ladspa2LMMS.h" +namespace lmms::gui +{ + LadspaPortDialog::LadspaPortDialog( const ladspa_key_t & _key ) { @@ -170,6 +173,4 @@ LadspaPortDialog::~LadspaPortDialog() } - - - +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/LadspaBrowser/LadspaPortDialog.h b/plugins/LadspaBrowser/LadspaPortDialog.h index 3b66e7ec6..1473b1ecf 100644 --- a/plugins/LadspaBrowser/LadspaPortDialog.h +++ b/plugins/LadspaBrowser/LadspaPortDialog.h @@ -31,7 +31,8 @@ #include "LadspaManager.h" - +namespace lmms::gui +{ class LadspaPortDialog : public QDialog @@ -44,6 +45,6 @@ public: }; - +} // namespace lmms::gui #endif diff --git a/plugins/LadspaEffect/LadspaControlDialog.cpp b/plugins/LadspaEffect/LadspaControlDialog.cpp index a5be83d80..199982bb0 100644 --- a/plugins/LadspaEffect/LadspaControlDialog.cpp +++ b/plugins/LadspaEffect/LadspaControlDialog.cpp @@ -37,6 +37,8 @@ #include "LadspaControlView.h" #include "LedCheckBox.h" +namespace lmms::gui +{ LadspaControlDialog::LadspaControlDialog( LadspaControls * _ctl ) : @@ -141,11 +143,10 @@ void LadspaControlDialog::updateEffectView( LadspaControls * _ctl ) m_stereoLink->setModel( &_ctl->m_stereoLinkModel ); } - connect( _ctl, SIGNAL( effectModelChanged( LadspaControls * ) ), - this, SLOT( updateEffectView( LadspaControls * ) ), + connect( _ctl, SIGNAL( effectModelChanged( lmms::LadspaControls * ) ), + this, SLOT( updateEffectView( lmms::LadspaControls * ) ), Qt::DirectConnection ); } - - +} // namespace lmms::gui diff --git a/plugins/LadspaEffect/LadspaControlDialog.h b/plugins/LadspaEffect/LadspaControlDialog.h index 86468112d..3a102599b 100644 --- a/plugins/LadspaEffect/LadspaControlDialog.h +++ b/plugins/LadspaEffect/LadspaControlDialog.h @@ -31,7 +31,17 @@ class QHBoxLayout; + +namespace lmms +{ + class LadspaControls; + + +namespace gui +{ + + class LedCheckBox; @@ -44,7 +54,7 @@ public: private slots: - void updateEffectView( LadspaControls * _ctl ); + void updateEffectView( lmms::LadspaControls * _ctl ); private: @@ -53,4 +63,9 @@ private: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/LadspaEffect/LadspaControls.cpp b/plugins/LadspaEffect/LadspaControls.cpp index 9399fce03..1480da743 100644 --- a/plugins/LadspaEffect/LadspaControls.cpp +++ b/plugins/LadspaEffect/LadspaControls.cpp @@ -28,6 +28,9 @@ #include "LadspaControl.h" #include "LadspaEffect.h" +namespace lmms +{ + LadspaControls::LadspaControls( LadspaEffect * _eff ) : EffectControls( _eff ), @@ -190,5 +193,4 @@ void LadspaControls::updateLinkStatesFromGlobal() } - - +} // namespace lmms diff --git a/plugins/LadspaEffect/LadspaControls.h b/plugins/LadspaEffect/LadspaControls.h index 0a157009c..e8f8863cf 100644 --- a/plugins/LadspaEffect/LadspaControls.h +++ b/plugins/LadspaEffect/LadspaControls.h @@ -28,6 +28,9 @@ #include "EffectControls.h" #include "LadspaControlDialog.h" +namespace lmms +{ + class LadspaControl; typedef QVector control_list_t; @@ -54,9 +57,9 @@ public: return "ladspacontrols"; } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog* createView() { - return new LadspaControlDialog( this ); + return new gui::LadspaControlDialog( this ); } @@ -75,13 +78,16 @@ private: QVector m_controls; - friend class LadspaControlDialog; + friend class gui::LadspaControlDialog; friend class LadspaEffect; signals: - void effectModelChanged( LadspaControls * ); + void effectModelChanged( lmms::LadspaControls * ); } ; + +} // namespace lmms + #endif diff --git a/plugins/LadspaEffect/LadspaEffect.cpp b/plugins/LadspaEffect/LadspaEffect.cpp index b2e119af7..a26e35eb7 100644 --- a/plugins/LadspaEffect/LadspaEffect.cpp +++ b/plugins/LadspaEffect/LadspaEffect.cpp @@ -44,6 +44,10 @@ #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -604,5 +608,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data ) } - - +} // namespace lmms diff --git a/plugins/LadspaEffect/LadspaEffect.h b/plugins/LadspaEffect/LadspaEffect.h index a46099f93..153e2adeb 100644 --- a/plugins/LadspaEffect/LadspaEffect.h +++ b/plugins/LadspaEffect/LadspaEffect.h @@ -33,6 +33,9 @@ #include "LadspaControls.h" #include "LadspaManager.h" +namespace lmms +{ + typedef struct PortDescription port_desc_t; typedef QVector multi_proc_t; @@ -88,4 +91,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp b/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp index dfd302d6c..15b3edf68 100644 --- a/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp +++ b/plugins/LadspaEffect/LadspaSubPluginFeatures.cpp @@ -35,6 +35,9 @@ #include "Ladspa2LMMS.h" #include "LadspaBase.h" +namespace lmms +{ + LadspaSubPluginFeatures::LadspaSubPluginFeatures( Plugin::PluginTypes _type ) : SubPluginFeatures( _type ) @@ -178,3 +181,5 @@ ladspa_key_t LadspaSubPluginFeatures::subPluginKeyToLadspaKey( , _key->attributes["plugin"] ) ); } + +} // namespace lmms diff --git a/plugins/LadspaEffect/LadspaSubPluginFeatures.h b/plugins/LadspaEffect/LadspaSubPluginFeatures.h index 3f47734f9..36edeebd3 100644 --- a/plugins/LadspaEffect/LadspaSubPluginFeatures.h +++ b/plugins/LadspaEffect/LadspaSubPluginFeatures.h @@ -31,6 +31,9 @@ #include "LadspaManager.h" #include "Plugin.h" +namespace lmms +{ + class LadspaSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures { @@ -47,6 +50,9 @@ public: static ladspa_key_t subPluginKeyToLadspaKey( const Key * _key ); -} ; +}; + + +} // namespace lmms #endif diff --git a/plugins/Lb302/Lb302.cpp b/plugins/Lb302/Lb302.cpp index 949f85510..999b66151 100644 --- a/plugins/Lb302/Lb302.cpp +++ b/plugins/Lb302/Lb302.cpp @@ -68,6 +68,9 @@ // Old config // +namespace lmms +{ + //#define engine::audioEngine()->processingSampleRate() 44100.0f const float sampleRateCutoff = 44100.0f; @@ -802,11 +805,14 @@ void Lb302Synth::deleteNotePluginData( NotePlayHandle * _n ) } -PluginView * Lb302Synth::instantiateView( QWidget * _parent ) +gui::PluginView * Lb302Synth::instantiateView( QWidget * _parent ) { - return( new Lb302SynthView( this, _parent ) ); + return( new gui::Lb302SynthView( this, _parent ) ); } +namespace gui +{ + Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : InstrumentViewFixedSize( _instrument, _parent ) @@ -1029,6 +1035,8 @@ void Lb302SynthView::modelChanged() } +} // namespace gui + extern "C" { @@ -1045,3 +1053,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * m, void * ) } +} // namespace lmms diff --git a/plugins/Lb302/Lb302.h b/plugins/Lb302/Lb302.h index f7fa9ea84..550c3d00a 100644 --- a/plugins/Lb302/Lb302.h +++ b/plugins/Lb302/Lb302.h @@ -38,13 +38,23 @@ #include "NotePlayHandle.h" #include +namespace lmms +{ + + static const int NUM_FILTERS = 2; +class NotePlayHandle; + + +namespace gui +{ class automatableButtonGroup; class Knob; class Lb302SynthView; class LedCheckBox; -class NotePlayHandle; +} + class Lb302FilterKnobState { @@ -163,7 +173,7 @@ public: return 0; //4048; } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); private: void processNote( NotePlayHandle * n ); @@ -249,7 +259,7 @@ private: int process(sampleFrame *outbuf, const int size); - friend class Lb302SynthView; + friend class gui::Lb302SynthView; NotePlayHandle * m_playingNote; NotePlayHandleList m_notes; @@ -257,6 +267,10 @@ private: } ; +namespace gui +{ + + class Lb302SynthView : public InstrumentViewFixedSize { Q_OBJECT @@ -284,4 +298,9 @@ private: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Lv2Effect/Lv2Effect.cpp b/plugins/Lv2Effect/Lv2Effect.cpp index 3d6a114d1..d3755a2c9 100644 --- a/plugins/Lv2Effect/Lv2Effect.cpp +++ b/plugins/Lv2Effect/Lv2Effect.cpp @@ -31,6 +31,8 @@ #include "plugin_export.h" +namespace lmms +{ extern "C" @@ -113,3 +115,6 @@ PLUGIN_EXPORT Plugin *lmms_plugin_main(Model *_parent, void *_data) } } + + +} // namespace lmms diff --git a/plugins/Lv2Effect/Lv2Effect.h b/plugins/Lv2Effect/Lv2Effect.h index b9e4e06b0..7e1457777 100644 --- a/plugins/Lv2Effect/Lv2Effect.h +++ b/plugins/Lv2Effect/Lv2Effect.h @@ -28,6 +28,10 @@ #include "Effect.h" #include "Lv2FxControls.h" +namespace lmms +{ + + class Lv2Effect : public Effect { Q_OBJECT @@ -51,4 +55,7 @@ private: std::vector m_tmpOutputSmps; }; + +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/plugins/Lv2Effect/Lv2FxControlDialog.cpp b/plugins/Lv2Effect/Lv2FxControlDialog.cpp index 267923561..d10c01cd4 100644 --- a/plugins/Lv2Effect/Lv2FxControlDialog.cpp +++ b/plugins/Lv2Effect/Lv2FxControlDialog.cpp @@ -28,6 +28,9 @@ #include "Lv2FxControls.h" +namespace lmms::gui +{ + Lv2FxControlDialog::Lv2FxControlDialog(Lv2FxControls *controls) : EffectControlDialog(controls), @@ -67,3 +70,4 @@ void Lv2FxControlDialog::modelChanged() } +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Lv2Effect/Lv2FxControlDialog.h b/plugins/Lv2Effect/Lv2FxControlDialog.h index 3abdb300d..c749dc124 100644 --- a/plugins/Lv2Effect/Lv2FxControlDialog.h +++ b/plugins/Lv2Effect/Lv2FxControlDialog.h @@ -28,8 +28,13 @@ #include "EffectControlDialog.h" #include "Lv2ViewBase.h" +namespace lmms +{ + class Lv2FxControls; +namespace gui +{ class Lv2FxControlDialog : public EffectControlDialog, public Lv2ViewBase { @@ -44,4 +49,8 @@ private: }; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Lv2Effect/Lv2FxControls.cpp b/plugins/Lv2Effect/Lv2FxControls.cpp index 99d4162d8..a865151dd 100644 --- a/plugins/Lv2Effect/Lv2FxControls.cpp +++ b/plugins/Lv2Effect/Lv2FxControls.cpp @@ -30,7 +30,8 @@ #include "Lv2Effect.h" #include "Lv2FxControlDialog.h" - +namespace lmms +{ Lv2FxControls::Lv2FxControls(class Lv2Effect *effect, const QString& uri) : @@ -71,9 +72,9 @@ int Lv2FxControls::controlCount() -EffectControlDialog *Lv2FxControls::createView() +gui::EffectControlDialog *Lv2FxControls::createView() { - return new Lv2FxControlDialog(this); + return new gui::Lv2FxControlDialog(this); } @@ -101,3 +102,4 @@ void Lv2FxControls::setNameFromFile(const QString &name) } +} // namespace lmms diff --git a/plugins/Lv2Effect/Lv2FxControls.h b/plugins/Lv2Effect/Lv2FxControls.h index e5449a4f7..952e4db6c 100644 --- a/plugins/Lv2Effect/Lv2FxControls.h +++ b/plugins/Lv2Effect/Lv2FxControls.h @@ -28,8 +28,17 @@ #include "EffectControls.h" #include "Lv2ControlBase.h" +namespace lmms +{ + + class Lv2Effect; +namespace gui +{ +class Lv2FxControlDialog; +} + class Lv2FxControls : public EffectControls, public Lv2ControlBase { @@ -45,7 +54,7 @@ public: } int controlCount() override; - EffectControlDialog *createView() override; + gui::EffectControlDialog* createView() override; private slots: void changeControl(); @@ -54,8 +63,11 @@ private: DataFile::Types settingsType() override; void setNameFromFile(const QString &name) override; - friend class Lv2FxControlDialog; + friend class gui::Lv2FxControlDialog; friend class Lv2Effect; }; + +} // namespace lmms + #endif diff --git a/plugins/Lv2Instrument/Lv2Instrument.cpp b/plugins/Lv2Instrument/Lv2Instrument.cpp index b94e30aef..f7e0a2b37 100644 --- a/plugins/Lv2Instrument/Lv2Instrument.cpp +++ b/plugins/Lv2Instrument/Lv2Instrument.cpp @@ -40,6 +40,8 @@ #include "plugin_export.h" +namespace lmms +{ extern "C" @@ -173,9 +175,9 @@ void Lv2Instrument::play(sampleFrame *buf) -PluginView *Lv2Instrument::instantiateView(QWidget *parent) +gui::PluginView* Lv2Instrument::instantiateView(QWidget *parent) { - return new Lv2InsView(this, parent); + return new gui::Lv2InsView(this, parent); } @@ -213,6 +215,9 @@ void Lv2Instrument::setNameFromFile(const QString &name) +namespace gui +{ + /* Lv2InsView @@ -285,7 +290,7 @@ void Lv2InsView::modelChanged() } - +} // namespace gui extern "C" { @@ -302,3 +307,6 @@ PLUGIN_EXPORT Plugin *lmms_plugin_main(Model *_parent, void *_data) } } + + +} // namespace lmms diff --git a/plugins/Lv2Instrument/Lv2Instrument.h b/plugins/Lv2Instrument/Lv2Instrument.h index bb4f797fa..116b3ce05 100644 --- a/plugins/Lv2Instrument/Lv2Instrument.h +++ b/plugins/Lv2Instrument/Lv2Instrument.h @@ -37,6 +37,15 @@ // currently only MIDI works #define LV2_INSTRUMENT_USE_MIDI +namespace lmms +{ + +namespace gui +{ + +class Lv2InsView; + +} class Lv2Instrument : public Instrument, public Lv2ControlBase { @@ -81,7 +90,7 @@ public: return IsSingleStreamed; #endif } - PluginView *instantiateView(QWidget *parent) override; + gui::PluginView* instantiateView(QWidget *parent) override; private slots: void updatePitchRange(); @@ -95,13 +104,17 @@ private: int m_runningNotes[NumKeys]; #endif - friend class Lv2InsView; + friend class gui::Lv2InsView; }; +namespace gui +{ + + class Lv2InsView : public InstrumentView, public Lv2ViewBase { - Q_OBJECT +Q_OBJECT public: Lv2InsView(Lv2Instrument *_instrument, QWidget *_parent); @@ -114,4 +127,9 @@ private: }; +} // namespace gui + + +} // namespace lmms + #endif // LV2_INSTRUMENT_H diff --git a/plugins/MidiExport/MidiExport.cpp b/plugins/MidiExport/MidiExport.cpp index a150b424a..6f0f5a11e 100644 --- a/plugins/MidiExport/MidiExport.cpp +++ b/plugins/MidiExport/MidiExport.cpp @@ -35,6 +35,10 @@ #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -359,3 +363,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data ) } + +} // namespace lmms diff --git a/plugins/MidiExport/MidiExport.h b/plugins/MidiExport/MidiExport.h index fd73442b5..f443c965f 100644 --- a/plugins/MidiExport/MidiExport.h +++ b/plugins/MidiExport/MidiExport.h @@ -33,6 +33,9 @@ class QDomNode; +namespace lmms +{ + const int BUFFER_SIZE = 50*1024; typedef MidiFile::MIDITrack MTrack; @@ -62,7 +65,7 @@ public: MidiExport(); ~MidiExport(); - virtual PluginView *instantiateView(QWidget *) + virtual gui::PluginView* instantiateView(QWidget *) { return nullptr; } @@ -85,4 +88,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index a57a425a2..e6cf644cf 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -50,6 +50,10 @@ #include "portsmf/allegro.h" +namespace lmms +{ + + #define makeID(_c0, _c1, _c2, _c3) \ ( 0 | \ ( ( _c0 ) | ( ( _c1 ) << 8 ) | ( ( _c2 ) << 16 ) | ( ( _c3 ) << 24 ) ) ) @@ -101,10 +105,10 @@ bool MidiImport::tryImport( TrackContainer* tc ) } #ifdef LMMS_HAVE_FLUIDSYNTH - if( getGUI() != nullptr && + if (gui::getGUI() != nullptr && ConfigManager::inst()->sf2File().isEmpty() ) { - QMessageBox::information( getGUI()->mainWindow(), + QMessageBox::information(gui::getGUI()->mainWindow(), tr( "Setup incomplete" ), tr( "You have not set up a default soundfont in " "the settings dialog (Edit->Settings). " @@ -114,9 +118,9 @@ bool MidiImport::tryImport( TrackContainer* tc ) "settings dialog and try again." ) ); } #else - if( getGUI() != nullptr ) + if (gui::getGUI() != nullptr) { - QMessageBox::information( getGUI()->mainWindow(), + QMessageBox::information(gui::getGUI()->mainWindow(), tr( "Setup incomplete" ), tr( "You did not compile LMMS with support for " "SoundFont2 player, which is used to add default " @@ -305,7 +309,7 @@ bool MidiImport::readSMF( TrackContainer* tc ) const int MIDI_CC_COUNT = 128 + 1; // 0-127 (128) + pitch bend const int preTrackSteps = 2; QProgressDialog pd( TrackContainer::tr( "Importing MIDI-file..." ), - TrackContainer::tr( "Cancel" ), 0, preTrackSteps, getGUI()->mainWindow() ); + TrackContainer::tr("Cancel"), 0, preTrackSteps, gui::getGUI()->mainWindow()); pd.setWindowTitle( TrackContainer::tr( "Please wait..." ) ); pd.setWindowModality(Qt::WindowModal); pd.setMinimumDuration( 0 ); @@ -654,3 +658,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data ) } + +} // namespace lmms diff --git a/plugins/MidiImport/MidiImport.h b/plugins/MidiImport/MidiImport.h index 2edcbe926..a7ab478a2 100644 --- a/plugins/MidiImport/MidiImport.h +++ b/plugins/MidiImport/MidiImport.h @@ -32,6 +32,9 @@ #include "MidiEvent.h" #include "ImportFilter.h" +namespace lmms +{ + class MidiImport : public ImportFilter { @@ -40,7 +43,7 @@ public: MidiImport( const QString & _file ); virtual ~MidiImport(); - virtual PluginView * instantiateView( QWidget * ) + virtual gui::PluginView* instantiateView( QWidget * ) { return( nullptr ); } @@ -125,4 +128,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/plugins/Monstro/Monstro.cpp b/plugins/Monstro/Monstro.cpp index e95b05030..889a89fb0 100644 --- a/plugins/Monstro/Monstro.cpp +++ b/plugins/Monstro/Monstro.cpp @@ -38,6 +38,10 @@ #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -1304,9 +1308,9 @@ f_cnt_t MonstroInstrument::desiredReleaseFrames() const } -PluginView * MonstroInstrument::instantiateView( QWidget * _parent ) +gui::PluginView* MonstroInstrument::instantiateView( QWidget * _parent ) { - return( new MonstroView( this, _parent ) ); + return( new gui::MonstroView( this, _parent ) ); } @@ -1445,6 +1449,10 @@ void MonstroInstrument::updateSlope2() } +namespace gui +{ + + MonstroView::MonstroView( Instrument * _instrument, QWidget * _parent ) : InstrumentViewFixedSize( _instrument, _parent ) @@ -1823,6 +1831,10 @@ QWidget * MonstroView::setupMatrixView( QWidget * _parent ) return( view ); } + +} // namespace gui + + extern "C" { @@ -1836,5 +1848,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } - - +} // namespace lmms diff --git a/plugins/Monstro/Monstro.h b/plugins/Monstro/Monstro.h index 98c5d6600..d6b57cfae 100644 --- a/plugins/Monstro/Monstro.h +++ b/plugins/Monstro/Monstro.h @@ -38,8 +38,6 @@ #include "lmms_math.h" #include "BandLimitedWave.h" -class ComboBox; - // // UI Macros // @@ -66,6 +64,14 @@ class ComboBox; name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "tinyled_off" ) ); \ name->setToolTip(ttip); +namespace lmms +{ + + +namespace gui +{ + + // UI constants const int O1ROW = 22; const int O2ROW = 22 + 39; @@ -108,6 +114,9 @@ const int MATROW6 = 22 + 39*5; const int OPVIEW = 0; const int MATVIEW = 1; + +} // namespace gui + // waveform enumerators const int WAVE_SINE = 0; const int WAVE_TRI = 1; @@ -154,7 +163,12 @@ const float PW_MIN = 0.25f; const float PW_MAX = 100.0f - PW_MIN; class MonstroInstrument; + +namespace gui +{ class MonstroView; +class ComboBox; +} class MonstroSynth @@ -355,7 +369,7 @@ public: virtual f_cnt_t desiredReleaseFrames() const; - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); public slots: void updateVolume1(); @@ -564,10 +578,15 @@ private: FloatModel m_sub3lfo2; friend class MonstroSynth; - friend class MonstroView; + friend class gui::MonstroView; }; + +namespace gui +{ + + class MonstroView : public InstrumentViewFixedSize { Q_OBJECT @@ -719,4 +738,8 @@ private: }; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/MultitapEcho/MultitapEcho.cpp b/plugins/MultitapEcho/MultitapEcho.cpp index 4134436bb..f3d03740c 100644 --- a/plugins/MultitapEcho/MultitapEcho.cpp +++ b/plugins/MultitapEcho/MultitapEcho.cpp @@ -27,6 +27,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -170,3 +174,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/MultitapEcho/MultitapEcho.h b/plugins/MultitapEcho/MultitapEcho.h index 539ae9475..3d6772d24 100644 --- a/plugins/MultitapEcho/MultitapEcho.h +++ b/plugins/MultitapEcho/MultitapEcho.h @@ -31,6 +31,10 @@ #include "RingBuffer.h" #include "BasicFilters.h" +namespace lmms +{ + + class MultitapEchoEffect : public Effect { public: @@ -73,4 +77,6 @@ private: }; +} // namespace lmms + #endif diff --git a/plugins/MultitapEcho/MultitapEchoControlDialog.cpp b/plugins/MultitapEcho/MultitapEchoControlDialog.cpp index ac8f480da..f96ea46ec 100644 --- a/plugins/MultitapEcho/MultitapEchoControlDialog.cpp +++ b/plugins/MultitapEcho/MultitapEchoControlDialog.cpp @@ -33,6 +33,9 @@ #include "TempoSyncKnob.h" #include "LcdSpinBox.h" +namespace lmms::gui +{ + MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * controls ) : EffectControlDialog( controls ) @@ -99,3 +102,6 @@ MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * con swapInputs->setModel( & controls->m_swapInputs ); swapInputs->setToolTip(tr("Swap left and right input channels for reflections")); } + + +} // namespace lmms::gui diff --git a/plugins/MultitapEcho/MultitapEchoControlDialog.h b/plugins/MultitapEcho/MultitapEchoControlDialog.h index 5ea09877e..6104d433e 100644 --- a/plugins/MultitapEcho/MultitapEchoControlDialog.h +++ b/plugins/MultitapEcho/MultitapEchoControlDialog.h @@ -29,8 +29,16 @@ #include "EffectControlDialog.h" +namespace lmms +{ + + class MultitapEchoControls; +namespace gui +{ + + class MultitapEchoControlDialog : public EffectControlDialog { Q_OBJECT @@ -41,4 +49,9 @@ public: } }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/MultitapEcho/MultitapEchoControls.cpp b/plugins/MultitapEcho/MultitapEchoControls.cpp index 4f2fe63fe..4382151af 100644 --- a/plugins/MultitapEcho/MultitapEchoControls.cpp +++ b/plugins/MultitapEcho/MultitapEchoControls.cpp @@ -31,6 +31,9 @@ #include "lmms_math.h" #include "base64.h" +namespace lmms +{ + MultitapEchoControls::MultitapEchoControls( MultitapEchoEffect * eff ) : EffectControls( eff ), @@ -178,3 +181,6 @@ void MultitapEchoControls::sampleRateChanged() m_effect->m_sampleRatio = 1.0f / m_effect->m_sampleRate; m_effect->updateFilters( 0, 19 ); } + + +} // namespace lmms diff --git a/plugins/MultitapEcho/MultitapEchoControls.h b/plugins/MultitapEcho/MultitapEchoControls.h index 4696f46d9..65311c157 100644 --- a/plugins/MultitapEcho/MultitapEchoControls.h +++ b/plugins/MultitapEcho/MultitapEchoControls.h @@ -30,6 +30,9 @@ #include "MultitapEchoControlDialog.h" #include "Graph.h" +namespace lmms +{ + class MultitapEchoEffect; @@ -55,9 +58,9 @@ public: return( 5 ); } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog* createView() { - return( new MultitapEchoControlDialog( this ) ); + return( new gui::MultitapEchoControlDialog( this ) ); } private slots: @@ -83,8 +86,10 @@ private: graphModel m_lpGraph; friend class MultitapEchoEffect; - friend class MultitapEchoControlDialog; + friend class gui::MultitapEchoControlDialog; }; +} // namespace lmms + #endif diff --git a/plugins/Nes/Nes.cpp b/plugins/Nes/Nes.cpp index a84f6e6a4..b774f7efa 100644 --- a/plugins/Nes/Nes.cpp +++ b/plugins/Nes/Nes.cpp @@ -36,6 +36,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -699,9 +703,9 @@ QString NesInstrument::nodeName() const } -PluginView * NesInstrument::instantiateView( QWidget * parent ) +gui::PluginView* NesInstrument::instantiateView( QWidget * parent ) { - return( new NesInstrumentView( this, parent ) ); + return( new gui::NesInstrumentView( this, parent ) ); } @@ -724,6 +728,8 @@ void NesInstrument::updateFreq3() } +namespace gui +{ QPixmap * NesInstrumentView::s_artwork = nullptr; @@ -912,6 +918,9 @@ void NesInstrumentView::modelChanged() } +} // namespace gui + + extern "C" { @@ -925,4 +934,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * _data ) } - +} // namespace lmms diff --git a/plugins/Nes/Nes.h b/plugins/Nes/Nes.h index f17265c14..f57cca9e7 100644 --- a/plugins/Nes/Nes.h +++ b/plugins/Nes/Nes.h @@ -56,6 +56,11 @@ name -> setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "nesdc_off" ) ); \ name->setToolTip(ttip); + +namespace lmms +{ + + const float NES_SIMPLE_FILTER = 1.0 / 20.0; // simulate nes analog audio output const float NFB = 895000.0f; const float NOISE_FREQS[16] = @@ -76,9 +81,15 @@ const float NES_MIXING_ALL = 1.0 / ( NES_MIXING_12 + NES_MIXING_34 ); // constan const int MIN_WLEN = 4; -class Knob; class NesInstrument; +namespace gui +{ +class Knob; +class NesInstrumentView; +} // namespace gui + + class NesObject { MM_OPERATORS @@ -218,7 +229,7 @@ public: return( 8 ); } - virtual PluginView * instantiateView( QWidget * parent ); + virtual gui::PluginView* instantiateView( QWidget * parent ); public slots: void updateFreq1(); @@ -288,10 +299,14 @@ private: friend class NesObject; - friend class NesInstrumentView; + friend class gui::NesInstrumentView; }; +namespace gui +{ + + class NesInstrumentView : public InstrumentViewFixedSize { Q_OBJECT @@ -360,4 +375,9 @@ private: static QPixmap * s_artwork; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/OpulenZ/OpulenZ.cpp b/plugins/OpulenZ/OpulenZ.cpp index da85e2d02..6abfb4e19 100644 --- a/plugins/OpulenZ/OpulenZ.cpp +++ b/plugins/OpulenZ/OpulenZ.cpp @@ -58,6 +58,10 @@ #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -388,9 +392,9 @@ QString OpulenzInstrument::nodeName() const return( opulenz_plugin_descriptor.name ); } -PluginView * OpulenzInstrument::instantiateView( QWidget * _parent ) +gui::PluginView* OpulenzInstrument::instantiateView( QWidget * _parent ) { - return( new OpulenzInstrumentView( this, _parent ) ); + return( new gui::OpulenzInstrumentView( this, _parent ) ); } @@ -673,7 +677,8 @@ void OpulenzInstrument::loadFile( const QString& file ) { - +namespace gui +{ OpulenzInstrumentView::OpulenzInstrumentView( Instrument * _instrument, QWidget * _parent ) : @@ -870,4 +875,6 @@ void OpulenzInstrumentView::modelChanged() } +} // namespace gui +} // namespace lmms diff --git a/plugins/OpulenZ/OpulenZ.h b/plugins/OpulenZ/OpulenZ.h index 7b4868b4f..f2a13ffe0 100644 --- a/plugins/OpulenZ/OpulenZ.h +++ b/plugins/OpulenZ/OpulenZ.h @@ -31,11 +31,19 @@ #include "Instrument.h" #include "InstrumentView.h" -class automatableButtonGroup; class Copl; + + +namespace lmms +{ + +namespace gui +{ class Knob; class LcdSpinBox; class PixmapButton; +class automatableButtonGroup; +} // This one is a flag, MIDI notes take 7 low bits @@ -54,7 +62,7 @@ public: virtual ~OpulenzInstrument(); virtual QString nodeName() const; - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); virtual Flags flags() const { @@ -146,6 +154,9 @@ private: }; +namespace gui +{ + class OpulenzInstrumentView : public InstrumentViewFixedSize { @@ -205,4 +216,9 @@ public: }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Organic/Organic.cpp b/plugins/Organic/Organic.cpp index c2a6fcce4..320769200 100644 --- a/plugins/Organic/Organic.cpp +++ b/plugins/Organic/Organic.cpp @@ -41,6 +41,9 @@ #include "plugin_export.h" +namespace lmms +{ + extern "C" { @@ -61,7 +64,7 @@ Plugin::Descriptor PLUGIN_EXPORT organic_plugin_descriptor = } -QPixmap * OrganicInstrumentView::s_artwork = nullptr; +QPixmap * gui::OrganicInstrumentView::s_artwork = nullptr; float * OrganicInstrument::s_harmonics = nullptr; /*********************************************************************** @@ -392,12 +395,14 @@ int OrganicInstrument::intRand( int min, int max ) } -PluginView * OrganicInstrument::instantiateView( QWidget * _parent ) +gui::PluginView * OrganicInstrument::instantiateView( QWidget * _parent ) { - return( new OrganicInstrumentView( this, _parent ) ); + return( new gui::OrganicInstrumentView( this, _parent ) ); } +namespace gui +{ class OrganicKnob : public Knob @@ -412,7 +417,6 @@ public: - OrganicInstrumentView::OrganicInstrumentView( Instrument * _instrument, QWidget * _parent ) : InstrumentViewFixedSize( _instrument, _parent ), @@ -557,6 +561,7 @@ void OrganicInstrumentView::updateKnobHint() } +} // namespace gui OscillatorObject::OscillatorObject( Model * _parent, int _index ) : @@ -627,8 +632,6 @@ void OscillatorObject::updateDetuning() } - - extern "C" { @@ -652,5 +655,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) */ - - +} // namespace lmms diff --git a/plugins/Organic/Organic.h b/plugins/Organic/Organic.h index b16b2ef9a..b2f5ed518 100644 --- a/plugins/Organic/Organic.h +++ b/plugins/Organic/Organic.h @@ -34,10 +34,19 @@ class QPixmap; -class Knob; +namespace lmms +{ + + class NotePlayHandle; class Oscillator; + +namespace gui +{ +class Knob; class PixmapButton; +class OrganicInstrumentView; +} // namespace gui const int NUM_OSCILLATORS = 8; const int NUM_HARMONICS = 18; @@ -99,7 +108,7 @@ private: virtual ~OscillatorObject(); friend class OrganicInstrument; - friend class OrganicInstrumentView; + friend class gui::OrganicInstrumentView; private slots: @@ -163,15 +172,18 @@ private: FloatModel m_fx1Model; FloatModel m_volModel; - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); private slots: void updateAllDetuning(); - friend class OrganicInstrumentView; + friend class gui::OrganicInstrumentView; } ; +namespace gui +{ + class OrganicInstrumentView : public InstrumentViewFixedSize { @@ -225,4 +237,8 @@ protected slots: }; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Patman/Patman.cpp b/plugins/Patman/Patman.cpp index 9268b2919..25b055b9c 100644 --- a/plugins/Patman/Patman.cpp +++ b/plugins/Patman/Patman.cpp @@ -46,6 +46,9 @@ #include "plugin_export.h" +namespace lmms +{ + extern "C" { @@ -427,9 +430,9 @@ void PatmanInstrument::selectSample( NotePlayHandle * _n ) -PluginView * PatmanInstrument::instantiateView( QWidget * _parent ) +gui::PluginView * PatmanInstrument::instantiateView( QWidget * _parent ) { - return( new PatmanView( this, _parent ) ); + return( new gui::PatmanView( this, _parent ) ); } @@ -437,8 +440,8 @@ PluginView * PatmanInstrument::instantiateView( QWidget * _parent ) - - +namespace gui +{ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : @@ -643,3 +646,8 @@ void PatmanView::modelChanged( void ) connect( m_pi, SIGNAL( fileChanged() ), this, SLOT( updateFilename() ) ); } + + +} // namespace gui + +} // namespace lmms diff --git a/plugins/Patman/Patman.h b/plugins/Patman/Patman.h index 6aa6497aa..5088068df 100644 --- a/plugins/Patman/Patman.h +++ b/plugins/Patman/Patman.h @@ -32,7 +32,14 @@ #include "AutomatableModel.h" #include "MemoryManager.h" +namespace lmms +{ + +namespace gui +{ class PixmapButton; +class PatmanView; +} // namespace gui #define MODES_16BIT ( 1 << 0 ) @@ -69,7 +76,7 @@ public: return( 128 ); } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); public slots: @@ -107,7 +114,7 @@ private: void selectSample( NotePlayHandle * _n ); - friend class PatmanView; + friend class gui::PatmanView; signals: void fileChanged( void ); @@ -115,6 +122,9 @@ signals: } ; +namespace gui +{ + class PatmanView : public InstrumentViewFixedSize { @@ -148,5 +158,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/PeakControllerEffect/PeakControllerEffect.cpp b/plugins/PeakControllerEffect/PeakControllerEffect.cpp index 672e020c4..529437d6e 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffect.cpp +++ b/plugins/PeakControllerEffect/PeakControllerEffect.cpp @@ -33,6 +33,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -157,3 +161,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data ) } + +} // namespace lmms diff --git a/plugins/PeakControllerEffect/PeakControllerEffect.h b/plugins/PeakControllerEffect/PeakControllerEffect.h index 4eeddf45d..3d944a1a6 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffect.h +++ b/plugins/PeakControllerEffect/PeakControllerEffect.h @@ -29,6 +29,10 @@ #include "Effect.h" #include "PeakControllerEffectControls.h" +namespace lmms +{ + + class PeakController; class PeakControllerEffect : public Effect @@ -78,4 +82,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.cpp b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.cpp index 044a4c60c..b0d6fafc6 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.cpp +++ b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.cpp @@ -35,6 +35,8 @@ #include "LedCheckBox.h" #include "embed.h" +namespace lmms::gui +{ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog( PeakControllerEffectControls * _controls ) : @@ -104,3 +106,5 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog( setLayout( mainLayout ); } + +} // namespace lmms::gui diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h index cd6a99d2b..721167975 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h +++ b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h @@ -28,7 +28,13 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class PeakControllerEffectControls; + +namespace gui +{ class Knob; class LedCheckBox; @@ -57,5 +63,8 @@ protected: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControls.cpp b/plugins/PeakControllerEffect/PeakControllerEffectControls.cpp index d19b15d37..070c9fbb8 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControls.cpp +++ b/plugins/PeakControllerEffect/PeakControllerEffectControls.cpp @@ -30,6 +30,9 @@ #include "PeakControllerEffect.h" #include "Song.h" +namespace lmms +{ + PeakControllerEffectControls:: PeakControllerEffectControls( PeakControllerEffect * _eff ) : @@ -104,6 +107,4 @@ void PeakControllerEffectControls::saveSettings( QDomDocument & _doc, } - - - +} // namespace lmms diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControls.h b/plugins/PeakControllerEffect/PeakControllerEffectControls.h index 7706784f0..278c2f069 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControls.h +++ b/plugins/PeakControllerEffect/PeakControllerEffectControls.h @@ -29,8 +29,13 @@ #include "EffectControls.h" #include "PeakControllerEffectControlDialog.h" +namespace lmms +{ + + class PeakControllerEffect; + class PeakControllerEffectControls : public EffectControls { Q_OBJECT @@ -51,9 +56,9 @@ public: { return 1; } - EffectControlDialog * createView() override + gui::EffectControlDialog * createView() override { - return new PeakControllerEffectControlDialog( this ); + return new gui::PeakControllerEffectControlDialog( this ); } @@ -69,10 +74,12 @@ private: BoolModel m_absModel; FloatModel m_amountMultModel; - friend class PeakControllerEffectControlDialog; + friend class gui::PeakControllerEffectControlDialog; friend class PeakControllerEffect; } ; +} // namespace lmms + #endif diff --git a/plugins/ReverbSC/ReverbSC.cpp b/plugins/ReverbSC/ReverbSC.cpp index 2d56d7f48..6faea8c9a 100644 --- a/plugins/ReverbSC/ReverbSC.cpp +++ b/plugins/ReverbSC/ReverbSC.cpp @@ -28,6 +28,10 @@ #define DB2LIN(X) pow(10, X / 20.0f); +namespace lmms +{ + + extern "C" { @@ -161,3 +165,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data ) } } + + +} // namespace lmms diff --git a/plugins/ReverbSC/ReverbSC.h b/plugins/ReverbSC/ReverbSC.h index 3a7a81e8d..0cbeba875 100644 --- a/plugins/ReverbSC/ReverbSC.h +++ b/plugins/ReverbSC/ReverbSC.h @@ -35,6 +35,11 @@ extern "C" { #include "dcblock.h" } + +namespace lmms +{ + + class ReverbSCEffect : public Effect { public: @@ -58,4 +63,7 @@ private: friend class ReverbSCControls; } ; + +} // namespace lmms + #endif diff --git a/plugins/ReverbSC/ReverbSCControlDialog.cpp b/plugins/ReverbSC/ReverbSCControlDialog.cpp index 9c5ae7eab..38b93e234 100644 --- a/plugins/ReverbSC/ReverbSCControlDialog.cpp +++ b/plugins/ReverbSC/ReverbSCControlDialog.cpp @@ -29,6 +29,10 @@ #include "Knob.h" #include "ReverbSCControls.h" +namespace lmms::gui +{ + + ReverbSCControlDialog::ReverbSCControlDialog( ReverbSCControls* controls ) : EffectControlDialog( controls ) { @@ -62,3 +66,6 @@ ReverbSCControlDialog::ReverbSCControlDialog( ReverbSCControls* controls ) : outputGainKnob->setLabel( tr( "Output" ) ); outputGainKnob->setHintText( tr( "Output gain:" ) , "dB" ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/ReverbSC/ReverbSCControlDialog.h b/plugins/ReverbSC/ReverbSCControlDialog.h index 0d9c1f51a..ba373509a 100644 --- a/plugins/ReverbSC/ReverbSCControlDialog.h +++ b/plugins/ReverbSC/ReverbSCControlDialog.h @@ -28,9 +28,15 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class ReverbSCControls; +namespace gui +{ + class ReverbSCControlDialog : public EffectControlDialog { Q_OBJECT @@ -42,4 +48,9 @@ public: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/ReverbSC/ReverbSCControls.cpp b/plugins/ReverbSC/ReverbSCControls.cpp index 11c99f665..4784d416d 100644 --- a/plugins/ReverbSC/ReverbSCControls.cpp +++ b/plugins/ReverbSC/ReverbSCControls.cpp @@ -29,6 +29,10 @@ #include "ReverbSC.h" #include "Engine.h" +namespace lmms +{ + + ReverbSCControls::ReverbSCControls( ReverbSCEffect* effect ) : EffectControls( effect ), m_effect( effect ), @@ -64,3 +68,6 @@ void ReverbSCControls::changeSampleRate() { m_effect->changeSampleRate(); } + + +} // namespace lmms diff --git a/plugins/ReverbSC/ReverbSCControls.h b/plugins/ReverbSC/ReverbSCControls.h index 78423ae8d..2bd76990a 100644 --- a/plugins/ReverbSC/ReverbSCControls.h +++ b/plugins/ReverbSC/ReverbSCControls.h @@ -29,6 +29,10 @@ #include "ReverbSCControlDialog.h" +namespace lmms +{ + + class ReverbSCEffect; class ReverbSCControls : public EffectControls @@ -52,9 +56,9 @@ public: return 4; } - virtual EffectControlDialog* createView() + virtual gui::EffectControlDialog* createView() { - return new ReverbSCControlDialog( this ); + return new gui::ReverbSCControlDialog( this ); } @@ -69,9 +73,12 @@ private: FloatModel m_colorModel; FloatModel m_outputGainModel; - friend class ReverbSCControlDialog; + friend class gui::ReverbSCControlDialog; friend class ReverbSCEffect; } ; + +} // namespace lmms + #endif diff --git a/plugins/Sf2Player/PatchesDialog.cpp b/plugins/Sf2Player/PatchesDialog.cpp index f9c414ac0..3cba7561f 100644 --- a/plugins/Sf2Player/PatchesDialog.cpp +++ b/plugins/Sf2Player/PatchesDialog.cpp @@ -32,6 +32,9 @@ #include "fluidsynthshims.h" +namespace lmms::gui +{ + // Custom list-view item (as for numerical sort purposes...) class PatchItem : public QTreeWidgetItem @@ -381,4 +384,4 @@ void PatchesDialog::progChanged (QTreeWidgetItem * _curr, QTreeWidgetItem * _pre } - +} // namespace lmms::gui diff --git a/plugins/Sf2Player/PatchesDialog.h b/plugins/Sf2Player/PatchesDialog.h index 73b649a2a..9f80981df 100644 --- a/plugins/Sf2Player/PatchesDialog.h +++ b/plugins/Sf2Player/PatchesDialog.h @@ -34,6 +34,9 @@ class QLabel; +namespace lmms::gui +{ + //---------------------------------------------------------------------------- // qsynthPresetForm -- UI wrapper form. @@ -92,5 +95,7 @@ private: }; +} // namespace lmms::gui + #endif diff --git a/plugins/Sf2Player/Sf2Player.cpp b/plugins/Sf2Player/Sf2Player.cpp index ee9156a0b..8b17f0bb0 100644 --- a/plugins/Sf2Player/Sf2Player.cpp +++ b/plugins/Sf2Player/Sf2Player.cpp @@ -49,6 +49,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -874,15 +878,16 @@ void Sf2Instrument::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * Sf2Instrument::instantiateView( QWidget * _parent ) +gui::PluginView * Sf2Instrument::instantiateView( QWidget * _parent ) { - return new Sf2InstrumentView( this, _parent ); + return new gui::Sf2InstrumentView( this, _parent ); } - +namespace gui +{ class Sf2Knob : public Knob @@ -1182,6 +1187,7 @@ void Sf2InstrumentView::showPatchDialog() } +} // namespace gui extern "C" { @@ -1193,3 +1199,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } } + + +} // namespace lmms diff --git a/plugins/Sf2Player/Sf2Player.h b/plugins/Sf2Player/Sf2Player.h index aeea1a553..3824595ea 100644 --- a/plugins/Sf2Player/Sf2Player.h +++ b/plugins/Sf2Player/Sf2Player.h @@ -36,16 +36,24 @@ #include "LcdSpinBox.h" #include "MemoryManager.h" -class Sf2InstrumentView; -class Sf2Font; -class Knob; -class NotePlayHandle; -class PixmapButton; - -class PatchesDialog; class QLabel; +namespace lmms +{ + + +class Sf2Font; struct Sf2PluginData; +class NotePlayHandle; + +namespace gui +{ +class Knob; +class PixmapButton; +class Sf2InstrumentView; +class PatchesDialog; +} // namespace gui + class Sf2Instrument : public Instrument { @@ -83,7 +91,7 @@ public: return IsSingleStreamed; } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); QString getCurrentPatchName(); @@ -133,8 +141,8 @@ private: int m_lastMidiPitchRange; int m_channel; - LcdSpinBoxModel m_bankNum; - LcdSpinBoxModel m_patchNum; + gui::LcdSpinBoxModel m_bankNum; + gui::LcdSpinBoxModel m_patchNum; FloatModel m_gain; @@ -159,7 +167,7 @@ private: void noteOff( Sf2PluginData * n ); void renderFrames( f_cnt_t frames, sampleFrame * buf ); - friend class Sf2InstrumentView; + friend class gui::Sf2InstrumentView; signals: void fileLoading(); @@ -185,6 +193,9 @@ public: }; +namespace gui +{ + class Sf2InstrumentView : public InstrumentViewFixedSize { @@ -231,5 +242,8 @@ protected slots: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/Sf2Player/fluidsynthshims.h b/plugins/Sf2Player/fluidsynthshims.h index 4302256ba..2ccadce8d 100644 --- a/plugins/Sf2Player/fluidsynthshims.h +++ b/plugins/Sf2Player/fluidsynthshims.h @@ -28,6 +28,7 @@ #include + #if FLUIDSYNTH_VERSION_MAJOR < 2 inline const char* fluid_preset_get_name(fluid_preset_t* preset) diff --git a/plugins/Sfxr/Sfxr.cpp b/plugins/Sfxr/Sfxr.cpp index cdce50430..ad7dd26a7 100644 --- a/plugins/Sfxr/Sfxr.cpp +++ b/plugins/Sfxr/Sfxr.cpp @@ -52,6 +52,10 @@ float frnd(float range) #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -504,9 +508,9 @@ void SfxrInstrument::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * SfxrInstrument::instantiateView( QWidget * _parent ) +gui::PluginView * SfxrInstrument::instantiateView( QWidget * _parent ) { - return( new SfxrInstrumentView( this, _parent ) ); + return( new gui::SfxrInstrumentView( this, _parent ) ); } @@ -549,6 +553,9 @@ void SfxrInstrument::resetModels() +namespace gui +{ + class SfxrKnob : public Knob { @@ -1115,6 +1122,9 @@ void SfxrInstrumentView::previewSound() +} // namespace gui + + extern "C" { @@ -1128,5 +1138,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* m, void* ) } - - +} // namespace lmms diff --git a/plugins/Sfxr/Sfxr.h b/plugins/Sfxr/Sfxr.h index a8ce12efe..4c14d33bb 100644 --- a/plugins/Sfxr/Sfxr.h +++ b/plugins/Sfxr/Sfxr.h @@ -33,6 +33,9 @@ #include "InstrumentView.h" #include "MemoryManager.h" +namespace lmms +{ + enum SfxrWaves { @@ -60,11 +63,15 @@ const int KNOB_BLOCK_SIZE_Y = 40; +class SfxrInstrument; +namespace gui +{ class automatableButtonGroup; class Knob; class PixmapButton; -class SfxrInstrument; +class SfxrInstrumentView; +} @@ -180,7 +187,7 @@ public: virtual QString nodeName() const; - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); void resetModels(); @@ -217,11 +224,14 @@ private: IntModel m_waveFormModel; - friend class SfxrInstrumentView; + friend class gui::SfxrInstrumentView; friend class SfxrSynth; }; +namespace gui +{ + class SfxrInstrumentView : public InstrumentViewFixedSize { @@ -300,5 +310,8 @@ private: }; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/Sid/SidInstrument.cpp b/plugins/Sid/SidInstrument.cpp index 32b0d7a24..450d172cf 100644 --- a/plugins/Sid/SidInstrument.cpp +++ b/plugins/Sid/SidInstrument.cpp @@ -42,6 +42,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + #define C64_PAL_CYCLES_PER_SEC 985248 #define NUMSIDREGS 0x19 @@ -452,13 +456,16 @@ void SidInstrument::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * SidInstrument::instantiateView( QWidget * _parent ) +gui::PluginView* SidInstrument::instantiateView( QWidget * _parent ) { - return( new SidInstrumentView( this, _parent ) ); + return( new gui::SidInstrumentView( this, _parent ) ); } +namespace gui +{ + class sidKnob : public Knob { @@ -785,7 +792,7 @@ void SidInstrumentView::modelChanged() } - +} // namespace gui extern "C" @@ -801,5 +808,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } - - +} // namespace lmms diff --git a/plugins/Sid/SidInstrument.h b/plugins/Sid/SidInstrument.h index 5f2fa7157..3a92605b6 100644 --- a/plugins/Sid/SidInstrument.h +++ b/plugins/Sid/SidInstrument.h @@ -31,12 +31,19 @@ #include "Instrument.h" #include "InstrumentView.h" +namespace lmms +{ + -class Knob; -class SidInstrumentView; class NotePlayHandle; + +namespace gui +{ +class Knob; class automatableButtonGroup; +class SidInstrumentView; class PixmapButton; +} class VoiceObject : public Model { @@ -68,7 +75,7 @@ private: BoolModel m_testModel; friend class SidInstrument; - friend class SidInstrumentView; + friend class gui::SidInstrumentView; } ; class SidInstrument : public Instrument @@ -104,7 +111,7 @@ public: virtual f_cnt_t desiredReleaseFrames() const; - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); /*public slots: @@ -126,11 +133,14 @@ private: IntModel m_chipModel; - friend class SidInstrumentView; + friend class gui::SidInstrumentView; } ; +namespace gui +{ + class SidInstrumentView : public InstrumentViewFixedSize { @@ -200,4 +210,8 @@ protected slots: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/SpectrumAnalyzer/Analyzer.cpp b/plugins/SpectrumAnalyzer/Analyzer.cpp index e7b23d7b0..de4ac8c68 100644 --- a/plugins/SpectrumAnalyzer/Analyzer.cpp +++ b/plugins/SpectrumAnalyzer/Analyzer.cpp @@ -36,6 +36,9 @@ #include "lmms_basics.h" #include "plugin_export.h" +namespace lmms +{ + extern "C" { Plugin::Descriptor PLUGIN_EXPORT analyzer_plugin_descriptor = @@ -116,3 +119,5 @@ extern "C" { } } + +} // namespace lmms diff --git a/plugins/SpectrumAnalyzer/Analyzer.h b/plugins/SpectrumAnalyzer/Analyzer.h index 57a11d30a..9013b6745 100644 --- a/plugins/SpectrumAnalyzer/Analyzer.h +++ b/plugins/SpectrumAnalyzer/Analyzer.h @@ -34,6 +34,9 @@ #include "SaControls.h" #include "SaProcessor.h" +namespace lmms +{ + //! Top level class; handles LMMS interface and feeds data to the data processor. class Analyzer : public Effect @@ -70,5 +73,8 @@ private: #endif }; + +} // namespace lmms + #endif // ANALYZER_H diff --git a/plugins/SpectrumAnalyzer/DataprocLauncher.h b/plugins/SpectrumAnalyzer/DataprocLauncher.h index d91e0bedf..4325284c9 100644 --- a/plugins/SpectrumAnalyzer/DataprocLauncher.h +++ b/plugins/SpectrumAnalyzer/DataprocLauncher.h @@ -30,6 +30,10 @@ #include "SaProcessor.h" #include "LocklessRingBuffer.h" +namespace lmms +{ + + class DataprocLauncher : public QThread { public: @@ -49,4 +53,7 @@ private: LocklessRingBuffer *m_inputBuffer; }; + +} // namespace lmms + #endif // DATAPROCLAUNCHER_H diff --git a/plugins/SpectrumAnalyzer/SaControls.cpp b/plugins/SpectrumAnalyzer/SaControls.cpp index 45490f6b3..1ebfcdca3 100644 --- a/plugins/SpectrumAnalyzer/SaControls.cpp +++ b/plugins/SpectrumAnalyzer/SaControls.cpp @@ -29,6 +29,9 @@ #include "Analyzer.h" #include "SaControlsDialog.h" +namespace lmms +{ + SaControls::SaControls(Analyzer *effect) : EffectControls(effect), @@ -121,9 +124,9 @@ SaControls::SaControls(Analyzer *effect) : // Create the SaControlDialog widget which handles display of GUI elements. -EffectControlDialog* SaControls::createView() +gui::EffectControlDialog* SaControls::createView() { - return new SaControlsDialog(this, m_effect->getProcessor()); + return new gui::SaControlsDialog(this, m_effect->getProcessor()); } @@ -174,3 +177,6 @@ void SaControls::saveSettings(QDomDocument &doc, QDomElement &parent) m_zeroPaddingModel.saveSettings(doc, parent, "ZeroPadding"); } + + +} // namespace lmms diff --git a/plugins/SpectrumAnalyzer/SaControls.h b/plugins/SpectrumAnalyzer/SaControls.h index d75156f74..70a7559f2 100644 --- a/plugins/SpectrumAnalyzer/SaControls.h +++ b/plugins/SpectrumAnalyzer/SaControls.h @@ -30,9 +30,19 @@ //#define SA_DEBUG 1 // define SA_DEBUG to enable performance measurements +namespace lmms +{ + class Analyzer; +namespace gui +{ +class SaControlsDialog; +class SaSpectrumView; +class SaWaterfallView; +} + // Holds all the configuration values class SaControls : public EffectControls { @@ -41,7 +51,7 @@ public: explicit SaControls(Analyzer* effect); virtual ~SaControls() {} - EffectControlDialog* createView() override; + gui::EffectControlDialog* createView() override; void saveSettings (QDomDocument& doc, QDomElement& parent) override; void loadSettings (const QDomElement &_this) override; @@ -88,9 +98,13 @@ private: QColor m_colorGrid; //!< color of grid lines QColor m_colorLabels; //!< color of axis labels - friend class SaControlsDialog; - friend class SaSpectrumView; - friend class SaWaterfallView; + friend class gui::SaControlsDialog; + friend class gui::SaSpectrumView; + friend class gui::SaWaterfallView; friend class SaProcessor; }; + + +} // namespace lmms + #endif // SACONTROLS_H diff --git a/plugins/SpectrumAnalyzer/SaControlsDialog.cpp b/plugins/SpectrumAnalyzer/SaControlsDialog.cpp index 7b6adeb1c..e8344ead5 100644 --- a/plugins/SpectrumAnalyzer/SaControlsDialog.cpp +++ b/plugins/SpectrumAnalyzer/SaControlsDialog.cpp @@ -41,6 +41,10 @@ #include "SaWaterfallView.h" +namespace lmms::gui +{ + + // The entire GUI layout is built here. SaControlsDialog::SaControlsDialog(SaControls *controls, SaProcessor *processor) : EffectControlDialog(controls), @@ -350,3 +354,5 @@ QSize SaControlsDialog::sizeHint() const } } + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/SpectrumAnalyzer/SaControlsDialog.h b/plugins/SpectrumAnalyzer/SaControlsDialog.h index 8cbb0ecaa..1504da3dc 100644 --- a/plugins/SpectrumAnalyzer/SaControlsDialog.h +++ b/plugins/SpectrumAnalyzer/SaControlsDialog.h @@ -28,12 +28,19 @@ #include "EffectControlDialog.h" #include "fft_helpers.h" +namespace lmms +{ class SaControls; class SaProcessor; +} + + +namespace lmms::gui +{ + class SaSpectrumView; class SaWaterfallView; - //! Top-level widget holding the configuration GUI and spectrum displays class SaControlsDialog : public EffectControlDialog { @@ -56,4 +63,7 @@ private: SaWaterfallView *m_waterfall; }; + +} // namespace lmms::gui + #endif // SACONTROLSDIALOG_H diff --git a/plugins/SpectrumAnalyzer/SaProcessor.cpp b/plugins/SpectrumAnalyzer/SaProcessor.cpp index 843067988..02fd3d770 100644 --- a/plugins/SpectrumAnalyzer/SaProcessor.cpp +++ b/plugins/SpectrumAnalyzer/SaProcessor.cpp @@ -41,6 +41,9 @@ #include "LocklessRingBuffer.h" #include "SaControls.h" +namespace lmms +{ + SaProcessor::SaProcessor(const SaControls *controls) : m_controls(controls), @@ -689,3 +692,5 @@ float SaProcessor::yPixelToAmp(float y, unsigned int height) const } } + +} // namespace lmms diff --git a/plugins/SpectrumAnalyzer/SaProcessor.h b/plugins/SpectrumAnalyzer/SaProcessor.h index b331a9c09..66b79788d 100644 --- a/plugins/SpectrumAnalyzer/SaProcessor.h +++ b/plugins/SpectrumAnalyzer/SaProcessor.h @@ -36,6 +36,9 @@ #include "lmms_basics.h" +namespace lmms +{ + template class LocklessRingBuffer; @@ -161,5 +164,9 @@ private: float m_max_execution; #endif }; + + +} // namespace lmms + #endif // SAPROCESSOR_H diff --git a/plugins/SpectrumAnalyzer/SaSpectrumView.cpp b/plugins/SpectrumAnalyzer/SaSpectrumView.cpp index 1feee5cef..8c3d7a82d 100644 --- a/plugins/SpectrumAnalyzer/SaSpectrumView.cpp +++ b/plugins/SpectrumAnalyzer/SaSpectrumView.cpp @@ -43,6 +43,9 @@ #include #endif +namespace lmms::gui +{ + SaSpectrumView::SaSpectrumView(SaControls *controls, SaProcessor *processor, QWidget *_parent) : QWidget(_parent), @@ -843,3 +846,5 @@ void SaSpectrumView::resizeEvent(QResizeEvent *event) m_linearAmpTics = makeLinearAmpTics(m_processor->getAmpRangeMin(), m_processor->getAmpRangeMax()); } + +} // namespace lmms::gui diff --git a/plugins/SpectrumAnalyzer/SaSpectrumView.h b/plugins/SpectrumAnalyzer/SaSpectrumView.h index 70606cc34..4ac24cbf0 100644 --- a/plugins/SpectrumAnalyzer/SaSpectrumView.h +++ b/plugins/SpectrumAnalyzer/SaSpectrumView.h @@ -36,9 +36,18 @@ class QMouseEvent; class QPainter; + +namespace lmms +{ + + class SaControls; class SaProcessor; +namespace gui +{ + + //! Widget that displays a spectrum curve and frequency / amplitude grid class SaSpectrumView : public QWidget { @@ -137,5 +146,11 @@ private: float m_draw_avg; #endif }; + + +} // namespace gui + +} // namespace lmms + #endif // SASPECTRUMVIEW_H diff --git a/plugins/SpectrumAnalyzer/SaWaterfallView.cpp b/plugins/SpectrumAnalyzer/SaWaterfallView.cpp index 36fcbf3bc..598bad725 100644 --- a/plugins/SpectrumAnalyzer/SaWaterfallView.cpp +++ b/plugins/SpectrumAnalyzer/SaWaterfallView.cpp @@ -40,6 +40,10 @@ #include "SaProcessor.h" +namespace lmms::gui +{ + + SaWaterfallView::SaWaterfallView(SaControls *controls, SaProcessor *processor, QWidget *_parent) : QWidget(_parent), m_controls(controls), @@ -341,3 +345,6 @@ void SaWaterfallView::resizeEvent(QResizeEvent *event) { m_timeTics = makeTimeTics(); } + + +} // namespace lmms::gui diff --git a/plugins/SpectrumAnalyzer/SaWaterfallView.h b/plugins/SpectrumAnalyzer/SaWaterfallView.h index b2f815203..cdfad6ad4 100644 --- a/plugins/SpectrumAnalyzer/SaWaterfallView.h +++ b/plugins/SpectrumAnalyzer/SaWaterfallView.h @@ -29,10 +29,19 @@ #include -class EffectControlDialog; class QMouseEvent; + +namespace lmms +{ class SaControls; class SaProcessor; +} + +namespace lmms::gui +{ + +class EffectControlDialog; + // Widget that displays a spectrum waterfall (spectrogram) and time labels. class SaWaterfallView : public QWidget @@ -87,4 +96,8 @@ private: float m_execution_avg; #endif }; + + +} // namespace lmms::gui + #endif // SAWATERFALLVIEW_H diff --git a/plugins/StereoEnhancer/StereoEnhancer.cpp b/plugins/StereoEnhancer/StereoEnhancer.cpp index 6e8661dcb..bda9c8086 100644 --- a/plugins/StereoEnhancer/StereoEnhancer.cpp +++ b/plugins/StereoEnhancer/StereoEnhancer.cpp @@ -28,6 +28,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -172,3 +176,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data ) } + +} // namespace lmms \ No newline at end of file diff --git a/plugins/StereoEnhancer/StereoEnhancer.h b/plugins/StereoEnhancer/StereoEnhancer.h index 4c7ea6ac6..a3f4a6de4 100644 --- a/plugins/StereoEnhancer/StereoEnhancer.h +++ b/plugins/StereoEnhancer/StereoEnhancer.h @@ -30,6 +30,10 @@ #include "DspEffectLibrary.h" #include "StereoEnhancerControls.h" +namespace lmms +{ + + class StereoEnhancerEffect : public Effect { public: @@ -59,5 +63,6 @@ private: } ; +} // namespace lmms #endif diff --git a/plugins/StereoEnhancer/StereoEnhancerControlDialog.cpp b/plugins/StereoEnhancer/StereoEnhancerControlDialog.cpp index d86fbc6d7..f024ab33f 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControlDialog.cpp +++ b/plugins/StereoEnhancer/StereoEnhancerControlDialog.cpp @@ -26,12 +26,12 @@ #include "StereoEnhancerControlDialog.h" - #include - #include "Knob.h" #include "StereoEnhancerControls.h" +namespace lmms::gui +{ StereoEnhancerControlDialog::StereoEnhancerControlDialog( @@ -50,3 +50,5 @@ StereoEnhancerControlDialog::StereoEnhancerControlDialog( this->setLayout(l); } + +} // namespace lmms::gui diff --git a/plugins/StereoEnhancer/StereoEnhancerControlDialog.h b/plugins/StereoEnhancer/StereoEnhancerControlDialog.h index 3d1d82bae..62f78d1cd 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControlDialog.h +++ b/plugins/StereoEnhancer/StereoEnhancerControlDialog.h @@ -27,9 +27,16 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class StereoEnhancerControls; +namespace gui +{ + + class StereoEnhancerControlDialog : public EffectControlDialog { Q_OBJECT @@ -41,5 +48,8 @@ public: }; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/StereoEnhancer/StereoEnhancerControls.cpp b/plugins/StereoEnhancer/StereoEnhancerControls.cpp index a844e74f5..3cad94f91 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControls.cpp +++ b/plugins/StereoEnhancer/StereoEnhancerControls.cpp @@ -28,6 +28,9 @@ #include "StereoEnhancerControls.h" #include "StereoEnhancer.h" +namespace lmms +{ + StereoEnhancerControls::StereoEnhancerControls( StereoEnhancerEffect * _eff ) : EffectControls( _eff ), @@ -64,6 +67,4 @@ void StereoEnhancerControls::saveSettings( QDomDocument & _doc, } - - - +} // namespace lmms diff --git a/plugins/StereoEnhancer/StereoEnhancerControls.h b/plugins/StereoEnhancer/StereoEnhancerControls.h index cefed77f9..c9a0f6e61 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControls.h +++ b/plugins/StereoEnhancer/StereoEnhancerControls.h @@ -28,6 +28,10 @@ #include "EffectControls.h" #include "StereoEnhancerControlDialog.h" +namespace lmms +{ + + class StereoEnhancerEffect; class StereoEnhancerControls : public EffectControls @@ -51,9 +55,9 @@ public: return( 1 ); } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog* createView() { - return new StereoEnhancerControlDialog( this ); + return new gui::StereoEnhancerControlDialog( this ); } @@ -65,9 +69,11 @@ private: StereoEnhancerEffect * m_effect; FloatModel m_widthModel; - friend class StereoEnhancerControlDialog; + friend class gui::StereoEnhancerControlDialog; } ; +} // namespace lmms + #endif /*_STEREO_ENHANCER_CONTROLS_H*/ diff --git a/plugins/StereoMatrix/StereoMatrix.cpp b/plugins/StereoMatrix/StereoMatrix.cpp index c8a743fe3..de15d8370 100644 --- a/plugins/StereoMatrix/StereoMatrix.cpp +++ b/plugins/StereoMatrix/StereoMatrix.cpp @@ -28,6 +28,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -121,3 +125,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data ) } } + + +} // namespace lmms diff --git a/plugins/StereoMatrix/StereoMatrix.h b/plugins/StereoMatrix/StereoMatrix.h index 39ed4a1ad..88d265ad2 100644 --- a/plugins/StereoMatrix/StereoMatrix.h +++ b/plugins/StereoMatrix/StereoMatrix.h @@ -29,6 +29,10 @@ #include "Effect.h" #include "StereoMatrixControls.h" +namespace lmms +{ + + class StereoMatrixEffect : public Effect { public: @@ -38,7 +42,7 @@ public: virtual bool processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ); - virtual EffectControls * controls() + virtual EffectControls* controls() { return( &m_smControls ); } @@ -51,5 +55,6 @@ private: } ; +} // namespace lmms #endif diff --git a/plugins/StereoMatrix/StereoMatrixControlDialog.cpp b/plugins/StereoMatrix/StereoMatrixControlDialog.cpp index 3899219dd..5bf62b9ce 100644 --- a/plugins/StereoMatrix/StereoMatrixControlDialog.cpp +++ b/plugins/StereoMatrix/StereoMatrixControlDialog.cpp @@ -31,6 +31,8 @@ #include "Knob.h" #include "StereoMatrixControls.h" +namespace lmms::gui +{ StereoMatrixControlDialog::StereoMatrixControlDialog( @@ -67,3 +69,6 @@ StereoMatrixControlDialog::StereoMatrixControlDialog( rrKnob->setHintText( tr( "Right to Right Vol:" ) , "" ); rrKnob->move( 123, 79 ); } + + +} // namespace lmms::gui diff --git a/plugins/StereoMatrix/StereoMatrixControlDialog.h b/plugins/StereoMatrix/StereoMatrixControlDialog.h index 4de00ec70..fd5cf786a 100644 --- a/plugins/StereoMatrix/StereoMatrixControlDialog.h +++ b/plugins/StereoMatrix/StereoMatrixControlDialog.h @@ -27,8 +27,14 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class StereoMatrixControls; +namespace gui +{ + class StereoMatrixControlDialog : public EffectControlDialog { @@ -42,4 +48,8 @@ public: }; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/StereoMatrix/StereoMatrixControls.cpp b/plugins/StereoMatrix/StereoMatrixControls.cpp index 75f513a60..e60b02a8d 100644 --- a/plugins/StereoMatrix/StereoMatrixControls.cpp +++ b/plugins/StereoMatrix/StereoMatrixControls.cpp @@ -28,6 +28,9 @@ #include "StereoMatrixControls.h" #include "StereoMatrix.h" +namespace lmms +{ + StereoMatrixControls::StereoMatrixControls( StereoMatrixEffect * _eff ) : EffectControls( _eff ), @@ -81,3 +84,6 @@ void StereoMatrixControls::saveSettings( QDomDocument & _doc, m_rlModel.saveSettings( _doc, _this, "r-l" ); m_rrModel.saveSettings( _doc, _this, "r-r" ); } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/StereoMatrix/StereoMatrixControls.h b/plugins/StereoMatrix/StereoMatrixControls.h index 3b89d74d2..97f0cf8e1 100644 --- a/plugins/StereoMatrix/StereoMatrixControls.h +++ b/plugins/StereoMatrix/StereoMatrixControls.h @@ -28,6 +28,10 @@ #include "EffectControls.h" #include "StereoMatrixControlDialog.h" +namespace lmms +{ + + class StereoMatrixEffect; class StereoMatrixControls : public EffectControls @@ -51,9 +55,9 @@ public: return( 1 ); } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog* createView() { - return new StereoMatrixControlDialog( this ); + return new gui::StereoMatrixControlDialog( this ); } @@ -69,10 +73,12 @@ private: FloatModel m_rlModel; FloatModel m_rrModel; - friend class StereoMatrixControlDialog; + friend class gui::StereoMatrixControlDialog; friend class StereoMatrixEffect; } ; +} // namespace lmms + #endif diff --git a/plugins/Stk/Mallets/Mallets.cpp b/plugins/Stk/Mallets/Mallets.cpp index 9a4d9ea3a..37ab3f6f1 100644 --- a/plugins/Stk/Mallets/Mallets.cpp +++ b/plugins/Stk/Mallets/Mallets.cpp @@ -44,6 +44,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -377,12 +381,14 @@ void MalletsInstrument::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * MalletsInstrument::instantiateView( QWidget * _parent ) +gui::PluginView * MalletsInstrument::instantiateView( QWidget * _parent ) { - return( new MalletsInstrumentView( this, _parent ) ); + return( new gui::MalletsInstrumentView( this, _parent ) ); } +namespace gui +{ MalletsInstrumentView::MalletsInstrumentView( MalletsInstrument * _instrument, @@ -605,6 +611,8 @@ void MalletsInstrumentView::changePreset() } +} // namespace gui + // ModalBar MalletsSynth::MalletsSynth( const StkFloat _pitch, @@ -770,6 +778,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * m, void * ) } - - - +} // namespace lmms diff --git a/plugins/Stk/Mallets/Mallets.h b/plugins/Stk/Mallets/Mallets.h index fb35abb73..51b0bfb43 100644 --- a/plugins/Stk/Mallets/Mallets.h +++ b/plugins/Stk/Mallets/Mallets.h @@ -40,10 +40,22 @@ // However in older versions this namespace does not exist, therefore declare it // so this plugin builds with all versions of Stk. namespace stk { } ; + +namespace lmms +{ + + using namespace stk; static const int MALLETS_PRESET_VERSION = 1; + +namespace gui +{ +class MalletsInstrumentView; +} // namespace gui + + class MalletsSynth { public: @@ -160,7 +172,7 @@ public: virtual QString nodeName() const; - virtual PluginView * instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; private: @@ -193,10 +205,13 @@ private: bool m_filesMissing; - friend class MalletsInstrumentView; + friend class gui::MalletsInstrumentView; } ; +namespace gui +{ + class MalletsInstrumentView: public InstrumentViewFixedSize { @@ -242,4 +257,9 @@ private: Knob * m_spreadKnob; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/TripleOscillator/TripleOscillator.cpp b/plugins/TripleOscillator/TripleOscillator.cpp index 897b03586..2931c3b85 100644 --- a/plugins/TripleOscillator/TripleOscillator.cpp +++ b/plugins/TripleOscillator/TripleOscillator.cpp @@ -41,6 +41,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -402,9 +406,9 @@ void TripleOscillator::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * TripleOscillator::instantiateView( QWidget * _parent ) +gui::PluginView* TripleOscillator::instantiateView( QWidget * _parent ) { - return new TripleOscillatorView( this, _parent ); + return new gui::TripleOscillatorView( this, _parent ); } @@ -421,6 +425,9 @@ void TripleOscillator::updateAllDetuning() +namespace gui +{ + class TripleOscKnob : public Knob { @@ -748,6 +755,7 @@ void TripleOscillatorView::modelChanged() } +} // namespace gui extern "C" @@ -763,4 +771,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* model, void * ) - +} // namespace lmms diff --git a/plugins/TripleOscillator/TripleOscillator.h b/plugins/TripleOscillator/TripleOscillator.h index 944834417..1c8871796 100644 --- a/plugins/TripleOscillator/TripleOscillator.h +++ b/plugins/TripleOscillator/TripleOscillator.h @@ -30,13 +30,23 @@ #include "InstrumentView.h" #include "AutomatableModel.h" +namespace lmms +{ + +class NotePlayHandle; +class SampleBuffer; +class Oscillator; + + +namespace gui +{ class automatableButtonGroup; class Knob; -class NotePlayHandle; -class Oscillator; class PixmapButton; -class SampleBuffer; +class TripleOscillatorView; +} // namespace gui + const int NUM_OF_OSCILLATORS = 3; @@ -75,7 +85,7 @@ private: bool m_useWaveTable; friend class TripleOscillator; - friend class TripleOscillatorView; + friend class gui::TripleOscillatorView; private slots: @@ -115,7 +125,7 @@ public: return( 128 ); } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); protected slots: @@ -133,11 +143,14 @@ private: } ; - friend class TripleOscillatorView; + friend class gui::TripleOscillatorView; } ; +namespace gui +{ + class TripleOscillatorView : public InstrumentViewFixedSize { @@ -198,5 +211,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/Vectorscope/VecControls.cpp b/plugins/Vectorscope/VecControls.cpp index ede9c77b2..cd0f21f61 100644 --- a/plugins/Vectorscope/VecControls.cpp +++ b/plugins/Vectorscope/VecControls.cpp @@ -29,6 +29,9 @@ #include "VecControlsDialog.h" #include "Vectorscope.h" +namespace lmms +{ + VecControls::VecControls(Vectorscope *effect) : EffectControls(effect), @@ -48,9 +51,9 @@ VecControls::VecControls(Vectorscope *effect) : // Create the VecControlDialog widget which handles display of GUI elements. -EffectControlDialog* VecControls::createView() +gui::EffectControlDialog* VecControls::createView() { - return new VecControlsDialog(this); + return new gui::VecControlsDialog(this); } @@ -68,3 +71,6 @@ void VecControls::saveSettings(QDomDocument &document, QDomElement &element) m_logarithmicModel.saveSettings(document, element, "Logarithmic"); m_highQualityModel.saveSettings(document, element, "HighQuality"); } + + +} // namespace lmms diff --git a/plugins/Vectorscope/VecControls.h b/plugins/Vectorscope/VecControls.h index 04b688e5a..e4aa27b43 100644 --- a/plugins/Vectorscope/VecControls.h +++ b/plugins/Vectorscope/VecControls.h @@ -29,9 +29,18 @@ #include "EffectControls.h" +namespace lmms +{ + class Vectorscope; +namespace gui +{ +class VecControlsDialog; +class VectorView; +} + // Holds all the configuration values class VecControls : public EffectControls { @@ -40,7 +49,7 @@ public: explicit VecControls(Vectorscope *effect); virtual ~VecControls() {} - EffectControlDialog *createView() override; + gui::EffectControlDialog* createView() override; void saveSettings (QDomDocument &document, QDomElement &element) override; void loadSettings (const QDomElement &element) override; @@ -60,7 +69,11 @@ private: QColor m_colorLabels; QColor m_colorOutline; - friend class VecControlsDialog; - friend class VectorView; + friend class gui::VecControlsDialog; + friend class gui::VectorView; }; + + +} // namespace lmms + #endif // VECCONTROLS_H diff --git a/plugins/Vectorscope/VecControlsDialog.cpp b/plugins/Vectorscope/VecControlsDialog.cpp index f5e740887..72b072823 100644 --- a/plugins/Vectorscope/VecControlsDialog.cpp +++ b/plugins/Vectorscope/VecControlsDialog.cpp @@ -34,6 +34,9 @@ #include "Vectorscope.h" #include "VectorView.h" +namespace lmms::gui +{ + // The entire GUI layout is built here. VecControlsDialog::VecControlsDialog(VecControls *controls) : @@ -90,3 +93,6 @@ QSize VecControlsDialog::sizeHint() const { return QSize(275, 300); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Vectorscope/VecControlsDialog.h b/plugins/Vectorscope/VecControlsDialog.h index b76c06ad0..97108cdf4 100644 --- a/plugins/Vectorscope/VecControlsDialog.h +++ b/plugins/Vectorscope/VecControlsDialog.h @@ -27,8 +27,16 @@ #include "EffectControlDialog.h" +namespace lmms +{ + + class VecControls; +namespace gui +{ + + //! Top-level widget holding the configuration GUI and vector display class VecControlsDialog : public EffectControlDialog { @@ -44,4 +52,9 @@ private: VecControls *m_controls; }; + +} // namespace gui + +} // namespace lmms + #endif // VECCONTROLSDIALOG_H diff --git a/plugins/Vectorscope/VectorView.cpp b/plugins/Vectorscope/VectorView.cpp index 93a384891..ed57f64a4 100644 --- a/plugins/Vectorscope/VectorView.cpp +++ b/plugins/Vectorscope/VectorView.cpp @@ -33,6 +33,9 @@ #include "MainWindow.h" #include "VecControls.h" +namespace lmms::gui +{ + VectorView::VectorView(VecControls *controls, LocklessRingBuffer *inputBuffer, unsigned short displaySize, QWidget *parent) : QWidget(parent), @@ -327,3 +330,6 @@ void VectorView::wheelEvent(QWheelEvent *event) ).count(); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/Vectorscope/VectorView.h b/plugins/Vectorscope/VectorView.h index 8e88847ab..0aae988db 100644 --- a/plugins/Vectorscope/VectorView.h +++ b/plugins/Vectorscope/VectorView.h @@ -27,10 +27,16 @@ #include "LocklessRingBuffer.h" +namespace lmms +{ class VecControls; +} //#define VEC_DEBUG +namespace lmms::gui +{ + // Widget that displays a vectorscope visualization of stereo signal. class VectorView : public QWidget @@ -74,4 +80,8 @@ private: float m_executionAvg = 0; #endif }; + + +} // namespace lmms::gui + #endif // VECTORVIEW_H diff --git a/plugins/Vectorscope/Vectorscope.cpp b/plugins/Vectorscope/Vectorscope.cpp index b3c2b2dda..df093f671 100644 --- a/plugins/Vectorscope/Vectorscope.cpp +++ b/plugins/Vectorscope/Vectorscope.cpp @@ -27,6 +27,9 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + extern "C" { Plugin::Descriptor PLUGIN_EXPORT vectorscope_plugin_descriptor = @@ -78,3 +81,5 @@ extern "C" { } } + +} // namespace lmms diff --git a/plugins/Vectorscope/Vectorscope.h b/plugins/Vectorscope/Vectorscope.h index b45ff6de4..973fecf0e 100644 --- a/plugins/Vectorscope/Vectorscope.h +++ b/plugins/Vectorscope/Vectorscope.h @@ -28,6 +28,9 @@ #include "LocklessRingBuffer.h" #include "VecControls.h" +namespace lmms +{ + //! Top level class; handles LMMS interface and accumulates data for processing. class Vectorscope : public Effect @@ -48,5 +51,8 @@ private: LocklessRingBuffer m_inputBuffer; }; + +} // namespace lmms + #endif // VECTORSCOPE_H diff --git a/plugins/Vestige/Vestige.cpp b/plugins/Vestige/Vestige.cpp index cb1902c66..9088321cc 100644 --- a/plugins/Vestige/Vestige.cpp +++ b/plugins/Vestige/Vestige.cpp @@ -62,6 +62,8 @@ #include "embed.h" +namespace lmms +{ extern "C" @@ -87,6 +89,9 @@ Plugin::Descriptor Q_DECL_EXPORT vestige_plugin_descriptor = } +namespace gui +{ + class vstSubWin : public SubWindow { @@ -112,6 +117,9 @@ public: }; +} // namespace gui + + class VstInstrumentPlugin : public VstPlugin { public: @@ -124,7 +132,7 @@ public: return; } if ( embedMethod() != "none" ) { - m_pluginSubWindow.reset(new vstSubWin( getGUI()->mainWindow()->workspace() )); + m_pluginSubWindow.reset(new gui::vstSubWin( gui::getGUI()->mainWindow()->workspace() )); VstPlugin::createUI( m_pluginSubWindow.get() ); m_pluginSubWindow->setWidget(pluginWidget()); } else { @@ -144,9 +152,6 @@ private: }; -QPixmap * VestigeInstrumentView::s_artwork = nullptr; -QPixmap * ManageVestigeInstrumentView::s_artwork = nullptr; - VestigeInstrument::VestigeInstrument( InstrumentTrack * _instrument_track ) : Instrument( _instrument_track, &vestige_plugin_descriptor ), @@ -350,10 +355,10 @@ void VestigeInstrument::loadFile( const QString & _file ) closePlugin(); } m_pluginDLL = PathUtil::toShortestRelative( _file ); - TextFloat * tf = nullptr; - if( getGUI() != nullptr ) + gui::TextFloat * tf = nullptr; + if( gui::getGUI() != nullptr ) { - tf = TextFloat::displayMessage( + tf = gui::TextFloat::displayMessage( tr( "Loading plugin" ), tr( "Please wait while loading the VST plugin..." ), PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 ); @@ -477,13 +482,17 @@ void VestigeInstrument::closePlugin( void ) -PluginView * VestigeInstrument::instantiateView( QWidget * _parent ) +gui::PluginView * VestigeInstrument::instantiateView( QWidget * _parent ) { - return new VestigeInstrumentView( this, _parent ); + return new gui::VestigeInstrumentView( this, _parent ); } +namespace gui +{ +QPixmap * VestigeInstrumentView::s_artwork = nullptr; +QPixmap * ManageVestigeInstrumentView::s_artwork = nullptr; VestigeInstrumentView::VestigeInstrumentView( Instrument * _instrument, @@ -928,6 +937,17 @@ ManageVestigeInstrumentView::ManageVestigeInstrumentView( Instrument * _instrume QWidget * _parent, VestigeInstrument * m_vi2 ) : InstrumentViewFixedSize( _instrument, _parent ) { +#if QT_VERSION < 0x50C00 + // Workaround for a bug in Qt versions below 5.12, + // where argument-dependent-lookup fails for QFlags operators + // declared inside a namepsace. + // This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h + // See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348 + + using ::operator|; + +#endif + m_vi = m_vi2; m_vi->m_scrollArea = new QScrollArea( this ); widget = new QWidget(this); @@ -1233,6 +1253,7 @@ void ManageVestigeInstrumentView::paintEvent( QPaintEvent * ) } +} // namespace gui extern "C" @@ -1246,3 +1267,6 @@ Q_DECL_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } + + +} // namespace lmms diff --git a/plugins/Vestige/Vestige.h b/plugins/Vestige/Vestige.h index 934c26088..5b7b1461d 100644 --- a/plugins/Vestige/Vestige.h +++ b/plugins/Vestige/Vestige.h @@ -37,13 +37,22 @@ class QPixmap; class QPushButton; class QScrollArea; - -class CustomTextKnob; -class FloatModel; class QGridLayout; -class PixmapButton; + +namespace lmms +{ + +class FloatModel; class VstPlugin; +namespace gui +{ +class PixmapButton; +class CustomTextKnob; +class VestigeInstrumentView; +class ManageVestigeInstrumentView; +} // namespace gui + class VestigeInstrument : public Instrument { @@ -68,10 +77,10 @@ public: virtual bool handleMidiEvent( const MidiEvent& event, const TimePos& time, f_cnt_t offset = 0 ); - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); protected slots: - void setParameter( Model * action ); + void setParameter( lmms::Model * action ); void handleConfigChange( QString cls, QString attr, QString value ); void reloadPlugin(); @@ -90,12 +99,15 @@ private: int paramCount; - friend class VestigeInstrumentView; - friend class ManageVestigeInstrumentView; + friend class gui::VestigeInstrumentView; + friend class gui::ManageVestigeInstrumentView; } ; +namespace gui +{ + class ManageVestigeInstrumentView : public InstrumentViewFixedSize { Q_OBJECT @@ -107,7 +119,7 @@ public: protected slots: void syncPlugin( void ); void displayAutomatedOnly( void ); - void setParameter( Model * action ); + void setParameter( lmms::Model * action ); void syncParameterText(); void closeWindow(); @@ -184,5 +196,8 @@ private: } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/Vibed/NineButtonSelector.cpp b/plugins/Vibed/NineButtonSelector.cpp index 618a8e09d..431dbec8b 100644 --- a/plugins/Vibed/NineButtonSelector.cpp +++ b/plugins/Vibed/NineButtonSelector.cpp @@ -29,6 +29,9 @@ #include "CaptionMenu.h" #include "PixmapButton.h" +namespace lmms::gui +{ + NineButtonSelector::NineButtonSelector( QPixmap _button0_on, QPixmap _button0_off, @@ -252,3 +255,6 @@ void NineButtonSelector::contextMenuEvent( QContextMenuEvent * ) CaptionMenu contextMenu( windowTitle(), this ); contextMenu.exec( QCursor::pos() ); } + + +} // namespace lmms::gui diff --git a/plugins/Vibed/NineButtonSelector.h b/plugins/Vibed/NineButtonSelector.h index 96b441031..1c3183055 100644 --- a/plugins/Vibed/NineButtonSelector.h +++ b/plugins/Vibed/NineButtonSelector.h @@ -25,14 +25,20 @@ #ifndef _NINE_BUTTON_SELECTOR_H #define _NINE_BUTTON_SELECTOR_H - #include - #include "AutomatableModelView.h" +namespace lmms +{ +class graphModel; +} + +namespace lmms::gui +{ + + class Knob; class PixmapButton; -class graphModel; class NineButtonSelector: public QWidget , public IntModelView @@ -97,4 +103,7 @@ private: typedef IntModel NineButtonSelectorModel; + +} // namespace lmms::gui + #endif diff --git a/plugins/Vibed/StringContainer.cpp b/plugins/Vibed/StringContainer.cpp index 0ec38c94f..36dee6da0 100644 --- a/plugins/Vibed/StringContainer.cpp +++ b/plugins/Vibed/StringContainer.cpp @@ -24,6 +24,9 @@ #include "StringContainer.h" +namespace lmms +{ + StringContainer::StringContainer(const float _pitch, const sample_rate_t _sample_rate, @@ -100,3 +103,6 @@ void StringContainer::addString(int _harm, _state ) ); m_exists[_id] = true; } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Vibed/StringContainer.h b/plugins/Vibed/StringContainer.h index 503b7c16c..96408c56a 100644 --- a/plugins/Vibed/StringContainer.h +++ b/plugins/Vibed/StringContainer.h @@ -29,6 +29,9 @@ #include "VibratingString.h" #include "MemoryManager.h" +namespace lmms +{ + class StringContainer { @@ -77,4 +80,7 @@ private: QVector m_exists; } ; + +} // namespace lmms + #endif diff --git a/plugins/Vibed/Vibed.cpp b/plugins/Vibed/Vibed.cpp index 0a6f14c2a..87c42b187 100644 --- a/plugins/Vibed/Vibed.cpp +++ b/plugins/Vibed/Vibed.cpp @@ -43,6 +43,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -69,7 +73,7 @@ Vibed::Vibed( InstrumentTrack * _instrumentTrack ) : FloatModel * knob; BoolModel * led; - NineButtonSelectorModel * harmonic; + gui::NineButtonSelectorModel * harmonic; graphModel * graphTmp; for( int harm = 0; harm < 9; harm++ ) @@ -114,7 +118,7 @@ Vibed::Vibed( InstrumentTrack * _instrumentTrack ) : tr( "String %1" ).arg( harm+1 ) ); m_powerButtons.append( led ); - harmonic = new NineButtonSelectorModel( 2, 0, 8, this ); + harmonic = new gui::NineButtonSelectorModel( 2, 0, 8, this ); m_harmonics.append( harmonic ); graphTmp = new graphModel( -1.0, 1.0, __sampleLength, this ); @@ -128,13 +132,6 @@ Vibed::Vibed( InstrumentTrack * _instrumentTrack ) : -Vibed::~Vibed() -{ -} - - - - void Vibed::saveSettings( QDomDocument & _doc, QDomElement & _this ) { @@ -340,13 +337,15 @@ void Vibed::deleteNotePluginData( NotePlayHandle * _n ) -PluginView * Vibed::instantiateView( QWidget * _parent ) +gui::PluginView * Vibed::instantiateView( QWidget * _parent ) { - return( new VibedView( this, _parent ) ); + return( new gui::VibedView( this, _parent ) ); } +namespace gui +{ VibedView::VibedView( Instrument * _instrument, @@ -679,6 +678,8 @@ void VibedView::contextMenuEvent( QContextMenuEvent * ) } +} // namespace gui + extern "C" { @@ -692,4 +693,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } - +} // namespace lmms diff --git a/plugins/Vibed/Vibed.h b/plugins/Vibed/Vibed.h index 2fee8eaed..f13fd665a 100644 --- a/plugins/Vibed/Vibed.h +++ b/plugins/Vibed/Vibed.h @@ -28,35 +28,43 @@ #include "InstrumentView.h" #include "NineButtonSelector.h" +namespace lmms +{ + + +class NotePlayHandle; +class graphModel; + +namespace gui +{ class Graph; class LedCheckBox; -class NotePlayHandle; class VibedView; +} class Vibed : public Instrument { Q_OBJECT public: Vibed( InstrumentTrack * _instrument_track ); - virtual ~Vibed(); - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual Flags flags() const + Flags flags() const override { return IsNotBendable; } - virtual PluginView * instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; private: @@ -71,14 +79,17 @@ private: QList m_powerButtons; QList m_graphs; QList m_impulses; - QList m_harmonics; + QList m_harmonics; static const int __sampleLength = 128; - friend class VibedView; + friend class gui::VibedView; } ; +namespace gui +{ + class VibedView : public InstrumentViewFixedSize { @@ -136,4 +147,9 @@ private: }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/Vibed/VibratingString.cpp b/plugins/Vibed/VibratingString.cpp index fda5c0c5d..4a9e740fb 100644 --- a/plugins/Vibed/VibratingString.cpp +++ b/plugins/Vibed/VibratingString.cpp @@ -28,6 +28,9 @@ #include "AudioEngine.h" #include "Engine.h" +namespace lmms +{ + VibratingString::VibratingString( float _pitch, float _pick, @@ -156,3 +159,5 @@ void VibratingString::resample( float *_src, f_cnt_t _src_frames, } } + +} // namespace lmms diff --git a/plugins/Vibed/VibratingString.h b/plugins/Vibed/VibratingString.h index 254e2ebd5..ed7cbe38c 100644 --- a/plugins/Vibed/VibratingString.h +++ b/plugins/Vibed/VibratingString.h @@ -28,6 +28,10 @@ #include "lmms_basics.h" +namespace lmms +{ + + class VibratingString { @@ -267,4 +271,7 @@ private: } ; + +} // namespace lmms + #endif diff --git a/plugins/VstBase/RemoteVstPlugin.cpp b/plugins/VstBase/RemoteVstPlugin.cpp index f2199893a..7ac0c97e2 100644 --- a/plugins/VstBase/RemoteVstPlugin.cpp +++ b/plugins/VstBase/RemoteVstPlugin.cpp @@ -127,16 +127,19 @@ struct ERect using namespace std; -static VstHostLanguages hlang = LanguageEnglish; +static lmms::VstHostLanguages hlang = lmms::LanguageEnglish; static bool EMBED = false; static bool EMBED_X11 = false; static bool EMBED_WIN32 = false; static bool HEADLESS = false; +namespace lmms +{ class RemoteVstPlugin; +} -RemoteVstPlugin * __plugin = nullptr; +lmms::RemoteVstPlugin * __plugin = nullptr; #ifndef NATIVE_LINUX_VST HWND __MessageHwnd = nullptr; @@ -145,6 +148,10 @@ DWORD __processingThreadId = 0; pthread_t __processingThreadId = 0; #endif +namespace lmms +{ + + #ifdef _WIN32 //Returns the last Win32 error, in string format. Returns an empty string if there is no error. std::string GetErrorAsString(DWORD errorMessageID) @@ -2414,11 +2421,17 @@ LRESULT CALLBACK RemoteVstPlugin::wndProc( HWND hwnd, UINT uMsg, return DefWindowProc( hwnd, uMsg, wParam, lParam ); } + + #endif +} // namespace lmms + int main( int _argc, char * * _argv ) { + using lmms::RemoteVstPlugin; + #ifdef SYNC_WITH_SHM_FIFO if( _argc < 4 ) #else @@ -2430,7 +2443,7 @@ int main( int _argc, char * * _argv ) } #ifndef LMMS_BUILD_WIN32 - const auto pollParentThread = PollParentThread{}; + const auto pollParentThread = lmms::PollParentThread{}; #endif #ifndef NATIVE_LINUX_VST @@ -2490,32 +2503,32 @@ int main( int _argc, char * * _argv ) if ( embedMethod == "none" ) { - cerr << "Starting detached." << endl; + std::cerr << "Starting detached." << std::endl; EMBED = EMBED_X11 = EMBED_WIN32 = HEADLESS = false; } else if ( embedMethod == "win32" ) { - cerr << "Starting using Win32-native embedding." << endl; + std::cerr << "Starting using Win32-native embedding." << std::endl; EMBED = EMBED_WIN32 = true; EMBED_X11 = HEADLESS = false; } else if ( embedMethod == "qt" ) { - cerr << "Starting using Qt-native embedding." << endl; + std::cerr << "Starting using Qt-native embedding." << std::endl; EMBED = true; EMBED_X11 = EMBED_WIN32 = HEADLESS = false; } else if ( embedMethod == "xembed" ) { - cerr << "Starting using X11Embed protocol." << endl; + std::cerr << "Starting using X11Embed protocol." << std::endl; EMBED = EMBED_X11 = true; EMBED_WIN32 = HEADLESS = false; } else if ( embedMethod == "headless" ) { - cerr << "Starting without UI." << endl; + std::cerr << "Starting without UI." << std::endl; HEADLESS = true; EMBED = EMBED_X11 = EMBED_WIN32 = false; } else { - cerr << "Unknown embed method " << embedMethod << ". Starting detached instead." << endl; + std::cerr << "Unknown embed method " << embedMethod << ". Starting detached instead." << std::endl; EMBED = EMBED_X11 = EMBED_WIN32 = HEADLESS = false; } } @@ -2523,7 +2536,7 @@ int main( int _argc, char * * _argv ) #ifdef NATIVE_LINUX_VST if (EMBED) { - cerr << "Native linux VST works only without embedding." << endl; + std::cerr << "Native linux VST works only without embedding." << std::endl; } #endif @@ -2567,4 +2580,3 @@ int main( int _argc, char * * _argv ) #endif return 0; } - diff --git a/plugins/VstBase/VstPlugin.cpp b/plugins/VstBase/VstPlugin.cpp index 61d734675..a31cc832c 100644 --- a/plugins/VstBase/VstPlugin.cpp +++ b/plugins/VstBase/VstPlugin.cpp @@ -113,6 +113,9 @@ private: } +namespace lmms +{ + enum class ExecutableType { Unknown, Win32, Win64, Linux64, @@ -121,7 +124,7 @@ enum class ExecutableType VstPlugin::VstPlugin( const QString & _plugin ) : m_plugin( PathUtil::toAbsolute(_plugin) ), m_pluginWindowID( 0 ), - m_embedMethod( (getGUI() != nullptr) + m_embedMethod( (gui::getGUI() != nullptr) ? ConfigManager::inst()->vstEmbedMethod() : "headless" ), m_version( 0 ), @@ -179,8 +182,8 @@ VstPlugin::VstPlugin( const QString & _plugin ) : setTempo( Engine::getSong()->getTempo() ); - connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), - this, SLOT( setTempo( bpm_t ) ), Qt::DirectConnection ); + connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ), + this, SLOT( setTempo( lmms::bpm_t ) ), Qt::DirectConnection ); connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); @@ -413,13 +416,13 @@ bool VstPlugin::processMessage( const message & _m ) // so this is legal despite MSDN's warning SetWindowLongPtr( (HWND)(intptr_t) m_pluginWindowID, GWLP_HWNDPARENT, - (LONG_PTR) getGUI()->mainWindow()->winId() ); + (LONG_PTR) gui::getGUI()->mainWindow()->winId() ); #endif #ifdef LMMS_BUILD_LINUX XSetTransientForHint( QX11Info::display(), m_pluginWindowID, - getGUI()->mainWindow()->winId() ); + gui::getGUI()->mainWindow()->winId() ); #endif } break; @@ -505,9 +508,9 @@ QWidget *VstPlugin::editor() void VstPlugin::openPreset( ) { - FileDialog ofd( nullptr, tr( "Open Preset" ), "", + gui::FileDialog ofd( nullptr, tr( "Open Preset" ), "", tr( "Vst Plugin Preset (*.fxp *.fxb)" ) ); - ofd.setFileMode( FileDialog::ExistingFiles ); + ofd.setFileMode( gui::FileDialog::ExistingFiles ); if( ofd.exec () == QDialog::Accepted && !ofd.selectedFiles().isEmpty() ) { @@ -585,7 +588,7 @@ void VstPlugin::savePreset( ) QString presName = currentProgramName().isEmpty() ? tr(": default") : currentProgramName(); presName.replace("\"", "'"); // QFileDialog unable to handle double quotes properly - FileDialog sfd( nullptr, tr( "Save Preset" ), presName.section(": ", 1, 1) + tr(".fxp"), + gui::FileDialog sfd( nullptr, tr( "Save Preset" ), presName.section(": ", 1, 1) + tr(".fxp"), tr( "Vst Plugin Preset (*.fxp *.fxb)" ) ); if( p_name != "" ) // remember last directory @@ -593,8 +596,8 @@ void VstPlugin::savePreset( ) sfd.setDirectory( QFileInfo( p_name ).absolutePath() ); } - sfd.setAcceptMode( FileDialog::AcceptSave ); - sfd.setFileMode( FileDialog::AnyFile ); + sfd.setAcceptMode( gui::FileDialog::AcceptSave ); + sfd.setFileMode( gui::FileDialog::AnyFile ); if( sfd.exec () == QDialog::Accepted && !sfd.selectedFiles().isEmpty() && sfd.selectedFiles()[0] != "" ) { @@ -823,3 +826,6 @@ QString VstPlugin::embedMethod() const { return m_embedMethod; } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/VstBase/VstPlugin.h b/plugins/VstBase/VstPlugin.h index 2317cf3ad..f73c1c876 100644 --- a/plugins/VstBase/VstPlugin.h +++ b/plugins/VstBase/VstPlugin.h @@ -36,7 +36,8 @@ #include "vstbase_export.h" -class vstSubWin; +namespace lmms +{ class VSTBASE_EXPORT VstPlugin : public RemotePlugin, public JournallingObject @@ -123,7 +124,7 @@ public: QString embedMethod() const; public slots: - void setTempo( bpm_t _bpm ); + void setTempo( lmms::bpm_t _bpm ); void updateSampleRate(); void openPreset( void ); void setProgram( int index ); @@ -173,4 +174,6 @@ private: } ; +} // namespace lmms + #endif diff --git a/plugins/VstBase/communication.h b/plugins/VstBase/communication.h index c25b213d1..1f32dd135 100644 --- a/plugins/VstBase/communication.h +++ b/plugins/VstBase/communication.h @@ -27,6 +27,8 @@ #ifndef _COMMUNICATION_H #define _COMMUNICATION_H +namespace lmms +{ struct VstParameterDumpItem @@ -54,7 +56,7 @@ enum VstHostLanguages enum VstRemoteMessageIDs { // vstPlugin -> remoteVstPlugin - IdVstLoadPlugin = IdUserBase, + IdVstLoadPlugin = RemoteMessageIDs::IdUserBase, IdVstClosePlugin, IdVstSetTempo, IdVstSetLanguage, @@ -87,5 +89,6 @@ enum VstRemoteMessageIDs } ; +} // namespace lmms #endif diff --git a/plugins/VstBase/vst_base.cpp b/plugins/VstBase/vst_base.cpp index 67217390a..6885feb97 100644 --- a/plugins/VstBase/vst_base.cpp +++ b/plugins/VstBase/vst_base.cpp @@ -27,6 +27,10 @@ #include "Plugin.h" #include "vstbase_export.h" +namespace lmms +{ + + extern "C" { @@ -45,3 +49,4 @@ Plugin::Descriptor VSTBASE_EXPORT vstbase_plugin_descriptor = } +} // namespace lmms diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index df5b18eb9..4fd66dbb5 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -34,6 +34,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -126,10 +130,10 @@ bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) void VstEffect::openPlugin( const QString & _plugin ) { - TextFloat * tf = nullptr; - if( getGUI() != nullptr ) + gui::TextFloat* tf = nullptr; + if( gui::getGUI() != nullptr ) { - tf = TextFloat::displayMessage( + tf = gui::TextFloat::displayMessage( VstPlugin::tr( "Loading plugin" ), VstPlugin::tr( "Please wait while loading VST plugin..." ), PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 ); @@ -166,3 +170,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data ) } + +} // namespace lmms diff --git a/plugins/VstEffect/VstEffect.h b/plugins/VstEffect/VstEffect.h index 7070ffc2f..12b15dc49 100644 --- a/plugins/VstEffect/VstEffect.h +++ b/plugins/VstEffect/VstEffect.h @@ -31,8 +31,13 @@ #include "Effect.h" #include "VstEffectControls.h" +namespace lmms +{ + + class VstPlugin; + class VstEffect : public Effect { public: @@ -61,11 +66,12 @@ private: friend class VstEffectControls; - friend class VstEffectControlDialog; - friend class ManageVSTEffectView; + friend class gui::VstEffectControlDialog; + friend class gui::ManageVSTEffectView; } ; +} // namespace lmms #endif diff --git a/plugins/VstEffect/VstEffectControlDialog.cpp b/plugins/VstEffect/VstEffectControlDialog.cpp index 4e86cc71d..ba7d58ffa 100644 --- a/plugins/VstEffect/VstEffectControlDialog.cpp +++ b/plugins/VstEffect/VstEffectControlDialog.cpp @@ -37,6 +37,10 @@ #include #include +namespace lmms::gui +{ + + VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) : EffectControlDialog( _ctl ), m_pluginWidget( nullptr ), @@ -294,3 +298,5 @@ void VstEffectControlDialog::togglePluginUI( bool checked ) } } + +} // namespace lmms::gui \ No newline at end of file diff --git a/plugins/VstEffect/VstEffectControlDialog.h b/plugins/VstEffect/VstEffectControlDialog.h index dad68ae04..f54ab750c 100644 --- a/plugins/VstEffect/VstEffectControlDialog.h +++ b/plugins/VstEffect/VstEffectControlDialog.h @@ -29,13 +29,19 @@ #include +class QPixmap; +class QPushButton; +class QLabel; + +namespace lmms +{ class VstEffectControls; class VstPlugin; -class PixmapButton; -class QLabel; -class QPixmap; -class QPushButton; + +namespace gui +{ + class PixmapButton; @@ -68,4 +74,9 @@ public slots: void togglePluginUI( bool checked ); } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/VstEffect/VstEffectControls.cpp b/plugins/VstEffect/VstEffectControls.cpp index 21de98fab..9def52727 100644 --- a/plugins/VstEffect/VstEffectControls.cpp +++ b/plugins/VstEffect/VstEffectControls.cpp @@ -42,6 +42,8 @@ #include "SubWindow.h" #include +namespace lmms +{ VstEffectControls::VstEffectControls( VstEffect * _eff ) : @@ -155,9 +157,9 @@ int VstEffectControls::controlCount() -EffectControlDialog *VstEffectControls::createView() +gui::EffectControlDialog* VstEffectControls::createView() { - auto dialog = new VstEffectControlDialog( this ); + auto dialog = new gui::VstEffectControlDialog( this ); dialog->togglePluginUI( m_vstGuiVisible ); return dialog; } @@ -168,7 +170,7 @@ EffectControlDialog *VstEffectControls::createView() void VstEffectControls::managePlugin( void ) { if ( m_effect->m_plugin != nullptr && m_subWindow == nullptr ) { - ManageVSTEffectView * tt = new ManageVSTEffectView( m_effect, this); + gui::ManageVSTEffectView * tt = new gui::ManageVSTEffectView( m_effect, this); ctrHandle = (QObject *)tt; } else if (m_subWindow != nullptr) { if (m_subWindow->widget()->isVisible() == false ) { @@ -308,6 +310,9 @@ void VstEffectControls::paintEvent( QPaintEvent * ) +namespace gui +{ + ManageVSTEffectView::ManageVSTEffectView( VstEffect * _eff, VstEffectControls * m_vi ) : m_effect( _eff ) @@ -572,7 +577,6 @@ ManageVSTEffectView::~ManageVSTEffectView() } +} // namespace gui - - - +} // namespace lmms diff --git a/plugins/VstEffect/VstEffectControls.h b/plugins/VstEffect/VstEffectControls.h index c9bd626cd..24d5961ae 100644 --- a/plugins/VstEffect/VstEffectControls.h +++ b/plugins/VstEffect/VstEffectControls.h @@ -30,15 +30,25 @@ #include - -class CustomTextKnob; class QGridLayout; class QPaintEvent; class QPushButton; class QMdiSubWindow; class QScrollArea; + +namespace lmms +{ + + class VstEffect; +namespace gui +{ +class CustomTextKnob; +class ManageVSTEffectView; +class VstEffectControlDialog; +} + class VstEffectControls : public EffectControls { @@ -56,7 +66,7 @@ public: virtual int controlCount(); - virtual EffectControlDialog * createView(); + virtual gui::EffectControlDialog* createView(); protected slots: @@ -67,7 +77,7 @@ protected slots: void rollPreset( void ); void rolrPreset( void ); void selPreset( void ); - void setParameter( Model * action ); + void setParameter( lmms::Model * action ); protected: virtual void paintEvent( QPaintEvent * _pe ); @@ -87,13 +97,15 @@ private: int lastPosInMenu; // QLabel * m_presetLabel; - friend class VstEffectControlDialog; - friend class ManageVSTEffectView; + friend class gui::VstEffectControlDialog; + friend class gui::ManageVSTEffectView; bool m_vstGuiVisible; } ; +namespace gui +{ class ManageVSTEffectView : public QObject @@ -107,7 +119,7 @@ public: protected slots: void syncPlugin( void ); void displayAutomatedOnly( void ); - void setParameter( Model * action ); + void setParameter( lmms::Model * action ); void syncParameterText(); void closeWindow(); @@ -132,4 +144,8 @@ private: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/VstEffect/VstSubPluginFeatures.cpp b/plugins/VstEffect/VstSubPluginFeatures.cpp index b2141cd70..d69a53e4e 100644 --- a/plugins/VstEffect/VstSubPluginFeatures.cpp +++ b/plugins/VstEffect/VstSubPluginFeatures.cpp @@ -30,6 +30,8 @@ #include "VstSubPluginFeatures.h" #include "ConfigManager.h" +namespace lmms +{ VstSubPluginFeatures::VstSubPluginFeatures( Plugin::PluginTypes _type ) : @@ -90,3 +92,5 @@ void VstSubPluginFeatures::addPluginsFromDir( QStringList* filenames, QString pa } } + +} // namespace lmms diff --git a/plugins/VstEffect/VstSubPluginFeatures.h b/plugins/VstEffect/VstSubPluginFeatures.h index 1c6d9cc2a..d3b9de58c 100644 --- a/plugins/VstEffect/VstSubPluginFeatures.h +++ b/plugins/VstEffect/VstSubPluginFeatures.h @@ -31,6 +31,9 @@ #include "Effect.h" #include "Plugin.h" +namespace lmms +{ + class VstSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures { @@ -47,8 +50,7 @@ private: } ; - - +} // namespace lmms #endif diff --git a/plugins/Watsyn/Watsyn.cpp b/plugins/Watsyn/Watsyn.cpp index 0be4af29a..7978dc120 100644 --- a/plugins/Watsyn/Watsyn.cpp +++ b/plugins/Watsyn/Watsyn.cpp @@ -37,6 +37,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -580,9 +584,9 @@ QString WatsynInstrument::nodeName() const } -PluginView * WatsynInstrument::instantiateView( QWidget * _parent ) +gui::PluginView* WatsynInstrument::instantiateView( QWidget * _parent ) { - return( new WatsynView( this, _parent ) ); + return( new gui::WatsynView( this, _parent ) ); } @@ -662,6 +666,8 @@ void WatsynInstrument::updateWaveB2() } +namespace gui +{ WatsynView::WatsynView( Instrument * _instrument, @@ -1271,6 +1277,7 @@ void WatsynView::modelChanged() } +} // namespace gui @@ -1287,4 +1294,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *m, void * ) } - +} // namespace lmms diff --git a/plugins/Watsyn/Watsyn.h b/plugins/Watsyn/Watsyn.h index b957faef7..454329b57 100644 --- a/plugins/Watsyn/Watsyn.h +++ b/plugins/Watsyn/Watsyn.h @@ -34,6 +34,9 @@ #include #include "MemoryManager.h" +namespace lmms +{ + #define makeknob( name, x, y, hint, unit, oname ) \ name = new Knob( knobStyled, this ); \ @@ -74,9 +77,14 @@ const int B1_OSC = 2; const int B2_OSC = 3; const int NUM_OSCS = 4; +class WatsynInstrument; + +namespace gui +{ class automatableButtonGroup; class PixmapButton; -class WatsynInstrument; +class WatsynView; +} class WatsynObject { @@ -149,7 +157,7 @@ public: return( 64 ); } - virtual PluginView * instantiateView( QWidget * _parent ); + virtual gui::PluginView* instantiateView( QWidget * _parent ); public slots: void updateVolumes(); @@ -288,10 +296,14 @@ private: float B2_wave [WAVELEN]; friend class WatsynObject; - friend class WatsynView; + friend class gui::WatsynView; }; +namespace gui +{ + + class WatsynView : public InstrumentViewFixedSize { Q_OBJECT @@ -376,4 +388,9 @@ private: }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/WaveShaper/WaveShaper.cpp b/plugins/WaveShaper/WaveShaper.cpp index be3e943bc..ededa2e0f 100644 --- a/plugins/WaveShaper/WaveShaper.cpp +++ b/plugins/WaveShaper/WaveShaper.cpp @@ -31,6 +31,10 @@ #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -171,3 +175,5 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data ) } + +} // namespace lmms diff --git a/plugins/WaveShaper/WaveShaper.h b/plugins/WaveShaper/WaveShaper.h index 4763c40b7..7364784bb 100644 --- a/plugins/WaveShaper/WaveShaper.h +++ b/plugins/WaveShaper/WaveShaper.h @@ -30,6 +30,8 @@ #include "Effect.h" #include "WaveShaperControls.h" +namespace lmms +{ class WaveShaperEffect : public Effect @@ -56,7 +58,7 @@ private: } ; - +} // namespace lmms #endif diff --git a/plugins/WaveShaper/WaveShaperControlDialog.cpp b/plugins/WaveShaper/WaveShaperControlDialog.cpp index aede7317e..e4fae0c92 100644 --- a/plugins/WaveShaper/WaveShaperControlDialog.cpp +++ b/plugins/WaveShaper/WaveShaperControlDialog.cpp @@ -33,6 +33,9 @@ #include "PixmapButton.h" #include "LedCheckBox.h" +namespace lmms::gui +{ + WaveShaperControlDialog::WaveShaperControlDialog( WaveShaperControls * _controls ) : @@ -116,3 +119,5 @@ WaveShaperControlDialog::WaveShaperControlDialog( _controls, SLOT( subOneClicked() ) ); } + +} // namespace lmms::gui diff --git a/plugins/WaveShaper/WaveShaperControlDialog.h b/plugins/WaveShaper/WaveShaperControlDialog.h index be0f10212..672b55f62 100644 --- a/plugins/WaveShaper/WaveShaperControlDialog.h +++ b/plugins/WaveShaper/WaveShaperControlDialog.h @@ -28,9 +28,14 @@ #include "EffectControlDialog.h" +namespace lmms +{ class WaveShaperControls; +namespace gui +{ + class WaveShaperControlDialog : public EffectControlDialog { @@ -46,4 +51,9 @@ private: } ; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/WaveShaper/WaveShaperControls.cpp b/plugins/WaveShaper/WaveShaperControls.cpp index 529cc4289..40e20055a 100644 --- a/plugins/WaveShaper/WaveShaperControls.cpp +++ b/plugins/WaveShaper/WaveShaperControls.cpp @@ -33,6 +33,9 @@ #include "Engine.h" #include "Song.h" +namespace lmms +{ + #define onedB 1.1220184543019633f @@ -143,5 +146,4 @@ void WaveShaperControls::subOneClicked() } - - +} // namespace lmms \ No newline at end of file diff --git a/plugins/WaveShaper/WaveShaperControls.h b/plugins/WaveShaper/WaveShaperControls.h index fa0768afd..f94bc3d9b 100644 --- a/plugins/WaveShaper/WaveShaperControls.h +++ b/plugins/WaveShaper/WaveShaperControls.h @@ -30,6 +30,10 @@ #include "WaveShaperControlDialog.h" #include "Graph.h" +namespace lmms +{ + + class WaveShaperEffect; @@ -56,9 +60,9 @@ public: return( 4 ); } - virtual EffectControlDialog * createView() + virtual gui::EffectControlDialog* createView() { - return( new WaveShaperControlDialog( this ) ); + return( new gui::WaveShaperControlDialog( this ) ); } @@ -78,9 +82,12 @@ private: graphModel m_wavegraphModel; BoolModel m_clipModel; - friend class WaveShaperControlDialog; + friend class gui::WaveShaperControlDialog; friend class WaveShaperEffect; } ; + +} // namespace lmms + #endif diff --git a/plugins/Xpressive/ExprSynth.cpp b/plugins/Xpressive/ExprSynth.cpp index ceb79138e..ac850bca9 100644 --- a/plugins/Xpressive/ExprSynth.cpp +++ b/plugins/Xpressive/ExprSynth.cpp @@ -39,6 +39,11 @@ #include "exprtk.hpp" #define WARN_EXPRTK qWarning("ExprTk exception") + +namespace lmms +{ + + typedef exprtk::symbol_table symbol_table_t; typedef exprtk::expression expression_t; typedef exprtk::parser parser_t; @@ -820,3 +825,6 @@ void ExprSynth::renderOutput(fpp_t frames, sampleFrame *buf) WARN_EXPRTK; } } + + +} // namespace lmms \ No newline at end of file diff --git a/plugins/Xpressive/ExprSynth.h b/plugins/Xpressive/ExprSynth.h index 1246058ca..4ea46e1bb 100644 --- a/plugins/Xpressive/ExprSynth.h +++ b/plugins/Xpressive/ExprSynth.h @@ -32,12 +32,20 @@ #include "Graph.h" #include "MemoryManager.h" -class automatableButtonGroup; +namespace lmms +{ + + class ExprFrontData; +class NotePlayHandle; + +namespace gui +{ +class automatableButtonGroup; class Knob; class LedCheckBox; -class NotePlayHandle; class PixmapButton; +} class ExprFront @@ -145,5 +153,6 @@ inline void clearArray(T* arr,unsigned int size) } +} // namespace lmms #endif diff --git a/plugins/Xpressive/Xpressive.cpp b/plugins/Xpressive/Xpressive.cpp index bf543c695..a69343e07 100644 --- a/plugins/Xpressive/Xpressive.cpp +++ b/plugins/Xpressive/Xpressive.cpp @@ -48,6 +48,10 @@ #include "plugin_export.h" +namespace lmms +{ + + extern "C" { Plugin::Descriptor PLUGIN_EXPORT xpressive_plugin_descriptor = { STRINGIFY( @@ -107,9 +111,6 @@ Xpressive::Xpressive(InstrumentTrack* instrument_track) : m_outputExpression[1]="expw(integrate(f*atan(500t)*2/pi))*0.5+0.12"; } -Xpressive::~Xpressive() { -} - void Xpressive::saveSettings(QDomDocument & _doc, QDomElement & _this) { // Save plugin version @@ -242,10 +243,43 @@ void Xpressive::deleteNotePluginData(NotePlayHandle* nph) { delete static_cast(nph->m_pluginData); } -PluginView * Xpressive::instantiateView(QWidget* parent) { - return (new XpressiveView(this, parent)); +gui::PluginView* Xpressive::instantiateView(QWidget* parent) { + return (new gui::XpressiveView(this, parent)); } + +void Xpressive::smooth(float smoothness,const graphModel * in,graphModel * out) +{ + out->setSamples(in->samples()); + if (smoothness>0) + { + const int guass_size = (int)(smoothness * 5) | 1; + const int guass_center = guass_size/2; + const float delta = smoothness; + const float a= 1.0f / (sqrtf(2.0f * F_PI) * delta); + float * const guassian = new float [guass_size]; + float sum = 0.0f; + float temp = 0.0f; + int i; + for (i = 0; i < guass_size; i++ ) + { + temp = (i - guass_center) / delta; + sum += guassian[i] = a * powf(F_E, -0.5f * temp * temp); + } + for (i = 0; i < guass_size; i++ ) + { + guassian[i] = guassian[i] / sum; + } + out->convolve(guassian, guass_size, guass_center); + delete [] guassian; + } +} + + +namespace gui +{ + + class XpressiveKnob: public Knob { public: void setStyle() @@ -259,11 +293,11 @@ public: setLineWidth(3); } XpressiveKnob(QWidget * _parent, const QString & _name) : - Knob(knobStyled, _parent,_name) { + Knob(knobStyled, _parent,_name) { setStyle(); } XpressiveKnob(QWidget * _parent) : - Knob(knobStyled, _parent) { + Knob(knobStyled, _parent) { setStyle(); } @@ -393,7 +427,7 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : m_triangleWaveBtn = new PixmapButton(this, tr("Triangle wave")); m_triangleWaveBtn->move(4 + 14, ROW_WAVEBTN); m_triangleWaveBtn->setActiveGraphic( - embed::getIconPixmap("triangle_wave_active")); + embed::getIconPixmap("triangle_wave_active")); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap("triangle_wave_inactive")); m_triangleWaveBtn->setToolTip(tr("Triangle wave")); @@ -408,7 +442,7 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : m_whiteNoiseWaveBtn = new PixmapButton(this, tr("White noise")); m_whiteNoiseWaveBtn->move(4 + 14 * 3, ROW_WAVEBTN); m_whiteNoiseWaveBtn->setActiveGraphic( - embed::getIconPixmap("white_noise_wave_active")); + embed::getIconPixmap("white_noise_wave_active")); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap("white_noise_wave_inactive")); m_whiteNoiseWaveBtn->setToolTip(tr("White noise")); @@ -419,7 +453,7 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : m_waveInterpolate->move(2, 230); m_expressionValidToggle = new LedCheckBox("", this, tr("ExpressionValid"), - LedCheckBox::Red); + LedCheckBox::Red); m_expressionValidToggle->move(168, EXPR_TEXT_Y+EXPR_TEXT_H-2); m_expressionValidToggle->setEnabled( false ); @@ -500,31 +534,27 @@ XpressiveView::XpressiveView(Instrument * _instrument, QWidget * _parent) : updateLayout(); } -XpressiveView::~XpressiveView() -{ -} - void XpressiveView::expressionChanged() { Xpressive * e = castModel(); QByteArray text = m_expressionEditor->toPlainText().toLatin1(); switch (m_selectedGraphGroup->model()->value()) { - case W1_EXPR: - e->wavesExpression(0) = text; - break; - case W2_EXPR: - e->wavesExpression(1) = text; - break; - case W3_EXPR: - e->wavesExpression(2) = text; - break; - case O1_EXPR: - e->outputExpression(0) = text; - break; - case O2_EXPR: - e->outputExpression(1) = text; - break; + case W1_EXPR: + e->wavesExpression(0) = text; + break; + case W2_EXPR: + e->wavesExpression(1) = text; + break; + case W3_EXPR: + e->wavesExpression(2) = text; + break; + case O1_EXPR: + e->outputExpression(0) = text; + break; + case O2_EXPR: + e->outputExpression(1) = text; + break; } if (m_wave_expr) m_graph->setEnabled(m_smoothKnob->model()->value() == 0 && text.size() == 0); @@ -595,35 +625,6 @@ void XpressiveView::expressionChanged() { } } -void Xpressive::smooth(float smoothness,const graphModel * in,graphModel * out) -{ - out->setSamples(in->samples()); - if (smoothness>0) - { - const int guass_size = (int)(smoothness * 5) | 1; - const int guass_center = guass_size/2; - const float delta = smoothness; - const float a= 1.0f / (sqrtf(2.0f * F_PI) * delta); - float * const guassian = new float [guass_size]; - float sum = 0.0f; - float temp = 0.0f; - int i; - for (i = 0; i < guass_size; i++ ) - { - temp = (i - guass_center) / delta; - sum += guassian[i] = a * powf(F_E, -0.5f * temp * temp); - } - for (i = 0; i < guass_size; i++ ) - { - guassian[i] = guassian[i] / sum; - } - out->convolve(guassian, guass_size, guass_center); - delete [] guassian; - } -} - - - void XpressiveView::smoothChanged() { @@ -869,6 +870,18 @@ QString XpressiveHelpView::s_helpText= XpressiveHelpView::XpressiveHelpView():QTextEdit(s_helpText) { + +#if QT_VERSION < 0x50C00 + // Workaround for a bug in Qt versions below 5.12, + // where argument-dependent-lookup fails for QFlags operators + // declared inside a namepsace. + // This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h + // See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348 + + using ::operator|; + +#endif + setWindowTitle ( "Xpressive Help" ); setTextInteractionFlags ( Qt::TextSelectableByKeyboard | Qt::TextSelectableByMouse ); getGUI()->mainWindow()->addWindowedWidget( this ); @@ -887,6 +900,9 @@ void XpressiveView::helpClicked() { } + +} // namespace gui + extern "C" { // necessary for getting instance out of shared lib @@ -897,5 +913,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main(Model *m, void *) { } - - +} // namespace lmms diff --git a/plugins/Xpressive/Xpressive.h b/plugins/Xpressive/Xpressive.h index 651660cfe..d075e9088 100644 --- a/plugins/Xpressive/Xpressive.h +++ b/plugins/Xpressive/Xpressive.h @@ -35,8 +35,13 @@ #include "ExprSynth.h" +class QPlainTextEdit; + +namespace lmms +{ + + class oscillator; -class XpressiveView; const int W1_EXPR = 0; const int W2_EXPR = 1; @@ -47,8 +52,12 @@ const int NUM_EXPRS = 5; class ExprFront; + +namespace gui +{ class SubWindow; -class QPlainTextEdit; +class XpressiveView; +} @@ -57,20 +66,19 @@ class Xpressive : public Instrument Q_OBJECT public: Xpressive(InstrumentTrack* instrument_track ); - virtual ~Xpressive(); - virtual void playNote(NotePlayHandle* nph, - sampleFrame* working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle* nph ); + void playNote(NotePlayHandle* nph, + sampleFrame* working_buffer ) override; + void deleteNotePluginData( NotePlayHandle* nph ) override; - virtual void saveSettings( QDomDocument& _doc, - QDomElement& _this ); - virtual void loadSettings( const QDomElement& _this ); + void saveSettings( QDomDocument& _doc, + QDomElement& _this ) override; + void loadSettings( const QDomElement& _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual PluginView* instantiateView( QWidget * parent ); + gui::PluginView* instantiateView( QWidget * parent ) override; graphModel& graphO1() { return m_graphO1; } graphModel& graphO2() { return m_graphO2; } @@ -137,6 +145,9 @@ private: } ; +namespace gui +{ + class XpressiveView : public InstrumentViewFixedSize { @@ -145,7 +156,6 @@ public: XpressiveView( Instrument* _instrument, QWidget* _parent ); - virtual ~XpressiveView(); protected: @@ -166,7 +176,7 @@ protected slots: void graphDrawn( ); private: - virtual void modelChanged(); + void modelChanged() override; Knob *m_generalPurposeKnob[3]; Knob *m_panningKnob[2]; @@ -217,4 +227,9 @@ private: static QString s_helpText; }; + +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp b/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp index ed32339eb..fd1d2b838 100644 --- a/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp @@ -36,9 +36,14 @@ #include "zynaddsubfx/src/Misc/Master.h" #include "zynaddsubfx/src/Misc/Part.h" - +// Global variable in zynaddsubfx/src/globals.h SYNTH_T* synth = nullptr; + +namespace lmms +{ + + int LocalZynAddSubFx::s_instanceCount = 0; @@ -276,3 +281,4 @@ void LocalZynAddSubFx::processAudio( sampleFrame * _out ) } +} // namespace lmms diff --git a/plugins/ZynAddSubFx/LocalZynAddSubFx.h b/plugins/ZynAddSubFx/LocalZynAddSubFx.h index 397fbbe82..81da0f9ce 100644 --- a/plugins/ZynAddSubFx/LocalZynAddSubFx.h +++ b/plugins/ZynAddSubFx/LocalZynAddSubFx.h @@ -28,9 +28,14 @@ #include "Note.h" class Master; -class MidiEvent; class NulEngine; +namespace lmms +{ + +class MidiEvent; + + class LocalZynAddSubFx { public: @@ -73,4 +78,7 @@ protected: } ; + +} // namespace lmms + #endif diff --git a/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp b/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp index 0c0c0af39..2d9a2701e 100644 --- a/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp @@ -38,6 +38,7 @@ #include "zynaddsubfx/src/Nio/Nio.h" #include "zynaddsubfx/src/UI/MasterUI.h" +using namespace lmms; class RemoteZynAddSubFx : public RemotePluginClient, public LocalZynAddSubFx { diff --git a/plugins/ZynAddSubFx/RemoteZynAddSubFx.h b/plugins/ZynAddSubFx/RemoteZynAddSubFx.h index edeb42427..6745cb846 100644 --- a/plugins/ZynAddSubFx/RemoteZynAddSubFx.h +++ b/plugins/ZynAddSubFx/RemoteZynAddSubFx.h @@ -27,11 +27,18 @@ #include "RemotePluginBase.h" +namespace lmms +{ + + enum ZasfRemoteMessageIDs { - IdZasfPresetDirectory = IdUserBase, + IdZasfPresetDirectory = RemoteMessageIDs::IdUserBase, IdZasfLmmsWorkingDirectory, IdZasfSetPitchWheelBendRange } ; + +} // namespace lmms + #endif diff --git a/plugins/ZynAddSubFx/ZynAddSubFx.cpp b/plugins/ZynAddSubFx/ZynAddSubFx.cpp index b83f055ef..27cb4728e 100644 --- a/plugins/ZynAddSubFx/ZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/ZynAddSubFx.cpp @@ -51,6 +51,10 @@ #include "embed.h" #include "plugin_export.h" +namespace lmms +{ + + extern "C" { @@ -80,13 +84,6 @@ ZynAddSubFxRemotePlugin::ZynAddSubFxRemotePlugin() : - -ZynAddSubFxRemotePlugin::~ZynAddSubFxRemotePlugin() -{ -} - - - bool ZynAddSubFxRemotePlugin::processMessage( const message & _m ) { switch( _m.id ) @@ -485,15 +482,16 @@ void ZynAddSubFxInstrument::sendControlChange( MidiControllers midiCtl, float va -PluginView * ZynAddSubFxInstrument::instantiateView( QWidget * _parent ) +gui::PluginView* ZynAddSubFxInstrument::instantiateView( QWidget * _parent ) { - return new ZynAddSubFxView( this, _parent ); + return new gui::ZynAddSubFxView( this, _parent ); } - +namespace gui +{ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent ) : @@ -568,14 +566,6 @@ ZynAddSubFxView::ZynAddSubFxView( Instrument * _instrument, QWidget * _parent ) - -ZynAddSubFxView::~ZynAddSubFxView() -{ -} - - - - void ZynAddSubFxView::dragEnterEvent( QDragEnterEvent * _dee ) { // For mimeType() and MimeType enum class @@ -657,6 +647,7 @@ void ZynAddSubFxView::toggleUI() } +} // namespace gui @@ -673,3 +664,4 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main(Model * m, void *) } +} // namespace lmms diff --git a/plugins/ZynAddSubFx/ZynAddSubFx.h b/plugins/ZynAddSubFx/ZynAddSubFx.h index 10243e373..996c187ee 100644 --- a/plugins/ZynAddSubFx/ZynAddSubFx.h +++ b/plugins/ZynAddSubFx/ZynAddSubFx.h @@ -37,21 +37,27 @@ class QPushButton; +namespace lmms +{ + + class LocalZynAddSubFx; -class ZynAddSubFxView; class NotePlayHandle; + +namespace gui +{ class Knob; class LedCheckBox; - +class ZynAddSubFxView; +} class ZynAddSubFxRemotePlugin : public RemotePlugin { Q_OBJECT public: ZynAddSubFxRemotePlugin(); - virtual ~ZynAddSubFxRemotePlugin(); - virtual bool processMessage( const message & _m ); + bool processMessage( const message & _m ) override; signals: @@ -66,26 +72,26 @@ class ZynAddSubFxInstrument : public Instrument Q_OBJECT public: ZynAddSubFxInstrument( InstrumentTrack * _instrument_track ); - virtual ~ZynAddSubFxInstrument(); + ~ZynAddSubFxInstrument() override; - virtual void play( sampleFrame * _working_buffer ); + void play( sampleFrame * _working_buffer ) override; - virtual bool handleMidiEvent( const MidiEvent& event, const TimePos& time = TimePos(), f_cnt_t offset = 0 ); + bool handleMidiEvent( const MidiEvent& event, const TimePos& time = TimePos(), f_cnt_t offset = 0 ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual void loadFile( const QString & _file ); + void loadFile( const QString & _file ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual Flags flags() const + Flags flags() const override { return IsSingleStreamed | IsMidiBased; } - virtual PluginView * instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; private slots: @@ -122,7 +128,7 @@ private: QMap m_modifiedControllers; - friend class ZynAddSubFxView; + friend class gui::ZynAddSubFxView; signals: @@ -131,22 +137,24 @@ signals: } ; +namespace gui +{ + class ZynAddSubFxView : public InstrumentViewFixedSize { Q_OBJECT public: ZynAddSubFxView( Instrument * _instrument, QWidget * _parent ); - virtual ~ZynAddSubFxView(); protected: - virtual void dragEnterEvent( QDragEnterEvent * _dee ); - virtual void dropEvent( QDropEvent * _de ); + void dragEnterEvent( QDragEnterEvent * _dee ) override; + void dropEvent( QDropEvent * _de ) override; private: - void modelChanged(); + void modelChanged() override; QPushButton * m_toggleUIButton; Knob * m_portamento; @@ -165,4 +173,8 @@ private slots: } ; +} // namespace gui + +} // namespace lmms + #endif diff --git a/plugins/ZynAddSubFx/zynaddsubfx b/plugins/ZynAddSubFx/zynaddsubfx index 5a8328bc4..b9855dbe1 160000 --- a/plugins/ZynAddSubFx/zynaddsubfx +++ b/plugins/ZynAddSubFx/zynaddsubfx @@ -1 +1 @@ -Subproject commit 5a8328bc43ce638b5b5c4d8fbb23fc401c18d2b5 +Subproject commit b9855dbe16424edc528a6796ddbc50b1042482c7 diff --git a/src/common/RemotePluginBase.cpp b/src/common/RemotePluginBase.cpp index 9dc2ebec5..10775ed5e 100644 --- a/src/common/RemotePluginBase.cpp +++ b/src/common/RemotePluginBase.cpp @@ -29,6 +29,10 @@ #endif +namespace lmms +{ + + #ifdef SYNC_WITH_SHM_FIFO RemotePluginBase::RemotePluginBase( shmFifo * _in, shmFifo * _out ) : m_in( _in ), @@ -186,3 +190,5 @@ RemotePluginBase::message RemotePluginBase::waitForMessage( return message(); } + +} // namespace lmms diff --git a/src/common/SharedMemory.cpp b/src/common/SharedMemory.cpp index 3c546ac32..5c944dfab 100644 --- a/src/common/SharedMemory.cpp +++ b/src/common/SharedMemory.cpp @@ -44,10 +44,12 @@ # include #endif -namespace detail { + +namespace lmms::detail { #if _POSIX_SHARED_MEMORY_OBJECTS > 0 + namespace { template @@ -198,4 +200,4 @@ SharedMemoryData::SharedMemoryData(SharedMemoryData&& other) noexcept : m_ptr{other.m_ptr} { } -} // namespace detail +} // namespace lmms::detail diff --git a/src/core/AudioEngine.cpp b/src/core/AudioEngine.cpp index eae7c6f20..827e8b2e4 100644 --- a/src/core/AudioEngine.cpp +++ b/src/core/AudioEngine.cpp @@ -61,6 +61,10 @@ #include "BufferManager.h" +namespace lmms +{ + + typedef LocklessList::Element LocklessListElement; @@ -1284,3 +1288,5 @@ void AudioEngine::fifoWriter::write( surroundSampleFrame * buffer ) m_audioEngine->m_waitingForWrite = false; m_audioEngine->m_doChangesMutex.unlock(); } + +} // namespace lmms diff --git a/src/core/AudioEngineProfiler.cpp b/src/core/AudioEngineProfiler.cpp index 837894c79..24c4dc5ae 100644 --- a/src/core/AudioEngineProfiler.cpp +++ b/src/core/AudioEngineProfiler.cpp @@ -24,6 +24,8 @@ #include "AudioEngineProfiler.h" +namespace lmms +{ AudioEngineProfiler::AudioEngineProfiler() : m_periodTimer(), @@ -61,3 +63,4 @@ void AudioEngineProfiler::setOutputFile( const QString& outputFile ) m_outputFile.open( QFile::WriteOnly | QFile::Truncate ); } +} // namespace lmms diff --git a/src/core/AudioEngineWorkerThread.cpp b/src/core/AudioEngineWorkerThread.cpp index 3d45cbccb..129b3accf 100644 --- a/src/core/AudioEngineWorkerThread.cpp +++ b/src/core/AudioEngineWorkerThread.cpp @@ -37,6 +37,9 @@ #include #endif +namespace lmms +{ + AudioEngineWorkerThread::JobQueue AudioEngineWorkerThread::globalJobQueue; QWaitCondition * AudioEngineWorkerThread::queueReadyWaitCond = nullptr; QList AudioEngineWorkerThread::workerThreads; @@ -177,4 +180,4 @@ void AudioEngineWorkerThread::run() } } - +} // namespace lmms diff --git a/src/core/AutomatableModel.cpp b/src/core/AutomatableModel.cpp index 51733936f..5463fa482 100644 --- a/src/core/AutomatableModel.cpp +++ b/src/core/AutomatableModel.cpp @@ -33,6 +33,9 @@ #include "ProjectJournal.h" #include "Song.h" +namespace lmms +{ + long AutomatableModel::s_periodCounter = 0; @@ -326,7 +329,7 @@ void AutomatableModel::setValue( const float value ) template T AutomatableModel::logToLinearScale( T value ) const { - return castValue( ::logToLinearScale( minValue(), maxValue(), static_cast( value ) ) ); + return castValue( lmms::logToLinearScale( minValue(), maxValue(), static_cast( value ) ) ); } @@ -342,7 +345,7 @@ float AutomatableModel::inverseScaledValue( float value ) const { return m_scaleType == Linear ? value - : ::linearToLogScale( minValue(), maxValue(), value ); + : lmms::linearToLogScale( minValue(), maxValue(), value ); } @@ -364,7 +367,7 @@ void roundAt( T& value, const T& where, const T& step_size ) template void AutomatableModel::roundAt( T& value, const T& where ) const { - ::roundAt(value, where, m_step); + lmms::roundAt(value, where, m_step); } @@ -824,3 +827,6 @@ QString BoolModel::displayValue( const float val ) const { return QString::number( castValue( scaledValue( val ) ) ); } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/AutomationClip.cpp b/src/core/AutomationClip.cpp index 300944416..928cf48a9 100644 --- a/src/core/AutomationClip.cpp +++ b/src/core/AutomationClip.cpp @@ -37,6 +37,9 @@ #include +namespace lmms +{ + int AutomationClip::s_quantization = 1; const float AutomationClip::DEFAULT_MIN_VALUE = 0; const float AutomationClip::DEFAULT_MAX_VALUE = 1; @@ -127,8 +130,8 @@ bool AutomationClip::addObject( AutomatableModel * _obj, bool _search_dup ) m_objects += _obj; - connect( _obj, SIGNAL( destroyed( jo_id_t ) ), - this, SLOT( objectDestroyed( jo_id_t ) ), + connect( _obj, SIGNAL( destroyed( lmms::jo_id_t ) ), + this, SLOT( objectDestroyed( lmms::jo_id_t ) ), Qt::DirectConnection ); emit dataChanged(); @@ -870,11 +873,11 @@ const QString AutomationClip::name() const -ClipView * AutomationClip::createView( TrackView * _tv ) +gui::ClipView * AutomationClip::createView( gui::TrackView * _tv ) { QMutexLocker m(&m_clipMutex); - return new AutomationClipView( this, _tv ); + return new gui::AutomationClipView( this, _tv ); } @@ -1183,3 +1186,5 @@ void AutomationClip::generateTangents(timeMap::iterator it, int numToGenerate) it++; } } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/AutomationNode.cpp b/src/core/AutomationNode.cpp index a2906b0d0..eee4df8d2 100644 --- a/src/core/AutomationNode.cpp +++ b/src/core/AutomationNode.cpp @@ -27,6 +27,9 @@ #include "AutomationClip.h" +namespace lmms +{ + // Dummy constructor for the QMap AutomationNode::AutomationNode() : m_clip(nullptr), @@ -107,3 +110,5 @@ void AutomationNode::resetOutValue() // the tangents setOutValue(m_inValue); } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/BandLimitedWave.cpp b/src/core/BandLimitedWave.cpp index 0f83badcf..0f303fe15 100644 --- a/src/core/BandLimitedWave.cpp +++ b/src/core/BandLimitedWave.cpp @@ -27,6 +27,9 @@ #include +namespace lmms +{ + WaveMipMap BandLimitedWave::s_waveforms[4] = { }; bool BandLimitedWave::s_wavesGenerated = false; QString BandLimitedWave::s_wavetableDir = ""; @@ -270,3 +273,5 @@ moogfile.close(); */ } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/BufferManager.cpp b/src/core/BufferManager.cpp index 248434cf9..ff35e6a19 100644 --- a/src/core/BufferManager.cpp +++ b/src/core/BufferManager.cpp @@ -30,17 +30,20 @@ #include "MemoryManager.h" -static fpp_t framesPerPeriod; - -void BufferManager::init( fpp_t framesPerPeriod ) +namespace lmms { - ::framesPerPeriod = framesPerPeriod; + +fpp_t BufferManager::s_framesPerPeriod; + +void BufferManager::init( fpp_t fpp ) +{ + s_framesPerPeriod = fpp; } sampleFrame * BufferManager::acquire() { - return MM_ALLOC( ::framesPerPeriod ); + return MM_ALLOC( s_framesPerPeriod ); } void BufferManager::clear( sampleFrame *ab, const f_cnt_t frames, const f_cnt_t offset ) @@ -62,3 +65,4 @@ void BufferManager::release( sampleFrame * buf ) MM_FREE( buf ); } +} // namespace lmms diff --git a/src/core/Clip.cpp b/src/core/Clip.cpp index f247b967e..74a168fbd 100644 --- a/src/core/Clip.cpp +++ b/src/core/Clip.cpp @@ -33,6 +33,9 @@ #include "Song.h" +namespace lmms +{ + /*! \brief Create a new Clip * * Creates a new clip for the given track. @@ -145,7 +148,7 @@ void Clip::copyStateTo( Clip *src, Clip *dst ) dst->movePosition( pos ); AutomationClip::resolveAllIDs(); - GuiApplication::instance()->automationEditor()->m_editor->updateAfterClipChange(); + gui::getGUI()->automationEditor()->m_editor->updateAfterClipChange(); } } @@ -197,3 +200,4 @@ bool Clip::hasColor() return usesCustomClipColor() || getTrack()->useColor(); } +} // namespace lmms diff --git a/src/core/Clipboard.cpp b/src/core/Clipboard.cpp index c30b657bb..6e1503b2f 100644 --- a/src/core/Clipboard.cpp +++ b/src/core/Clipboard.cpp @@ -29,8 +29,9 @@ #include "Clipboard.h" -namespace Clipboard +namespace lmms::Clipboard { + const QMimeData * getMimeData() { return QApplication::clipboard()->mimeData( QClipboard::Clipboard ); @@ -90,4 +91,6 @@ namespace Clipboard { return( QString::fromUtf8( mimeData->data( mimeType( MimeType::StringPair ) ) ).section( ':', 1, -1 ) ); } -} + + +} // namespace lmms::Clipboard diff --git a/src/core/ComboBoxModel.cpp b/src/core/ComboBoxModel.cpp index 19d4f576f..f1b1c6b2e 100644 --- a/src/core/ComboBoxModel.cpp +++ b/src/core/ComboBoxModel.cpp @@ -26,6 +26,9 @@ #include +namespace lmms +{ + using std::unique_ptr; using std::move; @@ -69,6 +72,6 @@ int ComboBoxModel::findText( const QString& txt ) const } - +} // namespace lmms diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 5444ea834..59987de97 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -37,6 +37,9 @@ #include "lmmsversion.h" +namespace lmms +{ + // Vector with all the upgrade methods const std::vector ConfigManager::UPGRADE_METHODS = { @@ -514,10 +517,10 @@ void ConfigManager::loadConfigFile(const QString & configFile) #endif setBackgroundPicFile(value("paths", "backgroundtheme")); } - else if(getGUI() != nullptr) + else if (gui::getGUI() != nullptr) { - QMessageBox::warning(nullptr, MainWindow::tr("Configuration file"), - MainWindow::tr("Error while parsing configuration file at line %1:%2: %3"). + QMessageBox::warning(nullptr, gui::MainWindow::tr("Configuration file"), + gui::MainWindow::tr("Error while parsing configuration file at line %1:%2: %3"). arg(errorLine). arg(errorCol). arg(errorString)); @@ -634,6 +637,8 @@ void ConfigManager::saveConfigFile() QFile outfile(m_lmmsRcFile); if(!outfile.open(QIODevice::WriteOnly | QIODevice::Truncate)) { + using gui::MainWindow; + QString title, message; title = MainWindow::tr("Could not open file"); message = MainWindow::tr("Could not open file %1 " @@ -643,7 +648,7 @@ void ConfigManager::saveConfigFile() "the directory containing the " "file and try again!" ).arg(m_lmmsRcFile); - if(getGUI() != nullptr) + if (gui::getGUI() != nullptr) { QMessageBox::critical(nullptr, title, message, QMessageBox::Ok, @@ -734,3 +739,6 @@ unsigned int ConfigManager::legacyConfigVersion() return 2; } } + + +} // namespace lmms diff --git a/src/core/Controller.cpp b/src/core/Controller.cpp index 5cb3218a9..4ff9c4c93 100644 --- a/src/core/Controller.cpp +++ b/src/core/Controller.cpp @@ -35,6 +35,9 @@ #include "MidiController.h" #include "PeakController.h" +namespace lmms +{ + long Controller::s_periods = 0; QVector Controller::s_controllers; @@ -194,7 +197,7 @@ Controller * Controller::create( ControllerTypes _ct, Model * _parent ) break; case Controller::LfoController: - c = new ::LfoController( _parent ); + c = new class LfoController( _parent ); break; case Controller::PeakController: @@ -203,7 +206,7 @@ Controller * Controller::create( ControllerTypes _ct, Model * _parent ) break; case Controller::MidiController: - c = new ::MidiController( _parent ); + c = new class MidiController( _parent ); break; default: @@ -291,9 +294,9 @@ QString Controller::nodeName() const -ControllerDialog * Controller::createDialog( QWidget * _parent ) +gui::ControllerDialog * Controller::createDialog( QWidget * _parent ) { - ControllerDialog * d = new ControllerDialog( this, _parent ); + gui::ControllerDialog * d = new gui::ControllerDialog( this, _parent ); return d; } @@ -323,7 +326,7 @@ int Controller::connectionCount() const{ } - +} // namespace lmms diff --git a/src/core/ControllerConnection.cpp b/src/core/ControllerConnection.cpp index 03b054629..a6402227f 100644 --- a/src/core/ControllerConnection.cpp +++ b/src/core/ControllerConnection.cpp @@ -31,6 +31,9 @@ #include "Song.h" #include "ControllerConnection.h" +namespace lmms +{ + ControllerConnectionVector ControllerConnection::s_connections; @@ -233,4 +236,4 @@ void ControllerConnection::deleteConnection() - +} // namespace lmms diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 2fe9b88d9..1cbacc2fd 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -50,6 +50,10 @@ #include "lmmsversion.h" +namespace lmms +{ + + static void findIds(const QDomElement& elem, QList& idList); @@ -139,11 +143,11 @@ DataFile::DataFile( const QString & _fileName ) : QFile inFile( _fileName ); if( !inFile.open( QIODevice::ReadOnly ) ) { - if( getGUI() != nullptr ) + if (gui::getGUI() != nullptr) { QMessageBox::critical( nullptr, - SongEditor::tr( "Could not open file" ), - SongEditor::tr( "Could not open file %1. You probably " + gui::SongEditor::tr( "Could not open file" ), + gui::SongEditor::tr( "Could not open file %1. You probably " "have no permissions to read this " "file.\n Please make sure to have at " "least read permissions to the file " @@ -295,7 +299,7 @@ bool DataFile::writeFile(const QString& filename, bool withResources) { // Small lambda function for displaying errors auto showError = [this](QString title, QString body){ - if (getGUI() != nullptr) + if (gui::getGUI() != nullptr) { QMessageBox mb; mb.setWindowTitle(title); @@ -325,6 +329,8 @@ bool DataFile::writeFile(const QString& filename, bool withResources) const QString fullNameTemp = fullName + ".new"; const QString fullNameBak = fullName + ".bak"; + using gui::SongEditor; + // If we are saving with resources, setup the bundle folder first if (withResources) { @@ -1884,8 +1890,10 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile ) } if( line >= 0 && col >= 0 ) { + using gui::SongEditor; + qWarning() << "at line" << line << "column" << errorMsg; - if( getGUI() != nullptr ) + if (gui::getGUI() != nullptr) { QMessageBox::critical( nullptr, SongEditor::tr( "Error in file" ), @@ -1918,18 +1926,20 @@ void DataFile::loadData( const QByteArray & _data, const QString & _sourceFile ) if (root.hasAttribute("creatorversion")) { + using gui::SongEditor; + // compareType defaults to All, so it doesn't have to be set here ProjectVersion createdWith = root.attribute("creatorversion"); ProjectVersion openedWith = LMMS_VERSION; if (createdWith.setCompareType(ProjectVersion::Minor) != openedWith.setCompareType(ProjectVersion::Minor) - && getGUI() != nullptr && root.attribute("type") == "song" + && gui::getGUI() != nullptr && root.attribute("type") == "song" ){ auto projectType = _sourceFile.endsWith(".mpt") ? SongEditor::tr("template") : SongEditor::tr("project"); - TextFloat::displayMessage( + gui::TextFloat::displayMessage( SongEditor::tr("Version difference"), SongEditor::tr("This %1 was created with LMMS %2") .arg(projectType).arg(createdWith.getVersion()), @@ -1973,3 +1983,6 @@ unsigned int DataFile::legacyFileVersion() // Convert the iterator to an index, which is our file version (starting at 0) return std::distance( UPGRADE_VERSIONS.begin(), firstRequiredUpgrade ); } + + +} // namespace lmms diff --git a/src/core/DrumSynth.cpp b/src/core/DrumSynth.cpp index d4f9fe167..2b7ad9d1b 100644 --- a/src/core/DrumSynth.cpp +++ b/src/core/DrumSynth.cpp @@ -39,6 +39,9 @@ #define strcasecmp _stricmp #endif +namespace lmms +{ + using namespace std; @@ -741,3 +744,5 @@ int DrumSynth::GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sa return Length; } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/Effect.cpp b/src/core/Effect.cpp index e730db5a5..78f093773 100644 --- a/src/core/Effect.cpp +++ b/src/core/Effect.cpp @@ -32,6 +32,9 @@ #include "ConfigManager.h" +namespace lmms +{ + Effect::Effect( const Plugin::Descriptor * _desc, Model * _parent, @@ -162,9 +165,9 @@ void Effect::checkGate( double _out_sum ) -PluginView * Effect::instantiateView( QWidget * _parent ) +gui::PluginView * Effect::instantiateView( QWidget * _parent ) { - return new EffectView( this, _parent ); + return new gui::EffectView( this, _parent ); } @@ -215,3 +218,4 @@ void Effect::resample( int _i, const sampleFrame * _src_buf, } } +} // namespace lmms diff --git a/src/core/EffectChain.cpp b/src/core/EffectChain.cpp index 7b9b3b2db..6d16bb19e 100644 --- a/src/core/EffectChain.cpp +++ b/src/core/EffectChain.cpp @@ -31,6 +31,9 @@ #include "DummyEffect.h" #include "MixHelpers.h" +namespace lmms +{ + EffectChain::EffectChain( Model * _parent ) : Model( _parent ), @@ -240,3 +243,6 @@ void EffectChain::clear() m_enabledModel.setValue( false ); } + + +} // namespace lmms diff --git a/src/core/Engine.cpp b/src/core/Engine.cpp index a46590188..6c8104721 100644 --- a/src/core/Engine.cpp +++ b/src/core/Engine.cpp @@ -37,24 +37,27 @@ #include "BandLimitedWave.h" #include "Oscillator.h" -float LmmsCore::s_framesPerTick; -AudioEngine* LmmsCore::s_audioEngine = nullptr; -Mixer * LmmsCore::s_mixer = nullptr; -PatternStore * LmmsCore::s_patternStore = nullptr; -Song * LmmsCore::s_song = nullptr; -ProjectJournal * LmmsCore::s_projectJournal = nullptr; -#ifdef LMMS_HAVE_LV2 -Lv2Manager * LmmsCore::s_lv2Manager = nullptr; -#endif -Ladspa2LMMS * LmmsCore::s_ladspaManager = nullptr; -void* LmmsCore::s_dndPluginKey = nullptr; - - - - -void LmmsCore::init( bool renderOnly ) +namespace lmms { - LmmsCore *engine = inst(); + +float Engine::s_framesPerTick; +AudioEngine* Engine::s_audioEngine = nullptr; +Mixer * Engine::s_mixer = nullptr; +PatternStore * Engine::s_patternStore = nullptr; +Song * Engine::s_song = nullptr; +ProjectJournal * Engine::s_projectJournal = nullptr; +#ifdef LMMS_HAVE_LV2 +Lv2Manager * Engine::s_lv2Manager = nullptr; +#endif +Ladspa2LMMS * Engine::s_ladspaManager = nullptr; +void* Engine::s_dndPluginKey = nullptr; + + + + +void Engine::init( bool renderOnly ) +{ + Engine *engine = inst(); emit engine->initProgress(tr("Generating wavetables")); // generate (load from file) bandlimited wavetables @@ -89,7 +92,7 @@ void LmmsCore::init( bool renderOnly ) -void LmmsCore::destroy() +void Engine::destroy() { s_projectJournal->stopAllJournalling(); s_audioEngine->stopProcessing(); @@ -123,7 +126,7 @@ void LmmsCore::destroy() -bool LmmsCore::ignorePluginBlacklist() +bool Engine::ignorePluginBlacklist() { const char* envVar = getenv("LMMS_IGNORE_BLACKLIST"); return (envVar && *envVar); @@ -132,7 +135,7 @@ bool LmmsCore::ignorePluginBlacklist() -float LmmsCore::framesPerTick(sample_rate_t sampleRate) +float Engine::framesPerTick(sample_rate_t sampleRate) { return sampleRate * 60.0f * 4 / DefaultTicksPerBar / s_song->getTempo(); @@ -141,7 +144,7 @@ float LmmsCore::framesPerTick(sample_rate_t sampleRate) -void LmmsCore::updateFramesPerTick() +void Engine::updateFramesPerTick() { s_framesPerTick = s_audioEngine->processingSampleRate() * 60.0f * 4 / DefaultTicksPerBar / s_song->getTempo(); } @@ -149,7 +152,7 @@ void LmmsCore::updateFramesPerTick() -void LmmsCore::setDndPluginKey(void *newKey) +void Engine::setDndPluginKey(void *newKey) { Q_ASSERT(static_cast(newKey)); s_dndPluginKey = newKey; @@ -158,7 +161,7 @@ void LmmsCore::setDndPluginKey(void *newKey) -void *LmmsCore::pickDndPluginKey() +void *Engine::pickDndPluginKey() { return s_dndPluginKey; } @@ -166,4 +169,6 @@ void *LmmsCore::pickDndPluginKey() -LmmsCore * LmmsCore::s_instanceOfMe = nullptr; +Engine * Engine::s_instanceOfMe = nullptr; + +} // namespace lmms \ No newline at end of file diff --git a/src/core/EnvelopeAndLfoParameters.cpp b/src/core/EnvelopeAndLfoParameters.cpp index 7dc948e3b..b80b54946 100644 --- a/src/core/EnvelopeAndLfoParameters.cpp +++ b/src/core/EnvelopeAndLfoParameters.cpp @@ -30,6 +30,9 @@ #include "Oscillator.h" +namespace lmms +{ + // how long should be each envelope-segment maximal (e.g. attack)? extern const float SECS_PER_ENV_SEGMENT = 5.0f; // how long should be one LFO-oscillation maximal? @@ -540,4 +543,4 @@ void EnvelopeAndLfoParameters::updateSampleVars() - +} // namespace lmms diff --git a/src/core/ImportFilter.cpp b/src/core/ImportFilter.cpp index 6f41756a6..1caa62e7d 100644 --- a/src/core/ImportFilter.cpp +++ b/src/core/ImportFilter.cpp @@ -33,6 +33,9 @@ #include "ProjectJournal.h" +namespace lmms +{ + using std::unique_ptr; ImportFilter::ImportFilter( const QString & _file_name, @@ -117,3 +120,4 @@ bool ImportFilter::openFile() +} // namespace lmms \ No newline at end of file diff --git a/src/core/InlineAutomation.cpp b/src/core/InlineAutomation.cpp index 7df6a2d75..bbea1becb 100644 --- a/src/core/InlineAutomation.cpp +++ b/src/core/InlineAutomation.cpp @@ -27,6 +27,9 @@ #include "InlineAutomation.h" +namespace lmms +{ + void InlineAutomation::saveSettings( QDomDocument & _doc, QDomElement & _parent ) { @@ -58,3 +61,5 @@ void InlineAutomation::loadSettings( const QDomElement & _this ) } } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/Instrument.cpp b/src/core/Instrument.cpp index 9b7267c0d..a7d3f73e8 100644 --- a/src/core/Instrument.cpp +++ b/src/core/Instrument.cpp @@ -31,6 +31,10 @@ #include "lmms_constants.h" +namespace lmms +{ + + Instrument::Instrument(InstrumentTrack * _instrument_track, const Descriptor * _descriptor, const Descriptor::SubPluginFeatures::Key *key) : @@ -201,3 +205,6 @@ QString Instrument::fullDisplayName() const { return instrumentTrack()->displayName(); } + + +} // namespace lmms diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 1295ed6d2..27c9e4f66 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -31,6 +31,9 @@ #include "InstrumentTrack.h" #include "PresetPreviewPlayHandle.h" +namespace lmms +{ + InstrumentFunctionNoteStacking::ChordTable::Init InstrumentFunctionNoteStacking::ChordTable::s_initTable[] = { @@ -556,3 +559,6 @@ void InstrumentFunctionArpeggio::loadSettings( const QDomElement & _this ) m_arpDirectionModel.loadSettings( _this, "arpdir" ); m_arpModeModel.loadSettings( _this, "arpmode" ); } + + +} // namespace lmms diff --git a/src/core/InstrumentPlayHandle.cpp b/src/core/InstrumentPlayHandle.cpp index 71ac555b3..8c272cd47 100644 --- a/src/core/InstrumentPlayHandle.cpp +++ b/src/core/InstrumentPlayHandle.cpp @@ -26,9 +26,16 @@ #include "InstrumentPlayHandle.h" #include "InstrumentTrack.h" +namespace lmms +{ + + InstrumentPlayHandle::InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack ) : PlayHandle( TypeInstrumentPlayHandle ), m_instrument( instrument ) { setAudioPort( instrumentTrack->audioPort() ); } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/InstrumentSoundShaping.cpp b/src/core/InstrumentSoundShaping.cpp index e3ab82c0e..a9765d256 100644 --- a/src/core/InstrumentSoundShaping.cpp +++ b/src/core/InstrumentSoundShaping.cpp @@ -34,6 +34,9 @@ #include "Instrument.h" #include "InstrumentTrack.h" +namespace lmms +{ + const float CUT_FREQ_MULTIPLIER = 6000.0f; const float RES_MULTIPLIER = 2.0f; @@ -377,4 +380,4 @@ void InstrumentSoundShaping::loadSettings( const QDomElement & _this ) - +} // namespace lmms diff --git a/src/core/JournallingObject.cpp b/src/core/JournallingObject.cpp index 729303c67..802f4291e 100644 --- a/src/core/JournallingObject.cpp +++ b/src/core/JournallingObject.cpp @@ -29,6 +29,8 @@ #include "ProjectJournal.h" #include "Engine.h" +namespace lmms +{ JournallingObject::JournallingObject() : @@ -140,3 +142,4 @@ void JournallingObject::changeID( jo_id_t _id ) } +} // namespace lmms diff --git a/src/core/Keymap.cpp b/src/core/Keymap.cpp index a50abfaf2..5dfdd9186 100644 --- a/src/core/Keymap.cpp +++ b/src/core/Keymap.cpp @@ -29,6 +29,10 @@ #include "Note.h" +namespace lmms +{ + + Keymap::Keymap() : m_description(tr("empty")), m_firstKey(0), @@ -149,3 +153,6 @@ void Keymap::loadSettings(const QDomElement &element) node = node.nextSibling(); } } + + +} // namespace lmms diff --git a/src/core/Ladspa2LMMS.cpp b/src/core/Ladspa2LMMS.cpp index 950e4bf0d..e16f5c98c 100644 --- a/src/core/Ladspa2LMMS.cpp +++ b/src/core/Ladspa2LMMS.cpp @@ -27,6 +27,10 @@ #include "Ladspa2LMMS.h" +namespace lmms +{ + + Ladspa2LMMS::Ladspa2LMMS() { l_sortable_plugin_t plugins = getSortedPlugins(); @@ -126,3 +130,6 @@ QString Ladspa2LMMS::getShortName( const ladspa_key_t & _key ) return name; } + + +} // namespace lmms diff --git a/src/core/LadspaControl.cpp b/src/core/LadspaControl.cpp index 4d3faeda7..fb6ef9167 100644 --- a/src/core/LadspaControl.cpp +++ b/src/core/LadspaControl.cpp @@ -30,6 +30,9 @@ #include "LadspaControl.h" #include "LadspaBase.h" +namespace lmms +{ + LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port, bool _link ) : @@ -379,5 +382,4 @@ void LadspaControl::setLink( bool _state ) } - - +} // namespace lmms diff --git a/src/core/LadspaManager.cpp b/src/core/LadspaManager.cpp index 851ae007e..875a4f132 100644 --- a/src/core/LadspaManager.cpp +++ b/src/core/LadspaManager.cpp @@ -36,6 +36,9 @@ #include "PluginFactory.h" +namespace lmms +{ + LadspaManager::LadspaManager() { @@ -715,3 +718,6 @@ bool LadspaManager::cleanup( const ladspa_key_t & _plugin, } return( false ); } + + +} // namespace lmms diff --git a/src/core/LfoController.cpp b/src/core/LfoController.cpp index 947fd5e22..548da5d7c 100644 --- a/src/core/LfoController.cpp +++ b/src/core/LfoController.cpp @@ -31,6 +31,10 @@ #include "Song.h" +namespace lmms +{ + + LfoController::LfoController( Model * _parent ) : Controller( Controller::LfoController, _parent, tr( "LFO Controller" ) ), m_baseModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Base value" ) ), @@ -220,12 +224,10 @@ QString LfoController::nodeName() const -ControllerDialog * LfoController::createDialog( QWidget * _parent ) +gui::ControllerDialog * LfoController::createDialog( QWidget * _parent ) { - return new LfoControllerDialog( this, _parent ); + return new gui::LfoControllerDialog( this, _parent ); } - - - +} // namespace lmms diff --git a/src/core/LinkedModelGroups.cpp b/src/core/LinkedModelGroups.cpp index d0bcd8cfd..4fdf54fc0 100644 --- a/src/core/LinkedModelGroups.cpp +++ b/src/core/LinkedModelGroups.cpp @@ -22,15 +22,18 @@ * */ -#include "LinkedModelGroups.h" - #include #include +#include "LinkedModelGroups.h" + + #include "AutomatableModel.h" +namespace lmms +{ /* LinkedModelGroup @@ -182,3 +185,5 @@ void LinkedModelGroups::loadSettings(const QDomElement& that) } } + +} // namespace lmms diff --git a/src/core/LocklessAllocator.cpp b/src/core/LocklessAllocator.cpp index 07aaa0c14..919093906 100644 --- a/src/core/LocklessAllocator.cpp +++ b/src/core/LocklessAllocator.cpp @@ -33,6 +33,9 @@ #include #endif +namespace lmms +{ + static const size_t SIZEOF_SET = sizeof( int ) * 8; @@ -162,3 +165,6 @@ invalid: } ++m_available; } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/MemoryHelper.cpp b/src/core/MemoryHelper.cpp index 8ac2700f3..de80ef770 100644 --- a/src/core/MemoryHelper.cpp +++ b/src/core/MemoryHelper.cpp @@ -26,6 +26,10 @@ #include "lmms_basics.h" #include "MemoryHelper.h" +namespace lmms +{ + + /** * Allocate a number of bytes and return them. * @param byteNum is the number of bytes @@ -63,3 +67,5 @@ void MemoryHelper::alignedFree( void* _buffer ) } } + +} // namespace lmms diff --git a/src/core/MemoryManager.cpp b/src/core/MemoryManager.cpp index 01fdfd5d6..bd3168f14 100644 --- a/src/core/MemoryManager.cpp +++ b/src/core/MemoryManager.cpp @@ -28,6 +28,10 @@ #include #include "rpmalloc.h" +namespace lmms +{ + + /// Global static object handling rpmalloc intializing and finalizing struct MemoryManagerGlobalGuard { MemoryManagerGlobalGuard() { @@ -75,3 +79,6 @@ void MemoryManager::free(void * ptr) Q_ASSERT_X(rpmalloc_is_thread_initialized(), "MemoryManager::free", "Thread not initialized"); return rpfree(ptr); } + + +} // namespace lmms diff --git a/src/core/MeterModel.cpp b/src/core/MeterModel.cpp index 7bf61958d..ee5d8bbc8 100644 --- a/src/core/MeterModel.cpp +++ b/src/core/MeterModel.cpp @@ -27,7 +27,10 @@ #include "AutomationClip.h" -MeterModel::MeterModel( ::Model * _parent ) : +namespace lmms +{ + +MeterModel::MeterModel( Model * _parent ) : Model( _parent ), m_numeratorModel( 4, 1, 32, this, tr( "Numerator" ) ), m_denominatorModel( 4, 1, 32, this, tr( "Denominator" ) ) @@ -78,6 +81,4 @@ void MeterModel::loadSettings( const QDomElement & _this, } - - - +} // namespace lmms diff --git a/src/core/MicroTimer.cpp b/src/core/MicroTimer.cpp index ba94f1c9a..44506481e 100644 --- a/src/core/MicroTimer.cpp +++ b/src/core/MicroTimer.cpp @@ -1,5 +1,8 @@ #include "MicroTimer.h" +namespace lmms +{ + using namespace std; using namespace std::chrono; @@ -25,3 +28,5 @@ int MicroTimer::elapsed() const auto now = steady_clock::now(); return std::chrono::duration_cast>(now - begin).count(); } + +} // namespace lmms diff --git a/src/core/Microtuner.cpp b/src/core/Microtuner.cpp index b384cf390..f8de21267 100644 --- a/src/core/Microtuner.cpp +++ b/src/core/Microtuner.cpp @@ -33,6 +33,9 @@ #include "Scale.h" #include "Song.h" +namespace lmms +{ + Microtuner::Microtuner() : Model(nullptr, tr("Microtuner")), @@ -165,3 +168,6 @@ void Microtuner::loadSettings(const QDomElement &element) m_keymapModel.loadSettings(element, "keymap"); m_keyRangeImportModel.loadSettings(element, "range_import"); } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/MixHelpers.cpp b/src/core/MixHelpers.cpp index 816104061..2b2b5952f 100644 --- a/src/core/MixHelpers.cpp +++ b/src/core/MixHelpers.cpp @@ -38,7 +38,7 @@ static bool s_NaNHandler; -namespace MixHelpers +namespace lmms::MixHelpers { /*! \brief Function for applying MIXOP on all sample frames */ @@ -328,5 +328,5 @@ void multiplyAndAddMultipliedJoined( sampleFrame* dst, run<>( dst, srcLeft, srcRight, frames, MultiplyAndAddMultipliedOp(coeffDst, coeffSrc) ); } -} +} // namespace lmms::MixHelpers diff --git a/src/core/Mixer.cpp b/src/core/Mixer.cpp index bf72c42a4..688190ee2 100644 --- a/src/core/Mixer.cpp +++ b/src/core/Mixer.cpp @@ -36,6 +36,10 @@ #include "SampleTrack.h" #include "TrackContainer.h" // For TrackContainer::TrackList typedef +namespace lmms +{ + + MixerRoute::MixerRoute( MixerChannel * from, MixerChannel * to, float amount ) : m_from( from ), m_to( to ), @@ -827,3 +831,6 @@ void Mixer::validateChannelName( int index, int oldIndex ) m_mixerChannels[index]->m_name = tr( "Channel %1" ).arg( index ); } } + + +} // namespace lmms diff --git a/src/core/Model.cpp b/src/core/Model.cpp index 597d0340d..dd277bc4e 100644 --- a/src/core/Model.cpp +++ b/src/core/Model.cpp @@ -24,6 +24,8 @@ #include "Model.h" +namespace lmms +{ QString Model::fullDisplayName() const { @@ -46,5 +48,5 @@ QString Model::fullDisplayName() const - +} // namespace lmms diff --git a/src/core/ModelVisitor.cpp b/src/core/ModelVisitor.cpp index 4036f56e0..17e328587 100644 --- a/src/core/ModelVisitor.cpp +++ b/src/core/ModelVisitor.cpp @@ -28,6 +28,10 @@ #include "ComboBoxModel.h" #include "TempoSyncKnobModel.h" +namespace lmms +{ + + void ModelVisitor::visit(BoolModel &m) { up(m); } void ModelVisitor::visit(IntModel &m) { up(m); } void ModelVisitor::visit(FloatModel &m) { up(m); } @@ -42,3 +46,6 @@ void ConstModelVisitor::visit(const TempoSyncKnobModel &m) { up(m); ModelVisitor::~ModelVisitor() {} ConstModelVisitor::~ConstModelVisitor() {} + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/Note.cpp b/src/core/Note.cpp index cba02ee9e..b730ec1cc 100644 --- a/src/core/Note.cpp +++ b/src/core/Note.cpp @@ -30,6 +30,9 @@ #include "Note.h" #include "DetuningHelper.h" +namespace lmms +{ + Note::Note( const TimePos & length, const TimePos & pos, int key, volume_t volume, panning_t panning, @@ -232,3 +235,6 @@ bool Note::withinRange(int tickStart, int tickEnd) const return pos().getTicks() >= tickStart && pos().getTicks() <= tickEnd && length().getTicks() != 0; } + + +} // namespace lmms diff --git a/src/core/NotePlayHandle.cpp b/src/core/NotePlayHandle.cpp index 2a4cf8f12..e31299eda 100644 --- a/src/core/NotePlayHandle.cpp +++ b/src/core/NotePlayHandle.cpp @@ -33,6 +33,9 @@ #include "Instrument.h" #include "Song.h" +namespace lmms +{ + NotePlayHandle::BaseDetuning::BaseDetuning( DetuningHelper *detuning ) : m_value( detuning ? detuning->automationClip()->valueAt( 0 ) : 0 ) { @@ -663,3 +666,6 @@ void NotePlayHandleManager::free() { MM_FREE(s_available); } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/Oscillator.cpp b/src/core/Oscillator.cpp index 16b99bb5f..2dc7f6910 100644 --- a/src/core/Oscillator.cpp +++ b/src/core/Oscillator.cpp @@ -38,6 +38,9 @@ #include "fft_helpers.h" +namespace lmms +{ + void Oscillator::waveTableInit() { @@ -814,4 +817,4 @@ inline sample_t Oscillator::getSample( } - +} // namespace lmms diff --git a/src/core/PathUtil.cpp b/src/core/PathUtil.cpp index 24d9c8992..299993673 100644 --- a/src/core/PathUtil.cpp +++ b/src/core/PathUtil.cpp @@ -7,7 +7,7 @@ #include "Engine.h" #include "Song.h" -namespace PathUtil +namespace lmms::PathUtil { Base relativeBases[] = { Base::ProjectDir, Base::FactorySample, Base::UserSample, Base::UserVST, Base::Preset, Base::UserLADSPA, Base::DefaultLADSPA, Base::UserSoundfont, Base::DefaultSoundfont, Base::UserGIG, Base::DefaultGIG, @@ -187,4 +187,5 @@ namespace PathUtil } return basePrefix(shortestBase) + relativeOrAbsolute(absolutePath, shortestBase); } -} + +} // namespace lmms::PathUtil diff --git a/src/core/PatternClip.cpp b/src/core/PatternClip.cpp index d88ef5224..7ea56cd48 100644 --- a/src/core/PatternClip.cpp +++ b/src/core/PatternClip.cpp @@ -31,6 +31,9 @@ #include "PatternStore.h" #include "PatternTrack.h" +namespace lmms +{ + PatternClip::PatternClip(Track* track) : Clip(track) @@ -109,7 +112,10 @@ int PatternClip::patternIndex() -ClipView* PatternClip::createView(TrackView* tv) +gui::ClipView* PatternClip::createView(gui::TrackView* tv) { - return new PatternClipView(this, tv); + return new gui::PatternClipView(this, tv); } + + +} // namespace lmms diff --git a/src/core/PatternStore.cpp b/src/core/PatternStore.cpp index c16726777..af1b9b3bb 100644 --- a/src/core/PatternStore.cpp +++ b/src/core/PatternStore.cpp @@ -30,6 +30,8 @@ #include "PatternTrack.h" #include "Song.h" +namespace lmms +{ PatternStore::PatternStore() : @@ -257,3 +259,5 @@ AutomatedValueMap PatternStore::automatedValuesAt(TimePos time, int clipNum) con return TrackContainer::automatedValuesAt(time + (TimePos::ticksPerBar() * clipNum), clipNum); } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index c46123507..b29295604 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -34,6 +34,10 @@ #include "EffectChain.h" #include "plugins/PeakControllerEffect/PeakControllerEffect.h" +namespace lmms +{ + + PeakControllerEffectVector PeakController::s_effects; int PeakController::m_getCount; int PeakController::m_loadCount; @@ -247,11 +251,10 @@ QString PeakController::nodeName() const -ControllerDialog * PeakController::createDialog( QWidget * _parent ) +gui::ControllerDialog * PeakController::createDialog( QWidget * _parent ) { - return new PeakControllerDialog( this, _parent ); + return new gui::PeakControllerDialog( this, _parent ); } - - +} // namespace lmms diff --git a/src/core/PerfLog.cpp b/src/core/PerfLog.cpp index 951c6d842..490567448 100644 --- a/src/core/PerfLog.cpp +++ b/src/core/PerfLog.cpp @@ -35,6 +35,11 @@ # include #endif + +namespace lmms +{ + + PerfTime::PerfTime() : m_real(-1) { @@ -129,3 +134,6 @@ void PerfLogTimer::end() // Invalidate so destructor won't call print another log entry begin_time = PerfTime(); } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/Piano.cpp b/src/core/Piano.cpp index 62680efa7..8cf1917e3 100644 --- a/src/core/Piano.cpp +++ b/src/core/Piano.cpp @@ -41,6 +41,10 @@ #include "InstrumentTrack.h" +namespace lmms +{ + + /*! The black / white order of keys as they appear on the keyboard. */ static const Piano::KeyTypes KEY_ORDER[] = @@ -137,3 +141,5 @@ bool Piano::isWhiteKey( int key ) return !isBlackKey( key ); } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/PlayHandle.cpp b/src/core/PlayHandle.cpp index 1c5f90ef0..168121e0f 100644 --- a/src/core/PlayHandle.cpp +++ b/src/core/PlayHandle.cpp @@ -30,6 +30,9 @@ #include +namespace lmms +{ + PlayHandle::PlayHandle(const Type type, f_cnt_t offset) : m_type(type), m_offset(offset), @@ -71,3 +74,5 @@ sampleFrame* PlayHandle::buffer() { return m_bufferReleased ? nullptr : reinterpret_cast(m_playHandleBuffer); }; + +} // namespace lmms \ No newline at end of file diff --git a/src/core/Plugin.cpp b/src/core/Plugin.cpp index 7772bffde..e71df15b8 100644 --- a/src/core/Plugin.cpp +++ b/src/core/Plugin.cpp @@ -35,6 +35,10 @@ #include "DummyPlugin.h" #include "AutomatableModel.h" #include "Song.h" +#include "PluginFactory.h" + +namespace lmms +{ static PixmapLoader dummyLoader; @@ -183,7 +187,6 @@ AutomatableModel * Plugin::childModel( const QString & ) -#include "PluginFactory.h" Plugin * Plugin::instantiateWithKey(const QString& pluginName, Model * parent, const Descriptor::SubPluginFeatures::Key *key, bool keyFromDnd) @@ -218,7 +221,7 @@ Plugin * Plugin::instantiate(const QString& pluginName, Model * parent, Plugin* inst; if( pi.isNull() ) { - if( getGUI() != nullptr ) + if (gui::getGUI() != nullptr) { QMessageBox::information( nullptr, tr( "Plugin not found" ), @@ -240,7 +243,7 @@ Plugin * Plugin::instantiate(const QString& pluginName, Model * parent, } else { - if( getGUI() != nullptr ) + if (gui::getGUI() != nullptr) { QMessageBox::information( nullptr, tr( "Error while loading plugin" ), @@ -265,9 +268,9 @@ void Plugin::collectErrorForUI( QString errMsg ) -PluginView * Plugin::createView( QWidget * parent ) +gui::PluginView * Plugin::createView( QWidget * parent ) { - PluginView * pv = instantiateView( parent ); + gui::PluginView * pv = instantiateView( parent ); if( pv != nullptr ) { pv->setModel( this ); @@ -312,3 +315,4 @@ QDomElement Plugin::Descriptor::SubPluginFeatures::Key::saveXML( +} // namespace lmms diff --git a/src/core/PluginFactory.cpp b/src/core/PluginFactory.cpp index 879af542c..184dc0b94 100644 --- a/src/core/PluginFactory.cpp +++ b/src/core/PluginFactory.cpp @@ -34,17 +34,22 @@ #include "ConfigManager.h" #include "Plugin.h" +// QT qHash specialization, needs to be in global namespace +qint64 qHash(const QFileInfo& fi) +{ + return qHash(fi.absoluteFilePath()); +} + +namespace lmms +{ + + #ifdef LMMS_BUILD_WIN32 QStringList nameFilters("*.dll"); #else QStringList nameFilters("lib*.so"); #endif -qint64 qHash(const QFileInfo& fi) -{ - return qHash(fi.absoluteFilePath()); -} - std::unique_ptr PluginFactory::s_instance; PluginFactory::PluginFactory() @@ -251,3 +256,6 @@ const QString PluginFactory::PluginInfo::name() const { return descriptor ? descriptor->name : QString(); } + + +} // namespace lmms diff --git a/src/core/PluginIssue.cpp b/src/core/PluginIssue.cpp index 7d43586f5..f8ae06bc7 100644 --- a/src/core/PluginIssue.cpp +++ b/src/core/PluginIssue.cpp @@ -26,6 +26,10 @@ #include "PluginIssue.h" +namespace lmms +{ + + const char *PluginIssue::msgFor(const PluginIssueType &it) { switch (it) @@ -91,8 +95,6 @@ bool PluginIssue::operator<(const PluginIssue &other) const } - - QDebug operator<<(QDebug stream, const PluginIssue &iss) { stream << PluginIssue::msgFor(iss.m_issueType); @@ -103,4 +105,7 @@ QDebug operator<<(QDebug stream, const PluginIssue &iss) return stream; } +} // namespace lmms + + diff --git a/src/core/PresetPreviewPlayHandle.cpp b/src/core/PresetPreviewPlayHandle.cpp index a0e5da445..0ce248e9c 100644 --- a/src/core/PresetPreviewPlayHandle.cpp +++ b/src/core/PresetPreviewPlayHandle.cpp @@ -35,6 +35,9 @@ #include +namespace lmms +{ + // invisible track-container which is needed as parent for preview-channels class PreviewTrackContainer : public TrackContainer { @@ -274,4 +277,4 @@ bool PresetPreviewPlayHandle::isPreviewing() } - +} // namespace lmms diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index 3d1e9078a..2a59a2724 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -29,6 +29,9 @@ #include "JournallingObject.h" #include "Song.h" +namespace lmms +{ + //! Avoid clashes between loaded IDs (have the bit cleared) //! and newly created IDs (have the bit set) static const int EO_ID_MSB = 1 << 23; @@ -206,3 +209,4 @@ void ProjectJournal::stopAllJournalling() +} // namespace lmms diff --git a/src/core/ProjectRenderer.cpp b/src/core/ProjectRenderer.cpp index 323fdd6c9..bb5020c9b 100644 --- a/src/core/ProjectRenderer.cpp +++ b/src/core/ProjectRenderer.cpp @@ -34,6 +34,11 @@ #include "AudioFileMP3.h" #include "AudioFileFlac.h" + +namespace lmms +{ + + const ProjectRenderer::FileEncodeDevice ProjectRenderer::fileEncodeDevices[] = { @@ -246,3 +251,4 @@ void ProjectRenderer::updateConsoleProgress() } +} // namespace lmms diff --git a/src/core/ProjectVersion.cpp b/src/core/ProjectVersion.cpp index 6f3dcddbe..b6ee2843f 100644 --- a/src/core/ProjectVersion.cpp +++ b/src/core/ProjectVersion.cpp @@ -28,6 +28,8 @@ #include "ProjectVersion.h" +namespace lmms +{ ProjectVersion::ProjectVersion(QString version, CompareType c) : @@ -135,3 +137,6 @@ int ProjectVersion::compare(ProjectVersion v1, ProjectVersion v2) { return compare(v1, v2, std::min(v1.getCompareType(), v2.getCompareType())); } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/RemotePlugin.cpp b/src/core/RemotePlugin.cpp index a70ce0a31..ff18fde53 100644 --- a/src/core/RemotePlugin.cpp +++ b/src/core/RemotePlugin.cpp @@ -71,6 +71,9 @@ HANDLE getRemotePluginJob() #endif // LMMS_BUILD_WIN32 +namespace lmms +{ + // simple helper thread monitoring our RemotePlugin - if process terminates // unexpectedly invalidate plugin so LMMS doesn't lock up ProcessWatcher::ProcessWatcher( RemotePlugin * _p ) : @@ -571,3 +574,6 @@ bool RemotePlugin::processMessage( const message & _m ) return true; } + + +} // namespace lmms diff --git a/src/core/RenderManager.cpp b/src/core/RenderManager.cpp index a0de888f4..e2f6b9311 100644 --- a/src/core/RenderManager.cpp +++ b/src/core/RenderManager.cpp @@ -30,6 +30,10 @@ #include "Song.h" +namespace lmms +{ + + RenderManager::RenderManager( const AudioEngine::qualitySettings & qualitySettings, const OutputSettings & outputSettings, @@ -200,3 +204,6 @@ void RenderManager::updateConsoleProgress() } } } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/RingBuffer.cpp b/src/core/RingBuffer.cpp index 3fe1feeb7..b2e40f3c0 100644 --- a/src/core/RingBuffer.cpp +++ b/src/core/RingBuffer.cpp @@ -28,6 +28,9 @@ #include "Engine.h" #include "MixHelpers.h" +namespace lmms +{ + RingBuffer::RingBuffer( f_cnt_t size ) : m_fpp( Engine::audioEngine()->framesPerPeriod() ), @@ -314,3 +317,4 @@ void RingBuffer::updateSamplerate() } +} // namespace lmms diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index e09dd5198..b931b27b5 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -61,6 +61,8 @@ #include "FileDialog.h" +namespace lmms +{ SampleBuffer::SampleBuffer() : m_userAntiAliasWaveTable(nullptr), @@ -367,7 +369,7 @@ void SampleBuffer::update(bool keepSettings) QString message = tr("Audio files are limited to %1 MB " "in size and %2 minutes of playing time" ).arg(fileSizeMax).arg(sampleLengthMax); - if (getGUI() != nullptr) + if (gui::getGUI() != nullptr) { QMessageBox::information(nullptr, title, message, QMessageBox::Ok); @@ -1121,7 +1123,7 @@ void SampleBuffer::visualize( QString SampleBuffer::openAudioFile() const { - FileDialog ofd(nullptr, tr("Open audio file")); + gui::FileDialog ofd(nullptr, tr("Open audio file")); QString dir; if (!m_audioFile.isEmpty()) @@ -1144,7 +1146,7 @@ QString SampleBuffer::openAudioFile() const } // change dir to position of previously opened file ofd.setDirectory(dir); - ofd.setFileMode(FileDialog::ExistingFiles); + ofd.setFileMode(gui::FileDialog::ExistingFiles); // set filters QStringList types; @@ -1587,3 +1589,5 @@ SampleBuffer::handleState::~handleState() { src_delete(m_resamplingData); } + +} // namespace lmms diff --git a/src/core/SampleClip.cpp b/src/core/SampleClip.cpp index 46bb6e6b7..9ee8e93e4 100644 --- a/src/core/SampleClip.cpp +++ b/src/core/SampleClip.cpp @@ -31,6 +31,11 @@ #include "SampleTrack.h" #include "TimeLineWidget.h" + +namespace lmms +{ + + SampleClip::SampleClip( Track * _track ) : Clip( _track ), m_sampleBuffer( new SampleBuffer ), @@ -42,13 +47,13 @@ SampleClip::SampleClip( Track * _track ) : // we need to receive bpm-change-events, because then we have to // change length of this Clip - connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), + connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ), this, SLOT( updateLength() ), Qt::DirectConnection ); connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int,int ) ), this, SLOT( updateLength() ) ); //care about positionmarker - TimeLineWidget * timeLine = Engine::getSong()->getPlayPos( Engine::getSong()->Mode_PlaySong ).m_timeLine; + gui::TimeLineWidget* timeLine = Engine::getSong()->getPlayPos( Engine::getSong()->Mode_PlaySong ).m_timeLine; if( timeLine ) { connect( timeLine, SIGNAL( positionMarkerMoved() ), this, SLOT( playbackPositionChanged() ) ); @@ -316,7 +321,10 @@ void SampleClip::loadSettings( const QDomElement & _this ) -ClipView * SampleClip::createView( TrackView * _tv ) +gui::ClipView * SampleClip::createView( gui::TrackView * _tv ) { - return new SampleClipView( this, _tv ); + return new gui::SampleClipView( this, _tv ); } + + +} // namespace lmms diff --git a/src/core/SamplePlayHandle.cpp b/src/core/SamplePlayHandle.cpp index f82f5dbf4..77658e1d8 100644 --- a/src/core/SamplePlayHandle.cpp +++ b/src/core/SamplePlayHandle.cpp @@ -31,6 +31,8 @@ #include "SampleClip.h" #include "SampleTrack.h" +namespace lmms +{ SamplePlayHandle::SamplePlayHandle( SampleBuffer* sampleBuffer , bool ownAudioPort ) : @@ -148,5 +150,4 @@ f_cnt_t SamplePlayHandle::totalFrames() const } - - +} // namespace lmms diff --git a/src/core/SampleRecordHandle.cpp b/src/core/SampleRecordHandle.cpp index cc0ce1635..76d71c9f3 100644 --- a/src/core/SampleRecordHandle.cpp +++ b/src/core/SampleRecordHandle.cpp @@ -32,6 +32,10 @@ #include "debug.h" +namespace lmms +{ + + SampleRecordHandle::SampleRecordHandle( SampleClip* clip ) : PlayHandle( TypeSamplePlayHandle ), m_framesRecorded( 0 ), @@ -148,4 +152,4 @@ void SampleRecordHandle::writeBuffer( const sampleFrame * _ab, const f_cnt_t _fr } - +} // namespace lmms diff --git a/src/core/Scale.cpp b/src/core/Scale.cpp index 394377e28..762da4ff8 100644 --- a/src/core/Scale.cpp +++ b/src/core/Scale.cpp @@ -27,6 +27,9 @@ #include #include +namespace lmms +{ + Interval::Interval(float cents) : m_numerator(0), @@ -121,3 +124,6 @@ void Scale::loadSettings(const QDomElement &element) node = node.nextSibling(); } } + + +} // namespace lmms diff --git a/src/core/SerializingObject.cpp b/src/core/SerializingObject.cpp index bc79eb920..9487ebef5 100644 --- a/src/core/SerializingObject.cpp +++ b/src/core/SerializingObject.cpp @@ -26,7 +26,8 @@ #include "SerializingObject.h" - +namespace lmms +{ SerializingObject::SerializingObject() : m_hook( nullptr ) @@ -110,4 +111,4 @@ void SerializingObject::loadSettings( const QDomElement& element ) Q_UNUSED(element) } - +} // namespace lmms diff --git a/src/core/Song.cpp b/src/core/Song.cpp index c52a1fa6f..d26eab450 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -58,6 +58,9 @@ #include "PeakController.h" +namespace lmms +{ + tick_t TimePos::s_ticksPerBar = DefaultTicksPerBar; @@ -184,7 +187,7 @@ void Song::setTimeSignature() void Song::savePos() { - TimeLineWidget * tl = m_playPos[m_playMode].m_timeLine; + gui::TimeLineWidget* tl = m_playPos[m_playMode].m_timeLine; if( tl != nullptr ) { @@ -636,6 +639,8 @@ void Song::stop() return; } + using gui::TimeLineWidget; + // To avoid race conditions with the processing threads Engine::audioEngine()->requestChangeInModel(); @@ -851,6 +856,8 @@ AutomatedValueMap Song::automatedValuesAt(TimePos time, int clipNum) const void Song::clearProject() { + using gui::getGUI; + Engine::projectJournal()->setJournalling( false ); if( m_playing ) @@ -1008,6 +1015,8 @@ void Song::createNewProjectFromTemplate( const QString & templ ) // load given song void Song::loadProject( const QString & fileName ) { + using gui::getGUI; + QDomNode node; m_loadingProject = true; @@ -1225,6 +1234,8 @@ void Song::loadProject( const QString & fileName ) // only save current song as filename and do nothing else bool Song::saveProjectFile(const QString & filename, bool withResources) { + using gui::getGUI; + DataFile dataFile( DataFile::SongProject ); m_savingProject = true; @@ -1551,3 +1562,6 @@ void Song::setKeymap(unsigned int index, std::shared_ptr newMap) emit keymapListChanged(index); Engine::audioEngine()->doneChangeInModel(); } + + +} // namespace lmms diff --git a/src/core/StepRecorder.cpp b/src/core/StepRecorder.cpp index 29675d5b2..e8f31f644 100644 --- a/src/core/StepRecorder.cpp +++ b/src/core/StepRecorder.cpp @@ -27,12 +27,16 @@ #include "PianoRoll.h" +namespace lmms +{ + + using std::min; using std::max; const int REMOVE_RELEASED_NOTE_TIME_THRESHOLD_MS = 70; -StepRecorder::StepRecorder(PianoRoll& pianoRoll, StepRecorderWidget& stepRecorderWidget): +StepRecorder::StepRecorder(gui::PianoRoll& pianoRoll, gui::StepRecorderWidget& stepRecorderWidget): m_pianoRoll(pianoRoll), m_stepRecorderWidget(stepRecorderWidget), m_midiClip(nullptr) @@ -367,3 +371,5 @@ StepRecorder::StepNote* StepRecorder::findCurStepNote(const int key) return nullptr; } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/TempoSyncKnobModel.cpp b/src/core/TempoSyncKnobModel.cpp index a85ca2e9f..bc7c86db9 100644 --- a/src/core/TempoSyncKnobModel.cpp +++ b/src/core/TempoSyncKnobModel.cpp @@ -31,6 +31,10 @@ #include "Song.h" +namespace lmms +{ + + TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min, const float _max, const float _step, const float _scale, Model * _parent, @@ -41,8 +45,8 @@ TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min, m_scale( _scale ), m_custom( _parent ) { - connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), - this, SLOT( calculateTempoSyncTime( bpm_t ) ), + connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ), + this, SLOT( calculateTempoSyncTime( lmms::bpm_t ) ), Qt::DirectConnection ); } @@ -181,8 +185,4 @@ void TempoSyncKnobModel::updateCustom() } - - - - - +} // namespace lmms diff --git a/src/core/TimePos.cpp b/src/core/TimePos.cpp index 4a22a1eb9..f3b09474d 100644 --- a/src/core/TimePos.cpp +++ b/src/core/TimePos.cpp @@ -27,6 +27,9 @@ #include "MeterModel.h" +namespace lmms +{ + TimeSig::TimeSig( int num, int denom ) : m_num(num), m_denom(denom) @@ -216,3 +219,6 @@ double TimePos::ticksToMilliseconds(double ticks, bpm_t beatsPerMinute) // 60 * 1000 / 48 = 1250 return ( ticks * 1250 ) / beatsPerMinute; } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/ToolPlugin.cpp b/src/core/ToolPlugin.cpp index 6c2b0fed7..99c3e5bec 100644 --- a/src/core/ToolPlugin.cpp +++ b/src/core/ToolPlugin.cpp @@ -26,6 +26,10 @@ #include "ToolPlugin.h" +namespace lmms +{ + + ToolPlugin::ToolPlugin( const Descriptor * _descriptor, Model * _parent ) : Plugin( _descriptor, _parent ) { @@ -56,3 +60,5 @@ ToolPlugin * ToolPlugin::instantiate( const QString & _plugin_name, Model * _par return nullptr; } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/Track.cpp b/src/core/Track.cpp index d3418ea33..1bb1b8e8b 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -43,6 +43,9 @@ #include "Song.h" +namespace lmms +{ + /*! \brief Create a new (empty) track object * * The track object is the whole track, linking its contents, its @@ -106,14 +109,14 @@ Track * Track::create( TrackTypes tt, TrackContainer * tc ) switch( tt ) { - case InstrumentTrack: t = new ::InstrumentTrack( tc ); break; - case PatternTrack: t = new ::PatternTrack( tc ); break; - case SampleTrack: t = new ::SampleTrack( tc ); break; + case InstrumentTrack: t = new class InstrumentTrack( tc ); break; + case PatternTrack: t = new class PatternTrack( tc ); break; + case SampleTrack: t = new class SampleTrack( tc ); break; // case EVENT_TRACK: // case VIDEO_TRACK: - case AutomationTrack: t = new ::AutomationTrack( tc ); break; + case AutomationTrack: t = new class AutomationTrack( tc ); break; case HiddenAutomationTrack: - t = new ::AutomationTrack( tc, true ); break; + t = new class AutomationTrack( tc, true ); break; default: break; } @@ -656,3 +659,4 @@ BoolModel *Track::getMutedModel() return &m_mutedModel; } +} // namespace lmms \ No newline at end of file diff --git a/src/core/TrackContainer.cpp b/src/core/TrackContainer.cpp index 6c52b41af..ce8fdd400 100644 --- a/src/core/TrackContainer.cpp +++ b/src/core/TrackContainer.cpp @@ -41,6 +41,10 @@ #include "MainWindow.h" #include "TextFloat.h" +namespace lmms +{ + + TrackContainer::TrackContainer() : Model( nullptr ), JournallingObject(), @@ -87,14 +91,14 @@ void TrackContainer::loadSettings( const QDomElement & _this ) static QProgressDialog * pd = nullptr; bool was_null = ( pd == nullptr ); - if( !journalRestore && getGUI() != nullptr ) + if (!journalRestore && gui::getGUI() != nullptr) { if( pd == nullptr ) { pd = new QProgressDialog( tr( "Loading project..." ), tr( "Cancel" ), 0, Engine::getSong()->getLoadingTrackCount(), - getGUI()->mainWindow() ); + gui::getGUI()->mainWindow()); pd->setWindowModality( Qt::ApplicationModal ); pd->setWindowTitle( tr( "Please wait..." ) ); pd->show(); @@ -111,9 +115,9 @@ void TrackContainer::loadSettings( const QDomElement & _this ) QEventLoop::AllEvents, 100 ); if( pd->wasCanceled() ) { - if ( getGUI() != nullptr ) + if (gui::getGUI() != nullptr) { - TextFloat::displayMessage( tr( "Loading cancelled" ), + gui::TextFloat::displayMessage( tr( "Loading cancelled" ), tr( "Project loading was cancelled." ), embed::getIconPixmap( "project_file", 24, 24 ), 2000 ); @@ -330,3 +334,5 @@ AutomatedValueMap TrackContainer::automatedValuesFromTracks(const TrackList &tra return valueMap; }; + +} // namespace lmms diff --git a/src/core/ValueBuffer.cpp b/src/core/ValueBuffer.cpp index 687bd3c15..09aee65bd 100644 --- a/src/core/ValueBuffer.cpp +++ b/src/core/ValueBuffer.cpp @@ -2,6 +2,10 @@ #include "interpolation.h" +namespace lmms +{ + + ValueBuffer::ValueBuffer() {} @@ -41,3 +45,6 @@ void ValueBuffer::interpolate(float start, float end_) return linearInterpolate( start, end_, i++ / length()); }); } + + +} // namespace lmms diff --git a/src/core/VstSyncController.cpp b/src/core/VstSyncController.cpp index efe295d7a..1699905c6 100644 --- a/src/core/VstSyncController.cpp +++ b/src/core/VstSyncController.cpp @@ -35,6 +35,10 @@ #include "RemotePlugin.h" +namespace lmms +{ + + VstSyncController::VstSyncController() : m_syncData( nullptr ) { @@ -140,6 +144,4 @@ void VstSyncController::updateSampleRate() } - - - +} // namespace lmms diff --git a/src/core/audio/AudioAlsa.cpp b/src/core/audio/AudioAlsa.cpp index 1cea301b9..0cf95f895 100644 --- a/src/core/audio/AudioAlsa.cpp +++ b/src/core/audio/AudioAlsa.cpp @@ -32,6 +32,8 @@ #include "ConfigManager.h" #include "Engine.h" +namespace lmms +{ AudioAlsa::AudioAlsa( bool & _success_ful, AudioEngine* _audioEngine ) : AudioDevice( qBound( @@ -538,4 +540,6 @@ int AudioAlsa::setSWParams() return 0; // all ok } +} // namespace lmms + #endif diff --git a/src/core/audio/AudioDevice.cpp b/src/core/audio/AudioDevice.cpp index 145e6b471..5fb58a1b0 100644 --- a/src/core/audio/AudioDevice.cpp +++ b/src/core/audio/AudioDevice.cpp @@ -29,7 +29,8 @@ #include "ConfigManager.h" #include "debug.h" - +namespace lmms +{ AudioDevice::AudioDevice( const ch_cnt_t _channels, AudioEngine* _audioEngine ) : m_supportsCapture( false ), @@ -267,3 +268,4 @@ bool AudioDevice::hqAudio() const } +} // namespace lmms \ No newline at end of file diff --git a/src/core/audio/AudioFileDevice.cpp b/src/core/audio/AudioFileDevice.cpp index e7d78bc36..f80d4a00f 100644 --- a/src/core/audio/AudioFileDevice.cpp +++ b/src/core/audio/AudioFileDevice.cpp @@ -29,6 +29,8 @@ #include "ExportProjectDialog.h" #include "GuiApplication.h" +namespace lmms +{ AudioFileDevice::AudioFileDevice( OutputSettings const & outputSettings, const ch_cnt_t _channels, @@ -38,6 +40,8 @@ AudioFileDevice::AudioFileDevice( OutputSettings const & outputSettings, m_outputFile( _file ), m_outputSettings(outputSettings) { + using gui::ExportProjectDialog; + setSampleRate( outputSettings.getSampleRate() ); if( m_outputFile.open( QFile::WriteOnly | QFile::Truncate ) == false ) @@ -52,7 +56,7 @@ AudioFileDevice::AudioFileDevice( OutputSettings const & outputSettings, "file and try again!" ).arg( _file ); - if( getGUI() != nullptr ) + if (gui::getGUI() != nullptr) { QMessageBox::critical( nullptr, title, message, QMessageBox::Ok, @@ -87,3 +91,4 @@ int AudioFileDevice::writeData( const void* data, int len ) return -1; } +} // namespace lmms diff --git a/src/core/audio/AudioFileFlac.cpp b/src/core/audio/AudioFileFlac.cpp index aa6d8e214..4e40257cd 100644 --- a/src/core/audio/AudioFileFlac.cpp +++ b/src/core/audio/AudioFileFlac.cpp @@ -31,6 +31,9 @@ #include "endian_handling.h" #include "AudioEngine.h" +namespace lmms +{ + AudioFileFlac::AudioFileFlac(OutputSettings const& outputSettings, ch_cnt_t const channels, bool& successful, QString const& file, AudioEngine* audioEngine): AudioFileDevice(outputSettings,channels,file,audioEngine), m_sf(nullptr) @@ -124,3 +127,5 @@ void AudioFileFlac::finishEncoding() sf_close(m_sf); } } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/audio/AudioFileMP3.cpp b/src/core/audio/AudioFileMP3.cpp index 088cd6eda..75084460f 100644 --- a/src/core/audio/AudioFileMP3.cpp +++ b/src/core/audio/AudioFileMP3.cpp @@ -30,6 +30,8 @@ #include +namespace lmms +{ AudioFileMP3::AudioFileMP3( OutputSettings const & outputSettings, const ch_cnt_t channels, @@ -130,4 +132,6 @@ void AudioFileMP3::tearDownEncoder() lame_close(m_lame); } +} // namespace lmms + #endif diff --git a/src/core/audio/AudioFileOgg.cpp b/src/core/audio/AudioFileOgg.cpp index d9aa8b4f0..1f40f456e 100644 --- a/src/core/audio/AudioFileOgg.cpp +++ b/src/core/audio/AudioFileOgg.cpp @@ -38,6 +38,8 @@ #include "AudioEngine.h" +namespace lmms +{ AudioFileOgg::AudioFileOgg( OutputSettings const & outputSettings, const ch_cnt_t channels, @@ -268,6 +270,8 @@ void AudioFileOgg::finishEncoding() } +} // namespace lmms + #endif diff --git a/src/core/audio/AudioFileWave.cpp b/src/core/audio/AudioFileWave.cpp index 1fce2fe48..6f1a425b9 100644 --- a/src/core/audio/AudioFileWave.cpp +++ b/src/core/audio/AudioFileWave.cpp @@ -28,6 +28,8 @@ #include "AudioEngine.h" +namespace lmms +{ AudioFileWave::AudioFileWave( OutputSettings const & outputSettings, const ch_cnt_t channels, bool & successful, @@ -136,3 +138,4 @@ void AudioFileWave::finishEncoding() } } +} // namespace lmms \ No newline at end of file diff --git a/src/core/audio/AudioJack.cpp b/src/core/audio/AudioJack.cpp index 6bc039a50..f0e606f47 100644 --- a/src/core/audio/AudioJack.cpp +++ b/src/core/audio/AudioJack.cpp @@ -40,6 +40,8 @@ #include "MidiJack.h" +namespace lmms +{ AudioJack::AudioJack( bool & _success_ful, AudioEngine* _audioEngine ) : AudioDevice( qBound( @@ -102,7 +104,7 @@ void AudioJack::restartAfterZombified() { m_active = false; startProcessing(); - QMessageBox::information( getGUI()->mainWindow(), + QMessageBox::information(gui::getGUI()->mainWindow(), tr( "JACK client restarted" ), tr( "LMMS was kicked by JACK for some reason. " "Therefore the JACK backend of LMMS has been " @@ -111,7 +113,7 @@ void AudioJack::restartAfterZombified() } else { - QMessageBox::information( getGUI()->mainWindow(), + QMessageBox::information(gui::getGUI()->mainWindow(), tr( "JACK server down" ), tr( "The JACK server seems to have been shutdown " "and starting a new instance failed. " @@ -464,13 +466,13 @@ AudioJack::setupWidget::setupWidget( QWidget * _parent ) : cn_lbl->setFont( pointSize<7>( cn_lbl->font() ) ); cn_lbl->setGeometry( 10, 40, 160, 10 ); - LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ ); + gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ ); m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS ); m->setStep( 2 ); m->setValue( ConfigManager::inst()->value( "audiojack", "channels" ).toInt() ); - m_channels = new LcdSpinBox( 1, this ); + m_channels = new gui::LcdSpinBox( 1, this ); m_channels->setModel( m ); m_channels->setLabel( tr( "Channels" ) ); m_channels->move( 180, 20 ); @@ -498,6 +500,6 @@ void AudioJack::setupWidget::saveSettings() - +} // namespace lmms #endif diff --git a/src/core/audio/AudioOss.cpp b/src/core/audio/AudioOss.cpp index 76df85adc..76f10a61e 100644 --- a/src/core/audio/AudioOss.cpp +++ b/src/core/audio/AudioOss.cpp @@ -57,6 +57,8 @@ #include "ConfigManager.h" +namespace lmms +{ static const QString PATH_DEV_DSP = #if defined(__NetBSD__) || defined(__OpenBSD__) @@ -325,13 +327,13 @@ AudioOss::setupWidget::setupWidget( QWidget * _parent ) : dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) ); dev_lbl->setGeometry( 10, 40, 160, 10 ); - LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ ); + gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ ); m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS ); m->setStep( 2 ); m->setValue( ConfigManager::inst()->value( "audiooss", "channels" ).toInt() ); - m_channels = new LcdSpinBox( 1, this ); + m_channels = new gui::LcdSpinBox( 1, this ); m_channels->setModel( m ); m_channels->setLabel( tr( "Channels" ) ); m_channels->move( 180, 20 ); @@ -358,5 +360,7 @@ void AudioOss::setupWidget::saveSettings() } +} // namespace lmms + #endif diff --git a/src/core/audio/AudioPort.cpp b/src/core/audio/AudioPort.cpp index b83e6b418..4bbf509d8 100644 --- a/src/core/audio/AudioPort.cpp +++ b/src/core/audio/AudioPort.cpp @@ -31,6 +31,8 @@ #include "MixHelpers.h" #include "BufferManager.h" +namespace lmms +{ AudioPort::AudioPort( const QString & _name, bool _has_effect_chain, FloatModel * volumeModel, FloatModel * panningModel, @@ -247,3 +249,5 @@ void AudioPort::removePlayHandle( PlayHandle * handle ) } m_playHandleLock.unlock(); } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/audio/AudioPortAudio.cpp b/src/core/audio/AudioPortAudio.cpp index 1bc137dac..cc1e611c9 100644 --- a/src/core/audio/AudioPortAudio.cpp +++ b/src/core/audio/AudioPortAudio.cpp @@ -27,6 +27,10 @@ #include "AudioPortAudio.h" #ifndef LMMS_HAVE_PORTAUDIO +namespace lmms +{ + + void AudioPortAudioSetupUtil::updateBackends() { } @@ -38,6 +42,9 @@ void AudioPortAudioSetupUtil::updateDevices() void AudioPortAudioSetupUtil::updateChannels() { } + + +} // namespace lmms #endif #ifdef LMMS_HAVE_PORTAUDIO @@ -50,6 +57,9 @@ void AudioPortAudioSetupUtil::updateChannels() #include "ComboBox.h" #include "AudioEngine.h" +namespace lmms +{ + AudioPortAudio::AudioPortAudio( bool & _success_ful, AudioEngine * _audioEngine ) : AudioDevice( qBound( @@ -407,6 +417,8 @@ void AudioPortAudioSetupUtil::updateChannels() AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) : AudioDeviceSetupWidget( AudioPortAudio::name(), _parent ) { + using gui::ComboBox; + m_backend = new ComboBox( this, "BACKEND" ); m_backend->setGeometry( 64, 15, 260, ComboBox::DEFAULT_HEIGHT ); @@ -496,6 +508,8 @@ void AudioPortAudio::setupWidget::show() AudioDeviceSetupWidget::show(); } +} // namespace lmms + #endif diff --git a/src/core/audio/AudioPulseAudio.cpp b/src/core/audio/AudioPulseAudio.cpp index 5f82b64dc..40c955434 100644 --- a/src/core/audio/AudioPulseAudio.cpp +++ b/src/core/audio/AudioPulseAudio.cpp @@ -35,6 +35,8 @@ #include "gui_templates.h" #include "Engine.h" +namespace lmms +{ static void stream_write_callback(pa_stream *s, size_t length, void *userdata) { @@ -317,13 +319,13 @@ AudioPulseAudio::setupWidget::setupWidget( QWidget * _parent ) : dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) ); dev_lbl->setGeometry( 10, 40, 160, 10 ); - LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ ); + gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ ); m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS ); m->setStep( 2 ); m->setValue( ConfigManager::inst()->value( "audiopa", "channels" ).toInt() ); - m_channels = new LcdSpinBox( 1, this ); + m_channels = new gui::LcdSpinBox( 1, this ); m_channels->setModel( m ); m_channels->setLabel( tr( "Channels" ) ); m_channels->move( 180, 20 ); @@ -349,6 +351,7 @@ void AudioPulseAudio::setupWidget::saveSettings() QString::number( m_channels->value() ) ); } +} // namespace lmms #endif diff --git a/src/core/audio/AudioSampleRecorder.cpp b/src/core/audio/AudioSampleRecorder.cpp index a33308c99..358a9b897 100644 --- a/src/core/audio/AudioSampleRecorder.cpp +++ b/src/core/audio/AudioSampleRecorder.cpp @@ -29,6 +29,9 @@ #include "debug.h" +namespace lmms +{ + AudioSampleRecorder::AudioSampleRecorder( const ch_cnt_t _channels, bool & _success_ful, @@ -111,4 +114,4 @@ void AudioSampleRecorder::writeBuffer( const surroundSampleFrame * _ab, } - +} // namespace lmms diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index d62678b49..cb622a941 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -34,6 +34,9 @@ #include "ConfigManager.h" #include "gui_templates.h" +namespace lmms +{ + AudioSdl::AudioSdl( bool & _success_ful, AudioEngine* _audioEngine ) : AudioDevice( DEFAULT_CHANNELS, _audioEngine ), m_outBuf( new surroundSampleFrame[audioEngine()->framesPerPeriod()] ) @@ -351,5 +354,7 @@ void AudioSdl::setupWidget::saveSettings() } +} // namespace lmms + #endif diff --git a/src/core/audio/AudioSndio.cpp b/src/core/audio/AudioSndio.cpp index 114e01460..52ff1666e 100644 --- a/src/core/audio/AudioSndio.cpp +++ b/src/core/audio/AudioSndio.cpp @@ -40,6 +40,8 @@ #include "ConfigManager.h" +namespace lmms +{ AudioSndio::AudioSndio(bool & _success_ful, AudioEngine * _audioEngine) : AudioDevice( qBound( @@ -188,13 +190,13 @@ AudioSndio::setupWidget::setupWidget( QWidget * _parent ) : dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) ); dev_lbl->setGeometry( 10, 40, 160, 10 ); - LcdSpinBoxModel * m = new LcdSpinBoxModel( /* this */ ); + gui::LcdSpinBoxModel * m = new gui::LcdSpinBoxModel( /* this */ ); m->setRange( DEFAULT_CHANNELS, SURROUND_CHANNELS ); m->setStep( 2 ); m->setValue( ConfigManager::inst()->value( "audiosndio", "channels" ).toInt() ); - m_channels = new LcdSpinBox( 1, this ); + m_channels = new gui::LcdSpinBox( 1, this ); m_channels->setModel( m ); m_channels->setLabel( tr( "Channels" ) ); m_channels->move( 180, 20 ); @@ -217,4 +219,6 @@ void AudioSndio::setupWidget::saveSettings( void ) } +} // namespace lmms + #endif /* LMMS_HAVE_SNDIO */ diff --git a/src/core/audio/AudioSoundIo.cpp b/src/core/audio/AudioSoundIo.cpp index c8ef04542..c56d23dc3 100644 --- a/src/core/audio/AudioSoundIo.cpp +++ b/src/core/audio/AudioSoundIo.cpp @@ -36,6 +36,9 @@ #include "ComboBox.h" #include "AudioEngine.h" +namespace lmms +{ + AudioSoundIo::AudioSoundIo( bool & outSuccessful, AudioEngine * _audioEngine ) : AudioDevice( qBound( DEFAULT_CHANNELS, @@ -519,4 +522,7 @@ void AudioSoundIo::setupWidget::saveSettings() ConfigManager::inst()->setValue( "audiosoundio", "out_device_raw", configDeviceRaw); } + +} // namespace lmms + #endif diff --git a/src/core/base64.cpp b/src/core/base64.cpp index c04300dcf..b1c26b610 100644 --- a/src/core/base64.cpp +++ b/src/core/base64.cpp @@ -28,7 +28,7 @@ #include #include -namespace base64 +namespace lmms::base64 { @@ -54,5 +54,4 @@ QVariant decode( const QString & _b64, QVariant::Type _force_type ) } -} ; - +} // namespace lmms::base64 diff --git a/src/core/fft_helpers.cpp b/src/core/fft_helpers.cpp index 9e49c5544..63088f655 100644 --- a/src/core/fft_helpers.cpp +++ b/src/core/fft_helpers.cpp @@ -29,6 +29,10 @@ #include #include "lmms_constants.h" +namespace lmms +{ + + /* Returns biggest value from abs_spectrum[spec_size] array. * * return -1 on error, otherwise the maximum value @@ -212,3 +216,6 @@ int compressbands(const float *absspec_buffer, float *compressedband, int num_ol return 0; } + + +} // namespace lmms diff --git a/src/core/lv2/Lv2Basics.cpp b/src/core/lv2/Lv2Basics.cpp index b6be53a2c..ab5db6ef1 100644 --- a/src/core/lv2/Lv2Basics.cpp +++ b/src/core/lv2/Lv2Basics.cpp @@ -26,6 +26,9 @@ #ifdef LMMS_HAVE_LV2 +namespace lmms +{ + QString qStringFromPluginNode(const LilvPlugin* plug, LilvNode* (*getFunc)(const LilvPlugin*)) { @@ -45,5 +48,7 @@ std::string stdStringFromPortName(const LilvPlugin* plug, const LilvPort* port) lilv_node_as_string(AutoLilvNode(lilv_port_get_name(plug, port)).get())); } +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2ControlBase.cpp b/src/core/lv2/Lv2ControlBase.cpp index 3c8ccbf8a..6fb5900ea 100644 --- a/src/core/lv2/Lv2ControlBase.cpp +++ b/src/core/lv2/Lv2ControlBase.cpp @@ -35,6 +35,8 @@ #include "Lv2Proc.h" +namespace lmms +{ Plugin::PluginTypes Lv2ControlBase::check(const LilvPlugin *plugin, @@ -213,6 +215,7 @@ void Lv2ControlBase::handleMidiInputEvent(const MidiEvent &event, } +} // namespace lmms #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2Evbuf.cpp b/src/core/lv2/Lv2Evbuf.cpp index 0c9081815..2d2ad0517 100644 --- a/src/core/lv2/Lv2Evbuf.cpp +++ b/src/core/lv2/Lv2Evbuf.cpp @@ -36,6 +36,10 @@ #include +namespace lmms +{ + + struct LV2_Evbuf_Impl { uint32_t capacity; uint32_t atom_Chunk; @@ -190,4 +194,7 @@ lv2_evbuf_write(LV2_Evbuf_Iterator* iter, return true; } + +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2Features.cpp b/src/core/lv2/Lv2Features.cpp index 74d2415b0..60c1b4324 100644 --- a/src/core/lv2/Lv2Features.cpp +++ b/src/core/lv2/Lv2Features.cpp @@ -32,6 +32,10 @@ #include "Lv2Manager.h" +namespace lmms +{ + + bool Lv2Features::isFeatureSupported(const char* featName) { return Engine::getLv2Manager()->isFeatureSupported(featName); @@ -101,5 +105,7 @@ void *&Lv2Features::operator[](const char *featName) } +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2Manager.cpp b/src/core/lv2/Lv2Manager.cpp index 09870a90b..1622d4c1b 100644 --- a/src/core/lv2/Lv2Manager.cpp +++ b/src/core/lv2/Lv2Manager.cpp @@ -42,6 +42,8 @@ #include "PluginIssue.h" +namespace lmms +{ const std::set Lv2Manager::pluginBlacklist = @@ -260,6 +262,6 @@ bool Lv2Manager::isSubclassOf(const LilvPluginClass* clvss, const char* uriStr) } - +} // namespace lmms #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2Options.cpp b/src/core/lv2/Lv2Options.cpp index e941165f0..36281ee63 100644 --- a/src/core/lv2/Lv2Options.cpp +++ b/src/core/lv2/Lv2Options.cpp @@ -29,6 +29,10 @@ #include +namespace lmms +{ + + std::set Lv2Options::s_supportedOptions; @@ -90,4 +94,6 @@ void Lv2Options::initOption(LV2_URID key, uint32_t size, LV2_URID type, } +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2Ports.cpp b/src/core/lv2/Lv2Ports.cpp index 4db7f3e2a..9e7a9e80c 100644 --- a/src/core/lv2/Lv2Ports.cpp +++ b/src/core/lv2/Lv2Ports.cpp @@ -35,7 +35,9 @@ #include "Lv2Manager.h" #include "Lv2Evbuf.h" -namespace Lv2Ports { + +namespace lmms::Lv2Ports +{ @@ -359,7 +361,7 @@ Visitor::~Visitor() {} -} // namespace Lv2Ports +} // namespace lmms::Lv2Ports #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2Proc.cpp b/src/core/lv2/Lv2Proc.cpp index 59f84befe..20987b32f 100644 --- a/src/core/lv2/Lv2Proc.cpp +++ b/src/core/lv2/Lv2Proc.cpp @@ -45,6 +45,8 @@ #include "MidiEventToByteSeq.h" +namespace lmms +{ // container for everything required to store MIDI events going to the plugin @@ -839,4 +841,6 @@ AutoLilvNode Lv2Proc::uri(const char *uriStr) } +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2SubPluginFeatures.cpp b/src/core/lv2/Lv2SubPluginFeatures.cpp index 8fb908cb1..ce950c6ba 100644 --- a/src/core/lv2/Lv2SubPluginFeatures.cpp +++ b/src/core/lv2/Lv2SubPluginFeatures.cpp @@ -35,6 +35,9 @@ #include "Lv2Basics.h" #include "Lv2Manager.h" +namespace lmms +{ + const LilvPlugin *Lv2SubPluginFeatures::getPlugin( const Plugin::Descriptor::SubPluginFeatures::Key &k) @@ -179,5 +182,8 @@ void Lv2SubPluginFeatures::listSubPluginKeys(const Plugin::Descriptor *desc, } } + +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2UridCache.cpp b/src/core/lv2/Lv2UridCache.cpp index 3392f9bd2..746878afb 100644 --- a/src/core/lv2/Lv2UridCache.cpp +++ b/src/core/lv2/Lv2UridCache.cpp @@ -39,6 +39,10 @@ #define LV2_BUF_SIZE__nominalBlockLength LV2_BUF_SIZE_PREFIX "nominalBlockLength" #endif +namespace lmms +{ + + uint32_t Lv2UridCache::operator[](Lv2UridCache::Id id) const { Q_ASSERT(id != Id::size); @@ -67,6 +71,9 @@ Lv2UridCache::Lv2UridCache(UridMap &mapper) for(uint32_t urid : m_cache) { Q_ASSERT(urid != noIdYet); } } + +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2UridMap.cpp b/src/core/lv2/Lv2UridMap.cpp index 7e4fa864f..4709f4898 100644 --- a/src/core/lv2/Lv2UridMap.cpp +++ b/src/core/lv2/Lv2UridMap.cpp @@ -27,6 +27,10 @@ #ifdef LMMS_HAVE_LV2 +namespace lmms +{ + + static LV2_URID staticMap(LV2_URID_Map_Handle handle, const char* uri) { UridMap* map = static_cast(handle); @@ -95,5 +99,8 @@ const char *UridMap::unmap(LV2_URID urid) return (idx < m_unMap.size()) ? m_unMap[idx] : nullptr; } + +} // namespace lmms + #endif // LMMS_HAVE_LV2 diff --git a/src/core/main.cpp b/src/core/main.cpp index 953995b67..5d454dd9b 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -124,7 +124,7 @@ void consoleMessageHandler(QtMsgType type, inline void loadTranslation( const QString & tname, - const QString & dir = ConfigManager::inst()->localeDir() ) + const QString & dir = lmms::ConfigManager::inst()->localeDir() ) { QTranslator * t = new QTranslator( QCoreApplication::instance() ); QString name = tname + ".qm"; @@ -252,6 +252,8 @@ int noInputFileError() int main( int argc, char * * argv ) { + using namespace lmms; + #ifdef LMMS_DEBUG_FPE // Enable exceptions for certain floating point results // FE_UNDERFLOW is disabled for the time being @@ -359,7 +361,7 @@ int main( int argc, char * * argv ) #endif QCoreApplication * app = coreOnly ? new QCoreApplication( argc, argv ) : - new MainApplication( argc, argv ); + new gui::MainApplication(argc, argv); AudioEngine::qualitySettings qs( AudioEngine::qualitySettings::Mode_HighQuality ); OutputSettings os( 44100, OutputSettings::BitRateSettings(160, false), OutputSettings::Depth_16Bit, OutputSettings::StereoMode_JointStereo ); @@ -854,6 +856,8 @@ int main( int argc, char * * argv ) } else // otherwise, start the GUI { + using namespace lmms::gui; + new GuiApplication(); // re-intialize RNG - shared libraries might have srand() or @@ -1007,7 +1011,7 @@ int main( int argc, char * * argv ) // instances of LMMS. if( autoSaveEnabled ) { - getGUI()->mainWindow()->autoSaveTimerReset(); + gui::getGUI()->mainWindow()->autoSaveTimerReset(); } } diff --git a/src/core/midi/MidiAlsaRaw.cpp b/src/core/midi/MidiAlsaRaw.cpp index 883d31e96..04ef5c1ce 100644 --- a/src/core/midi/MidiAlsaRaw.cpp +++ b/src/core/midi/MidiAlsaRaw.cpp @@ -29,6 +29,10 @@ #ifdef LMMS_HAVE_ALSA +namespace lmms +{ + + MidiAlsaRaw::MidiAlsaRaw() : MidiClientRaw(), m_inputp( &m_input ), @@ -169,5 +173,7 @@ void MidiAlsaRaw::run() } -#endif +} // namespace lmms + +#endif // LMMS_HAVE_ALSA diff --git a/src/core/midi/MidiAlsaSeq.cpp b/src/core/midi/MidiAlsaSeq.cpp index b04964843..41904812c 100644 --- a/src/core/midi/MidiAlsaSeq.cpp +++ b/src/core/midi/MidiAlsaSeq.cpp @@ -31,6 +31,10 @@ #ifdef LMMS_HAVE_ALSA + +namespace lmms +{ + const int EventPollTimeOut = 250; @@ -97,8 +101,8 @@ MidiAlsaSeq::MidiAlsaSeq() : snd_seq_start_queue( m_seqHandle, m_queueID, nullptr ); changeQueueTempo( Engine::getSong()->getTempo() ); - connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), - this, SLOT( changeQueueTempo( bpm_t ) ), Qt::DirectConnection ); + connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ), + this, SLOT( changeQueueTempo( lmms::bpm_t ) ), Qt::DirectConnection ); // initial list-update updatePortList(); @@ -693,5 +697,7 @@ void MidiAlsaSeq::updatePortList() } -#endif +} // namespace lmms + +#endif // LMMS_HAVE_ALSA diff --git a/src/core/midi/MidiApple.cpp b/src/core/midi/MidiApple.cpp index 66a996d0f..01836c50b 100644 --- a/src/core/midi/MidiApple.cpp +++ b/src/core/midi/MidiApple.cpp @@ -36,6 +36,11 @@ #include + +namespace lmms +{ + + const unsigned int SYSEX_LENGTH=1024; MidiApple::MidiApple() : @@ -625,6 +630,6 @@ char * MidiApple::getFullName(MIDIEndpointRef &endpoint_ref) } -#endif - +} // namespace lmms +#endif // LMMS_BUILD_APPLE diff --git a/src/core/midi/MidiClient.cpp b/src/core/midi/MidiClient.cpp index 109e01fd6..def556170 100644 --- a/src/core/midi/MidiClient.cpp +++ b/src/core/midi/MidiClient.cpp @@ -27,6 +27,9 @@ #include "MidiPort.h" +namespace lmms +{ + MidiClient::MidiClient() { } @@ -324,3 +327,5 @@ int MidiClientRaw::eventLength( const unsigned char event ) } return 1; } + +} // namespace lmms \ No newline at end of file diff --git a/src/core/midi/MidiController.cpp b/src/core/midi/MidiController.cpp index 91d0dd782..61c85104e 100644 --- a/src/core/midi/MidiController.cpp +++ b/src/core/midi/MidiController.cpp @@ -28,6 +28,9 @@ #include "AudioEngine.h" #include "MidiController.h" +namespace lmms +{ + MidiController::MidiController( Model * _parent ) : Controller( Controller::MidiController, _parent, tr( "MIDI Controller" ) ), @@ -146,11 +149,11 @@ QString MidiController::nodeName() const -ControllerDialog * MidiController::createDialog( QWidget * _parent ) +gui::ControllerDialog* MidiController::createDialog( QWidget * _parent ) { return nullptr; } - +} // namespace lmms diff --git a/src/core/midi/MidiEventToByteSeq.cpp b/src/core/midi/MidiEventToByteSeq.cpp index 98f0541d0..6ef302c30 100644 --- a/src/core/midi/MidiEventToByteSeq.cpp +++ b/src/core/midi/MidiEventToByteSeq.cpp @@ -29,6 +29,10 @@ #include "MidiEvent.h" +namespace lmms +{ + + std::size_t writeToByteSeq( const MidiEvent& ev, uint8_t *data, std::size_t bufsize) { @@ -105,3 +109,5 @@ std::size_t writeToByteSeq( return size; } + +} // namespace lmms diff --git a/src/core/midi/MidiJack.cpp b/src/core/midi/MidiJack.cpp index fdf194889..1ad4da09d 100644 --- a/src/core/midi/MidiJack.cpp +++ b/src/core/midi/MidiJack.cpp @@ -35,6 +35,9 @@ #include "Engine.h" #include "MainWindow.h" +namespace lmms +{ + /* callback functions for jack */ static int JackMidiProcessCallback(jack_nframes_t nframes, void *arg) { @@ -55,7 +58,7 @@ static void JackMidiShutdown(void *arg) QString msg_short = MidiJack::tr("JACK server down"); //: When JACK(JACK Audio Connection Kit) disconnects, it will show the following message (dialog message) QString msg_long = MidiJack::tr("The JACK server seems to be shuted down."); - QMessageBox::information( getGUI()->mainWindow(), msg_short, msg_long ); + QMessageBox::information(gui::getGUI()->mainWindow(), msg_short, msg_long); } MidiJack::MidiJack() : @@ -228,4 +231,6 @@ void MidiJack::run() } } +} // namespace lmms + #endif // LMMS_HAVE_JACK diff --git a/src/core/midi/MidiOss.cpp b/src/core/midi/MidiOss.cpp index faf6453a2..848bac705 100644 --- a/src/core/midi/MidiOss.cpp +++ b/src/core/midi/MidiOss.cpp @@ -30,6 +30,9 @@ #include "ConfigManager.h" +namespace lmms +{ + MidiOss::MidiOss() : MidiClientRaw(), @@ -106,6 +109,6 @@ void MidiOss::run() } -#endif - +} // namespace lmms +#endif // LMMS_HAVE_OSS diff --git a/src/core/midi/MidiPort.cpp b/src/core/midi/MidiPort.cpp index 40460f434..9b3f46304 100644 --- a/src/core/midi/MidiPort.cpp +++ b/src/core/midi/MidiPort.cpp @@ -32,6 +32,11 @@ #include "Note.h" #include "Song.h" + +namespace lmms +{ + + static MidiDummy s_dummyClient; @@ -422,3 +427,6 @@ void MidiPort::invalidateCilent() { m_midiClient = &s_dummyClient; } + + +} // namespace lmms \ No newline at end of file diff --git a/src/core/midi/MidiSndio.cpp b/src/core/midi/MidiSndio.cpp index 4acd2827e..d09803e86 100644 --- a/src/core/midi/MidiSndio.cpp +++ b/src/core/midi/MidiSndio.cpp @@ -34,6 +34,10 @@ #include "ConfigManager.h" +namespace lmms +{ + + MidiSndio::MidiSndio( void ) : MidiClientRaw(), m_quit( false ) @@ -111,4 +115,7 @@ void MidiSndio::run( void ) } } + +} // namespace lmms + #endif /* LMMS_HAVE_SNDIO */ diff --git a/src/core/midi/MidiWinMM.cpp b/src/core/midi/MidiWinMM.cpp index 80ebea964..811e0842c 100644 --- a/src/core/midi/MidiWinMM.cpp +++ b/src/core/midi/MidiWinMM.cpp @@ -27,6 +27,10 @@ #ifdef LMMS_BUILD_WIN32 +namespace lmms +{ + + MidiWinMM::MidiWinMM() : MidiClient(), m_inputDevices(), @@ -299,4 +303,6 @@ void MidiWinMM::openDevices() } -#endif +} // namespace lmms + +#endif // LMMS_BUILD_WIN32 diff --git a/src/gui/ActionGroup.cpp b/src/gui/ActionGroup.cpp index 5b40bd204..053bb556d 100644 --- a/src/gui/ActionGroup.cpp +++ b/src/gui/ActionGroup.cpp @@ -24,6 +24,9 @@ #include "ActionGroup.h" +namespace lmms::gui +{ + ActionGroup::ActionGroup(QObject* parent) : QActionGroup(parent) { connect(this, SIGNAL(triggered(QAction*)), this, SLOT(actionTriggered_(QAction*))); @@ -53,3 +56,5 @@ void ActionGroup::actionTriggered_(QAction* action) emit triggered(actions().indexOf(action)); } + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/AudioAlsaSetupWidget.cpp b/src/gui/AudioAlsaSetupWidget.cpp index 26da660da..f6e91f8e3 100644 --- a/src/gui/AudioAlsaSetupWidget.cpp +++ b/src/gui/AudioAlsaSetupWidget.cpp @@ -33,6 +33,8 @@ #include "LcdSpinBox.h" #include "gui_templates.h" +namespace lmms::gui +{ AudioAlsaSetupWidget::AudioAlsaSetupWidget( QWidget * _parent ) : AudioDeviceSetupWidget( AudioAlsa::name(), _parent ), @@ -116,4 +118,6 @@ void AudioAlsaSetupWidget::onCurrentIndexChanged(int index) } +} // namespace lmms::gui + #endif diff --git a/src/gui/AudioDeviceSetupWidget.cpp b/src/gui/AudioDeviceSetupWidget.cpp index feba3f1b0..ae559404c 100644 --- a/src/gui/AudioDeviceSetupWidget.cpp +++ b/src/gui/AudioDeviceSetupWidget.cpp @@ -24,6 +24,8 @@ #include "AudioDeviceSetupWidget.h" +namespace lmms::gui +{ AudioDeviceSetupWidget::AudioDeviceSetupWidget(const QString & caption, QWidget * parent) : TabWidget(TabWidget::tr("Settings for %1").arg(tr(caption.toUtf8())), parent) @@ -39,3 +41,5 @@ void AudioDeviceSetupWidget::show() parentWidget()->show(); QWidget::show(); } + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 082022d35..7ef527cae 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -38,9 +38,12 @@ #include "AutomationEditor.h" +namespace lmms::gui +{ + static float floatFromClipboard(bool* ok=nullptr); -AutomatableModelView::AutomatableModelView( ::Model* model, QWidget* _this ) : +AutomatableModelView::AutomatableModelView( Model* model, QWidget* _this ) : ModelView( model, _this ), m_conversionFactor( 1.0 ) { @@ -170,7 +173,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 gui::StringPairDrag( "automatable_model", QString::number( modelUntyped()->id() ), QPixmap(), widget() ); event->accept(); } else if( event->button() == Qt::MidButton ) @@ -212,7 +215,7 @@ void AutomatableModelViewSlots::execConnectionDialog() AutomatableModel* m = m_amv->modelUntyped(); m->displayName(); - ControllerConnectionDialog d( getGUI()->mainWindow(), m ); + gui::ControllerConnectionDialog d( getGUI()->mainWindow(), m ); if( d.exec() == 1 ) { @@ -303,3 +306,5 @@ static float floatFromClipboard(bool* ok) return getString( MimeType::Default ).toFloat(ok); } + +} // namespace lmms::gui diff --git a/src/gui/ControlLayout.cpp b/src/gui/ControlLayout.cpp index 0885c3c44..356d608e3 100644 --- a/src/gui/ControlLayout.cpp +++ b/src/gui/ControlLayout.cpp @@ -80,6 +80,10 @@ #include #include + +namespace lmms::gui +{ + constexpr const int ControlLayout::m_minWidth; ControlLayout::ControlLayout(QWidget *parent, int margin, int hSpacing, int vSpacing) @@ -312,3 +316,4 @@ int ControlLayout::smartSpacing(QStyle::PixelMetric pm) const } +} // namespace lmms::gui diff --git a/src/gui/ControllerDialog.cpp b/src/gui/ControllerDialog.cpp index f854ab1b9..be7d5dbef 100644 --- a/src/gui/ControllerDialog.cpp +++ b/src/gui/ControllerDialog.cpp @@ -28,6 +28,9 @@ #include "ControllerDialog.h" #include "Controller.h" +namespace lmms::gui +{ + ControllerDialog::ControllerDialog( Controller * _controller, QWidget * _parent ) : @@ -52,4 +55,4 @@ void ControllerDialog::closeEvent( QCloseEvent * _ce ) - +} // namespace lmms::gui diff --git a/src/gui/ControllerRackView.cpp b/src/gui/ControllerRackView.cpp index 2b597e1c2..9549b6e0d 100644 --- a/src/gui/ControllerRackView.cpp +++ b/src/gui/ControllerRackView.cpp @@ -38,6 +38,9 @@ #include "LfoController.h" #include "SubWindow.h" +namespace lmms::gui +{ + ControllerRackView::ControllerRackView( ) : QWidget(), @@ -65,8 +68,8 @@ ControllerRackView::ControllerRackView( ) : this, SLOT( addController() ) ); Song * song = Engine::getSong(); - connect( song, SIGNAL( controllerAdded( Controller* ) ), SLOT( onControllerAdded( Controller* ) ) ); - connect( song, SIGNAL( controllerRemoved( Controller* ) ), SLOT( onControllerRemoved( Controller* ) ) ); + connect( song, SIGNAL( controllerAdded( lmms::Controller* ) ), SLOT( onControllerAdded( lmms::Controller* ) ) ); + connect( song, SIGNAL( controllerRemoved( lmms::Controller* ) ), SLOT( onControllerRemoved( lmms::Controller* ) ) ); QVBoxLayout * layout = new QVBoxLayout(); layout->addWidget( m_scrollArea ); @@ -145,8 +148,8 @@ void ControllerRackView::onControllerAdded( Controller * controller ) ControllerView * controllerView = new ControllerView( controller, scrollAreaWidget ); - connect( controllerView, SIGNAL( deleteController( ControllerView * ) ), - this, SLOT( deleteController( ControllerView * ) ), Qt::QueuedConnection ); + connect( controllerView, SIGNAL( deleteController( lmms::gui::ControllerView * ) ), + this, SLOT( deleteController( lmms::gui::ControllerView * ) ), Qt::QueuedConnection ); m_controllerViews.append( controllerView ); m_scrollAreaLayout->insertWidget( m_nextIndex, controllerView ); @@ -212,3 +215,5 @@ void ControllerRackView::closeEvent( QCloseEvent * _ce ) _ce->ignore(); } + +} // namespace lmms::gui diff --git a/src/gui/ControllerView.cpp b/src/gui/ControllerView.cpp index a3b1a7934..7e046b4f2 100644 --- a/src/gui/ControllerView.cpp +++ b/src/gui/ControllerView.cpp @@ -40,6 +40,9 @@ #include "MainWindow.h" #include "SubWindow.h" +namespace lmms::gui +{ + ControllerView::ControllerView( Controller * _model, QWidget * _parent ) : QFrame( _parent ), @@ -179,3 +182,6 @@ void ControllerView::contextMenuEvent( QContextMenuEvent * ) contextMenu->exec( QCursor::pos() ); delete contextMenu; } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp index 246b08734..fa28c695f 100644 --- a/src/gui/Controls.cpp +++ b/src/gui/Controls.cpp @@ -34,6 +34,8 @@ #include "Knob.h" +namespace lmms::gui +{ Control::~Control() {} @@ -138,3 +140,5 @@ LcdControl::LcdControl(int numDigits, QWidget *parent) : LcdControl::~LcdControl() {} + +} // namespace lmms::gui diff --git a/src/gui/EffectControlDialog.cpp b/src/gui/EffectControlDialog.cpp index d7d5b4054..a134435fa 100644 --- a/src/gui/EffectControlDialog.cpp +++ b/src/gui/EffectControlDialog.cpp @@ -28,6 +28,9 @@ #include "EffectControlDialog.h" #include "EffectControls.h" +namespace lmms::gui +{ + EffectControlDialog::EffectControlDialog( EffectControls * _controls ) : QWidget( nullptr ), @@ -55,6 +58,4 @@ void EffectControlDialog::closeEvent( QCloseEvent * _ce ) } - - - +} // namespace lmms::gui diff --git a/src/gui/EffectRackView.cpp b/src/gui/EffectRackView.cpp index f6bac18e2..27600056e 100644 --- a/src/gui/EffectRackView.cpp +++ b/src/gui/EffectRackView.cpp @@ -34,6 +34,9 @@ #include "GroupBox.h" +namespace lmms::gui +{ + EffectRackView::EffectRackView( EffectChain* model, QWidget* parent ) : QWidget( parent ), ModelView( nullptr, this ) @@ -168,12 +171,12 @@ void EffectRackView::update() if( i >= m_effectViews.size() ) { EffectView * view = new EffectView( *it, w ); - connect( view, SIGNAL( moveUp( EffectView * ) ), - this, SLOT( moveUp( EffectView * ) ) ); - connect( view, SIGNAL( moveDown( EffectView * ) ), - this, SLOT( moveDown( EffectView * ) ) ); - connect( view, SIGNAL( deletePlugin( EffectView * ) ), - this, SLOT( deletePlugin( EffectView * ) ), + connect( view, SIGNAL( moveUp( lmms::gui::EffectView * ) ), + this, SLOT( moveUp( lmms::gui::EffectView * ) ) ); + connect( view, SIGNAL( moveDown( lmms::gui::EffectView * ) ), + this, SLOT( moveDown( lmms::gui::EffectView * ) ) ); + connect( view, SIGNAL( deletePlugin( lmms::gui::EffectView * ) ), + this, SLOT( deletePlugin( lmms::gui::EffectView * ) ), Qt::QueuedConnection ); view->show(); m_effectViews.append( view ); @@ -263,4 +266,4 @@ void EffectRackView::modelChanged() - +} // namespace lmms::gui diff --git a/src/gui/EffectView.cpp b/src/gui/EffectView.cpp index 11d95cb2e..f90283631 100644 --- a/src/gui/EffectView.cpp +++ b/src/gui/EffectView.cpp @@ -40,6 +40,9 @@ #include "TempoSyncKnob.h" +namespace lmms::gui +{ + EffectView::EffectView( Effect * _model, QWidget * _parent ) : PluginView( _model, _parent ), m_bg( embed::getIconPixmap( "effect_plugin" ) ), @@ -234,3 +237,5 @@ void EffectView::modelChanged() m_autoQuit->setModel( &effect()->m_autoQuitModel ); m_gate->setModel( &effect()->m_gateModel ); } + +} // namespace lmms::gui diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index a67dc52ee..7f212b10a 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -59,6 +59,10 @@ #include "StringPairDrag.h" #include "TextFloat.h" +namespace lmms::gui +{ + + enum TreeWidgetItemTypes { TypeFileItem = QTreeWidgetItem::UserType, @@ -1295,3 +1299,6 @@ QString FileItem::extension(const QString & file ) { return QFileInfo( file ).suffix().toLower(); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/GuiApplication.cpp b/src/gui/GuiApplication.cpp index 0829bfd80..a016aaea5 100644 --- a/src/gui/GuiApplication.cpp +++ b/src/gui/GuiApplication.cpp @@ -51,6 +51,19 @@ #include #endif +namespace lmms +{ + + +namespace gui +{ + +GuiApplication* getGUI() +{ + return GuiApplication::instance(); +} + + GuiApplication* GuiApplication::s_instance = nullptr; GuiApplication* GuiApplication::instance() @@ -58,10 +71,7 @@ GuiApplication* GuiApplication::instance() return s_instance; } -GuiApplication* getGUI() -{ - return GuiApplication::instance(); -} + GuiApplication::GuiApplication() { @@ -249,3 +259,8 @@ QFont GuiApplication::getWin32SystemFont() return QFont( QString::fromUtf8( metrics.lfMessageFont.lfFaceName ), pointSize ); } #endif + + +} // namespace gui + +} // namespace lmms diff --git a/src/gui/LadspaControlView.cpp b/src/gui/LadspaControlView.cpp index 9b539ff21..a82f2e33e 100644 --- a/src/gui/LadspaControlView.cpp +++ b/src/gui/LadspaControlView.cpp @@ -33,6 +33,9 @@ #include "TempoSyncKnob.h" +namespace lmms::gui +{ + LadspaControlView::LadspaControlView( QWidget * _parent, LadspaControl * _ctl ) : QWidget( _parent ), @@ -124,5 +127,4 @@ LadspaControlView::~LadspaControlView() - - +} // namespace lmms::gui diff --git a/src/gui/LfoControllerDialog.cpp b/src/gui/LfoControllerDialog.cpp index 672e22ed5..84a3451d8 100644 --- a/src/gui/LfoControllerDialog.cpp +++ b/src/gui/LfoControllerDialog.cpp @@ -32,6 +32,10 @@ #include "TempoSyncKnob.h" #include "PixmapButton.h" +namespace lmms::gui +{ + + const int CD_ENV_KNOBS_LBL_Y = 11; const int CD_KNOB_X_SPACING = 32; @@ -268,3 +272,4 @@ void LfoControllerDialog::modelChanged() } +} // namespace lmms::gui diff --git a/src/gui/LinkedModelGroupViews.cpp b/src/gui/LinkedModelGroupViews.cpp index 8cac826eb..80b08f384 100644 --- a/src/gui/LinkedModelGroupViews.cpp +++ b/src/gui/LinkedModelGroupViews.cpp @@ -29,6 +29,9 @@ #include "ControlLayout.h" #include "LinkedModelGroups.h" +namespace lmms::gui +{ + /* LinkedModelGroupViewBase @@ -169,3 +172,4 @@ void LinkedModelGroupsView::modelChanged(LinkedModelGroups *groups) } +} // namespace lmms::gui diff --git a/src/gui/LmmsPalette.cpp b/src/gui/LmmsPalette.cpp index e0b356d7a..769405d3e 100644 --- a/src/gui/LmmsPalette.cpp +++ b/src/gui/LmmsPalette.cpp @@ -28,6 +28,9 @@ #include "LmmsPalette.h" +namespace lmms::gui +{ + LmmsPalette::LmmsPalette( QWidget * parent, QStyle * stylearg ) : QWidget( parent ), @@ -90,4 +93,4 @@ QPalette LmmsPalette::palette() const } - +} // namespace lmms::gui diff --git a/src/gui/LmmsStyle.cpp b/src/gui/LmmsStyle.cpp index 2882b9572..ee62e613d 100644 --- a/src/gui/LmmsStyle.cpp +++ b/src/gui/LmmsStyle.cpp @@ -33,6 +33,11 @@ #include "LmmsStyle.h" + +namespace lmms::gui +{ + + QPalette * LmmsStyle::s_palette = nullptr; QLinearGradient getGradient( const QColor & _col, const QRectF & _rect ) @@ -368,3 +373,6 @@ void LmmsStyle::hoverColors( bool sunken, bool hover, bool active, QColor& color blend = QColor( 33, 33, 33 ); } } + + +} // namespace lmms::gui diff --git a/src/gui/Lv2ViewBase.cpp b/src/gui/Lv2ViewBase.cpp index 1ae12beed..7f7a06959 100644 --- a/src/gui/Lv2ViewBase.cpp +++ b/src/gui/Lv2ViewBase.cpp @@ -47,6 +47,8 @@ #include "SubWindow.h" +namespace lmms::gui +{ Lv2ViewProc::Lv2ViewProc(QWidget* parent, Lv2Proc* ctrlBase, int colNum) : @@ -248,4 +250,6 @@ AutoLilvNode Lv2ViewBase::uri(const char *uriStr) } +} // namespace lmms::gui + #endif // LMMS_HAVE_LV2 diff --git a/src/gui/MainApplication.cpp b/src/gui/MainApplication.cpp index 64aeb73a5..a08df0f09 100644 --- a/src/gui/MainApplication.cpp +++ b/src/gui/MainApplication.cpp @@ -31,6 +31,10 @@ #include "MainWindow.h" #include "Song.h" +namespace lmms::gui +{ + + MainApplication::MainApplication(int& argc, char** argv) : QApplication(argc, argv), m_queuedFile() @@ -102,3 +106,6 @@ bool MainApplication::nativeEventFilter(const QByteArray& eventType, return false; } #endif + + +} // namespace lmms::gui diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 2bb1ae599..bc917f53c 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -75,6 +75,9 @@ #include "lmmsversion.h" +namespace lmms::gui +{ + #if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) //Work around an issue on KDE5 as per https://bugs.kde.org/show_bug.cgi?id=337491#c21 void disableAutoKeyAccelerators(QWidget* mainWindow) @@ -1735,3 +1738,6 @@ void MainWindow::onProjectFileNameChanged() { this->resetWindowTitle(); } + + +} // namespace lmms::gui diff --git a/src/gui/MicrotunerConfig.cpp b/src/gui/MicrotunerConfig.cpp index 307369a19..dc0ef4a37 100644 --- a/src/gui/MicrotunerConfig.cpp +++ b/src/gui/MicrotunerConfig.cpp @@ -50,6 +50,9 @@ #include "Song.h" #include "SubWindow.h" +namespace lmms::gui +{ + MicrotunerConfig::MicrotunerConfig() : QWidget(), @@ -651,3 +654,6 @@ void MicrotunerConfig::closeEvent(QCloseEvent *ce) else {hide();} ce->ignore(); } + + +} // namespace lmms::gui diff --git a/src/gui/MidiCCRackView.cpp b/src/gui/MidiCCRackView.cpp index f7bf98e81..ac9e45244 100644 --- a/src/gui/MidiCCRackView.cpp +++ b/src/gui/MidiCCRackView.cpp @@ -38,6 +38,9 @@ #include "MainWindow.h" #include "SubWindow.h" +namespace lmms::gui +{ + MidiCCRackView::MidiCCRackView(InstrumentTrack * track) : QWidget(), @@ -130,3 +133,6 @@ void MidiCCRackView::saveSettings(QDomDocument & doc, QDomElement & parent) void MidiCCRackView::loadSettings(const QDomElement &) { } + + +} // namespace lmms::gui diff --git a/src/gui/MidiSetupWidget.cpp b/src/gui/MidiSetupWidget.cpp index 7298eb558..fed63f5bb 100644 --- a/src/gui/MidiSetupWidget.cpp +++ b/src/gui/MidiSetupWidget.cpp @@ -30,6 +30,11 @@ #include "ConfigManager.h" #include "gui_templates.h" + +namespace lmms::gui +{ + + MidiSetupWidget::MidiSetupWidget(const QString & caption, const QString & configSection, const QString & devName, QWidget * parent) : TabWidget(TabWidget::tr("Settings for %1").arg(tr(caption.toUtf8())), parent), @@ -65,3 +70,6 @@ void MidiSetupWidget::show() parentWidget()->setVisible(visible); QWidget::setVisible(visible); } + + +} // namespace lmms::gui diff --git a/src/gui/MixerLine.cpp b/src/gui/MixerLine.cpp index 6c0cc5bc3..bf63a9035 100644 --- a/src/gui/MixerLine.cpp +++ b/src/gui/MixerLine.cpp @@ -44,6 +44,10 @@ #include "SendButtonIndicator.h" #include "Song.h" +namespace lmms::gui +{ + + bool MixerLine::eventFilter( QObject *dist, QEvent *event ) { // If we are in a rename, capture the enter/return events and handle them @@ -456,3 +460,6 @@ void MixerLine::randomizeColor() Engine::getSong()->setModified(); update(); } + + +} // namespace lmms::gui diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index 15a24721f..0a24b32cc 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -46,6 +46,10 @@ #include "SubWindow.h" #include "TrackContainer.h" // For TrackContainer::TrackList typedef +namespace lmms::gui +{ + + MixerView::MixerView() : QWidget(), ModelView( nullptr, this ), @@ -618,3 +622,6 @@ void MixerView::updateFaders() } } } + + +} // namesapce lmms::gui diff --git a/src/gui/ModelView.cpp b/src/gui/ModelView.cpp index 055f0846d..4ccdffd72 100644 --- a/src/gui/ModelView.cpp +++ b/src/gui/ModelView.cpp @@ -26,6 +26,8 @@ #include "ModelView.h" +namespace lmms::gui +{ ModelView::ModelView( Model* model, QWidget* widget ) : @@ -94,3 +96,4 @@ void ModelView::doConnections() } +} // namespace lmms::gui diff --git a/src/gui/PeakControllerDialog.cpp b/src/gui/PeakControllerDialog.cpp index 923467d7e..62307fc7d 100644 --- a/src/gui/PeakControllerDialog.cpp +++ b/src/gui/PeakControllerDialog.cpp @@ -32,6 +32,9 @@ #include "PeakController.h" +namespace lmms::gui +{ + PeakControllerDialog::PeakControllerDialog( Controller * _model, QWidget * _parent ) : ControllerDialog( _model, _parent ) @@ -87,3 +90,4 @@ void PeakControllerDialog::modelChanged() } +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/PluginBrowser.cpp b/src/gui/PluginBrowser.cpp index 649d6bb56..2fd1374da 100644 --- a/src/gui/PluginBrowser.cpp +++ b/src/gui/PluginBrowser.cpp @@ -37,6 +37,9 @@ #include "StringPairDrag.h" #include "PluginFactory.h" +namespace lmms::gui +{ + PluginBrowser::PluginBrowser( QWidget * _parent ) : SideBarWidget( tr( "Instrument Plugins" ), @@ -285,9 +288,4 @@ void PluginDescWidget::mousePressEvent( QMouseEvent * _me ) } - - - - - - +} // namespace lmms::gui diff --git a/src/gui/ProjectNotes.cpp b/src/gui/ProjectNotes.cpp index 428720ee9..9a218c571 100644 --- a/src/gui/ProjectNotes.cpp +++ b/src/gui/ProjectNotes.cpp @@ -44,6 +44,9 @@ #include "Song.h" +namespace lmms::gui +{ + ProjectNotes::ProjectNotes() : QMainWindow( getGUI()->mainWindow()->workspace() ) @@ -409,3 +412,5 @@ void ProjectNotes::closeEvent( QCloseEvent * _ce ) } _ce->ignore(); } + +} // namespace lmms::gui diff --git a/src/gui/RowTableView.cpp b/src/gui/RowTableView.cpp index 9830354be..cef8b87ea 100644 --- a/src/gui/RowTableView.cpp +++ b/src/gui/RowTableView.cpp @@ -29,6 +29,10 @@ #include +namespace lmms::gui +{ + + class RowDelegate : public QStyledItemDelegate { public: @@ -135,5 +139,4 @@ void RowTableView::keyPressEvent( QKeyEvent * event ) } - - +} // namespace lmms::gui diff --git a/src/gui/SampleTrackWindow.cpp b/src/gui/SampleTrackWindow.cpp index 0ef22a01d..1aee88082 100644 --- a/src/gui/SampleTrackWindow.cpp +++ b/src/gui/SampleTrackWindow.cpp @@ -43,7 +43,10 @@ #include "SubWindow.h" #include "TabWidget.h" #include "TrackLabelButton.h" - + +namespace lmms::gui +{ + SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) : QWidget(), @@ -271,3 +274,6 @@ void SampleTrackWindow::loadSettings(const QDomElement& element) m_stv->m_tlb->setChecked(true); } } + + +} // namespace lmms::gui diff --git a/src/gui/SendButtonIndicator.cpp b/src/gui/SendButtonIndicator.cpp index 6772f6289..cd1996c45 100644 --- a/src/gui/SendButtonIndicator.cpp +++ b/src/gui/SendButtonIndicator.cpp @@ -5,6 +5,10 @@ #include "MixerLine.h" #include "MixerView.h" +namespace lmms::gui +{ + + QPixmap * SendButtonIndicator::s_qpmOff = nullptr; QPixmap * SendButtonIndicator::s_qpmOn = nullptr; @@ -62,3 +66,6 @@ void SendButtonIndicator::updateLightStatus() { setPixmap( getSendModel() == nullptr ? *s_qpmOff : *s_qpmOn ); } + + +} // namespace lmms::gui diff --git a/src/gui/SideBar.cpp b/src/gui/SideBar.cpp index 92b7d8884..4c6f6abd1 100644 --- a/src/gui/SideBar.cpp +++ b/src/gui/SideBar.cpp @@ -29,6 +29,9 @@ #include "SideBar.h" #include "SideBarWidget.h" +namespace lmms::gui +{ + // internal helper class allowing to create QToolButtons with // vertical orientation @@ -164,5 +167,4 @@ void SideBar::toggleButton( QAbstractButton * button ) } - - +} // namespace lmms::gui diff --git a/src/gui/SideBarWidget.cpp b/src/gui/SideBarWidget.cpp index ab827f8d1..600ed245c 100644 --- a/src/gui/SideBarWidget.cpp +++ b/src/gui/SideBarWidget.cpp @@ -30,6 +30,9 @@ #include "embed.h" +namespace lmms::gui +{ + SideBarWidget::SideBarWidget( const QString & _title, const QPixmap & _icon, QWidget * _parent ) : @@ -92,6 +95,4 @@ void SideBarWidget::resizeEvent( QResizeEvent * ) } - - - +} // namespace lmms::gui diff --git a/src/gui/StringPairDrag.cpp b/src/gui/StringPairDrag.cpp index 6aa5da170..e9eef0b88 100644 --- a/src/gui/StringPairDrag.cpp +++ b/src/gui/StringPairDrag.cpp @@ -35,6 +35,10 @@ #include "Clipboard.h" +namespace lmms::gui +{ + + StringPairDrag::StringPairDrag( const QString & _key, const QString & _value, const QPixmap & _icon, QWidget * _w ) : QDrag( _w ) @@ -111,3 +115,6 @@ QString StringPairDrag::decodeValue( QDropEvent * _de ) { return Clipboard::decodeValue( _de->mimeData() ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/SubWindow.cpp b/src/gui/SubWindow.cpp index df3fe0047..add614670 100644 --- a/src/gui/SubWindow.cpp +++ b/src/gui/SubWindow.cpp @@ -37,6 +37,8 @@ #include "embed.h" +namespace lmms::gui +{ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : @@ -378,3 +380,6 @@ void SubWindow::resizeEvent( QResizeEvent * event ) m_trackedNormalGeom.setSize( event->size() ); } } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/ToolPluginView.cpp b/src/gui/ToolPluginView.cpp index a85a7ff6d..de553519c 100644 --- a/src/gui/ToolPluginView.cpp +++ b/src/gui/ToolPluginView.cpp @@ -32,6 +32,9 @@ #include "GuiApplication.h" #include "MainWindow.h" +namespace lmms::gui +{ + ToolPluginView::ToolPluginView( ToolPlugin * _toolPlugin ) : PluginView( _toolPlugin, nullptr ) @@ -44,3 +47,4 @@ ToolPluginView::ToolPluginView( ToolPlugin * _toolPlugin ) : } +} // namespace lmms::gui diff --git a/src/gui/clips/AutomationClipView.cpp b/src/gui/clips/AutomationClipView.cpp index f11885893..b87e7e097 100644 --- a/src/gui/clips/AutomationClipView.cpp +++ b/src/gui/clips/AutomationClipView.cpp @@ -41,6 +41,9 @@ #include "Engine.h" +namespace lmms::gui +{ + QPixmap * AutomationClipView::s_clip_rec = nullptr; AutomationClipView::AutomationClipView( AutomationClip * _clip, @@ -508,3 +511,6 @@ void AutomationClipView::scaleTimemapToFit( float oldMin, float oldMax ) m_clip->generateTangents(); } + + +} // namespace lmms::gui diff --git a/src/gui/clips/ClipView.cpp b/src/gui/clips/ClipView.cpp index 1e154f155..12603b2e7 100644 --- a/src/gui/clips/ClipView.cpp +++ b/src/gui/clips/ClipView.cpp @@ -52,6 +52,9 @@ #include "TrackContainerView.h" #include "TrackView.h" +namespace lmms::gui +{ + /*! The width of the resize grip in pixels */ @@ -1502,3 +1505,6 @@ QColor ClipView::getColorForDisplay( QColor defaultColor ) // Return color to caller return c; } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/clips/MidiClipView.cpp b/src/gui/clips/MidiClipView.cpp index 987d1fe14..355363a01 100644 --- a/src/gui/clips/MidiClipView.cpp +++ b/src/gui/clips/MidiClipView.cpp @@ -37,6 +37,10 @@ #include "PianoRoll.h" #include "RenameDialog.h" +namespace lmms::gui +{ + + MidiClipView::MidiClipView( MidiClip* clip, TrackView* parent ) : ClipView( clip, parent ), m_clip( clip ), @@ -616,3 +620,6 @@ void MidiClipView::paintEvent( QPaintEvent * ) painter.drawPixmap( 0, 0, m_paintPixmap ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/clips/PatternClipView.cpp b/src/gui/clips/PatternClipView.cpp index f865f778b..3884b3eb6 100644 --- a/src/gui/clips/PatternClipView.cpp +++ b/src/gui/clips/PatternClipView.cpp @@ -35,6 +35,10 @@ #include "PatternStore.h" #include "RenameDialog.h" +namespace lmms::gui +{ + + PatternClipView::PatternClipView(Clip* _clip, TrackView* _tv) : ClipView( _clip, _tv ), m_patternClip(dynamic_cast(_clip)), @@ -188,3 +192,6 @@ void PatternClipView::update() ClipView::update(); } + + +} // namespace lmms::gui diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index 80b0e6ef2..d2fe7cbaa 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -35,6 +35,10 @@ #include "Song.h" #include "StringPairDrag.h" +namespace lmms::gui +{ + + SampleClipView::SampleClipView( SampleClip * _clip, TrackView * _tv ) : ClipView( _clip, _tv ), m_clip( _clip ), @@ -351,3 +355,6 @@ bool SampleClipView::splitClip( const TimePos pos ) } else { return false; } } + + +} // namespace lmms::gui diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index 998af4be8..8f8cdd570 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -62,6 +62,9 @@ #include "TimeLineWidget.h" +namespace lmms::gui +{ + QPixmap * AutomationEditor::s_toolDraw = nullptr; QPixmap * AutomationEditor::s_toolErase = nullptr; QPixmap * AutomationEditor::s_toolDrawOut = nullptr; @@ -147,10 +150,10 @@ AutomationEditor::AutomationEditor() : Song::Mode_PlayAutomationClip ), m_currentPosition, Song::Mode_PlayAutomationClip, this ); - connect( this, SIGNAL( positionChanged( const TimePos & ) ), - m_timeLine, SLOT( updatePosition( const TimePos & ) ) ); - connect( m_timeLine, SIGNAL( positionChanged( const TimePos & ) ), - this, SLOT( updatePosition( const TimePos & ) ) ); + connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), + m_timeLine, SLOT( updatePosition( const lmms::TimePos & ) ) ); + connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos & ) ), + this, SLOT( updatePosition( const lmms::TimePos & ) ) ); // init scrollbars m_leftRightScroll = new QScrollBar( Qt::Horizontal, this ); @@ -2107,3 +2110,6 @@ void AutomationEditorWindow::updateWindowTitle() setWindowTitle( tr( "Automation Editor - %1" ).arg( m_editor->m_clip->name() ) ); } + + +} // namespace lmms::gui diff --git a/src/gui/editors/Editor.cpp b/src/gui/editors/Editor.cpp index f9ab600bf..19f64a65c 100644 --- a/src/gui/editors/Editor.cpp +++ b/src/gui/editors/Editor.cpp @@ -33,6 +33,10 @@ #include +namespace lmms::gui +{ + + void Editor::setPauseIcon(bool displayPauseIcon) { // If we're playing, show a pause icon @@ -169,3 +173,4 @@ void DropToolBar::dropEvent(QDropEvent* event) +} // namespace lmms::gui diff --git a/src/gui/editors/PatternEditor.cpp b/src/gui/editors/PatternEditor.cpp index 818c454f6..86a116dd2 100644 --- a/src/gui/editors/PatternEditor.cpp +++ b/src/gui/editors/PatternEditor.cpp @@ -40,6 +40,8 @@ #include "MidiClip.h" +namespace lmms::gui +{ PatternEditor::PatternEditor(PatternStore* ps) : @@ -327,3 +329,6 @@ void PatternEditorWindow::stop() { Engine::getSong()->stop(); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index bafede415..fd1cd0480 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -73,11 +73,16 @@ #include "FileDialog.h" -using std::move; +namespace lmms +{ + typedef AutomationClip::timeMap timeMap; +namespace gui +{ + // some constants... const int INITIAL_PIANOROLL_WIDTH = 970; const int INITIAL_PIANOROLL_HEIGHT = 485; @@ -296,28 +301,28 @@ PianoRoll::PianoRoll() : Song::Mode_PlayMidiClip ), m_currentPosition, Song::Mode_PlayMidiClip, this ); - connect( this, SIGNAL( positionChanged( const TimePos & ) ), - m_timeLine, SLOT( updatePosition( const TimePos & ) ) ); - connect( m_timeLine, SIGNAL( positionChanged( const TimePos & ) ), - this, SLOT( updatePosition( const TimePos & ) ) ); + connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), + m_timeLine, SLOT( updatePosition( const lmms::TimePos & ) ) ); + connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos & ) ), + this, SLOT( updatePosition( const lmms::TimePos & ) ) ); // white position line follows timeline marker m_positionLine = new PositionLine(this); //update timeline when in step-recording mode - connect( &m_stepRecorderWidget, SIGNAL( positionChanged( const TimePos & ) ), - this, SLOT( updatePositionStepRecording( const TimePos & ) ) ); + connect( &m_stepRecorderWidget, SIGNAL( positionChanged( const lmms::TimePos & ) ), + this, SLOT( updatePositionStepRecording( const lmms::TimePos & ) ) ); // update timeline when in record-accompany mode connect( Engine::getSong()->getPlayPos( Song::Mode_PlaySong ).m_timeLine, - SIGNAL( positionChanged( const TimePos & ) ), + SIGNAL( positionChanged( const lmms::TimePos & ) ), this, - SLOT( updatePositionAccompany( const TimePos & ) ) ); + SLOT( updatePositionAccompany( const lmms::TimePos & ) ) ); // TODO /* connect( engine::getSong()->getPlayPos( Song::Mode_PlayPattern ).m_timeLine, - SIGNAL( positionChanged( const TimePos & ) ), + SIGNAL( positionChanged( const lmms::TimePos & ) ), this, - SLOT( updatePositionAccompany( const TimePos & ) ) );*/ + SLOT( updatePositionAccompany( const lmms::TimePos & ) ) );*/ removeSelection(); @@ -372,12 +377,12 @@ PianoRoll::PianoRoll() : for( int i = 0; i < NUM_EVEN_LENGTHS; ++i ) { auto loader = std::make_unique( "note_" + pixmaps[i] ); - m_noteLenModel.addItem( "1/" + QString::number( 1 << i ), ::move(loader) ); + m_noteLenModel.addItem( "1/" + QString::number( 1 << i ), std::move(loader) ); } for( int i = 0; i < NUM_TRIPLET_LENGTHS; ++i ) { auto loader = std::make_unique( "note_" + pixmaps[i+NUM_EVEN_LENGTHS] ); - m_noteLenModel.addItem( "1/" + QString::number( (1 << i) * 3 ), ::move(loader) ); + m_noteLenModel.addItem( "1/" + QString::number( (1 << i) * 3 ), std::move(loader) ); } m_noteLenModel.setValue( 0 ); @@ -908,10 +913,10 @@ void PianoRoll::setCurrentMidiClip( MidiClip* newMidiClip ) resizeEvent( nullptr ); // make sure to always get informed about the MIDI clip being destroyed - connect( m_midiClip, SIGNAL( destroyedMidiClip( MidiClip* ) ), this, SLOT( hideMidiClip( MidiClip* ) ) ); + connect( m_midiClip, SIGNAL( destroyedMidiClip( lmms::MidiClip* ) ), this, SLOT( hideMidiClip( lmms::MidiClip* ) ) ); - connect( m_midiClip->instrumentTrack(), SIGNAL( midiNoteOn( const Note& ) ), this, SLOT( startRecordNote( const Note& ) ) ); - connect( m_midiClip->instrumentTrack(), SIGNAL( midiNoteOff( const Note& ) ), this, SLOT( finishRecordNote( const Note& ) ) ); + connect( m_midiClip->instrumentTrack(), SIGNAL( midiNoteOn( const lmms::Note& ) ), this, SLOT( startRecordNote( const lmms::Note& ) ) ); + connect( m_midiClip->instrumentTrack(), SIGNAL( midiNoteOff( const lmms::Note& ) ), this, SLOT( finishRecordNote( const lmms::Note& ) ) ); connect( m_midiClip, SIGNAL(dataChanged()), this, SLOT(update())); connect( m_midiClip->instrumentTrack()->pianoModel(), SIGNAL( dataChanged() ), this, SLOT( update() ) ); @@ -5349,3 +5354,8 @@ void PianoRollWindow::updateStepRecordingIcon() m_toggleStepRecordingAction->setIcon(embed::getIconPixmap("record_step_off")); } } + + +} // namespace gui + +} // namespace lmms diff --git a/src/gui/editors/PositionLine.cpp b/src/gui/editors/PositionLine.cpp index c91a82abe..e340a1c8c 100644 --- a/src/gui/editors/PositionLine.cpp +++ b/src/gui/editors/PositionLine.cpp @@ -29,6 +29,9 @@ #include "Song.h" +namespace lmms::gui +{ + PositionLine::PositionLine(QWidget* parent) : QWidget(parent), m_hasTailGradient(false), @@ -95,3 +98,6 @@ void PositionLine::zoomChange(float zoom) update(); } + + +} // namespace lmms::gui diff --git a/src/gui/editors/Rubberband.cpp b/src/gui/editors/Rubberband.cpp index b0bd5cc06..c1ef329f0 100644 --- a/src/gui/editors/Rubberband.cpp +++ b/src/gui/editors/Rubberband.cpp @@ -26,6 +26,9 @@ #include "Rubberband.h" +namespace lmms::gui +{ + RubberBand::RubberBand( QWidget * _parent ) : QRubberBand( Rectangle, _parent ) @@ -90,8 +93,4 @@ QVector RubberBand::selectableObjects() const } - - - - - +} // namespace lmms::gui diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index c70705aaf..9c028feba 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -54,6 +54,10 @@ #include "TimeLineWidget.h" #include "TrackView.h" +namespace lmms::gui +{ + + const QVector SongEditor::m_zoomLevels = { 0.125f, 0.25f, 0.5f, 1.0f, 2.0f, 4.0f, 8.0f, 16.0f }; @@ -84,11 +88,11 @@ SongEditor::SongEditor( Song * song ) : m_song->m_playPos[Song::Mode_PlaySong], m_currentPosition, Song::Mode_PlaySong, this ); - connect( this, SIGNAL( positionChanged( const TimePos & ) ), + connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), m_song->m_playPos[Song::Mode_PlaySong].m_timeLine, - SLOT( updatePosition( const TimePos & ) ) ); - connect( m_timeLine, SIGNAL( positionChanged( const TimePos & ) ), - this, SLOT( updatePosition( const TimePos & ) ) ); + SLOT( updatePosition( const lmms::TimePos & ) ) ); + connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos & ) ), + this, SLOT( updatePosition( const lmms::TimePos & ) ) ); connect( m_timeLine, SIGNAL( regionSelectedFromPixels( int, int ) ), this, SLOT( selectRegionFromPixels( int, int ) ) ); connect( m_timeLine, SIGNAL( selectionFinished() ), @@ -1138,3 +1142,6 @@ void SongEditorWindow::adjustUiAfterProjectLoad() connect( qobject_cast( parentWidget() ), SIGNAL( focusLost() ), this, SLOT( lostFocus() ) ); m_editor->scrolled(0); } + + +} // namespace lmms::gui diff --git a/src/gui/editors/StepRecorderWidget.cpp b/src/gui/editors/StepRecorderWidget.cpp index 679901b0e..ffb45aa53 100644 --- a/src/gui/editors/StepRecorderWidget.cpp +++ b/src/gui/editors/StepRecorderWidget.cpp @@ -26,6 +26,9 @@ #include "TextFloat.h" #include "embed.h" +namespace lmms::gui +{ + StepRecorderWidget::StepRecorderWidget( QWidget * parent, const int ppb, @@ -168,3 +171,5 @@ void StepRecorderWidget::updateBoundaries() //(no need to change top and left as they are static) } + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/editors/TimeLineWidget.cpp b/src/gui/editors/TimeLineWidget.cpp index f5159d640..b7aa6d94f 100644 --- a/src/gui/editors/TimeLineWidget.cpp +++ b/src/gui/editors/TimeLineWidget.cpp @@ -36,6 +36,9 @@ #include "GuiApplication.h" #include "TextFloat.h" +namespace lmms::gui +{ + QPixmap * TimeLineWidget::s_posMarkerPixmap = nullptr; @@ -423,3 +426,6 @@ void TimeLineWidget::mouseReleaseEvent( QMouseEvent* event ) if ( m_action == SelectSongClip ) { emit selectionFinished(); } m_action = NoAction; } + + +} // namespace lmms::gui diff --git a/src/gui/editors/TrackContainerView.cpp b/src/gui/editors/TrackContainerView.cpp index 04034074e..6c85cf1a3 100644 --- a/src/gui/editors/TrackContainerView.cpp +++ b/src/gui/editors/TrackContainerView.cpp @@ -44,8 +44,36 @@ #include "GuiApplication.h" #include "PluginFactory.h" +namespace lmms +{ + using namespace std; + +InstrumentLoaderThread::InstrumentLoaderThread( QObject *parent, InstrumentTrack *it, QString name ) : + QThread( parent ), + m_it( it ), + m_name( name ) +{ + m_containerThread = thread(); +} + + + + +void InstrumentLoaderThread::run() +{ + Instrument *i = m_it->loadInstrument(m_name, nullptr, + true /*always DnD*/); + QObject *parent = i->parent(); + i->setParent( 0 ); + i->moveToThread( m_containerThread ); + i->setParent( parent ); +} + +namespace gui +{ + TrackContainerView::TrackContainerView( TrackContainer * _tc ) : QWidget(), ModelView( nullptr, this ), @@ -82,8 +110,8 @@ TrackContainerView::TrackContainerView( TrackContainer * _tc ) : connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), this, SLOT( realignTracks() ) ); - connect( m_tc, SIGNAL( trackAdded( Track * ) ), - this, SLOT( createTrackView( Track * ) ), + connect( m_tc, SIGNAL( trackAdded( lmms::Track * ) ), + this, SLOT( createTrackView( lmms::Track * ) ), Qt::QueuedConnection ); } @@ -123,9 +151,9 @@ TrackView * TrackContainerView::addTrackView( TrackView * _tv ) { m_trackViews.push_back( _tv ); m_scrollLayout->addWidget( _tv ); - connect( this, SIGNAL( positionChanged( const TimePos & ) ), + connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), _tv->getTrackContentWidget(), - SLOT( changePosition( const TimePos & ) ) ); + SLOT( changePosition( const lmms::TimePos & ) ) ); realignTracks(); return( _tv ); } @@ -480,25 +508,7 @@ void TrackContainerView::scrollArea::wheelEvent( QWheelEvent * _we ) } +} // namespace gui -InstrumentLoaderThread::InstrumentLoaderThread( QObject *parent, InstrumentTrack *it, QString name ) : - QThread( parent ), - m_it( it ), - m_name( name ) -{ - m_containerThread = thread(); -} - - - - -void InstrumentLoaderThread::run() -{ - Instrument *i = m_it->loadInstrument(m_name, nullptr, - true /*always DnD*/); - QObject *parent = i->parent(); - i->setParent( 0 ); - i->moveToThread( m_containerThread ); - i->setParent( parent ); -} +} // namespace lmms \ No newline at end of file diff --git a/src/gui/embed.cpp b/src/gui/embed.cpp index 6ce4b5bd7..d934adcde 100644 --- a/src/gui/embed.cpp +++ b/src/gui/embed.cpp @@ -28,7 +28,7 @@ #include #include "embed.h" -namespace embed +namespace lmms::embed { QPixmap getIconPixmap(const QString& pixmapName, @@ -86,6 +86,4 @@ QString getText( const char * name ) } -} - - +} // namespace lmms::embed diff --git a/src/gui/instrument/EnvelopeAndLfoView.cpp b/src/gui/instrument/EnvelopeAndLfoView.cpp index 3ca55c9a8..cff230e38 100644 --- a/src/gui/instrument/EnvelopeAndLfoView.cpp +++ b/src/gui/instrument/EnvelopeAndLfoView.cpp @@ -42,11 +42,17 @@ #include "TextFloat.h" #include "Track.h" +namespace lmms +{ extern const float SECS_PER_ENV_SEGMENT; extern const float SECS_PER_LFO_OSCILLATION; +namespace gui +{ + + const int ENV_GRAPH_X = 6; const int ENV_GRAPH_Y = 6; @@ -528,4 +534,6 @@ void EnvelopeAndLfoView::lfoUserWaveChanged() +} // namespace gui +} // namespace lmms \ No newline at end of file diff --git a/src/gui/instrument/InstrumentFunctionViews.cpp b/src/gui/instrument/InstrumentFunctionViews.cpp index c10b7d349..639e9e7c3 100644 --- a/src/gui/instrument/InstrumentFunctionViews.cpp +++ b/src/gui/instrument/InstrumentFunctionViews.cpp @@ -35,6 +35,9 @@ #include "TempoSyncKnob.h" +namespace lmms::gui +{ + InstrumentFunctionNoteStackingView::InstrumentFunctionNoteStackingView( InstrumentFunctionNoteStacking* cc, QWidget* parent ) : QWidget( parent ), ModelView( nullptr, this ), @@ -201,4 +204,4 @@ void InstrumentFunctionArpeggioView::modelChanged() - +} // namespace lmms::gui diff --git a/src/gui/instrument/InstrumentMidiIOView.cpp b/src/gui/instrument/InstrumentMidiIOView.cpp index c85ee75be..f42208b51 100644 --- a/src/gui/instrument/InstrumentMidiIOView.cpp +++ b/src/gui/instrument/InstrumentMidiIOView.cpp @@ -37,6 +37,9 @@ #include "LcdSpinBox.h" #include "MidiClient.h" +namespace lmms::gui +{ + InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : QWidget( parent ), @@ -206,3 +209,5 @@ void InstrumentMidiIOView::modelChanged() } } + +} // namespace lmms::gui diff --git a/src/gui/instrument/InstrumentMiscView.cpp b/src/gui/instrument/InstrumentMiscView.cpp index 5fcd4dc41..be79db788 100644 --- a/src/gui/instrument/InstrumentMiscView.cpp +++ b/src/gui/instrument/InstrumentMiscView.cpp @@ -36,6 +36,10 @@ #include "LedCheckBox.h" +namespace lmms::gui +{ + + InstrumentMiscView::InstrumentMiscView(InstrumentTrack *it, QWidget *parent) : QWidget(parent) { @@ -85,3 +89,6 @@ InstrumentMiscView::InstrumentMiscView(InstrumentTrack *it, QWidget *parent) : // Fill remaining space layout->addStretch(); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/instrument/InstrumentSoundShapingView.cpp b/src/gui/instrument/InstrumentSoundShapingView.cpp index 47dc389aa..dd5c14a09 100644 --- a/src/gui/instrument/InstrumentSoundShapingView.cpp +++ b/src/gui/instrument/InstrumentSoundShapingView.cpp @@ -34,6 +34,8 @@ #include "TabWidget.h" +namespace lmms::gui +{ const int TARGETS_TABWIDGET_X = 4; const int TARGETS_TABWIDGET_Y = 5; @@ -135,4 +137,5 @@ void InstrumentSoundShapingView::modelChanged() - + +} // namespace lmms::gui diff --git a/src/gui/instrument/InstrumentTrackWindow.cpp b/src/gui/instrument/InstrumentTrackWindow.cpp index 6c4acbfa1..a457acec8 100644 --- a/src/gui/instrument/InstrumentTrackWindow.cpp +++ b/src/gui/instrument/InstrumentTrackWindow.cpp @@ -69,6 +69,10 @@ #include "TrackLabelButton.h" +namespace lmms::gui +{ + + const int INSTRUMENT_WIDTH = 254; const int INSTRUMENT_HEIGHT = INSTRUMENT_WIDTH; const int PIANO_HEIGHT = 80; @@ -130,6 +134,17 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : basicControlsLayout->setVerticalSpacing(0); basicControlsLayout->setContentsMargins(0, 0, 0, 0); +#if QT_VERSION < 0x50C00 + // Workaround for a bug in Qt versions below 5.12, + // where argument-dependent-lookup fails for QFlags operators + // declared inside a namepsace. + // This affects the Q_DECLARE_OPERATORS_FOR_FLAGS macro in Instrument.h + // See also: https://codereview.qt-project.org/c/qt/qtbase/+/225348 + + using ::operator|; + +#endif + QString labelStyleSheet = "font-size: 6pt;"; Qt::Alignment labelAlignment = Qt::AlignHCenter | Qt::AlignTop; Qt::Alignment widgetAlignment = Qt::AlignHCenter | Qt::AlignCenter; @@ -679,3 +694,5 @@ void InstrumentTrackWindow::adjustTabSize(QWidget *w) w->setMinimumSize(INSTRUMENT_WIDTH - 4, INSTRUMENT_HEIGHT - 4 - 1); } + +} // namespace lmms::gui diff --git a/src/gui/instrument/InstrumentView.cpp b/src/gui/instrument/InstrumentView.cpp index eaa49df10..06f37feda 100644 --- a/src/gui/instrument/InstrumentView.cpp +++ b/src/gui/instrument/InstrumentView.cpp @@ -29,6 +29,8 @@ #include "InstrumentTrack.h" #include "InstrumentTrackWindow.h" +namespace lmms::gui +{ InstrumentView::InstrumentView( Instrument * _Instrument, QWidget * _parent ) : PluginView( _Instrument, _parent ) @@ -77,3 +79,5 @@ InstrumentViewFixedSize::~InstrumentViewFixedSize() { } + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/instrument/PianoView.cpp b/src/gui/instrument/PianoView.cpp index 78962d938..fa5594c68 100644 --- a/src/gui/instrument/PianoView.cpp +++ b/src/gui/instrument/PianoView.cpp @@ -56,6 +56,10 @@ #include "StringPairDrag.h" +namespace lmms::gui +{ + + /*! The scale of C Major - white keys only. */ Keys WhiteKeys[] = @@ -982,5 +986,5 @@ void PianoView::paintEvent( QPaintEvent * ) } - +} // namespace lmms::gui diff --git a/src/gui/menus/MidiPortMenu.cpp b/src/gui/menus/MidiPortMenu.cpp index 1cdb43f68..328efebd1 100644 --- a/src/gui/menus/MidiPortMenu.cpp +++ b/src/gui/menus/MidiPortMenu.cpp @@ -26,6 +26,8 @@ #include "MidiPortMenu.h" #include "gui_templates.h" +namespace lmms::gui +{ MidiPortMenu::MidiPortMenu( MidiPort::Modes _mode ) : @@ -99,6 +101,6 @@ void MidiPortMenu::updateMenu() } - +} // namespace lmms::gui diff --git a/src/gui/menus/RecentProjectsMenu.cpp b/src/gui/menus/RecentProjectsMenu.cpp index dc7b3bd2b..bbbf79e86 100644 --- a/src/gui/menus/RecentProjectsMenu.cpp +++ b/src/gui/menus/RecentProjectsMenu.cpp @@ -10,6 +10,10 @@ #include "GuiApplication.h" #include "MainWindow.h" +namespace lmms::gui +{ + + RecentProjectsMenu::RecentProjectsMenu(QWidget *parent) : QMenu(tr( "&Recently Opened Projects" ), parent) { @@ -76,3 +80,6 @@ void RecentProjectsMenu::openProject(QAction * _action ) mainWindow->setCursor( Qt::ArrowCursor ); } } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/menus/TemplatesMenu.cpp b/src/gui/menus/TemplatesMenu.cpp index 9f89e3a9f..1a1ef7c84 100644 --- a/src/gui/menus/TemplatesMenu.cpp +++ b/src/gui/menus/TemplatesMenu.cpp @@ -8,6 +8,11 @@ #include "GuiApplication.h" #include "MainWindow.h" + +namespace lmms::gui +{ + + TemplatesMenu::TemplatesMenu(QWidget *parent) : QMenu(tr("New from template"), parent) { @@ -67,3 +72,6 @@ void TemplatesMenu::addTemplatesFromDir( const QDir& dir ) { #endif } } + + +} // namespace lmms::gui diff --git a/src/gui/modals/AboutDialog.cpp b/src/gui/modals/AboutDialog.cpp index e3f016b5e..6c6b435eb 100644 --- a/src/gui/modals/AboutDialog.cpp +++ b/src/gui/modals/AboutDialog.cpp @@ -29,6 +29,8 @@ #include "versioninfo.h" +namespace lmms::gui +{ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), @@ -58,3 +60,5 @@ AboutDialog::AboutDialog(QWidget* parent) : involvedLabel->setPlainText( embed::getText( "CONTRIBUTORS" ) ); } + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/modals/ColorChooser.cpp b/src/gui/modals/ColorChooser.cpp index b25aa97be..d178debe5 100644 --- a/src/gui/modals/ColorChooser.cpp +++ b/src/gui/modals/ColorChooser.cpp @@ -24,6 +24,8 @@ #include +namespace lmms::gui +{ //! Set global palette via array, checking bounds @@ -91,3 +93,6 @@ QVector ColorChooser::nicePalette (int base) } return result; } + + +} // namespace lmms::gui diff --git a/src/gui/modals/ControllerConnectionDialog.cpp b/src/gui/modals/ControllerConnectionDialog.cpp index cab90a53f..008acbdb5 100644 --- a/src/gui/modals/ControllerConnectionDialog.cpp +++ b/src/gui/modals/ControllerConnectionDialog.cpp @@ -45,6 +45,9 @@ #include "embed.h" +namespace lmms +{ + class AutoDetectMidiController : public MidiController { public: @@ -121,6 +124,8 @@ private: +namespace gui +{ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, const AutomatableModel * _target_model ) : @@ -440,5 +445,6 @@ void ControllerConnectionDialog::enableAutoDetect( QAction * _a ) +} // namespace gui - +} // namespace lmms diff --git a/src/gui/modals/EffectSelectDialog.cpp b/src/gui/modals/EffectSelectDialog.cpp index b4bd3af4a..22f094827 100644 --- a/src/gui/modals/EffectSelectDialog.cpp +++ b/src/gui/modals/EffectSelectDialog.cpp @@ -34,6 +34,10 @@ #include +namespace lmms::gui +{ + + EffectSelectDialog::EffectSelectDialog( QWidget * _parent ) : QDialog( _parent ), ui( new Ui::EffectSelectDialog ), @@ -271,6 +275,4 @@ void EffectSelectDialog::updateSelection() } - - - +} // namespace lmms::gui diff --git a/src/gui/modals/EffectSelectDialog.ui b/src/gui/modals/EffectSelectDialog.ui index f8e773486..b0433e66c 100644 --- a/src/gui/modals/EffectSelectDialog.ui +++ b/src/gui/modals/EffectSelectDialog.ui @@ -24,7 +24,7 @@ - + 500 diff --git a/src/gui/modals/ExportProjectDialog.cpp b/src/gui/modals/ExportProjectDialog.cpp index 151d25237..fc9113b3f 100644 --- a/src/gui/modals/ExportProjectDialog.cpp +++ b/src/gui/modals/ExportProjectDialog.cpp @@ -31,6 +31,8 @@ #include "MainWindow.h" #include "OutputSettings.h" +namespace lmms::gui +{ ExportProjectDialog::ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export=false ) : @@ -294,3 +296,5 @@ void ExportProjectDialog::updateTitleBar( int _prog ) getGUI()->mainWindow()->setWindowTitle( tr( "Rendering: %1%" ).arg( _prog ) ); } + +} // namespace lmms::gui diff --git a/src/gui/modals/FileDialog.cpp b/src/gui/modals/FileDialog.cpp index 79f1ca5e0..321397f19 100644 --- a/src/gui/modals/FileDialog.cpp +++ b/src/gui/modals/FileDialog.cpp @@ -31,6 +31,10 @@ #include "FileDialog.h" +namespace lmms::gui +{ + + FileDialog::FileDialog( QWidget *parent, const QString &caption, const QString &directory, const QString &filter ) : QFileDialog( parent, caption, directory, filter ) @@ -105,3 +109,5 @@ void FileDialog::clearSelection() view->clearSelection(); } + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/modals/RenameDialog.cpp b/src/gui/modals/RenameDialog.cpp index cb427b2c0..76ae9d6bb 100644 --- a/src/gui/modals/RenameDialog.cpp +++ b/src/gui/modals/RenameDialog.cpp @@ -28,6 +28,8 @@ #include "RenameDialog.h" +namespace lmms::gui +{ RenameDialog::RenameDialog( QString & _string ) : @@ -80,3 +82,6 @@ void RenameDialog::textChanged( const QString & _new_string ) { m_stringToEdit = _new_string; } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/modals/SetupDialog.cpp b/src/gui/modals/SetupDialog.cpp index 035912a47..33cecedad 100644 --- a/src/gui/modals/SetupDialog.cpp +++ b/src/gui/modals/SetupDialog.cpp @@ -68,6 +68,10 @@ #include "MidiWinMM.h" +namespace lmms::gui +{ + + constexpr int BUFFERSIZE_RESOLUTION = 32; inline void labelWidget(QWidget * w, const QString & txt) @@ -1396,3 +1400,6 @@ void SetupDialog::showRestartWarning() { restartWarningLbl->show(); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/modals/VersionedSaveDialog.cpp b/src/gui/modals/VersionedSaveDialog.cpp index 1bdea502a..06a576ea9 100644 --- a/src/gui/modals/VersionedSaveDialog.cpp +++ b/src/gui/modals/VersionedSaveDialog.cpp @@ -34,6 +34,10 @@ #include "LedCheckBox.h" +namespace lmms::gui +{ + + VersionedSaveDialog::VersionedSaveDialog( QWidget *parent, QWidget *saveOptionsWidget, const QString &caption, @@ -189,3 +193,6 @@ SaveOptionsWidget::SaveOptionsWidget(Song::SaveOptions &saveOptions) { setLayout(layout); } + + +} // namespace lmms::gui diff --git a/src/gui/tracks/AutomationTrackView.cpp b/src/gui/tracks/AutomationTrackView.cpp index ec44ba937..60f00679b 100644 --- a/src/gui/tracks/AutomationTrackView.cpp +++ b/src/gui/tracks/AutomationTrackView.cpp @@ -23,8 +23,7 @@ * */ - #include "AutomationTrackView.h" - +#include "AutomationTrackView.h" #include "AutomationClip.h" #include "AutomationTrack.h" #include "embed.h" @@ -33,7 +32,9 @@ #include "StringPairDrag.h" #include "TrackContainerView.h" #include "TrackLabelButton.h" - + +namespace lmms::gui +{ AutomationTrackView::AutomationTrackView( AutomationTrack * _at, TrackContainerView* tcv ) : TrackView( _at, tcv ) @@ -87,3 +88,6 @@ void AutomationTrackView::dropEvent( QDropEvent * _de ) update(); } + + +} // namespace lmms::gui diff --git a/src/gui/tracks/FadeButton.cpp b/src/gui/tracks/FadeButton.cpp index c40569c21..d4b75cbf1 100644 --- a/src/gui/tracks/FadeButton.cpp +++ b/src/gui/tracks/FadeButton.cpp @@ -30,6 +30,9 @@ #include "FadeButton.h" +namespace lmms::gui +{ + const float FadeDuration = 300; @@ -164,3 +167,6 @@ QColor FadeButton::fadeToColor(QColor startCol, QColor endCol, QElapsedTimer tim return col; } + + +} // namespace lmms::gui diff --git a/src/gui/tracks/InstrumentTrackView.cpp b/src/gui/tracks/InstrumentTrackView.cpp index b58144956..b7a2fda61 100644 --- a/src/gui/tracks/InstrumentTrackView.cpp +++ b/src/gui/tracks/InstrumentTrackView.cpp @@ -48,6 +48,10 @@ #include "TrackLabelButton.h" +namespace lmms::gui +{ + + InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tcv ) : TrackView( _it, tcv ), m_window( nullptr ), @@ -384,3 +388,5 @@ QMenu * InstrumentTrackView::createMixerMenu(QString title, QString newMixerLabe return mixerMenu; } + +} // namespace lmms::gui diff --git a/src/gui/tracks/PatternTrackView.cpp b/src/gui/tracks/PatternTrackView.cpp index 7571cd1db..41195f5db 100644 --- a/src/gui/tracks/PatternTrackView.cpp +++ b/src/gui/tracks/PatternTrackView.cpp @@ -31,6 +31,9 @@ #include "PatternTrack.h" #include "TrackLabelButton.h" +namespace lmms::gui +{ + PatternTrackView::PatternTrackView(PatternTrack* pt, TrackContainerView* tcv) : TrackView(pt, tcv), m_patternTrack(pt) @@ -74,3 +77,6 @@ void PatternTrackView::clickedTrackLabel() getGUI()->patternEditor()->parentWidget()->show(); getGUI()->patternEditor()->setFocus(Qt::ActiveWindowFocusReason); } + + +} // namespace lmms::gui diff --git a/src/gui/tracks/SampleTrackView.cpp b/src/gui/tracks/SampleTrackView.cpp index a73724911..9897b3309 100644 --- a/src/gui/tracks/SampleTrackView.cpp +++ b/src/gui/tracks/SampleTrackView.cpp @@ -42,6 +42,10 @@ #include "TrackLabelButton.h" +namespace lmms::gui +{ + + SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) : TrackView( _t, tcv ) { @@ -232,3 +236,6 @@ void SampleTrackView::assignMixerLine(int channelIndex) getGUI()->mixerView()->setCurrentMixerLine(channelIndex); } + + +} // namespace lmms::gui diff --git a/src/gui/tracks/TrackContentWidget.cpp b/src/gui/tracks/TrackContentWidget.cpp index 36bbd4096..03e7487a6 100644 --- a/src/gui/tracks/TrackContentWidget.cpp +++ b/src/gui/tracks/TrackContentWidget.cpp @@ -44,6 +44,9 @@ #include "TrackView.h" +namespace lmms::gui +{ + /*! Alternate between a darker and a lighter background color every 4 bars */ const int BARS_PER_GROUP = 4; @@ -68,8 +71,8 @@ TrackContentWidget::TrackContentWidget( TrackView * parent ) : setAcceptDrops( true ); connect( parent->trackContainerView(), - SIGNAL( positionChanged( const TimePos & ) ), - this, SLOT( changePosition( const TimePos & ) ) ); + SIGNAL( positionChanged( const lmms::TimePos & ) ), + this, SLOT( changePosition( const lmms::TimePos & ) ) ); setStyle( QApplication::style() ); @@ -722,3 +725,6 @@ void TrackContentWidget::setGridColor( const QBrush & c ) //! \brief CSS theming qproperty access method void TrackContentWidget::setEmbossColor( const QBrush & c ) { m_embossColor = c; } + + +} // namespace lmms::gui diff --git a/src/gui/tracks/TrackLabelButton.cpp b/src/gui/tracks/TrackLabelButton.cpp index 3388fe9fb..6f3d13727 100644 --- a/src/gui/tracks/TrackLabelButton.cpp +++ b/src/gui/tracks/TrackLabelButton.cpp @@ -38,7 +38,8 @@ #include "TrackRenameLineEdit.h" #include "TrackView.h" - +namespace lmms::gui +{ TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : QToolButton( _parent ), @@ -240,3 +241,6 @@ QString TrackLabelButton::elideName( const QString &name ) QString elidedName = metrics.elidedText( name, Qt::ElideRight, maxTextWidth ); return elidedName; } + + +} // namespace lmms::gui diff --git a/src/gui/tracks/TrackOperationsWidget.cpp b/src/gui/tracks/TrackOperationsWidget.cpp index 4b56282a6..c529b26e8 100644 --- a/src/gui/tracks/TrackOperationsWidget.cpp +++ b/src/gui/tracks/TrackOperationsWidget.cpp @@ -47,6 +47,9 @@ #include "TrackContainerView.h" #include "TrackView.h" +namespace lmms::gui +{ + /*! \brief Create a new trackOperationsWidget * * The trackOperationsWidget is the grip and the mute button of a track. @@ -103,9 +106,9 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : m_soloBtn->show(); m_soloBtn->setToolTip(tr("Solo")); - connect( this, SIGNAL( trackRemovalScheduled( TrackView * ) ), + connect( this, SIGNAL( trackRemovalScheduled( lmms::gui::TrackView * ) ), m_trackView->trackContainerView(), - SLOT( deleteTrackView( TrackView * ) ), + SLOT( deleteTrackView( lmms::gui::TrackView * ) ), Qt::QueuedConnection ); connect( m_trackView->getTrack()->getMutedModel(), SIGNAL( dataChanged() ), @@ -391,3 +394,5 @@ void TrackOperationsWidget::recordingOff() toggleRecording( false ); } + +} // namespace lmms::gui diff --git a/src/gui/tracks/TrackRenameLineEdit.cpp b/src/gui/tracks/TrackRenameLineEdit.cpp index b68af3141..dab827ff9 100644 --- a/src/gui/tracks/TrackRenameLineEdit.cpp +++ b/src/gui/tracks/TrackRenameLineEdit.cpp @@ -30,6 +30,8 @@ #include +namespace lmms::gui +{ TrackRenameLineEdit::TrackRenameLineEdit( QWidget * parent ) : @@ -59,3 +61,6 @@ void TrackRenameLineEdit::keyPressEvent( QKeyEvent * ke ) QLineEdit::keyPressEvent( ke ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/tracks/TrackView.cpp b/src/gui/tracks/TrackView.cpp index 888af3c5f..61d598f6e 100644 --- a/src/gui/tracks/TrackView.cpp +++ b/src/gui/tracks/TrackView.cpp @@ -45,6 +45,9 @@ #include "ClipView.h" +namespace lmms::gui +{ + /*! \brief Create a new track View. * * The track View is handles the actual display of the track, including @@ -87,8 +90,8 @@ TrackView::TrackView( Track * track, TrackContainerView * tcv ) : connect( m_track, SIGNAL( destroyedTrack() ), this, SLOT( close() ) ); connect( m_track, - SIGNAL( clipAdded( Clip * ) ), - this, SLOT( createClipView( Clip * ) ), + SIGNAL( clipAdded( lmms::Clip * ) ), + this, SLOT( createClipView( lmms::Clip * ) ), Qt::QueuedConnection ); connect( &m_track->m_mutedModel, SIGNAL( dataChanged() ), @@ -446,3 +449,6 @@ void TrackView::setIndicatorMute(FadeButton* indicator, bool muted) QPalette::ColorRole role = muted ? QPalette::Highlight : QPalette::BrightText; indicator->setActiveColor(QApplication::palette().color(QPalette::Active, role)); } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/AutomatableButton.cpp b/src/gui/widgets/AutomatableButton.cpp index 80d127877..29af4af86 100644 --- a/src/gui/widgets/AutomatableButton.cpp +++ b/src/gui/widgets/AutomatableButton.cpp @@ -31,6 +31,8 @@ #include "StringPairDrag.h" +namespace lmms::gui +{ AutomatableButton::AutomatableButton( QWidget * _parent, const QString & _name ) : @@ -266,4 +268,4 @@ void automatableButtonGroup::updateButtons() - +} // namespace lmms::gui diff --git a/src/gui/widgets/AutomatableSlider.cpp b/src/gui/widgets/AutomatableSlider.cpp index f44732de1..b7af54b32 100644 --- a/src/gui/widgets/AutomatableSlider.cpp +++ b/src/gui/widgets/AutomatableSlider.cpp @@ -30,6 +30,8 @@ #include "CaptionMenu.h" +namespace lmms::gui +{ AutomatableSlider::AutomatableSlider( QWidget * _parent, @@ -140,5 +142,5 @@ void AutomatableSlider::updateSlider() - +} // namespace lmms::gui diff --git a/src/gui/widgets/CPULoadWidget.cpp b/src/gui/widgets/CPULoadWidget.cpp index 4cc6bca9f..01c36994e 100644 --- a/src/gui/widgets/CPULoadWidget.cpp +++ b/src/gui/widgets/CPULoadWidget.cpp @@ -32,6 +32,10 @@ #include "Engine.h" +namespace lmms::gui +{ + + CPULoadWidget::CPULoadWidget( QWidget * _parent ) : QWidget( _parent ), m_currentLoad( 0 ), @@ -102,7 +106,4 @@ void CPULoadWidget::updateCpuLoad() } - - - - +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/widgets/CaptionMenu.cpp b/src/gui/widgets/CaptionMenu.cpp index bfd743d0d..032ee10b9 100644 --- a/src/gui/widgets/CaptionMenu.cpp +++ b/src/gui/widgets/CaptionMenu.cpp @@ -26,6 +26,8 @@ #include "CaptionMenu.h" +namespace lmms::gui +{ CaptionMenu::CaptionMenu( const QString & _title, QWidget * _parent ) : @@ -41,3 +43,6 @@ CaptionMenu::CaptionMenu( const QString & _title, QWidget * _parent ) : CaptionMenu::~CaptionMenu() { } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/ComboBox.cpp b/src/gui/widgets/ComboBox.cpp index 181256b96..ab6b29b9d 100644 --- a/src/gui/widgets/ComboBox.cpp +++ b/src/gui/widgets/ComboBox.cpp @@ -36,6 +36,8 @@ #include "embed.h" #include "gui_templates.h" +namespace lmms::gui +{ QPixmap * ComboBox::s_background = nullptr; QPixmap * ComboBox::s_arrow = nullptr; @@ -249,6 +251,6 @@ void ComboBox::setItem( QAction* item ) } - +} // namespace lmms::gui diff --git a/src/gui/widgets/CustomTextKnob.cpp b/src/gui/widgets/CustomTextKnob.cpp index 149b3494b..9f6e19b90 100644 --- a/src/gui/widgets/CustomTextKnob.cpp +++ b/src/gui/widgets/CustomTextKnob.cpp @@ -1,5 +1,9 @@ #include "CustomTextKnob.h" +namespace lmms::gui +{ + + CustomTextKnob::CustomTextKnob( knobTypes _knob_num, QWidget * _parent, const QString & _name, const QString & _value_text ) : Knob( _knob_num, _parent, _name ), m_value_text( _value_text ) {} @@ -12,3 +16,6 @@ QString CustomTextKnob::displayValue() const { return m_description.trimmed() + m_value_text; } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/Fader.cpp b/src/gui/widgets/Fader.cpp index f569aa550..d063464a6 100644 --- a/src/gui/widgets/Fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -56,6 +56,9 @@ #include "ConfigManager.h" #include "TextFloat.h" +namespace lmms::gui +{ + TextFloat * Fader::s_textFloat = nullptr; QPixmap * Fader::s_back = nullptr; @@ -478,3 +481,6 @@ void Fader::setPeakYellow( const QColor & c ) { m_peakYellow = c; } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/widgets/Graph.cpp b/src/gui/widgets/Graph.cpp index 71e8375ee..ed0355a4c 100644 --- a/src/gui/widgets/Graph.cpp +++ b/src/gui/widgets/Graph.cpp @@ -30,6 +30,11 @@ #include "SampleBuffer.h" #include "Oscillator.h" +namespace lmms +{ + +namespace gui +{ Graph::Graph( QWidget * _parent, graphStyle _style, int _width, int _height ) : @@ -451,8 +456,10 @@ void Graph::updateGraph() } +} // namespace gui + graphModel::graphModel( float _min, float _max, int _length, - ::Model * _parent, bool _default_constructed, float _step ) : + Model* _parent, bool _default_constructed, float _step ) : Model( _parent, tr( "Graph" ), _default_constructed ), m_samples( _length ), m_length( _length ), @@ -744,6 +751,4 @@ void graphModel::drawSampleAt( int x, float val ) } - - - +} // namespace lmms diff --git a/src/gui/widgets/GroupBox.cpp b/src/gui/widgets/GroupBox.cpp index b8378d54f..b5187de25 100644 --- a/src/gui/widgets/GroupBox.cpp +++ b/src/gui/widgets/GroupBox.cpp @@ -34,6 +34,9 @@ #include "gui_templates.h" +namespace lmms::gui +{ + GroupBox::GroupBox( const QString & _caption, QWidget * _parent ) : QWidget( _parent ), @@ -101,3 +104,6 @@ void GroupBox::paintEvent( QPaintEvent * pe ) p.setFont( pointSize<8>( font() ) ); p.drawText( 22, m_titleBarHeight, m_caption ); } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/Knob.cpp b/src/gui/widgets/Knob.cpp index 96ef6fec8..f6a1163a7 100644 --- a/src/gui/widgets/Knob.cpp +++ b/src/gui/widgets/Knob.cpp @@ -48,6 +48,10 @@ #include "StringPairDrag.h" #include "TextFloat.h" + +namespace lmms::gui +{ + TextFloat * Knob::s_textFloat = nullptr; @@ -864,3 +868,6 @@ void convertPixmapToGrayScale(QPixmap& pixMap) } pixMap.convertFromImage(temp); } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/LcdFloatSpinBox.cpp b/src/gui/widgets/LcdFloatSpinBox.cpp index 22b4d5509..4112c567b 100644 --- a/src/gui/widgets/LcdFloatSpinBox.cpp +++ b/src/gui/widgets/LcdFloatSpinBox.cpp @@ -43,6 +43,9 @@ #include "gui_templates.h" #include "MainWindow.h" +namespace lmms::gui +{ + LcdFloatSpinBox::LcdFloatSpinBox(int numWhole, int numFrac, const QString& name, QWidget* parent) : FloatModelView(new FloatModel(0, 0, 0, 0, nullptr, name, true), this), @@ -241,3 +244,6 @@ void LcdFloatSpinBox::paintEvent(QPaintEvent*) p.drawText(width() / 2 - p.fontMetrics().width(m_label) / 2, height() - 1, m_label); } } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/LcdSpinBox.cpp b/src/gui/widgets/LcdSpinBox.cpp index ef0d08aae..7dd7fa8e8 100644 --- a/src/gui/widgets/LcdSpinBox.cpp +++ b/src/gui/widgets/LcdSpinBox.cpp @@ -31,6 +31,8 @@ #include "CaptionMenu.h" +namespace lmms::gui +{ LcdSpinBox::LcdSpinBox( int numDigits, QWidget* parent, const QString& name ) : LcdWidget( numDigits, parent, name ), @@ -169,3 +171,4 @@ void LcdSpinBox::enterValue() } } +} // namespace lmms::gui diff --git a/src/gui/widgets/LcdWidget.cpp b/src/gui/widgets/LcdWidget.cpp index c947f7720..a21536bf7 100644 --- a/src/gui/widgets/LcdWidget.cpp +++ b/src/gui/widgets/LcdWidget.cpp @@ -34,7 +34,8 @@ #include "gui_templates.h" - +namespace lmms::gui +{ LcdWidget::LcdWidget(QWidget* parent, const QString& name, bool leadingZero) : LcdWidget(1, parent, name, leadingZero) @@ -290,3 +291,4 @@ void LcdWidget::initUi(const QString& name , const QString& style) updateSize(); } +} // namespace lmms::gui diff --git a/src/gui/widgets/LedCheckBox.cpp b/src/gui/widgets/LedCheckBox.cpp index 832d7da46..f31d03b2c 100644 --- a/src/gui/widgets/LedCheckBox.cpp +++ b/src/gui/widgets/LedCheckBox.cpp @@ -31,6 +31,9 @@ #include "embed.h" #include "gui_templates.h" +namespace lmms::gui +{ + static const QString names[LedCheckBox::NumColors] = { @@ -127,6 +130,4 @@ void LedCheckBox::onTextUpdated() } - - - +} // namespace lmms::gui diff --git a/src/gui/widgets/LeftRightNav.cpp b/src/gui/widgets/LeftRightNav.cpp index a76b4ec6d..30f7106d3 100644 --- a/src/gui/widgets/LeftRightNav.cpp +++ b/src/gui/widgets/LeftRightNav.cpp @@ -28,6 +28,9 @@ #include "LeftRightNav.h" #include "embed.h" +namespace lmms::gui +{ + LeftRightNav::LeftRightNav(QWidget *parent) : QWidget(parent), @@ -90,3 +93,6 @@ void LeftRightNav::setShortcuts(const QKeySequence &leftShortcut, const QKeySequ m_leftBtn.setToolTip(tr("Previous (%1)").arg(leftShortcut.toString())); m_rightBtn.setToolTip(tr("Next (%1)").arg(rightShortcut.toString())); } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/MeterDialog.cpp b/src/gui/widgets/MeterDialog.cpp index deeeb0599..f60f6bd06 100644 --- a/src/gui/widgets/MeterDialog.cpp +++ b/src/gui/widgets/MeterDialog.cpp @@ -33,6 +33,9 @@ #include "gui_templates.h" #include "LcdSpinBox.h" +namespace lmms::gui +{ + MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) : QWidget( _parent ), @@ -114,3 +117,5 @@ void MeterDialog::modelChanged() m_denominator->setModel( &mm->denominatorModel() ); } + +} // namespace lmms::gui diff --git a/src/gui/widgets/MixerLineLcdSpinBox.cpp b/src/gui/widgets/MixerLineLcdSpinBox.cpp index bdf8ac8f9..06eb823c0 100644 --- a/src/gui/widgets/MixerLineLcdSpinBox.cpp +++ b/src/gui/widgets/MixerLineLcdSpinBox.cpp @@ -29,6 +29,10 @@ #include "GuiApplication.h" #include "TrackView.h" +namespace lmms::gui +{ + + void MixerLineLcdSpinBox::setTrackView(TrackView * tv) { m_tv = tv; @@ -64,3 +68,6 @@ void MixerLineLcdSpinBox::contextMenuEvent(QContextMenuEvent* event) addDefaultActions(contextMenu); contextMenu->exec(QCursor::pos()); } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/NStateButton.cpp b/src/gui/widgets/NStateButton.cpp index 41832138b..4fbcc0d65 100644 --- a/src/gui/widgets/NStateButton.cpp +++ b/src/gui/widgets/NStateButton.cpp @@ -28,6 +28,9 @@ #include "NStateButton.h" +namespace lmms::gui +{ + NStateButton::NStateButton( QWidget * _parent ) : ToolButton( _parent ), @@ -92,3 +95,6 @@ void NStateButton::mousePressEvent( QMouseEvent * _me ) } ToolButton::mousePressEvent( _me ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/widgets/Oscilloscope.cpp b/src/gui/widgets/Oscilloscope.cpp index 30296b805..cd028f637 100644 --- a/src/gui/widgets/Oscilloscope.cpp +++ b/src/gui/widgets/Oscilloscope.cpp @@ -36,6 +36,9 @@ #include "embed.h" #include "BufferManager.h" +namespace lmms::gui +{ + Oscilloscope::Oscilloscope( QWidget * _p ) : QWidget( _p ), @@ -91,8 +94,8 @@ void Oscilloscope::setActive( bool _active ) SIGNAL( periodicUpdate() ), this, SLOT( update() ) ); connect( Engine::audioEngine(), - SIGNAL( nextAudioBuffer( const surroundSampleFrame* ) ), - this, SLOT( updateAudioBuffer( const surroundSampleFrame* ) ) ); + SIGNAL( nextAudioBuffer( const lmms::surroundSampleFrame* ) ), + this, SLOT( updateAudioBuffer( const lmms::surroundSampleFrame* ) ) ); } else { @@ -100,8 +103,8 @@ void Oscilloscope::setActive( bool _active ) SIGNAL( periodicUpdate() ), this, SLOT( update() ) ); disconnect( Engine::audioEngine(), - SIGNAL( nextAudioBuffer( const surroundSampleFrame* ) ), - this, SLOT( updateAudioBuffer( const surroundSampleFrame* ) ) ); + SIGNAL( nextAudioBuffer( const lmms::surroundSampleFrame* ) ), + this, SLOT( updateAudioBuffer( const lmms::surroundSampleFrame* ) ) ); // we have to update (remove last waves), // because timer doesn't do that anymore update(); @@ -204,4 +207,4 @@ QColor const & Oscilloscope::determineLineColor(float level) const } - +} // namespace lmms::gui diff --git a/src/gui/widgets/PixmapButton.cpp b/src/gui/widgets/PixmapButton.cpp index 9bedfe1b5..938322b51 100644 --- a/src/gui/widgets/PixmapButton.cpp +++ b/src/gui/widgets/PixmapButton.cpp @@ -30,6 +30,8 @@ #include "PixmapButton.h" #include "embed.h" +namespace lmms::gui +{ PixmapButton::PixmapButton( QWidget * _parent, const QString & _name ) : @@ -142,6 +144,4 @@ QSize PixmapButton::sizeHint() const } - - - +} // namespace lmms::gui diff --git a/src/gui/widgets/TabBar.cpp b/src/gui/widgets/TabBar.cpp index 30822c85f..007f78194 100644 --- a/src/gui/widgets/TabBar.cpp +++ b/src/gui/widgets/TabBar.cpp @@ -28,6 +28,9 @@ #include "gui_templates.h" +namespace lmms::gui +{ + TabBar::TabBar( QWidget * _parent, QBoxLayout::Direction _dir ) : QWidget( _parent ), @@ -229,9 +232,4 @@ bool TabBar::allHidden() } - - - - - - +} // namespace lmms::gui diff --git a/src/gui/widgets/TabWidget.cpp b/src/gui/widgets/TabWidget.cpp index 07889c331..8899625fc 100644 --- a/src/gui/widgets/TabWidget.cpp +++ b/src/gui/widgets/TabWidget.cpp @@ -35,6 +35,9 @@ #include "embed.h" #include "gui_templates.h" +namespace lmms::gui +{ + TabWidget::TabWidget(const QString & caption, QWidget * parent, bool usePixmap, bool resizable) : QWidget( parent ), @@ -415,3 +418,6 @@ void TabWidget::setTabBorder( const QColor & c ) { m_tabBorder = c; } + + +} // namespace lmms::gui diff --git a/src/gui/widgets/TempoSyncKnob.cpp b/src/gui/widgets/TempoSyncKnob.cpp index bb4faea26..47da424d4 100644 --- a/src/gui/widgets/TempoSyncKnob.cpp +++ b/src/gui/widgets/TempoSyncKnob.cpp @@ -37,6 +37,10 @@ #include "SubWindow.h" +namespace lmms::gui +{ + + TempoSyncKnob::TempoSyncKnob( knobTypes _knob_num, QWidget * _parent, const QString & _name ) : @@ -71,7 +75,7 @@ void TempoSyncKnob::modelChanged() { m_custom->setModel( &model()->m_custom ); } - connect( model(), SIGNAL( syncModeChanged( TempoSyncMode ) ), + connect( model(), SIGNAL( syncModeChanged( lmms::TempoSyncKnobModel::TempoSyncMode ) ), this, SLOT( updateDescAndIcon() ) ); connect( this, SIGNAL( sliderMoved( float ) ), model(), SLOT( disableSync() ) ); @@ -308,4 +312,4 @@ void TempoSyncKnob::showCustom() - +} // namespace lmms::gui diff --git a/src/gui/widgets/TextFloat.cpp b/src/gui/widgets/TextFloat.cpp index 5a93b55c6..a43c91c80 100644 --- a/src/gui/widgets/TextFloat.cpp +++ b/src/gui/widgets/TextFloat.cpp @@ -31,6 +31,9 @@ #include "GuiApplication.h" #include "MainWindow.h" +namespace lmms::gui +{ + TextFloat::TextFloat() : QWidget( getGUI()->mainWindow(), Qt::ToolTip ), @@ -199,4 +202,4 @@ void TextFloat::updateSize() - +} // namespace lmms::gui diff --git a/src/gui/widgets/TimeDisplayWidget.cpp b/src/gui/widgets/TimeDisplayWidget.cpp index bde9e7dfe..c2cd11b1b 100644 --- a/src/gui/widgets/TimeDisplayWidget.cpp +++ b/src/gui/widgets/TimeDisplayWidget.cpp @@ -31,6 +31,8 @@ #include "Song.h" +namespace lmms::gui +{ TimeDisplayWidget::TimeDisplayWidget() : QWidget(), @@ -127,3 +129,5 @@ void TimeDisplayWidget::mousePressEvent( QMouseEvent* mouseEvent ) } } } + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/widgets/ToolButton.cpp b/src/gui/widgets/ToolButton.cpp index 6dea411d8..4feb038f0 100644 --- a/src/gui/widgets/ToolButton.cpp +++ b/src/gui/widgets/ToolButton.cpp @@ -25,6 +25,9 @@ #include "ToolButton.h" +namespace lmms::gui +{ + ToolButton::ToolButton( const QPixmap & _pixmap, const QString & _tooltip, QObject * _receiver, const char * _slot, @@ -40,3 +43,6 @@ ToolButton::ToolButton( const QPixmap & _pixmap, const QString & _tooltip, setToolTip(_tooltip); setIcon( _pixmap ); } + + +} // namespace lmms::gui \ No newline at end of file diff --git a/src/tracks/AutomationTrack.cpp b/src/tracks/AutomationTrack.cpp index 65d34b884..d7e7f33c1 100644 --- a/src/tracks/AutomationTrack.cpp +++ b/src/tracks/AutomationTrack.cpp @@ -29,6 +29,9 @@ #include "AutomationTrackView.h" #include "AutomationClip.h" +namespace lmms +{ + AutomationTrack::AutomationTrack( TrackContainer* tc, bool _hidden ) : Track( _hidden ? HiddenAutomationTrack : Track::AutomationTrack, tc ) @@ -45,9 +48,9 @@ bool AutomationTrack::play( const TimePos & time_start, const fpp_t _frames, -TrackView * AutomationTrack::createView( TrackContainerView* tcv ) +gui::TrackView* AutomationTrack::createView( gui::TrackContainerView* tcv ) { - return new AutomationTrackView( this, tcv ); + return new gui::AutomationTrackView( this, tcv ); } @@ -79,3 +82,6 @@ void AutomationTrack::loadTrackSpecificSettings( const QDomElement & _this ) setMuted( false ); } } + + +} // namespace lmms diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 2aadfcab2..000318d7b 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -40,6 +40,9 @@ #include "Pitch.h" #include "Song.h" +namespace lmms +{ + InstrumentTrack::InstrumentTrack( TrackContainer* tc ) : Track( Track::InstrumentTrack, tc ), @@ -691,7 +694,7 @@ bool InstrumentTrack::play( const TimePos & _start, const fpp_t _frames, const float frames_per_tick = Engine::framesPerTick(); clipVector clips; - ::PatternTrack * pattern_track = nullptr; + class PatternTrack * pattern_track = nullptr; if( _clip_num >= 0 ) { Clip * clip = getClip( _clip_num ); @@ -796,9 +799,9 @@ Clip* InstrumentTrack::createClip(const TimePos & pos) -TrackView * InstrumentTrack::createView( TrackContainerView* tcv ) +gui::TrackView* InstrumentTrack::createView( gui::TrackContainerView* tcv ) { - return new InstrumentTrackView( this, tcv ); + return new gui::InstrumentTrackView( this, tcv ); } @@ -1075,3 +1078,5 @@ void InstrumentTrack::autoAssignMidiDevice(bool assign) } } + +} // namespace lmms diff --git a/src/tracks/MidiClip.cpp b/src/tracks/MidiClip.cpp index 7a5fb657d..ef693ba5b 100644 --- a/src/tracks/MidiClip.cpp +++ b/src/tracks/MidiClip.cpp @@ -35,10 +35,13 @@ -QPixmap * MidiClipView::s_stepBtnOn0 = nullptr; -QPixmap * MidiClipView::s_stepBtnOn200 = nullptr; -QPixmap * MidiClipView::s_stepBtnOff = nullptr; -QPixmap * MidiClipView::s_stepBtnOffLight = nullptr; +namespace lmms +{ + +QPixmap * gui::MidiClipView::s_stepBtnOn0 = nullptr; +QPixmap * gui::MidiClipView::s_stepBtnOn200 = nullptr; +QPixmap * gui::MidiClipView::s_stepBtnOff = nullptr; +QPixmap * gui::MidiClipView::s_stepBtnOffLight = nullptr; @@ -197,9 +200,9 @@ TimePos MidiClip::beatClipLength() const Note * MidiClip::addNote( const Note & _new_note, const bool _quant_pos ) { Note * new_note = new Note( _new_note ); - if( _quant_pos && getGUI()->pianoRoll() ) + if (_quant_pos && gui::getGUI()->pianoRoll()) { - new_note->quantizePos( getGUI()->pianoRoll()->quantization() ); + new_note->quantizePos(gui::getGUI()->pianoRoll()->quantization()); } instrumentTrack()->lock(); @@ -551,9 +554,9 @@ void MidiClip::removeSteps() -ClipView * MidiClip::createView( TrackView * _tv ) +gui::ClipView * MidiClip::createView( gui::TrackView * _tv ) { - return new MidiClipView( this, _tv ); + return new gui::MidiClipView( this, _tv ); } @@ -566,11 +569,11 @@ void MidiClip::updatePatternTrack() Engine::patternStore()->updatePatternTrack(this); } - if( getGUI() != nullptr - && getGUI()->pianoRoll() - && getGUI()->pianoRoll()->currentMidiClip() == this ) + if (gui::getGUI() != nullptr + && gui::getGUI()->pianoRoll() + && gui::getGUI()->pianoRoll()->currentMidiClip() == this) { - getGUI()->pianoRoll()->update(); + gui::getGUI()->pianoRoll()->update(); } } @@ -610,3 +613,6 @@ void MidiClip::changeTimeSignature() last_pos.getBar() * TimePos::stepsPerBar() ); updateLength(); } + + +} // namespace lmms diff --git a/src/tracks/PatternTrack.cpp b/src/tracks/PatternTrack.cpp index 243c9d3af..df7766c57 100644 --- a/src/tracks/PatternTrack.cpp +++ b/src/tracks/PatternTrack.cpp @@ -33,6 +33,9 @@ #include "PlayHandle.h" +namespace lmms +{ + PatternTrack::infoMap PatternTrack::s_infoMap; @@ -126,9 +129,9 @@ bool PatternTrack::play( const TimePos & _start, const fpp_t _frames, -TrackView* PatternTrack::createView(TrackContainerView* tcv) +gui::TrackView* PatternTrack::createView(gui::TrackContainerView* tcv) { - return new PatternTrackView(this, tcv); + return new gui::PatternTrackView(this, tcv); } @@ -240,3 +243,6 @@ void PatternTrack::swapPatternTracks(Track* track1, Track* track2) Engine::patternStore()->setCurrentPattern(s_infoMap[t1]); } } + + +} // namespace lmms \ No newline at end of file diff --git a/src/tracks/SampleTrack.cpp b/src/tracks/SampleTrack.cpp index b1fd4c406..caed04739 100644 --- a/src/tracks/SampleTrack.cpp +++ b/src/tracks/SampleTrack.cpp @@ -40,6 +40,9 @@ #include "volume.h" +namespace lmms +{ + SampleTrack::SampleTrack(TrackContainer* tc) : Track(Track::SampleTrack, tc), @@ -73,8 +76,9 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, m_audioPort.effects()->startRunning(); bool played_a_note = false; // will be return variable + clipVector clips; - ::PatternTrack * pattern_track = nullptr; + class PatternTrack * pattern_track = nullptr; if( _clip_num >= 0 ) { if (_start > getClip(_clip_num)->length()) @@ -166,9 +170,9 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames, -TrackView * SampleTrack::createView( TrackContainerView* tcv ) +gui::TrackView * SampleTrack::createView( gui::TrackContainerView* tcv ) { - return new SampleTrackView( this, tcv ); + return new gui::SampleTrackView( this, tcv ); } @@ -249,3 +253,6 @@ void SampleTrack::updateMixerChannel() { m_audioPort.setNextMixerChannel( m_mixerChannelModel.value() ); } + + +} // namespace lmms diff --git a/tests/check-strings/check-strings b/tests/check-strings/check-strings index d5b0260db..5504cc588 100755 --- a/tests/check-strings/check-strings +++ b/tests/check-strings/check-strings @@ -91,6 +91,21 @@ for c in sorted(classes_found): caption('themes') + +GUI_NAMESPACE_PREFIX = "lmms--gui" + + +def unscope_classname(stylesheet, cname): + # Strip the namespace part from the given class name, + # while expecting it to have one in the first place. + SCOPE_TOKEN = "--" + i = cname.rfind(SCOPE_TOKEN) + len(SCOPE_TOKEN) + + assert i>=0 + + return cname[i:] + + for theme in sorted([d for d in Path('data/themes').iterdir() if d.is_dir()]): classes_in_sheet = set() stylesheet = theme / 'style.css' @@ -101,7 +116,10 @@ for theme in sorted([d for d in Path('data/themes').iterdir() if d.is_dir()]): for c in rule.prelude: if c.type == 'ident' and not class_found: if is_our_class(c.value): - classes_in_sheet.add(c.value) + if str(c.value).startswith(GUI_NAMESPACE_PREFIX): + classes_in_sheet.add(unscope_classname(stylesheet, c.value)) + else: + error(str(stylesheet), f"Namespace prefix missing from class {c.value}") class_found = True # After whitespace or comma comes a new class elif c.type == 'whitespace' or (c.type == 'literal' and c.value == ','): diff --git a/tests/main.cpp b/tests/main.cpp index b2c21b79a..6d375e6c6 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -9,7 +9,7 @@ int main(int argc, char* argv[]) { new QCoreApplication(argc, argv); - Engine::init(true); + lmms::Engine::init(true); int numsuites = QTestSuite::suites().size(); qDebug() << ">> Will run" << numsuites << "test suites"; diff --git a/tests/src/core/AutomatableModelTest.cpp b/tests/src/core/AutomatableModelTest.cpp index d84d89db4..78b9069b5 100644 --- a/tests/src/core/AutomatableModelTest.cpp +++ b/tests/src/core/AutomatableModelTest.cpp @@ -43,6 +43,8 @@ private slots: // tests //! but no downcast or any other casts void CastTests() { + using namespace lmms; + ComboBoxModel comboModel; AutomatableModel* amPtr = &comboModel; QVERIFY(nullptr == amPtr->dynamicCast()); // not a parent class @@ -60,6 +62,8 @@ private slots: // tests void LinkTests() { + using namespace lmms; + BoolModel m1(false), m2(false); QObject::connect(&m1, SIGNAL(dataChanged()), diff --git a/tests/src/core/ProjectVersionTest.cpp b/tests/src/core/ProjectVersionTest.cpp index e52088f6f..2d066dca5 100644 --- a/tests/src/core/ProjectVersionTest.cpp +++ b/tests/src/core/ProjectVersionTest.cpp @@ -32,6 +32,8 @@ class ProjectVersionTest : QTestSuite private slots: void ProjectVersionComparisonTests() { + using namespace lmms; + QVERIFY(ProjectVersion("1.1.0", ProjectVersion::Minor) > "1.0.3"); QVERIFY(ProjectVersion("1.1.0", ProjectVersion::Major) < "2.1.0"); QVERIFY(ProjectVersion("1.1.0", ProjectVersion::Release) > "0.2.1"); diff --git a/tests/src/core/RelativePathsTest.cpp b/tests/src/core/RelativePathsTest.cpp index 3f1712e1b..3b5d023d0 100644 --- a/tests/src/core/RelativePathsTest.cpp +++ b/tests/src/core/RelativePathsTest.cpp @@ -36,6 +36,8 @@ class RelativePathsTest : QTestSuite private slots: void PathUtilComparisonTests() { + using namespace lmms; + QFileInfo fi(ConfigManager::inst()->factorySamplesDir() + "/drums/kick01.ogg"); QVERIFY(fi.exists()); diff --git a/tests/src/tracks/AutomationTrackTest.cpp b/tests/src/tracks/AutomationTrackTest.cpp index 5adafbb0f..2bf875992 100644 --- a/tests/src/tracks/AutomationTrackTest.cpp +++ b/tests/src/tracks/AutomationTrackTest.cpp @@ -49,6 +49,8 @@ private slots: void testClipLinear() { + using namespace lmms; + AutomationClip c(nullptr); c.setProgressionType(AutomationClip::LinearProgression); c.putValue(0, 0.0, false); @@ -64,6 +66,8 @@ private slots: void testClipDiscrete() { + using namespace lmms; + AutomationClip c(nullptr); c.setProgressionType(AutomationClip::DiscreteProgression); c.putValue(0, 0.0, false); @@ -77,6 +81,8 @@ private slots: void testClips() { + using namespace lmms; + FloatModel model; auto song = Engine::getSong(); @@ -111,6 +117,8 @@ private slots: void testLengthRespected() { + using namespace lmms; + FloatModel model; auto song = Engine::getSong(); @@ -136,6 +144,8 @@ private slots: void testInlineAutomation() { + using namespace lmms; + auto song = Engine::getSong(); InstrumentTrack* instrumentTrack = @@ -160,6 +170,8 @@ private slots: void testPatternTrack() { + using namespace lmms; + auto song = Engine::getSong(); auto patternStore = Engine::patternStore(); PatternTrack patternTrack(song); @@ -197,6 +209,8 @@ private slots: void testGlobalAutomation() { + using namespace lmms; + // Global automation should not have priority, see https://github.com/LMMS/lmms/issues/4268 // Tests regression caused by 75077f6200a5aee3a5821aae48a3b8466ed8714a auto song = Engine::getSong(); From 5904b249c02640d4a62bdf5e9c86dcf4f642f495 Mon Sep 17 00:00:00 2001 From: Levin Oehlmann Date: Sun, 19 Jun 2022 23:03:55 +0200 Subject: [PATCH 05/17] clang-tidy: Apply modernize-use-override everywhere (#6439) ... to mark overriding functions `override` instead of `virtual`. --- include/AudioAlsa.h | 2 +- include/AudioAlsaSetupWidget.h | 2 +- include/AudioDeviceSetupWidget.h | 2 +- include/AudioDummy.h | 4 +- include/AudioEngine.h | 2 +- include/AudioEngineWorkerThread.h | 2 +- include/AudioFileDevice.h | 2 +- include/AudioFileFlac.h | 4 +- include/AudioFileMP3.h | 4 +- include/AudioFileOgg.h | 4 +- include/AudioFileWave.h | 4 +- include/AudioJack.h | 18 +++---- include/AudioOss.h | 4 +- include/AudioPortAudio.h | 14 ++--- include/AudioPulseAudio.h | 4 +- include/AudioSampleRecorder.h | 4 +- include/AudioSdl.h | 2 +- include/AudioSndio.h | 4 +- include/AutomatableButton.h | 4 +- include/AutomatableModel.h | 2 +- include/AutomatableModelView.h | 2 +- include/AutomatableSlider.h | 2 +- include/AutomationClip.h | 2 +- include/AutomationClipView.h | 2 +- include/AutomationEditor.h | 4 +- include/AutomationTrack.h | 6 +-- include/AutomationTrackView.h | 2 +- include/CPULoadWidget.h | 2 +- include/CaptionMenu.h | 2 +- include/Clip.h | 2 +- include/ClipView.h | 2 +- include/ComboBox.h | 2 +- include/ComboBoxModel.h | 2 +- include/ConfigManager.h | 2 +- include/Controller.h | 2 +- include/ControllerConnection.h | 2 +- include/ControllerConnectionDialog.h | 2 +- include/ControllerDialog.h | 2 +- include/ControllerRackView.h | 2 +- include/ControllerView.h | 2 +- include/CustomTextKnob.h | 2 +- include/DetuningHelper.h | 2 +- include/DummyEffect.h | 4 +- include/DummyInstrument.h | 2 +- include/DummyPlugin.h | 2 +- include/Editor.h | 2 +- include/Effect.h | 2 +- include/EffectChain.h | 2 +- include/EffectControlDialog.h | 2 +- include/EffectControls.h | 2 +- include/EffectRackView.h | 2 +- include/EffectSelectDialog.h | 2 +- include/EffectView.h | 2 +- include/EnvelopeAndLfoParameters.h | 2 +- include/EnvelopeAndLfoView.h | 2 +- include/ExportFilter.h | 2 +- include/FadeButton.h | 2 +- include/Fader.h | 2 +- include/FileBrowser.h | 4 +- include/Graph.h | 4 +- include/GroupBox.h | 2 +- include/GuiApplication.h | 2 +- include/ImportFilter.h | 2 +- include/InlineAutomation.h | 2 +- include/Instrument.h | 2 +- include/InstrumentFunctionViews.h | 4 +- include/InstrumentFunctions.h | 4 +- include/InstrumentMidiIOView.h | 2 +- include/InstrumentPlayHandle.h | 2 +- include/InstrumentSoundShaping.h | 2 +- include/InstrumentSoundShapingView.h | 2 +- include/InstrumentTrack.h | 6 +-- include/InstrumentTrackView.h | 2 +- include/InstrumentTrackWindow.h | 2 +- include/JournallingObject.h | 4 +- include/Ladspa2LMMS.h | 2 +- include/LadspaControl.h | 2 +- include/LadspaControlView.h | 2 +- include/LcdSpinBox.h | 2 +- include/LcdWidget.h | 2 +- include/LedCheckBox.h | 2 +- include/LfoController.h | 4 +- include/LinkedModelGroupViews.h | 2 +- include/LmmsPalette.h | 2 +- include/LmmsStyle.h | 8 +-- include/LocklessAllocator.h | 2 +- include/Lv2ViewBase.h | 2 +- include/MainWindow.h | 2 +- include/MeterDialog.h | 2 +- include/MeterModel.h | 2 +- include/MidiAlsaRaw.h | 2 +- include/MidiAlsaSeq.h | 12 ++--- include/MidiClient.h | 2 +- include/MidiClip.h | 2 +- include/MidiClipView.h | 2 +- include/MidiController.h | 6 +-- include/MidiDummy.h | 2 +- include/MidiJack.h | 6 +-- include/MidiOss.h | 2 +- include/MidiPort.h | 2 +- include/MidiPortMenu.h | 2 +- include/MidiSndio.h | 2 +- include/Mixer.h | 4 +- include/MixerLine.h | 2 +- include/MixerLineLcdSpinBox.h | 2 +- include/MixerView.h | 2 +- include/Model.h | 2 +- include/NStateButton.h | 2 +- include/Note.h | 2 +- include/NotePlayHandle.h | 2 +- include/Oscilloscope.h | 2 +- include/PatternClip.h | 2 +- include/PatternClipView.h | 2 +- include/PatternStore.h | 2 +- include/PatternTrack.h | 6 +-- include/PatternTrackView.h | 2 +- include/PeakController.h | 4 +- include/PianoRoll.h | 2 +- include/PianoView.h | 2 +- include/PixmapButton.h | 2 +- include/Plugin.h | 2 +- include/PluginBrowser.h | 2 +- include/PresetPreviewPlayHandle.h | 2 +- include/ProjectNotes.h | 2 +- include/ProjectRenderer.h | 2 +- include/RemotePlugin.h | 4 +- include/RemotePluginClient.h | 4 +- include/RenameDialog.h | 2 +- include/RenderManager.h | 2 +- include/RingBuffer.h | 2 +- include/RowTableView.h | 2 +- include/Rubberband.h | 4 +- include/SampleBuffer.h | 2 +- include/SampleClip.h | 2 +- include/SampleClipView.h | 2 +- include/SamplePlayHandle.h | 2 +- include/SampleRecordHandle.h | 2 +- include/SampleTrack.h | 6 +-- include/SampleTrackView.h | 2 +- include/SampleTrackWindow.h | 2 +- include/SetupDialog.h | 2 +- include/SideBar.h | 2 +- include/SideBarWidget.h | 2 +- include/Song.h | 2 +- include/SongEditor.h | 2 +- include/StringPairDrag.h | 2 +- include/TabBar.h | 2 +- include/TabButton.h | 2 +- include/TabWidget.h | 2 +- include/TemplatesMenu.h | 2 +- include/TempoSyncKnob.h | 2 +- include/TextFloat.h | 2 +- include/TimeDisplayWidget.h | 2 +- include/TimeLineWidget.h | 2 +- include/ToolButton.h | 2 +- include/ToolPlugin.h | 2 +- include/Track.h | 2 +- include/TrackContainer.h | 2 +- include/TrackContainerView.h | 4 +- include/TrackContentWidget.h | 2 +- include/TrackLabelButton.h | 2 +- include/TrackOperationsWidget.h | 2 +- include/TrackView.h | 2 +- include/VstSyncController.h | 2 +- include/embed.h | 4 +- plugins/Amplifier/Amplifier.h | 6 +-- plugins/Amplifier/AmplifierControlDialog.h | 2 +- plugins/Amplifier/AmplifierControls.h | 12 ++--- plugins/BassBooster/BassBooster.h | 6 +-- .../BassBooster/BassBoosterControlDialog.h | 2 +- plugins/BassBooster/BassBoosterControls.h | 12 ++--- plugins/BitInvader/BitInvader.h | 24 ++++----- plugins/Bitcrush/Bitcrush.h | 6 +-- plugins/Bitcrush/BitcrushControlDialog.h | 2 +- plugins/Bitcrush/BitcrushControls.h | 12 ++--- plugins/CarlaBase/Carla.h | 36 ++++++------- plugins/CrossoverEQ/CrossoverEQ.h | 6 +-- .../CrossoverEQ/CrossoverEQControlDialog.h | 2 +- plugins/CrossoverEQ/CrossoverEQControls.h | 12 ++--- plugins/Delay/DelayControls.h | 12 ++--- plugins/Delay/DelayControlsDialog.h | 12 ++--- plugins/Delay/DelayEffect.h | 6 +-- plugins/DualFilter/DualFilter.h | 6 +-- plugins/DualFilter/DualFilterControlDialog.h | 2 +- plugins/DualFilter/DualFilterControls.h | 12 ++--- plugins/DynamicsProcessor/DynamicsProcessor.h | 8 +-- .../DynamicsProcessorControlDialog.h | 2 +- .../DynamicsProcessorControls.h | 12 ++--- plugins/Eq/EqControls.h | 12 ++--- plugins/Eq/EqControlsDialog.h | 4 +- plugins/Eq/EqCurve.h | 20 +++---- plugins/Eq/EqEffect.h | 6 +-- plugins/Eq/EqFader.h | 2 +- plugins/Eq/EqFilter.h | 12 ++--- plugins/Eq/EqParameterWidget.h | 2 +- plugins/Eq/EqSpectrumView.h | 4 +- plugins/Flanger/FlangerControls.h | 12 ++--- plugins/Flanger/FlangerControlsDialog.h | 2 +- plugins/Flanger/FlangerEffect.h | 6 +-- plugins/FreeBoy/FreeBoy.h | 22 ++++---- plugins/GigPlayer/GigPlayer.h | 30 +++++------ plugins/GigPlayer/PatchesDialog.cpp | 2 +- plugins/GigPlayer/PatchesDialog.h | 6 +-- plugins/HydrogenImport/HydrogenImport.h | 6 +-- plugins/Kicker/Kicker.h | 24 ++++----- plugins/LadspaBrowser/LadspaBrowser.h | 12 ++--- plugins/LadspaBrowser/LadspaDescription.h | 2 +- plugins/LadspaBrowser/LadspaPortDialog.h | 2 +- plugins/LadspaEffect/LadspaControlDialog.h | 2 +- plugins/LadspaEffect/LadspaControls.h | 12 ++--- plugins/LadspaEffect/LadspaEffect.h | 8 +-- .../LadspaEffect/LadspaSubPluginFeatures.h | 2 +- plugins/Lb302/Lb302.h | 40 +++++++------- plugins/MidiExport/MidiExport.h | 8 +-- plugins/MidiImport/MidiImport.h | 6 +-- plugins/MidiImport/portsmf/allegro.h | 46 ++++++++-------- plugins/MidiImport/portsmf/allegrosmfrd.cpp | 54 +++++++++---------- plugins/Monstro/Monstro.h | 24 ++++----- plugins/MultitapEcho/MultitapEcho.h | 6 +-- .../MultitapEcho/MultitapEchoControlDialog.h | 2 +- plugins/MultitapEcho/MultitapEchoControls.h | 12 ++--- plugins/Nes/Nes.h | 24 ++++----- plugins/OpulenZ/OpulenZ.h | 22 ++++---- plugins/Organic/Organic.h | 22 ++++---- plugins/Patman/Patman.h | 30 +++++------ .../PeakControllerEffect.h | 4 +- .../PeakControllerEffectControlDialog.h | 2 +- .../PeakControllerEffectControls.h | 2 +- plugins/ReverbSC/ReverbSC.h | 6 +-- plugins/ReverbSC/ReverbSCControlDialog.h | 2 +- plugins/ReverbSC/ReverbSCControls.h | 12 ++--- plugins/Sf2Player/PatchesDialog.cpp | 2 +- plugins/Sf2Player/PatchesDialog.h | 6 +-- plugins/Sf2Player/Sf2Player.h | 30 +++++------ plugins/Sfxr/Sfxr.h | 24 ++++----- plugins/Sid/SidInstrument.h | 24 ++++----- plugins/SpectrumAnalyzer/Analyzer.h | 2 +- plugins/SpectrumAnalyzer/SaControls.h | 2 +- plugins/SpectrumAnalyzer/SaControlsDialog.h | 2 +- plugins/SpectrumAnalyzer/SaSpectrumView.h | 2 +- plugins/SpectrumAnalyzer/SaWaterfallView.h | 2 +- plugins/StereoEnhancer/StereoEnhancer.h | 8 +-- .../StereoEnhancerControlDialog.h | 2 +- .../StereoEnhancer/StereoEnhancerControls.h | 12 ++--- plugins/StereoMatrix/StereoMatrix.h | 8 +-- .../StereoMatrix/StereoMatrixControlDialog.h | 2 +- plugins/StereoMatrix/StereoMatrixControls.h | 12 ++--- plugins/Stk/Mallets/Mallets.h | 18 +++---- plugins/TripleOscillator/TripleOscillator.h | 24 ++++----- plugins/Vectorscope/VecControls.h | 2 +- plugins/Vectorscope/VecControlsDialog.h | 2 +- plugins/Vectorscope/VectorView.h | 2 +- plugins/Vectorscope/Vectorscope.h | 2 +- plugins/Vestige/Vestige.cpp | 4 +- plugins/Vibed/NineButtonSelector.h | 6 +-- plugins/Vibed/Vibed.h | 6 +-- plugins/VstBase/VstPlugin.h | 4 +- plugins/VstEffect/VstEffect.h | 8 +-- plugins/VstEffect/VstEffectControlDialog.h | 2 +- plugins/VstEffect/VstEffectControls.h | 14 ++--- plugins/VstEffect/VstSubPluginFeatures.h | 8 +-- plugins/Watsyn/Watsyn.h | 24 ++++----- plugins/WaveShaper/WaveShaper.h | 8 +-- plugins/WaveShaper/WaveShaperControlDialog.h | 2 +- plugins/WaveShaper/WaveShaperControls.h | 12 ++--- plugins/Xpressive/ExprSynth.cpp | 20 +++---- plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp | 12 ++--- src/core/PresetPreviewPlayHandle.cpp | 2 +- src/gui/MixerView.cpp | 2 +- src/gui/RowTableView.cpp | 4 +- src/gui/SideBar.cpp | 2 +- src/gui/modals/ControllerConnectionDialog.cpp | 2 +- tests/QTestSuite.h | 2 +- 273 files changed, 765 insertions(+), 765 deletions(-) diff --git a/include/AudioAlsa.h b/include/AudioAlsa.h index e1024b030..6bbd4aecd 100644 --- a/include/AudioAlsa.h +++ b/include/AudioAlsa.h @@ -69,7 +69,7 @@ public: public: AudioAlsa( bool & _success_ful, AudioEngine* audioEngine ); - virtual ~AudioAlsa(); + ~AudioAlsa() override; inline static QString name() { diff --git a/include/AudioAlsaSetupWidget.h b/include/AudioAlsaSetupWidget.h index 9e168934e..f68d71e8a 100644 --- a/include/AudioAlsaSetupWidget.h +++ b/include/AudioAlsaSetupWidget.h @@ -47,7 +47,7 @@ class AudioAlsaSetupWidget : public AudioDeviceSetupWidget public: AudioAlsaSetupWidget( QWidget * _parent ); - virtual ~AudioAlsaSetupWidget(); + ~AudioAlsaSetupWidget() override; void saveSettings() override; diff --git a/include/AudioDeviceSetupWidget.h b/include/AudioDeviceSetupWidget.h index 6bf656e0a..392cbd3a4 100644 --- a/include/AudioDeviceSetupWidget.h +++ b/include/AudioDeviceSetupWidget.h @@ -36,7 +36,7 @@ class AudioDeviceSetupWidget : public TabWidget public: AudioDeviceSetupWidget( const QString & _caption, QWidget * _parent ); - virtual ~AudioDeviceSetupWidget(); + ~AudioDeviceSetupWidget() override; virtual void saveSettings() = 0; diff --git a/include/AudioDummy.h b/include/AudioDummy.h index f2c198bbc..3677bf451 100644 --- a/include/AudioDummy.h +++ b/include/AudioDummy.h @@ -43,7 +43,7 @@ public: _success_ful = true; } - virtual ~AudioDummy() + ~AudioDummy() override { stopProcessing(); } @@ -62,7 +62,7 @@ public: { } - virtual ~setupWidget() + ~setupWidget() override { } diff --git a/include/AudioEngine.h b/include/AudioEngine.h index 08e03a113..44854c826 100644 --- a/include/AudioEngine.h +++ b/include/AudioEngine.h @@ -387,7 +387,7 @@ private: AudioEngine( bool renderOnly ); - virtual ~AudioEngine(); + ~AudioEngine() override; void startProcessing(bool needsFifo = true); void stopProcessing(); diff --git a/include/AudioEngineWorkerThread.h b/include/AudioEngineWorkerThread.h index 811f75753..87e2791b1 100644 --- a/include/AudioEngineWorkerThread.h +++ b/include/AudioEngineWorkerThread.h @@ -78,7 +78,7 @@ public: AudioEngineWorkerThread( AudioEngine* audioEngine ); - virtual ~AudioEngineWorkerThread(); + ~AudioEngineWorkerThread() override; virtual void quit(); diff --git a/include/AudioFileDevice.h b/include/AudioFileDevice.h index 937cd9d00..a9fbcbc88 100644 --- a/include/AudioFileDevice.h +++ b/include/AudioFileDevice.h @@ -40,7 +40,7 @@ public: AudioFileDevice(OutputSettings const & outputSettings, const ch_cnt_t _channels, const QString & _file, AudioEngine* audioEngine ); - virtual ~AudioFileDevice(); + ~AudioFileDevice() override; QString outputFile() const { diff --git a/include/AudioFileFlac.h b/include/AudioFileFlac.h index 675ab21d9..542a2e717 100644 --- a/include/AudioFileFlac.h +++ b/include/AudioFileFlac.h @@ -43,7 +43,7 @@ public: AudioEngine* audioEngine ); - virtual ~AudioFileFlac(); + ~AudioFileFlac() override; static AudioFileDevice* getInst(QString const& outputFilename, OutputSettings const& outputSettings, @@ -65,7 +65,7 @@ private: SF_INFO m_sfinfo; SNDFILE* m_sf; - virtual void writeBuffer(surroundSampleFrame const* _ab, + void writeBuffer(surroundSampleFrame const* _ab, fpp_t const frames, float master_gain) override; diff --git a/include/AudioFileMP3.h b/include/AudioFileMP3.h index 16c3617a8..290c9ccbf 100644 --- a/include/AudioFileMP3.h +++ b/include/AudioFileMP3.h @@ -45,7 +45,7 @@ public: bool & successful, const QString & _file, AudioEngine* audioEngine ); - virtual ~AudioFileMP3(); + ~AudioFileMP3() override; static AudioFileDevice * getInst( const QString & outputFilename, OutputSettings const & outputSettings, @@ -58,7 +58,7 @@ public: } protected: - virtual void writeBuffer( const surroundSampleFrame * /* _buf*/, + void writeBuffer( const surroundSampleFrame * /* _buf*/, const fpp_t /*_frames*/, const float /*_master_gain*/ ) override; diff --git a/include/AudioFileOgg.h b/include/AudioFileOgg.h index 7e6921015..18617fa5f 100644 --- a/include/AudioFileOgg.h +++ b/include/AudioFileOgg.h @@ -45,7 +45,7 @@ public: bool & _success_ful, const QString & _file, AudioEngine* audioEngine ); - virtual ~AudioFileOgg(); + ~AudioFileOgg() override; static AudioFileDevice * getInst( const QString & outputFilename, OutputSettings const & outputSettings, @@ -58,7 +58,7 @@ public: private: - virtual void writeBuffer( const surroundSampleFrame * _ab, + void writeBuffer( const surroundSampleFrame * _ab, const fpp_t _frames, const float _master_gain ) override; diff --git a/include/AudioFileWave.h b/include/AudioFileWave.h index e9425dd86..8dd3566f4 100644 --- a/include/AudioFileWave.h +++ b/include/AudioFileWave.h @@ -42,7 +42,7 @@ public: bool & successful, const QString & file, AudioEngine* audioEngine ); - virtual ~AudioFileWave(); + ~AudioFileWave() override; static AudioFileDevice * getInst( const QString & outputFilename, OutputSettings const & outputSettings, @@ -56,7 +56,7 @@ public: private: - virtual void writeBuffer( const surroundSampleFrame * _ab, + void writeBuffer( const surroundSampleFrame * _ab, const fpp_t _frames, float _master_gain ) override; diff --git a/include/AudioJack.h b/include/AudioJack.h index 648bb157d..7b6597e86 100644 --- a/include/AudioJack.h +++ b/include/AudioJack.h @@ -58,7 +58,7 @@ class AudioJack : public QObject, public AudioDevice Q_OBJECT public: AudioJack( bool & _success_ful, AudioEngine* audioEngine ); - virtual ~AudioJack(); + ~AudioJack() override; // this is to allow the jack midi connection to use the same jack client connection // the jack callback is handled here, we call the midi client so that it can read @@ -78,9 +78,9 @@ class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); - virtual ~setupWidget(); + ~setupWidget() override; - virtual void saveSettings(); + void saveSettings() override; private: QLineEdit * m_clientName; @@ -96,13 +96,13 @@ private slots: private: bool initJackClient(); - virtual void startProcessing(); - virtual void stopProcessing(); - virtual void applyQualitySettings(); + void startProcessing() override; + void stopProcessing() override; + void applyQualitySettings() override; - virtual void registerPort( AudioPort * _port ); - virtual void unregisterPort( AudioPort * _port ); - virtual void renamePort( AudioPort * _port ); + void registerPort( AudioPort * _port ) override; + void unregisterPort( AudioPort * _port ) override; + void renamePort( AudioPort * _port ) override; int processCallback( jack_nframes_t _nframes, void * _udata ); diff --git a/include/AudioOss.h b/include/AudioOss.h index 4a552040b..71103586a 100644 --- a/include/AudioOss.h +++ b/include/AudioOss.h @@ -51,7 +51,7 @@ class AudioOss : public QThread, public AudioDevice Q_OBJECT public: AudioOss( bool & _success_ful, AudioEngine* audioEngine ); - virtual ~AudioOss(); + ~AudioOss() override; inline static QString name() { @@ -65,7 +65,7 @@ class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); - virtual ~setupWidget(); + ~setupWidget() override; void saveSettings() override; diff --git a/include/AudioPortAudio.h b/include/AudioPortAudio.h index 10dab74eb..2c3aa6bc8 100644 --- a/include/AudioPortAudio.h +++ b/include/AudioPortAudio.h @@ -77,7 +77,7 @@ class AudioPortAudio : public AudioDevice { public: AudioPortAudio( bool & _success_ful, AudioEngine* audioEngine ); - virtual ~AudioPortAudio(); + ~AudioPortAudio() override; inline static QString name() { @@ -94,10 +94,10 @@ public: { public: setupWidget( QWidget * _parent ); - virtual ~setupWidget(); + ~setupWidget() override; - virtual void saveSettings(); - virtual void show(); + void saveSettings() override; + void show() override; private: gui::ComboBox * m_backend; @@ -107,9 +107,9 @@ public: } ; private: - virtual void startProcessing(); - virtual void stopProcessing(); - virtual void applyQualitySettings(); + void startProcessing() override; + void stopProcessing() override; + void applyQualitySettings() override; #ifdef PORTAUDIO_V19 static int _process_callback( const void *_inputBuffer, void * _outputBuffer, diff --git a/include/AudioPulseAudio.h b/include/AudioPulseAudio.h index 70da08087..a4721dfbd 100644 --- a/include/AudioPulseAudio.h +++ b/include/AudioPulseAudio.h @@ -52,7 +52,7 @@ class AudioPulseAudio : public QThread, public AudioDevice Q_OBJECT public: AudioPulseAudio( bool & _success_ful, AudioEngine* audioEngine ); - virtual ~AudioPulseAudio(); + ~AudioPulseAudio() override; inline static QString name() { @@ -66,7 +66,7 @@ public: { public: setupWidget( QWidget * _parent ); - virtual ~setupWidget(); + ~setupWidget() override; void saveSettings() override; diff --git a/include/AudioSampleRecorder.h b/include/AudioSampleRecorder.h index 294ffa17d..e2f84dad0 100644 --- a/include/AudioSampleRecorder.h +++ b/include/AudioSampleRecorder.h @@ -41,14 +41,14 @@ class AudioSampleRecorder : public AudioDevice { public: AudioSampleRecorder( const ch_cnt_t _channels, bool & _success_ful, AudioEngine* audioEngine ); - virtual ~AudioSampleRecorder(); + ~AudioSampleRecorder() override; f_cnt_t framesRecorded() const; void createSampleBuffer( SampleBuffer** sampleBuffer ); private: - virtual void writeBuffer( const surroundSampleFrame * _ab, + void writeBuffer( const surroundSampleFrame * _ab, const fpp_t _frames, const float _master_gain ) override; diff --git a/include/AudioSdl.h b/include/AudioSdl.h index b49e2ebe9..c3b9d27d3 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -48,7 +48,7 @@ class AudioSdl : public AudioDevice { public: AudioSdl( bool & _success_ful, AudioEngine* audioEngine ); - virtual ~AudioSdl(); + ~AudioSdl() override; inline static QString name() { diff --git a/include/AudioSndio.h b/include/AudioSndio.h index 5fb7c78fc..ebc443a68 100644 --- a/include/AudioSndio.h +++ b/include/AudioSndio.h @@ -52,7 +52,7 @@ class AudioSndio : public QThread, public AudioDevice Q_OBJECT public: AudioSndio( bool & _success_ful, AudioEngine * _audioEngine ); - virtual ~AudioSndio(); + ~AudioSndio() override; inline static QString name( void ) { @@ -63,7 +63,7 @@ public: { public: setupWidget( QWidget * _parent ); - virtual ~setupWidget(); + ~setupWidget() override; void saveSettings( void ) override; diff --git a/include/AutomatableButton.h b/include/AutomatableButton.h index fefaf70e3..d8c58523c 100644 --- a/include/AutomatableButton.h +++ b/include/AutomatableButton.h @@ -42,7 +42,7 @@ class LMMS_EXPORT AutomatableButton : public QPushButton, public BoolModelView public: AutomatableButton( QWidget * _parent, const QString & _name = QString() ); - virtual ~AutomatableButton(); + ~AutomatableButton() override; inline void setCheckable( bool _on ) { @@ -87,7 +87,7 @@ class LMMS_EXPORT automatableButtonGroup : public QWidget, public IntModelView public: automatableButtonGroup( QWidget * _parent, const QString & _name = QString() ); - virtual ~automatableButtonGroup(); + ~automatableButtonGroup() override; void addButton( AutomatableButton * _btn ); void removeButton( AutomatableButton * _btn ); diff --git a/include/AutomatableModel.h b/include/AutomatableModel.h index 672abaf81..5e8a17763 100644 --- a/include/AutomatableModel.h +++ b/include/AutomatableModel.h @@ -89,7 +89,7 @@ public: }; - virtual ~AutomatableModel(); + ~AutomatableModel() override; // Implement those by using the MODEL_IS_VISITABLE macro virtual void accept(ModelVisitor& v) = 0; diff --git a/include/AutomatableModelView.h b/include/AutomatableModelView.h index fa8926c0c..1e8ef7398 100644 --- a/include/AutomatableModelView.h +++ b/include/AutomatableModelView.h @@ -39,7 +39,7 @@ class LMMS_EXPORT AutomatableModelView : public ModelView { public: AutomatableModelView( Model* model, QWidget* _this ); - virtual ~AutomatableModelView() = default; + ~AutomatableModelView() override = default; // some basic functions for convenience AutomatableModel* modelUntyped() diff --git a/include/AutomatableSlider.h b/include/AutomatableSlider.h index d6a95f5d8..cadaaf8db 100644 --- a/include/AutomatableSlider.h +++ b/include/AutomatableSlider.h @@ -39,7 +39,7 @@ class AutomatableSlider : public QSlider, public IntModelView Q_OBJECT public: AutomatableSlider( QWidget * _parent, const QString & _name = QString() ); - virtual ~AutomatableSlider(); + ~AutomatableSlider() override; bool showStatus() { diff --git a/include/AutomationClip.h b/include/AutomationClip.h index 376c1e9e7..63c13a120 100644 --- a/include/AutomationClip.h +++ b/include/AutomationClip.h @@ -65,7 +65,7 @@ public: AutomationClip( AutomationTrack * _auto_track ); AutomationClip( const AutomationClip & _clip_to_copy ); - virtual ~AutomationClip() = default; + ~AutomationClip() override = default; bool addObject( AutomatableModel * _obj, bool _search_dup = true ); diff --git a/include/AutomationClipView.h b/include/AutomationClipView.h index 0b80ad2eb..1a2e80248 100644 --- a/include/AutomationClipView.h +++ b/include/AutomationClipView.h @@ -45,7 +45,7 @@ class AutomationClipView : public ClipView public: AutomationClipView( AutomationClip * _clip, TrackView * _parent ); - virtual ~AutomationClipView(); + ~AutomationClipView() override; public slots: /// Opens this view's clip in the global automation editor diff --git a/include/AutomationEditor.h b/include/AutomationEditor.h index d9d1b0a10..c710c5007 100644 --- a/include/AutomationEditor.h +++ b/include/AutomationEditor.h @@ -167,7 +167,7 @@ private: AutomationEditor(); AutomationEditor( const AutomationEditor & ); - virtual ~AutomationEditor(); + ~AutomationEditor() override; static QPixmap * s_toolDraw; static QPixmap * s_toolErase; @@ -255,7 +255,7 @@ class AutomationEditorWindow : public Editor static const int INITIAL_HEIGHT = 480; public: AutomationEditorWindow(); - ~AutomationEditorWindow(); + ~AutomationEditorWindow() override; void setCurrentClip(AutomationClip* clip); const AutomationClip* currentClip(); diff --git a/include/AutomationTrack.h b/include/AutomationTrack.h index 1bbc77b1c..1779bf102 100644 --- a/include/AutomationTrack.h +++ b/include/AutomationTrack.h @@ -37,9 +37,9 @@ class AutomationTrack : public Track Q_OBJECT public: AutomationTrack( TrackContainer* tc, bool _hidden = false ); - virtual ~AutomationTrack() = default; + ~AutomationTrack() override = default; - virtual bool play( const TimePos & _start, const fpp_t _frames, + bool play( const TimePos & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _clip_num = -1 ) override; QString nodeName() const override @@ -50,7 +50,7 @@ public: gui::TrackView * createView( gui::TrackContainerView* ) override; Clip* createClip(const TimePos & pos) override; - virtual void saveTrackSpecificSettings( QDomDocument & _doc, + void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadTrackSpecificSettings( const QDomElement & _this ) override; diff --git a/include/AutomationTrackView.h b/include/AutomationTrackView.h index b5bafe58e..18454bec2 100644 --- a/include/AutomationTrackView.h +++ b/include/AutomationTrackView.h @@ -41,7 +41,7 @@ class AutomationTrackView : public TrackView { public: AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv ); - virtual ~AutomationTrackView() = default; + ~AutomationTrackView() override = default; void dragEnterEvent( QDragEnterEvent * _dee ) override; void dropEvent( QDropEvent * _de ) override; diff --git a/include/CPULoadWidget.h b/include/CPULoadWidget.h index 9cf275fb3..31aecb016 100644 --- a/include/CPULoadWidget.h +++ b/include/CPULoadWidget.h @@ -43,7 +43,7 @@ class CPULoadWidget : public QWidget Q_OBJECT public: CPULoadWidget( QWidget * _parent ); - virtual ~CPULoadWidget(); + ~CPULoadWidget() override; protected: diff --git a/include/CaptionMenu.h b/include/CaptionMenu.h index 2309cec6f..a3724e127 100644 --- a/include/CaptionMenu.h +++ b/include/CaptionMenu.h @@ -41,7 +41,7 @@ class LMMS_EXPORT CaptionMenu : public QMenu Q_OBJECT public: CaptionMenu( const QString & _title, QWidget * _parent = 0 ); - virtual ~CaptionMenu(); + ~CaptionMenu() override; } ; diff --git a/include/Clip.h b/include/Clip.h index 5c70aeaba..14595263e 100644 --- a/include/Clip.h +++ b/include/Clip.h @@ -53,7 +53,7 @@ class LMMS_EXPORT Clip : public Model, public JournallingObject mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel); public: Clip( Track * track ); - virtual ~Clip(); + ~Clip() override; inline Track * getTrack() const { diff --git a/include/ClipView.h b/include/ClipView.h index 00a8b261e..8cfb9e7a4 100644 --- a/include/ClipView.h +++ b/include/ClipView.h @@ -71,7 +71,7 @@ public: const static int BORDER_WIDTH = 2; ClipView( Clip * clip, TrackView * tv ); - virtual ~ClipView(); + ~ClipView() override; bool fixedClips(); diff --git a/include/ComboBox.h b/include/ComboBox.h index 412279d15..9b51d87ab 100644 --- a/include/ComboBox.h +++ b/include/ComboBox.h @@ -40,7 +40,7 @@ class LMMS_EXPORT ComboBox : public QWidget, public IntModelView Q_OBJECT public: ComboBox( QWidget* parent = nullptr, const QString& name = QString() ); - virtual ~ComboBox(); + ~ComboBox() override; ComboBoxModel* model() { diff --git a/include/ComboBoxModel.h b/include/ComboBoxModel.h index faff03620..ef21eb12e 100644 --- a/include/ComboBoxModel.h +++ b/include/ComboBoxModel.h @@ -47,7 +47,7 @@ public: { } - virtual ~ComboBoxModel() + ~ComboBoxModel() override { clear(); } diff --git a/include/ConfigManager.h b/include/ConfigManager.h index 6aa7fc037..52e318508 100644 --- a/include/ConfigManager.h +++ b/include/ConfigManager.h @@ -274,7 +274,7 @@ private: ConfigManager(); ConfigManager(const ConfigManager & _c); - ~ConfigManager(); + ~ConfigManager() override; void upgrade_1_1_90(); void upgrade_1_1_91(); diff --git a/include/Controller.h b/include/Controller.h index c2e5205d2..f11294a39 100644 --- a/include/Controller.h +++ b/include/Controller.h @@ -70,7 +70,7 @@ public: Controller( ControllerTypes _type, Model * _parent, const QString & _display_name ); - virtual ~Controller(); + ~Controller() override; virtual float currentValue( int _offset ); // The per-controller get-value-in-buffers function diff --git a/include/ControllerConnection.h b/include/ControllerConnection.h index 50b98539c..54bfaa10d 100644 --- a/include/ControllerConnection.h +++ b/include/ControllerConnection.h @@ -58,7 +58,7 @@ public: ControllerConnection(Controller * _controller); ControllerConnection( int _controllerId ); - virtual ~ControllerConnection(); + ~ControllerConnection() override; inline Controller * getController() { diff --git a/include/ControllerConnectionDialog.h b/include/ControllerConnectionDialog.h index 62980987f..5565c8a67 100644 --- a/include/ControllerConnectionDialog.h +++ b/include/ControllerConnectionDialog.h @@ -61,7 +61,7 @@ class ControllerConnectionDialog : public QDialog public: ControllerConnectionDialog( QWidget * _parent, const AutomatableModel * _target_model ); - virtual ~ControllerConnectionDialog(); + ~ControllerConnectionDialog() override; Controller * chosenController() { diff --git a/include/ControllerDialog.h b/include/ControllerDialog.h index 0592cadf3..351afd66a 100644 --- a/include/ControllerDialog.h +++ b/include/ControllerDialog.h @@ -44,7 +44,7 @@ class ControllerDialog : public QWidget, public ModelView public: ControllerDialog( Controller * _controller, QWidget * _parent ); - virtual ~ControllerDialog(); + ~ControllerDialog() override; signals: diff --git a/include/ControllerRackView.h b/include/ControllerRackView.h index 6d60562f6..a522071c8 100644 --- a/include/ControllerRackView.h +++ b/include/ControllerRackView.h @@ -53,7 +53,7 @@ class ControllerRackView : public QWidget, public SerializingObject Q_OBJECT public: ControllerRackView(); - virtual ~ControllerRackView(); + ~ControllerRackView() override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/include/ControllerView.h b/include/ControllerView.h index 2e18e1320..8b8db0674 100644 --- a/include/ControllerView.h +++ b/include/ControllerView.h @@ -48,7 +48,7 @@ class ControllerView : public QFrame, public ModelView Q_OBJECT public: ControllerView( Controller * _controller, QWidget * _parent ); - virtual ~ControllerView(); + ~ControllerView() override; inline Controller * getController() { diff --git a/include/CustomTextKnob.h b/include/CustomTextKnob.h index 403799ff0..cde718810 100644 --- a/include/CustomTextKnob.h +++ b/include/CustomTextKnob.h @@ -25,7 +25,7 @@ public: } private: - virtual QString displayValue() const; + QString displayValue() const override; protected: QString m_value_text; diff --git a/include/DetuningHelper.h b/include/DetuningHelper.h index 7444b8b22..c67ae41c6 100644 --- a/include/DetuningHelper.h +++ b/include/DetuningHelper.h @@ -42,7 +42,7 @@ public: { } - virtual ~DetuningHelper() + ~DetuningHelper() override { } diff --git a/include/DummyEffect.h b/include/DummyEffect.h index 8d0f769b6..637feaba1 100644 --- a/include/DummyEffect.h +++ b/include/DummyEffect.h @@ -60,7 +60,7 @@ public: { } - virtual ~DummyEffectControls() + ~DummyEffectControls() override { } @@ -102,7 +102,7 @@ public: setName(); } - virtual ~DummyEffect() + ~DummyEffect() override { } diff --git a/include/DummyInstrument.h b/include/DummyInstrument.h index 27246e6eb..7f85d83b5 100644 --- a/include/DummyInstrument.h +++ b/include/DummyInstrument.h @@ -47,7 +47,7 @@ public: { } - virtual ~DummyInstrument() + ~DummyInstrument() override { } diff --git a/include/DummyPlugin.h b/include/DummyPlugin.h index 313649526..fd98b831c 100644 --- a/include/DummyPlugin.h +++ b/include/DummyPlugin.h @@ -41,7 +41,7 @@ public: { } - virtual ~DummyPlugin() + ~DummyPlugin() override { } diff --git a/include/Editor.h b/include/Editor.h index 88cd84654..60760f2b4 100644 --- a/include/Editor.h +++ b/include/Editor.h @@ -81,7 +81,7 @@ protected: /// \param record If set true, the editor's toolbar will contain record /// buttons in addition to the play and stop buttons. Editor(bool record = false, bool record_step = false); - virtual ~Editor(); + ~Editor() override; DropToolBar* m_toolBar; diff --git a/include/Effect.h b/include/Effect.h index abd65f207..471f031c9 100644 --- a/include/Effect.h +++ b/include/Effect.h @@ -55,7 +55,7 @@ public: Effect( const Plugin::Descriptor * _desc, Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~Effect(); + ~Effect() override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/include/EffectChain.h b/include/EffectChain.h index ca7648761..2a0cbc758 100644 --- a/include/EffectChain.h +++ b/include/EffectChain.h @@ -48,7 +48,7 @@ class LMMS_EXPORT EffectChain : public Model, public SerializingObject Q_OBJECT public: EffectChain( Model * _parent ); - virtual ~EffectChain(); + ~EffectChain() override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/include/EffectControlDialog.h b/include/EffectControlDialog.h index ec0ef3f1d..59e422264 100644 --- a/include/EffectControlDialog.h +++ b/include/EffectControlDialog.h @@ -44,7 +44,7 @@ class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView Q_OBJECT public: EffectControlDialog( EffectControls * _controls ); - virtual ~EffectControlDialog(); + ~EffectControlDialog() override; virtual bool isResizable() const {return false;} diff --git a/include/EffectControls.h b/include/EffectControls.h index b8e7d0041..95ef0039c 100644 --- a/include/EffectControls.h +++ b/include/EffectControls.h @@ -51,7 +51,7 @@ public: { } - virtual ~EffectControls() + ~EffectControls() override { } diff --git a/include/EffectRackView.h b/include/EffectRackView.h index 014a07dfe..fb68fda68 100644 --- a/include/EffectRackView.h +++ b/include/EffectRackView.h @@ -47,7 +47,7 @@ class EffectRackView : public QWidget, public ModelView Q_OBJECT public: EffectRackView( EffectChain* model, QWidget* parent = nullptr ); - virtual ~EffectRackView(); + ~EffectRackView() override; static constexpr int DEFAULT_WIDTH = 245; diff --git a/include/EffectSelectDialog.h b/include/EffectSelectDialog.h index bf1b6ba04..b0acfb734 100644 --- a/include/EffectSelectDialog.h +++ b/include/EffectSelectDialog.h @@ -43,7 +43,7 @@ class EffectSelectDialog : public QDialog Q_OBJECT public: EffectSelectDialog( QWidget * _parent ); - virtual ~EffectSelectDialog(); + ~EffectSelectDialog() override; Effect * instantiateSelectedPlugin( EffectChain * _parent ); diff --git a/include/EffectView.h b/include/EffectView.h index 9f30575e9..90bb54896 100644 --- a/include/EffectView.h +++ b/include/EffectView.h @@ -49,7 +49,7 @@ class EffectView : public PluginView Q_OBJECT public: EffectView( Effect * _model, QWidget * _parent ); - virtual ~EffectView(); + ~EffectView() override; inline Effect * effect() { diff --git a/include/EnvelopeAndLfoParameters.h b/include/EnvelopeAndLfoParameters.h index 0a4a0d0f2..7b630b1b0 100644 --- a/include/EnvelopeAndLfoParameters.h +++ b/include/EnvelopeAndLfoParameters.h @@ -78,7 +78,7 @@ public: EnvelopeAndLfoParameters( float _value_for_zero_amount, Model * _parent ); - virtual ~EnvelopeAndLfoParameters(); + ~EnvelopeAndLfoParameters() override; static inline float expKnobVal( float _val ) { diff --git a/include/EnvelopeAndLfoView.h b/include/EnvelopeAndLfoView.h index 2067f9291..a82ccf606 100644 --- a/include/EnvelopeAndLfoView.h +++ b/include/EnvelopeAndLfoView.h @@ -54,7 +54,7 @@ class EnvelopeAndLfoView : public QWidget, public ModelView Q_OBJECT public: EnvelopeAndLfoView( QWidget * _parent ); - virtual ~EnvelopeAndLfoView(); + ~EnvelopeAndLfoView() override; protected: diff --git a/include/ExportFilter.h b/include/ExportFilter.h index 29cb1c711..3aaa2f986 100644 --- a/include/ExportFilter.h +++ b/include/ExportFilter.h @@ -40,7 +40,7 @@ class LMMS_EXPORT ExportFilter : public Plugin { public: ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, nullptr ) {} - virtual ~ExportFilter() {} + ~ExportFilter() override {} virtual bool tryExport(const TrackContainer::TrackList &tracks, diff --git a/include/FadeButton.h b/include/FadeButton.h index ee0936ca7..b4a78d5ee 100644 --- a/include/FadeButton.h +++ b/include/FadeButton.h @@ -44,7 +44,7 @@ public: const QColor & _hold_color, QWidget * _parent ); - virtual ~FadeButton(); + ~FadeButton() override; void setActiveColor( const QColor & activated_color ); diff --git a/include/Fader.h b/include/Fader.h index 355684c4a..54acfc57d 100644 --- a/include/Fader.h +++ b/include/Fader.h @@ -72,7 +72,7 @@ public: Fader( FloatModel * _model, const QString & _name, QWidget * _parent ); Fader( FloatModel * _model, const QString & _name, QWidget * _parent, QPixmap * back, QPixmap * leds, QPixmap * knob ); - virtual ~Fader() = default; + ~Fader() override = default; void init(FloatModel * model, QString const & name); diff --git a/include/FileBrowser.h b/include/FileBrowser.h index eb50dd1bb..315248d42 100644 --- a/include/FileBrowser.h +++ b/include/FileBrowser.h @@ -68,7 +68,7 @@ public: const QString& userDir = "", const QString& factoryDir = ""); - virtual ~FileBrowser() = default; + ~FileBrowser() override = default; private slots: void reloadTree( void ); @@ -107,7 +107,7 @@ class FileBrowserTreeWidget : public QTreeWidget Q_OBJECT public: FileBrowserTreeWidget( QWidget * parent ); - virtual ~FileBrowserTreeWidget() = default; + ~FileBrowserTreeWidget() override = default; //! This method returns a QList with paths (QString's) of all directories //! that are expanded in the tree. diff --git a/include/Graph.h b/include/Graph.h index 7a9599f12..747fcf29a 100644 --- a/include/Graph.h +++ b/include/Graph.h @@ -67,7 +67,7 @@ public: int _width = 132, int _height = 104 ); - virtual ~Graph() = default; + ~Graph() override = default; void setForeground( const QPixmap & _pixmap ); @@ -151,7 +151,7 @@ public: bool _default_constructed = false, float _step = 0.0 ); - virtual ~graphModel() = default; + ~graphModel() override = default; // TODO: saveSettings, loadSettings? diff --git a/include/GroupBox.h b/include/GroupBox.h index 6a282fedb..e20db80a6 100644 --- a/include/GroupBox.h +++ b/include/GroupBox.h @@ -42,7 +42,7 @@ class GroupBox : public QWidget, public BoolModelView Q_OBJECT public: GroupBox( const QString & _caption, QWidget * _parent = nullptr ); - virtual ~GroupBox(); + ~GroupBox() override; void modelChanged() override; diff --git a/include/GuiApplication.h b/include/GuiApplication.h index 84697175f..e39983138 100644 --- a/include/GuiApplication.h +++ b/include/GuiApplication.h @@ -50,7 +50,7 @@ class LMMS_EXPORT GuiApplication : public QObject Q_OBJECT; public: explicit GuiApplication(); - ~GuiApplication(); + ~GuiApplication() override; static GuiApplication* instance(); #ifdef LMMS_BUILD_WIN32 diff --git a/include/ImportFilter.h b/include/ImportFilter.h index 60eca6f80..9635fedb5 100644 --- a/include/ImportFilter.h +++ b/include/ImportFilter.h @@ -42,7 +42,7 @@ class LMMS_EXPORT ImportFilter : public Plugin public: ImportFilter( const QString & _file_name, const Descriptor * _descriptor ); - virtual ~ImportFilter(); + ~ImportFilter() override; // tries to import given file to given track-container by having all diff --git a/include/InlineAutomation.h b/include/InlineAutomation.h index 453184329..435604506 100644 --- a/include/InlineAutomation.h +++ b/include/InlineAutomation.h @@ -42,7 +42,7 @@ public: { } - virtual ~InlineAutomation() + ~InlineAutomation() override { if( m_autoClip ) { diff --git a/include/Instrument.h b/include/Instrument.h index 7ec3c66be..4e48e2fd6 100644 --- a/include/Instrument.h +++ b/include/Instrument.h @@ -60,7 +60,7 @@ public: Instrument(InstrumentTrack * _instrument_track, const Descriptor * _descriptor, const Descriptor::SubPluginFeatures::Key * key = nullptr); - virtual ~Instrument() = default; + ~Instrument() override = default; // -------------------------------------------------------------------- // functions that can/should be re-implemented: diff --git a/include/InstrumentFunctionViews.h b/include/InstrumentFunctionViews.h index bf4b07668..99ba92031 100644 --- a/include/InstrumentFunctionViews.h +++ b/include/InstrumentFunctionViews.h @@ -50,7 +50,7 @@ class InstrumentFunctionNoteStackingView : public QWidget, public ModelView Q_OBJECT public: InstrumentFunctionNoteStackingView( InstrumentFunctionNoteStacking* cc, QWidget* parent = nullptr ); - virtual ~InstrumentFunctionNoteStackingView(); + ~InstrumentFunctionNoteStackingView() override; private: @@ -73,7 +73,7 @@ class InstrumentFunctionArpeggioView : public QWidget, public ModelView Q_OBJECT public: InstrumentFunctionArpeggioView( InstrumentFunctionArpeggio* arp, QWidget* parent = nullptr ); - virtual ~InstrumentFunctionArpeggioView(); + ~InstrumentFunctionArpeggioView() override; private: diff --git a/include/InstrumentFunctions.h b/include/InstrumentFunctions.h index ef1d17902..76e522bc5 100644 --- a/include/InstrumentFunctions.h +++ b/include/InstrumentFunctions.h @@ -58,7 +58,7 @@ private: public: InstrumentFunctionNoteStacking( Model * _parent ); - virtual ~InstrumentFunctionNoteStacking(); + ~InstrumentFunctionNoteStacking() override; void processNote( NotePlayHandle* n ); @@ -180,7 +180,7 @@ public: } ; InstrumentFunctionArpeggio( Model * _parent ); - virtual ~InstrumentFunctionArpeggio(); + ~InstrumentFunctionArpeggio() override; void processNote( NotePlayHandle* n ); diff --git a/include/InstrumentMidiIOView.h b/include/InstrumentMidiIOView.h index 399aee890..821488390 100644 --- a/include/InstrumentMidiIOView.h +++ b/include/InstrumentMidiIOView.h @@ -50,7 +50,7 @@ class InstrumentMidiIOView : public QWidget, public ModelView Q_OBJECT public: InstrumentMidiIOView( QWidget* parent ); - virtual ~InstrumentMidiIOView(); + ~InstrumentMidiIOView() override; private: diff --git a/include/InstrumentPlayHandle.h b/include/InstrumentPlayHandle.h index 2d7bfa587..2935d36ba 100644 --- a/include/InstrumentPlayHandle.h +++ b/include/InstrumentPlayHandle.h @@ -38,7 +38,7 @@ class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle public: InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack ); - virtual ~InstrumentPlayHandle() + ~InstrumentPlayHandle() override { } diff --git a/include/InstrumentSoundShaping.h b/include/InstrumentSoundShaping.h index 00208392d..1df6b858b 100644 --- a/include/InstrumentSoundShaping.h +++ b/include/InstrumentSoundShaping.h @@ -46,7 +46,7 @@ class InstrumentSoundShaping : public Model, public JournallingObject Q_OBJECT public: InstrumentSoundShaping( InstrumentTrack * _instrument_track ); - virtual ~InstrumentSoundShaping(); + ~InstrumentSoundShaping() override; void processAudioBuffer( sampleFrame * _ab, const fpp_t _frames, NotePlayHandle * _n ); diff --git a/include/InstrumentSoundShapingView.h b/include/InstrumentSoundShapingView.h index 9b4efcfab..aa8aff19d 100644 --- a/include/InstrumentSoundShapingView.h +++ b/include/InstrumentSoundShapingView.h @@ -47,7 +47,7 @@ class InstrumentSoundShapingView : public QWidget, public ModelView Q_OBJECT public: InstrumentSoundShapingView( QWidget * _parent ); - virtual ~InstrumentSoundShapingView(); + ~InstrumentSoundShapingView() override; void setFunctionsHidden( bool hidden ); diff --git a/include/InstrumentTrack.h b/include/InstrumentTrack.h index d05da176b..90cd25814 100644 --- a/include/InstrumentTrack.h +++ b/include/InstrumentTrack.h @@ -64,7 +64,7 @@ class LMMS_EXPORT InstrumentTrack : public Track, public MidiEventProcessor mapPropertyFromModel(int,getVolume,setVolume,m_volumeModel); public: InstrumentTrack( TrackContainer* tc ); - virtual ~InstrumentTrack(); + ~InstrumentTrack() override; // used by instrument void processAudioBuffer( sampleFrame * _buf, const fpp_t _frames, @@ -122,7 +122,7 @@ public: } // play everything in given frame-range - creates note-play-handles - virtual bool play( const TimePos & _start, const fpp_t _frames, + bool play( const TimePos & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _clip_num = -1 ) override; // create new view for me gui::TrackView* createView( gui::TrackContainerView* tcv ) override; @@ -132,7 +132,7 @@ public: // called by track - virtual void saveTrackSpecificSettings( QDomDocument & _doc, + void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadTrackSpecificSettings( const QDomElement & _this ) override; diff --git a/include/InstrumentTrackView.h b/include/InstrumentTrackView.h index a5297b332..3201f81d6 100644 --- a/include/InstrumentTrackView.h +++ b/include/InstrumentTrackView.h @@ -46,7 +46,7 @@ class InstrumentTrackView : public TrackView Q_OBJECT public: InstrumentTrackView( InstrumentTrack * _it, TrackContainerView* tc ); - virtual ~InstrumentTrackView(); + ~InstrumentTrackView() override; InstrumentTrackWindow * getInstrumentTrackWindow(); diff --git a/include/InstrumentTrackWindow.h b/include/InstrumentTrackWindow.h index cd208c165..68750c0b8 100644 --- a/include/InstrumentTrackWindow.h +++ b/include/InstrumentTrackWindow.h @@ -65,7 +65,7 @@ class InstrumentTrackWindow : public QWidget, public ModelView, Q_OBJECT public: InstrumentTrackWindow( InstrumentTrackView * _tv ); - virtual ~InstrumentTrackWindow(); + ~InstrumentTrackWindow() override; // parent for all internal tab-widgets TabWidget * tabWidgetParent() diff --git a/include/JournallingObject.h b/include/JournallingObject.h index cd853dc7f..41ae65295 100644 --- a/include/JournallingObject.h +++ b/include/JournallingObject.h @@ -37,7 +37,7 @@ class LMMS_EXPORT JournallingObject : public SerializingObject { public: JournallingObject(); - virtual ~JournallingObject(); + ~JournallingObject() override; inline jo_id_t id() const { @@ -60,7 +60,7 @@ public: void addJournalCheckPoint(); - virtual QDomElement saveState( QDomDocument & _doc, + QDomElement saveState( QDomDocument & _doc, QDomElement & _parent ) override; void restoreState( const QDomElement & _this ) override; diff --git a/include/Ladspa2LMMS.h b/include/Ladspa2LMMS.h index 63db75cd9..b1a21de70 100644 --- a/include/Ladspa2LMMS.h +++ b/include/Ladspa2LMMS.h @@ -68,7 +68,7 @@ public: private: Ladspa2LMMS(); - virtual ~Ladspa2LMMS(); + ~Ladspa2LMMS() override; l_sortable_plugin_t m_instruments; l_sortable_plugin_t m_validEffects; diff --git a/include/LadspaControl.h b/include/LadspaControl.h index 8b6fe3d19..3a0ea5cc8 100644 --- a/include/LadspaControl.h +++ b/include/LadspaControl.h @@ -52,7 +52,7 @@ class LMMS_EXPORT LadspaControl : public Model, public JournallingObject public: LadspaControl( Model * _parent, port_desc_t * _port, bool _link = false ); - ~LadspaControl(); + ~LadspaControl() override; LADSPA_Data value(); ValueBuffer * valueBuffer(); diff --git a/include/LadspaControlView.h b/include/LadspaControlView.h index 15eb722a7..c36135986 100644 --- a/include/LadspaControlView.h +++ b/include/LadspaControlView.h @@ -43,7 +43,7 @@ class LMMS_EXPORT LadspaControlView : public QWidget, public ModelView Q_OBJECT public: LadspaControlView( QWidget * _parent, LadspaControl * _ctl ); - virtual ~LadspaControlView(); + ~LadspaControlView() override; private: LadspaControl * m_ctl; diff --git a/include/LcdSpinBox.h b/include/LcdSpinBox.h index 1c30bfcf6..f310e46b2 100644 --- a/include/LcdSpinBox.h +++ b/include/LcdSpinBox.h @@ -40,7 +40,7 @@ public: LcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name = QString() ); - virtual ~LcdSpinBox() = default; + ~LcdSpinBox() override = default; void modelChanged() override { diff --git a/include/LcdWidget.h b/include/LcdWidget.h index aad1d189a..d55cfc017 100644 --- a/include/LcdWidget.h +++ b/include/LcdWidget.h @@ -48,7 +48,7 @@ public: LcdWidget(int numDigits, const QString& style, QWidget* parent, const QString& name = QString(), bool leadingZero = false); - virtual ~LcdWidget(); + ~LcdWidget() override; void setValue( int value ); void setLabel( const QString& label ); diff --git a/include/LedCheckBox.h b/include/LedCheckBox.h index 8eac9b562..a215592e6 100644 --- a/include/LedCheckBox.h +++ b/include/LedCheckBox.h @@ -54,7 +54,7 @@ public: const QString & _name = QString(), LedColors _color = Yellow ); - virtual ~LedCheckBox(); + ~LedCheckBox() override; inline const QString & text() diff --git a/include/LfoController.h b/include/LfoController.h index 6ee136a14..48aee3d30 100644 --- a/include/LfoController.h +++ b/include/LfoController.h @@ -57,7 +57,7 @@ class LfoController : public Controller public: LfoController( Model * _parent ); - virtual ~LfoController(); + ~LfoController() override; void saveSettings( QDomDocument & _doc, QDomElement & _this ) override; void loadSettings( const QDomElement & _this ) override; @@ -105,7 +105,7 @@ class LfoControllerDialog : public ControllerDialog Q_OBJECT public: LfoControllerDialog( Controller * _controller, QWidget * _parent ); - virtual ~LfoControllerDialog(); + ~LfoControllerDialog() override; protected: diff --git a/include/LinkedModelGroupViews.h b/include/LinkedModelGroupViews.h index 50ef03596..91a8d53ca 100644 --- a/include/LinkedModelGroupViews.h +++ b/include/LinkedModelGroupViews.h @@ -70,7 +70,7 @@ public: */ LinkedModelGroupView(QWidget* parent, LinkedModelGroup* model, std::size_t colNum); - ~LinkedModelGroupView(); + ~LinkedModelGroupView() override; //! Reconnect models if model changed void modelChanged(LinkedModelGroup* linkedModelGroup); diff --git a/include/LmmsPalette.h b/include/LmmsPalette.h index 87ea18687..1840fb3eb 100644 --- a/include/LmmsPalette.h +++ b/include/LmmsPalette.h @@ -50,7 +50,7 @@ class LMMS_EXPORT LmmsPalette : public QWidget public: LmmsPalette( QWidget * parent, QStyle * stylearg ); - virtual ~LmmsPalette(); + ~LmmsPalette() override; #define ACCESSMET( read, write ) \ QColor read () const; \ diff --git a/include/LmmsStyle.h b/include/LmmsStyle.h index a4c9edd31..72895a102 100644 --- a/include/LmmsStyle.h +++ b/include/LmmsStyle.h @@ -66,23 +66,23 @@ public: }; LmmsStyle(); - virtual ~LmmsStyle() + ~LmmsStyle() override { } QPalette standardPalette( void ) const override; - virtual void drawComplexControl( + void drawComplexControl( ComplexControl control, const QStyleOptionComplex * option, QPainter *painter, const QWidget *widget ) const override; - virtual void drawPrimitive( PrimitiveElement element, + void drawPrimitive( PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0 ) const override; - virtual int pixelMetric( PixelMetric metric, + int pixelMetric( PixelMetric metric, const QStyleOption * option = 0, const QWidget * widget = 0 ) const override; diff --git a/include/LocklessAllocator.h b/include/LocklessAllocator.h index 17f5ebfb5..054bb91e8 100644 --- a/include/LocklessAllocator.h +++ b/include/LocklessAllocator.h @@ -67,7 +67,7 @@ public: { } - virtual ~LocklessAllocatorT() + ~LocklessAllocatorT() override { } diff --git a/include/Lv2ViewBase.h b/include/Lv2ViewBase.h index 74a0bd876..2be5d72a4 100644 --- a/include/Lv2ViewBase.h +++ b/include/Lv2ViewBase.h @@ -58,7 +58,7 @@ class Lv2ViewProc : public LinkedModelGroupView public: //! @param colNum numbers of columns for the controls Lv2ViewProc(QWidget *parent, Lv2Proc *ctrlBase, int colNum); - ~Lv2ViewProc(); + ~Lv2ViewProc() override; private: static AutoLilvNode uri(const char *uriStr); diff --git a/include/MainWindow.h b/include/MainWindow.h index 8fbc20e6a..05aa716b5 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -190,7 +190,7 @@ protected: private: MainWindow(); MainWindow( const MainWindow & ); - virtual ~MainWindow(); + ~MainWindow() override; void finalize(); diff --git a/include/MeterDialog.h b/include/MeterDialog.h index e606a4482..e744ea9d4 100644 --- a/include/MeterDialog.h +++ b/include/MeterDialog.h @@ -41,7 +41,7 @@ class MeterDialog : public QWidget, public ModelView Q_OBJECT public: MeterDialog( QWidget * _parent, bool _simple = false ); - virtual ~MeterDialog(); + ~MeterDialog() override; void modelChanged() override; diff --git a/include/MeterModel.h b/include/MeterModel.h index bcd3fa2b2..8ed4ba1aa 100644 --- a/include/MeterModel.h +++ b/include/MeterModel.h @@ -38,7 +38,7 @@ class MeterModel : public Model mapPropertyFromModel(int,getDenominator,setDenominator,m_denominatorModel); public: MeterModel( Model * _parent ); - ~MeterModel(); + ~MeterModel() override; void saveSettings( QDomDocument & _doc, QDomElement & _this, const QString & _name ); diff --git a/include/MidiAlsaRaw.h b/include/MidiAlsaRaw.h index 3ab2b8af7..57a477264 100644 --- a/include/MidiAlsaRaw.h +++ b/include/MidiAlsaRaw.h @@ -48,7 +48,7 @@ class MidiAlsaRaw : public QThread, public MidiClientRaw Q_OBJECT public: MidiAlsaRaw(); - virtual ~MidiAlsaRaw(); + ~MidiAlsaRaw() override; static QString probeDevice(); diff --git a/include/MidiAlsaSeq.h b/include/MidiAlsaSeq.h index 8a2d3a098..fa287a409 100644 --- a/include/MidiAlsaSeq.h +++ b/include/MidiAlsaSeq.h @@ -51,7 +51,7 @@ class MidiAlsaSeq : public QThread, public MidiClient Q_OBJECT public: MidiAlsaSeq(); - virtual ~MidiAlsaSeq(); + ~MidiAlsaSeq() override; static QString probeDevice(); @@ -70,7 +70,7 @@ public: - virtual void processOutEvent( const MidiEvent & _me, + void processOutEvent( const MidiEvent & _me, const TimePos & _time, const MidiPort * _port ) override; @@ -95,20 +95,20 @@ public: QString sourcePortName( const MidiEvent & ) const override; // (un)subscribe given MidiPort to/from destination-port - virtual void subscribeReadablePort( MidiPort * _port, + void subscribeReadablePort( MidiPort * _port, const QString & _dest, bool _subscribe = true ) override; - virtual void subscribeWritablePort( MidiPort * _port, + void subscribeWritablePort( MidiPort * _port, const QString & _dest, bool _subscribe = true ) override; - virtual void connectRPChanged( QObject * _receiver, + void connectRPChanged( QObject * _receiver, const char * _member ) override { connect( this, SIGNAL( readablePortsChanged() ), _receiver, _member ); } - virtual void connectWPChanged( QObject * _receiver, + void connectWPChanged( QObject * _receiver, const char * _member ) override { connect( this, SIGNAL( writablePortsChanged() ), diff --git a/include/MidiClient.h b/include/MidiClient.h index 835d2e46a..f5efc659a 100644 --- a/include/MidiClient.h +++ b/include/MidiClient.h @@ -125,7 +125,7 @@ class MidiClientRaw : public MidiClient { public: MidiClientRaw(); - virtual ~MidiClientRaw(); + ~MidiClientRaw() override; // we are raw-clients for sure! bool isRaw() const override diff --git a/include/MidiClip.h b/include/MidiClip.h index 173ca5699..6433ba507 100644 --- a/include/MidiClip.h +++ b/include/MidiClip.h @@ -55,7 +55,7 @@ public: MidiClip( InstrumentTrack* instrumentTrack ); MidiClip( const MidiClip& other ); - virtual ~MidiClip(); + ~MidiClip() override; void init(); diff --git a/include/MidiClipView.h b/include/MidiClipView.h index c9f1c3e1e..278e49443 100644 --- a/include/MidiClipView.h +++ b/include/MidiClipView.h @@ -43,7 +43,7 @@ class MidiClipView : public ClipView public: MidiClipView( MidiClip* clip, TrackView* parent ); - virtual ~MidiClipView() = default; + ~MidiClipView() override = default; Q_PROPERTY(QColor noteFillColor READ getNoteFillColor WRITE setNoteFillColor) Q_PROPERTY(QColor noteBorderColor READ getNoteBorderColor WRITE setNoteBorderColor) diff --git a/include/MidiController.h b/include/MidiController.h index 533f8ff03..8b1db0476 100644 --- a/include/MidiController.h +++ b/include/MidiController.h @@ -49,12 +49,12 @@ class MidiController : public Controller, public MidiEventProcessor Q_OBJECT public: MidiController( Model * _parent ); - virtual ~MidiController(); + ~MidiController() override; - virtual void processInEvent( const MidiEvent & _me, + void processInEvent( const MidiEvent & _me, const TimePos & _time, f_cnt_t offset = 0 ) override; - virtual void processOutEvent( const MidiEvent& _me, + void processOutEvent( const MidiEvent& _me, const TimePos & _time, f_cnt_t offset = 0 ) override { // No output yet diff --git a/include/MidiDummy.h b/include/MidiDummy.h index 8744c6aa2..e1c0e3e6a 100644 --- a/include/MidiDummy.h +++ b/include/MidiDummy.h @@ -38,7 +38,7 @@ public: MidiDummy() { } - virtual ~MidiDummy() + ~MidiDummy() override { } diff --git a/include/MidiJack.h b/include/MidiJack.h index 16d09d431..a4a944b81 100644 --- a/include/MidiJack.h +++ b/include/MidiJack.h @@ -53,7 +53,7 @@ class MidiJack : public QThread, public MidiClientRaw Q_OBJECT public: MidiJack(); - virtual ~MidiJack(); + ~MidiJack() override; jack_client_t* jackClient(); @@ -76,8 +76,8 @@ public: protected: - virtual void sendByte( const unsigned char c ); - virtual void run(); + void sendByte( const unsigned char c ) override; + void run() override; private: diff --git a/include/MidiOss.h b/include/MidiOss.h index 30f78bec1..944359055 100644 --- a/include/MidiOss.h +++ b/include/MidiOss.h @@ -44,7 +44,7 @@ class MidiOss : public QThread, public MidiClientRaw Q_OBJECT public: MidiOss(); - virtual ~MidiOss(); + ~MidiOss() override; static QString probeDevice(); diff --git a/include/MidiPort.h b/include/MidiPort.h index 3d3ceffdb..562379ba8 100644 --- a/include/MidiPort.h +++ b/include/MidiPort.h @@ -83,7 +83,7 @@ public: MidiEventProcessor* eventProcessor, Model* parent = nullptr, Mode mode = Disabled ); - virtual ~MidiPort(); + ~MidiPort() override; void setName( const QString& name ); diff --git a/include/MidiPortMenu.h b/include/MidiPortMenu.h index 7f7689edc..eb44ace57 100644 --- a/include/MidiPortMenu.h +++ b/include/MidiPortMenu.h @@ -41,7 +41,7 @@ class MidiPortMenu : public QMenu, public ModelView Q_OBJECT public: MidiPortMenu( MidiPort::Modes _mode ); - virtual ~MidiPortMenu(); + ~MidiPortMenu() override; public slots: diff --git a/include/MidiSndio.h b/include/MidiSndio.h index 07c42186d..1ffbae5ce 100644 --- a/include/MidiSndio.h +++ b/include/MidiSndio.h @@ -46,7 +46,7 @@ class MidiSndio : public QThread, public MidiClientRaw Q_OBJECT public: MidiSndio( void ); - virtual ~MidiSndio(); + ~MidiSndio() override; static QString probeDevice(void); diff --git a/include/Mixer.h b/include/Mixer.h index 36aa9f5d0..e6fdb2b06 100644 --- a/include/Mixer.h +++ b/include/Mixer.h @@ -102,7 +102,7 @@ class MixerRoute : public QObject Q_OBJECT public: MixerRoute( MixerChannel * from, MixerChannel * to, float amount ); - virtual ~MixerRoute(); + ~MixerRoute() override; mix_ch_t senderIndex() const { @@ -143,7 +143,7 @@ class LMMS_EXPORT Mixer : public Model, public JournallingObject Q_OBJECT public: Mixer(); - virtual ~Mixer(); + ~Mixer() override; void mixToChannel( const sampleFrame * _buf, mix_ch_t _ch ); diff --git a/include/MixerLine.h b/include/MixerLine.h index 12ac3df75..decd5f3aa 100644 --- a/include/MixerLine.h +++ b/include/MixerLine.h @@ -50,7 +50,7 @@ public: Q_PROPERTY( QColor strokeInnerActive READ strokeInnerActive WRITE setStrokeInnerActive ) Q_PROPERTY( QColor strokeInnerInactive READ strokeInnerInactive WRITE setStrokeInnerInactive ) MixerLine( QWidget * _parent, MixerView * _mv, int _channelIndex); - ~MixerLine(); + ~MixerLine() override; void paintEvent( QPaintEvent * ) override; void mousePressEvent( QMouseEvent * ) override; diff --git a/include/MixerLineLcdSpinBox.h b/include/MixerLineLcdSpinBox.h index 7e739093d..51c7ab938 100644 --- a/include/MixerLineLcdSpinBox.h +++ b/include/MixerLineLcdSpinBox.h @@ -41,7 +41,7 @@ public: MixerLineLcdSpinBox(int numDigits, QWidget * parent, const QString& name, TrackView * tv = nullptr) : LcdSpinBox(numDigits, parent, name), m_tv(tv) {} - virtual ~MixerLineLcdSpinBox() {} + ~MixerLineLcdSpinBox() override {} void setTrackView(TrackView * tv); diff --git a/include/MixerView.h b/include/MixerView.h index 5e63194c9..a7b1b5191 100644 --- a/include/MixerView.h +++ b/include/MixerView.h @@ -66,7 +66,7 @@ public: MixerView(); - virtual ~MixerView(); + ~MixerView() override; void keyPressEvent(QKeyEvent * e) override; diff --git a/include/Model.h b/include/Model.h index 1c96de21c..1621d77e8 100644 --- a/include/Model.h +++ b/include/Model.h @@ -45,7 +45,7 @@ public: { } - virtual ~Model() + ~Model() override { } diff --git a/include/NStateButton.h b/include/NStateButton.h index ff48593a7..4dac1a436 100644 --- a/include/NStateButton.h +++ b/include/NStateButton.h @@ -41,7 +41,7 @@ class NStateButton : public ToolButton Q_OBJECT public: NStateButton( QWidget * _parent ); - virtual ~NStateButton(); + ~NStateButton() override; void addState( const QPixmap & _pixmap, const QString & _tooltip = "" ); inline void setGeneralToolTip( const QString & _tooltip ) diff --git a/include/Note.h b/include/Note.h index d6e0b85c2..f1c10c0ac 100644 --- a/include/Note.h +++ b/include/Note.h @@ -98,7 +98,7 @@ public: panning_t panning = DefaultPanning, DetuningHelper * detuning = nullptr ); Note( const Note & note ); - virtual ~Note(); + ~Note() override; // used by GUI inline void setSelected( const bool selected ) { m_selected = selected; } diff --git a/include/NotePlayHandle.h b/include/NotePlayHandle.h index 396d00e71..c0980c12b 100644 --- a/include/NotePlayHandle.h +++ b/include/NotePlayHandle.h @@ -74,7 +74,7 @@ public: NotePlayHandle* parent = nullptr, int midiEventChannel = -1, Origin origin = OriginMidiClip ); - virtual ~NotePlayHandle(); + ~NotePlayHandle() override; void * operator new ( size_t size, void * p ) { diff --git a/include/Oscilloscope.h b/include/Oscilloscope.h index 4404fd98b..db4cf2b4a 100644 --- a/include/Oscilloscope.h +++ b/include/Oscilloscope.h @@ -43,7 +43,7 @@ public: Q_PROPERTY( QColor clippingColor READ clippingColor WRITE setClippingColor ) Oscilloscope( QWidget * _parent ); - virtual ~Oscilloscope(); + ~Oscilloscope() override; void setActive( bool _active ); diff --git a/include/PatternClip.h b/include/PatternClip.h index a1beb00f5..f1d0e2557 100644 --- a/include/PatternClip.h +++ b/include/PatternClip.h @@ -39,7 +39,7 @@ class PatternClip : public Clip { public: PatternClip(Track* track); - virtual ~PatternClip() = default; + ~PatternClip() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/include/PatternClipView.h b/include/PatternClipView.h index d66de70f0..d170e4bef 100644 --- a/include/PatternClipView.h +++ b/include/PatternClipView.h @@ -44,7 +44,7 @@ class PatternClipView : public ClipView Q_OBJECT public: PatternClipView(Clip* clip, TrackView* tv); - virtual ~PatternClipView() = default; + ~PatternClipView() override = default; public slots: diff --git a/include/PatternStore.h b/include/PatternStore.h index 39b65d1c1..58791e40d 100644 --- a/include/PatternStore.h +++ b/include/PatternStore.h @@ -68,7 +68,7 @@ class LMMS_EXPORT PatternStore : public TrackContainer mapPropertyFromModel(int, currentPattern, setCurrentPattern, m_patternComboBoxModel); public: PatternStore(); - virtual ~PatternStore(); + ~PatternStore() override; virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int clipNum = -1); diff --git a/include/PatternTrack.h b/include/PatternTrack.h index a8e7a505c..3527b5e49 100644 --- a/include/PatternTrack.h +++ b/include/PatternTrack.h @@ -51,15 +51,15 @@ class LMMS_EXPORT PatternTrack : public Track Q_OBJECT public: PatternTrack(TrackContainer* tc); - virtual ~PatternTrack(); + ~PatternTrack() override; - virtual bool play( const TimePos & _start, const fpp_t _frames, + bool play( const TimePos & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _clip_num = -1 ) override; gui::TrackView * createView( gui::TrackContainerView* tcv ) override; Clip* createClip(const TimePos & pos) override; - virtual void saveTrackSpecificSettings( QDomDocument & _doc, + void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadTrackSpecificSettings( const QDomElement & _this ) override; diff --git a/include/PatternTrackView.h b/include/PatternTrackView.h index 41f8fac33..b6d33e444 100644 --- a/include/PatternTrackView.h +++ b/include/PatternTrackView.h @@ -45,7 +45,7 @@ class PatternTrackView : public TrackView Q_OBJECT public: PatternTrackView(PatternTrack* pt, TrackContainerView* tcv); - virtual ~PatternTrackView(); + ~PatternTrackView() override; bool close() override; diff --git a/include/PeakController.h b/include/PeakController.h index d50c0b06f..01a8e968c 100644 --- a/include/PeakController.h +++ b/include/PeakController.h @@ -47,7 +47,7 @@ public: PeakControllerEffect *_peak_effect = nullptr ); - virtual ~PeakController(); + ~PeakController() override; void saveSettings( QDomDocument & _doc, QDomElement & _this ) override; void loadSettings( const QDomElement & _this ) override; @@ -92,7 +92,7 @@ class PeakControllerDialog : public ControllerDialog Q_OBJECT public: PeakControllerDialog( Controller * _controller, QWidget * _parent ); - virtual ~PeakControllerDialog(); + ~PeakControllerDialog() override; protected: void contextMenuEvent( QContextMenuEvent * _me ) override; diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 73a2e5b76..3d74a79d6 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -298,7 +298,7 @@ private: PianoRoll(); PianoRoll( const PianoRoll & ); - virtual ~PianoRoll(); + ~PianoRoll() override; void autoScroll(const TimePos & t ); diff --git a/include/PianoView.h b/include/PianoView.h index 7a6ab6479..7f586809d 100644 --- a/include/PianoView.h +++ b/include/PianoView.h @@ -44,7 +44,7 @@ class PianoView : public QWidget, public ModelView Q_OBJECT public: PianoView( QWidget * _parent ); - virtual ~PianoView() = default; + ~PianoView() override = default; static int getKeyFromKeyEvent( QKeyEvent * _ke ); diff --git a/include/PixmapButton.h b/include/PixmapButton.h index f4062826d..ec5ac1b28 100644 --- a/include/PixmapButton.h +++ b/include/PixmapButton.h @@ -40,7 +40,7 @@ class LMMS_EXPORT PixmapButton : public AutomatableButton public: PixmapButton( QWidget * _parent, const QString & _name = QString() ); - virtual ~PixmapButton(); + ~PixmapButton() override; void setActiveGraphic( const QPixmap & _pm ); void setInactiveGraphic( const QPixmap & _pm, bool _update = true ); diff --git a/include/Plugin.h b/include/Plugin.h index b50d81116..7042edb41 100644 --- a/include/Plugin.h +++ b/include/Plugin.h @@ -244,7 +244,7 @@ public: //! See the key() function Plugin(const Descriptor * descriptor, Model * parent, const Descriptor::SubPluginFeatures::Key *key = nullptr); - virtual ~Plugin(); + ~Plugin() override; //! Return display-name out of sub plugin or descriptor QString displayName() const override; diff --git a/include/PluginBrowser.h b/include/PluginBrowser.h index 0b2a59d15..75fa543f4 100644 --- a/include/PluginBrowser.h +++ b/include/PluginBrowser.h @@ -41,7 +41,7 @@ class PluginBrowser : public SideBarWidget Q_OBJECT public: PluginBrowser( QWidget * _parent ); - virtual ~PluginBrowser() = default; + ~PluginBrowser() override = default; private slots: void onFilterChanged( const QString & filter ); diff --git a/include/PresetPreviewPlayHandle.h b/include/PresetPreviewPlayHandle.h index 9dd151330..dfff0fc21 100644 --- a/include/PresetPreviewPlayHandle.h +++ b/include/PresetPreviewPlayHandle.h @@ -40,7 +40,7 @@ class LMMS_EXPORT PresetPreviewPlayHandle : public PlayHandle { public: PresetPreviewPlayHandle( const QString& presetFile, bool loadByPlugin = false, DataFile *dataFile = 0 ); - virtual ~PresetPreviewPlayHandle(); + ~PresetPreviewPlayHandle() override; inline bool affinityMatters() const override { diff --git a/include/ProjectNotes.h b/include/ProjectNotes.h index fda5c9b51..384f24f79 100644 --- a/include/ProjectNotes.h +++ b/include/ProjectNotes.h @@ -44,7 +44,7 @@ class LMMS_EXPORT ProjectNotes : public QMainWindow, public SerializingObject Q_OBJECT public: ProjectNotes(); - virtual ~ProjectNotes(); + ~ProjectNotes() override; void clear(); void setText( const QString & _text ); diff --git a/include/ProjectRenderer.h b/include/ProjectRenderer.h index bd61c4730..9fa0bc507 100644 --- a/include/ProjectRenderer.h +++ b/include/ProjectRenderer.h @@ -64,7 +64,7 @@ public: const OutputSettings & _os, ExportFileFormats _file_format, const QString & _out_file ); - virtual ~ProjectRenderer(); + ~ProjectRenderer() override; bool isReady() const { diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index ec08896e2..73810150d 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -39,7 +39,7 @@ class ProcessWatcher : public QThread Q_OBJECT public: ProcessWatcher( RemotePlugin * ); - virtual ~ProcessWatcher() = default; + ~ProcessWatcher() override = default; void stop() { @@ -66,7 +66,7 @@ class LMMS_EXPORT RemotePlugin : public QObject, public RemotePluginBase Q_OBJECT public: RemotePlugin(); - virtual ~RemotePlugin(); + ~RemotePlugin() override; inline bool isRunning() { diff --git a/include/RemotePluginClient.h b/include/RemotePluginClient.h index 69a9d41e9..b96b71b85 100644 --- a/include/RemotePluginClient.h +++ b/include/RemotePluginClient.h @@ -51,11 +51,11 @@ public: #else RemotePluginClient( const char * socketPath ); #endif - virtual ~RemotePluginClient(); + ~RemotePluginClient() override; const VstSyncData* getVstSyncData(); - virtual bool processMessage( const message & _m ); + bool processMessage( const message & _m ) override; virtual void process( const sampleFrame * _in_buf, sampleFrame * _out_buf ) = 0; diff --git a/include/RenameDialog.h b/include/RenameDialog.h index c1e30b9d8..f2a289ee0 100644 --- a/include/RenameDialog.h +++ b/include/RenameDialog.h @@ -40,7 +40,7 @@ class RenameDialog : public QDialog Q_OBJECT public: RenameDialog( QString & _string ); - ~RenameDialog(); + ~RenameDialog() override; protected: diff --git a/include/RenderManager.h b/include/RenderManager.h index ff59cb953..9ec4c511e 100644 --- a/include/RenderManager.h +++ b/include/RenderManager.h @@ -46,7 +46,7 @@ public: ProjectRenderer::ExportFileFormats fmt, QString outputPath); - virtual ~RenderManager(); + ~RenderManager() override; /// Export all unmuted tracks into a single file void renderProject(); diff --git a/include/RingBuffer.h b/include/RingBuffer.h index efb5afd39..c7db6b4e5 100644 --- a/include/RingBuffer.h +++ b/include/RingBuffer.h @@ -53,7 +53,7 @@ public: * \param size The size of the buffer in milliseconds. The actual size will be size + period size */ RingBuffer( float size ); - virtual ~RingBuffer(); + ~RingBuffer() override; diff --git a/include/RowTableView.h b/include/RowTableView.h index fc55383a1..9934dbade 100644 --- a/include/RowTableView.h +++ b/include/RowTableView.h @@ -39,7 +39,7 @@ class RowTableView : public QTableView Q_OBJECT public: RowTableView( QWidget * parent = 0 ); - virtual ~RowTableView(); + ~RowTableView() override; void setModel( QAbstractItemModel * model ) override; diff --git a/include/Rubberband.h b/include/Rubberband.h index 1332a932d..b00d10dd6 100644 --- a/include/Rubberband.h +++ b/include/Rubberband.h @@ -44,7 +44,7 @@ public: { } - virtual ~selectableObject() + ~selectableObject() override { } @@ -80,7 +80,7 @@ class RubberBand : public QRubberBand { public: RubberBand( QWidget * _parent ); - virtual ~RubberBand(); + ~RubberBand() override; QVector selectedObjects() const; QVector selectableObjects() const; diff --git a/include/SampleBuffer.h b/include/SampleBuffer.h index b556fccbe..f4d67859e 100644 --- a/include/SampleBuffer.h +++ b/include/SampleBuffer.h @@ -119,7 +119,7 @@ public: friend void swap(SampleBuffer & first, SampleBuffer & second) noexcept; SampleBuffer& operator= (const SampleBuffer that); - virtual ~SampleBuffer(); + ~SampleBuffer() override; bool play( sampleFrame * ab, diff --git a/include/SampleClip.h b/include/SampleClip.h index 52a2d6209..51225ded8 100644 --- a/include/SampleClip.h +++ b/include/SampleClip.h @@ -47,7 +47,7 @@ class SampleClip : public Clip public: SampleClip( Track * _track ); SampleClip( const SampleClip& orig ); - virtual ~SampleClip(); + ~SampleClip() override; SampleClip& operator=( const SampleClip& that ) = delete; diff --git a/include/SampleClipView.h b/include/SampleClipView.h index d5218e28a..74873dca7 100644 --- a/include/SampleClipView.h +++ b/include/SampleClipView.h @@ -44,7 +44,7 @@ class SampleClipView : public ClipView public: SampleClipView( SampleClip * _clip, TrackView * _tv ); - virtual ~SampleClipView() = default; + ~SampleClipView() override = default; public slots: void updateSample(); diff --git a/include/SamplePlayHandle.h b/include/SamplePlayHandle.h index d27591df3..69ee3b38d 100644 --- a/include/SamplePlayHandle.h +++ b/include/SamplePlayHandle.h @@ -46,7 +46,7 @@ public: SamplePlayHandle( SampleBuffer* sampleBuffer , bool ownAudioPort = true ); SamplePlayHandle( const QString& sampleFile ); SamplePlayHandle( SampleClip* clip ); - virtual ~SamplePlayHandle(); + ~SamplePlayHandle() override; inline bool affinityMatters() const override { diff --git a/include/SampleRecordHandle.h b/include/SampleRecordHandle.h index 724f4216d..466e240a8 100644 --- a/include/SampleRecordHandle.h +++ b/include/SampleRecordHandle.h @@ -46,7 +46,7 @@ class SampleRecordHandle : public PlayHandle { public: SampleRecordHandle( SampleClip* clip ); - virtual ~SampleRecordHandle(); + ~SampleRecordHandle() override; void play( sampleFrame * _working_buffer ) override; bool isFinished() const override; diff --git a/include/SampleTrack.h b/include/SampleTrack.h index 677e04889..8f424178a 100644 --- a/include/SampleTrack.h +++ b/include/SampleTrack.h @@ -47,15 +47,15 @@ class SampleTrack : public Track Q_OBJECT public: SampleTrack( TrackContainer* tc ); - virtual ~SampleTrack(); + ~SampleTrack() override; - virtual bool play( const TimePos & _start, const fpp_t _frames, + bool play( const TimePos & _start, const fpp_t _frames, const f_cnt_t _frame_base, int _clip_num = -1 ) override; gui::TrackView * createView( gui::TrackContainerView* tcv ) override; Clip* createClip(const TimePos & pos) override; - virtual void saveTrackSpecificSettings( QDomDocument & _doc, + void saveTrackSpecificSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadTrackSpecificSettings( const QDomElement & _this ) override; diff --git a/include/SampleTrackView.h b/include/SampleTrackView.h index 1223f999d..9921aa735 100644 --- a/include/SampleTrackView.h +++ b/include/SampleTrackView.h @@ -47,7 +47,7 @@ class SampleTrackView : public TrackView Q_OBJECT public: SampleTrackView( SampleTrack* Track, TrackContainerView* tcv ); - virtual ~SampleTrackView(); + ~SampleTrackView() override; SampleTrackWindow * getSampleTrackWindow() { diff --git a/include/SampleTrackWindow.h b/include/SampleTrackWindow.h index dd670fd09..fb4e3f5e8 100644 --- a/include/SampleTrackWindow.h +++ b/include/SampleTrackWindow.h @@ -50,7 +50,7 @@ class SampleTrackWindow : public QWidget, public ModelView, public SerializingOb Q_OBJECT public: SampleTrackWindow(SampleTrackView * tv); - virtual ~SampleTrackWindow(); + ~SampleTrackWindow() override; SampleTrack * model() { diff --git a/include/SetupDialog.h b/include/SetupDialog.h index 28668d8e9..9ce6e043d 100644 --- a/include/SetupDialog.h +++ b/include/SetupDialog.h @@ -64,7 +64,7 @@ public: }; SetupDialog(ConfigTabs tab_to_open = GeneralSettings); - virtual ~SetupDialog(); + ~SetupDialog() override; protected slots: diff --git a/include/SideBar.h b/include/SideBar.h index 70bac6385..ba9fe11a6 100644 --- a/include/SideBar.h +++ b/include/SideBar.h @@ -42,7 +42,7 @@ class SideBar : public QToolBar Q_OBJECT public: SideBar( Qt::Orientation _orientation, QWidget * _parent ); - virtual ~SideBar(); + ~SideBar() override; void appendTab( SideBarWidget * _sbw ); diff --git a/include/SideBarWidget.h b/include/SideBarWidget.h index 71a33a3ce..4b7ff4b2d 100644 --- a/include/SideBarWidget.h +++ b/include/SideBarWidget.h @@ -41,7 +41,7 @@ class SideBarWidget : public QWidget public: SideBarWidget( const QString & _title, const QPixmap & _icon, QWidget * _parent ); - virtual ~SideBarWidget(); + ~SideBarWidget() override; inline const QPixmap & icon() const { diff --git a/include/Song.h b/include/Song.h index cfe63a2ea..422e645bf 100644 --- a/include/Song.h +++ b/include/Song.h @@ -406,7 +406,7 @@ private slots: private: Song(); Song( const Song & ); - virtual ~Song(); + ~Song() override; inline bar_t currentBar() const diff --git a/include/SongEditor.h b/include/SongEditor.h index 29a9be0bf..b848fe776 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -66,7 +66,7 @@ public: }; SongEditor( Song * song ); - ~SongEditor(); + ~SongEditor() override; void saveSettings( QDomDocument& doc, QDomElement& element ) override; void loadSettings( const QDomElement& element ) override; diff --git a/include/StringPairDrag.h b/include/StringPairDrag.h index 9da2381b0..e58b88f90 100644 --- a/include/StringPairDrag.h +++ b/include/StringPairDrag.h @@ -44,7 +44,7 @@ class LMMS_EXPORT StringPairDrag : public QDrag public: StringPairDrag( const QString & _key, const QString & _value, const QPixmap & _icon, QWidget * _w ); - ~StringPairDrag(); + ~StringPairDrag() override; static bool processDragEnterEvent( QDragEnterEvent * _dee, const QString & _allowed_keys ); diff --git a/include/TabBar.h b/include/TabBar.h index 9239aef94..2395e15f5 100644 --- a/include/TabBar.h +++ b/include/TabBar.h @@ -46,7 +46,7 @@ class LMMS_EXPORT TabBar : public QWidget public: TabBar( QWidget * _parent, QBoxLayout::Direction _dir = QBoxLayout::LeftToRight ); - virtual ~TabBar() = default; + ~TabBar() override = default; TabButton * addTab( QWidget * _w, const QString & _text, int _id, bool _add_stretch = false, diff --git a/include/TabButton.h b/include/TabButton.h index d5d70fcac..6d58cc10e 100644 --- a/include/TabButton.h +++ b/include/TabButton.h @@ -45,7 +45,7 @@ public: SLOT( slotClicked() ) ); } - ~TabButton() + ~TabButton() override { } diff --git a/include/TabWidget.h b/include/TabWidget.h index fdd0123da..0f998e9e2 100644 --- a/include/TabWidget.h +++ b/include/TabWidget.h @@ -43,7 +43,7 @@ public: //! If false, all child widget will be cut down to the TabWidget's size TabWidget( const QString & _caption, QWidget * _parent, bool usePixmap = false, bool resizable = false ); - virtual ~TabWidget() = default; + ~TabWidget() override = default; void addTab( QWidget * w, const QString & name, const char *pixmap = nullptr, int idx = -1 ); diff --git a/include/TemplatesMenu.h b/include/TemplatesMenu.h index 45c7bce4b..7f425bd2f 100644 --- a/include/TemplatesMenu.h +++ b/include/TemplatesMenu.h @@ -37,7 +37,7 @@ class TemplatesMenu : public QMenu Q_OBJECT public: TemplatesMenu(QWidget *parent = nullptr); - virtual ~TemplatesMenu() = default; + ~TemplatesMenu() override = default; private slots: static void createNewProjectFromTemplate(QAction * _action); diff --git a/include/TempoSyncKnob.h b/include/TempoSyncKnob.h index 22a21f3dc..25a3b7e3b 100644 --- a/include/TempoSyncKnob.h +++ b/include/TempoSyncKnob.h @@ -42,7 +42,7 @@ class LMMS_EXPORT TempoSyncKnob : public Knob Q_OBJECT public: TempoSyncKnob( knobTypes knobNum, QWidget* parent = nullptr, const QString& name = QString() ); - virtual ~TempoSyncKnob(); + ~TempoSyncKnob() override; const QString & syncDescription(); void setSyncDescription( const QString & _new_description ); diff --git a/include/TextFloat.h b/include/TextFloat.h index 580c3b979..8a5ad9685 100644 --- a/include/TextFloat.h +++ b/include/TextFloat.h @@ -39,7 +39,7 @@ class LMMS_EXPORT TextFloat : public QWidget Q_OBJECT public: TextFloat(); - virtual ~TextFloat() + ~TextFloat() override { } diff --git a/include/TimeDisplayWidget.h b/include/TimeDisplayWidget.h index d8e38333a..33e23c222 100644 --- a/include/TimeDisplayWidget.h +++ b/include/TimeDisplayWidget.h @@ -39,7 +39,7 @@ class TimeDisplayWidget : public QWidget Q_OBJECT public: TimeDisplayWidget(); - virtual ~TimeDisplayWidget() = default; + ~TimeDisplayWidget() override = default; protected: diff --git a/include/TimeLineWidget.h b/include/TimeLineWidget.h index 4cbddcda4..bada25640 100644 --- a/include/TimeLineWidget.h +++ b/include/TimeLineWidget.h @@ -78,7 +78,7 @@ public: TimeLineWidget(int xoff, int yoff, float ppb, Song::PlayPos & pos, const TimePos & begin, Song::PlayModes mode, QWidget * parent); - virtual ~TimeLineWidget(); + ~TimeLineWidget() override; inline QColor const & getBarLineColor() const { return m_barLineColor; } inline void setBarLineColor(QColor const & barLineColor) { m_barLineColor = barLineColor; } diff --git a/include/ToolButton.h b/include/ToolButton.h index c6e80b4c2..c173a9052 100644 --- a/include/ToolButton.h +++ b/include/ToolButton.h @@ -43,7 +43,7 @@ public: QToolButton(_parent) { } - virtual ~ToolButton() = default; + ~ToolButton() override = default; } ; diff --git a/include/ToolPlugin.h b/include/ToolPlugin.h index 899c31906..311757cf4 100644 --- a/include/ToolPlugin.h +++ b/include/ToolPlugin.h @@ -38,7 +38,7 @@ class LMMS_EXPORT ToolPlugin : public Plugin { public: ToolPlugin( const Descriptor * _descriptor, Model * _parent ); - virtual ~ToolPlugin(); + ~ToolPlugin() override; // instantiate tool-plugin with given name or return NULL // on failure diff --git a/include/Track.h b/include/Track.h index ec069c38f..1cf3f94c2 100644 --- a/include/Track.h +++ b/include/Track.h @@ -85,7 +85,7 @@ public: } ; Track( TrackTypes type, TrackContainer * tc ); - virtual ~Track(); + ~Track() override; static Track * create( TrackTypes tt, TrackContainer * tc ); static Track * create( const QDomElement & element, diff --git a/include/TrackContainer.h b/include/TrackContainer.h index beb7564ad..c2344db85 100644 --- a/include/TrackContainer.h +++ b/include/TrackContainer.h @@ -57,7 +57,7 @@ public: } ; TrackContainer(); - virtual ~TrackContainer(); + ~TrackContainer() override; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; diff --git a/include/TrackContainerView.h b/include/TrackContainerView.h index edcffeb2f..7d9a648aa 100644 --- a/include/TrackContainerView.h +++ b/include/TrackContainerView.h @@ -73,7 +73,7 @@ class TrackContainerView : public QWidget, public ModelView, Q_OBJECT public: TrackContainerView( TrackContainer* tc ); - virtual ~TrackContainerView(); + ~TrackContainerView() override; void saveSettings( QDomDocument & _doc, QDomElement & _this ) override; void loadSettings( const QDomElement & _this ) override; @@ -184,7 +184,7 @@ private: { public: scrollArea( TrackContainerView* parent ); - virtual ~scrollArea(); + ~scrollArea() override; protected: void wheelEvent( QWheelEvent * _we ) override; diff --git a/include/TrackContentWidget.h b/include/TrackContentWidget.h index 228a3e739..4fad4ceb0 100644 --- a/include/TrackContentWidget.h +++ b/include/TrackContentWidget.h @@ -56,7 +56,7 @@ class TrackContentWidget : public QWidget, public JournallingObject public: TrackContentWidget( TrackView * parent ); - virtual ~TrackContentWidget(); + ~TrackContentWidget() override; /*! \brief Updates the background tile pixmap. */ void updateBackground(); diff --git a/include/TrackLabelButton.h b/include/TrackLabelButton.h index 3be64adee..30dd60d59 100644 --- a/include/TrackLabelButton.h +++ b/include/TrackLabelButton.h @@ -41,7 +41,7 @@ class TrackLabelButton : public QToolButton Q_OBJECT public: TrackLabelButton( TrackView * _tv, QWidget * _parent ); - virtual ~TrackLabelButton(); + ~TrackLabelButton() override; public slots: diff --git a/include/TrackOperationsWidget.h b/include/TrackOperationsWidget.h index 92f1a889c..08b3e599e 100644 --- a/include/TrackOperationsWidget.h +++ b/include/TrackOperationsWidget.h @@ -40,7 +40,7 @@ class TrackOperationsWidget : public QWidget Q_OBJECT public: TrackOperationsWidget( TrackView * parent ); - ~TrackOperationsWidget(); + ~TrackOperationsWidget() override; protected: diff --git a/include/TrackView.h b/include/TrackView.h index 2f5c5ed28..f98579201 100644 --- a/include/TrackView.h +++ b/include/TrackView.h @@ -64,7 +64,7 @@ class TrackView : public QWidget, public ModelView, public JournallingObject Q_OBJECT public: TrackView( Track * _track, TrackContainerView* tcv ); - virtual ~TrackView(); + ~TrackView() override; inline const Track * getTrack() const { diff --git a/include/VstSyncController.h b/include/VstSyncController.h index 947a65ea2..d5e6617cd 100644 --- a/include/VstSyncController.h +++ b/include/VstSyncController.h @@ -40,7 +40,7 @@ class VstSyncController : public QObject Q_OBJECT public: VstSyncController(); - ~VstSyncController(); + ~VstSyncController() override; void setAbsolutePosition( double ticks ); diff --git a/include/embed.h b/include/embed.h index 5dd6a41a2..23aebccec 100644 --- a/include/embed.h +++ b/include/embed.h @@ -120,7 +120,7 @@ public: { } - virtual QPixmap pixmap() const + QPixmap pixmap() const override { if( !m_name.isEmpty() ) { @@ -130,7 +130,7 @@ public: return( QPixmap() ); } - virtual QString pixmapName() const + QString pixmapName() const override { return QString( STRINGIFY(PLUGIN_NAME) ) + "::" + m_name; } diff --git a/plugins/Amplifier/Amplifier.h b/plugins/Amplifier/Amplifier.h index 941971ae7..cc973cc27 100644 --- a/plugins/Amplifier/Amplifier.h +++ b/plugins/Amplifier/Amplifier.h @@ -37,10 +37,10 @@ class AmplifierEffect : public Effect { public: AmplifierEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - virtual ~AmplifierEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); + ~AmplifierEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return &m_ampControls; } diff --git a/plugins/Amplifier/AmplifierControlDialog.h b/plugins/Amplifier/AmplifierControlDialog.h index 6362d5f72..fd2c7a338 100644 --- a/plugins/Amplifier/AmplifierControlDialog.h +++ b/plugins/Amplifier/AmplifierControlDialog.h @@ -42,7 +42,7 @@ class AmplifierControlDialog : public EffectControlDialog Q_OBJECT public: AmplifierControlDialog( AmplifierControls* controls ); - virtual ~AmplifierControlDialog() + ~AmplifierControlDialog() override { } diff --git a/plugins/Amplifier/AmplifierControls.h b/plugins/Amplifier/AmplifierControls.h index 7eaa0f099..6382b27fe 100644 --- a/plugins/Amplifier/AmplifierControls.h +++ b/plugins/Amplifier/AmplifierControls.h @@ -45,23 +45,23 @@ class AmplifierControls : public EffectControls Q_OBJECT public: AmplifierControls( AmplifierEffect* effect ); - virtual ~AmplifierControls() + ~AmplifierControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return "AmplifierControls"; } - virtual int controlCount() + int controlCount() override { return 4; } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::AmplifierControlDialog( this ); } diff --git a/plugins/BassBooster/BassBooster.h b/plugins/BassBooster/BassBooster.h index 9edca3b22..19eb9c50e 100644 --- a/plugins/BassBooster/BassBooster.h +++ b/plugins/BassBooster/BassBooster.h @@ -37,10 +37,10 @@ class BassBoosterEffect : public Effect { public: BassBoosterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - virtual ~BassBoosterEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); + ~BassBoosterEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return &m_bbControls; } diff --git a/plugins/BassBooster/BassBoosterControlDialog.h b/plugins/BassBooster/BassBoosterControlDialog.h index 89a60fa1a..968db7e60 100644 --- a/plugins/BassBooster/BassBoosterControlDialog.h +++ b/plugins/BassBooster/BassBoosterControlDialog.h @@ -40,7 +40,7 @@ class BassBoosterControlDialog : public EffectControlDialog Q_OBJECT public: BassBoosterControlDialog( BassBoosterControls* controls ); - virtual ~BassBoosterControlDialog() + ~BassBoosterControlDialog() override { } diff --git a/plugins/BassBooster/BassBoosterControls.h b/plugins/BassBooster/BassBoosterControls.h index c67ce4d7a..099862a02 100644 --- a/plugins/BassBooster/BassBoosterControls.h +++ b/plugins/BassBooster/BassBoosterControls.h @@ -39,23 +39,23 @@ class BassBoosterControls : public EffectControls Q_OBJECT public: BassBoosterControls( BassBoosterEffect* effect ); - virtual ~BassBoosterControls() + ~BassBoosterControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return "bassboostercontrols"; } - virtual int controlCount() + int controlCount() override { return 3; } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::BassBoosterControlDialog( this ); } diff --git a/plugins/BitInvader/BitInvader.h b/plugins/BitInvader/BitInvader.h index cce524beb..90a5dffa8 100644 --- a/plugins/BitInvader/BitInvader.h +++ b/plugins/BitInvader/BitInvader.h @@ -74,25 +74,25 @@ class BitInvader : public Instrument Q_OBJECT public: BitInvader(InstrumentTrack * _instrument_track ); - virtual ~BitInvader(); + ~BitInvader() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, - QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, + QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return( 64 ); } - virtual gui::PluginView * instantiateView( QWidget * _parent ); + gui::PluginView * instantiateView( QWidget * _parent ) override; protected slots: void lengthChanged(); @@ -124,7 +124,7 @@ public: BitInvaderView( Instrument * _instrument, QWidget * _parent ); - virtual ~BitInvaderView() {}; + ~BitInvaderView() override {}; protected slots: //void sampleSizeChanged( float _new_sample_length ); @@ -142,7 +142,7 @@ protected slots: void smoothClicked( void ); private: - virtual void modelChanged(); + void modelChanged() override; Knob * m_sampleLengthKnob; PixmapButton * m_sinWaveBtn; diff --git a/plugins/Bitcrush/Bitcrush.h b/plugins/Bitcrush/Bitcrush.h index 670742e20..a6e5556a2 100644 --- a/plugins/Bitcrush/Bitcrush.h +++ b/plugins/Bitcrush/Bitcrush.h @@ -40,10 +40,10 @@ class BitcrushEffect : public Effect { public: BitcrushEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - virtual ~BitcrushEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); + ~BitcrushEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return &m_controls; } diff --git a/plugins/Bitcrush/BitcrushControlDialog.h b/plugins/Bitcrush/BitcrushControlDialog.h index 49d5bce7e..9649d50f2 100644 --- a/plugins/Bitcrush/BitcrushControlDialog.h +++ b/plugins/Bitcrush/BitcrushControlDialog.h @@ -43,7 +43,7 @@ class BitcrushControlDialog : public EffectControlDialog Q_OBJECT public: BitcrushControlDialog( BitcrushControls * controls ); - virtual ~BitcrushControlDialog() + ~BitcrushControlDialog() override { } }; diff --git a/plugins/Bitcrush/BitcrushControls.h b/plugins/Bitcrush/BitcrushControls.h index ed69dd704..963fb298e 100644 --- a/plugins/Bitcrush/BitcrushControls.h +++ b/plugins/Bitcrush/BitcrushControls.h @@ -40,21 +40,21 @@ class BitcrushControls : public EffectControls Q_OBJECT public: BitcrushControls( BitcrushEffect * eff ); - virtual ~BitcrushControls(); + ~BitcrushControls() override; - virtual void saveSettings( QDomDocument & doc, QDomElement & elem ); - virtual void loadSettings( const QDomElement & elem ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & doc, QDomElement & elem ) override; + void loadSettings( const QDomElement & elem ) override; + inline QString nodeName() const override { return( "bitcrushcontrols" ); } - virtual int controlCount() + int controlCount() override { return( 9 ); } - virtual gui::EffectControlDialog * createView() + gui::EffectControlDialog * createView() override { return( new gui::BitcrushControlDialog( this ) ); } diff --git a/plugins/CarlaBase/Carla.h b/plugins/CarlaBase/Carla.h index 2010ac3c4..e04444f91 100644 --- a/plugins/CarlaBase/Carla.h +++ b/plugins/CarlaBase/Carla.h @@ -93,7 +93,7 @@ public: return !reg.exactMatch(name); } - inline virtual void loadSettings(const QDomElement& element, const QString& name = QString("value")) override + inline void loadSettings(const QDomElement& element, const QString& name = QString("value")) override { AutomatableModel::loadSettings(element, name); bool mustQuote = mustQuoteName(name); @@ -104,7 +104,7 @@ public: } } - inline virtual void saveSettings(QDomDocument& doc, QDomElement& element, + inline void saveSettings(QDomDocument& doc, QDomElement& element, const QString& name = QString( "value" )) override { if (m_isEnabled) @@ -177,7 +177,7 @@ public: static const uint32_t kMaxMidiEvents = 512; CarlaInstrument(InstrumentTrack* const instrumentTrack, const Descriptor* const descriptor, const bool isPatchbay); - virtual ~CarlaInstrument(); + ~CarlaInstrument() override; // Carla NativeHostDescriptor functions uint32_t handleGetBufferSize() const; @@ -189,13 +189,13 @@ public: intptr_t handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt); // LMMS functions - virtual Flags flags() const; - virtual QString nodeName() const; - virtual void saveSettings(QDomDocument& doc, QDomElement& parent); - virtual void loadSettings(const QDomElement& elem); - virtual void play(sampleFrame* workingBuffer); - virtual bool handleMidiEvent(const MidiEvent& event, const TimePos& time, f_cnt_t offset); - virtual gui::PluginView* instantiateView(QWidget* parent); + Flags flags() const override; + QString nodeName() const override; + void saveSettings(QDomDocument& doc, QDomElement& parent) override; + void loadSettings(const QDomElement& elem) override; + void play(sampleFrame* workingBuffer) override; + bool handleMidiEvent(const MidiEvent& event, const TimePos& time, f_cnt_t offset) override; + gui::PluginView* instantiateView(QWidget* parent) override; signals: void uiClosed(); @@ -255,7 +255,7 @@ public: setWindowFlags(windowFlags); } - virtual void resizeEvent(QResizeEvent * event) override + void resizeEvent(QResizeEvent * event) override { if (mousePress) { resizing = true; @@ -263,13 +263,13 @@ public: SubWindow::resizeEvent(event); } - virtual void mousePressEvent(QMouseEvent * event) override + void mousePressEvent(QMouseEvent * event) override { mousePress = true; SubWindow::mousePressEvent(event); } - virtual void mouseReleaseEvent(QMouseEvent * event) override + void mouseReleaseEvent(QMouseEvent * event) override { if (resizing) { resizing = false; @@ -279,7 +279,7 @@ public: SubWindow::mouseReleaseEvent(event); } - virtual void closeEvent(QCloseEvent * event) override + void closeEvent(QCloseEvent * event) override { emit uiClosed(); event->accept(); @@ -298,7 +298,7 @@ class CarlaInstrumentView : public InstrumentViewFixedSize public: CarlaInstrumentView(CarlaInstrument* const instrument, QWidget* const parent); - virtual ~CarlaInstrumentView(); + ~CarlaInstrumentView() override; private slots: void toggleUI(bool); @@ -307,8 +307,8 @@ private slots: void paramsUiClosed(); private: - virtual void modelChanged(); - virtual void timerEvent(QTimerEvent*); + void modelChanged() override; + void timerEvent(QTimerEvent*) override; NativePluginHandle fHandle; const NativePluginDescriptor* fDescriptor; @@ -333,7 +333,7 @@ class CarlaParamsView : public InstrumentView Q_OBJECT public: CarlaParamsView(CarlaInstrumentView* const instrumentView, QWidget* const parent); - virtual ~CarlaParamsView(); + ~CarlaParamsView() override; signals: void uiClosed(); diff --git a/plugins/CrossoverEQ/CrossoverEQ.h b/plugins/CrossoverEQ/CrossoverEQ.h index 4e5872f0c..fe9b4541b 100644 --- a/plugins/CrossoverEQ/CrossoverEQ.h +++ b/plugins/CrossoverEQ/CrossoverEQ.h @@ -39,10 +39,10 @@ class CrossoverEQEffect : public Effect { public: CrossoverEQEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - virtual ~CrossoverEQEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); + ~CrossoverEQEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return &m_controls; } diff --git a/plugins/CrossoverEQ/CrossoverEQControlDialog.h b/plugins/CrossoverEQ/CrossoverEQControlDialog.h index f28366557..bad64a8bb 100644 --- a/plugins/CrossoverEQ/CrossoverEQControlDialog.h +++ b/plugins/CrossoverEQ/CrossoverEQControlDialog.h @@ -45,7 +45,7 @@ class CrossoverEQControlDialog : public EffectControlDialog Q_OBJECT public: CrossoverEQControlDialog( CrossoverEQControls * controls ); - virtual ~CrossoverEQControlDialog() + ~CrossoverEQControlDialog() override { } diff --git a/plugins/CrossoverEQ/CrossoverEQControls.h b/plugins/CrossoverEQ/CrossoverEQControls.h index 7f9417365..458300d89 100644 --- a/plugins/CrossoverEQ/CrossoverEQControls.h +++ b/plugins/CrossoverEQ/CrossoverEQControls.h @@ -40,21 +40,21 @@ class CrossoverEQControls : public EffectControls Q_OBJECT public: CrossoverEQControls( CrossoverEQEffect * eff ); - virtual ~CrossoverEQControls() {} + ~CrossoverEQControls() override {} - virtual void saveSettings( QDomDocument & doc, QDomElement & elem ); - virtual void loadSettings( const QDomElement & elem ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & doc, QDomElement & elem ) override; + void loadSettings( const QDomElement & elem ) override; + inline QString nodeName() const override { return( "crossoevereqcontrols" ); } - virtual int controlCount() + int controlCount() override { return( 11 ); } - virtual gui::EffectControlDialog * createView() + gui::EffectControlDialog * createView() override { return( new gui::CrossoverEQControlDialog( this ) ); } diff --git a/plugins/Delay/DelayControls.h b/plugins/Delay/DelayControls.h index 4f4b193f4..3d9393b76 100644 --- a/plugins/Delay/DelayControls.h +++ b/plugins/Delay/DelayControls.h @@ -40,19 +40,19 @@ class DelayControls : public EffectControls Q_OBJECT public: DelayControls( DelayEffect* effect ); - virtual ~DelayControls() + ~DelayControls() override { } - virtual void saveSettings( QDomDocument& doc, QDomElement& parent ); - virtual void loadSettings( const QDomElement& _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument& doc, QDomElement& parent ) override; + void loadSettings( const QDomElement& _this ) override; + inline QString nodeName() const override { return "Delay"; } - virtual int controlCount(){ + int controlCount() override{ return 5; } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::DelayControlsDialog( this ); } diff --git a/plugins/Delay/DelayControlsDialog.h b/plugins/Delay/DelayControlsDialog.h index 9ab349d4e..115287cda 100644 --- a/plugins/Delay/DelayControlsDialog.h +++ b/plugins/Delay/DelayControlsDialog.h @@ -42,7 +42,7 @@ class DelayControlsDialog : public EffectControlDialog Q_OBJECT public: DelayControlsDialog( DelayControls* controls ); - virtual ~DelayControlsDialog() + ~DelayControlsDialog() override { } }; @@ -52,13 +52,13 @@ class XyPad : public QWidget Q_OBJECT public: XyPad( QWidget *parent = 0, FloatModel *xModel = 0, FloatModel *yModel = 0 ); - ~XyPad() {} + ~XyPad() override {} protected: - virtual void paintEvent ( QPaintEvent * event ); - virtual void mousePressEvent(QMouseEvent * event ); - virtual void mouseReleaseEvent(QMouseEvent * event); - virtual void mouseMoveEvent(QMouseEvent * event); + void paintEvent ( QPaintEvent * event ) override; + void mousePressEvent(QMouseEvent * event ) override; + void mouseReleaseEvent(QMouseEvent * event) override; + void mouseMoveEvent(QMouseEvent * event) override; private: FloatModel *m_xModel; diff --git a/plugins/Delay/DelayEffect.h b/plugins/Delay/DelayEffect.h index 2757d6cc4..b6c090ff0 100644 --- a/plugins/Delay/DelayEffect.h +++ b/plugins/Delay/DelayEffect.h @@ -38,9 +38,9 @@ class DelayEffect : public Effect { public: DelayEffect(Model* parent , const Descriptor::SubPluginFeatures::Key* key ); - virtual ~DelayEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); - virtual EffectControls* controls() + ~DelayEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; + EffectControls* controls() override { return &m_delayControls; } diff --git a/plugins/DualFilter/DualFilter.h b/plugins/DualFilter/DualFilter.h index bfc9dc81b..c179edbcc 100644 --- a/plugins/DualFilter/DualFilter.h +++ b/plugins/DualFilter/DualFilter.h @@ -39,10 +39,10 @@ class DualFilterEffect : public Effect { public: DualFilterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - virtual ~DualFilterEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); + ~DualFilterEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return &m_dfControls; } diff --git a/plugins/DualFilter/DualFilterControlDialog.h b/plugins/DualFilter/DualFilterControlDialog.h index a6ac46954..88b3fe17a 100644 --- a/plugins/DualFilter/DualFilterControlDialog.h +++ b/plugins/DualFilter/DualFilterControlDialog.h @@ -43,7 +43,7 @@ class DualFilterControlDialog : public EffectControlDialog Q_OBJECT public: DualFilterControlDialog( DualFilterControls* controls ); - virtual ~DualFilterControlDialog() + ~DualFilterControlDialog() override { } diff --git a/plugins/DualFilter/DualFilterControls.h b/plugins/DualFilter/DualFilterControls.h index 586b2d15a..a3676295d 100644 --- a/plugins/DualFilter/DualFilterControls.h +++ b/plugins/DualFilter/DualFilterControls.h @@ -42,23 +42,23 @@ class DualFilterControls : public EffectControls Q_OBJECT public: DualFilterControls( DualFilterEffect* effect ); - virtual ~DualFilterControls() + ~DualFilterControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return "DualFilterControls"; } - virtual int controlCount() + int controlCount() override { return 11; } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::DualFilterControlDialog( this ); } diff --git a/plugins/DynamicsProcessor/DynamicsProcessor.h b/plugins/DynamicsProcessor/DynamicsProcessor.h index 91763e682..576accdcc 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessor.h +++ b/plugins/DynamicsProcessor/DynamicsProcessor.h @@ -41,11 +41,11 @@ class DynProcEffect : public Effect public: DynProcEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~DynProcEffect(); - virtual bool processAudioBuffer( sampleFrame * _buf, - const fpp_t _frames ); + ~DynProcEffect() override; + bool processAudioBuffer( sampleFrame * _buf, + const fpp_t _frames ) override; - virtual EffectControls * controls() + EffectControls * controls() override { return( &m_dpControls ); } diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h index 0b4091b30..8b755620e 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h +++ b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h @@ -43,7 +43,7 @@ class DynProcControlDialog : public EffectControlDialog Q_OBJECT public: DynProcControlDialog( DynProcControls * _controls ); - virtual ~DynProcControlDialog() + ~DynProcControlDialog() override { } diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControls.h b/plugins/DynamicsProcessor/DynamicsProcessorControls.h index cb9aebb6a..c68bdcc0c 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControls.h +++ b/plugins/DynamicsProcessor/DynamicsProcessorControls.h @@ -49,25 +49,25 @@ public: NumStereoModes }; DynProcControls( DynProcEffect * _eff ); - virtual ~DynProcControls() + ~DynProcControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return( "dynamicsprocessor_controls" ); } virtual void setDefaultShape(); - virtual int controlCount() + int controlCount() override { return( 6 ); } - virtual gui::EffectControlDialog * createView() + gui::EffectControlDialog * createView() override { return( new gui::DynProcControlDialog( this ) ); } diff --git a/plugins/Eq/EqControls.h b/plugins/Eq/EqControls.h index 8a2061cce..9b0d67742 100644 --- a/plugins/Eq/EqControls.h +++ b/plugins/Eq/EqControls.h @@ -44,25 +44,25 @@ class EqControls : public EffectControls Q_OBJECT public: explicit EqControls( EqEffect* effect ); - virtual ~EqControls() + ~EqControls() override { } - virtual void saveSettings ( QDomDocument& doc, QDomElement& parent ); + void saveSettings ( QDomDocument& doc, QDomElement& parent ) override; - virtual void loadSettings ( const QDomElement &_this ); + void loadSettings ( const QDomElement &_this ) override; - inline virtual QString nodeName() const + inline QString nodeName() const override { return "Eq"; } - virtual int controlCount() + int controlCount() override { return 42; } - virtual gui::EffectControlDialog* createView(); + gui::EffectControlDialog* createView() override; float m_inPeakL; float m_inPeakR; diff --git a/plugins/Eq/EqControlsDialog.h b/plugins/Eq/EqControlsDialog.h index 297737699..1ec7e3e9a 100644 --- a/plugins/Eq/EqControlsDialog.h +++ b/plugins/Eq/EqControlsDialog.h @@ -47,7 +47,7 @@ class EqControlsDialog : public EffectControlDialog Q_OBJECT public: EqControlsDialog( EqControls * controls ); - virtual ~EqControlsDialog() + ~EqControlsDialog() override { } @@ -57,7 +57,7 @@ private: EqControls * m_controls; EqParameterWidget * m_parameterWidget; - virtual void mouseDoubleClickEvent(QMouseEvent *event); + void mouseDoubleClickEvent(QMouseEvent *event) override; EqBand *setBand( int index, BoolModel *active, FloatModel *freq, FloatModel *res, FloatModel *gain, QColor color, QString name, float *peakL, float *peakR, BoolModel *hp12, BoolModel *hp24, BoolModel *hp48, BoolModel *lp12, BoolModel *lp24, BoolModel *lp48 ); diff --git a/plugins/Eq/EqCurve.h b/plugins/Eq/EqCurve.h index c7e7d0688..e01e30841 100644 --- a/plugins/Eq/EqCurve.h +++ b/plugins/Eq/EqCurve.h @@ -55,7 +55,7 @@ public: static float gainToYPixel( float gain, int h, float pixelPerUnitHeight ); static float yPixelToGain( float y, int h, float pixelPerUnitHeight ); - QRectF boundingRect() const; + QRectF boundingRect() const override; QPainterPath getCurvePath(); float getPeakCurve( float x ); float getHighShelfCurve( float x ); @@ -83,13 +83,13 @@ signals: void positionChanged(); protected: - void mousePressEvent( QGraphicsSceneMouseEvent *event ); - void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ); - void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ); - void wheelEvent( QGraphicsSceneWheelEvent *wevent ); - void hoverEnterEvent( QGraphicsSceneHoverEvent *hevent ); - void hoverLeaveEvent( QGraphicsSceneHoverEvent *hevent ); - QVariant itemChange( GraphicsItemChange change, const QVariant &value ); + void mousePressEvent( QGraphicsSceneMouseEvent *event ) override; + void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ) override; + void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) override; + void wheelEvent( QGraphicsSceneWheelEvent *wevent ) override; + void hoverEnterEvent( QGraphicsSceneHoverEvent *hevent ) override; + void hoverLeaveEvent( QGraphicsSceneHoverEvent *hevent ) override; + QVariant itemChange( GraphicsItemChange change, const QVariant &value ) override; private: double calculateGain( const double freq, const double a1, const double a2, const double b0, const double b1, const double b2 ); @@ -120,11 +120,11 @@ class EqCurve : public QGraphicsObject Q_OBJECT public: EqCurve( QList *handle, int x, int y ); - QRectF boundingRect() const; + QRectF boundingRect() const override; void setModelChanged(bool mc); protected: - void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ); + void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) override; private: QList *m_handle; diff --git a/plugins/Eq/EqEffect.h b/plugins/Eq/EqEffect.h index 3697a11e2..e3bf6fd54 100644 --- a/plugins/Eq/EqEffect.h +++ b/plugins/Eq/EqEffect.h @@ -36,9 +36,9 @@ class EqEffect : public Effect { public: EqEffect( Model * parent , const Descriptor::SubPluginFeatures::Key * key ); - virtual ~EqEffect(); - virtual bool processAudioBuffer( sampleFrame * buf, const fpp_t frames ); - virtual EffectControls * controls() + ~EqEffect() override; + bool processAudioBuffer( sampleFrame * buf, const fpp_t frames ) override; + EffectControls * controls() override { return &m_eqControls; } diff --git a/plugins/Eq/EqFader.h b/plugins/Eq/EqFader.h index 1601081e9..aec6a9e18 100644 --- a/plugins/Eq/EqFader.h +++ b/plugins/Eq/EqFader.h @@ -72,7 +72,7 @@ public: - ~EqFader() + ~EqFader() override { } diff --git a/plugins/Eq/EqFilter.h b/plugins/Eq/EqFilter.h index 7361c751c..c64f6d5c3 100644 --- a/plugins/Eq/EqFilter.h +++ b/plugins/Eq/EqFilter.h @@ -181,7 +181,7 @@ protected: class EqHp12Filter : public EqFilter { public : - virtual void calcCoefficents() + void calcCoefficents() override { // calc intermediate @@ -226,7 +226,7 @@ public : class EqLp12Filter : public EqFilter { public : - virtual void calcCoefficents() + void calcCoefficents() override { // calc intermediate @@ -270,7 +270,7 @@ class EqPeakFilter : public EqFilter public: - virtual void calcCoefficents() + void calcCoefficents() override { // calc intermediate float w0 = F_2PI * m_freq / m_sampleRate; @@ -300,7 +300,7 @@ public: setCoeffs( a1, a2, b0, b1, b2 ); } - virtual inline void setParameters( float sampleRate, float freq, float bw, float gain ) + inline void setParameters( float sampleRate, float freq, float bw, float gain ) override { bool hasChanged = false; if( sampleRate != m_sampleRate ) @@ -334,7 +334,7 @@ public: class EqLowShelfFilter : public EqFilter { public : - virtual void calcCoefficents() + void calcCoefficents() override { // calc intermediate @@ -373,7 +373,7 @@ public : class EqHighShelfFilter : public EqFilter { public : - virtual void calcCoefficents() + void calcCoefficents() override { // calc intermediate diff --git a/plugins/Eq/EqParameterWidget.h b/plugins/Eq/EqParameterWidget.h index abfe5a9bb..f80499395 100644 --- a/plugins/Eq/EqParameterWidget.h +++ b/plugins/Eq/EqParameterWidget.h @@ -74,7 +74,7 @@ class EqParameterWidget : public QWidget Q_OBJECT public: explicit EqParameterWidget( QWidget *parent = 0, EqControls * controls = 0 ); - ~EqParameterWidget(); + ~EqParameterWidget() override; QList *m_handleList; const int bandCount() diff --git a/plugins/Eq/EqSpectrumView.h b/plugins/Eq/EqSpectrumView.h index c9bfebeb5..f0a8fda3c 100644 --- a/plugins/Eq/EqSpectrumView.h +++ b/plugins/Eq/EqSpectrumView.h @@ -74,7 +74,7 @@ class EqSpectrumView : public QWidget Q_OBJECT public: explicit EqSpectrumView( EqAnalyser *b, QWidget *_parent = 0 ); - virtual ~EqSpectrumView() + ~EqSpectrumView() override { } @@ -82,7 +82,7 @@ public: void setColor( const QColor &value ); protected: - virtual void paintEvent( QPaintEvent *event ); + void paintEvent( QPaintEvent *event ) override; private slots: void periodicalUpdate(); diff --git a/plugins/Flanger/FlangerControls.h b/plugins/Flanger/FlangerControls.h index 1d112bc99..b004e5e33 100644 --- a/plugins/Flanger/FlangerControls.h +++ b/plugins/Flanger/FlangerControls.h @@ -39,20 +39,20 @@ class FlangerControls : public EffectControls Q_OBJECT public: FlangerControls( FlangerEffect* effect ); - virtual ~FlangerControls() + ~FlangerControls() override { } - virtual void saveSettings ( QDomDocument& doc, QDomElement& parent ); - virtual void loadSettings ( const QDomElement &_this ); - inline virtual QString nodeName() const + void saveSettings ( QDomDocument& doc, QDomElement& parent ) override; + void loadSettings ( const QDomElement &_this ) override; + inline QString nodeName() const override { return "Flanger"; } - virtual int controlCount() + int controlCount() override { return 7; } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::FlangerControlsDialog( this ); } diff --git a/plugins/Flanger/FlangerControlsDialog.h b/plugins/Flanger/FlangerControlsDialog.h index 6aed1b6b4..587046ad7 100644 --- a/plugins/Flanger/FlangerControlsDialog.h +++ b/plugins/Flanger/FlangerControlsDialog.h @@ -42,7 +42,7 @@ class FlangerControlsDialog : public EffectControlDialog Q_OBJECT public: FlangerControlsDialog( FlangerControls* controls ); - virtual ~FlangerControlsDialog() + ~FlangerControlsDialog() override { } }; diff --git a/plugins/Flanger/FlangerEffect.h b/plugins/Flanger/FlangerEffect.h index d32429194..45dd5cafd 100644 --- a/plugins/Flanger/FlangerEffect.h +++ b/plugins/Flanger/FlangerEffect.h @@ -44,9 +44,9 @@ class FlangerEffect : public Effect { public: FlangerEffect( Model* parent , const Descriptor::SubPluginFeatures::Key* key ); - virtual ~FlangerEffect(); - virtual bool processAudioBuffer( sampleFrame *buf, const fpp_t frames ); - virtual EffectControls* controls() + ~FlangerEffect() override; + bool processAudioBuffer( sampleFrame *buf, const fpp_t frames ) override; + EffectControls* controls() override { return &m_flangerControls; } diff --git a/plugins/FreeBoy/FreeBoy.h b/plugins/FreeBoy/FreeBoy.h index 6f92b41e9..8b46a5e68 100644 --- a/plugins/FreeBoy/FreeBoy.h +++ b/plugins/FreeBoy/FreeBoy.h @@ -52,21 +52,21 @@ class FreeBoyInstrument : public Instrument public: FreeBoyInstrument( InstrumentTrack * _instrument_track ); - virtual ~FreeBoyInstrument(); + ~FreeBoyInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const; + f_cnt_t desiredReleaseFrames() const override; - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; /*public slots: @@ -129,10 +129,10 @@ class FreeBoyInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: FreeBoyInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~FreeBoyInstrumentView(); + ~FreeBoyInstrumentView() override; private: - virtual void modelChanged(); + void modelChanged() override; Knob * m_ch1SweepTimeKnob; PixmapButton * m_ch1SweepDirButton; diff --git a/plugins/GigPlayer/GigPlayer.h b/plugins/GigPlayer/GigPlayer.h index c192ee4ae..5adeddc3e 100644 --- a/plugins/GigPlayer/GigPlayer.h +++ b/plugins/GigPlayer/GigPlayer.h @@ -243,35 +243,35 @@ class GigInstrument : public Instrument public: GigInstrument( InstrumentTrack * _instrument_track ); - virtual ~GigInstrument(); + ~GigInstrument() override; - virtual void play( sampleFrame * _working_buffer ); + void play( sampleFrame * _working_buffer ) override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual void loadFile( const QString & _file ); + void loadFile( const QString & _file ) override; - virtual AutomatableModel * childModel( const QString & _modelName ); + AutomatableModel * childModel( const QString & _modelName ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return 0; } - virtual Flags flags() const + Flags flags() const override { return IsSingleStreamed|IsNotBendable; } - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; QString getCurrentPatchName(); @@ -352,10 +352,10 @@ class GigInstrumentView : public InstrumentViewFixedSize public: GigInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~GigInstrumentView(); + ~GigInstrumentView() override; private: - virtual void modelChanged(); + void modelChanged() override; PixmapButton * m_fileDialogButton; PixmapButton * m_patchDialogButton; diff --git a/plugins/GigPlayer/PatchesDialog.cpp b/plugins/GigPlayer/PatchesDialog.cpp index a5066c2af..3f7035c61 100644 --- a/plugins/GigPlayer/PatchesDialog.cpp +++ b/plugins/GigPlayer/PatchesDialog.cpp @@ -42,7 +42,7 @@ public: : QTreeWidgetItem( pListView, pItemAfter ) {} // Sort/compare overriden method. - bool operator< ( const QTreeWidgetItem& other ) const + bool operator< ( const QTreeWidgetItem& other ) const override { int iColumn = QTreeWidgetItem::treeWidget()->sortColumn(); const QString& s1 = text( iColumn ); diff --git a/plugins/GigPlayer/PatchesDialog.h b/plugins/GigPlayer/PatchesDialog.h index c43b4cb5c..4912f2bc1 100644 --- a/plugins/GigPlayer/PatchesDialog.h +++ b/plugins/GigPlayer/PatchesDialog.h @@ -50,7 +50,7 @@ public: PatchesDialog(QWidget * pParent = 0, Qt::WindowFlags wflags = QFlag(0)); // Destructor. - virtual ~PatchesDialog(); + ~PatchesDialog() override; void setup( GigInstance * pSynth, int iChan, const QString & chanName, @@ -64,8 +64,8 @@ public slots: protected slots: - void accept(); - void reject(); + void accept() override; + void reject() override; protected: diff --git a/plugins/HydrogenImport/HydrogenImport.h b/plugins/HydrogenImport/HydrogenImport.h index 657d61f0c..a9398d18f 100644 --- a/plugins/HydrogenImport/HydrogenImport.h +++ b/plugins/HydrogenImport/HydrogenImport.h @@ -15,14 +15,14 @@ public: HydrogenImport( const QString & _file ); bool readSong(); - virtual ~HydrogenImport(); + ~HydrogenImport() override; - virtual gui::PluginView* instantiateView( QWidget * ) + gui::PluginView* instantiateView( QWidget * ) override { return( nullptr ); } private: - virtual bool tryImport( TrackContainer* tc ); + bool tryImport( TrackContainer* tc ) override; }; diff --git a/plugins/Kicker/Kicker.h b/plugins/Kicker/Kicker.h index f48a5ab12..10c77fe0f 100644 --- a/plugins/Kicker/Kicker.h +++ b/plugins/Kicker/Kicker.h @@ -54,28 +54,28 @@ class KickerInstrument : public Instrument Q_OBJECT public: KickerInstrument( InstrumentTrack * _instrument_track ); - virtual ~KickerInstrument(); + ~KickerInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual Flags flags() const + Flags flags() const override { return IsNotBendable; } - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return( 512 ); } - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; private: @@ -109,10 +109,10 @@ class KickerInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: KickerInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~KickerInstrumentView(); + ~KickerInstrumentView() override; private: - virtual void modelChanged(); + void modelChanged() override; Knob * m_startFreqKnob; Knob * m_endFreqKnob; diff --git a/plugins/LadspaBrowser/LadspaBrowser.h b/plugins/LadspaBrowser/LadspaBrowser.h index f1f88872c..93533906e 100644 --- a/plugins/LadspaBrowser/LadspaBrowser.h +++ b/plugins/LadspaBrowser/LadspaBrowser.h @@ -46,7 +46,7 @@ class LadspaBrowserView : public ToolPluginView Q_OBJECT public: LadspaBrowserView( ToolPlugin * _tool ); - virtual ~LadspaBrowserView(); + ~LadspaBrowserView() override; public slots: @@ -69,22 +69,22 @@ class LadspaBrowser : public ToolPlugin { public: LadspaBrowser(); - virtual ~LadspaBrowser(); + ~LadspaBrowser() override; - virtual gui::PluginView* instantiateView( QWidget * ) + gui::PluginView* instantiateView( QWidget * ) override { return new gui::LadspaBrowserView( this ); } - virtual QString nodeName() const; + QString nodeName() const override; - virtual void saveSettings( QDomDocument& doc, QDomElement& element ) + void saveSettings( QDomDocument& doc, QDomElement& element ) override { Q_UNUSED(doc) Q_UNUSED(element) } - virtual void loadSettings( const QDomElement& element ) + void loadSettings( const QDomElement& element ) override { Q_UNUSED(element) } diff --git a/plugins/LadspaBrowser/LadspaDescription.h b/plugins/LadspaBrowser/LadspaDescription.h index 0e54acd32..1d2b03fac 100644 --- a/plugins/LadspaBrowser/LadspaDescription.h +++ b/plugins/LadspaBrowser/LadspaDescription.h @@ -44,7 +44,7 @@ class LadspaDescription : public QWidget Q_OBJECT public: LadspaDescription( QWidget * _parent, LadspaPluginType _type ); - virtual ~LadspaDescription(); + ~LadspaDescription() override; signals: diff --git a/plugins/LadspaBrowser/LadspaPortDialog.h b/plugins/LadspaBrowser/LadspaPortDialog.h index 1473b1ecf..3f7d83df7 100644 --- a/plugins/LadspaBrowser/LadspaPortDialog.h +++ b/plugins/LadspaBrowser/LadspaPortDialog.h @@ -40,7 +40,7 @@ class LadspaPortDialog : public QDialog Q_OBJECT public: LadspaPortDialog( const ladspa_key_t & _key ); - virtual ~LadspaPortDialog(); + ~LadspaPortDialog() override; }; diff --git a/plugins/LadspaEffect/LadspaControlDialog.h b/plugins/LadspaEffect/LadspaControlDialog.h index 3a102599b..25df5ee11 100644 --- a/plugins/LadspaEffect/LadspaControlDialog.h +++ b/plugins/LadspaEffect/LadspaControlDialog.h @@ -50,7 +50,7 @@ class LadspaControlDialog : public EffectControlDialog Q_OBJECT public: LadspaControlDialog( LadspaControls * _ctl ); - ~LadspaControlDialog(); + ~LadspaControlDialog() override; private slots: diff --git a/plugins/LadspaEffect/LadspaControls.h b/plugins/LadspaEffect/LadspaControls.h index e8f8863cf..b84202012 100644 --- a/plugins/LadspaEffect/LadspaControls.h +++ b/plugins/LadspaEffect/LadspaControls.h @@ -43,21 +43,21 @@ class LadspaControls : public EffectControls Q_OBJECT public: LadspaControls( LadspaEffect * _eff ); - virtual ~LadspaControls(); + ~LadspaControls() override; - inline int controlCount() + inline int controlCount() override { return m_controlCount; } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return "ladspacontrols"; } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::LadspaControlDialog( this ); } diff --git a/plugins/LadspaEffect/LadspaEffect.h b/plugins/LadspaEffect/LadspaEffect.h index 153e2adeb..0bb0f2126 100644 --- a/plugins/LadspaEffect/LadspaEffect.h +++ b/plugins/LadspaEffect/LadspaEffect.h @@ -46,14 +46,14 @@ class LadspaEffect : public Effect public: LadspaEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~LadspaEffect(); + ~LadspaEffect() override; - virtual bool processAudioBuffer( sampleFrame * _buf, - const fpp_t _frames ); + bool processAudioBuffer( sampleFrame * _buf, + const fpp_t _frames ) override; void setControl( int _control, LADSPA_Data _data ); - virtual EffectControls * controls() + EffectControls * controls() override { return m_controls; } diff --git a/plugins/LadspaEffect/LadspaSubPluginFeatures.h b/plugins/LadspaEffect/LadspaSubPluginFeatures.h index 36edeebd3..c65dce9fe 100644 --- a/plugins/LadspaEffect/LadspaSubPluginFeatures.h +++ b/plugins/LadspaEffect/LadspaSubPluginFeatures.h @@ -44,7 +44,7 @@ public: void fillDescriptionWidget( QWidget * _parent, const Key * _key ) const override; - virtual void listSubPluginKeys( const Plugin::Descriptor * _desc, + void listSubPluginKeys( const Plugin::Descriptor * _desc, KeyList & _kl ) const override; diff --git a/plugins/Lb302/Lb302.h b/plugins/Lb302/Lb302.h index 550c3d00a..770fb451e 100644 --- a/plugins/Lb302/Lb302.h +++ b/plugins/Lb302/Lb302.h @@ -92,11 +92,11 @@ class Lb302FilterIIR2 : public Lb302Filter { public: Lb302FilterIIR2(Lb302FilterKnobState* p_fs); - virtual ~Lb302FilterIIR2(); + ~Lb302FilterIIR2() override; - virtual void recalc(); - virtual void envRecalc(); - virtual float process(const float& samp); + void recalc() override; + void envRecalc() override; + float process(const float& samp) override; protected: float vcf_d1, // d1 and d2 are added back into the sample with @@ -118,9 +118,9 @@ class Lb302Filter3Pole : public Lb302Filter Lb302Filter3Pole(Lb302FilterKnobState* p_fs); //virtual void recalc(); - virtual void envRecalc(); - virtual void recalc(); - virtual float process(const float& samp); + void envRecalc() override; + void recalc() override; + float process(const float& samp) override; protected: float kfcn, @@ -150,30 +150,30 @@ class Lb302Synth : public Instrument Q_OBJECT public: Lb302Synth( InstrumentTrack * _instrument_track ); - virtual ~Lb302Synth(); + ~Lb302Synth() override; - virtual void play( sampleFrame * _working_buffer ); - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void play( sampleFrame * _working_buffer ) override; + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual Flags flags() const + Flags flags() const override { return IsSingleStreamed; } - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return 0; //4048; } - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; private: void processNote( NotePlayHandle * n ); @@ -277,10 +277,10 @@ class Lb302SynthView : public InstrumentViewFixedSize public: Lb302SynthView( Instrument * _instrument, QWidget * _parent ); - virtual ~Lb302SynthView(); + ~Lb302SynthView() override; private: - virtual void modelChanged(); + void modelChanged() override; Knob * m_vcfCutKnob; Knob * m_vcfResKnob; diff --git a/plugins/MidiExport/MidiExport.h b/plugins/MidiExport/MidiExport.h index f443c965f..ccbb370ca 100644 --- a/plugins/MidiExport/MidiExport.h +++ b/plugins/MidiExport/MidiExport.h @@ -63,16 +63,16 @@ class MidiExport: public ExportFilter // Q_OBJECT public: MidiExport(); - ~MidiExport(); + ~MidiExport() override; - virtual gui::PluginView* instantiateView(QWidget *) + gui::PluginView* instantiateView(QWidget *) override { return nullptr; } - virtual bool tryExport(const TrackContainer::TrackList &tracks, + bool tryExport(const TrackContainer::TrackList &tracks, const TrackContainer::TrackList &patternTracks, - int tempo, int masterPitch, const QString &filename); + int tempo, int masterPitch, const QString &filename) override; private: void writeMidiClip(MidiNoteVector &midiClip, const QDomNode& n, diff --git a/plugins/MidiImport/MidiImport.h b/plugins/MidiImport/MidiImport.h index a7ab478a2..bb2893116 100644 --- a/plugins/MidiImport/MidiImport.h +++ b/plugins/MidiImport/MidiImport.h @@ -41,16 +41,16 @@ class MidiImport : public ImportFilter Q_OBJECT public: MidiImport( const QString & _file ); - virtual ~MidiImport(); + ~MidiImport() override; - virtual gui::PluginView* instantiateView( QWidget * ) + gui::PluginView* instantiateView( QWidget * ) override { return( nullptr ); } private: - virtual bool tryImport( TrackContainer* tc ); + bool tryImport( TrackContainer* tc ) override; bool readSMF( TrackContainer* tc ); bool readRIFF( TrackContainer* tc ); diff --git a/plugins/MidiImport/portsmf/allegro.h b/plugins/MidiImport/portsmf/allegro.h index 698801f78..e21a8f817 100644 --- a/plugins/MidiImport/portsmf/allegro.h +++ b/plugins/MidiImport/portsmf/allegro.h @@ -293,26 +293,26 @@ public: typedef class Alg_note : public Alg_event { public: - virtual ~Alg_note(); + ~Alg_note() override; Alg_note(Alg_note *); // copy constructor float pitch; // pitch in semitones (69 = A440) float loud; // dynamic corresponding to MIDI velocity double dur; // duration in seconds (normally to release point) Alg_parameters_ptr parameters; // attribute/value pair list Alg_note() { type = 'n'; parameters = nullptr; } - void show(); + void show() override; } *Alg_note_ptr; typedef class Alg_update : public Alg_event { public: - virtual ~Alg_update() {}; + ~Alg_update() override {}; Alg_update(Alg_update *); // copy constructor Alg_parameter parameter; // an update contains one attr/value pair Alg_update() { type = 'u'; } - void show(); + void show() override; } *Alg_update_ptr; @@ -402,7 +402,7 @@ public: // The destructor does not free events because they are owned // by a track or seq structure. - virtual ~Alg_event_list(); + ~Alg_event_list() override; // Returns the duration of the sequence in beats or seconds double get_beat_dur() { return beat_dur; } @@ -548,7 +548,7 @@ public: // setting buffer, but it is not the Serial_read_buffer's responsibility // to delete the buffer (owner might want to reuse it), so the destructor // does nothing. - virtual ~Serial_read_buffer() { } + ~Serial_read_buffer() override { } #if defined(_WIN32) //#pragma warning(disable: 546) // cast to int is OK, we only want low 7 bits //#pragma warning(disable: 4311) // type cast pointer to long warning @@ -588,7 +588,7 @@ typedef class Serial_write_buffer: public Serial_buffer { // This destructor will only run when the program exits, which will only // add overhead to the exit process, but it will eliminate an incorrect // report of memory leakage from automation that doesn't know better. -RBD - virtual ~Serial_write_buffer() { + ~Serial_write_buffer() override { if (buffer) delete [] buffer; } void init_for_write() { ptr = buffer; } @@ -654,7 +654,7 @@ protected: public: void serialize_track(); void unserialize_track(); - virtual Alg_event_ptr const &operator[](int i) { + Alg_event_ptr const &operator[](int i) override { assert(i >= 0 && i < len); return events[i]; } @@ -669,7 +669,7 @@ public: // copy constructor: event_list is copied, map is installed and referenced Alg_track(Alg_event_list_ref event_list, Alg_time_map_ptr map, bool units_are_seconds); - virtual ~Alg_track() { // note: do not call set_time_map(NULL)! + ~Alg_track() override { // note: do not call set_time_map(NULL)! if (time_map) time_map->dereference(); time_map = nullptr; } @@ -1030,11 +1030,11 @@ public: Alg_seq(std::istream &file, bool smf, double *offset_ptr = nullptr); // create from filename Alg_seq(const char *filename, bool smf, double *offset_ptr = nullptr); - virtual ~Alg_seq(); + ~Alg_seq() override; int get_read_error() { return error; } - void serialize(void **buffer, long *bytes); + void serialize(void **buffer, long *bytes) override; void copy_time_sigs_to(Alg_seq *dest); // a utility function - void set_time_map(Alg_time_map *map); + void set_time_map(Alg_time_map *map) override; // encode sequence structure into contiguous, moveable memory block // address of newly allocated memory is assigned to *buffer, which must @@ -1060,22 +1060,22 @@ public: // caller must not delete the result. Alg_track_ptr track(int); - virtual Alg_event_ptr const &operator[](int i); + Alg_event_ptr const &operator[](int i) override; - virtual void convert_to_seconds(); - virtual void convert_to_beats(); + void convert_to_seconds() override; + void convert_to_beats() override; Alg_track_ptr cut_from_track(int track_num, double start, double dur, bool all); - Alg_seq *cut(double t, double len, bool all); + Alg_seq *cut(double t, double len, bool all) override; void insert_silence_in_track(int track_num, double t, double len); - void insert_silence(double t, double len); + void insert_silence(double t, double len) override; Alg_track_ptr copy_track(int track_num, double t, double len, bool all); - Alg_seq *copy(double start, double len, bool all); + Alg_seq *copy(double start, double len, bool all) override; void paste(double start, Alg_seq *seq); - virtual void clear(double t, double len, bool all); - virtual void merge(double t, Alg_event_list_ptr seq); - virtual void silence(double t, double len, bool all); + void clear(double t, double len, bool all) override; + void merge(double t, Alg_event_list_ptr seq) override; + void silence(double t, double len, bool all) override; void clear_track(int track_num, double start, double len, bool all); void silence_track(int track_num, double start, double len, bool all); Alg_event_list_ptr find_in_track(int track_num, double t, double len, @@ -1100,7 +1100,7 @@ public: // add_event takes a pointer to an event on the heap. The event is not // copied, and this Alg_seq becomes the owner and freer of the event. void add_event(Alg_event_ptr event, int track_num); - void add(Alg_event_ptr event) { assert(false); } // call add_event instead + void add(Alg_event_ptr event) override { assert(false); } // call add_event instead // get the tempo starting at beat double get_tempo(double beat); bool set_tempo(double bpm, double start_beat, double end_beat); @@ -1112,7 +1112,7 @@ public: double *num, double *den); // void set_events(Alg_event_ptr *events, long len, long max); void merge_tracks(); // move all track data into one track - void set_in_use(bool flag); // set in_use flag on all tracks + void set_in_use(bool flag) override; // set in_use flag on all tracks } *Alg_seq_ptr, &Alg_seq_ref; diff --git a/plugins/MidiImport/portsmf/allegrosmfrd.cpp b/plugins/MidiImport/portsmf/allegrosmfrd.cpp index a221ca11b..388f4c9c9 100644 --- a/plugins/MidiImport/portsmf/allegrosmfrd.cpp +++ b/plugins/MidiImport/portsmf/allegrosmfrd.cpp @@ -65,36 +65,36 @@ protected: double get_time(); void update(int chan, int key, Alg_parameter_ptr param); - void *Mf_malloc(size_t size) { return malloc(size); } - void Mf_free(void *obj, size_t size) { free(obj); } + void *Mf_malloc(size_t size) override { return malloc(size); } + void Mf_free(void *obj, size_t size) override { free(obj); } /* Methods to be called while processing the MIDI file. */ - void Mf_starttrack(); - void Mf_endtrack(); - int Mf_getc(); - void Mf_chanprefix(int chan); - void Mf_portprefix(int port); - void Mf_eot(); - void Mf_error(char *); + void Mf_starttrack() override; + void Mf_endtrack() override; + int Mf_getc() override; + void Mf_chanprefix(int chan) override; + void Mf_portprefix(int port) override; + void Mf_eot() override; + void Mf_error(char *) override; void Mf_error(const char *); - void Mf_header(int,int,int); - void Mf_on(int,int,int); - void Mf_off(int,int,int); - void Mf_pressure(int,int,int); - void Mf_controller(int,int,int); - void Mf_pitchbend(int,int,int); - void Mf_program(int,int); - void Mf_chanpressure(int,int); + void Mf_header(int,int,int) override; + void Mf_on(int,int,int) override; + void Mf_off(int,int,int) override; + void Mf_pressure(int,int,int) override; + void Mf_controller(int,int,int) override; + void Mf_pitchbend(int,int,int) override; + void Mf_program(int,int) override; + void Mf_chanpressure(int,int) override; void binary_msg(int len, unsigned char *msg, const char *attr_string); - void Mf_sysex(int,unsigned char*); - void Mf_arbitrary(int,unsigned char*); - void Mf_metamisc(int,int,unsigned char*); - void Mf_seqnum(int); - void Mf_smpte(int,int,int,int,int); - void Mf_timesig(int,int,int,int); - void Mf_tempo(int); - void Mf_keysig(int,int); - void Mf_sqspecific(int,unsigned char*); - void Mf_text(int,int,unsigned char*); + void Mf_sysex(int,unsigned char*) override; + void Mf_arbitrary(int,unsigned char*) override; + void Mf_metamisc(int,int,unsigned char*) override; + void Mf_seqnum(int) override; + void Mf_smpte(int,int,int,int,int) override; + void Mf_timesig(int,int,int,int) override; + void Mf_tempo(int) override; + void Mf_keysig(int,int) override; + void Mf_sqspecific(int,unsigned char*) override; + void Mf_text(int,int,unsigned char*) override; }; diff --git a/plugins/Monstro/Monstro.h b/plugins/Monstro/Monstro.h index d6b57cfae..52f607a32 100644 --- a/plugins/Monstro/Monstro.h +++ b/plugins/Monstro/Monstro.h @@ -355,21 +355,21 @@ class MonstroInstrument : public Instrument public: MonstroInstrument( InstrumentTrack * _instrument_track ); - virtual ~MonstroInstrument(); + ~MonstroInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, - QDomElement & _this ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, + QDomElement & _this ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const; + f_cnt_t desiredReleaseFrames() const override; - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; public slots: void updateVolume1(); @@ -593,13 +593,13 @@ class MonstroView : public InstrumentViewFixedSize public: MonstroView( Instrument * _instrument, QWidget * _parent ); - virtual ~MonstroView(); + ~MonstroView() override; protected slots: void updateLayout(); private: - virtual void modelChanged(); + void modelChanged() override; void setWidgetBackground( QWidget * _widget, const QString & _pic ); QWidget * setupOperatorsView( QWidget * _parent ); diff --git a/plugins/MultitapEcho/MultitapEcho.h b/plugins/MultitapEcho/MultitapEcho.h index 3d6772d24..6145b9f86 100644 --- a/plugins/MultitapEcho/MultitapEcho.h +++ b/plugins/MultitapEcho/MultitapEcho.h @@ -39,10 +39,10 @@ class MultitapEchoEffect : public Effect { public: MultitapEchoEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - virtual ~MultitapEchoEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); + ~MultitapEchoEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return &m_controls; } diff --git a/plugins/MultitapEcho/MultitapEchoControlDialog.h b/plugins/MultitapEcho/MultitapEchoControlDialog.h index 6104d433e..0989046c1 100644 --- a/plugins/MultitapEcho/MultitapEchoControlDialog.h +++ b/plugins/MultitapEcho/MultitapEchoControlDialog.h @@ -44,7 +44,7 @@ class MultitapEchoControlDialog : public EffectControlDialog Q_OBJECT public: MultitapEchoControlDialog( MultitapEchoControls * controls ); - virtual ~MultitapEchoControlDialog() + ~MultitapEchoControlDialog() override { } }; diff --git a/plugins/MultitapEcho/MultitapEchoControls.h b/plugins/MultitapEcho/MultitapEchoControls.h index 65311c157..7ded68cc8 100644 --- a/plugins/MultitapEcho/MultitapEchoControls.h +++ b/plugins/MultitapEcho/MultitapEchoControls.h @@ -41,11 +41,11 @@ class MultitapEchoControls : public EffectControls Q_OBJECT public: MultitapEchoControls( MultitapEchoEffect * eff ); - virtual ~MultitapEchoControls(); + ~MultitapEchoControls() override; - virtual void saveSettings( QDomDocument & doc, QDomElement & parent ); - virtual void loadSettings( const QDomElement & elem ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & doc, QDomElement & parent ) override; + void loadSettings( const QDomElement & elem ) override; + inline QString nodeName() const override { return( "multitapechocontrols" ); } @@ -53,12 +53,12 @@ public: void setDefaultAmpShape(); void setDefaultLpShape(); - virtual int controlCount() + int controlCount() override { return( 5 ); } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return( new gui::MultitapEchoControlDialog( this ) ); } diff --git a/plugins/Nes/Nes.h b/plugins/Nes/Nes.h index f57cca9e7..41e7b0d7f 100644 --- a/plugins/Nes/Nes.h +++ b/plugins/Nes/Nes.h @@ -211,25 +211,25 @@ class NesInstrument : public Instrument Q_OBJECT public: NesInstrument( InstrumentTrack * instrumentTrack ); - virtual ~NesInstrument(); + ~NesInstrument() override; - virtual void playNote( NotePlayHandle * n, - sampleFrame * workingBuffer ); - virtual void deleteNotePluginData( NotePlayHandle * n ); + void playNote( NotePlayHandle * n, + sampleFrame * workingBuffer ) override; + void deleteNotePluginData( NotePlayHandle * n ) override; - virtual void saveSettings( QDomDocument & doc, - QDomElement & element ); - virtual void loadSettings( const QDomElement & element ); + void saveSettings( QDomDocument & doc, + QDomElement & element ) override; + void loadSettings( const QDomElement & element ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return( 8 ); } - virtual gui::PluginView* instantiateView( QWidget * parent ); + gui::PluginView* instantiateView( QWidget * parent ) override; public slots: void updateFreq1(); @@ -313,10 +313,10 @@ class NesInstrumentView : public InstrumentViewFixedSize public: NesInstrumentView( Instrument * instrument, QWidget * parent ); - virtual ~NesInstrumentView(); + ~NesInstrumentView() override; private: - virtual void modelChanged(); + void modelChanged() override; // channel 1 PixmapButton * m_ch1EnabledBtn; diff --git a/plugins/OpulenZ/OpulenZ.h b/plugins/OpulenZ/OpulenZ.h index f2a13ffe0..1f999252f 100644 --- a/plugins/OpulenZ/OpulenZ.h +++ b/plugins/OpulenZ/OpulenZ.h @@ -59,24 +59,24 @@ class OpulenzInstrument : public Instrument Q_OBJECT public: OpulenzInstrument( InstrumentTrack * _instrument_track ); - virtual ~OpulenzInstrument(); + ~OpulenzInstrument() override; - virtual QString nodeName() const; - virtual gui::PluginView* instantiateView( QWidget * _parent ); + QString nodeName() const override; + gui::PluginView* instantiateView( QWidget * _parent ) override; - virtual Flags flags() const + Flags flags() const override { return IsSingleStreamed | IsMidiBased; } - virtual bool handleMidiEvent( const MidiEvent& event, const TimePos& time, f_cnt_t offset = 0 ); - virtual void play( sampleFrame * _working_buffer ); + bool handleMidiEvent( const MidiEvent& event, const TimePos& time, f_cnt_t offset = 0 ) override; + void play( sampleFrame * _working_buffer ) override; - void saveSettings( QDomDocument & _doc, QDomElement & _this ); - void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _this ) override; + void loadSettings( const QDomElement & _this ) override; void loadPatch(const unsigned char inst[14]); void tuneEqual(int center, float Hz); - virtual void loadFile( const QString& file ); + void loadFile( const QString& file ) override; IntModel m_patchModel; @@ -163,9 +163,9 @@ class OpulenzInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: OpulenzInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~OpulenzInstrumentView(); + ~OpulenzInstrumentView() override; LcdSpinBox *m_patch; - void modelChanged(); + void modelChanged() override; Knob *op1_a_kn; Knob *op1_d_kn; diff --git a/plugins/Organic/Organic.h b/plugins/Organic/Organic.h index b2f5ed518..bc951ad49 100644 --- a/plugins/Organic/Organic.h +++ b/plugins/Organic/Organic.h @@ -105,7 +105,7 @@ private: float m_phaseOffsetRight; OscillatorObject( Model * _parent, int _index ); - virtual ~OscillatorObject(); + ~OscillatorObject() override; friend class OrganicInstrument; friend class gui::OrganicInstrumentView; @@ -124,17 +124,17 @@ class OrganicInstrument : public Instrument Q_OBJECT public: OrganicInstrument( InstrumentTrack * _instrument_track ); - virtual ~OrganicInstrument(); + ~OrganicInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; int intRand( int min, int max ); @@ -172,7 +172,7 @@ private: FloatModel m_fx1Model; FloatModel m_volModel; - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; private slots: @@ -190,10 +190,10 @@ class OrganicInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: OrganicInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~OrganicInstrumentView(); + ~OrganicInstrumentView() override; private: - virtual void modelChanged(); + void modelChanged() override; struct OscillatorKnobs { diff --git a/plugins/Patman/Patman.h b/plugins/Patman/Patman.h index 5088068df..206c2e503 100644 --- a/plugins/Patman/Patman.h +++ b/plugins/Patman/Patman.h @@ -57,26 +57,26 @@ class PatmanInstrument : public Instrument Q_OBJECT public: PatmanInstrument( InstrumentTrack * _track ); - virtual ~PatmanInstrument(); + ~PatmanInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual void loadFile( const QString & _file ); + void loadFile( const QString & _file ) override; - virtual QString nodeName( void ) const; + QString nodeName( void ) const override; - virtual f_cnt_t desiredReleaseFrames( void ) const + f_cnt_t desiredReleaseFrames( void ) const override { return( 128 ); } - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; public slots: @@ -131,7 +131,7 @@ class PatmanView : public InstrumentViewFixedSize Q_OBJECT public: PatmanView( Instrument * _instrument, QWidget * _parent ); - virtual ~PatmanView(); + ~PatmanView() override; public slots: @@ -140,13 +140,13 @@ public slots: protected: - virtual void dragEnterEvent( QDragEnterEvent * _dee ); - virtual void dropEvent( QDropEvent * _de ); - virtual void paintEvent( QPaintEvent * ); + void dragEnterEvent( QDragEnterEvent * _dee ) override; + void dropEvent( QDropEvent * _de ) override; + void paintEvent( QPaintEvent * ) override; private: - virtual void modelChanged( void ); + void modelChanged( void ) override; PatmanInstrument * m_pi; QString m_displayFilename; diff --git a/plugins/PeakControllerEffect/PeakControllerEffect.h b/plugins/PeakControllerEffect/PeakControllerEffect.h index 3d944a1a6..f2bafedda 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffect.h +++ b/plugins/PeakControllerEffect/PeakControllerEffect.h @@ -40,8 +40,8 @@ class PeakControllerEffect : public Effect public: PeakControllerEffect( Model * parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~PeakControllerEffect(); - virtual bool processAudioBuffer( sampleFrame * _buf, + ~PeakControllerEffect() override; + bool processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) override; EffectControls * controls() override diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h index 721167975..7ccb4a14c 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h +++ b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h @@ -45,7 +45,7 @@ class PeakControllerEffectControlDialog : public EffectControlDialog public: PeakControllerEffectControlDialog( PeakControllerEffectControls * _controls ); - virtual ~PeakControllerEffectControlDialog() + ~PeakControllerEffectControlDialog() override { } diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControls.h b/plugins/PeakControllerEffect/PeakControllerEffectControls.h index 278c2f069..6eb3dad44 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControls.h +++ b/plugins/PeakControllerEffect/PeakControllerEffectControls.h @@ -41,7 +41,7 @@ class PeakControllerEffectControls : public EffectControls Q_OBJECT public: PeakControllerEffectControls( PeakControllerEffect * _eff ); - virtual ~PeakControllerEffectControls() + ~PeakControllerEffectControls() override { } diff --git a/plugins/ReverbSC/ReverbSC.h b/plugins/ReverbSC/ReverbSC.h index 0cbeba875..2cb119bff 100644 --- a/plugins/ReverbSC/ReverbSC.h +++ b/plugins/ReverbSC/ReverbSC.h @@ -44,10 +44,10 @@ class ReverbSCEffect : public Effect { public: ReverbSCEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - virtual ~ReverbSCEffect(); - virtual bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ); + ~ReverbSCEffect() override; + bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return &m_reverbSCControls; } diff --git a/plugins/ReverbSC/ReverbSCControlDialog.h b/plugins/ReverbSC/ReverbSCControlDialog.h index ba373509a..0c02d7865 100644 --- a/plugins/ReverbSC/ReverbSCControlDialog.h +++ b/plugins/ReverbSC/ReverbSCControlDialog.h @@ -42,7 +42,7 @@ class ReverbSCControlDialog : public EffectControlDialog Q_OBJECT public: ReverbSCControlDialog( ReverbSCControls* controls ); - virtual ~ReverbSCControlDialog() + ~ReverbSCControlDialog() override { } diff --git a/plugins/ReverbSC/ReverbSCControls.h b/plugins/ReverbSC/ReverbSCControls.h index 2bd76990a..b58254dcf 100644 --- a/plugins/ReverbSC/ReverbSCControls.h +++ b/plugins/ReverbSC/ReverbSCControls.h @@ -40,23 +40,23 @@ class ReverbSCControls : public EffectControls Q_OBJECT public: ReverbSCControls( ReverbSCEffect* effect ); - virtual ~ReverbSCControls() + ~ReverbSCControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return "ReverbSCControls"; } - virtual int controlCount() + int controlCount() override { return 4; } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::ReverbSCControlDialog( this ); } diff --git a/plugins/Sf2Player/PatchesDialog.cpp b/plugins/Sf2Player/PatchesDialog.cpp index 3cba7561f..e3e882e69 100644 --- a/plugins/Sf2Player/PatchesDialog.cpp +++ b/plugins/Sf2Player/PatchesDialog.cpp @@ -47,7 +47,7 @@ public: : QTreeWidgetItem( pListView, pItemAfter ) {} // Sort/compare overriden method. - bool operator< ( const QTreeWidgetItem& other ) const + bool operator< ( const QTreeWidgetItem& other ) const override { int iColumn = QTreeWidgetItem::treeWidget()->sortColumn(); const QString& s1 = text( iColumn ); diff --git a/plugins/Sf2Player/PatchesDialog.h b/plugins/Sf2Player/PatchesDialog.h index 9f80981df..af1207ce1 100644 --- a/plugins/Sf2Player/PatchesDialog.h +++ b/plugins/Sf2Player/PatchesDialog.h @@ -50,7 +50,7 @@ public: PatchesDialog(QWidget *pParent = 0, Qt::WindowFlags wflags = QFlag(0)); // Destructor. - virtual ~PatchesDialog(); + ~PatchesDialog() override; void setup(fluid_synth_t *pSynth, int iChan, const QString & _chanName, @@ -64,8 +64,8 @@ public slots: protected slots: - void accept(); - void reject(); + void accept() override; + void reject() override; protected: diff --git a/plugins/Sf2Player/Sf2Player.h b/plugins/Sf2Player/Sf2Player.h index 3824595ea..1ce6d0fdd 100644 --- a/plugins/Sf2Player/Sf2Player.h +++ b/plugins/Sf2Player/Sf2Player.h @@ -63,35 +63,35 @@ class Sf2Instrument : public Instrument public: Sf2Instrument( InstrumentTrack * _instrument_track ); - virtual ~Sf2Instrument(); + ~Sf2Instrument() override; - virtual void play( sampleFrame * _working_buffer ); + void play( sampleFrame * _working_buffer ) override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual void loadFile( const QString & _file ); + void loadFile( const QString & _file ) override; - virtual AutomatableModel * childModel( const QString & _modelName ); + AutomatableModel * childModel( const QString & _modelName ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return 0; } - virtual Flags flags() const + Flags flags() const override { return IsSingleStreamed; } - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; QString getCurrentPatchName(); @@ -203,10 +203,10 @@ class Sf2InstrumentView : public InstrumentViewFixedSize public: Sf2InstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~Sf2InstrumentView(); + ~Sf2InstrumentView() override; private: - virtual void modelChanged(); + void modelChanged() override; PixmapButton * m_fileDialogButton; PixmapButton * m_patchDialogButton; diff --git a/plugins/Sfxr/Sfxr.h b/plugins/Sfxr/Sfxr.h index 4c14d33bb..6aafe9961 100644 --- a/plugins/Sfxr/Sfxr.h +++ b/plugins/Sfxr/Sfxr.h @@ -140,7 +140,7 @@ public: { } /* purpose: prevent the initial value of the model from being changed */ - virtual void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) ) + void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) ) override { float oldInitValue = initValue(); FloatModel::loadSettings(element, name); @@ -161,7 +161,7 @@ public: { } /* purpose: prevent the initial value of the model from being changed */ - virtual void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) ) + void loadSettings( const QDomElement& element, const QString& name = QString( "value" ) ) override { float oldInitValue = initValue(); FloatModel::loadSettings(element, name); @@ -176,18 +176,18 @@ class SfxrInstrument : public Instrument Q_OBJECT public: SfxrInstrument(InstrumentTrack * _instrument_track ); - virtual ~SfxrInstrument(); + ~SfxrInstrument() override; - virtual void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, - QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, + QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; void resetModels(); @@ -240,7 +240,7 @@ public: SfxrInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~SfxrInstrumentView() {}; + ~SfxrInstrumentView() override {}; protected slots: void genPickup(); @@ -256,7 +256,7 @@ protected slots: void previewSound(); private: - virtual void modelChanged(); + void modelChanged() override; Knob * m_attKnob; //Attack Time Knob * m_holdKnob; //Sustain Time diff --git a/plugins/Sid/SidInstrument.h b/plugins/Sid/SidInstrument.h index 3a92605b6..1c8fecc95 100644 --- a/plugins/Sid/SidInstrument.h +++ b/plugins/Sid/SidInstrument.h @@ -58,7 +58,7 @@ public: NumWaveShapes }; VoiceObject( Model * _parent, int _idx ); - virtual ~VoiceObject(); + ~VoiceObject() override; private: @@ -97,21 +97,21 @@ public: SidInstrument( InstrumentTrack * _instrument_track ); - virtual ~SidInstrument(); + ~SidInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const; + f_cnt_t desiredReleaseFrames() const override; - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; /*public slots: @@ -147,10 +147,10 @@ class SidInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: SidInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~SidInstrumentView(); + ~SidInstrumentView() override; private: - virtual void modelChanged(); + void modelChanged() override; automatableButtonGroup * m_passBtnGrp; automatableButtonGroup * m_sidTypeBtnGrp; diff --git a/plugins/SpectrumAnalyzer/Analyzer.h b/plugins/SpectrumAnalyzer/Analyzer.h index 9013b6745..5be1f9ba8 100644 --- a/plugins/SpectrumAnalyzer/Analyzer.h +++ b/plugins/SpectrumAnalyzer/Analyzer.h @@ -43,7 +43,7 @@ class Analyzer : public Effect { public: Analyzer(Model *parent, const Descriptor::SubPluginFeatures::Key *key); - virtual ~Analyzer(); + ~Analyzer() override; bool processAudioBuffer(sampleFrame *buffer, const fpp_t frame_count) override; EffectControls *controls() override {return &m_controls;} diff --git a/plugins/SpectrumAnalyzer/SaControls.h b/plugins/SpectrumAnalyzer/SaControls.h index 70a7559f2..b2fc1cc87 100644 --- a/plugins/SpectrumAnalyzer/SaControls.h +++ b/plugins/SpectrumAnalyzer/SaControls.h @@ -49,7 +49,7 @@ class SaControls : public EffectControls Q_OBJECT public: explicit SaControls(Analyzer* effect); - virtual ~SaControls() {} + ~SaControls() override {} gui::EffectControlDialog* createView() override; diff --git a/plugins/SpectrumAnalyzer/SaControlsDialog.h b/plugins/SpectrumAnalyzer/SaControlsDialog.h index 1504da3dc..ac28be4bf 100644 --- a/plugins/SpectrumAnalyzer/SaControlsDialog.h +++ b/plugins/SpectrumAnalyzer/SaControlsDialog.h @@ -47,7 +47,7 @@ class SaControlsDialog : public EffectControlDialog Q_OBJECT public: explicit SaControlsDialog(SaControls *controls, SaProcessor *processor); - virtual ~SaControlsDialog() {} + ~SaControlsDialog() override {} bool isResizable() const override {return true;} QSize sizeHint() const override; diff --git a/plugins/SpectrumAnalyzer/SaSpectrumView.h b/plugins/SpectrumAnalyzer/SaSpectrumView.h index 4ac24cbf0..d50c893e5 100644 --- a/plugins/SpectrumAnalyzer/SaSpectrumView.h +++ b/plugins/SpectrumAnalyzer/SaSpectrumView.h @@ -54,7 +54,7 @@ class SaSpectrumView : public QWidget Q_OBJECT public: explicit SaSpectrumView(SaControls *controls, SaProcessor *processor, QWidget *_parent = 0); - virtual ~SaSpectrumView() {} + ~SaSpectrumView() override {} QSize sizeHint() const override {return QSize(400, 200);} diff --git a/plugins/SpectrumAnalyzer/SaWaterfallView.h b/plugins/SpectrumAnalyzer/SaWaterfallView.h index cdfad6ad4..2855eb925 100644 --- a/plugins/SpectrumAnalyzer/SaWaterfallView.h +++ b/plugins/SpectrumAnalyzer/SaWaterfallView.h @@ -49,7 +49,7 @@ class SaWaterfallView : public QWidget Q_OBJECT public: explicit SaWaterfallView(SaControls *controls, SaProcessor *processor, QWidget *_parent = 0); - virtual ~SaWaterfallView() {} + ~SaWaterfallView() override {} QSize sizeHint() const override {return QSize(400, 350);} diff --git a/plugins/StereoEnhancer/StereoEnhancer.h b/plugins/StereoEnhancer/StereoEnhancer.h index a3f4a6de4..5872100d3 100644 --- a/plugins/StereoEnhancer/StereoEnhancer.h +++ b/plugins/StereoEnhancer/StereoEnhancer.h @@ -39,11 +39,11 @@ class StereoEnhancerEffect : public Effect public: StereoEnhancerEffect( Model * parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~StereoEnhancerEffect(); - virtual bool processAudioBuffer( sampleFrame * _buf, - const fpp_t _frames ); + ~StereoEnhancerEffect() override; + bool processAudioBuffer( sampleFrame * _buf, + const fpp_t _frames ) override; - virtual EffectControls * controls() + EffectControls * controls() override { return( &m_bbControls ); } diff --git a/plugins/StereoEnhancer/StereoEnhancerControlDialog.h b/plugins/StereoEnhancer/StereoEnhancerControlDialog.h index 62f78d1cd..3f063ec63 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControlDialog.h +++ b/plugins/StereoEnhancer/StereoEnhancerControlDialog.h @@ -42,7 +42,7 @@ class StereoEnhancerControlDialog : public EffectControlDialog Q_OBJECT public: StereoEnhancerControlDialog( StereoEnhancerControls * _controls ); - virtual ~StereoEnhancerControlDialog() + ~StereoEnhancerControlDialog() override { } diff --git a/plugins/StereoEnhancer/StereoEnhancerControls.h b/plugins/StereoEnhancer/StereoEnhancerControls.h index c9a0f6e61..0b016aa2b 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControls.h +++ b/plugins/StereoEnhancer/StereoEnhancerControls.h @@ -39,23 +39,23 @@ class StereoEnhancerControls : public EffectControls Q_OBJECT public: StereoEnhancerControls( StereoEnhancerEffect( * _eff ) ); - virtual ~StereoEnhancerControls() + ~StereoEnhancerControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return( "stereoenhancercontrols" ); } - virtual int controlCount() + int controlCount() override { return( 1 ); } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::StereoEnhancerControlDialog( this ); } diff --git a/plugins/StereoMatrix/StereoMatrix.h b/plugins/StereoMatrix/StereoMatrix.h index 88d265ad2..a8a373317 100644 --- a/plugins/StereoMatrix/StereoMatrix.h +++ b/plugins/StereoMatrix/StereoMatrix.h @@ -38,11 +38,11 @@ class StereoMatrixEffect : public Effect public: StereoMatrixEffect( Model * parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~StereoMatrixEffect(); - virtual bool processAudioBuffer( sampleFrame * _buf, - const fpp_t _frames ); + ~StereoMatrixEffect() override; + bool processAudioBuffer( sampleFrame * _buf, + const fpp_t _frames ) override; - virtual EffectControls* controls() + EffectControls* controls() override { return( &m_smControls ); } diff --git a/plugins/StereoMatrix/StereoMatrixControlDialog.h b/plugins/StereoMatrix/StereoMatrixControlDialog.h index fd5cf786a..41eb9cdb4 100644 --- a/plugins/StereoMatrix/StereoMatrixControlDialog.h +++ b/plugins/StereoMatrix/StereoMatrixControlDialog.h @@ -41,7 +41,7 @@ class StereoMatrixControlDialog : public EffectControlDialog Q_OBJECT public: StereoMatrixControlDialog( StereoMatrixControls * _controls ); - virtual ~StereoMatrixControlDialog() + ~StereoMatrixControlDialog() override { } diff --git a/plugins/StereoMatrix/StereoMatrixControls.h b/plugins/StereoMatrix/StereoMatrixControls.h index 97f0cf8e1..04a10f237 100644 --- a/plugins/StereoMatrix/StereoMatrixControls.h +++ b/plugins/StereoMatrix/StereoMatrixControls.h @@ -39,23 +39,23 @@ class StereoMatrixControls : public EffectControls Q_OBJECT public: StereoMatrixControls( StereoMatrixEffect( * _eff ) ); - virtual ~StereoMatrixControls() + ~StereoMatrixControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return( "stereomatrixcontrols" ); } - virtual int controlCount() + int controlCount() override { return( 1 ); } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return new gui::StereoMatrixControlDialog( this ); } diff --git a/plugins/Stk/Mallets/Mallets.h b/plugins/Stk/Mallets/Mallets.h index 51b0bfb43..e8ec15360 100644 --- a/plugins/Stk/Mallets/Mallets.h +++ b/plugins/Stk/Mallets/Mallets.h @@ -160,17 +160,17 @@ class MalletsInstrument : public Instrument Q_OBJECT public: MalletsInstrument( InstrumentTrack * _instrument_track ); - virtual ~MalletsInstrument(); + ~MalletsInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; gui::PluginView* instantiateView( QWidget * _parent ) override; @@ -219,13 +219,13 @@ class MalletsInstrumentView: public InstrumentViewFixedSize public: MalletsInstrumentView( MalletsInstrument * _instrument, QWidget * _parent ); - virtual ~MalletsInstrumentView(); + ~MalletsInstrumentView() override; public slots: void changePreset(); private: - virtual void modelChanged(); + void modelChanged() override; void setWidgetBackground( QWidget * _widget, const QString & _pic ); QWidget * setupModalBarControls( QWidget * _parent ); diff --git a/plugins/TripleOscillator/TripleOscillator.h b/plugins/TripleOscillator/TripleOscillator.h index 1c8871796..0cb0e69a0 100644 --- a/plugins/TripleOscillator/TripleOscillator.h +++ b/plugins/TripleOscillator/TripleOscillator.h @@ -57,7 +57,7 @@ class OscillatorObject : public Model Q_OBJECT public: OscillatorObject( Model * _parent, int _idx ); - virtual ~OscillatorObject(); + ~OscillatorObject() override; private: @@ -108,24 +108,24 @@ class TripleOscillator : public Instrument Q_OBJECT public: TripleOscillator( InstrumentTrack * _track ); - virtual ~TripleOscillator(); + ~TripleOscillator() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return( 128 ); } - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; protected slots: @@ -157,11 +157,11 @@ class TripleOscillatorView : public InstrumentViewFixedSize Q_OBJECT public: TripleOscillatorView( Instrument * _instrument, QWidget * _parent ); - virtual ~TripleOscillatorView(); + ~TripleOscillatorView() override; private: - virtual void modelChanged(); + void modelChanged() override; automatableButtonGroup * m_mod1BtnGrp; automatableButtonGroup * m_mod2BtnGrp; diff --git a/plugins/Vectorscope/VecControls.h b/plugins/Vectorscope/VecControls.h index e4aa27b43..76b0f388e 100644 --- a/plugins/Vectorscope/VecControls.h +++ b/plugins/Vectorscope/VecControls.h @@ -47,7 +47,7 @@ class VecControls : public EffectControls Q_OBJECT public: explicit VecControls(Vectorscope *effect); - virtual ~VecControls() {} + ~VecControls() override {} gui::EffectControlDialog* createView() override; diff --git a/plugins/Vectorscope/VecControlsDialog.h b/plugins/Vectorscope/VecControlsDialog.h index 97108cdf4..616e55b44 100644 --- a/plugins/Vectorscope/VecControlsDialog.h +++ b/plugins/Vectorscope/VecControlsDialog.h @@ -43,7 +43,7 @@ class VecControlsDialog : public EffectControlDialog Q_OBJECT public: explicit VecControlsDialog(VecControls *controls); - virtual ~VecControlsDialog() {} + ~VecControlsDialog() override {} bool isResizable() const override {return true;} QSize sizeHint() const override; diff --git a/plugins/Vectorscope/VectorView.h b/plugins/Vectorscope/VectorView.h index 0aae988db..347aa8a18 100644 --- a/plugins/Vectorscope/VectorView.h +++ b/plugins/Vectorscope/VectorView.h @@ -44,7 +44,7 @@ class VectorView : public QWidget Q_OBJECT public: explicit VectorView(VecControls *controls, LocklessRingBuffer *inputBuffer, unsigned short displaySize, QWidget *parent = 0); - virtual ~VectorView() {} + ~VectorView() override {} QSize sizeHint() const override {return QSize(300, 300);} diff --git a/plugins/Vectorscope/Vectorscope.h b/plugins/Vectorscope/Vectorscope.h index 973fecf0e..e3e92b205 100644 --- a/plugins/Vectorscope/Vectorscope.h +++ b/plugins/Vectorscope/Vectorscope.h @@ -37,7 +37,7 @@ class Vectorscope : public Effect { public: Vectorscope(Model *parent, const Descriptor::SubPluginFeatures::Key *key); - virtual ~Vectorscope() {}; + ~Vectorscope() override {}; bool processAudioBuffer(sampleFrame *buffer, const fpp_t frame_count) override; EffectControls *controls() override {return &m_controls;} diff --git a/plugins/Vestige/Vestige.cpp b/plugins/Vestige/Vestige.cpp index 9088321cc..150a4f1e4 100644 --- a/plugins/Vestige/Vestige.cpp +++ b/plugins/Vestige/Vestige.cpp @@ -103,11 +103,11 @@ public: setWindowFlags( Qt::WindowCloseButtonHint ); } - virtual ~vstSubWin() + ~vstSubWin() override { } - virtual void closeEvent( QCloseEvent * e ) + void closeEvent( QCloseEvent * e ) override { // ignore close-events - for some reason otherwise the VST GUI // remains hidden when re-opening diff --git a/plugins/Vibed/NineButtonSelector.h b/plugins/Vibed/NineButtonSelector.h index 1c3183055..90c4d53e8 100644 --- a/plugins/Vibed/NineButtonSelector.h +++ b/plugins/Vibed/NineButtonSelector.h @@ -67,7 +67,7 @@ public: int _default, int _x, int _y, QWidget * _parent); - virtual ~NineButtonSelector(); + ~NineButtonSelector() override; // inline int getSelected() { // return( castModel()->value() ); @@ -86,13 +86,13 @@ public slots: void button6Clicked(); void button7Clicked(); void button8Clicked(); - void contextMenuEvent( QContextMenuEvent * ); + void contextMenuEvent( QContextMenuEvent * ) override; signals: void NineButtonSelection( int ); private: - virtual void modelChanged(); + void modelChanged() override; void updateButton( int ); QList m_buttons; diff --git a/plugins/Vibed/Vibed.h b/plugins/Vibed/Vibed.h index f13fd665a..c6fdee385 100644 --- a/plugins/Vibed/Vibed.h +++ b/plugins/Vibed/Vibed.h @@ -97,11 +97,11 @@ class VibedView : public InstrumentViewFixedSize public: VibedView( Instrument * _instrument, QWidget * _parent ); - virtual ~VibedView() {}; + ~VibedView() override {}; public slots: void showString( int _string ); - void contextMenuEvent( QContextMenuEvent * ); + void contextMenuEvent( QContextMenuEvent * ) override; protected slots: void sinWaveClicked(); @@ -114,7 +114,7 @@ protected slots: void normalizeClicked(); private: - virtual void modelChanged(); + void modelChanged() override; // String-related diff --git a/plugins/VstBase/VstPlugin.h b/plugins/VstBase/VstPlugin.h index f73c1c876..c0f8e79e5 100644 --- a/plugins/VstBase/VstPlugin.h +++ b/plugins/VstBase/VstPlugin.h @@ -45,7 +45,7 @@ class VSTBASE_EXPORT VstPlugin : public RemotePlugin, public JournallingObject Q_OBJECT public: VstPlugin( const QString & _plugin ); - virtual ~VstPlugin(); + ~VstPlugin() override; void tryLoad( const QString &remoteVstPluginExecutable ); @@ -112,7 +112,7 @@ public: void loadSettings( const QDomElement & _this ) override; void saveSettings( QDomDocument & _doc, QDomElement & _this ) override; - virtual QString nodeName() const override + QString nodeName() const override { return "vstplugin"; } diff --git a/plugins/VstEffect/VstEffect.h b/plugins/VstEffect/VstEffect.h index 12b15dc49..586d00d3b 100644 --- a/plugins/VstEffect/VstEffect.h +++ b/plugins/VstEffect/VstEffect.h @@ -43,12 +43,12 @@ class VstEffect : public Effect public: VstEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~VstEffect(); + ~VstEffect() override; - virtual bool processAudioBuffer( sampleFrame * _buf, - const fpp_t _frames ); + bool processAudioBuffer( sampleFrame * _buf, + const fpp_t _frames ) override; - virtual EffectControls * controls() + EffectControls * controls() override { return &m_vstControls; } diff --git a/plugins/VstEffect/VstEffectControlDialog.h b/plugins/VstEffect/VstEffectControlDialog.h index f54ab750c..1fb538ca5 100644 --- a/plugins/VstEffect/VstEffectControlDialog.h +++ b/plugins/VstEffect/VstEffectControlDialog.h @@ -50,7 +50,7 @@ class VstEffectControlDialog : public EffectControlDialog Q_OBJECT public: VstEffectControlDialog( VstEffectControls * _controls ); - virtual ~VstEffectControlDialog(); + ~VstEffectControlDialog() override; protected: void paintEvent( QPaintEvent * _pe ) override; diff --git a/plugins/VstEffect/VstEffectControls.h b/plugins/VstEffect/VstEffectControls.h index 24d5961ae..6e142b38c 100644 --- a/plugins/VstEffect/VstEffectControls.h +++ b/plugins/VstEffect/VstEffectControls.h @@ -55,18 +55,18 @@ class VstEffectControls : public EffectControls Q_OBJECT public: VstEffectControls( VstEffect * _eff ); - virtual ~VstEffectControls(); + ~VstEffectControls() override; - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return "vsteffectcontrols"; } - virtual int controlCount(); + int controlCount() override; - virtual gui::EffectControlDialog* createView(); + gui::EffectControlDialog* createView() override; protected slots: @@ -113,7 +113,7 @@ class ManageVSTEffectView : public QObject Q_OBJECT public: ManageVSTEffectView( VstEffect * _eff, VstEffectControls * m_vi ); - virtual ~ManageVSTEffectView(); + ~ManageVSTEffectView() override; protected slots: diff --git a/plugins/VstEffect/VstSubPluginFeatures.h b/plugins/VstEffect/VstSubPluginFeatures.h index d3b9de58c..c5dc87d14 100644 --- a/plugins/VstEffect/VstSubPluginFeatures.h +++ b/plugins/VstEffect/VstSubPluginFeatures.h @@ -40,11 +40,11 @@ class VstSubPluginFeatures : public Plugin::Descriptor::SubPluginFeatures public: VstSubPluginFeatures( Plugin::PluginTypes _type ); - virtual void fillDescriptionWidget( QWidget * _parent, - const Key * _key ) const; + void fillDescriptionWidget( QWidget * _parent, + const Key * _key ) const override; - virtual void listSubPluginKeys( const Plugin::Descriptor * _desc, - KeyList & _kl ) const; + void listSubPluginKeys( const Plugin::Descriptor * _desc, + KeyList & _kl ) const override; private: void addPluginsFromDir(QStringList* filenames, QString path) const; } ; diff --git a/plugins/Watsyn/Watsyn.h b/plugins/Watsyn/Watsyn.h index 454329b57..cee2d807b 100644 --- a/plugins/Watsyn/Watsyn.h +++ b/plugins/Watsyn/Watsyn.h @@ -139,25 +139,25 @@ class WatsynInstrument : public Instrument Q_OBJECT public: WatsynInstrument( InstrumentTrack * _instrument_track ); - virtual ~WatsynInstrument(); + ~WatsynInstrument() override; - virtual void playNote( NotePlayHandle * _n, - sampleFrame * _working_buffer ); - virtual void deleteNotePluginData( NotePlayHandle * _n ); + void playNote( NotePlayHandle * _n, + sampleFrame * _working_buffer ) override; + void deleteNotePluginData( NotePlayHandle * _n ) override; - virtual void saveSettings( QDomDocument & _doc, - QDomElement & _this ); - virtual void loadSettings( const QDomElement & _this ); + void saveSettings( QDomDocument & _doc, + QDomElement & _this ) override; + void loadSettings( const QDomElement & _this ) override; - virtual QString nodeName() const; + QString nodeName() const override; - virtual f_cnt_t desiredReleaseFrames() const + f_cnt_t desiredReleaseFrames() const override { return( 64 ); } - virtual gui::PluginView* instantiateView( QWidget * _parent ); + gui::PluginView* instantiateView( QWidget * _parent ) override; public slots: void updateVolumes(); @@ -310,7 +310,7 @@ class WatsynView : public InstrumentViewFixedSize public: WatsynView( Instrument * _instrument, QWidget * _parent ); - virtual ~WatsynView(); + ~WatsynView() override; protected slots: void updateLayout(); @@ -328,7 +328,7 @@ protected slots: void loadClicked(); private: - virtual void modelChanged(); + void modelChanged() override; // knobs Knob * a1_volKnob; diff --git a/plugins/WaveShaper/WaveShaper.h b/plugins/WaveShaper/WaveShaper.h index 7364784bb..075c0ec6b 100644 --- a/plugins/WaveShaper/WaveShaper.h +++ b/plugins/WaveShaper/WaveShaper.h @@ -39,11 +39,11 @@ class WaveShaperEffect : public Effect public: WaveShaperEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); - virtual ~WaveShaperEffect(); - virtual bool processAudioBuffer( sampleFrame * _buf, - const fpp_t _frames ); + ~WaveShaperEffect() override; + bool processAudioBuffer( sampleFrame * _buf, + const fpp_t _frames ) override; - virtual EffectControls * controls() + EffectControls * controls() override { return( &m_wsControls ); } diff --git a/plugins/WaveShaper/WaveShaperControlDialog.h b/plugins/WaveShaper/WaveShaperControlDialog.h index 672b55f62..be3838f46 100644 --- a/plugins/WaveShaper/WaveShaperControlDialog.h +++ b/plugins/WaveShaper/WaveShaperControlDialog.h @@ -42,7 +42,7 @@ class WaveShaperControlDialog : public EffectControlDialog Q_OBJECT public: WaveShaperControlDialog( WaveShaperControls * _controls ); - virtual ~WaveShaperControlDialog() + ~WaveShaperControlDialog() override { } diff --git a/plugins/WaveShaper/WaveShaperControls.h b/plugins/WaveShaper/WaveShaperControls.h index f94bc3d9b..2719514f5 100644 --- a/plugins/WaveShaper/WaveShaperControls.h +++ b/plugins/WaveShaper/WaveShaperControls.h @@ -42,25 +42,25 @@ class WaveShaperControls : public EffectControls Q_OBJECT public: WaveShaperControls( WaveShaperEffect * _eff ); - virtual ~WaveShaperControls() + ~WaveShaperControls() override { } - virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); - virtual void loadSettings( const QDomElement & _this ); - inline virtual QString nodeName() const + void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; + void loadSettings( const QDomElement & _this ) override; + inline QString nodeName() const override { return( "waveshapercontrols" ); } virtual void setDefaultShape(); - virtual int controlCount() + int controlCount() override { return( 4 ); } - virtual gui::EffectControlDialog* createView() + gui::EffectControlDialog* createView() override { return( new gui::WaveShaperControlDialog( this ) ); } diff --git a/plugins/Xpressive/ExprSynth.cpp b/plugins/Xpressive/ExprSynth.cpp index ac850bca9..afd6da1f9 100644 --- a/plugins/Xpressive/ExprSynth.cpp +++ b/plugins/Xpressive/ExprSynth.cpp @@ -56,7 +56,7 @@ struct freefunc0 : public exprtk::ifunction freefunc0() : exprtk::ifunction(0) { if (optimize) { exprtk::disable_has_side_effects(*this); } } - inline T operator()() + inline T operator()() override { return Functor::process(); } }; template @@ -67,7 +67,7 @@ struct freefunc1 : public exprtk::ifunction freefunc1() : exprtk::ifunction(1) { if (optimize) { exprtk::disable_has_side_effects(*this); } } - inline T operator()(const T& x) + inline T operator()(const T& x) override { return Functor::process(x); } }; @@ -76,7 +76,7 @@ struct IntegrateFunction : public exprtk::ifunction { using exprtk::ifunction::operator(); - virtual ~IntegrateFunction() + ~IntegrateFunction() override { delete [] m_counters; } @@ -94,7 +94,7 @@ struct IntegrateFunction : public exprtk::ifunction clearArray(m_counters,max_counters); } - inline T operator()(const T& x) + inline T operator()(const T& x) override { if (*m_frame == 0) { @@ -131,7 +131,7 @@ struct LastSampleFunction : public exprtk::ifunction { using exprtk::ifunction::operator(); - virtual ~LastSampleFunction() + ~LastSampleFunction() override { delete [] m_samples; } @@ -145,7 +145,7 @@ struct LastSampleFunction : public exprtk::ifunction clearArray(m_samples, history_size); } - inline T operator()(const T& x) + inline T operator()(const T& x) override { if (!std::isnan(x) && !std::isinf(x)) { @@ -187,7 +187,7 @@ struct WaveValueFunction : public exprtk::ifunction m_size(s) {} - inline T operator()(const T& index) + inline T operator()(const T& index) override { return m_vec[(int) ( positiveFraction(index) * m_size )]; } @@ -205,7 +205,7 @@ struct WaveValueFunctionInterpolate : public exprtk::ifunction m_size(s) {} - inline T operator()(const T& index) + inline T operator()(const T& index) override { const T x = positiveFraction(index) * m_size; const int ix = (int)x; @@ -321,7 +321,7 @@ struct RandomVectorSeedFunction : public exprtk::ifunction return static_cast(res) / (float)(1 << 31); } - inline float operator()(const float& index,const float& seed) + inline float operator()(const float& index,const float& seed) override { int irseed; if (seed < 0 || std::isnan(seed) || std::isinf(seed)) @@ -346,7 +346,7 @@ struct RandomVectorFunction : public exprtk::ifunction m_rseed(seed) { exprtk::disable_has_side_effects(*this); } - inline float operator()(const float& index) + inline float operator()(const float& index) override { return RandomVectorSeedFunction::randv(index,m_rseed); } diff --git a/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp b/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp index 2d9a2701e..b2e47cade 100644 --- a/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/RemoteZynAddSubFx.cpp @@ -64,17 +64,17 @@ public: pthread_create( &m_messageThreadHandle, nullptr, messageLoop, this ); } - virtual ~RemoteZynAddSubFx() + ~RemoteZynAddSubFx() override { Nio::stop(); } - virtual void updateSampleRate() + void updateSampleRate() override { LocalZynAddSubFx::setSampleRate( sampleRate() ); } - virtual void updateBufferSize() + void updateBufferSize() override { LocalZynAddSubFx::setBufferSize( bufferSize() ); } @@ -91,7 +91,7 @@ public: m_guiExit = true; } - virtual bool processMessage( const message & _m ) + bool processMessage( const message & _m ) override { switch( _m.id ) { @@ -133,13 +133,13 @@ public: } // all functions are called while m_master->mutex is held - virtual void processMidiEvent( const MidiEvent& event, const f_cnt_t /* _offset */ ) + void processMidiEvent( const MidiEvent& event, const f_cnt_t /* _offset */ ) override { LocalZynAddSubFx::processMidiEvent( event ); } - virtual void process( const sampleFrame * _in, sampleFrame * _out ) + void process( const sampleFrame * _in, sampleFrame * _out ) override { LocalZynAddSubFx::processAudio( _out ); } diff --git a/src/core/PresetPreviewPlayHandle.cpp b/src/core/PresetPreviewPlayHandle.cpp index 0ce248e9c..1734ef497 100644 --- a/src/core/PresetPreviewPlayHandle.cpp +++ b/src/core/PresetPreviewPlayHandle.cpp @@ -53,7 +53,7 @@ public: m_previewInstrumentTrack->setPreviewMode( true ); } - virtual ~PreviewTrackContainer() + ~PreviewTrackContainer() override { } diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index 0a24b32cc..5368fcf7d 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -113,7 +113,7 @@ MixerView::MixerView() : public: ChannelArea( QWidget * parent, MixerView * mv ) : QScrollArea( parent ), m_mv( mv ) {} - ~ChannelArea() {} + ~ChannelArea() override {} void keyPressEvent( QKeyEvent * e ) override { m_mv->keyPressEvent( e ); diff --git a/src/gui/RowTableView.cpp b/src/gui/RowTableView.cpp index cef8b87ea..be4824016 100644 --- a/src/gui/RowTableView.cpp +++ b/src/gui/RowTableView.cpp @@ -41,13 +41,13 @@ public: m_table( table ) { } - virtual void paint( QPainter * painter, + void paint( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const override; protected: - virtual void initStyleOption( QStyleOptionViewItem * option, + void initStyleOption( QStyleOptionViewItem * option, const QModelIndex & index ) const override; diff --git a/src/gui/SideBar.cpp b/src/gui/SideBar.cpp index 4c6f6abd1..0eca4d9f8 100644 --- a/src/gui/SideBar.cpp +++ b/src/gui/SideBar.cpp @@ -44,7 +44,7 @@ public: { } - virtual ~SideBarButton() = default; + ~SideBarButton() override = default; Qt::Orientation orientation() const { diff --git a/src/gui/modals/ControllerConnectionDialog.cpp b/src/gui/modals/ControllerConnectionDialog.cpp index 008acbdb5..b8d323709 100644 --- a/src/gui/modals/ControllerConnectionDialog.cpp +++ b/src/gui/modals/ControllerConnectionDialog.cpp @@ -60,7 +60,7 @@ public: } - virtual ~AutoDetectMidiController() + ~AutoDetectMidiController() override { } diff --git a/tests/QTestSuite.h b/tests/QTestSuite.h index e0bd164ed..6cd27f5aa 100644 --- a/tests/QTestSuite.h +++ b/tests/QTestSuite.h @@ -10,7 +10,7 @@ class QTestSuite : public QObject Q_OBJECT public: explicit QTestSuite(QObject *parent = 0); - ~QTestSuite(); + ~QTestSuite() override; static QList suites(); From c2fa2375dc4e39535097e8ac771f6324aa5cd51c Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Wed, 22 Jun 2022 10:06:34 +0900 Subject: [PATCH 06/17] Don't send effEditIdle on CLI rendering (#6440) --- plugins/VstBase/RemoteVstPlugin.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/VstBase/RemoteVstPlugin.cpp b/plugins/VstBase/RemoteVstPlugin.cpp index 7ac0c97e2..520211f68 100644 --- a/plugins/VstBase/RemoteVstPlugin.cpp +++ b/plugins/VstBase/RemoteVstPlugin.cpp @@ -2165,7 +2165,10 @@ void RemoteVstPlugin::idle() return; } setProcessing( true ); - pluginDispatch( effEditIdle ); + if (!HEADLESS && m_window) + { + pluginDispatch( effEditIdle ); + } setShouldGiveIdle( false ); setProcessing( false ); // We might have received a message whilst idling @@ -2213,7 +2216,10 @@ void RemoteVstPlugin::processUIThreadMessages() #endif if( shouldGiveIdle() ) { - pluginDispatch( effEditIdle ); + if (!HEADLESS && m_window) + { + pluginDispatch( effEditIdle ); + } setShouldGiveIdle( false ); } #ifdef NATIVE_LINUX_VST From 96df9b006cc4bc0ef47754f2db554b27be0323b8 Mon Sep 17 00:00:00 2001 From: Dominic Clark Date: Thu, 23 Jun 2022 12:20:05 +0100 Subject: [PATCH 07/17] Clean up macros a bit (#6444) * Prefix `STRINGIFY` and `STR` macros with `LMMS_` * Fix include guard macro names * Remove unused macros --- include/DrumSynth.h | 6 ++--- include/MicroTimer.h | 6 ++--- include/RemotePluginBase.h | 1 - include/embed.h | 4 ++-- include/lmms_basics.h | 4 ++-- include/versioninfo.h | 2 +- plugins/Amplifier/Amplifier.cpp | 2 +- .../AudioFileProcessor/AudioFileProcessor.cpp | 2 +- plugins/BassBooster/BassBooster.cpp | 2 +- plugins/BitInvader/BitInvader.cpp | 2 +- plugins/Bitcrush/Bitcrush.cpp | 2 +- plugins/CarlaPatchbay/CarlaPatchbay.cpp | 2 +- plugins/CarlaRack/CarlaRack.cpp | 2 +- plugins/Compressor/Compressor.cpp | 2 +- plugins/CrossoverEQ/CrossoverEQ.cpp | 2 +- plugins/Delay/DelayEffect.cpp | 2 +- plugins/DualFilter/DualFilter.cpp | 2 +- .../DynamicsProcessor/DynamicsProcessor.cpp | 2 +- plugins/Eq/EqEffect.cpp | 2 +- plugins/Flanger/FlangerEffect.cpp | 2 +- plugins/FreeBoy/FreeBoy.cpp | 2 +- plugins/GigPlayer/GigPlayer.cpp | 2 +- plugins/HydrogenImport/HydrogenImport.cpp | 2 +- plugins/Kicker/Kicker.cpp | 2 +- plugins/LadspaBrowser/LadspaBrowser.cpp | 2 +- plugins/LadspaEffect/LadspaEffect.cpp | 2 +- plugins/Lb302/Lb302.cpp | 2 +- plugins/Lb302/Lb302.h | 6 ++--- plugins/Lv2Effect/Lv2Effect.cpp | 2 +- plugins/Lv2Instrument/Lv2Instrument.cpp | 2 +- plugins/MidiExport/MidiExport.cpp | 2 +- plugins/MidiImport/MidiImport.cpp | 2 +- plugins/Monstro/Monstro.cpp | 2 +- plugins/MultitapEcho/MultitapEcho.cpp | 2 +- plugins/Nes/Nes.cpp | 2 +- plugins/OpulenZ/OpulenZ.cpp | 2 +- plugins/Organic/Organic.cpp | 2 +- plugins/Patman/Patman.cpp | 2 +- plugins/Patman/Patman.h | 6 ++--- .../PeakControllerEffect.cpp | 2 +- plugins/ReverbSC/ReverbSC.cpp | 2 +- plugins/Sf2Player/Sf2Player.cpp | 2 +- plugins/Sfxr/Sfxr.cpp | 2 +- plugins/Sid/SidInstrument.cpp | 2 +- plugins/StereoEnhancer/StereoEnhancer.cpp | 2 +- plugins/StereoMatrix/StereoMatrix.cpp | 2 +- plugins/Stk/Mallets/Mallets.cpp | 2 +- plugins/TripleOscillator/TripleOscillator.cpp | 2 +- plugins/Vectorscope/Vectorscope.cpp | 2 +- plugins/Vestige/Vestige.cpp | 2 +- plugins/Vibed/Vibed.cpp | 2 +- plugins/VstBase/vst_base.cpp | 2 +- plugins/VstEffect/VstEffect.cpp | 2 +- plugins/Watsyn/Watsyn.cpp | 2 +- plugins/WaveShaper/WaveShaper.cpp | 2 +- plugins/Xpressive/Xpressive.cpp | 2 +- plugins/ZynAddSubFx/ZynAddSubFx.cpp | 2 +- src/gui/instrument/InstrumentMidiIOView.cpp | 5 ----- src/lmmsconfig.h.in | 22 ------------------- 59 files changed, 66 insertions(+), 94 deletions(-) diff --git a/include/DrumSynth.h b/include/DrumSynth.h index 79383a6d4..27941f67d 100644 --- a/include/DrumSynth.h +++ b/include/DrumSynth.h @@ -24,8 +24,8 @@ */ -#ifndef _DRUMSYNTH_H__ -#define _DRUMSYNTH_H__ +#ifndef DRUMSYNTH_H +#define DRUMSYNTH_H #include #include "lmms_basics.h" @@ -57,4 +57,4 @@ class DrumSynth { } // namespace lmms -#endif +#endif // DRUMSYNTH_H diff --git a/include/MicroTimer.h b/include/MicroTimer.h index 2eaf28b97..4daf28edd 100644 --- a/include/MicroTimer.h +++ b/include/MicroTimer.h @@ -22,8 +22,8 @@ * */ -#ifndef MICRO_TIMER -#define MICRO_TIMER +#ifndef MICRO_TIMER_H +#define MICRO_TIMER_H #include @@ -48,4 +48,4 @@ private: } // namespace lmms -#endif +#endif // MICRO_TIMER_H diff --git a/include/RemotePluginBase.h b/include/RemotePluginBase.h index 4d5627a92..2abe59132 100644 --- a/include/RemotePluginBase.h +++ b/include/RemotePluginBase.h @@ -38,7 +38,6 @@ #if !(defined(LMMS_HAVE_SYS_IPC_H) && defined(LMMS_HAVE_SEMAPHORE_H)) #define SYNC_WITH_SHM_FIFO -#define USE_QT_SEMAPHORES #ifdef LMMS_HAVE_PROCESS_H #include diff --git a/include/embed.h b/include/embed.h index 23aebccec..d26fd643a 100644 --- a/include/embed.h +++ b/include/embed.h @@ -61,7 +61,7 @@ namespace PLUGIN_NAME inline QPixmap getIconPixmap( const QString& _name, int _w = -1, int _h = -1, const char** xpm = nullptr ) { - return embed::getIconPixmap(QString("%1/%2").arg(STRINGIFY(PLUGIN_NAME), _name), _w, _h, xpm); + return embed::getIconPixmap(QString("%1/%2").arg(LMMS_STRINGIFY(PLUGIN_NAME), _name), _w, _h, xpm); } //QString getText( const char * _name ); @@ -132,7 +132,7 @@ public: QString pixmapName() const override { - return QString( STRINGIFY(PLUGIN_NAME) ) + "::" + m_name; + return QString( LMMS_STRINGIFY(PLUGIN_NAME) ) + "::" + m_name; } } ; diff --git a/include/lmms_basics.h b/include/lmms_basics.h index 3f7057ef7..31c231c1b 100644 --- a/include/lmms_basics.h +++ b/include/lmms_basics.h @@ -136,8 +136,8 @@ using surroundSampleFrame = std::array; constexpr std::size_t LMMS_ALIGN_SIZE = 16; -#define STRINGIFY(s) STR(s) -#define STR(PN) #PN +#define LMMS_STRINGIFY(s) LMMS_STR(s) +#define LMMS_STR(PN) #PN // Abstract away GUI CTRL key (linux/windows) vs ⌘ (apple) constexpr const char* UI_CTRL_KEY = diff --git a/include/versioninfo.h b/include/versioninfo.h index 1faab6804..2bb74a570 100644 --- a/include/versioninfo.h +++ b/include/versioninfo.h @@ -3,7 +3,7 @@ #ifdef __GNUC__ constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "GCC " __VERSION__; #elif defined(_MSC_VER) -constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "MSVC " STRINGIFY(_MSC_FULL_VER); +constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "MSVC " LMMS_STRINGIFY(_MSC_FULL_VER); #else constexpr const char* LMMS_BUILDCONF_COMPILER_VERSION = "unknown compiler"; #endif diff --git a/plugins/Amplifier/Amplifier.cpp b/plugins/Amplifier/Amplifier.cpp index ced43f1e2..1212bcd6a 100644 --- a/plugins/Amplifier/Amplifier.cpp +++ b/plugins/Amplifier/Amplifier.cpp @@ -36,7 +36,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT amplifier_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Amplifier", QT_TRANSLATE_NOOP( "PluginBrowser", "A native amplifier plugin" ), "Vesa Kivimäki ", diff --git a/plugins/AudioFileProcessor/AudioFileProcessor.cpp b/plugins/AudioFileProcessor/AudioFileProcessor.cpp index b5e991a2c..4ff93132b 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessor.cpp +++ b/plugins/AudioFileProcessor/AudioFileProcessor.cpp @@ -57,7 +57,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "AudioFileProcessor", QT_TRANSLATE_NOOP( "PluginBrowser", "Simple sampler with various settings for " diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index b8ea271ee..280accddb 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -36,7 +36,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT bassbooster_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "BassBooster", QT_TRANSLATE_NOOP( "PluginBrowser", "Boost your bass the fast and simple way" ), "Tobias Doerffel ", diff --git a/plugins/BitInvader/BitInvader.cpp b/plugins/BitInvader/BitInvader.cpp index 55dd97386..0168031fc 100644 --- a/plugins/BitInvader/BitInvader.cpp +++ b/plugins/BitInvader/BitInvader.cpp @@ -54,7 +54,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "BitInvader", QT_TRANSLATE_NOOP( "PluginBrowser", "Customizable wavetable synthesizer" ), diff --git a/plugins/Bitcrush/Bitcrush.cpp b/plugins/Bitcrush/Bitcrush.cpp index 13f880623..68724eccd 100644 --- a/plugins/Bitcrush/Bitcrush.cpp +++ b/plugins/Bitcrush/Bitcrush.cpp @@ -43,7 +43,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT bitcrush_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Bitcrush", QT_TRANSLATE_NOOP( "PluginBrowser", "An oversampling bitcrusher" ), "Vesa Kivimäki ", diff --git a/plugins/CarlaPatchbay/CarlaPatchbay.cpp b/plugins/CarlaPatchbay/CarlaPatchbay.cpp index 7f5b2060e..e440d4e3f 100644 --- a/plugins/CarlaPatchbay/CarlaPatchbay.cpp +++ b/plugins/CarlaPatchbay/CarlaPatchbay.cpp @@ -37,7 +37,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT carlapatchbay_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Carla Patchbay", QT_TRANSLATE_NOOP( "PluginBrowser", "Carla Patchbay Instrument" ), diff --git a/plugins/CarlaRack/CarlaRack.cpp b/plugins/CarlaRack/CarlaRack.cpp index ad2dd00b8..5360baf96 100644 --- a/plugins/CarlaRack/CarlaRack.cpp +++ b/plugins/CarlaRack/CarlaRack.cpp @@ -37,7 +37,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT carlarack_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Carla Rack", QT_TRANSLATE_NOOP( "PluginBrowser", "Carla Rack Instrument" ), diff --git a/plugins/Compressor/Compressor.cpp b/plugins/Compressor/Compressor.cpp index 606888633..bf6928e21 100755 --- a/plugins/Compressor/Compressor.cpp +++ b/plugins/Compressor/Compressor.cpp @@ -38,7 +38,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT compressor_plugin_descriptor = { - STRINGIFY(PLUGIN_NAME), + LMMS_STRINGIFY(PLUGIN_NAME), "Compressor", QT_TRANSLATE_NOOP("PluginBrowser", "A dynamic range compressor."), "Lost Robot ", diff --git a/plugins/CrossoverEQ/CrossoverEQ.cpp b/plugins/CrossoverEQ/CrossoverEQ.cpp index d915afc23..641e06b4e 100644 --- a/plugins/CrossoverEQ/CrossoverEQ.cpp +++ b/plugins/CrossoverEQ/CrossoverEQ.cpp @@ -38,7 +38,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT crossovereq_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Crossover Equalizer", QT_TRANSLATE_NOOP( "PluginBrowser", "A 4-band Crossover Equalizer" ), "Vesa Kivimäki ", diff --git a/plugins/Delay/DelayEffect.cpp b/plugins/Delay/DelayEffect.cpp index 5ce29f8ec..1c6a74b86 100644 --- a/plugins/Delay/DelayEffect.cpp +++ b/plugins/Delay/DelayEffect.cpp @@ -39,7 +39,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT delay_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Delay", QT_TRANSLATE_NOOP( "PluginBrowser", "A native delay plugin" ), "Dave French ", diff --git a/plugins/DualFilter/DualFilter.cpp b/plugins/DualFilter/DualFilter.cpp index 2279ae37d..75a2ab532 100644 --- a/plugins/DualFilter/DualFilter.cpp +++ b/plugins/DualFilter/DualFilter.cpp @@ -38,7 +38,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT dualfilter_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Dual Filter", QT_TRANSLATE_NOOP( "PluginBrowser", "A Dual filter plugin" ), "Vesa Kivimäki ", diff --git a/plugins/DynamicsProcessor/DynamicsProcessor.cpp b/plugins/DynamicsProcessor/DynamicsProcessor.cpp index 85f1d94f4..c8ad9a029 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessor.cpp +++ b/plugins/DynamicsProcessor/DynamicsProcessor.cpp @@ -41,7 +41,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT dynamicsprocessor_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Dynamics Processor", QT_TRANSLATE_NOOP( "PluginBrowser", "plugin for processing dynamics in a flexible way" ), diff --git a/plugins/Eq/EqEffect.cpp b/plugins/Eq/EqEffect.cpp index 7a9b5b15e..12a10061b 100644 --- a/plugins/Eq/EqEffect.cpp +++ b/plugins/Eq/EqEffect.cpp @@ -39,7 +39,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT eq_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Equalizer", QT_TRANSLATE_NOOP( "PluginBrowser", "A native eq plugin" ), "Dave French ", diff --git a/plugins/Flanger/FlangerEffect.cpp b/plugins/Flanger/FlangerEffect.cpp index 71cf96e18..982702ebe 100644 --- a/plugins/Flanger/FlangerEffect.cpp +++ b/plugins/Flanger/FlangerEffect.cpp @@ -37,7 +37,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT flanger_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Flanger", QT_TRANSLATE_NOOP( "PluginBrowser", "A native flanger plugin" ), "Dave French ", diff --git a/plugins/FreeBoy/FreeBoy.cpp b/plugins/FreeBoy/FreeBoy.cpp index 67a7ac019..9f7085444 100644 --- a/plugins/FreeBoy/FreeBoy.cpp +++ b/plugins/FreeBoy/FreeBoy.cpp @@ -52,7 +52,7 @@ extern "C" { Plugin::Descriptor PLUGIN_EXPORT freeboy_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "FreeBoy", QT_TRANSLATE_NOOP( "PluginBrowser", "Emulation of GameBoy (TM) APU" ), diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index e3d37baa9..81a571ac7 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -64,7 +64,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT gigplayer_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "GIG Player", QT_TRANSLATE_NOOP( "PluginBrowser", "Player for GIG files" ), "Garrett Wilson ", diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 9dc0950fb..657597471 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -24,7 +24,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT hydrogenimport_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Hydrogen Import", QT_TRANSLATE_NOOP( "PluginBrowser", "Filter for importing Hydrogen files into LMMS" ), diff --git a/plugins/Kicker/Kicker.cpp b/plugins/Kicker/Kicker.cpp index 4c5fa77f8..6a3c0823a 100644 --- a/plugins/Kicker/Kicker.cpp +++ b/plugins/Kicker/Kicker.cpp @@ -49,7 +49,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT kicker_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Kicker", QT_TRANSLATE_NOOP( "PluginBrowser", "Versatile drum synthesizer" ), diff --git a/plugins/LadspaBrowser/LadspaBrowser.cpp b/plugins/LadspaBrowser/LadspaBrowser.cpp index d40b855fd..cd10b47fd 100644 --- a/plugins/LadspaBrowser/LadspaBrowser.cpp +++ b/plugins/LadspaBrowser/LadspaBrowser.cpp @@ -50,7 +50,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "LADSPA Plugin Browser", QT_TRANSLATE_NOOP( "PluginBrowser", "List installed LADSPA plugins" ), diff --git a/plugins/LadspaEffect/LadspaEffect.cpp b/plugins/LadspaEffect/LadspaEffect.cpp index a26e35eb7..c722dbaf3 100644 --- a/plugins/LadspaEffect/LadspaEffect.cpp +++ b/plugins/LadspaEffect/LadspaEffect.cpp @@ -53,7 +53,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT ladspaeffect_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "LADSPA", QT_TRANSLATE_NOOP( "PluginBrowser", "plugin for using arbitrary LADSPA-effects " diff --git a/plugins/Lb302/Lb302.cpp b/plugins/Lb302/Lb302.cpp index 999b66151..c60028520 100644 --- a/plugins/Lb302/Lb302.cpp +++ b/plugins/Lb302/Lb302.cpp @@ -80,7 +80,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT lb302_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "LB302", QT_TRANSLATE_NOOP( "PluginBrowser", "Incomplete monophonic imitation TB-303" ), diff --git a/plugins/Lb302/Lb302.h b/plugins/Lb302/Lb302.h index 770fb451e..57acb9ef3 100644 --- a/plugins/Lb302/Lb302.h +++ b/plugins/Lb302/Lb302.h @@ -29,8 +29,8 @@ */ -#ifndef LB302_H_ -#define LB302_H_ +#ifndef LB302_H +#define LB302_H #include "DspEffectLibrary.h" #include "Instrument.h" @@ -303,4 +303,4 @@ private: } // namespace lmms -#endif +#endif // LB302_H diff --git a/plugins/Lv2Effect/Lv2Effect.cpp b/plugins/Lv2Effect/Lv2Effect.cpp index d3755a2c9..f69ea4a38 100644 --- a/plugins/Lv2Effect/Lv2Effect.cpp +++ b/plugins/Lv2Effect/Lv2Effect.cpp @@ -40,7 +40,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT lv2effect_plugin_descriptor = { - STRINGIFY(PLUGIN_NAME), + LMMS_STRINGIFY(PLUGIN_NAME), "LV2", QT_TRANSLATE_NOOP("PluginBrowser", "plugin for using arbitrary LV2-effects inside LMMS."), diff --git a/plugins/Lv2Instrument/Lv2Instrument.cpp b/plugins/Lv2Instrument/Lv2Instrument.cpp index f7e0a2b37..01ccce15d 100644 --- a/plugins/Lv2Instrument/Lv2Instrument.cpp +++ b/plugins/Lv2Instrument/Lv2Instrument.cpp @@ -49,7 +49,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT lv2instrument_plugin_descriptor = { - STRINGIFY(PLUGIN_NAME), + LMMS_STRINGIFY(PLUGIN_NAME), "LV2", QT_TRANSLATE_NOOP("PluginBrowser", "plugin for using arbitrary LV2 instruments inside LMMS."), diff --git a/plugins/MidiExport/MidiExport.cpp b/plugins/MidiExport/MidiExport.cpp index 6f0f5a11e..1fde83f06 100644 --- a/plugins/MidiExport/MidiExport.cpp +++ b/plugins/MidiExport/MidiExport.cpp @@ -44,7 +44,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT midiexport_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "MIDI Export", QT_TRANSLATE_NOOP( "PluginBrowser", "Filter for exporting MIDI-files from LMMS" ), diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index e6cf644cf..e9962838c 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -65,7 +65,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT midiimport_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "MIDI Import", QT_TRANSLATE_NOOP( "PluginBrowser", "Filter for importing MIDI-files into LMMS" ), diff --git a/plugins/Monstro/Monstro.cpp b/plugins/Monstro/Monstro.cpp index 889a89fb0..d5ad851ee 100644 --- a/plugins/Monstro/Monstro.cpp +++ b/plugins/Monstro/Monstro.cpp @@ -47,7 +47,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT monstro_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Monstro", QT_TRANSLATE_NOOP( "PluginBrowser", "Monstrous 3-oscillator synth with modulation matrix" ), diff --git a/plugins/MultitapEcho/MultitapEcho.cpp b/plugins/MultitapEcho/MultitapEcho.cpp index f3d03740c..05c3f30fe 100644 --- a/plugins/MultitapEcho/MultitapEcho.cpp +++ b/plugins/MultitapEcho/MultitapEcho.cpp @@ -36,7 +36,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT multitapecho_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Multitap Echo", QT_TRANSLATE_NOOP( "PluginBrowser", "A multitap echo delay plugin" ), "Vesa Kivimäki ", diff --git a/plugins/Nes/Nes.cpp b/plugins/Nes/Nes.cpp index b774f7efa..f3537d88c 100644 --- a/plugins/Nes/Nes.cpp +++ b/plugins/Nes/Nes.cpp @@ -45,7 +45,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT nes_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Nescaline", QT_TRANSLATE_NOOP( "PluginBrowser", "A NES-like synthesizer" ), diff --git a/plugins/OpulenZ/OpulenZ.cpp b/plugins/OpulenZ/OpulenZ.cpp index 6abfb4e19..beec8841b 100644 --- a/plugins/OpulenZ/OpulenZ.cpp +++ b/plugins/OpulenZ/OpulenZ.cpp @@ -67,7 +67,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT opulenz_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "OpulenZ", QT_TRANSLATE_NOOP( "PluginBrowser", "2-operator FM Synth" ), diff --git a/plugins/Organic/Organic.cpp b/plugins/Organic/Organic.cpp index 320769200..6271f6c40 100644 --- a/plugins/Organic/Organic.cpp +++ b/plugins/Organic/Organic.cpp @@ -50,7 +50,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT organic_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Organic", QT_TRANSLATE_NOOP( "PluginBrowser", "Additive Synthesizer for organ-like sounds" ), diff --git a/plugins/Patman/Patman.cpp b/plugins/Patman/Patman.cpp index 25b055b9c..c6fb202c9 100644 --- a/plugins/Patman/Patman.cpp +++ b/plugins/Patman/Patman.cpp @@ -55,7 +55,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT patman_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "PatMan", QT_TRANSLATE_NOOP( "PluginBrowser", "GUS-compatible patch instrument" ), diff --git a/plugins/Patman/Patman.h b/plugins/Patman/Patman.h index 206c2e503..eee122129 100644 --- a/plugins/Patman/Patman.h +++ b/plugins/Patman/Patman.h @@ -23,8 +23,8 @@ */ -#ifndef PATMAN_H_ -#define PATMAN_H_ +#ifndef PATMAN_H +#define PATMAN_H #include "Instrument.h" #include "InstrumentView.h" @@ -162,4 +162,4 @@ private: } // namespace lmms -#endif +#endif // PATMAN_H diff --git a/plugins/PeakControllerEffect/PeakControllerEffect.cpp b/plugins/PeakControllerEffect/PeakControllerEffect.cpp index 529437d6e..d32a22320 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffect.cpp +++ b/plugins/PeakControllerEffect/PeakControllerEffect.cpp @@ -42,7 +42,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT peakcontrollereffect_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Peak Controller", QT_TRANSLATE_NOOP( "PluginBrowser", "Plugin for controlling knobs with sound peaks" ), diff --git a/plugins/ReverbSC/ReverbSC.cpp b/plugins/ReverbSC/ReverbSC.cpp index 6faea8c9a..4d72dc319 100644 --- a/plugins/ReverbSC/ReverbSC.cpp +++ b/plugins/ReverbSC/ReverbSC.cpp @@ -37,7 +37,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT reverbsc_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "ReverbSC", QT_TRANSLATE_NOOP( "PluginBrowser", "Reverb algorithm by Sean Costello" ), "Paul Batchelor", diff --git a/plugins/Sf2Player/Sf2Player.cpp b/plugins/Sf2Player/Sf2Player.cpp index 8b17f0bb0..291f7fb76 100644 --- a/plugins/Sf2Player/Sf2Player.cpp +++ b/plugins/Sf2Player/Sf2Player.cpp @@ -58,7 +58,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT sf2player_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Sf2 Player", QT_TRANSLATE_NOOP( "PluginBrowser", "Player for SoundFont files" ), "Paul Giblock ", diff --git a/plugins/Sfxr/Sfxr.cpp b/plugins/Sfxr/Sfxr.cpp index ad7dd26a7..a8bb81219 100644 --- a/plugins/Sfxr/Sfxr.cpp +++ b/plugins/Sfxr/Sfxr.cpp @@ -61,7 +61,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT sfxr_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "sfxr", QT_TRANSLATE_NOOP( "PluginBrowser", "LMMS port of sfxr" ), diff --git a/plugins/Sid/SidInstrument.cpp b/plugins/Sid/SidInstrument.cpp index 450d172cf..e075ed049 100644 --- a/plugins/Sid/SidInstrument.cpp +++ b/plugins/Sid/SidInstrument.cpp @@ -75,7 +75,7 @@ extern "C" { Plugin::Descriptor PLUGIN_EXPORT sid_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "SID", QT_TRANSLATE_NOOP( "PluginBrowser", "Emulation of the MOS6581 and MOS8580 " "SID.\nThis chip was used in the Commodore 64 computer." ), diff --git a/plugins/StereoEnhancer/StereoEnhancer.cpp b/plugins/StereoEnhancer/StereoEnhancer.cpp index bda9c8086..1351ab885 100644 --- a/plugins/StereoEnhancer/StereoEnhancer.cpp +++ b/plugins/StereoEnhancer/StereoEnhancer.cpp @@ -37,7 +37,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT stereoenhancer_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "StereoEnhancer Effect", QT_TRANSLATE_NOOP( "PluginBrowser", "Plugin for enhancing stereo separation of a stereo input file" ), diff --git a/plugins/StereoMatrix/StereoMatrix.cpp b/plugins/StereoMatrix/StereoMatrix.cpp index de15d8370..34b2fc86b 100644 --- a/plugins/StereoMatrix/StereoMatrix.cpp +++ b/plugins/StereoMatrix/StereoMatrix.cpp @@ -37,7 +37,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT stereomatrix_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Stereo Matrix", QT_TRANSLATE_NOOP( "PluginBrowser", "Plugin for freely manipulating stereo output" ), diff --git a/plugins/Stk/Mallets/Mallets.cpp b/plugins/Stk/Mallets/Mallets.cpp index 37ab3f6f1..4adfb5347 100644 --- a/plugins/Stk/Mallets/Mallets.cpp +++ b/plugins/Stk/Mallets/Mallets.cpp @@ -53,7 +53,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT malletsstk_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Mallets", QT_TRANSLATE_NOOP( "PluginBrowser", "Tuneful things to bang on" ), diff --git a/plugins/TripleOscillator/TripleOscillator.cpp b/plugins/TripleOscillator/TripleOscillator.cpp index 2931c3b85..f19754019 100644 --- a/plugins/TripleOscillator/TripleOscillator.cpp +++ b/plugins/TripleOscillator/TripleOscillator.cpp @@ -50,7 +50,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "TripleOscillator", QT_TRANSLATE_NOOP( "PluginBrowser", "Three powerful oscillators you can modulate " diff --git a/plugins/Vectorscope/Vectorscope.cpp b/plugins/Vectorscope/Vectorscope.cpp index df093f671..b9880691c 100644 --- a/plugins/Vectorscope/Vectorscope.cpp +++ b/plugins/Vectorscope/Vectorscope.cpp @@ -34,7 +34,7 @@ namespace lmms extern "C" { Plugin::Descriptor PLUGIN_EXPORT vectorscope_plugin_descriptor = { - STRINGIFY(PLUGIN_NAME), + LMMS_STRINGIFY(PLUGIN_NAME), "Vectorscope", QT_TRANSLATE_NOOP("PluginBrowser", "A stereo field visualizer."), "Martin Pavelek ", diff --git a/plugins/Vestige/Vestige.cpp b/plugins/Vestige/Vestige.cpp index 150a4f1e4..f5ac06e6d 100644 --- a/plugins/Vestige/Vestige.cpp +++ b/plugins/Vestige/Vestige.cpp @@ -71,7 +71,7 @@ extern "C" Plugin::Descriptor Q_DECL_EXPORT vestige_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "VeSTige", QT_TRANSLATE_NOOP( "PluginBrowser", "VST-host for using VST(i)-plugins within LMMS" ), diff --git a/plugins/Vibed/Vibed.cpp b/plugins/Vibed/Vibed.cpp index 87c42b187..b9bcd9f1b 100644 --- a/plugins/Vibed/Vibed.cpp +++ b/plugins/Vibed/Vibed.cpp @@ -52,7 +52,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT vibedstrings_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Vibed", QT_TRANSLATE_NOOP( "PluginBrowser", "Vibrating string modeler" ), diff --git a/plugins/VstBase/vst_base.cpp b/plugins/VstBase/vst_base.cpp index 6885feb97..80cb9d736 100644 --- a/plugins/VstBase/vst_base.cpp +++ b/plugins/VstBase/vst_base.cpp @@ -36,7 +36,7 @@ extern "C" Plugin::Descriptor VSTBASE_EXPORT vstbase_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "VST Base", "library for all LMMS plugins dealing with VST-plugins", "Tobias Doerffel ", diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index 4fd66dbb5..eee3919c4 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -43,7 +43,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT vsteffect_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "VST", QT_TRANSLATE_NOOP( "PluginBrowser", "plugin for using arbitrary VST effects inside LMMS." ), diff --git a/plugins/Watsyn/Watsyn.cpp b/plugins/Watsyn/Watsyn.cpp index 7978dc120..1c363d417 100644 --- a/plugins/Watsyn/Watsyn.cpp +++ b/plugins/Watsyn/Watsyn.cpp @@ -46,7 +46,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT watsyn_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Watsyn", QT_TRANSLATE_NOOP( "PluginBrowser", "4-oscillator modulatable wavetable synth" ), diff --git a/plugins/WaveShaper/WaveShaper.cpp b/plugins/WaveShaper/WaveShaper.cpp index ededa2e0f..7f0cf732f 100644 --- a/plugins/WaveShaper/WaveShaper.cpp +++ b/plugins/WaveShaper/WaveShaper.cpp @@ -40,7 +40,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT waveshaper_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "Waveshaper Effect", QT_TRANSLATE_NOOP( "PluginBrowser", "plugin for waveshaping" ), diff --git a/plugins/Xpressive/Xpressive.cpp b/plugins/Xpressive/Xpressive.cpp index a69343e07..de1140ed1 100644 --- a/plugins/Xpressive/Xpressive.cpp +++ b/plugins/Xpressive/Xpressive.cpp @@ -54,7 +54,7 @@ namespace lmms extern "C" { -Plugin::Descriptor PLUGIN_EXPORT xpressive_plugin_descriptor = { STRINGIFY( +Plugin::Descriptor PLUGIN_EXPORT xpressive_plugin_descriptor = { LMMS_STRINGIFY( PLUGIN_NAME), "Xpressive", QT_TRANSLATE_NOOP("PluginBrowser", "Mathematical expression parser"), "Orr Dvori", 0x0100, Plugin::Instrument, new PluginPixmapLoader("logo"), nullptr, nullptr }; diff --git a/plugins/ZynAddSubFx/ZynAddSubFx.cpp b/plugins/ZynAddSubFx/ZynAddSubFx.cpp index 27cb4728e..d3b1a90ed 100644 --- a/plugins/ZynAddSubFx/ZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/ZynAddSubFx.cpp @@ -60,7 +60,7 @@ extern "C" Plugin::Descriptor PLUGIN_EXPORT zynaddsubfx_plugin_descriptor = { - STRINGIFY( PLUGIN_NAME ), + LMMS_STRINGIFY( PLUGIN_NAME ), "ZynAddSubFX", QT_TRANSLATE_NOOP( "PluginBrowser", "Embedded ZynAddSubFX" ), diff --git a/src/gui/instrument/InstrumentMidiIOView.cpp b/src/gui/instrument/InstrumentMidiIOView.cpp index f42208b51..f98f58f5a 100644 --- a/src/gui/instrument/InstrumentMidiIOView.cpp +++ b/src/gui/instrument/InstrumentMidiIOView.cpp @@ -144,8 +144,6 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : midiOutputLayout->insertWidget( 0, m_wpBtn ); } -#define PROVIDE_CUSTOM_BASE_VELOCITY_UI -#ifdef PROVIDE_CUSTOM_BASE_VELOCITY_UI GroupBox* baseVelocityGroupBox = new GroupBox( tr( "CUSTOM BASE VELOCITY" ) ); layout->addWidget( baseVelocityGroupBox ); @@ -166,7 +164,6 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : connect( baseVelocityGroupBox->ledButton(), SIGNAL( toggled( bool ) ), m_baseVelocitySpinBox, SLOT( setEnabled( bool ) ) ); -#endif layout->addStretch(); } @@ -195,9 +192,7 @@ void InstrumentMidiIOView::modelChanged() m_fixedOutputNoteSpinBox->setModel( &mp->m_fixedOutputNoteModel ); m_outputProgramSpinBox->setModel( &mp->m_outputProgramModel ); -#ifdef PROVIDE_CUSTOM_BASE_VELOCITY_UI m_baseVelocitySpinBox->setModel( &mp->m_baseVelocityModel ); -#endif if( m_rpBtn ) { diff --git a/src/lmmsconfig.h.in b/src/lmmsconfig.h.in index 30fbfdf3f..d130d6fc2 100644 --- a/src/lmmsconfig.h.in +++ b/src/lmmsconfig.h.in @@ -53,25 +53,3 @@ #cmakedefine LMMS_HAVE_STRING_H #cmakedefine LMMS_HAVE_PROCESS_H #cmakedefine LMMS_HAVE_LOCALE_H - -/* defines for libsamplerate */ - - -/* Target processor clips on negative float to int conversion. */ -#cmakedefine CPU_CLIPS_NEGATIVE 1 -#ifndef CPU_CLIPS_NEGATIVE -#define CPU_CLIPS_NEGATIVE 0 -#endif - -/* Target processor clips on positive float to int conversion. */ -#cmakedefine CPU_CLIPS_POSITIVE 1 -#ifndef CPU_CLIPS_POSITIVE -#define CPU_CLIPS_POSITIVE 0 -#endif - -/* Define if you have C99's lrint function. */ -#cmakedefine HAVE_LRINT 1 - -/* Define if you have C99's lrintf function. */ -#cmakedefine HAVE_LRINTF 1 - From 420769a32d94869c3cf926eeadd1dd7aa4c1952e Mon Sep 17 00:00:00 2001 From: sakertooth Date: Fri, 22 Apr 2022 22:04:57 -0400 Subject: [PATCH 08/17] Fix Qt Deprecations (#6386) Co-authored-by: Kevin Zander Co-authored-by: Dominic Clark --- include/AudioEngine.h | 9 +++++++++ include/AutomationClip.h | 7 +++++++ include/FileBrowser.h | 8 ++++++++ include/RemotePlugin.h | 8 ++++++++ src/core/AudioEngine.cpp | 2 ++ src/core/AutomationClip.cpp | 4 ++++ src/core/RemotePlugin.cpp | 4 +++- src/gui/FileBrowser.cpp | 6 ++++-- src/gui/MicrotunerConfig.cpp | 22 +++++++++++++++++++--- src/gui/clips/ClipView.cpp | 2 +- src/gui/tracks/InstrumentTrackView.cpp | 2 +- src/gui/tracks/TrackOperationsWidget.cpp | 2 +- 12 files changed, 67 insertions(+), 9 deletions(-) diff --git a/include/AudioEngine.h b/include/AudioEngine.h index 44854c826..8cadcc0e2 100644 --- a/include/AudioEngine.h +++ b/include/AudioEngine.h @@ -26,6 +26,11 @@ #define AUDIO_ENGINE_H #include + +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + #include +#endif + #include #include #include @@ -464,7 +469,11 @@ private: bool m_changesSignal; unsigned int m_changes; QMutex m_changesMutex; +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QRecursiveMutex m_doChangesMutex; +#else QMutex m_doChangesMutex; +#endif QMutex m_waitChangesMutex; QWaitCondition m_changesAudioEngineCondition; QWaitCondition m_changesRequestCondition; diff --git a/include/AutomationClip.h b/include/AutomationClip.h index 63c13a120..575203bc4 100644 --- a/include/AutomationClip.h +++ b/include/AutomationClip.h @@ -29,6 +29,9 @@ #include #include +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + #include +#endif #include "AutomationNode.h" #include "Clip.h" @@ -189,7 +192,11 @@ private: // Mutex to make methods involving automation clips thread safe // Mutable so we can lock it from const objects +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + mutable QRecursiveMutex m_clipMutex; +#else mutable QMutex m_clipMutex; +#endif AutomationTrack * m_autoTrack; QVector m_idsToResolve; diff --git a/include/FileBrowser.h b/include/FileBrowser.h index 315248d42..d14533f45 100644 --- a/include/FileBrowser.h +++ b/include/FileBrowser.h @@ -29,6 +29,9 @@ #include #include #include +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + #include +#endif #include @@ -140,7 +143,12 @@ private: //! This should only be accessed or modified when m_pphMutex is held PlayHandle* m_previewPlayHandle; + +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QRecursiveMutex m_pphMutex; +#else QMutex m_pphMutex; +#endif QList getContextActions(FileItem* item, bool songEditor); diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index 73810150d..96c910d5d 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -28,6 +28,10 @@ #include "RemotePluginBase.h" #include "SharedMemory.h" +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + #include +#endif + namespace lmms { @@ -158,7 +162,11 @@ private: QString m_exec; QStringList m_args; +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QRecursiveMutex m_commMutex; +#else QMutex m_commMutex; +#endif bool m_splitChannels; SharedMemory m_audioBuffer; diff --git a/src/core/AudioEngine.cpp b/src/core/AudioEngine.cpp index 827e8b2e4..d6b0d62b5 100644 --- a/src/core/AudioEngine.cpp +++ b/src/core/AudioEngine.cpp @@ -94,7 +94,9 @@ AudioEngine::AudioEngine( bool renderOnly ) : m_clearSignal( false ), m_changesSignal( false ), m_changes( 0 ), +#if (QT_VERSION < QT_VERSION_CHECK(5,14,0)) m_doChangesMutex( QMutex::Recursive ), +#endif m_waitingForWrite( false ) { for( int i = 0; i < 2; ++i ) diff --git a/src/core/AutomationClip.cpp b/src/core/AutomationClip.cpp index 928cf48a9..feeed3fc2 100644 --- a/src/core/AutomationClip.cpp +++ b/src/core/AutomationClip.cpp @@ -47,7 +47,9 @@ const float AutomationClip::DEFAULT_MAX_VALUE = 1; AutomationClip::AutomationClip( AutomationTrack * _auto_track ) : Clip( _auto_track ), +#if (QT_VERSION < QT_VERSION_CHECK(5,14,0)) m_clipMutex(QMutex::Recursive), +#endif m_autoTrack( _auto_track ), m_objects(), m_tension( 1.0 ), @@ -79,7 +81,9 @@ AutomationClip::AutomationClip( AutomationTrack * _auto_track ) : AutomationClip::AutomationClip( const AutomationClip & _clip_to_copy ) : Clip( _clip_to_copy.m_autoTrack ), +#if (QT_VERSION < QT_VERSION_CHECK(5,14,0)) m_clipMutex(QMutex::Recursive), +#endif m_autoTrack( _clip_to_copy.m_autoTrack ), m_objects( _clip_to_copy.m_objects ), m_tension( _clip_to_copy.m_tension ), diff --git a/src/core/RemotePlugin.cpp b/src/core/RemotePlugin.cpp index ff18fde53..43eed30a7 100644 --- a/src/core/RemotePlugin.cpp +++ b/src/core/RemotePlugin.cpp @@ -138,7 +138,9 @@ RemotePlugin::RemotePlugin() : #endif m_failed( true ), m_watcher( this ), - m_commMutex( QMutex::Recursive ), +#if (QT_VERSION < QT_VERSION_CHECK(5,14,0)) + m_commMutex(QMutex::Recursive), +#endif m_splitChannels( false ), m_audioBufferSize( 0 ), m_inputCount( DEFAULT_CHANNELS ), diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 7f212b10a..c4f68cf28 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -372,8 +372,10 @@ FileBrowserTreeWidget::FileBrowserTreeWidget(QWidget * parent ) : QTreeWidget( parent ), m_mousePressed( false ), m_pressPos(), - m_previewPlayHandle( nullptr ), - m_pphMutex( QMutex::Recursive ) + m_previewPlayHandle( nullptr ) +#if (QT_VERSION < QT_VERSION_CHECK(5,14,0)) + ,m_pphMutex(QMutex::Recursive) +#endif { setColumnCount( 1 ); headerItem()->setHidden( true ); diff --git a/src/gui/MicrotunerConfig.cpp b/src/gui/MicrotunerConfig.cpp index dc0ef4a37..4522da5c5 100644 --- a/src/gui/MicrotunerConfig.cpp +++ b/src/gui/MicrotunerConfig.cpp @@ -317,7 +317,11 @@ bool MicrotunerConfig::validateScaleForm() if (name.contains('\n')) {fail(tr("Scale name cannot contain a new-line character")); return false;} // check intervals - QStringList input = m_scaleTextEdit->toPlainText().split('\n', QString::SkipEmptyParts); + #if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QStringList input = m_scaleTextEdit->toPlainText().split('\n', Qt::SkipEmptyParts); + #else + QStringList input = m_scaleTextEdit->toPlainText().split('\n', QString::SkipEmptyParts); + #endif for (auto &line: input) { if (line.isEmpty()) {continue;} @@ -361,7 +365,11 @@ bool MicrotunerConfig::validateKeymapForm() if (name.contains('\n')) {fail(tr("Keymap name cannot contain a new-line character")); return false;} // check key mappings - QStringList input = m_keymapTextEdit->toPlainText().split('\n', QString::SkipEmptyParts); + #if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QStringList input = m_keymapTextEdit->toPlainText().split('\n', Qt::SkipEmptyParts); + #else + QStringList input = m_keymapTextEdit->toPlainText().split('\n', QString::SkipEmptyParts); + #endif for (auto &line: input) { if (line.isEmpty()) {continue;} @@ -391,7 +399,11 @@ bool MicrotunerConfig::applyScale() std::vector newIntervals; newIntervals.push_back(Interval(1, 1)); - QStringList input = m_scaleTextEdit->toPlainText().split('\n', QString::SkipEmptyParts); +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QStringList input = m_keymapTextEdit->toPlainText().split('\n', Qt::SkipEmptyParts); +#else + QStringList input = m_keymapTextEdit->toPlainText().split('\n', QString::SkipEmptyParts); +#endif for (auto &line: input) { if (line.isEmpty()) {continue;} @@ -433,7 +445,11 @@ bool MicrotunerConfig::applyKeymap() std::vector newMap; +#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) + QStringList input = m_keymapTextEdit->toPlainText().split('\n', Qt::SkipEmptyParts); +#else QStringList input = m_keymapTextEdit->toPlainText().split('\n', QString::SkipEmptyParts); +#endif for (auto &line: input) { if (line.isEmpty()) {continue;} diff --git a/src/gui/clips/ClipView.cpp b/src/gui/clips/ClipView.cpp index 12603b2e7..a9afca910 100644 --- a/src/gui/clips/ClipView.cpp +++ b/src/gui/clips/ClipView.cpp @@ -755,7 +755,7 @@ void ClipView::mousePressEvent( QMouseEvent * me ) } } } - else if( me->button() == Qt::MidButton ) + else if( me->button() == Qt::MiddleButton ) { if( me->modifiers() & Qt::ControlModifier ) { diff --git a/src/gui/tracks/InstrumentTrackView.cpp b/src/gui/tracks/InstrumentTrackView.cpp index b7a2fda61..4c16287ed 100644 --- a/src/gui/tracks/InstrumentTrackView.cpp +++ b/src/gui/tracks/InstrumentTrackView.cpp @@ -145,7 +145,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV this, SLOT(toggleMidiCCRack())); m_activityIndicator = new FadeButton( QApplication::palette().color( QPalette::Active, - QPalette::Background), + QPalette::Window), QApplication::palette().color( QPalette::Active, QPalette::BrightText ), QApplication::palette().color( QPalette::Active, diff --git a/src/gui/tracks/TrackOperationsWidget.cpp b/src/gui/tracks/TrackOperationsWidget.cpp index c529b26e8..2670f891d 100644 --- a/src/gui/tracks/TrackOperationsWidget.cpp +++ b/src/gui/tracks/TrackOperationsWidget.cpp @@ -178,7 +178,7 @@ void TrackOperationsWidget::paintEvent( QPaintEvent * pe ) { QPainter p( this ); - p.fillRect( rect(), palette().brush(QPalette::Background) ); + p.fillRect(rect(), palette().brush(QPalette::Window)); if( m_trackView->getTrack()->useColor() && ! m_trackView->getTrack()->getMutedModel()->value() ) { From 773310384b12ff78d82ba483957ef1520215c805 Mon Sep 17 00:00:00 2001 From: Levin Oehlmann Date: Thu, 23 Jun 2022 21:27:23 +0200 Subject: [PATCH 09/17] clang-tidy: Apply modernize-redundant-void-arg everywhere (#6446) --- include/AudioJack.h | 2 +- include/AudioSndio.h | 12 ++++---- include/DrumSynth.h | 4 +-- include/ExportProjectDialog.h | 4 +-- include/FileBrowser.h | 18 ++++++------ include/Graph.h | 2 +- include/LmmsStyle.h | 2 +- include/MainWindow.h | 2 +- include/MidiSndio.h | 8 +++--- include/PeakController.h | 2 +- include/Plugin.h | 2 +- .../AudioFileProcessor/AudioFileProcessor.cpp | 20 ++++++------- plugins/BitInvader/BitInvader.cpp | 4 +-- plugins/BitInvader/BitInvader.h | 2 +- plugins/Eq/EqSpectrumView.cpp | 2 +- plugins/Lb302/Lb302.cpp | 28 +++++++++---------- plugins/Lv2Instrument/Lv2Instrument.cpp | 2 +- plugins/MidiImport/MidiImport.h | 2 +- plugins/Patman/Patman.cpp | 10 +++---- plugins/Patman/Patman.h | 14 +++++----- plugins/Sf2Player/PatchesDialog.cpp | 4 +-- plugins/Vestige/Vestige.cpp | 4 +-- plugins/Vestige/Vestige.h | 26 ++++++++--------- plugins/Vibed/Vibed.cpp | 2 +- plugins/VstBase/VstPlugin.cpp | 4 +-- plugins/VstBase/VstPlugin.h | 4 +-- plugins/VstEffect/VstEffectControls.cpp | 22 +++++++-------- plugins/VstEffect/VstEffectControls.h | 18 ++++++------ plugins/Xpressive/Xpressive.h | 6 ++-- src/core/DrumSynth.cpp | 4 +-- src/core/PeakController.cpp | 6 ++-- src/core/audio/AudioSndio.cpp | 10 +++---- src/core/midi/MidiSndio.cpp | 6 ++-- src/gui/ControllerRackView.cpp | 2 +- src/gui/FileBrowser.cpp | 12 ++++---- src/gui/LmmsStyle.cpp | 2 +- src/gui/instrument/InstrumentView.cpp | 2 +- src/gui/widgets/Graph.cpp | 8 +++--- 38 files changed, 142 insertions(+), 142 deletions(-) diff --git a/include/AudioJack.h b/include/AudioJack.h index 7b6597e86..aed0878ad 100644 --- a/include/AudioJack.h +++ b/include/AudioJack.h @@ -64,7 +64,7 @@ public: // the jack callback is handled here, we call the midi client so that it can read // it's midi data during the callback AudioJack * addMidiClient(MidiJack *midiClient); - void removeMidiClient(void) { m_midiClient = nullptr; } + void removeMidiClient() { m_midiClient = nullptr; } jack_client_t * jackClient() {return m_client;}; inline static QString name() diff --git a/include/AudioSndio.h b/include/AudioSndio.h index ebc443a68..993a44432 100644 --- a/include/AudioSndio.h +++ b/include/AudioSndio.h @@ -54,7 +54,7 @@ public: AudioSndio( bool & _success_ful, AudioEngine * _audioEngine ); ~AudioSndio() override; - inline static QString name( void ) + inline static QString name() { return QT_TRANSLATE_NOOP( "AudioDeviceSetupWidget", "sndio" ); } @@ -65,7 +65,7 @@ public: setupWidget( QWidget * _parent ); ~setupWidget() override; - void saveSettings( void ) override; + void saveSettings() override; private: QLineEdit * m_device; @@ -73,10 +73,10 @@ public: } ; private: - void startProcessing( void ) override; - void stopProcessing( void ) override; - void applyQualitySettings( void ) override; - void run( void ) override; + void startProcessing() override; + void stopProcessing() override; + void applyQualitySettings() override; + void run() override; struct sio_hdl *m_hdl; struct sio_par m_par; diff --git a/include/DrumSynth.h b/include/DrumSynth.h index 27941f67d..28121fc75 100644 --- a/include/DrumSynth.h +++ b/include/DrumSynth.h @@ -41,8 +41,8 @@ class DrumSynth { int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs); private: - float LoudestEnv(void); - int LongestEnv(void); + float LoudestEnv(); + int LongestEnv(); void UpdateEnv(int e, long t); void GetEnv(int env, const char *sec, const char *key, QString ini); diff --git a/include/ExportProjectDialog.h b/include/ExportProjectDialog.h index 5e4418a28..56d039afe 100644 --- a/include/ExportProjectDialog.h +++ b/include/ExportProjectDialog.h @@ -45,12 +45,12 @@ public: ExportProjectDialog( const QString & _file_name, QWidget * _parent, bool multi_export ); protected: - void reject( void ) override; + void reject() override; void closeEvent( QCloseEvent * _ce ) override; private slots: - void startBtnClicked( void ); + void startBtnClicked(); void updateTitleBar( int ); void accept() override; void startExport(); diff --git a/include/FileBrowser.h b/include/FileBrowser.h index d14533f45..43a0b3331 100644 --- a/include/FileBrowser.h +++ b/include/FileBrowser.h @@ -74,7 +74,7 @@ public: ~FileBrowser() override = default; private slots: - void reloadTree( void ); + void reloadTree(); void expandItems( QTreeWidgetItem * item=nullptr, QList expandedDirs = QList() ); // call with item=NULL to filter the entire tree bool filterItems( const QString & filter, QTreeWidgetItem * item=nullptr ); @@ -172,7 +172,7 @@ public: Directory( const QString & filename, const QString & path, const QString & filter ); - void update( void ); + void update(); inline QString fullName( QString path = QString() ) { @@ -195,7 +195,7 @@ public: private: - void initPixmaps( void ); + void initPixmaps(); bool addItems( const QString & path ); @@ -256,28 +256,28 @@ public: return QFileInfo(m_path, text(0)).absoluteFilePath(); } - inline FileTypes type( void ) const + inline FileTypes type() const { return( m_type ); } - inline FileHandling handling( void ) const + inline FileHandling handling() const { return( m_handling ); } - inline bool isTrack( void ) const + inline bool isTrack() const { return m_handling == LoadAsPreset || m_handling == LoadByPlugin; } - QString extension( void ); + QString extension(); static QString extension( const QString & file ); private: - void initPixmaps( void ); - void determineFileType( void ); + void initPixmaps(); + void determineFileType(); static QPixmap * s_projectFilePixmap; static QPixmap * s_presetFilePixmap; diff --git a/include/Graph.h b/include/Graph.h index 747fcf29a..178d1b567 100644 --- a/include/Graph.h +++ b/include/Graph.h @@ -197,7 +197,7 @@ public slots: void setWaveToSaw(); void setWaveToSquare(); void setWaveToNoise(); - QString setWaveToUser( ); + QString setWaveToUser(); void smooth(); void smoothNonCyclic(); diff --git a/include/LmmsStyle.h b/include/LmmsStyle.h index 72895a102..cfab2cd66 100644 --- a/include/LmmsStyle.h +++ b/include/LmmsStyle.h @@ -70,7 +70,7 @@ public: { } - QPalette standardPalette( void ) const override; + QPalette standardPalette() const override; void drawComplexControl( ComplexControl control, diff --git a/include/MainWindow.h b/include/MainWindow.h index 05aa716b5..e093d1082 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -242,7 +242,7 @@ private: private slots: void browseHelp(); void showTool( QAction * _idx ); - void updateViewMenu( void ); + void updateViewMenu(); void updateConfig( QAction * _who ); void onToggleMetronome(); void onExportProject(); diff --git a/include/MidiSndio.h b/include/MidiSndio.h index 1ffbae5ce..35788131d 100644 --- a/include/MidiSndio.h +++ b/include/MidiSndio.h @@ -45,12 +45,12 @@ class MidiSndio : public QThread, public MidiClientRaw { Q_OBJECT public: - MidiSndio( void ); + MidiSndio(); ~MidiSndio() override; - static QString probeDevice(void); + static QString probeDevice(); - inline static QString name(void) + inline static QString name() { return QT_TRANSLATE_NOOP("MidiSetupWidget", "sndio MIDI"); } @@ -63,7 +63,7 @@ public: protected: void sendByte(const unsigned char c) override; - void run(void) override; + void run() override; private: mio_hdl *m_hdl; diff --git a/include/PeakController.h b/include/PeakController.h index 01a8e968c..2999c5a2b 100644 --- a/include/PeakController.h +++ b/include/PeakController.h @@ -61,7 +61,7 @@ public: public slots: gui::ControllerDialog * createDialog( QWidget * _parent ) override; - void handleDestroyedEffect( ); + void handleDestroyedEffect(); void updateCoeffs(); protected: diff --git a/include/Plugin.h b/include/Plugin.h index 7042edb41..da2deeaed 100644 --- a/include/Plugin.h +++ b/include/Plugin.h @@ -253,7 +253,7 @@ public: const PixmapLoader *logo() const; //! Return plugin type - inline PluginTypes type( void ) const + inline PluginTypes type() const { return m_descriptor->type; } diff --git a/plugins/AudioFileProcessor/AudioFileProcessor.cpp b/plugins/AudioFileProcessor/AudioFileProcessor.cpp index 4ff93132b..3d4319dd3 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessor.cpp +++ b/plugins/AudioFileProcessor/AudioFileProcessor.cpp @@ -289,7 +289,7 @@ void AudioFileProcessor::loadFile( const QString & _file ) -QString AudioFileProcessor::nodeName( void ) const +QString AudioFileProcessor::nodeName() const { return audiofileprocessor_plugin_descriptor.name; } @@ -339,7 +339,7 @@ void AudioFileProcessor::setAudioFile( const QString & _audio_file, -void AudioFileProcessor::reverseModelChanged( void ) +void AudioFileProcessor::reverseModelChanged() { m_sampleBuffer.setReversed( m_reverseModel.value() ); m_nextPlayStartPoint = m_sampleBuffer.startFrame(); @@ -349,7 +349,7 @@ void AudioFileProcessor::reverseModelChanged( void ) -void AudioFileProcessor::ampModelChanged( void ) +void AudioFileProcessor::ampModelChanged() { m_sampleBuffer.setAmplification( m_ampModel.value() / 100.0f ); } @@ -362,7 +362,7 @@ void AudioFileProcessor::stutterModelChanged() } -void AudioFileProcessor::startPointChanged( void ) +void AudioFileProcessor::startPointChanged() { // check if start is over end and swap values if so if( m_startPointModel.value() > m_endPointModel.value() ) @@ -394,14 +394,14 @@ void AudioFileProcessor::startPointChanged( void ) } -void AudioFileProcessor::endPointChanged( void ) +void AudioFileProcessor::endPointChanged() { // same as start, for now startPointChanged(); } -void AudioFileProcessor::loopPointChanged( void ) +void AudioFileProcessor::loopPointChanged() { // check that loop point is between start-end points and not overlapping with endpoint @@ -424,7 +424,7 @@ void AudioFileProcessor::loopPointChanged( void ) pointChanged(); } -void AudioFileProcessor::pointChanged( void ) +void AudioFileProcessor::pointChanged() { const f_cnt_t f_start = static_cast( m_startPointModel.value() * ( m_sampleBuffer.frames()-1 ) ); const f_cnt_t f_end = static_cast( m_endPointModel.value() * ( m_sampleBuffer.frames()-1 ) ); @@ -677,7 +677,7 @@ void AudioFileProcessorView::paintEvent( QPaintEvent * ) -void AudioFileProcessorView::sampleUpdated( void ) +void AudioFileProcessorView::sampleUpdated() { m_waveView->updateSampleRange(); m_waveView->update(); @@ -688,7 +688,7 @@ void AudioFileProcessorView::sampleUpdated( void ) -void AudioFileProcessorView::openAudioFile( void ) +void AudioFileProcessorView::openAudioFile() { QString af = castModel()->m_sampleBuffer. openAudioFile(); @@ -703,7 +703,7 @@ void AudioFileProcessorView::openAudioFile( void ) -void AudioFileProcessorView::modelChanged( void ) +void AudioFileProcessorView::modelChanged() { AudioFileProcessor * a = castModel(); connect( &a->m_sampleBuffer, SIGNAL( sampleUpdated() ), diff --git a/plugins/BitInvader/BitInvader.cpp b/plugins/BitInvader/BitInvader.cpp index 0168031fc..0bf063461 100644 --- a/plugins/BitInvader/BitInvader.cpp +++ b/plugins/BitInvader/BitInvader.cpp @@ -161,8 +161,8 @@ BitInvader::BitInvader( InstrumentTrack * _instrument_track ) : m_graph.setWaveToSine(); lengthChanged(); - connect( &m_sampleLength, SIGNAL( dataChanged( ) ), - this, SLOT( lengthChanged( ) ), Qt::DirectConnection ); + connect( &m_sampleLength, SIGNAL( dataChanged() ), + this, SLOT( lengthChanged() ), Qt::DirectConnection ); connect( &m_graph, SIGNAL( samplesChanged( int, int ) ), this, SLOT( samplesChanged( int, int ) ) ); diff --git a/plugins/BitInvader/BitInvader.h b/plugins/BitInvader/BitInvader.h index 90a5dffa8..debdd37ea 100644 --- a/plugins/BitInvader/BitInvader.h +++ b/plugins/BitInvader/BitInvader.h @@ -139,7 +139,7 @@ protected slots: void noiseWaveClicked(); void usrWaveClicked(); - void smoothClicked( void ); + void smoothClicked( ); private: void modelChanged() override; diff --git a/plugins/Eq/EqSpectrumView.cpp b/plugins/Eq/EqSpectrumView.cpp index 24e812049..aa556490b 100644 --- a/plugins/Eq/EqSpectrumView.cpp +++ b/plugins/Eq/EqSpectrumView.cpp @@ -193,7 +193,7 @@ EqSpectrumView::EqSpectrumView(EqAnalyser *b, QWidget *_parent) : setAttribute( Qt::WA_TranslucentBackground, true ); m_skipBands = MAX_BANDS * 0.5; float totalLength = log10( 20000 ); - m_pixelsPerUnitWidth = width( ) / totalLength ; + m_pixelsPerUnitWidth = width() / totalLength ; m_scale = 1.5; m_color = QColor( 255, 255, 255, 255 ); for ( int i = 0 ; i < MAX_BANDS ; i++ ) diff --git a/plugins/Lb302/Lb302.cpp b/plugins/Lb302/Lb302.cpp index c60028520..8ebfe2d47 100644 --- a/plugins/Lb302/Lb302.cpp +++ b/plugins/Lb302/Lb302.cpp @@ -293,26 +293,26 @@ Lb302Synth::Lb302Synth( InstrumentTrack * _instrumentTrack ) : vca_mode(never_played) { - connect( Engine::audioEngine(), SIGNAL( sampleRateChanged( ) ), - this, SLOT ( filterChanged( ) ) ); + connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), + this, SLOT ( filterChanged() ) ); - connect( &vcf_cut_knob, SIGNAL( dataChanged( ) ), - this, SLOT ( filterChanged( ) ) ); + connect( &vcf_cut_knob, SIGNAL( dataChanged() ), + this, SLOT ( filterChanged() ) ); - connect( &vcf_res_knob, SIGNAL( dataChanged( ) ), - this, SLOT ( filterChanged( ) ) ); + connect( &vcf_res_knob, SIGNAL( dataChanged() ), + this, SLOT ( filterChanged() ) ); - connect( &vcf_mod_knob, SIGNAL( dataChanged( ) ), - this, SLOT ( filterChanged( ) ) ); + connect( &vcf_mod_knob, SIGNAL( dataChanged() ), + this, SLOT ( filterChanged() ) ); - connect( &vcf_dec_knob, SIGNAL( dataChanged( ) ), - this, SLOT ( filterChanged( ) ) ); + connect( &vcf_dec_knob, SIGNAL( dataChanged() ), + this, SLOT ( filterChanged() ) ); - connect( &db24Toggle, SIGNAL( dataChanged( ) ), - this, SLOT ( db24Toggled( ) ) ); + connect( &db24Toggle, SIGNAL( dataChanged() ), + this, SLOT ( db24Toggled() ) ); - connect( &dist_knob, SIGNAL( dataChanged( ) ), - this, SLOT ( filterChanged( ))); + connect( &dist_knob, SIGNAL( dataChanged() ), + this, SLOT ( filterChanged())); // SYNTH diff --git a/plugins/Lv2Instrument/Lv2Instrument.cpp b/plugins/Lv2Instrument/Lv2Instrument.cpp index 01ccce15d..0057d65a7 100644 --- a/plugins/Lv2Instrument/Lv2Instrument.cpp +++ b/plugins/Lv2Instrument/Lv2Instrument.cpp @@ -251,7 +251,7 @@ void Lv2InsView::dragEnterEvent(QDragEnterEvent *_dee) // For mimeType() and MimeType enum class using namespace Clipboard; - void (QDragEnterEvent::*reaction)(void) = &QDragEnterEvent::ignore; + void (QDragEnterEvent::*reaction)() = &QDragEnterEvent::ignore; if (_dee->mimeData()->hasFormat( mimeType( MimeType::StringPair ))) { diff --git a/plugins/MidiImport/MidiImport.h b/plugins/MidiImport/MidiImport.h index bb2893116..0d7c0e99e 100644 --- a/plugins/MidiImport/MidiImport.h +++ b/plugins/MidiImport/MidiImport.h @@ -56,7 +56,7 @@ private: bool readRIFF( TrackContainer* tc ); bool readTrack( int _track_end, QString & _track_name ); - void error( void ); + void error(); inline int readInt( int _bytes ) diff --git a/plugins/Patman/Patman.cpp b/plugins/Patman/Patman.cpp index c6fb202c9..32e8372eb 100644 --- a/plugins/Patman/Patman.cpp +++ b/plugins/Patman/Patman.cpp @@ -125,7 +125,7 @@ void PatmanInstrument::loadFile( const QString & _file ) -QString PatmanInstrument::nodeName( void ) const +QString PatmanInstrument::nodeName() const { return( patman_plugin_descriptor.name ); } @@ -380,7 +380,7 @@ PatmanInstrument::LoadErrors PatmanInstrument::loadPatch( -void PatmanInstrument::unloadCurrentPatch( void ) +void PatmanInstrument::unloadCurrentPatch() { while( !m_patchSamples.empty() ) { @@ -502,7 +502,7 @@ PatmanView::~PatmanView() -void PatmanView::openFile( void ) +void PatmanView::openFile() { FileDialog ofd( nullptr, tr( "Open patch file" ) ); ofd.setFileMode( FileDialog::ExistingFiles ); @@ -554,7 +554,7 @@ void PatmanView::openFile( void ) -void PatmanView::updateFilename( void ) +void PatmanView::updateFilename() { m_displayFilename = ""; int idx = m_pi->m_patchFile.length(); @@ -638,7 +638,7 @@ void PatmanView::paintEvent( QPaintEvent * ) -void PatmanView::modelChanged( void ) +void PatmanView::modelChanged() { m_pi = castModel(); m_loopButton->setModel( &m_pi->m_loopedModel ); diff --git a/plugins/Patman/Patman.h b/plugins/Patman/Patman.h index eee122129..60276f5aa 100644 --- a/plugins/Patman/Patman.h +++ b/plugins/Patman/Patman.h @@ -69,9 +69,9 @@ public: void loadFile( const QString & _file ) override; - QString nodeName( void ) const override; + QString nodeName() const override; - f_cnt_t desiredReleaseFrames( void ) const override + f_cnt_t desiredReleaseFrames() const override { return( 128 ); } @@ -109,7 +109,7 @@ private: } ; LoadErrors loadPatch( const QString & _filename ); - void unloadCurrentPatch( void ); + void unloadCurrentPatch(); void selectSample( NotePlayHandle * _n ); @@ -117,7 +117,7 @@ private: friend class gui::PatmanView; signals: - void fileChanged( void ); + void fileChanged(); } ; @@ -135,8 +135,8 @@ public: public slots: - void openFile( void ); - void updateFilename( void ); + void openFile(); + void updateFilename(); protected: @@ -146,7 +146,7 @@ protected: private: - void modelChanged( void ) override; + void modelChanged() override; PatmanInstrument * m_pi; QString m_displayFilename; diff --git a/plugins/Sf2Player/PatchesDialog.cpp b/plugins/Sf2Player/PatchesDialog.cpp index e3e882e69..082a15c04 100644 --- a/plugins/Sf2Player/PatchesDialog.cpp +++ b/plugins/Sf2Player/PatchesDialog.cpp @@ -264,7 +264,7 @@ void PatchesDialog::accept() // Reject settings (Cancel button slot). -void PatchesDialog::reject (void) +void PatchesDialog::reject () { // Reset selection to initial selection, if applicable... if (m_dirty > 0) @@ -306,7 +306,7 @@ QTreeWidgetItem *PatchesDialog::findProgItem ( int iProg ) // Bank change slot. -void PatchesDialog::bankChanged (void) +void PatchesDialog::bankChanged () { if (m_pSynth == nullptr) return; diff --git a/plugins/Vestige/Vestige.cpp b/plugins/Vestige/Vestige.cpp index f5ac06e6d..30bef7141 100644 --- a/plugins/Vestige/Vestige.cpp +++ b/plugins/Vestige/Vestige.cpp @@ -741,7 +741,7 @@ void VestigeInstrumentView::openPreset() { if ( m_vi->m_plugin != nullptr ) { - m_vi->m_plugin->openPreset( ); + m_vi->m_plugin->openPreset(); bool converted; QString str = m_vi->m_plugin->currentProgramName().section("/", 0, 0); if (str != "") @@ -759,7 +759,7 @@ void VestigeInstrumentView::savePreset() if ( m_vi->m_plugin != nullptr ) { - m_vi->m_plugin->savePreset( ); + m_vi->m_plugin->savePreset(); /* bool converted; QString str = m_vi->m_plugin->presetString().section("/", 0, 0); if (str != "") diff --git a/plugins/Vestige/Vestige.h b/plugins/Vestige/Vestige.h index 5b7b1461d..706e77b00 100644 --- a/plugins/Vestige/Vestige.h +++ b/plugins/Vestige/Vestige.h @@ -66,7 +66,7 @@ public: virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent ); virtual void loadSettings( const QDomElement & _this ); - virtual QString nodeName( void ) const; + virtual QString nodeName() const; virtual void loadFile( const QString & _file ); @@ -85,7 +85,7 @@ protected slots: void reloadPlugin(); private: - void closePlugin( void ); + void closePlugin(); VstPlugin * m_plugin; @@ -117,8 +117,8 @@ public: protected slots: - void syncPlugin( void ); - void displayAutomatedOnly( void ); + void syncPlugin(); + void displayAutomatedOnly(); void setParameter( lmms::Model * action ); void syncParameterText(); void closeWindow(); @@ -154,16 +154,16 @@ public: protected slots: - void updateMenu( void ); - void openPlugin( void ); - void managePlugin( void ); - void openPreset( void ); - void savePreset( void ); + void updateMenu(); + void openPlugin(); + void managePlugin(); + void openPreset(); + void savePreset(); void nextProgram(); void previousProgram(); - void selPreset( void ); - void toggleGUI( void ); - void noteOffAll( void ); + void selPreset(); + void toggleGUI(); + void noteOffAll(); protected: @@ -173,7 +173,7 @@ protected: private: - virtual void modelChanged( void ); + virtual void modelChanged(); static QPixmap * s_artwork; diff --git a/plugins/Vibed/Vibed.cpp b/plugins/Vibed/Vibed.cpp index b9bcd9f1b..7d0c34e55 100644 --- a/plugins/Vibed/Vibed.cpp +++ b/plugins/Vibed/Vibed.cpp @@ -492,7 +492,7 @@ VibedView::VibedView( Instrument * _instrument, m_triangleWaveBtn->setToolTip( tr( "Triangle wave" ) ); connect( m_triangleWaveBtn, SIGNAL ( clicked () ), - this, SLOT ( triangleWaveClicked( ) ) ); + this, SLOT ( triangleWaveClicked() ) ); m_sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) ); diff --git a/plugins/VstBase/VstPlugin.cpp b/plugins/VstBase/VstPlugin.cpp index a31cc832c..bba644305 100644 --- a/plugins/VstBase/VstPlugin.cpp +++ b/plugins/VstBase/VstPlugin.cpp @@ -505,7 +505,7 @@ QWidget *VstPlugin::editor() } -void VstPlugin::openPreset( ) +void VstPlugin::openPreset() { gui::FileDialog ofd( nullptr, tr( "Open Preset" ), "", @@ -583,7 +583,7 @@ void VstPlugin::loadParameterDisplays() -void VstPlugin::savePreset( ) +void VstPlugin::savePreset() { QString presName = currentProgramName().isEmpty() ? tr(": default") : currentProgramName(); presName.replace("\"", "'"); // QFileDialog unable to handle double quotes properly diff --git a/plugins/VstBase/VstPlugin.h b/plugins/VstBase/VstPlugin.h index c0f8e79e5..03e732970 100644 --- a/plugins/VstBase/VstPlugin.h +++ b/plugins/VstBase/VstPlugin.h @@ -126,13 +126,13 @@ public: public slots: void setTempo( lmms::bpm_t _bpm ); void updateSampleRate(); - void openPreset( void ); + void openPreset(); void setProgram( int index ); void rotateProgram( int offset ); void loadProgramNames(); void loadParameterLabels(); void loadParameterDisplays(); - void savePreset( void ); + void savePreset(); void setParam( int i, float f ); void idleUpdate(); diff --git a/plugins/VstEffect/VstEffectControls.cpp b/plugins/VstEffect/VstEffectControls.cpp index 9def52727..10294b4c2 100644 --- a/plugins/VstEffect/VstEffectControls.cpp +++ b/plugins/VstEffect/VstEffectControls.cpp @@ -167,7 +167,7 @@ gui::EffectControlDialog* VstEffectControls::createView() -void VstEffectControls::managePlugin( void ) +void VstEffectControls::managePlugin() { if ( m_effect->m_plugin != nullptr && m_subWindow == nullptr ) { gui::ManageVSTEffectView * tt = new gui::ManageVSTEffectView( m_effect, this); @@ -187,11 +187,11 @@ void VstEffectControls::managePlugin( void ) -void VstEffectControls::savePreset( void ) +void VstEffectControls::savePreset() { if ( m_effect->m_plugin != nullptr ) { - m_effect->m_plugin->savePreset( ); + m_effect->m_plugin->savePreset(); /* bool converted; QString str = m_vi->m_plugin->currentProgramName().section("/", 0, 0); if (str != "") @@ -204,7 +204,7 @@ void VstEffectControls::savePreset( void ) -void VstEffectControls::updateMenu( void ) +void VstEffectControls::updateMenu() { // get all presets - @@ -239,11 +239,11 @@ void VstEffectControls::updateMenu( void ) -void VstEffectControls::openPreset( void ) +void VstEffectControls::openPreset() { if ( m_effect->m_plugin != nullptr ) { - m_effect->m_plugin->openPreset( ); + m_effect->m_plugin->openPreset(); bool converted; QString str = m_effect->m_plugin->currentProgramName().section("/", 0, 0); if (str != "") @@ -256,7 +256,7 @@ void VstEffectControls::openPreset( void ) -void VstEffectControls::rollPreset( void ) +void VstEffectControls::rollPreset() { if ( m_effect->m_plugin != nullptr ) { @@ -272,7 +272,7 @@ void VstEffectControls::rollPreset( void ) -void VstEffectControls::rolrPreset( void ) +void VstEffectControls::rolrPreset() { if ( m_effect->m_plugin != nullptr ) { @@ -288,7 +288,7 @@ void VstEffectControls::rolrPreset( void ) -void VstEffectControls::selPreset( void ) +void VstEffectControls::selPreset() { QAction *action = qobject_cast(sender()); @@ -438,7 +438,7 @@ void ManageVSTEffectView::closeWindow() -void ManageVSTEffectView::syncPlugin( void ) +void ManageVSTEffectView::syncPlugin() { char paramStr[35]; QStringList s_dumpValues; @@ -464,7 +464,7 @@ void ManageVSTEffectView::syncPlugin( void ) -void ManageVSTEffectView::displayAutomatedOnly( void ) +void ManageVSTEffectView::displayAutomatedOnly() { bool isAuto = QString::compare( m_displayAutomatedOnly->text(), tr( "Automated" ) ) == 0; diff --git a/plugins/VstEffect/VstEffectControls.h b/plugins/VstEffect/VstEffectControls.h index 6e142b38c..42178b5b6 100644 --- a/plugins/VstEffect/VstEffectControls.h +++ b/plugins/VstEffect/VstEffectControls.h @@ -70,13 +70,13 @@ public: protected slots: - void updateMenu( void ); - void managePlugin( void ); - void openPreset( void ); - void savePreset( void ); - void rollPreset( void ); - void rolrPreset( void ); - void selPreset( void ); + void updateMenu(); + void managePlugin(); + void openPreset(); + void savePreset(); + void rollPreset(); + void rolrPreset(); + void selPreset(); void setParameter( lmms::Model * action ); protected: @@ -117,8 +117,8 @@ public: protected slots: - void syncPlugin( void ); - void displayAutomatedOnly( void ); + void syncPlugin(); + void displayAutomatedOnly(); void setParameter( lmms::Model * action ); void syncParameterText(); void closeWindow(); diff --git a/plugins/Xpressive/Xpressive.h b/plugins/Xpressive/Xpressive.h index d075e9088..b91957ac4 100644 --- a/plugins/Xpressive/Xpressive.h +++ b/plugins/Xpressive/Xpressive.h @@ -171,9 +171,9 @@ protected slots: void expWaveClicked(); void usrWaveClicked(); void helpClicked(); - void expressionChanged( ); - void smoothChanged( ); - void graphDrawn( ); + void expressionChanged(); + void smoothChanged(); + void graphDrawn(); private: void modelChanged() override; diff --git a/src/core/DrumSynth.cpp b/src/core/DrumSynth.cpp index 2b7ad9d1b..79630e42d 100644 --- a/src/core/DrumSynth.cpp +++ b/src/core/DrumSynth.cpp @@ -67,7 +67,7 @@ long wavewords, wavemode=0; float mem_t=1.0f, mem_o=1.0f, mem_n=1.0f, mem_b=1.0f, mem_tune=1.0f, mem_time=1.0f; -int DrumSynth::LongestEnv(void) +int DrumSynth::LongestEnv() { long e, eon, p; float l=0.f; @@ -86,7 +86,7 @@ int DrumSynth::LongestEnv(void) } -float DrumSynth::LoudestEnv(void) +float DrumSynth::LoudestEnv() { float loudest=0.f; int i=0; diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index b29295604..129aa83b7 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -53,8 +53,8 @@ PeakController::PeakController( Model * _parent, setSampleExact( true ); if( m_peakEffect ) { - connect( m_peakEffect, SIGNAL( destroyed( ) ), - this, SLOT( handleDestroyedEffect( ) ) ); + connect( m_peakEffect, SIGNAL( destroyed() ), + this, SLOT( handleDestroyedEffect() ) ); } connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( updateCoeffs() ) ); connect( m_peakEffect->attackModel(), SIGNAL( dataChanged() ), @@ -127,7 +127,7 @@ void PeakController::updateCoeffs() } -void PeakController::handleDestroyedEffect( ) +void PeakController::handleDestroyedEffect() { // possible race condition... //printf("disconnecting effect\n"); diff --git a/src/core/audio/AudioSndio.cpp b/src/core/audio/AudioSndio.cpp index 52ff1666e..f6c94f32a 100644 --- a/src/core/audio/AudioSndio.cpp +++ b/src/core/audio/AudioSndio.cpp @@ -126,7 +126,7 @@ AudioSndio::~AudioSndio() } -void AudioSndio::startProcessing( void ) +void AudioSndio::startProcessing() { if( !isRunning() ) { @@ -135,13 +135,13 @@ void AudioSndio::startProcessing( void ) } -void AudioSndio::stopProcessing( void ) +void AudioSndio::stopProcessing() { stopProcessingThread( this ); } -void AudioSndio::applyQualitySettings( void ) +void AudioSndio::applyQualitySettings() { if( hqAudio() ) { @@ -154,7 +154,7 @@ void AudioSndio::applyQualitySettings( void ) } -void AudioSndio::run( void ) +void AudioSndio::run() { surroundSampleFrame * temp = new surroundSampleFrame[audioEngine()->framesPerPeriod()]; int_sample_t * outbuf = new int_sample_t[audioEngine()->framesPerPeriod() * channels()]; @@ -210,7 +210,7 @@ AudioSndio::setupWidget::~setupWidget() } -void AudioSndio::setupWidget::saveSettings( void ) +void AudioSndio::setupWidget::saveSettings() { ConfigManager::inst()->setValue( "audiosndio", "device", m_device->text() ); diff --git a/src/core/midi/MidiSndio.cpp b/src/core/midi/MidiSndio.cpp index d09803e86..e7f2362f6 100644 --- a/src/core/midi/MidiSndio.cpp +++ b/src/core/midi/MidiSndio.cpp @@ -38,7 +38,7 @@ namespace lmms { -MidiSndio::MidiSndio( void ) : +MidiSndio::MidiSndio() : MidiClientRaw(), m_quit( false ) { @@ -74,7 +74,7 @@ MidiSndio::~MidiSndio() } -QString MidiSndio::probeDevice( void ) +QString MidiSndio::probeDevice() { QString dev = ConfigManager::inst()->value( "MidiSndio", "device" ); @@ -88,7 +88,7 @@ void MidiSndio::sendByte( const unsigned char c ) } -void MidiSndio::run( void ) +void MidiSndio::run() { struct pollfd pfd; nfds_t nfds; diff --git a/src/gui/ControllerRackView.cpp b/src/gui/ControllerRackView.cpp index 9549b6e0d..f5420111d 100644 --- a/src/gui/ControllerRackView.cpp +++ b/src/gui/ControllerRackView.cpp @@ -42,7 +42,7 @@ namespace lmms::gui { -ControllerRackView::ControllerRackView( ) : +ControllerRackView::ControllerRackView() : QWidget(), m_nextIndex(0) { diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index c4f68cf28..732d6aa48 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -201,7 +201,7 @@ bool FileBrowser::filterItems( const QString & filter, QTreeWidgetItem * item ) } -void FileBrowser::reloadTree( void ) +void FileBrowser::reloadTree() { QList expandedDirs = m_fileBrowserTreeWidget->expandedDirs(); const QString text = m_filterEdit->text(); @@ -959,7 +959,7 @@ Directory::Directory(const QString & filename, const QString & path, -void Directory::initPixmaps( void ) +void Directory::initPixmaps() { if( s_folderPixmap == nullptr ) { @@ -983,7 +983,7 @@ void Directory::initPixmaps( void ) -void Directory::update( void ) +void Directory::update() { if( !isExpanded() ) { @@ -1146,7 +1146,7 @@ FileItem::FileItem(const QString & name, const QString & path ) : -void FileItem::initPixmaps( void ) +void FileItem::initPixmaps() { if( s_projectFilePixmap == nullptr ) { @@ -1221,7 +1221,7 @@ void FileItem::initPixmaps( void ) -void FileItem::determineFileType( void ) +void FileItem::determineFileType() { m_handling = NotSupported; @@ -1289,7 +1289,7 @@ void FileItem::determineFileType( void ) -QString FileItem::extension( void ) +QString FileItem::extension() { return extension( fullName() ); } diff --git a/src/gui/LmmsStyle.cpp b/src/gui/LmmsStyle.cpp index ee62e613d..6c4dd7fae 100644 --- a/src/gui/LmmsStyle.cpp +++ b/src/gui/LmmsStyle.cpp @@ -143,7 +143,7 @@ LmmsStyle::LmmsStyle() : -QPalette LmmsStyle::standardPalette( void ) const +QPalette LmmsStyle::standardPalette() const { if( s_palette != nullptr) { return * s_palette; } diff --git a/src/gui/instrument/InstrumentView.cpp b/src/gui/instrument/InstrumentView.cpp index 06f37feda..2ca3d9329 100644 --- a/src/gui/instrument/InstrumentView.cpp +++ b/src/gui/instrument/InstrumentView.cpp @@ -66,7 +66,7 @@ void InstrumentView::setModel( Model * _model, bool ) -InstrumentTrackWindow * InstrumentView::instrumentTrackWindow( void ) +InstrumentTrackWindow * InstrumentView::instrumentTrackWindow() { return( dynamic_cast( parentWidget()->parentWidget() ) ); diff --git a/src/gui/widgets/Graph.cpp b/src/gui/widgets/Graph.cpp index ed0355a4c..f5639ff70 100644 --- a/src/gui/widgets/Graph.cpp +++ b/src/gui/widgets/Graph.cpp @@ -55,8 +55,8 @@ Graph::Graph( QWidget * _parent, graphStyle _style, int _width, QObject::connect( gModel, SIGNAL( samplesChanged( int, int ) ), this, SLOT( updateGraph( int, int ) ) ); - QObject::connect( gModel, SIGNAL( lengthChanged( ) ), - this, SLOT( updateGraph( ) ) ); + QObject::connect( gModel, SIGNAL( lengthChanged() ), + this, SLOT( updateGraph() ) ); } void Graph::setForeground( const QPixmap &_pixmap ) @@ -438,8 +438,8 @@ void Graph::modelChanged() QObject::connect( gModel, SIGNAL( samplesChanged( int, int ) ), this, SLOT( updateGraph( int, int ) ) ); - QObject::connect( gModel, SIGNAL( lengthChanged( ) ), - this, SLOT( updateGraph( ) ) ); + QObject::connect( gModel, SIGNAL( lengthChanged() ), + this, SLOT( updateGraph() ) ); } From c2592204727410f7082de5a82994433911a29c48 Mon Sep 17 00:00:00 2001 From: Johannes Lorenz <1042576+JohannesLorenz@users.noreply.github.com> Date: Thu, 23 Jun 2022 22:17:44 +0200 Subject: [PATCH 10/17] Fix clazy warning: "Signature is not normalized." (#6445) This only removes whitespace to fix a clazy warning [-Wclazy-connect-not-normalized]. --- src/core/AutomatableModel.cpp | 10 +- src/core/AutomationClip.cpp | 4 +- src/core/ControllerConnection.cpp | 8 +- src/core/EnvelopeAndLfoParameters.cpp | 56 +++++------ src/core/LadspaControl.cpp | 20 ++-- src/core/LfoController.cpp | 24 ++--- src/core/MeterModel.cpp | 8 +- src/core/PeakController.cpp | 14 +-- src/core/RemotePlugin.cpp | 12 +-- src/core/RenderManager.cpp | 12 +-- src/core/RingBuffer.cpp | 4 +- src/core/SampleClip.cpp | 26 ++--- src/core/Song.cpp | 24 ++--- src/core/TempoSyncKnobModel.cpp | 8 +- src/core/VstSyncController.cpp | 2 +- src/core/audio/AudioJack.cpp | 4 +- src/core/audio/AudioPortAudio.cpp | 16 +-- src/core/audio/AudioSoundIo.cpp | 4 +- src/core/main.cpp | 6 +- src/core/midi/MidiAlsaSeq.cpp | 8 +- src/core/midi/MidiController.cpp | 4 +- src/core/midi/MidiPort.cpp | 16 +-- src/gui/AutomatableModelView.cpp | 20 ++-- src/gui/ControllerRackView.cpp | 12 +-- src/gui/ControllerView.cpp | 10 +- src/gui/EffectRackView.cpp | 16 +-- src/gui/EffectView.cpp | 14 +-- src/gui/FileBrowser.cpp | 20 ++-- src/gui/LfoControllerDialog.cpp | 10 +- src/gui/MainWindow.cpp | 98 +++++++++---------- src/gui/MixerLine.cpp | 14 +-- src/gui/MixerView.cpp | 8 +- src/gui/ModelView.cpp | 4 +- src/gui/PluginBrowser.cpp | 4 +- src/gui/ProjectNotes.cpp | 50 +++++----- src/gui/SampleTrackWindow.cpp | 4 +- src/gui/SideBar.cpp | 4 +- src/gui/SubWindow.cpp | 8 +- src/gui/clips/AutomationClipView.cpp | 24 ++--- src/gui/clips/ClipView.cpp | 12 +-- src/gui/clips/MidiClipView.cpp | 24 ++--- src/gui/clips/PatternClipView.cpp | 12 +-- src/gui/clips/SampleClipView.cpp | 2 +- src/gui/editors/AutomationEditor.cpp | 42 ++++---- src/gui/editors/PianoRoll.cpp | 88 ++++++++--------- src/gui/editors/SongEditor.cpp | 84 ++++++++-------- src/gui/editors/TimeLineWidget.cpp | 28 +++--- src/gui/editors/TrackContainerView.cpp | 12 +-- src/gui/instrument/EnvelopeAndLfoView.cpp | 4 +- src/gui/instrument/InstrumentMidiIOView.cpp | 24 ++--- src/gui/instrument/InstrumentTrackWindow.cpp | 26 ++--- src/gui/instrument/InstrumentView.cpp | 2 +- src/gui/instrument/PianoView.cpp | 4 +- src/gui/menus/MidiPortMenu.cpp | 12 +-- src/gui/menus/RecentProjectsMenu.cpp | 8 +- src/gui/menus/TemplatesMenu.cpp | 6 +- src/gui/modals/ControllerConnectionDialog.cpp | 34 +++---- src/gui/modals/EffectSelectDialog.cpp | 24 ++--- src/gui/modals/ExportProjectDialog.cpp | 20 ++-- src/gui/modals/RenameDialog.cpp | 8 +- src/gui/modals/SetupDialog.cpp | 26 ++--- src/gui/modals/VersionedSaveDialog.cpp | 4 +- src/gui/tracks/InstrumentTrackView.cpp | 42 ++++---- src/gui/tracks/PatternTrackView.cpp | 4 +- src/gui/tracks/SampleTrackView.cpp | 2 +- src/gui/tracks/TrackContentWidget.cpp | 4 +- src/gui/tracks/TrackLabelButton.cpp | 6 +- src/gui/tracks/TrackOperationsWidget.cpp | 20 ++-- src/gui/tracks/TrackView.cpp | 16 +-- src/gui/widgets/AutomatableButton.cpp | 4 +- src/gui/widgets/AutomatableSlider.cpp | 12 +-- src/gui/widgets/CPULoadWidget.cpp | 4 +- src/gui/widgets/ComboBox.cpp | 4 +- src/gui/widgets/Graph.cpp | 16 +-- src/gui/widgets/Knob.cpp | 10 +- src/gui/widgets/Oscilloscope.cpp | 12 +-- src/gui/widgets/TabBar.cpp | 2 +- src/gui/widgets/TempoSyncKnob.cpp | 14 +-- src/gui/widgets/TextFloat.cpp | 4 +- src/gui/widgets/TimeDisplayWidget.cpp | 4 +- src/gui/widgets/ToolButton.cpp | 2 +- src/tracks/MidiClip.cpp | 4 +- src/tracks/PatternTrack.cpp | 2 +- 83 files changed, 652 insertions(+), 652 deletions(-) diff --git a/src/core/AutomatableModel.cpp b/src/core/AutomatableModel.cpp index 5463fa482..dc463075c 100644 --- a/src/core/AutomatableModel.cpp +++ b/src/core/AutomatableModel.cpp @@ -480,8 +480,8 @@ void AutomatableModel::linkModel( AutomatableModel* model ) if( !model->hasLinkedModels() ) { - QObject::connect( this, SIGNAL( dataChanged() ), - model, SIGNAL( dataChanged() ), Qt::DirectConnection ); + QObject::connect( this, SIGNAL(dataChanged()), + model, SIGNAL(dataChanged()), Qt::DirectConnection ); } } } @@ -552,9 +552,9 @@ void AutomatableModel::setControllerConnection( ControllerConnection* c ) m_controllerConnection = c; if( c ) { - QObject::connect( m_controllerConnection, SIGNAL( valueChanged() ), - this, SIGNAL( dataChanged() ), Qt::DirectConnection ); - QObject::connect( m_controllerConnection, SIGNAL( destroyed() ), this, SLOT( unlinkControllerConnection() ) ); + QObject::connect( m_controllerConnection, SIGNAL(valueChanged()), + this, SIGNAL(dataChanged()), Qt::DirectConnection ); + QObject::connect( m_controllerConnection, SIGNAL(destroyed()), this, SLOT(unlinkControllerConnection())); m_valueChanged = true; emit dataChanged(); } diff --git a/src/core/AutomationClip.cpp b/src/core/AutomationClip.cpp index feeed3fc2..f2cb211eb 100644 --- a/src/core/AutomationClip.cpp +++ b/src/core/AutomationClip.cpp @@ -134,8 +134,8 @@ bool AutomationClip::addObject( AutomatableModel * _obj, bool _search_dup ) m_objects += _obj; - connect( _obj, SIGNAL( destroyed( lmms::jo_id_t ) ), - this, SLOT( objectDestroyed( lmms::jo_id_t ) ), + connect( _obj, SIGNAL(destroyed(lmms::jo_id_t)), + this, SLOT(objectDestroyed(lmms::jo_id_t)), Qt::DirectConnection ); emit dataChanged(); diff --git a/src/core/ControllerConnection.cpp b/src/core/ControllerConnection.cpp index a6402227f..c65cd8ae9 100644 --- a/src/core/ControllerConnection.cpp +++ b/src/core/ControllerConnection.cpp @@ -119,8 +119,8 @@ void ControllerConnection::setController( Controller * _controller ) if( _controller->type() != Controller::DummyController ) { _controller->addConnection( this ); - QObject::connect( _controller, SIGNAL( valueChanged() ), - this, SIGNAL( valueChanged() ), Qt::DirectConnection ); + QObject::connect( _controller, SIGNAL(valueChanged()), + this, SIGNAL(valueChanged()), Qt::DirectConnection ); } m_ownsController = @@ -129,8 +129,8 @@ void ControllerConnection::setController( Controller * _controller ) // If we don't own the controller, allow deletion of controller // to delete the connection if( !m_ownsController ) { - QObject::connect( _controller, SIGNAL( destroyed() ), - this, SLOT( deleteConnection() ) ); + QObject::connect( _controller, SIGNAL(destroyed()), + this, SLOT(deleteConnection())); } } diff --git a/src/core/EnvelopeAndLfoParameters.cpp b/src/core/EnvelopeAndLfoParameters.cpp index b80b54946..55d200668 100644 --- a/src/core/EnvelopeAndLfoParameters.cpp +++ b/src/core/EnvelopeAndLfoParameters.cpp @@ -132,36 +132,36 @@ EnvelopeAndLfoParameters::EnvelopeAndLfoParameters( instances()->add( this ); - connect( &m_predelayModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_attackModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_holdModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_decayModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_sustainModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_releaseModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_amountModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); + connect( &m_predelayModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_attackModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_holdModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_decayModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_sustainModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_releaseModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_amountModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); - connect( &m_lfoPredelayModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_lfoAttackModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_lfoSpeedModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_lfoAmountModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_lfoWaveModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); - connect( &m_x100Model, SIGNAL( dataChanged() ), - this, SLOT( updateSampleVars() ), Qt::DirectConnection ); + connect( &m_lfoPredelayModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_lfoAttackModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_lfoSpeedModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_lfoAmountModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_lfoWaveModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); + connect( &m_x100Model, SIGNAL(dataChanged()), + this, SLOT(updateSampleVars()), Qt::DirectConnection ); - connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), - this, SLOT( updateSampleVars() ) ); + connect( Engine::audioEngine(), SIGNAL(sampleRateChanged()), + this, SLOT(updateSampleVars())); m_lfoShapeData = diff --git a/src/core/LadspaControl.cpp b/src/core/LadspaControl.cpp index fb6ef9167..b166ccf9e 100644 --- a/src/core/LadspaControl.cpp +++ b/src/core/LadspaControl.cpp @@ -46,8 +46,8 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port, { if( m_link ) { - connect( &m_linkEnabledModel, SIGNAL( dataChanged() ), - this, SLOT( linkStateChanged() ), + connect( &m_linkEnabledModel, SIGNAL(dataChanged()), + this, SLOT(linkStateChanged()), Qt::DirectConnection ); } @@ -56,8 +56,8 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port, case TOGGLED: m_toggledModel.setInitValue( static_cast( m_port->def ) ); - connect( &m_toggledModel, SIGNAL( dataChanged() ), - this, SLOT( ledChanged() ) ); + connect( &m_toggledModel, SIGNAL(dataChanged()), + this, SLOT(ledChanged())); if( m_port->def == 1.0f ) { m_toggledModel.setValue( true ); @@ -74,8 +74,8 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port, m_port->min ) / 400 ); m_knobModel.setInitValue( static_cast( m_port->def ) ); - connect( &m_knobModel, SIGNAL( dataChanged() ), - this, SLOT( knobChanged() ) ); + connect( &m_knobModel, SIGNAL(dataChanged()), + this, SLOT(knobChanged())); // TODO: careful: we must prevent saved scales m_knobModel.setScaleLogarithmic( m_port->suggests_logscale ); break; @@ -87,8 +87,8 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port, && m_port->max == 10.0f ? 4000.0f : ( m_port->suggests_logscale ? 8000000.0f : 800000.0f ) ) ); m_knobModel.setInitValue( m_port->def ); - connect( &m_knobModel, SIGNAL( dataChanged() ), - this, SLOT( knobChanged() ) ); + connect( &m_knobModel, SIGNAL(dataChanged()), + this, SLOT(knobChanged())); // TODO: careful: we must prevent saved scales m_knobModel.setScaleLogarithmic( m_port->suggests_logscale ); break; @@ -98,8 +98,8 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port, ( m_port->max - m_port->min ) / 800.0f ); m_tempoSyncKnobModel.setInitValue( m_port->def ); - connect( &m_tempoSyncKnobModel, SIGNAL( dataChanged() ), - this, SLOT( tempoKnobChanged() ) ); + connect( &m_tempoSyncKnobModel, SIGNAL(dataChanged()), + this, SLOT(tempoKnobChanged())); // TODO: careful: we must prevent saved scales m_tempoSyncKnobModel.setScaleLogarithmic( m_port->suggests_logscale ); break; diff --git a/src/core/LfoController.cpp b/src/core/LfoController.cpp index 548da5d7c..495ae54d4 100644 --- a/src/core/LfoController.cpp +++ b/src/core/LfoController.cpp @@ -51,20 +51,20 @@ LfoController::LfoController( Model * _parent ) : m_userDefSampleBuffer( new SampleBuffer ) { setSampleExact( true ); - connect( &m_waveModel, SIGNAL( dataChanged() ), - this, SLOT( updateSampleFunction() ), Qt::DirectConnection ); + connect( &m_waveModel, SIGNAL(dataChanged()), + this, SLOT(updateSampleFunction()), Qt::DirectConnection ); - connect( &m_speedModel, SIGNAL( dataChanged() ), - this, SLOT( updateDuration() ), Qt::DirectConnection ); - connect( &m_multiplierModel, SIGNAL( dataChanged() ), - this, SLOT( updateDuration() ), Qt::DirectConnection ); - connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), - this, SLOT( updateDuration() ) ); + connect( &m_speedModel, SIGNAL(dataChanged()), + this, SLOT(updateDuration()), Qt::DirectConnection ); + connect( &m_multiplierModel, SIGNAL(dataChanged()), + this, SLOT(updateDuration()), Qt::DirectConnection ); + connect( Engine::audioEngine(), SIGNAL(sampleRateChanged()), + this, SLOT(updateDuration())); - connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), - this, SLOT( updatePhase() ) ); - connect( Engine::getSong(), SIGNAL( playbackPositionChanged() ), - this, SLOT( updatePhase() ) ); + connect( Engine::getSong(), SIGNAL(playbackStateChanged()), + this, SLOT(updatePhase())); + connect( Engine::getSong(), SIGNAL(playbackPositionChanged()), + this, SLOT(updatePhase())); updateDuration(); } diff --git a/src/core/MeterModel.cpp b/src/core/MeterModel.cpp index ee5d8bbc8..3e24ae4d1 100644 --- a/src/core/MeterModel.cpp +++ b/src/core/MeterModel.cpp @@ -35,10 +35,10 @@ MeterModel::MeterModel( Model * _parent ) : m_numeratorModel( 4, 1, 32, this, tr( "Numerator" ) ), m_denominatorModel( 4, 1, 32, this, tr( "Denominator" ) ) { - connect( &m_numeratorModel, SIGNAL( dataChanged() ), - this, SIGNAL( dataChanged() ), Qt::DirectConnection ); - connect( &m_denominatorModel, SIGNAL( dataChanged() ), - this, SIGNAL( dataChanged() ), Qt::DirectConnection ); + connect( &m_numeratorModel, SIGNAL(dataChanged()), + this, SIGNAL(dataChanged()), Qt::DirectConnection ); + connect( &m_denominatorModel, SIGNAL(dataChanged()), + this, SIGNAL(dataChanged()), Qt::DirectConnection ); } diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index 129aa83b7..a9215325e 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -53,14 +53,14 @@ PeakController::PeakController( Model * _parent, setSampleExact( true ); if( m_peakEffect ) { - connect( m_peakEffect, SIGNAL( destroyed() ), - this, SLOT( handleDestroyedEffect() ) ); + connect( m_peakEffect, SIGNAL(destroyed()), + this, SLOT(handleDestroyedEffect())); } - connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( updateCoeffs() ) ); - connect( m_peakEffect->attackModel(), SIGNAL( dataChanged() ), - this, SLOT( updateCoeffs() ), Qt::DirectConnection ); - connect( m_peakEffect->decayModel(), SIGNAL( dataChanged() ), - this, SLOT( updateCoeffs() ), Qt::DirectConnection ); + connect( Engine::audioEngine(), SIGNAL(sampleRateChanged()), this, SLOT(updateCoeffs())); + connect( m_peakEffect->attackModel(), SIGNAL(dataChanged()), + this, SLOT(updateCoeffs()), Qt::DirectConnection ); + connect( m_peakEffect->decayModel(), SIGNAL(dataChanged()), + this, SLOT(updateCoeffs()), Qt::DirectConnection ); m_coeffNeedsUpdate = true; } diff --git a/src/core/RemotePlugin.cpp b/src/core/RemotePlugin.cpp index 43eed30a7..62ed9b653 100644 --- a/src/core/RemotePlugin.cpp +++ b/src/core/RemotePlugin.cpp @@ -175,14 +175,14 @@ RemotePlugin::RemotePlugin() : } #endif - connect( &m_process, SIGNAL( finished( int, QProcess::ExitStatus ) ), - this, SLOT( processFinished( int, QProcess::ExitStatus ) ), + connect( &m_process, SIGNAL(finished(int,QProcess::ExitStatus)), + this, SLOT(processFinished(int,QProcess::ExitStatus)), Qt::DirectConnection ); - connect( &m_process, SIGNAL( errorOccurred( QProcess::ProcessError ) ), - this, SLOT( processErrored( QProcess::ProcessError ) ), + connect( &m_process, SIGNAL(errorOccurred(QProcess::ProcessError)), + this, SLOT(processErrored(QProcess::ProcessError)), Qt::DirectConnection ); - connect( &m_process, SIGNAL( finished( int, QProcess::ExitStatus ) ), - &m_watcher, SLOT( quit() ), Qt::DirectConnection ); + connect( &m_process, SIGNAL(finished(int,QProcess::ExitStatus)), + &m_watcher, SLOT(quit()), Qt::DirectConnection ); } diff --git a/src/core/RenderManager.cpp b/src/core/RenderManager.cpp index e2f6b9311..ea3f69f47 100644 --- a/src/core/RenderManager.cpp +++ b/src/core/RenderManager.cpp @@ -57,8 +57,8 @@ RenderManager::~RenderManager() void RenderManager::abortProcessing() { if ( m_activeRenderer ) { - disconnect( m_activeRenderer.get(), SIGNAL( finished() ), - this, SLOT( renderNextTrack() ) ); + disconnect( m_activeRenderer.get(), SIGNAL(finished()), + this, SLOT(renderNextTrack())); m_activeRenderer->abortProcessing(); } restoreMutedState(); @@ -151,13 +151,13 @@ void RenderManager::render(QString outputPath) if( m_activeRenderer->isReady() ) { // pass progress signals through - connect( m_activeRenderer.get(), SIGNAL( progressChanged( int ) ), - this, SIGNAL( progressChanged( int ) ) ); + connect( m_activeRenderer.get(), SIGNAL(progressChanged(int)), + this, SIGNAL(progressChanged(int))); // when it is finished, render the next track. // if we have not queued any tracks, renderNextTrack will just clean up - connect( m_activeRenderer.get(), SIGNAL( finished() ), - this, SLOT( renderNextTrack() ) ); + connect( m_activeRenderer.get(), SIGNAL(finished()), + this, SLOT(renderNextTrack())); m_activeRenderer->startProcessing(); } diff --git a/src/core/RingBuffer.cpp b/src/core/RingBuffer.cpp index b2e40f3c0..3f1ee7236 100644 --- a/src/core/RingBuffer.cpp +++ b/src/core/RingBuffer.cpp @@ -91,11 +91,11 @@ void RingBuffer::setSamplerateAware( bool b ) { if( b ) { - connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ), Qt::UniqueConnection ); + connect( Engine::audioEngine(), SIGNAL(sampleRateChanged()), this, SLOT(updateSamplerate()), Qt::UniqueConnection ); } else { - disconnect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSamplerate() ) ); + disconnect( Engine::audioEngine(), SIGNAL(sampleRateChanged()), this, SLOT(updateSamplerate())); } } diff --git a/src/core/SampleClip.cpp b/src/core/SampleClip.cpp index 9ee8e93e4..fc59fa457 100644 --- a/src/core/SampleClip.cpp +++ b/src/core/SampleClip.cpp @@ -47,30 +47,30 @@ SampleClip::SampleClip( Track * _track ) : // we need to receive bpm-change-events, because then we have to // change length of this Clip - connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ), - this, SLOT( updateLength() ), Qt::DirectConnection ); - connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int,int ) ), - this, SLOT( updateLength() ) ); + connect( Engine::getSong(), SIGNAL(tempoChanged(lmms::bpm_t)), + this, SLOT(updateLength()), Qt::DirectConnection ); + connect( Engine::getSong(), SIGNAL(timeSignatureChanged(int,int)), + this, SLOT(updateLength())); //care about positionmarker gui::TimeLineWidget* timeLine = Engine::getSong()->getPlayPos( Engine::getSong()->Mode_PlaySong ).m_timeLine; if( timeLine ) { - connect( timeLine, SIGNAL( positionMarkerMoved() ), this, SLOT( playbackPositionChanged() ) ); + connect( timeLine, SIGNAL(positionMarkerMoved()), this, SLOT(playbackPositionChanged())); } //playbutton clicked or space key / on Export Song set isPlaying to false - connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), - this, SLOT( playbackPositionChanged() ), Qt::DirectConnection ); + connect( Engine::getSong(), SIGNAL(playbackStateChanged()), + this, SLOT(playbackPositionChanged()), Qt::DirectConnection ); //care about loops - connect( Engine::getSong(), SIGNAL( updateSampleTracks() ), - this, SLOT( playbackPositionChanged() ), Qt::DirectConnection ); + connect( Engine::getSong(), SIGNAL(updateSampleTracks()), + this, SLOT(playbackPositionChanged()), Qt::DirectConnection ); //care about mute Clips - connect( this, SIGNAL( dataChanged() ), this, SLOT( playbackPositionChanged() ) ); + connect( this, SIGNAL(dataChanged()), this, SLOT(playbackPositionChanged())); //care about mute track - connect( getTrack()->getMutedModel(), SIGNAL( dataChanged() ), - this, SLOT( playbackPositionChanged() ), Qt::DirectConnection ); + connect( getTrack()->getMutedModel(), SIGNAL(dataChanged()), + this, SLOT(playbackPositionChanged()), Qt::DirectConnection ); //care about Clip position - connect( this, SIGNAL( positionChanged() ), this, SLOT( updateTrackClips() ) ); + connect( this, SIGNAL(positionChanged()), this, SLOT(updateTrackClips())); switch( getTrack()->trackContainer()->type() ) { diff --git a/src/core/Song.cpp b/src/core/Song.cpp index d26eab450..029683f94 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -100,21 +100,21 @@ Song::Song() : m_oldAutomatedValues() { for(int i = 0; i < Mode_Count; ++i) m_elapsedMilliSeconds[i] = 0; - connect( &m_tempoModel, SIGNAL( dataChanged() ), - this, SLOT( setTempo() ), Qt::DirectConnection ); - connect( &m_tempoModel, SIGNAL( dataUnchanged() ), - this, SLOT( setTempo() ), Qt::DirectConnection ); - connect( &m_timeSigModel, SIGNAL( dataChanged() ), - this, SLOT( setTimeSignature() ), Qt::DirectConnection ); + connect( &m_tempoModel, SIGNAL(dataChanged()), + this, SLOT(setTempo()), Qt::DirectConnection ); + connect( &m_tempoModel, SIGNAL(dataUnchanged()), + this, SLOT(setTempo()), Qt::DirectConnection ); + connect( &m_timeSigModel, SIGNAL(dataChanged()), + this, SLOT(setTimeSignature()), Qt::DirectConnection ); - connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, - SLOT( updateFramesPerTick() ) ); + connect( Engine::audioEngine(), SIGNAL(sampleRateChanged()), this, + SLOT(updateFramesPerTick())); - connect( &m_masterVolumeModel, SIGNAL( dataChanged() ), - this, SLOT( masterVolumeChanged() ), Qt::DirectConnection ); -/* connect( &m_masterPitchModel, SIGNAL( dataChanged() ), - this, SLOT( masterPitchChanged() ) );*/ + connect( &m_masterVolumeModel, SIGNAL(dataChanged()), + this, SLOT(masterVolumeChanged()), Qt::DirectConnection ); +/* connect( &m_masterPitchModel, SIGNAL(dataChanged()), + this, SLOT(masterPitchChanged()));*/ qRegisterMetaType( "Note" ); setType( SongContainer ); diff --git a/src/core/TempoSyncKnobModel.cpp b/src/core/TempoSyncKnobModel.cpp index bc7c86db9..58437db24 100644 --- a/src/core/TempoSyncKnobModel.cpp +++ b/src/core/TempoSyncKnobModel.cpp @@ -45,8 +45,8 @@ TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min, m_scale( _scale ), m_custom( _parent ) { - connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ), - this, SLOT( calculateTempoSyncTime( lmms::bpm_t ) ), + connect( Engine::getSong(), SIGNAL(tempoChanged(lmms::bpm_t)), + this, SLOT(calculateTempoSyncTime(lmms::bpm_t)), Qt::DirectConnection ); } @@ -158,8 +158,8 @@ void TempoSyncKnobModel::setSyncMode( TempoSyncMode _new_mode ) m_tempoSyncMode = _new_mode; if( _new_mode == SyncCustom ) { - connect( &m_custom, SIGNAL( dataChanged() ), - this, SLOT( updateCustom() ), + connect( &m_custom, SIGNAL(dataChanged()), + this, SLOT(updateCustom()), Qt::DirectConnection ); } } diff --git a/src/core/VstSyncController.cpp b/src/core/VstSyncController.cpp index 1699905c6..a08831662 100644 --- a/src/core/VstSyncController.cpp +++ b/src/core/VstSyncController.cpp @@ -44,7 +44,7 @@ VstSyncController::VstSyncController() : { if( ConfigManager::inst()->value( "ui", "syncvstplugins" ).toInt() ) { - connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( updateSampleRate() ) ); + connect( Engine::audioEngine(), SIGNAL(sampleRateChanged()), this, SLOT(updateSampleRate())); try { diff --git a/src/core/audio/AudioJack.cpp b/src/core/audio/AudioJack.cpp index f0e606f47..071a6e3c3 100644 --- a/src/core/audio/AudioJack.cpp +++ b/src/core/audio/AudioJack.cpp @@ -61,8 +61,8 @@ AudioJack::AudioJack( bool & _success_ful, AudioEngine* _audioEngine ) : _success_ful = initJackClient(); if( _success_ful ) { - connect( this, SIGNAL( zombified() ), - this, SLOT( restartAfterZombified() ), + connect( this, SIGNAL(zombified()), + this, SLOT(restartAfterZombified()), Qt::QueuedConnection ); } diff --git a/src/core/audio/AudioPortAudio.cpp b/src/core/audio/AudioPortAudio.cpp index cc1e611c9..b1e9cb5c4 100644 --- a/src/core/audio/AudioPortAudio.cpp +++ b/src/core/audio/AudioPortAudio.cpp @@ -444,11 +444,11 @@ AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) : m_channels->setLabel( tr( "Channels" ) ); m_channels->move( 308, 20 );*/ - connect( &m_setupUtil.m_backendModel, SIGNAL( dataChanged() ), - &m_setupUtil, SLOT( updateDevices() ) ); + connect( &m_setupUtil.m_backendModel, SIGNAL(dataChanged()), + &m_setupUtil, SLOT(updateDevices())); - connect( &m_setupUtil.m_deviceModel, SIGNAL( dataChanged() ), - &m_setupUtil, SLOT( updateChannels() ) ); + connect( &m_setupUtil.m_deviceModel, SIGNAL(dataChanged()), + &m_setupUtil, SLOT(updateChannels())); m_backend->setModel( &m_setupUtil.m_backendModel ); m_device->setModel( &m_setupUtil.m_deviceModel ); @@ -459,11 +459,11 @@ AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) : AudioPortAudio::setupWidget::~setupWidget() { - disconnect( &m_setupUtil.m_backendModel, SIGNAL( dataChanged() ), - &m_setupUtil, SLOT( updateDevices() ) ); + disconnect( &m_setupUtil.m_backendModel, SIGNAL(dataChanged()), + &m_setupUtil, SLOT(updateDevices())); - disconnect( &m_setupUtil.m_deviceModel, SIGNAL( dataChanged() ), - &m_setupUtil, SLOT( updateChannels() ) ); + disconnect( &m_setupUtil.m_deviceModel, SIGNAL(dataChanged()), + &m_setupUtil, SLOT(updateChannels())); } diff --git a/src/core/audio/AudioSoundIo.cpp b/src/core/audio/AudioSoundIo.cpp index c56d23dc3..a25d968df 100644 --- a/src/core/audio/AudioSoundIo.cpp +++ b/src/core/audio/AudioSoundIo.cpp @@ -492,7 +492,7 @@ AudioSoundIo::setupWidget::setupWidget( QWidget * _parent ) : reconnectSoundIo(); - bool ok = connect( &m_backendModel, SIGNAL( dataChanged() ), &m_setupUtil, SLOT( reconnectSoundIo() ) ); + bool ok = connect( &m_backendModel, SIGNAL(dataChanged()), &m_setupUtil, SLOT(reconnectSoundIo())); assert(ok); m_backend->setModel( &m_backendModel ); @@ -501,7 +501,7 @@ AudioSoundIo::setupWidget::setupWidget( QWidget * _parent ) : AudioSoundIo::setupWidget::~setupWidget() { - bool ok = disconnect( &m_backendModel, SIGNAL( dataChanged() ), &m_setupUtil, SLOT( reconnectSoundIo() ) ); + bool ok = disconnect( &m_backendModel, SIGNAL(dataChanged()), &m_setupUtil, SLOT(reconnectSoundIo())); assert(ok); if (m_soundio) { diff --git a/src/core/main.cpp b/src/core/main.cpp index 5d454dd9b..43e744e5b 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -831,12 +831,12 @@ int main( int argc, char * * argv ) // create renderer RenderManager * r = new RenderManager( qs, os, eff, renderOut ); QCoreApplication::instance()->connect( r, - SIGNAL( finished() ), SLOT( quit() ) ); + SIGNAL(finished()), SLOT(quit())); // timer for progress-updates QTimer * t = new QTimer( r ); - r->connect( t, SIGNAL( timeout() ), - SLOT( updateConsoleProgress() ) ); + r->connect( t, SIGNAL(timeout()), + SLOT(updateConsoleProgress())); t->start( 200 ); if( profilerOutputFile.isEmpty() == false ) diff --git a/src/core/midi/MidiAlsaSeq.cpp b/src/core/midi/MidiAlsaSeq.cpp index 41904812c..b7d46fe4f 100644 --- a/src/core/midi/MidiAlsaSeq.cpp +++ b/src/core/midi/MidiAlsaSeq.cpp @@ -101,14 +101,14 @@ MidiAlsaSeq::MidiAlsaSeq() : snd_seq_start_queue( m_seqHandle, m_queueID, nullptr ); changeQueueTempo( Engine::getSong()->getTempo() ); - connect( Engine::getSong(), SIGNAL( tempoChanged( lmms::bpm_t ) ), - this, SLOT( changeQueueTempo( lmms::bpm_t ) ), Qt::DirectConnection ); + connect( Engine::getSong(), SIGNAL(tempoChanged(lmms::bpm_t)), + this, SLOT(changeQueueTempo(lmms::bpm_t)), Qt::DirectConnection ); // initial list-update updatePortList(); - connect( &m_portListUpdateTimer, SIGNAL( timeout() ), - this, SLOT( updatePortList() ) ); + connect( &m_portListUpdateTimer, SIGNAL(timeout()), + this, SLOT(updatePortList())); // we check for port-changes every second m_portListUpdateTimer.start( 1000 ); diff --git a/src/core/midi/MidiController.cpp b/src/core/midi/MidiController.cpp index 61c85104e..75f548a37 100644 --- a/src/core/midi/MidiController.cpp +++ b/src/core/midi/MidiController.cpp @@ -40,8 +40,8 @@ MidiController::MidiController( Model * _parent ) : m_previousValue( 0.0f ) { setSampleExact( true ); - connect( &m_midiPort, SIGNAL( modeChanged() ), - this, SLOT( updateName() ) ); + connect( &m_midiPort, SIGNAL(modeChanged()), + this, SLOT(updateName())); } diff --git a/src/core/midi/MidiPort.cpp b/src/core/midi/MidiPort.cpp index 9b3f46304..33733398b 100644 --- a/src/core/midi/MidiPort.cpp +++ b/src/core/midi/MidiPort.cpp @@ -69,12 +69,12 @@ MidiPort::MidiPort( const QString& name, m_readableModel.setValue( m_mode == Input || m_mode == Duplex ); m_writableModel.setValue( m_mode == Output || m_mode == Duplex ); - connect( &m_readableModel, SIGNAL( dataChanged() ), - this, SLOT( updateMidiPortMode() ), Qt::DirectConnection ); - connect( &m_writableModel, SIGNAL( dataChanged() ), - this, SLOT( updateMidiPortMode() ), Qt::DirectConnection ); - connect( &m_outputProgramModel, SIGNAL( dataChanged() ), - this, SLOT( updateOutputProgram() ), Qt::DirectConnection ); + connect( &m_readableModel, SIGNAL(dataChanged()), + this, SLOT(updateMidiPortMode()), Qt::DirectConnection ); + connect( &m_writableModel, SIGNAL(dataChanged()), + this, SLOT(updateMidiPortMode()), Qt::DirectConnection ); + connect( &m_outputProgramModel, SIGNAL(dataChanged()), + this, SLOT(updateOutputProgram()), Qt::DirectConnection ); // when using with non-raw-clients we can provide buttons showing @@ -85,8 +85,8 @@ MidiPort::MidiPort( const QString& name, updateWritablePorts(); // we want to get informed about port-changes! - m_midiClient->connectRPChanged( this, SLOT( updateReadablePorts() ) ); - m_midiClient->connectWPChanged( this, SLOT( updateWritablePorts() ) ); + m_midiClient->connectRPChanged( this, SLOT(updateReadablePorts())); + m_midiClient->connectWPChanged( this, SLOT(updateWritablePorts())); } updateMidiPortMode(); diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 7ef527cae..365a5749e 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -61,14 +61,14 @@ void AutomatableModelView::addDefaultActions( QMenu* menu ) AutomatableModel::tr( "&Reset (%1%2)" ). arg( model->initValue() * m_conversionFactor ). arg( m_unit ), - model, SLOT( reset() ) ); + model, SLOT(reset())); menu->addSeparator(); menu->addAction( embed::getIconPixmap( "edit_copy" ), AutomatableModel::tr( "&Copy value (%1%2)" ). arg( model->value() * m_conversionFactor ). arg( m_unit ), - amvSlots, SLOT( copyToClipboard() ) ); + amvSlots, SLOT(copyToClipboard())); bool canPaste = true; const float valueToPaste = floatFromClipboard(&canPaste); @@ -78,7 +78,7 @@ void AutomatableModelView::addDefaultActions( QMenu* menu ) arg( m_unit ) : AutomatableModel::tr( "&Paste value"); QAction* pasteAction = menu->addAction( embed::getIconPixmap( "edit_paste" ), - pasteDesc, amvSlots, SLOT( pasteFromClipboard() ) ); + pasteDesc, amvSlots, SLOT(pasteFromClipboard())); pasteAction->setEnabled(canPaste); menu->addSeparator(); @@ -86,12 +86,12 @@ void AutomatableModelView::addDefaultActions( QMenu* menu ) menu->addAction( embed::getIconPixmap( "automation" ), AutomatableModel::tr( "Edit song-global automation" ), amvSlots, - SLOT( editSongGlobalAutomation() ) ); + SLOT(editSongGlobalAutomation())); menu->addAction( QPixmap(), AutomatableModel::tr( "Remove song-global automation" ), amvSlots, - SLOT( removeSongGlobalAutomation() ) ); + SLOT(removeSongGlobalAutomation())); menu->addSeparator(); @@ -99,7 +99,7 @@ void AutomatableModelView::addDefaultActions( QMenu* menu ) { menu->addAction( embed::getIconPixmap( "edit-delete" ), AutomatableModel::tr( "Remove all linked controls" ), - amvSlots, SLOT( unlinkAllModels() ) ); + amvSlots, SLOT(unlinkAllModels())); menu->addSeparator(); } @@ -120,16 +120,16 @@ void AutomatableModelView::addDefaultActions( QMenu* menu ) contMenu->addAction( embed::getIconPixmap( "controller" ), AutomatableModel::tr("Edit connection..."), - amvSlots, SLOT( execConnectionDialog() ) ); + amvSlots, SLOT(execConnectionDialog())); contMenu->addAction( embed::getIconPixmap( "cancel" ), AutomatableModel::tr("Remove connection"), - amvSlots, SLOT( removeConnection() ) ); + amvSlots, SLOT(removeConnection())); } else { menu->addAction( embed::getIconPixmap( "controller" ), AutomatableModel::tr("Connect to controller..."), - amvSlots, SLOT( execConnectionDialog() ) ); + amvSlots, SLOT(execConnectionDialog())); } } @@ -202,7 +202,7 @@ AutomatableModelViewSlots::AutomatableModelViewSlots( AutomatableModelView* amv, QObject(), m_amv( amv ) { - connect( parent, SIGNAL( destroyed() ), this, SLOT( deleteLater() ), Qt::QueuedConnection ); + connect( parent, SIGNAL(destroyed()), this, SLOT(deleteLater()), Qt::QueuedConnection ); } diff --git a/src/gui/ControllerRackView.cpp b/src/gui/ControllerRackView.cpp index f5420111d..e9f23c767 100644 --- a/src/gui/ControllerRackView.cpp +++ b/src/gui/ControllerRackView.cpp @@ -64,12 +64,12 @@ ControllerRackView::ControllerRackView() : m_addButton = new QPushButton( this ); m_addButton->setText( tr( "Add" ) ); - connect( m_addButton, SIGNAL( clicked() ), - this, SLOT( addController() ) ); + connect( m_addButton, SIGNAL(clicked()), + this, SLOT(addController())); Song * song = Engine::getSong(); - connect( song, SIGNAL( controllerAdded( lmms::Controller* ) ), SLOT( onControllerAdded( lmms::Controller* ) ) ); - connect( song, SIGNAL( controllerRemoved( lmms::Controller* ) ), SLOT( onControllerRemoved( lmms::Controller* ) ) ); + connect( song, SIGNAL(controllerAdded(lmms::Controller*)), SLOT(onControllerAdded(lmms::Controller*))); + connect( song, SIGNAL(controllerRemoved(lmms::Controller*)), SLOT(onControllerRemoved(lmms::Controller*))); QVBoxLayout * layout = new QVBoxLayout(); layout->addWidget( m_scrollArea ); @@ -148,8 +148,8 @@ void ControllerRackView::onControllerAdded( Controller * controller ) ControllerView * controllerView = new ControllerView( controller, scrollAreaWidget ); - connect( controllerView, SIGNAL( deleteController( lmms::gui::ControllerView * ) ), - this, SLOT( deleteController( lmms::gui::ControllerView * ) ), Qt::QueuedConnection ); + connect( controllerView, SIGNAL(deleteController(lmms::gui::ControllerView*)), + this, SLOT(deleteController(lmms::gui::ControllerView*)), Qt::QueuedConnection ); m_controllerViews.append( controllerView ); m_scrollAreaLayout->insertWidget( m_nextIndex, controllerView ); diff --git a/src/gui/ControllerView.cpp b/src/gui/ControllerView.cpp index 7e046b4f2..903c02862 100644 --- a/src/gui/ControllerView.cpp +++ b/src/gui/ControllerView.cpp @@ -67,7 +67,7 @@ ControllerView::ControllerView( Controller * _model, QWidget * _parent ) : hBox->addWidget(label); QPushButton * controlsButton = new QPushButton( tr( "Controls" ), this ); - connect( controlsButton, SIGNAL( clicked() ), SLOT( editControls() ) ); + connect( controlsButton, SIGNAL(clicked()), SLOT(editControls())); hBox->addWidget(controlsButton); @@ -86,8 +86,8 @@ ControllerView::ControllerView( Controller * _model, QWidget * _parent ) : m_subWindow->setWindowIcon( m_controllerDlg->windowIcon() ); - connect( m_controllerDlg, SIGNAL( closed() ), - this, SLOT( closeControls() ) ); + connect( m_controllerDlg, SIGNAL(closed()), + this, SLOT(closeControls())); m_subWindow->hide(); @@ -176,8 +176,8 @@ void ControllerView::contextMenuEvent( QContextMenuEvent * ) QPointer contextMenu = new CaptionMenu( model()->displayName(), this ); contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "&Remove this controller" ), - this, SLOT( deleteController() ) ); - contextMenu->addAction( tr("Re&name this controller"), this, SLOT( renameController() )); + this, SLOT(deleteController())); + contextMenu->addAction( tr("Re&name this controller"), this, SLOT(renameController())); contextMenu->addSeparator(); contextMenu->exec( QCursor::pos() ); delete contextMenu; diff --git a/src/gui/EffectRackView.cpp b/src/gui/EffectRackView.cpp index 27600056e..d946e753d 100644 --- a/src/gui/EffectRackView.cpp +++ b/src/gui/EffectRackView.cpp @@ -65,7 +65,7 @@ EffectRackView::EffectRackView( EffectChain* model, QWidget* parent ) : effectsLayout->addWidget( addButton ); - connect( addButton, SIGNAL( clicked() ), this, SLOT( addEffect() ) ); + connect( addButton, SIGNAL(clicked()), this, SLOT(addEffect())); m_lastY = 0; @@ -171,12 +171,12 @@ void EffectRackView::update() if( i >= m_effectViews.size() ) { EffectView * view = new EffectView( *it, w ); - connect( view, SIGNAL( moveUp( lmms::gui::EffectView * ) ), - this, SLOT( moveUp( lmms::gui::EffectView * ) ) ); - connect( view, SIGNAL( moveDown( lmms::gui::EffectView * ) ), - this, SLOT( moveDown( lmms::gui::EffectView * ) ) ); - connect( view, SIGNAL( deletePlugin( lmms::gui::EffectView * ) ), - this, SLOT( deletePlugin( lmms::gui::EffectView * ) ), + connect( view, SIGNAL(moveUp(lmms::gui::EffectView*)), + this, SLOT(moveUp(lmms::gui::EffectView*))); + connect( view, SIGNAL(moveDown(lmms::gui::EffectView*)), + this, SLOT(moveDown(lmms::gui::EffectView*))); + connect( view, SIGNAL(deletePlugin(lmms::gui::EffectView*)), + this, SLOT(deletePlugin(lmms::gui::EffectView*)), Qt::QueuedConnection ); view->show(); m_effectViews.append( view ); @@ -259,7 +259,7 @@ void EffectRackView::modelChanged() { //clearViews(); m_effectsGroupBox->setModel( &fxChain()->m_enabledModel ); - connect( fxChain(), SIGNAL( aboutToClear() ), this, SLOT( clearViews() ) ); + connect( fxChain(), SIGNAL(aboutToClear()), this, SLOT(clearViews())); update(); } diff --git a/src/gui/EffectView.cpp b/src/gui/EffectView.cpp index f90283631..820f9907d 100644 --- a/src/gui/EffectView.cpp +++ b/src/gui/EffectView.cpp @@ -90,8 +90,8 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : QFont f = ctls_btn->font(); ctls_btn->setFont( pointSize<8>( f ) ); ctls_btn->setGeometry( 150, 14, 50, 20 ); - connect( ctls_btn, SIGNAL( clicked() ), - this, SLOT( editControls() ) ); + connect( ctls_btn, SIGNAL(clicked()), + this, SLOT(editControls())); m_controlView = effect()->controls()->createView(); if( m_controlView ) @@ -111,8 +111,8 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : flags &= ~Qt::WindowMaximizeButtonHint; m_subWindow->setWindowFlags( flags ); - connect( m_controlView, SIGNAL( closed() ), - this, SLOT( closeEffects() ) ); + connect( m_controlView, SIGNAL(closed()), + this, SLOT(closeEffects())); m_subWindow->hide(); } @@ -194,14 +194,14 @@ void EffectView::contextMenuEvent( QContextMenuEvent * ) QPointer contextMenu = new CaptionMenu( model()->displayName(), this ); contextMenu->addAction( embed::getIconPixmap( "arp_up" ), tr( "Move &up" ), - this, SLOT( moveUp() ) ); + this, SLOT(moveUp())); contextMenu->addAction( embed::getIconPixmap( "arp_down" ), tr( "Move &down" ), - this, SLOT( moveDown() ) ); + this, SLOT(moveDown())); contextMenu->addSeparator(); contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "&Remove this plugin" ), - this, SLOT( deletePlugin() ) ); + this, SLOT(deletePlugin())); contextMenu->addSeparator(); contextMenu->exec( QCursor::pos() ); delete contextMenu; diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 732d6aa48..0a6f8a216 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -125,14 +125,14 @@ FileBrowser::FileBrowser(const QString & directories, const QString & filter, m_filterEdit = new QLineEdit( searchWidget ); m_filterEdit->setPlaceholderText( tr("Search") ); m_filterEdit->setClearButtonEnabled( true ); - connect( m_filterEdit, SIGNAL( textEdited( const QString & ) ), - this, SLOT( filterItems( const QString & ) ) ); + connect( m_filterEdit, SIGNAL( textEdited( const QString& ) ), + this, SLOT( filterItems( const QString& ) ) ); QPushButton * reload_btn = new QPushButton( embed::getIconPixmap( "reload" ), QString(), searchWidget ); reload_btn->setToolTip( tr( "Refresh list" ) ); - connect( reload_btn, SIGNAL( clicked() ), this, SLOT( reloadTree() ) ); + connect( reload_btn, SIGNAL(clicked()), this, SLOT(reloadTree())); searchWidgetLayout->addWidget( m_filterEdit ); searchWidgetLayout->addSpacing( 5 ); @@ -144,7 +144,7 @@ FileBrowser::FileBrowser(const QString & directories, const QString & filter, addContentWidget( m_fileBrowserTreeWidget ); // Whenever the FileBrowser has focus, Ctrl+F should direct focus to its filter box. - QShortcut *filterFocusShortcut = new QShortcut( QKeySequence( QKeySequence::Find ), this, SLOT(giveFocusToFilter()) ); + QShortcut *filterFocusShortcut = new QShortcut( QKeySequence( QKeySequence::Find ), this, SLOT(giveFocusToFilter())); filterFocusShortcut->setContext(Qt::WidgetWithChildrenShortcut); reloadTree(); @@ -381,12 +381,12 @@ FileBrowserTreeWidget::FileBrowserTreeWidget(QWidget * parent ) : headerItem()->setHidden( true ); setSortingEnabled( false ); - connect( this, SIGNAL( itemDoubleClicked( QTreeWidgetItem *, int ) ), - SLOT( activateListItem( QTreeWidgetItem *, int ) ) ); - connect( this, SIGNAL( itemCollapsed( QTreeWidgetItem * ) ), - SLOT( updateDirectory( QTreeWidgetItem * ) ) ); - connect( this, SIGNAL( itemExpanded( QTreeWidgetItem * ) ), - SLOT( updateDirectory( QTreeWidgetItem * ) ) ); + connect( this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), + SLOT(activateListItem(QTreeWidgetItem*,int))); + connect( this, SIGNAL(itemCollapsed(QTreeWidgetItem*)), + SLOT(updateDirectory(QTreeWidgetItem*))); + connect( this, SIGNAL(itemExpanded(QTreeWidgetItem*)), + SLOT(updateDirectory(QTreeWidgetItem*))); #if QT_VERSION < QT_VERSION_CHECK(5, 12, 2) && defined LMMS_BUILD_WIN32 // Set the font for the QTreeWidget to the Windows System font to make sure that diff --git a/src/gui/LfoControllerDialog.cpp b/src/gui/LfoControllerDialog.cpp index 84a3451d8..b0606dfe9 100644 --- a/src/gui/LfoControllerDialog.cpp +++ b/src/gui/LfoControllerDialog.cpp @@ -153,8 +153,8 @@ LfoControllerDialog::LfoControllerDialog( Controller * _model, QWidget * _parent m_userWaveBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); connect( m_userWaveBtn, - SIGNAL( doubleClicked() ), - this, SLOT( askUserDefWave() ) ); + SIGNAL(doubleClicked()), + this, SLOT(askUserDefWave())); m_userWaveBtn->setToolTip( tr( "User-defined shape.\nDouble click to pick a file." ) ); @@ -244,14 +244,14 @@ void LfoControllerDialog::contextMenuEvent( QContextMenuEvent * ) // should be replaced by Model::displayName contextMenu->addAction( embed::getIconPixmap( "arp_up_on" ), tr( "Move &up" ), - this, SLOT( moveUp() ) ); + this, SLOT(moveUp())); contextMenu->addAction( embed::getIconPixmap( "arp_down_on" ), tr( "Move &down" ), - this, SLOT( moveDown() ) ); + this, SLOT(moveDown())); contextMenu->addSeparator(); contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "&Remove this plugin" ), - this, SLOT( deletePlugin() ) ); + this, SLOT(deletePlugin())); contextMenu->exec( QCursor::pos() ); delete contextMenu; */ diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index bc917f53c..a77094b19 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -251,8 +251,8 @@ MainWindow::MainWindow() : // See autoSaveTimerReset() in MainWindow.h } - connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), - this, SLOT( updatePlayPauseIcons() ) ); + connect( Engine::getSong(), SIGNAL(playbackStateChanged()), + this, SLOT(updatePlayPauseIcons())); connect(Engine::getSong(), SIGNAL(stopped()), SLOT(onSongStopped())); @@ -302,7 +302,7 @@ void MainWindow::finalize() menuBar()->addMenu( project_menu )->setText( tr( "&File" ) ); project_menu->addAction( embed::getIconPixmap( "project_new" ), tr( "&New" ), - this, SLOT( createNewProject() ), + this, SLOT(createNewProject()), QKeySequence::New ); auto templates_menu = new TemplatesMenu( this ); @@ -310,48 +310,48 @@ void MainWindow::finalize() project_menu->addAction( embed::getIconPixmap( "project_open" ), tr( "&Open..." ), - this, SLOT( openProject() ), + this, SLOT(openProject()), QKeySequence::Open ); project_menu->addMenu(new RecentProjectsMenu(this)); project_menu->addAction( embed::getIconPixmap( "project_save" ), tr( "&Save" ), - this, SLOT( saveProject() ), + this, SLOT(saveProject()), QKeySequence::Save ); project_menu->addAction( embed::getIconPixmap( "project_save" ), tr( "Save &As..." ), - this, SLOT( saveProjectAs() ), + this, SLOT(saveProjectAs()), Qt::CTRL + Qt::SHIFT + Qt::Key_S ); project_menu->addAction( embed::getIconPixmap( "project_save" ), tr( "Save as New &Version" ), - this, SLOT( saveProjectAsNewVersion() ), + this, SLOT(saveProjectAsNewVersion()), Qt::CTRL + Qt::ALT + Qt::Key_S ); project_menu->addAction( embed::getIconPixmap( "project_save" ), tr( "Save as default template" ), - this, SLOT( saveProjectAsDefaultTemplate() ) ); + this, SLOT(saveProjectAsDefaultTemplate())); project_menu->addSeparator(); project_menu->addAction( embed::getIconPixmap( "project_import" ), tr( "Import..." ), this, - SLOT( onImportProject() ) ); + SLOT(onImportProject())); project_menu->addAction( embed::getIconPixmap( "project_export" ), tr( "E&xport..." ), this, - SLOT( onExportProject() ), + SLOT(onExportProject()), Qt::CTRL + Qt::Key_E ); project_menu->addAction( embed::getIconPixmap( "project_export" ), tr( "E&xport Tracks..." ), this, - SLOT( onExportProjectTracks() ), + SLOT(onExportProjectTracks()), Qt::CTRL + Qt::SHIFT + Qt::Key_E ); project_menu->addAction( embed::getIconPixmap( "midi_file" ), tr( "Export &MIDI..." ), this, - SLOT( onExportProjectMidi() ), + SLOT(onExportProjectMidi()), Qt::CTRL + Qt::Key_M ); // Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071 @@ -359,7 +359,7 @@ void MainWindow::finalize() project_menu->addSeparator(); #endif project_menu->addAction( embed::getIconPixmap( "exit" ), tr( "&Quit" ), - qApp, SLOT( closeAllWindows() ), + qApp, SLOT(closeAllWindows()), Qt::CTRL + Qt::Key_Q ); @@ -367,32 +367,32 @@ void MainWindow::finalize() menuBar()->addMenu( edit_menu )->setText( tr( "&Edit" ) ); m_undoAction = edit_menu->addAction( embed::getIconPixmap( "edit_undo" ), tr( "Undo" ), - this, SLOT( undo() ), + this, SLOT(undo()), QKeySequence::Undo ); m_redoAction = edit_menu->addAction( embed::getIconPixmap( "edit_redo" ), tr( "Redo" ), - this, SLOT( redo() ), + this, SLOT(redo()), QKeySequence::Redo ); // Ensure that both (Ctrl+Y) and (Ctrl+Shift+Z) activate redo shortcut regardless of OS defaults if (QKeySequence(QKeySequence::Redo) != QKeySequence(Qt::CTRL + Qt::Key_Y)) { - new QShortcut( QKeySequence( Qt::CTRL + Qt::Key_Y ), this, SLOT(redo()) ); + new QShortcut( QKeySequence( Qt::CTRL + Qt::Key_Y ), this, SLOT(redo())); } if (QKeySequence(QKeySequence::Redo) != QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Z )) { - new QShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_Z ), this, SLOT(redo()) ); + new QShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_Z ), this, SLOT(redo())); } edit_menu->addSeparator(); edit_menu->addAction( embed::getIconPixmap( "setup_general" ), tr( "Settings" ), - this, SLOT( showSettingsDialog() ) ); - connect( edit_menu, SIGNAL(aboutToShow()), this, SLOT(updateUndoRedoButtons()) ); + this, SLOT(showSettingsDialog())); + connect( edit_menu, SIGNAL(aboutToShow()), this, SLOT(updateUndoRedoButtons())); m_viewMenu = new QMenu( this ); menuBar()->addMenu( m_viewMenu )->setText( tr( "&View" ) ); - connect( m_viewMenu, SIGNAL( aboutToShow() ), - this, SLOT( updateViewMenu() ) ); + connect( m_viewMenu, SIGNAL(aboutToShow()), + this, SLOT(updateViewMenu())); connect( m_viewMenu, SIGNAL(triggered(QAction*)), this, SLOT(updateConfig(QAction*))); @@ -407,8 +407,8 @@ void MainWindow::finalize() if( !m_toolsMenu->isEmpty() ) { menuBar()->addMenu( m_toolsMenu )->setText( tr( "&Tools" ) ); - connect( m_toolsMenu, SIGNAL( triggered( QAction * ) ), - this, SLOT( showTool( QAction * ) ) ); + connect( m_toolsMenu, SIGNAL(triggered(QAction*)), + this, SLOT(showTool(QAction*))); } @@ -420,13 +420,13 @@ void MainWindow::finalize() { help_menu->addAction( embed::getIconPixmap( "help" ), tr( "Online Help" ), - this, SLOT( browseHelp() ) ); + this, SLOT(browseHelp())); } else { help_menu->addAction( embed::getIconPixmap( "help" ), tr( "Help" ), - this, SLOT( help() ) ); + this, SLOT(help())); } // Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071 @@ -434,19 +434,19 @@ void MainWindow::finalize() help_menu->addSeparator(); #endif help_menu->addAction( embed::getIconPixmap( "icon_small" ), tr( "About" ), - this, SLOT( aboutLMMS() ) ); + this, SLOT(aboutLMMS())); // create tool-buttons ToolButton * project_new = new ToolButton( embed::getIconPixmap( "project_new" ), tr( "Create new project" ), - this, SLOT( createNewProject() ), + this, SLOT(createNewProject()), m_toolBar ); ToolButton * project_new_from_template = new ToolButton( embed::getIconPixmap( "project_new_from_template" ), tr( "Create new project from template" ), - this, SLOT( emptySlot() ), + this, SLOT(emptySlot()), m_toolBar ); project_new_from_template->setMenu( templates_menu ); project_new_from_template->setPopupMode( ToolButton::InstantPopup ); @@ -454,21 +454,21 @@ void MainWindow::finalize() ToolButton * project_open = new ToolButton( embed::getIconPixmap( "project_open" ), tr( "Open existing project" ), - this, SLOT( openProject() ), + this, SLOT(openProject()), m_toolBar ); ToolButton * project_open_recent = new ToolButton( embed::getIconPixmap( "project_open_recent" ), tr( "Recently opened projects" ), - this, SLOT( emptySlot() ), m_toolBar ); + this, SLOT(emptySlot()), m_toolBar ); project_open_recent->setMenu( new RecentProjectsMenu(this) ); project_open_recent->setPopupMode( ToolButton::InstantPopup ); ToolButton * project_save = new ToolButton( embed::getIconPixmap( "project_save" ), tr( "Save current project" ), - this, SLOT( saveProject() ), + this, SLOT(saveProject()), m_toolBar ); @@ -476,13 +476,13 @@ void MainWindow::finalize() embed::getIconPixmap( "project_export" ), tr( "Export current project" ), this, - SLOT( onExportProject() ), + SLOT(onExportProject()), m_toolBar ); m_metronomeToggle = new ToolButton( embed::getIconPixmap( "metronome" ), tr( "Metronome" ), - this, SLOT( onToggleMetronome() ), + this, SLOT(onToggleMetronome()), m_toolBar ); m_metronomeToggle->setCheckable(true); m_metronomeToggle->setChecked(Engine::audioEngine()->isMetronomeActive()); @@ -501,7 +501,7 @@ void MainWindow::finalize() ToolButton * song_editor_window = new ToolButton( embed::getIconPixmap( "songeditor" ), tr( "Song Editor" ) + " (Ctrl+1)", - this, SLOT( toggleSongEditorWin() ), + this, SLOT(toggleSongEditorWin()), m_toolBar ); song_editor_window->setShortcut( Qt::CTRL + Qt::Key_1 ); @@ -518,7 +518,7 @@ void MainWindow::finalize() embed::getIconPixmap( "piano" ), tr( "Piano Roll" ) + " (Ctrl+3)", - this, SLOT( togglePianoRollWin() ), + this, SLOT(togglePianoRollWin()), m_toolBar ); piano_roll_window->setShortcut( Qt::CTRL + Qt::Key_3 ); @@ -527,14 +527,14 @@ void MainWindow::finalize() tr( "Automation Editor" ) + " (Ctrl+4)", this, - SLOT( toggleAutomationEditorWin() ), + SLOT(toggleAutomationEditorWin()), m_toolBar ); automation_editor_window->setShortcut( Qt::CTRL + Qt::Key_4 ); ToolButton * mixer_window = new ToolButton( embed::getIconPixmap( "mixer" ), tr( "Mixer" ) + " (Ctrl+5)", - this, SLOT( toggleMixerWin() ), + this, SLOT(toggleMixerWin()), m_toolBar ); mixer_window->setShortcut( Qt::CTRL + Qt::Key_5 ); @@ -542,7 +542,7 @@ void MainWindow::finalize() embed::getIconPixmap( "controller" ), tr( "Show/hide controller rack" ) + " (Ctrl+6)", - this, SLOT( toggleControllerRack() ), + this, SLOT(toggleControllerRack()), m_toolBar ); controllers_window->setShortcut( Qt::CTRL + Qt::Key_6 ); @@ -550,7 +550,7 @@ void MainWindow::finalize() embed::getIconPixmap( "project_notes" ), tr( "Show/hide project notes" ) + " (Ctrl+7)", - this, SLOT( toggleProjectNotesWin() ), + this, SLOT(toggleProjectNotesWin()), m_toolBar ); project_notes_window->setShortcut( Qt::CTRL + Qt::Key_7 ); @@ -558,7 +558,7 @@ void MainWindow::finalize() embed::getIconPixmap( "microtuner" ), tr( "Microtuner configuration" ) + " (Ctrl+8)", - this, SLOT( toggleMicrotunerWin() ), + this, SLOT(toggleMicrotunerWin()), m_toolBar ); microtuner_window->setShortcut( Qt::CTRL + Qt::Key_8 ); @@ -616,7 +616,7 @@ void MainWindow::finalize() // reset window title every time we change the state of a subwindow to show the correct title for( const QMdiSubWindow * subWindow : workspace()->subWindowList() ) { - connect( subWindow, SIGNAL( windowStateChanged(Qt::WindowStates,Qt::WindowStates) ), this, SLOT( resetWindowTitle() ) ); + connect( subWindow, SIGNAL(windowStateChanged(Qt::WindowStates,Qt::WindowStates)), this, SLOT(resetWindowTitle())); } } @@ -1146,7 +1146,7 @@ void MainWindow::updateViewMenu() // not on top -> top <-> invisible m_viewMenu->addAction(embed::getIconPixmap( "songeditor" ), tr( "Song Editor" ) + "\tCtrl+1", - this, SLOT( toggleSongEditorWin() ) + this, SLOT(toggleSongEditorWin()) ); m_viewMenu->addAction(embed::getIconPixmap("pattern_track"), tr("Pattern Editor") + "\tCtrl+2", @@ -1154,35 +1154,35 @@ void MainWindow::updateViewMenu() ); m_viewMenu->addAction(embed::getIconPixmap( "piano" ), tr( "Piano Roll" ) + "\tCtrl+3", - this, SLOT( togglePianoRollWin() ) + this, SLOT(togglePianoRollWin()) ); m_viewMenu->addAction(embed::getIconPixmap( "automation" ), tr( "Automation Editor" ) + "\tCtrl+4", this, - SLOT( toggleAutomationEditorWin()) + SLOT(toggleAutomationEditorWin()) ); m_viewMenu->addAction(embed::getIconPixmap( "mixer" ), tr( "Mixer" ) + "\tCtrl+5", - this, SLOT( toggleMixerWin() ) + this, SLOT(toggleMixerWin()) ); m_viewMenu->addAction(embed::getIconPixmap( "controller" ), tr( "Controller Rack" ) + "\tCtrl+6", - this, SLOT( toggleControllerRack() ) + this, SLOT(toggleControllerRack()) ); m_viewMenu->addAction(embed::getIconPixmap( "project_notes" ), tr( "Project Notes" ) + "\tCtrl+7", - this, SLOT( toggleProjectNotesWin() ) + this, SLOT(toggleProjectNotesWin()) ); m_viewMenu->addAction(embed::getIconPixmap( "microtuner" ), tr( "Microtuner" ) + "\tCtrl+8", - this, SLOT( toggleMicrotunerWin() ) + this, SLOT(toggleMicrotunerWin()) ); m_viewMenu->addSeparator(); m_viewMenu->addAction(embed::getIconPixmap( "fullscreen" ), tr( "Fullscreen" ) + "\tF11", - this, SLOT( toggleFullscreen() ) + this, SLOT(toggleFullscreen()) ); m_viewMenu->addSeparator(); diff --git a/src/gui/MixerLine.cpp b/src/gui/MixerLine.cpp index bf63a9035..900298496 100644 --- a/src/gui/MixerLine.cpp +++ b/src/gui/MixerLine.cpp @@ -134,8 +134,8 @@ MixerLine::MixerLine( QWidget * _parent, MixerView * _mv, int _channelIndex ) : proxyWidget->setRotation( -90 ); proxyWidget->setPos( 8, 145 ); - connect( m_renameLineEdit, SIGNAL( editingFinished() ), this, SLOT( renameFinished() ) ); - connect( &Engine::mixer()->mixerChannel( m_channelIndex )->m_muteModel, SIGNAL( dataChanged() ), this, SLOT( update() ) ); + connect( m_renameLineEdit, SIGNAL(editingFinished()), this, SLOT(renameFinished())); + connect( &Engine::mixer()->mixerChannel( m_channelIndex )->m_muteModel, SIGNAL(dataChanged()), this, SLOT(update())); } @@ -251,18 +251,18 @@ void MixerLine::contextMenuEvent( QContextMenuEvent * ) QPointer contextMenu = new CaptionMenu( Engine::mixer()->mixerChannel( m_channelIndex )->m_name, this ); if( m_channelIndex != 0 ) // no move-options in master { - contextMenu->addAction( tr( "Move &left" ), this, SLOT( moveChannelLeft() ) ); - contextMenu->addAction( tr( "Move &right" ), this, SLOT( moveChannelRight() ) ); + contextMenu->addAction( tr( "Move &left" ), this, SLOT(moveChannelLeft())); + contextMenu->addAction( tr( "Move &right" ), this, SLOT(moveChannelRight())); } - contextMenu->addAction( tr( "Rename &channel" ), this, SLOT( renameChannel() ) ); + contextMenu->addAction( tr( "Rename &channel" ), this, SLOT(renameChannel())); contextMenu->addSeparator(); if( m_channelIndex != 0 ) // no remove-option in master { - contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "R&emove channel" ), this, SLOT( removeChannel() ) ); + contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "R&emove channel" ), this, SLOT(removeChannel())); contextMenu->addSeparator(); } - contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "Remove &unused channels" ), this, SLOT( removeUnusedChannels() ) ); + contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "Remove &unused channels" ), this, SLOT(removeUnusedChannels())); contextMenu->addSeparator(); QMenu colorMenu(tr("Color"), this); diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index 5368fcf7d..6e3d9f95a 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -134,7 +134,7 @@ MixerView::MixerView() : QPushButton * newChannelBtn = new QPushButton( embed::getIconPixmap( "new_channel" ), QString(), this ); newChannelBtn->setObjectName( "newChannelBtn" ); newChannelBtn->setFixedSize( mixerLineSize ); - connect( newChannelBtn, SIGNAL( clicked() ), this, SLOT( addNewChannel() ) ); + connect( newChannelBtn, SIGNAL(clicked()), this, SLOT(addNewChannel())); ml->addWidget( newChannelBtn, 0, Qt::AlignTop ); @@ -147,8 +147,8 @@ MixerView::MixerView() : updateGeometry(); // timer for updating faders - connect( getGUI()->mainWindow(), SIGNAL( periodicUpdate() ), - this, SLOT( updateFaders() ) ); + connect( getGUI()->mainWindow(), SIGNAL(periodicUpdate()), + this, SLOT(updateFaders())); // add ourself to workspace @@ -311,7 +311,7 @@ MixerView::MixerChannelView::MixerChannelView(QWidget * _parent, MixerView * _mv embed::getIconPixmap( "led_off" ) ); m_soloBtn->setCheckable( true ); m_soloBtn->move( 9, m_fader->y()-21); - connect(&mixerChannel->m_soloModel, SIGNAL( dataChanged() ), + connect(&mixerChannel->m_soloModel, SIGNAL(dataChanged()), _mv, SLOT ( toggledSolo() ), Qt::DirectConnection ); m_soloBtn->setToolTip(tr("Solo this channel")); diff --git a/src/gui/ModelView.cpp b/src/gui/ModelView.cpp index 4ccdffd72..b2536fd9c 100644 --- a/src/gui/ModelView.cpp +++ b/src/gui/ModelView.cpp @@ -90,8 +90,8 @@ void ModelView::doConnections() { if( m_model != nullptr ) { - QObject::connect( m_model, SIGNAL( dataChanged() ), widget(), SLOT( update() ) ); - QObject::connect( m_model, SIGNAL( propertiesChanged() ), widget(), SLOT( update() ) ); + QObject::connect( m_model, SIGNAL(dataChanged()), widget(), SLOT(update())); + QObject::connect( m_model, SIGNAL(propertiesChanged()), widget(), SLOT(update())); } } diff --git a/src/gui/PluginBrowser.cpp b/src/gui/PluginBrowser.cpp index 2fd1374da..d6ba73903 100644 --- a/src/gui/PluginBrowser.cpp +++ b/src/gui/PluginBrowser.cpp @@ -74,8 +74,8 @@ PluginBrowser::PluginBrowser( QWidget * _parent ) : m_descTree->setIndentation( 10 ); m_descTree->setSelectionMode( QAbstractItemView::NoSelection ); - connect( searchBar, SIGNAL( textEdited( const QString & ) ), - this, SLOT( onFilterChanged( const QString & ) ) ); + connect( searchBar, SIGNAL( textEdited( const QString& ) ), + this, SLOT( onFilterChanged( const QString& ) ) ); view_layout->addWidget( hint ); view_layout->addWidget( searchBar ); diff --git a/src/gui/ProjectNotes.cpp b/src/gui/ProjectNotes.cpp index 9a218c571..22e806cdb 100644 --- a/src/gui/ProjectNotes.cpp +++ b/src/gui/ProjectNotes.cpp @@ -61,12 +61,12 @@ ProjectNotes::ProjectNotes() : clear(); connect( m_edit, - SIGNAL( currentCharFormatChanged( const QTextCharFormat & ) ), - this, SLOT( formatChanged( const QTextCharFormat & ) ) ); -// connect( m_edit, SIGNAL( currentAlignmentChanged( int ) ), -// this, SLOT( alignmentChanged( int ) ) ); - connect( m_edit, SIGNAL( textChanged() ), - Engine::getSong(), SLOT( setModified() ) ); + SIGNAL( currentCharFormatChanged( const QTextCharFormat& ) ), + this, SLOT( formatChanged( const QTextCharFormat& ) ) ); +// connect( m_edit, SIGNAL(currentAlignmentChanged(int)), +// this, SLOT(alignmentChanged(int))); + connect( m_edit, SIGNAL(textChanged()), + Engine::getSong(), SLOT(setModified())); setupActions(); @@ -120,31 +120,31 @@ void ProjectNotes::setupActions() a = new QAction( embed::getIconPixmap( "edit_undo" ), tr( "&Undo" ), this ); a->setShortcut( tr( "%1+Z" ).arg(UI_CTRL_KEY) ); - connect( a, SIGNAL( triggered() ), m_edit, SLOT( undo() ) ); + connect( a, SIGNAL(triggered()), m_edit, SLOT(undo())); tb->addAction( a ); a = new QAction( embed::getIconPixmap( "edit_redo" ), tr( "&Redo" ), this ); a->setShortcut( tr( "%1+Y" ).arg(UI_CTRL_KEY) ); - connect( a, SIGNAL( triggered() ), m_edit, SLOT( redo() ) ); + connect( a, SIGNAL(triggered()), m_edit, SLOT(redo())); tb->addAction( a ); a = new QAction( embed::getIconPixmap( "edit_copy" ), tr( "&Copy" ), this ); a->setShortcut( tr( "%1+C" ).arg(UI_CTRL_KEY) ); - connect( a, SIGNAL( triggered() ), m_edit, SLOT( copy() ) ); + connect( a, SIGNAL(triggered()), m_edit, SLOT(copy())); tb->addAction( a ); a = new QAction( embed::getIconPixmap( "edit_cut" ), tr( "Cu&t" ), this ); a->setShortcut( tr( "%1+X" ).arg(UI_CTRL_KEY) ); - connect( a, SIGNAL( triggered() ), m_edit, SLOT( cut() ) ); + connect( a, SIGNAL(triggered()), m_edit, SLOT(cut())); tb->addAction( a ); a = new QAction( embed::getIconPixmap( "edit_paste" ), tr( "&Paste" ), this ); a->setShortcut( tr( "%1+V" ).arg(UI_CTRL_KEY) ); - connect( a, SIGNAL( triggered() ), m_edit, SLOT( paste() ) ); + connect( a, SIGNAL(triggered()), m_edit, SLOT(paste())); tb->addAction( a ); @@ -154,8 +154,8 @@ void ProjectNotes::setupActions() m_comboFont->setEditable( true ); QFontDatabase db; m_comboFont->addItems( db.families() ); - connect( m_comboFont, SIGNAL( activated( const QString & ) ), - m_edit, SLOT( setFontFamily( const QString & ) ) ); + connect( m_comboFont, SIGNAL( activated( const QString& ) ), + m_edit, SLOT( setFontFamily( const QString& ) ) ); m_comboFont->lineEdit()->setText( QApplication::font().family() ); m_comboSize = new QComboBox( tb ); @@ -166,8 +166,8 @@ void ProjectNotes::setupActions() { m_comboSize->addItem( QString::number( *it ) ); } - connect( m_comboSize, SIGNAL( activated( const QString & ) ), - this, SLOT( textSize( const QString & ) ) ); + connect( m_comboSize, SIGNAL( activated( const QString& ) ), + this, SLOT( textSize( const QString& ) ) ); m_comboSize->lineEdit()->setText( QString::number( QApplication::font().pointSize() ) ); @@ -175,28 +175,28 @@ void ProjectNotes::setupActions() tr( "&Bold" ), this ); m_actionTextBold->setShortcut( tr( "%1+B" ).arg(UI_CTRL_KEY) ); m_actionTextBold->setCheckable( true ); - connect( m_actionTextBold, SIGNAL( triggered() ), this, - SLOT( textBold() ) ); + connect( m_actionTextBold, SIGNAL(triggered()), this, + SLOT(textBold())); m_actionTextItalic = new QAction( embed::getIconPixmap( "text_italic" ), tr( "&Italic" ), this ); m_actionTextItalic->setShortcut( tr( "%1+I" ).arg(UI_CTRL_KEY) ); m_actionTextItalic->setCheckable( true ); - connect( m_actionTextItalic, SIGNAL( triggered() ), this, - SLOT( textItalic() ) ); + connect( m_actionTextItalic, SIGNAL(triggered()), this, + SLOT(textItalic())); m_actionTextUnderline = new QAction( embed::getIconPixmap( "text_under" ), tr( "&Underline" ), this ); m_actionTextUnderline->setShortcut( tr( "%1+U" ).arg(UI_CTRL_KEY) ); m_actionTextUnderline->setCheckable( true ); - connect( m_actionTextUnderline, SIGNAL( triggered() ), this, - SLOT( textUnderline() ) ); + connect( m_actionTextUnderline, SIGNAL(triggered()), this, + SLOT(textUnderline())); QActionGroup * grp = new QActionGroup( tb ); - connect( grp, SIGNAL( triggered( QAction * ) ), this, - SLOT( textAlign( QAction * ) ) ); + connect( grp, SIGNAL(triggered(QAction*)), this, + SLOT(textAlign(QAction*))); m_actionAlignLeft = new QAction( embed::getIconPixmap( "text_left" ), tr( "&Left" ), m_edit ); @@ -230,8 +230,8 @@ void ProjectNotes::setupActions() QPixmap pix( 16, 16 ); pix.fill( Qt::black ); m_actionTextColor = new QAction( pix, tr( "&Color..." ), this ); - connect( m_actionTextColor, SIGNAL( triggered() ), this, - SLOT( textColor() ) ); + connect( m_actionTextColor, SIGNAL(triggered()), this, + SLOT(textColor())); tb->addWidget( m_comboFont ); tb->addWidget( m_comboSize ); diff --git a/src/gui/SampleTrackWindow.cpp b/src/gui/SampleTrackWindow.cpp index 1aee88082..c8901dda2 100644 --- a/src/gui/SampleTrackWindow.cpp +++ b/src/gui/SampleTrackWindow.cpp @@ -75,8 +75,8 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) : // setup line edit for changing sample track name m_nameLineEdit = new QLineEdit; m_nameLineEdit->setFont(pointSize<9>(m_nameLineEdit->font())); - connect(m_nameLineEdit, SIGNAL(textChanged(const QString &)), - this, SLOT(textChanged(const QString &))); + connect(m_nameLineEdit, SIGNAL(textChanged(const QString&)), + this, SLOT(textChanged(const QString&))); m_nameLineEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred)); nameLayout->addWidget(m_nameLineEdit); diff --git a/src/gui/SideBar.cpp b/src/gui/SideBar.cpp index 0eca4d9f8..e16367a7b 100644 --- a/src/gui/SideBar.cpp +++ b/src/gui/SideBar.cpp @@ -94,8 +94,8 @@ SideBar::SideBar( Qt::Orientation _orientation, QWidget * _parent ) : setIconSize( QSize( 16, 16 ) ); m_btnGroup.setExclusive( false ); - connect( &m_btnGroup, SIGNAL( buttonClicked( QAbstractButton * ) ), - this, SLOT( toggleButton( QAbstractButton * ) ) ); + connect( &m_btnGroup, SIGNAL(buttonClicked(QAbstractButton*)), + this, SLOT(toggleButton(QAbstractButton*))); } diff --git a/src/gui/SubWindow.cpp b/src/gui/SubWindow.cpp index add614670..78e4f586c 100644 --- a/src/gui/SubWindow.cpp +++ b/src/gui/SubWindow.cpp @@ -63,7 +63,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : m_closeBtn->setCursor( Qt::ArrowCursor ); m_closeBtn->setAttribute( Qt::WA_NoMousePropagation ); m_closeBtn->setToolTip( tr( "Close" ) ); - connect( m_closeBtn, SIGNAL( clicked( bool ) ), this, SLOT( close() ) ); + connect( m_closeBtn, SIGNAL(clicked(bool)), this, SLOT(close())); m_maximizeBtn = new QPushButton( embed::getIconPixmap( "maximize" ), QString(), this ); m_maximizeBtn->resize( m_buttonSize ); @@ -71,7 +71,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : m_maximizeBtn->setCursor( Qt::ArrowCursor ); m_maximizeBtn->setAttribute( Qt::WA_NoMousePropagation ); m_maximizeBtn->setToolTip( tr( "Maximize" ) ); - connect( m_maximizeBtn, SIGNAL( clicked( bool ) ), this, SLOT( showMaximized() ) ); + connect( m_maximizeBtn, SIGNAL(clicked(bool)), this, SLOT(showMaximized())); m_restoreBtn = new QPushButton( embed::getIconPixmap( "restore" ), QString(), this ); m_restoreBtn->resize( m_buttonSize ); @@ -79,7 +79,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : m_restoreBtn->setCursor( Qt::ArrowCursor ); m_restoreBtn->setAttribute( Qt::WA_NoMousePropagation ); m_restoreBtn->setToolTip( tr( "Restore" ) ); - connect( m_restoreBtn, SIGNAL( clicked( bool ) ), this, SLOT( showNormal() ) ); + connect( m_restoreBtn, SIGNAL(clicked(bool)), this, SLOT(showNormal())); // QLabel for the window title and the shadow effect m_shadow = new QGraphicsDropShadowEffect(); @@ -96,7 +96,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : setWindowFlags( Qt::SubWindow | Qt::WindowMaximizeButtonHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint ); - connect( mdiArea(), SIGNAL( subWindowActivated( QMdiSubWindow* ) ), this, SLOT( focusChanged( QMdiSubWindow* ) ) ); + connect( mdiArea(), SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(focusChanged(QMdiSubWindow*))); } diff --git a/src/gui/clips/AutomationClipView.cpp b/src/gui/clips/AutomationClipView.cpp index b87e7e097..2bc29184c 100644 --- a/src/gui/clips/AutomationClipView.cpp +++ b/src/gui/clips/AutomationClipView.cpp @@ -52,10 +52,10 @@ AutomationClipView::AutomationClipView( AutomationClip * _clip, m_clip( _clip ), m_paintPixmap() { - connect( m_clip, SIGNAL( dataChanged() ), - this, SLOT( update() ) ); - connect( getGUI()->automationEditor(), SIGNAL( currentClipChanged() ), - this, SLOT( update() ) ); + connect( m_clip, SIGNAL(dataChanged()), + this, SLOT(update())); + connect( getGUI()->automationEditor(), SIGNAL(currentClipChanged()), + this, SLOT(update())); setAttribute( Qt::WA_OpaquePaintEvent, true ); @@ -182,23 +182,23 @@ void AutomationClipView::constructContextMenu( QMenu * _cm ) _cm->addSeparator(); _cm->addAction( embed::getIconPixmap( "edit_erase" ), - tr( "Clear" ), m_clip, SLOT( clear() ) ); + tr( "Clear" ), m_clip, SLOT(clear())); _cm->addSeparator(); _cm->addAction( embed::getIconPixmap( "reload" ), tr( "Reset name" ), - this, SLOT( resetName() ) ); + this, SLOT(resetName())); _cm->addAction( embed::getIconPixmap( "edit_rename" ), tr( "Change name" ), - this, SLOT( changeName() ) ); + this, SLOT(changeName())); _cm->addAction( embed::getIconPixmap( "record" ), tr( "Set/clear record" ), - this, SLOT( toggleRecording() ) ); + this, SLOT(toggleRecording())); _cm->addAction( embed::getIconPixmap( "flip_y" ), tr( "Flip Vertically (Visible)" ), - this, SLOT( flipY() ) ); + this, SLOT(flipY())); _cm->addAction( embed::getIconPixmap( "flip_x" ), tr( "Flip Horizontally (Visible)" ), - this, SLOT( flipX() ) ); + this, SLOT(flipX())); if( !m_clip->m_objects.isEmpty() ) { _cm->addSeparator(); @@ -216,8 +216,8 @@ void AutomationClipView::constructContextMenu( QMenu * _cm ) m->addAction( a ); } } - connect( m, SIGNAL( triggered( QAction * ) ), - this, SLOT( disconnectObject( QAction * ) ) ); + connect( m, SIGNAL(triggered(QAction*)), + this, SLOT(disconnectObject(QAction*))); _cm->addMenu( m ); } } diff --git a/src/gui/clips/ClipView.cpp b/src/gui/clips/ClipView.cpp index a9afca910..4748986ac 100644 --- a/src/gui/clips/ClipView.cpp +++ b/src/gui/clips/ClipView.cpp @@ -121,12 +121,12 @@ ClipView::ClipView( Clip * clip, setAcceptDrops( true ); setMouseTracking( true ); - connect( m_clip, SIGNAL( lengthChanged() ), - this, SLOT( updateLength() ) ); - connect( getGUI()->songEditor()->m_editor->zoomingModel(), SIGNAL( dataChanged() ), this, SLOT( updateLength() ) ); - connect( m_clip, SIGNAL( positionChanged() ), - this, SLOT( updatePosition() ) ); - connect( m_clip, SIGNAL( destroyedClip() ), this, SLOT( close() ) ); + connect( m_clip, SIGNAL(lengthChanged()), + this, SLOT(updateLength())); + connect( getGUI()->songEditor()->m_editor->zoomingModel(), SIGNAL(dataChanged()), this, SLOT(updateLength())); + connect( m_clip, SIGNAL(positionChanged()), + this, SLOT(updatePosition())); + connect( m_clip, SIGNAL(destroyedClip()), this, SLOT(close())); setModel( m_clip ); connect(m_clip, SIGNAL(colorChanged()), this, SLOT(update())); diff --git a/src/gui/clips/MidiClipView.cpp b/src/gui/clips/MidiClipView.cpp index 355363a01..675b350db 100644 --- a/src/gui/clips/MidiClipView.cpp +++ b/src/gui/clips/MidiClipView.cpp @@ -52,8 +52,8 @@ MidiClipView::MidiClipView( MidiClip* clip, TrackView* parent ) : // TODO if this option is ever added to the GUI, rename it to legacysepattern m_legacySEPattern(ConfigManager::inst()->value("ui", "legacysebb", "0").toInt()) { - connect( getGUI()->pianoRoll(), SIGNAL( currentMidiClipChanged() ), - this, SLOT( update() ) ); + connect( getGUI()->pianoRoll(), SIGNAL(currentMidiClipChanged()), + this, SLOT(update())); if( s_stepBtnOn0 == nullptr ) { @@ -149,38 +149,38 @@ void MidiClipView::constructContextMenu( QMenu * _cm ) QAction * a = new QAction( embed::getIconPixmap( "piano" ), tr( "Open in piano-roll" ), _cm ); _cm->insertAction( _cm->actions()[0], a ); - connect( a, SIGNAL( triggered( bool ) ), - this, SLOT( openInPianoRoll() ) ); + connect( a, SIGNAL(triggered(bool)), + this, SLOT(openInPianoRoll())); QAction * b = new QAction( embed::getIconPixmap( "ghost_note" ), tr( "Set as ghost in piano-roll" ), _cm ); if( m_clip->empty() ) { b->setEnabled( false ); } _cm->insertAction( _cm->actions()[1], b ); - connect( b, SIGNAL( triggered( bool ) ), - this, SLOT( setGhostInPianoRoll() ) ); + connect( b, SIGNAL(triggered(bool)), + this, SLOT(setGhostInPianoRoll())); _cm->insertSeparator( _cm->actions()[2] ); _cm->addSeparator(); _cm->addAction( embed::getIconPixmap( "edit_erase" ), - tr( "Clear all notes" ), m_clip, SLOT( clear() ) ); + tr( "Clear all notes" ), m_clip, SLOT(clear())); _cm->addSeparator(); _cm->addAction( embed::getIconPixmap( "reload" ), tr( "Reset name" ), - this, SLOT( resetName() ) ); + this, SLOT(resetName())); _cm->addAction( embed::getIconPixmap( "edit_rename" ), tr( "Change name" ), - this, SLOT( changeName() ) ); + this, SLOT(changeName())); if ( m_clip->type() == MidiClip::BeatClip ) { _cm->addSeparator(); _cm->addAction( embed::getIconPixmap( "step_btn_add" ), - tr( "Add steps" ), m_clip, SLOT( addSteps() ) ); + tr( "Add steps" ), m_clip, SLOT(addSteps())); _cm->addAction( embed::getIconPixmap( "step_btn_remove" ), - tr( "Remove steps" ), m_clip, SLOT( removeSteps() ) ); + tr( "Remove steps" ), m_clip, SLOT(removeSteps())); _cm->addAction( embed::getIconPixmap( "step_btn_duplicate" ), - tr( "Clone Steps" ), m_clip, SLOT( cloneSteps() ) ); + tr( "Clone Steps" ), m_clip, SLOT(cloneSteps())); } } diff --git a/src/gui/clips/PatternClipView.cpp b/src/gui/clips/PatternClipView.cpp index 3884b3eb6..f65595f52 100644 --- a/src/gui/clips/PatternClipView.cpp +++ b/src/gui/clips/PatternClipView.cpp @@ -44,8 +44,8 @@ PatternClipView::PatternClipView(Clip* _clip, TrackView* _tv) : m_patternClip(dynamic_cast(_clip)), m_paintPixmap() { - connect( _clip->getTrack(), SIGNAL( dataChanged() ), - this, SLOT( update() ) ); + connect( _clip->getTrack(), SIGNAL(dataChanged()), + this, SLOT(update())); setStyle( QApplication::style() ); } @@ -56,15 +56,15 @@ void PatternClipView::constructContextMenu(QMenu* _cm) tr("Open in Pattern Editor"), _cm ); _cm->insertAction( _cm->actions()[0], a ); - connect( a, SIGNAL( triggered( bool ) ), - this, SLOT( openInPatternEditor() ) ); + connect( a, SIGNAL(triggered(bool)), + this, SLOT(openInPatternEditor())); _cm->insertSeparator( _cm->actions()[1] ); _cm->addSeparator(); _cm->addAction( embed::getIconPixmap( "reload" ), tr( "Reset name" ), - this, SLOT( resetName() ) ); + this, SLOT(resetName())); _cm->addAction( embed::getIconPixmap( "edit_rename" ), tr( "Change name" ), - this, SLOT( changeName() ) ); + this, SLOT(changeName())); } diff --git a/src/gui/clips/SampleClipView.cpp b/src/gui/clips/SampleClipView.cpp index d2fe7cbaa..5b3228de7 100644 --- a/src/gui/clips/SampleClipView.cpp +++ b/src/gui/clips/SampleClipView.cpp @@ -74,7 +74,7 @@ void SampleClipView::constructContextMenu(QMenu* cm) /*contextMenu.addAction( embed::getIconPixmap( "record" ), tr( "Set/clear record" ), - m_clip, SLOT( toggleRecord() ) );*/ + m_clip, SLOT(toggleRecord()));*/ cm->addAction( embed::getIconPixmap("flip_x"), diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index 8f8cdd570..fba88643e 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -110,11 +110,11 @@ AutomationEditor::AutomationEditor() : m_crossColor(0, 0, 0), m_backgroundShade(0, 0, 0) { - connect( this, SIGNAL( currentClipChanged() ), - this, SLOT( updateAfterClipChange() ), + connect( this, SIGNAL(currentClipChanged()), + this, SLOT(updateAfterClipChange()), Qt::QueuedConnection ); - connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), - this, SLOT( update() ) ); + connect( Engine::getSong(), SIGNAL(timeSignatureChanged(int,int)), + this, SLOT(update())); setAttribute( Qt::WA_OpaquePaintEvent, true ); @@ -122,15 +122,15 @@ AutomationEditor::AutomationEditor() : setLayoutDirection( Qt::LeftToRight ); m_tensionModel = new FloatModel(1.0, 0.0, 1.0, 0.01); - connect( m_tensionModel, SIGNAL( dataChanged() ), - this, SLOT( setTension() ) ); + connect( m_tensionModel, SIGNAL(dataChanged()), + this, SLOT(setTension())); for (auto q : Quantizations) { m_quantizeModel.addItem(QString("1/%1").arg(q)); } - connect( &m_quantizeModel, SIGNAL(dataChanged() ), - this, SLOT( setQuantization() ) ); + connect( &m_quantizeModel, SIGNAL(dataChanged()), + this, SLOT(setQuantization())); m_quantizeModel.setValue( m_quantizeModel.findText( "1/8" ) ); if (s_toolYFlip == nullptr) @@ -150,22 +150,22 @@ AutomationEditor::AutomationEditor() : Song::Mode_PlayAutomationClip ), m_currentPosition, Song::Mode_PlayAutomationClip, this ); - connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), - m_timeLine, SLOT( updatePosition( const lmms::TimePos & ) ) ); - connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos & ) ), - this, SLOT( updatePosition( const lmms::TimePos & ) ) ); + connect( this, SIGNAL( positionChanged( const lmms::TimePos& ) ), + m_timeLine, SLOT( updatePosition( const lmms::TimePos& ) ) ); + connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos& ) ), + this, SLOT( updatePosition( const lmms::TimePos& ) ) ); // init scrollbars m_leftRightScroll = new QScrollBar( Qt::Horizontal, this ); m_leftRightScroll->setSingleStep( 1 ); - connect( m_leftRightScroll, SIGNAL( valueChanged( int ) ), this, - SLOT( horScrolled( int ) ) ); + connect( m_leftRightScroll, SIGNAL(valueChanged(int)), this, + SLOT(horScrolled(int))); m_topBottomScroll = new QScrollBar( Qt::Vertical, this ); m_topBottomScroll->setSingleStep( 1 ); m_topBottomScroll->setPageStep( 20 ); - connect( m_topBottomScroll, SIGNAL( valueChanged( int ) ), this, - SLOT( verScrolled( int ) ) ); + connect( m_topBottomScroll, SIGNAL(valueChanged(int)), this, + SLOT(verScrolled(int))); // init pixmaps if (s_toolDraw == nullptr) @@ -1914,8 +1914,8 @@ AutomationEditorWindow::AutomationEditorWindow() : m_zoomingXComboBox->setModel( &m_editor->m_zoomingXModel ); - connect( &m_editor->m_zoomingXModel, SIGNAL( dataChanged() ), - m_editor, SLOT( zoomingXChanged() ) ); + connect( &m_editor->m_zoomingXModel, SIGNAL(dataChanged()), + m_editor, SLOT(zoomingXChanged())); QLabel * zoom_y_label = new QLabel( zoomToolBar ); @@ -1934,8 +1934,8 @@ AutomationEditorWindow::AutomationEditorWindow() : m_zoomingYComboBox->setModel( &m_editor->m_zoomingYModel ); - connect( &m_editor->m_zoomingYModel, SIGNAL( dataChanged() ), - m_editor, SLOT( zoomingYChanged() ) ); + connect( &m_editor->m_zoomingYModel, SIGNAL(dataChanged()), + m_editor, SLOT(zoomingYChanged())); zoomToolBar->addWidget( zoom_x_label ); zoomToolBar->addWidget( m_zoomingXComboBox ); @@ -2014,7 +2014,7 @@ void AutomationEditorWindow::setCurrentClip(AutomationClip* clip) if (clip) { connect(clip, SIGNAL(dataChanged()), this, SLOT(update())); - connect( clip, SIGNAL( dataChanged() ), this, SLOT( updateWindowTitle() ) ); + connect( clip, SIGNAL(dataChanged()), this, SLOT(updateWindowTitle())); connect(clip, SIGNAL(destroyed()), this, SLOT(clearCurrentClip())); connect(m_flipXAction, SIGNAL(triggered()), clip, SLOT(flipX())); diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index fd1cd0480..b9f0e1397 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -251,8 +251,8 @@ PianoRoll::PianoRoll() : markScaleAction->setEnabled( false ); markChordAction->setEnabled( false ); - connect( this, SIGNAL(semiToneMarkerMenuScaleSetEnabled(bool)), markScaleAction, SLOT(setEnabled(bool)) ); - connect( this, SIGNAL(semiToneMarkerMenuChordSetEnabled(bool)), markChordAction, SLOT(setEnabled(bool)) ); + connect( this, SIGNAL(semiToneMarkerMenuScaleSetEnabled(bool)), markScaleAction, SLOT(setEnabled(bool))); + connect( this, SIGNAL(semiToneMarkerMenuChordSetEnabled(bool)), markChordAction, SLOT(setEnabled(bool))); m_semiToneMarkerMenu->addAction( markSemitoneAction ); m_semiToneMarkerMenu->addAction( markAllOctaveSemitonesAction ); @@ -301,42 +301,42 @@ PianoRoll::PianoRoll() : Song::Mode_PlayMidiClip ), m_currentPosition, Song::Mode_PlayMidiClip, this ); - connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), - m_timeLine, SLOT( updatePosition( const lmms::TimePos & ) ) ); - connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos & ) ), - this, SLOT( updatePosition( const lmms::TimePos & ) ) ); + connect( this, SIGNAL( positionChanged( const lmms::TimePos& ) ), + m_timeLine, SLOT( updatePosition( const lmms::TimePos& ) ) ); + connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos& ) ), + this, SLOT( updatePosition( const lmms::TimePos& ) ) ); // white position line follows timeline marker m_positionLine = new PositionLine(this); //update timeline when in step-recording mode - connect( &m_stepRecorderWidget, SIGNAL( positionChanged( const lmms::TimePos & ) ), - this, SLOT( updatePositionStepRecording( const lmms::TimePos & ) ) ); + connect( &m_stepRecorderWidget, SIGNAL( positionChanged( const lmms::TimePos& ) ), + this, SLOT( updatePositionStepRecording( const lmms::TimePos& ) ) ); // update timeline when in record-accompany mode connect( Engine::getSong()->getPlayPos( Song::Mode_PlaySong ).m_timeLine, - SIGNAL( positionChanged( const lmms::TimePos & ) ), + SIGNAL( positionChanged( const lmms::TimePos& ) ), this, - SLOT( updatePositionAccompany( const lmms::TimePos & ) ) ); + SLOT( updatePositionAccompany( const lmms::TimePos& ) ) ); // TODO /* connect( engine::getSong()->getPlayPos( Song::Mode_PlayPattern ).m_timeLine, - SIGNAL( positionChanged( const lmms::TimePos & ) ), + SIGNAL( positionChanged( const lmms::TimePos& ) ), this, - SLOT( updatePositionAccompany( const lmms::TimePos & ) ) );*/ + SLOT( updatePositionAccompany( const lmms::TimePos& ) ) );*/ removeSelection(); // init scrollbars m_leftRightScroll = new QScrollBar( Qt::Horizontal, this ); m_leftRightScroll->setSingleStep( 1 ); - connect( m_leftRightScroll, SIGNAL( valueChanged( int ) ), this, - SLOT( horScrolled( int ) ) ); + connect( m_leftRightScroll, SIGNAL(valueChanged(int)), this, + SLOT(horScrolled(int))); m_topBottomScroll = new QScrollBar( Qt::Vertical, this ); m_topBottomScroll->setSingleStep( 1 ); m_topBottomScroll->setPageStep( 20 ); - connect( m_topBottomScroll, SIGNAL( valueChanged( int ) ), this, - SLOT( verScrolled( int ) ) ); + connect( m_topBottomScroll, SIGNAL(valueChanged(int)), this, + SLOT(verScrolled(int))); // setup zooming-stuff for( float const & zoomLevel : m_zoomLevels ) @@ -344,8 +344,8 @@ PianoRoll::PianoRoll() : m_zoomingModel.addItem( QString( "%1\%" ).arg( zoomLevel * 100 ) ); } m_zoomingModel.setValue( m_zoomingModel.findText( "100%" ) ); - connect( &m_zoomingModel, SIGNAL( dataChanged() ), - this, SLOT( zoomingChanged() ) ); + connect( &m_zoomingModel, SIGNAL(dataChanged()), + this, SLOT(zoomingChanged())); // zoom y for (float const & zoomLevel : m_zoomYLevels) @@ -363,8 +363,8 @@ PianoRoll::PianoRoll() : } m_quantizeModel.setValue( m_quantizeModel.findText( "1/16" ) ); - connect( &m_quantizeModel, SIGNAL( dataChanged() ), - this, SLOT( quantizeChanged() ) ); + connect( &m_quantizeModel, SIGNAL(dataChanged()), + this, SLOT(quantizeChanged())); // Set up note length model m_noteLenModel.addItem( tr( "Last note" ), @@ -387,8 +387,8 @@ PianoRoll::PianoRoll() : m_noteLenModel.setValue( 0 ); // Note length change can cause a redraw if Q is set to lock - connect( &m_noteLenModel, SIGNAL( dataChanged() ), - this, SLOT( noteLengthChanged() ) ); + connect( &m_noteLenModel, SIGNAL(dataChanged()), + this, SLOT(noteLengthChanged())); // Set up key selection dropdown m_keyModel.addItem(tr("No key")); @@ -414,8 +414,8 @@ PianoRoll::PianoRoll() : // connect scale change to key change so it auto-highlights with scale as well connect(&m_scaleModel, &ComboBoxModel::dataChanged, this, &PianoRoll::keyChanged); // change can update m_semiToneMarkerMenu - connect( &m_scaleModel, SIGNAL( dataChanged() ), - this, SLOT( updateSemiToneMarkerMenu() ) ); + connect( &m_scaleModel, SIGNAL(dataChanged()), + this, SLOT(updateSemiToneMarkerMenu())); // Set up chord model m_chordModel.addItem( tr("No chord") ); @@ -430,22 +430,22 @@ PianoRoll::PianoRoll() : m_chordModel.setValue( 0 ); // change can update m_semiToneMarkerMenu - connect( &m_chordModel, SIGNAL( dataChanged() ), - this, SLOT( updateSemiToneMarkerMenu() ) ); + connect( &m_chordModel, SIGNAL(dataChanged()), + this, SLOT(updateSemiToneMarkerMenu())); setFocusPolicy( Qt::StrongFocus ); setFocus(); setMouseTracking( true ); - connect( &m_scaleModel, SIGNAL( dataChanged() ), - this, SLOT( updateSemiToneMarkerMenu() ) ); + connect( &m_scaleModel, SIGNAL(dataChanged()), + this, SLOT(updateSemiToneMarkerMenu())); - connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), - this, SLOT( update() ) ); + connect( Engine::getSong(), SIGNAL(timeSignatureChanged(int,int)), + this, SLOT(update())); //connection for selecion from timeline - connect( m_timeLine, SIGNAL( regionSelectedFromPixels( int, int ) ), - this, SLOT( selectRegionFromPixels( int, int ) ) ); + connect( m_timeLine, SIGNAL(regionSelectedFromPixels(int,int)), + this, SLOT(selectRegionFromPixels(int,int))); // Set up snap model m_snapModel.addItem(tr("Nudge")); @@ -913,12 +913,12 @@ void PianoRoll::setCurrentMidiClip( MidiClip* newMidiClip ) resizeEvent( nullptr ); // make sure to always get informed about the MIDI clip being destroyed - connect( m_midiClip, SIGNAL( destroyedMidiClip( lmms::MidiClip* ) ), this, SLOT( hideMidiClip( lmms::MidiClip* ) ) ); + connect( m_midiClip, SIGNAL(destroyedMidiClip(lmms::MidiClip*)), this, SLOT(hideMidiClip(lmms::MidiClip*))); connect( m_midiClip->instrumentTrack(), SIGNAL( midiNoteOn( const lmms::Note& ) ), this, SLOT( startRecordNote( const lmms::Note& ) ) ); connect( m_midiClip->instrumentTrack(), SIGNAL( midiNoteOff( const lmms::Note& ) ), this, SLOT( finishRecordNote( const lmms::Note& ) ) ); connect( m_midiClip, SIGNAL(dataChanged()), this, SLOT(update())); - connect( m_midiClip->instrumentTrack()->pianoModel(), SIGNAL( dataChanged() ), this, SLOT( update() ) ); + connect( m_midiClip->instrumentTrack()->pianoModel(), SIGNAL(dataChanged()), this, SLOT(update())); connect(m_midiClip->instrumentTrack()->firstKeyModel(), SIGNAL(dataChanged()), this, SLOT(update())); connect(m_midiClip->instrumentTrack()->lastKeyModel(), SIGNAL(dataChanged()), this, SLOT(update())); @@ -4756,7 +4756,7 @@ PianoRollWindow::PianoRollWindow() : selectAction->setShortcut( Qt::SHIFT | Qt::Key_S ); pitchBendAction->setShortcut( Qt::SHIFT | Qt::Key_T ); - connect( editModeGroup, SIGNAL( triggered( int ) ), m_editor, SLOT( setEditMode( int ) ) ); + connect( editModeGroup, SIGNAL(triggered(int)), m_editor, SLOT(setEditMode(int))); // Quantize combo button QToolButton* quantizeButton = new QToolButton(notesActionsToolBar); @@ -4822,9 +4822,9 @@ PianoRollWindow::PianoRollWindow() : copyAction->setShortcut( Qt::CTRL | Qt::Key_C ); pasteAction->setShortcut( Qt::CTRL | Qt::Key_V ); - connect( cutAction, SIGNAL( triggered() ), m_editor, SLOT( cutSelectedNotes() ) ); - connect( copyAction, SIGNAL( triggered() ), m_editor, SLOT( copySelectedNotes() ) ); - connect( pasteAction, SIGNAL( triggered() ), m_editor, SLOT( pasteNotes() ) ); + connect( cutAction, SIGNAL(triggered()), m_editor, SLOT(cutSelectedNotes())); + connect( copyAction, SIGNAL(triggered()), m_editor, SLOT(copySelectedNotes())); + connect( pasteAction, SIGNAL(triggered()), m_editor, SLOT(pasteNotes())); copyPasteActionsToolBar->addAction( cutAction ); copyPasteActionsToolBar->addAction( copyAction ); @@ -4949,8 +4949,8 @@ PianoRollWindow::PianoRollWindow() : m_clearGhostButton->setIcon( embed::getIconPixmap( "clear_ghost_note" ) ); m_clearGhostButton->setToolTip( tr( "Clear ghost notes" ) ); m_clearGhostButton->setEnabled( false ); - connect( m_clearGhostButton, SIGNAL( clicked() ), m_editor, SLOT( clearGhostClip() ) ); - connect( m_editor, SIGNAL( ghostClipSet( bool ) ), this, SLOT( ghostClipSet( bool ) ) ); + connect( m_clearGhostButton, SIGNAL(clicked()), m_editor, SLOT(clearGhostClip())); + connect( m_editor, SIGNAL(ghostClipSet(bool)), this, SLOT(ghostClipSet(bool))); // Wrap label icons and comboboxes in a single widget so when // the window is resized smaller in width it hides both @@ -5027,8 +5027,8 @@ PianoRollWindow::PianoRollWindow() : setCurrentMidiClip( nullptr ); // Connections - connect( m_editor, SIGNAL( currentMidiClipChanged() ), this, SIGNAL( currentMidiClipChanged() ) ); - connect( m_editor, SIGNAL( currentMidiClipChanged() ), this, SLOT( updateAfterMidiClipChange() ) ); + connect( m_editor, SIGNAL(currentMidiClipChanged()), this, SIGNAL(currentMidiClipChanged())); + connect( m_editor, SIGNAL(currentMidiClipChanged()), this, SLOT(updateAfterMidiClipChange())); } @@ -5058,8 +5058,8 @@ void PianoRollWindow::setCurrentMidiClip( MidiClip* clip ) { setWindowTitle( tr( "Piano-Roll - %1" ).arg( clip->name() ) ); m_fileToolsButton->setEnabled(true); - connect( clip->instrumentTrack(), SIGNAL( nameChanged() ), this, SLOT( updateAfterMidiClipChange()) ); - connect( clip, SIGNAL( dataChanged() ), this, SLOT( updateAfterMidiClipChange() ) ); + connect( clip->instrumentTrack(), SIGNAL(nameChanged()), this, SLOT(updateAfterMidiClipChange())); + connect( clip, SIGNAL(dataChanged()), this, SLOT(updateAfterMidiClipChange())); } else { diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 9c028feba..eaabf52ea 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -88,23 +88,23 @@ SongEditor::SongEditor( Song * song ) : m_song->m_playPos[Song::Mode_PlaySong], m_currentPosition, Song::Mode_PlaySong, this ); - connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), + connect( this, SIGNAL( positionChanged( const lmms::TimePos& ) ), m_song->m_playPos[Song::Mode_PlaySong].m_timeLine, - SLOT( updatePosition( const lmms::TimePos & ) ) ); - connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos & ) ), - this, SLOT( updatePosition( const lmms::TimePos & ) ) ); - connect( m_timeLine, SIGNAL( regionSelectedFromPixels( int, int ) ), - this, SLOT( selectRegionFromPixels( int, int ) ) ); - connect( m_timeLine, SIGNAL( selectionFinished() ), - this, SLOT( stopRubberBand() ) ); + SLOT( updatePosition( const lmms::TimePos& ) ) ); + connect( m_timeLine, SIGNAL( positionChanged( const lmms::TimePos& ) ), + this, SLOT( updatePosition( const lmms::TimePos& ) ) ); + connect( m_timeLine, SIGNAL(regionSelectedFromPixels(int,int)), + this, SLOT(selectRegionFromPixels(int,int))); + connect( m_timeLine, SIGNAL(selectionFinished()), + this, SLOT(stopRubberBand())); m_positionLine = new PositionLine(this); static_cast( layout() )->insertWidget( 1, m_timeLine ); - connect( m_song, SIGNAL( playbackStateChanged() ), - m_positionLine, SLOT( update() ) ); - connect( this, SIGNAL( zoomingValueChanged( float ) ), - m_positionLine, SLOT( zoomChange( float ) ) ); + connect( m_song, SIGNAL(playbackStateChanged()), + m_positionLine, SLOT(update())); + connect( this, SIGNAL(zoomingValueChanged(float)), + m_positionLine, SLOT(zoomChange(float))); // Ensure loop markers snap to same increments as clips. Zoom & proportional // snap changes are handled in zoomingChanged() and toggleProportionalSnap() @@ -129,8 +129,8 @@ SongEditor::SongEditor( Song * song ) : tr( "High quality mode" ), nullptr, nullptr, tb ); hq_btn->setCheckable( true ); - connect( hq_btn, SIGNAL( toggled( bool ) ), - this, SLOT( setHighQuality( bool ) ) ); + connect( hq_btn, SIGNAL(toggled(bool)), + this, SLOT(setHighQuality(bool))); hq_btn->setFixedWidth( 42 ); getGUI()->mainWindow()->addWidgetToToolBar( hq_btn, 1, col ); #endif @@ -159,14 +159,14 @@ SongEditor::SongEditor( Song * song ) : m_masterVolumeSlider->setTickInterval( 50 ); m_masterVolumeSlider->setToolTip(tr("Master volume")); - connect( m_masterVolumeSlider, SIGNAL( logicValueChanged( int ) ), this, - SLOT( setMasterVolume( int ) ) ); - connect( m_masterVolumeSlider, SIGNAL( sliderPressed() ), this, - SLOT( showMasterVolumeFloat()) ); - connect( m_masterVolumeSlider, SIGNAL( logicSliderMoved( int ) ), this, - SLOT( updateMasterVolumeFloat( int ) ) ); - connect( m_masterVolumeSlider, SIGNAL( sliderReleased() ), this, - SLOT( hideMasterVolumeFloat() ) ); + connect( m_masterVolumeSlider, SIGNAL(logicValueChanged(int)), this, + SLOT(setMasterVolume(int))); + connect( m_masterVolumeSlider, SIGNAL(sliderPressed()), this, + SLOT(showMasterVolumeFloat())); + connect( m_masterVolumeSlider, SIGNAL(logicSliderMoved(int)), this, + SLOT(updateMasterVolumeFloat(int))); + connect( m_masterVolumeSlider, SIGNAL(sliderReleased()), this, + SLOT(hideMasterVolumeFloat())); m_mvsStatus = new TextFloat; m_mvsStatus->setTitle( tr( "Master volume" ) ); @@ -191,14 +191,14 @@ SongEditor::SongEditor( Song * song ) : m_masterPitchSlider->setFixedSize( 26, 60 ); m_masterPitchSlider->setTickInterval( 12 ); m_masterPitchSlider->setToolTip(tr("Master pitch")); - connect( m_masterPitchSlider, SIGNAL( logicValueChanged( int ) ), this, - SLOT( setMasterPitch( int ) ) ); - connect( m_masterPitchSlider, SIGNAL( sliderPressed() ), this, - SLOT( showMasterPitchFloat() ) ); - connect( m_masterPitchSlider, SIGNAL( logicSliderMoved( int ) ), this, - SLOT( updateMasterPitchFloat( int ) ) ); - connect( m_masterPitchSlider, SIGNAL( sliderReleased() ), this, - SLOT( hideMasterPitchFloat() ) ); + connect( m_masterPitchSlider, SIGNAL(logicValueChanged(int)), this, + SLOT(setMasterPitch(int))); + connect( m_masterPitchSlider, SIGNAL(sliderPressed()), this, + SLOT(showMasterPitchFloat())); + connect( m_masterPitchSlider, SIGNAL(logicSliderMoved(int)), this, + SLOT(updateMasterPitchFloat(int))); + connect( m_masterPitchSlider, SIGNAL(sliderReleased()), this, + SLOT(hideMasterPitchFloat())); m_mpsStatus = new TextFloat; m_mpsStatus->setTitle( tr( "Master pitch" ) ); @@ -231,10 +231,10 @@ SongEditor::SongEditor( Song * song ) : m_leftRightScroll->setSingleStep( 1 ); m_leftRightScroll->setPageStep( 20 ); static_cast( layout() )->addWidget( m_leftRightScroll ); - connect( m_leftRightScroll, SIGNAL( valueChanged( int ) ), - this, SLOT( scrolled( int ) ) ); - connect( m_song, SIGNAL( lengthChanged( int ) ), - this, SLOT( updateScrollBar( int ) ) ); + connect( m_leftRightScroll, SIGNAL(valueChanged(int)), + this, SLOT(scrolled(int))); + connect( m_song, SIGNAL(lengthChanged(int)), + this, SLOT(updateScrollBar(int))); connect(m_leftRightScroll, SIGNAL(valueChanged(int)),this, SLOT(updateRubberband())); connect(contentWidget()->verticalScrollBar(), SIGNAL(valueChanged(int)),this, SLOT(updateRubberband())); connect(m_timeLine, SIGNAL(selectionFinished()), this, SLOT(stopSelectRegion())); @@ -247,10 +247,10 @@ SongEditor::SongEditor( Song * song ) : } m_zoomingModel->setInitValue( m_zoomingModel->findText( "100%" ) ); - connect( m_zoomingModel, SIGNAL( dataChanged() ), - this, SLOT( zoomingChanged() ) ); - connect( m_zoomingModel, SIGNAL( dataChanged() ), - m_positionLine, SLOT( update() ) ); + connect( m_zoomingModel, SIGNAL(dataChanged()), + this, SLOT(zoomingChanged())); + connect( m_zoomingModel, SIGNAL(dataChanged()), + m_positionLine, SLOT(update())); //Set up snapping model, 2^i for ( int i = 3; i >= -4; i-- ) @@ -765,9 +765,9 @@ static inline void animateScroll( QScrollBar *scrollBar, int newVal, bool smooth { t = new QTimeLine( 600, scrollBar ); t->setFrameRange( scrollBar->value(), newVal ); - t->connect( t, SIGNAL( finished() ), SLOT( deleteLater() ) ); + t->connect( t, SIGNAL(finished()), SLOT(deleteLater())); - scrollBar->connect( t, SIGNAL( frameChanged( int ) ), SLOT( setValue( int ) ) ); + scrollBar->connect( t, SIGNAL(frameChanged(int)), SLOT(setValue(int))); t->start(); } @@ -1023,7 +1023,7 @@ SongEditorWindow::SongEditorWindow(Song* song) : m_setProportionalSnapAction->setCheckable(true); m_setProportionalSnapAction->setChecked(false); connect(m_setProportionalSnapAction, SIGNAL(triggered()), m_editor, SLOT(toggleProportionalSnap())); - connect(m_setProportionalSnapAction, SIGNAL(triggered()), this, SLOT(updateSnapLabel()) ); + connect(m_setProportionalSnapAction, SIGNAL(triggered()), this, SLOT(updateSnapLabel())); snapToolBar->addWidget( snap_lbl ); snapToolBar->addWidget( m_snappingComboBox ); @@ -1139,7 +1139,7 @@ void SongEditorWindow::adjustUiAfterProjectLoad() // it, it's very annyoing to manually bring up the song editor each time getGUI()->mainWindow()->workspace()->setActiveSubWindow( qobject_cast( parentWidget() ) ); - connect( qobject_cast( parentWidget() ), SIGNAL( focusLost() ), this, SLOT( lostFocus() ) ); + connect( qobject_cast( parentWidget() ), SIGNAL(focusLost()), this, SLOT(lostFocus())); m_editor->scrolled(0); } diff --git a/src/gui/editors/TimeLineWidget.cpp b/src/gui/editors/TimeLineWidget.cpp index b7aa6d94f..0d3de7d2a 100644 --- a/src/gui/editors/TimeLineWidget.cpp +++ b/src/gui/editors/TimeLineWidget.cpp @@ -89,11 +89,11 @@ TimeLineWidget::TimeLineWidget( const int xoff, const int yoff, const float ppb, m_pos.m_timeLine = this; QTimer * updateTimer = new QTimer( this ); - connect( updateTimer, SIGNAL( timeout() ), - this, SLOT( updatePosition() ) ); + connect( updateTimer, SIGNAL(timeout()), + this, SLOT(updatePosition())); updateTimer->start( 1000 / 60 ); // 60 fps - connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int,int ) ), - this, SLOT( update() ) ); + connect( Engine::getSong(), SIGNAL(timeSignatureChanged(int,int)), + this, SLOT(update())); } @@ -125,17 +125,17 @@ void TimeLineWidget::addToolButtons( QToolBar * _tool_bar ) autoScroll->setGeneralToolTip( tr( "Auto scrolling" ) ); autoScroll->addState( embed::getIconPixmap( "autoscroll_on" ) ); autoScroll->addState( embed::getIconPixmap( "autoscroll_off" ) ); - connect( autoScroll, SIGNAL( changedState( int ) ), this, - SLOT( toggleAutoScroll( int ) ) ); + connect( autoScroll, SIGNAL(changedState(int)), this, + SLOT(toggleAutoScroll(int))); NStateButton * loopPoints = new NStateButton( _tool_bar ); loopPoints->setGeneralToolTip( tr( "Loop points" ) ); loopPoints->addState( embed::getIconPixmap( "loop_points_off" ) ); loopPoints->addState( embed::getIconPixmap( "loop_points_on" ) ); - connect( loopPoints, SIGNAL( changedState( int ) ), this, - SLOT( toggleLoopPoints( int ) ) ); - connect( this, SIGNAL( loopPointStateLoaded( int ) ), loopPoints, - SLOT( changeState( int ) ) ); + connect( loopPoints, SIGNAL(changedState(int)), this, + SLOT(toggleLoopPoints(int))); + connect( this, SIGNAL(loopPointStateLoaded(int)), loopPoints, + SLOT(changeState(int))); NStateButton * behaviourAtStop = new NStateButton( _tool_bar ); behaviourAtStop->addState( embed::getIconPixmap( "back_to_zero" ), @@ -147,10 +147,10 @@ void TimeLineWidget::addToolButtons( QToolBar * _tool_bar ) "started" ) ); behaviourAtStop->addState( embed::getIconPixmap( "keep_stop_position" ), tr( "After stopping keep position" ) ); - connect( behaviourAtStop, SIGNAL( changedState( int ) ), this, - SLOT( toggleBehaviourAtStop( int ) ) ); - connect( this, SIGNAL( loadBehaviourAtStop( int ) ), behaviourAtStop, - SLOT( changeState( int ) ) ); + connect( behaviourAtStop, SIGNAL(changedState(int)), this, + SLOT(toggleBehaviourAtStop(int))); + connect( this, SIGNAL(loadBehaviourAtStop(int)), behaviourAtStop, + SLOT(changeState(int))); behaviourAtStop->changeState( BackToStart ); _tool_bar->addWidget( autoScroll ); diff --git a/src/gui/editors/TrackContainerView.cpp b/src/gui/editors/TrackContainerView.cpp index 6c85cf1a3..43309d96b 100644 --- a/src/gui/editors/TrackContainerView.cpp +++ b/src/gui/editors/TrackContainerView.cpp @@ -108,10 +108,10 @@ TrackContainerView::TrackContainerView( TrackContainer * _tc ) : setAcceptDrops( true ); - connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), - this, SLOT( realignTracks() ) ); - connect( m_tc, SIGNAL( trackAdded( lmms::Track * ) ), - this, SLOT( createTrackView( lmms::Track * ) ), + connect( Engine::getSong(), SIGNAL(timeSignatureChanged(int,int)), + this, SLOT(realignTracks())); + connect( m_tc, SIGNAL(trackAdded(lmms::Track*)), + this, SLOT(createTrackView(lmms::Track*)), Qt::QueuedConnection ); } @@ -151,9 +151,9 @@ TrackView * TrackContainerView::addTrackView( TrackView * _tv ) { m_trackViews.push_back( _tv ); m_scrollLayout->addWidget( _tv ); - connect( this, SIGNAL( positionChanged( const lmms::TimePos & ) ), + connect( this, SIGNAL( positionChanged( const lmms::TimePos& ) ), _tv->getTrackContentWidget(), - SLOT( changePosition( const lmms::TimePos & ) ) ); + SLOT( changePosition( const lmms::TimePos& ) ) ); realignTracks(); return( _tv ); } diff --git a/src/gui/instrument/EnvelopeAndLfoView.cpp b/src/gui/instrument/EnvelopeAndLfoView.cpp index cff230e38..a11910b09 100644 --- a/src/gui/instrument/EnvelopeAndLfoView.cpp +++ b/src/gui/instrument/EnvelopeAndLfoView.cpp @@ -202,8 +202,8 @@ EnvelopeAndLfoView::EnvelopeAndLfoView( QWidget * _parent ) : m_userLfoBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); - connect( m_userLfoBtn, SIGNAL( toggled( bool ) ), - this, SLOT( lfoUserWaveChanged() ) ); + connect( m_userLfoBtn, SIGNAL(toggled(bool)), + this, SLOT(lfoUserWaveChanged())); PixmapButton * random_lfo_btn = new PixmapButton( this, nullptr ); random_lfo_btn->move( LFO_SHAPES_X+60, LFO_SHAPES_Y ); diff --git a/src/gui/instrument/InstrumentMidiIOView.cpp b/src/gui/instrument/InstrumentMidiIOView.cpp index f98f58f5a..68491d6e6 100644 --- a/src/gui/instrument/InstrumentMidiIOView.cpp +++ b/src/gui/instrument/InstrumentMidiIOView.cpp @@ -73,10 +73,10 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : midiInputLayout->addWidget( m_fixedInputVelocitySpinBox ); midiInputLayout->addStretch(); - connect( m_midiInputGroupBox->ledButton(), SIGNAL( toggled( bool ) ), - m_inputChannelSpinBox, SLOT( setEnabled( bool ) ) ); - connect( m_midiInputGroupBox->ledButton(), SIGNAL( toggled( bool ) ), - m_fixedInputVelocitySpinBox, SLOT( setEnabled( bool ) ) ); + connect( m_midiInputGroupBox->ledButton(), SIGNAL(toggled(bool)), + m_inputChannelSpinBox, SLOT(setEnabled(bool))); + connect( m_midiInputGroupBox->ledButton(), SIGNAL(toggled(bool)), + m_fixedInputVelocitySpinBox, SLOT(setEnabled(bool))); @@ -118,12 +118,12 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : midiOutputLayout->addWidget( m_fixedOutputNoteSpinBox ); midiOutputLayout->addStretch(); - connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ), - m_fixedOutputVelocitySpinBox, SLOT( setEnabled( bool ) ) ); - connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ), - m_outputProgramSpinBox, SLOT( setEnabled( bool ) ) ); - connect( m_midiOutputGroupBox->ledButton(), SIGNAL( toggled( bool ) ), - m_fixedOutputNoteSpinBox, SLOT( setEnabled( bool ) ) ); + connect( m_midiOutputGroupBox->ledButton(), SIGNAL(toggled(bool)), + m_fixedOutputVelocitySpinBox, SLOT(setEnabled(bool))); + connect( m_midiOutputGroupBox->ledButton(), SIGNAL(toggled(bool)), + m_outputProgramSpinBox, SLOT(setEnabled(bool))); + connect( m_midiOutputGroupBox->ledButton(), SIGNAL(toggled(bool)), + m_fixedOutputNoteSpinBox, SLOT(setEnabled(bool))); if( !Engine::audioEngine()->midiClient()->isRaw() ) { @@ -162,8 +162,8 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : m_baseVelocitySpinBox->setEnabled( false ); baseVelocityLayout->addWidget( m_baseVelocitySpinBox ); - connect( baseVelocityGroupBox->ledButton(), SIGNAL( toggled( bool ) ), - m_baseVelocitySpinBox, SLOT( setEnabled( bool ) ) ); + connect( baseVelocityGroupBox->ledButton(), SIGNAL(toggled(bool)), + m_baseVelocitySpinBox, SLOT(setEnabled(bool))); layout->addStretch(); } diff --git a/src/gui/instrument/InstrumentTrackWindow.cpp b/src/gui/instrument/InstrumentTrackWindow.cpp index a457acec8..cead80e7c 100644 --- a/src/gui/instrument/InstrumentTrackWindow.cpp +++ b/src/gui/instrument/InstrumentTrackWindow.cpp @@ -108,8 +108,8 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : // setup line edit for changing instrument track name m_nameLineEdit = new QLineEdit; m_nameLineEdit->setFont( pointSize<9>( m_nameLineEdit->font() ) ); - connect( m_nameLineEdit, SIGNAL( textChanged( const QString & ) ), - this, SLOT( textChanged( const QString & ) ) ); + connect( m_nameLineEdit, SIGNAL( textChanged( const QString& ) ), + this, SLOT( textChanged( const QString& ) ) ); m_nameLineEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred)); nameAndChangeTrackLayout->addWidget(m_nameLineEdit, 1); @@ -117,10 +117,10 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : // set up left/right arrows for changing instrument m_leftRightNav = new LeftRightNav(this); - connect( m_leftRightNav, SIGNAL( onNavLeft() ), this, - SLOT( viewPrevInstrument() ) ); - connect( m_leftRightNav, SIGNAL( onNavRight() ), this, - SLOT( viewNextInstrument() ) ); + connect( m_leftRightNav, SIGNAL(onNavLeft()), this, + SLOT(viewPrevInstrument())); + connect( m_leftRightNav, SIGNAL(onNavRight()), this, + SLOT(viewNextInstrument())); // m_leftRightNav->setShortcuts(); nameAndChangeTrackLayout->addWidget(m_leftRightNav); @@ -221,7 +221,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : QPushButton* saveSettingsBtn = new QPushButton( embed::getIconPixmap( "project_save" ), QString() ); saveSettingsBtn->setMinimumSize( 32, 32 ); - connect( saveSettingsBtn, SIGNAL( clicked() ), this, SLOT( saveSettingsBtnClicked() ) ); + connect( saveSettingsBtn, SIGNAL(clicked()), this, SLOT(saveSettingsBtnClicked())); saveSettingsBtn->setToolTip(tr("Save current instrument track settings in a preset file")); @@ -345,13 +345,13 @@ void InstrumentTrackWindow::modelChanged() m_nameLineEdit->setText( m_track->name() ); - m_track->disconnect( SIGNAL( nameChanged() ), this ); - m_track->disconnect( SIGNAL( instrumentChanged() ), this ); + m_track->disconnect( SIGNAL(nameChanged()), this ); + m_track->disconnect( SIGNAL(instrumentChanged()), this ); - connect( m_track, SIGNAL( nameChanged() ), - this, SLOT( updateName() ) ); - connect( m_track, SIGNAL( instrumentChanged() ), - this, SLOT( updateInstrumentView() ) ); + connect( m_track, SIGNAL(nameChanged()), + this, SLOT(updateName())); + connect( m_track, SIGNAL(instrumentChanged()), + this, SLOT(updateInstrumentView())); m_volumeKnob->setModel( &m_track->m_volumeModel ); m_panningKnob->setModel( &m_track->m_panningModel ); diff --git a/src/gui/instrument/InstrumentView.cpp b/src/gui/instrument/InstrumentView.cpp index 2ca3d9329..23e758cf2 100644 --- a/src/gui/instrument/InstrumentView.cpp +++ b/src/gui/instrument/InstrumentView.cpp @@ -59,7 +59,7 @@ void InstrumentView::setModel( Model * _model, bool ) { ModelView::setModel( _model ); instrumentTrackWindow()->setWindowIcon( model()->logo()->pixmap() ); - connect( model(), SIGNAL( destroyed( QObject * ) ), this, SLOT( close() ) ); + connect( model(), SIGNAL(destroyed(QObject*)), this, SLOT(close())); } } diff --git a/src/gui/instrument/PianoView.cpp b/src/gui/instrument/PianoView.cpp index fa5594c68..b6dec8b4f 100644 --- a/src/gui/instrument/PianoView.cpp +++ b/src/gui/instrument/PianoView.cpp @@ -141,8 +141,8 @@ PianoView::PianoView(QWidget *parent) : m_pianoScroll->setValue(Octave_3 * Piano::WhiteKeysPerOctave); // and connect it to this widget - connect( m_pianoScroll, SIGNAL( valueChanged( int ) ), - this, SLOT( pianoScrolled( int ) ) ); + connect( m_pianoScroll, SIGNAL(valueChanged(int)), + this, SLOT(pianoScrolled(int))); // create a layout for ourselves QVBoxLayout * layout = new QVBoxLayout( this ); diff --git a/src/gui/menus/MidiPortMenu.cpp b/src/gui/menus/MidiPortMenu.cpp index 328efebd1..88e6a4f30 100644 --- a/src/gui/menus/MidiPortMenu.cpp +++ b/src/gui/menus/MidiPortMenu.cpp @@ -35,8 +35,8 @@ MidiPortMenu::MidiPortMenu( MidiPort::Modes _mode ) : m_mode( _mode ) { setFont( pointSize<9>( font() ) ); - connect( this, SIGNAL( triggered( QAction * ) ), - this, SLOT( activatedPort( QAction * ) ) ); + connect( this, SIGNAL(triggered(QAction*)), + this, SLOT(activatedPort(QAction*))); } @@ -54,13 +54,13 @@ void MidiPortMenu::modelChanged() MidiPort * mp = castModel(); if( m_mode == MidiPort::Input ) { - connect( mp, SIGNAL( readablePortsChanged() ), - this, SLOT( updateMenu() ) ); + connect( mp, SIGNAL(readablePortsChanged()), + this, SLOT(updateMenu())); } else if( m_mode == MidiPort::Output ) { - connect( mp, SIGNAL( writablePortsChanged() ), - this, SLOT( updateMenu() ) ); + connect( mp, SIGNAL(writablePortsChanged()), + this, SLOT(updateMenu())); } updateMenu(); } diff --git a/src/gui/menus/RecentProjectsMenu.cpp b/src/gui/menus/RecentProjectsMenu.cpp index bbbf79e86..050450dd0 100644 --- a/src/gui/menus/RecentProjectsMenu.cpp +++ b/src/gui/menus/RecentProjectsMenu.cpp @@ -19,10 +19,10 @@ RecentProjectsMenu::RecentProjectsMenu(QWidget *parent) : { setIcon(embed::getIconPixmap( "project_open_recent" )); - connect( this, SIGNAL( aboutToShow() ), - this, SLOT(fillMenu() ) ); - connect( this, SIGNAL( triggered( QAction * ) ), - this, SLOT(openProject(QAction * ) ) ); + connect( this, SIGNAL(aboutToShow()), + this, SLOT(fillMenu())); + connect( this, SIGNAL(triggered(QAction*)), + this, SLOT(openProject(QAction*))); } diff --git a/src/gui/menus/TemplatesMenu.cpp b/src/gui/menus/TemplatesMenu.cpp index 1a1ef7c84..a73c81071 100644 --- a/src/gui/menus/TemplatesMenu.cpp +++ b/src/gui/menus/TemplatesMenu.cpp @@ -18,9 +18,9 @@ TemplatesMenu::TemplatesMenu(QWidget *parent) : { setIcon(embed::getIconPixmap("project_new")); - connect( this, SIGNAL( aboutToShow() ), SLOT( fillTemplatesMenu() ) ); - connect( this, SIGNAL( triggered( QAction * ) ), - SLOT( createNewProjectFromTemplate( QAction * ) ) ); + connect( this, SIGNAL(aboutToShow()), SLOT(fillTemplatesMenu())); + connect( this, SIGNAL(triggered(QAction*)), + SLOT(createNewProjectFromTemplate(QAction*))); } diff --git a/src/gui/modals/ControllerConnectionDialog.cpp b/src/gui/modals/ControllerConnectionDialog.cpp index b8d323709..fb86328a1 100644 --- a/src/gui/modals/ControllerConnectionDialog.cpp +++ b/src/gui/modals/ControllerConnectionDialog.cpp @@ -143,8 +143,8 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, // Midi stuff m_midiGroupBox = new GroupBox( tr( "MIDI CONTROLLER" ), this ); m_midiGroupBox->setGeometry( 8, 10, 240, 80 ); - connect( m_midiGroupBox->model(), SIGNAL( dataChanged() ), - this, SLOT( midiToggled() ) ); + connect( m_midiGroupBox->model(), SIGNAL(dataChanged()), + this, SLOT(midiToggled())); m_midiChannelSpinBox = new LcdSpinBox( 2, m_midiGroupBox, tr( "Input channel" ) ); @@ -164,16 +164,16 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, m_midiGroupBox, tr("Auto Detect") ); m_midiAutoDetectCheckBox->setModel( &m_midiAutoDetect ); m_midiAutoDetectCheckBox->move( 8, 60 ); - connect( &m_midiAutoDetect, SIGNAL( dataChanged() ), - this, SLOT( autoDetectToggled() ) ); + connect( &m_midiAutoDetect, SIGNAL(dataChanged()), + this, SLOT(autoDetectToggled())); // when using with non-raw-clients we can provide buttons showing // our port-menus when being clicked if( !Engine::audioEngine()->midiClient()->isRaw() ) { m_readablePorts = new MidiPortMenu( MidiPort::Input ); - connect( m_readablePorts, SIGNAL( triggered( QAction * ) ), - this, SLOT( enableAutoDetect( QAction * ) ) ); + connect( m_readablePorts, SIGNAL(triggered(QAction*)), + this, SLOT(enableAutoDetect(QAction*))); ToolButton * rp_btn = new ToolButton( m_midiGroupBox ); rp_btn->setText( tr( "MIDI-devices to receive " "MIDI-events from" ) ); @@ -187,8 +187,8 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, // User stuff m_userGroupBox = new GroupBox( tr( "USER CONTROLLER" ), this ); m_userGroupBox->setGeometry( 8, 100, 240, 60 ); - connect( m_userGroupBox->model(), SIGNAL( dataChanged() ), - this, SLOT( userToggled() ) ); + connect( m_userGroupBox->model(), SIGNAL(dataChanged()), + this, SLOT(userToggled())); m_userController = new ComboBox( m_userGroupBox, "Controller" ); m_userController->setGeometry( 10, 24, 200, ComboBox::DEFAULT_HEIGHT ); @@ -196,10 +196,10 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, { m_userController->model()->addItem( c->name() ); } - connect( m_userController->model(), SIGNAL( dataUnchanged() ), - this, SLOT( userSelected() ) ); - connect( m_userController->model(), SIGNAL( dataChanged() ), - this, SLOT( userSelected() ) ); + connect( m_userController->model(), SIGNAL(dataUnchanged()), + this, SLOT(userSelected())); + connect( m_userController->model(), SIGNAL(dataChanged()), + this, SLOT(userSelected())); // Mapping functions @@ -222,14 +222,14 @@ ControllerConnectionDialog::ControllerConnectionDialog( QWidget * _parent, QPushButton * select_btn = new QPushButton( embed::getIconPixmap( "add" ), tr( "OK" ), buttons ); - connect( select_btn, SIGNAL( clicked() ), - this, SLOT( selectController() ) ); + connect( select_btn, SIGNAL(clicked()), + this, SLOT(selectController())); QPushButton * cancel_btn = new QPushButton( embed::getIconPixmap( "cancel" ), tr( "Cancel" ), buttons ); - connect( cancel_btn, SIGNAL( clicked() ), - this, SLOT( reject() ) ); + connect( cancel_btn, SIGNAL(clicked()), + this, SLOT(reject())); btn_layout->addStretch(); btn_layout->addSpacing( 10 ); @@ -376,7 +376,7 @@ void ControllerConnectionDialog::midiToggled() m_readablePorts->setModel( &m_midiController->m_midiPort ); } - connect( m_midiController, SIGNAL( valueChanged() ), this, SLOT( midiValueChanged() ) ); + connect( m_midiController, SIGNAL(valueChanged()), this, SLOT(midiValueChanged())); } } m_midiAutoDetect.setValue( enabled ); diff --git a/src/gui/modals/EffectSelectDialog.cpp b/src/gui/modals/EffectSelectDialog.cpp index 22f094827..2b5c0c58d 100644 --- a/src/gui/modals/EffectSelectDialog.cpp +++ b/src/gui/modals/EffectSelectDialog.cpp @@ -98,27 +98,27 @@ EffectSelectDialog::EffectSelectDialog( QWidget * _parent ) : m_model.setSourceModel( &m_sourceModel ); m_model.setFilterCaseSensitivity( Qt::CaseInsensitive ); - connect( ui->filterEdit, SIGNAL( textChanged( const QString & ) ), - &m_model, SLOT( setFilterFixedString( const QString & ) ) ); - connect( ui->filterEdit, SIGNAL( textChanged( const QString & ) ), - this, SLOT( updateSelection() ) ); - connect( ui->filterEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( sortAgain() ) ); + connect( ui->filterEdit, SIGNAL( textChanged( const QString& ) ), + &m_model, SLOT( setFilterFixedString( const QString& ) ) ); + connect( ui->filterEdit, SIGNAL( textChanged( const QString& ) ), + this, SLOT(updateSelection())); + connect( ui->filterEdit, SIGNAL( textChanged( const QString& ) ), + SLOT(sortAgain())); ui->pluginList->setModel( &m_model ); // setup selection model QItemSelectionModel * selectionModel = new QItemSelectionModel( &m_model ); ui->pluginList->setSelectionModel( selectionModel ); - connect( selectionModel, SIGNAL( currentRowChanged( const QModelIndex &, + connect( selectionModel, SIGNAL( currentRowChanged( const QModelIndex&, const QModelIndex & ) ), - SLOT( rowChanged( const QModelIndex &, const QModelIndex & ) ) ); - connect( ui->pluginList, SIGNAL( doubleClicked( const QModelIndex & ) ), - SLOT( acceptSelection() ) ); + SLOT( rowChanged( const QModelIndex &, const QModelIndex& ) ) ); + connect( ui->pluginList, SIGNAL( doubleClicked( const QModelIndex& ) ), + SLOT(acceptSelection())); // try to accept current selection when pressing "OK" - connect( ui->buttonBox, SIGNAL( accepted() ), - this, SLOT( acceptSelection() ) ); + connect( ui->buttonBox, SIGNAL(accepted()), + this, SLOT(acceptSelection())); ui->filterEdit->setClearButtonEnabled( true ); ui->pluginList->verticalHeader()->setSectionResizeMode( diff --git a/src/gui/modals/ExportProjectDialog.cpp b/src/gui/modals/ExportProjectDialog.cpp index fc9113b3f..7671e031e 100644 --- a/src/gui/modals/ExportProjectDialog.cpp +++ b/src/gui/modals/ExportProjectDialog.cpp @@ -98,8 +98,8 @@ ExportProjectDialog::ExportProjectDialog( const QString & _file_name, compressionWidget->setVisible(false); #endif - connect( startButton, SIGNAL( clicked() ), - this, SLOT( startBtnClicked() ) ); + connect( startButton, SIGNAL(clicked()), + this, SLOT(startBtnClicked())); } @@ -190,14 +190,14 @@ void ExportProjectDialog::startExport() Engine::getSong()->setRenderBetweenMarkers( renderMarkersCB->isChecked() ); Engine::getSong()->setLoopRenderCount(loopCountSB->value()); - connect( m_renderManager.get(), SIGNAL( progressChanged( int ) ), - progressBar, SLOT( setValue( int ) ) ); - connect( m_renderManager.get(), SIGNAL( progressChanged( int ) ), - this, SLOT( updateTitleBar( int ) )); - connect( m_renderManager.get(), SIGNAL( finished() ), - this, SLOT( accept() ) ) ; - connect( m_renderManager.get(), SIGNAL( finished() ), - getGUI()->mainWindow(), SLOT( resetWindowTitle() ) ); + connect( m_renderManager.get(), SIGNAL(progressChanged(int)), + progressBar, SLOT(setValue(int))); + connect( m_renderManager.get(), SIGNAL(progressChanged(int)), + this, SLOT(updateTitleBar(int))); + connect( m_renderManager.get(), SIGNAL(finished()), + this, SLOT(accept())) ; + connect( m_renderManager.get(), SIGNAL(finished()), + getGUI()->mainWindow(), SLOT(resetWindowTitle())); if ( m_multiExport ) { diff --git a/src/gui/modals/RenameDialog.cpp b/src/gui/modals/RenameDialog.cpp index 76ae9d6bb..0028cd1a0 100644 --- a/src/gui/modals/RenameDialog.cpp +++ b/src/gui/modals/RenameDialog.cpp @@ -43,10 +43,10 @@ RenameDialog::RenameDialog( QString & _string ) : m_stringLE->setText( _string ); m_stringLE->setGeometry ( 10, 5, 220, 20 ); m_stringLE->selectAll(); - connect( m_stringLE, SIGNAL( textChanged( const QString & ) ), this, - SLOT( textChanged( const QString & ) ) ); - connect( m_stringLE, SIGNAL( returnPressed() ), this, - SLOT( accept() ) ); + connect( m_stringLE, SIGNAL( textChanged( const QString& ) ), this, + SLOT( textChanged( const QString& ) ) ); + connect( m_stringLE, SIGNAL(returnPressed()), this, + SLOT(accept())); } diff --git a/src/gui/modals/SetupDialog.cpp b/src/gui/modals/SetupDialog.cpp index 33cecedad..9c15f5b53 100644 --- a/src/gui/modals/SetupDialog.cpp +++ b/src/gui/modals/SetupDialog.cpp @@ -545,8 +545,8 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) : setCurrentIndex(m_audioInterfaces->findText(audioDevName)); m_audioIfaceSetupWidgets[audioDevName]->show(); - connect(m_audioInterfaces, SIGNAL(activated(const QString &)), - this, SLOT(audioInterfaceChanged(const QString &))); + connect(m_audioInterfaces, SIGNAL(activated(const QString&)), + this, SLOT(audioInterfaceChanged(const QString&))); // Advanced setting, hidden for now if(false) @@ -689,8 +689,8 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) : m_midiInterfaces->setCurrentIndex(m_midiInterfaces->findText(midiDevName)); m_midiIfaceSetupWidgets[midiDevName]->show(); - connect(m_midiInterfaces, SIGNAL(activated(const QString &)), - this, SLOT(midiInterfaceChanged(const QString &))); + connect(m_midiInterfaces, SIGNAL(activated(const QString&)), + this, SLOT(midiInterfaceChanged(const QString&))); // MIDI autoassign tab. @@ -761,7 +761,7 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) : lineEdit = new QLineEdit(content, newTw); lineEdit->setGeometry(10, 20, txtLength, 16); - connect(lineEdit, SIGNAL(textChanged(const QString &)), + connect(lineEdit, SIGNAL(textChanged(const QString&)), this, setSlot); QPushButton * selectBtn = new QPushButton( @@ -776,37 +776,37 @@ SetupDialog::SetupDialog(ConfigTabs tab_to_open) : }; addPathEntry(tr("LMMS working directory"), m_workingDir, - SLOT(setWorkingDir(const QString &)), + SLOT(setWorkingDir(const QString&)), SLOT(openWorkingDir()), m_workingDirLineEdit); addPathEntry(tr("VST plugins directory"), m_vstDir, - SLOT(setVSTDir(const QString &)), + SLOT(setVSTDir(const QString&)), SLOT(openVSTDir()), m_vstDirLineEdit); addPathEntry(tr("LADSPA plugins directories"), m_ladspaDir, - SLOT(setLADSPADir(const QString &)), + SLOT(setLADSPADir(const QString&)), SLOT(openLADSPADir()), m_ladspaDirLineEdit, "add_folder"); addPathEntry(tr("SF2 directory"), m_sf2Dir, - SLOT(setSF2Dir(const QString &)), + SLOT(setSF2Dir(const QString&)), SLOT(openSF2Dir()), m_sf2DirLineEdit); #ifdef LMMS_HAVE_FLUIDSYNTH addPathEntry(tr("Default SF2"), m_sf2File, - SLOT(setSF2File(const QString &)), + SLOT(setSF2File(const QString&)), SLOT(openSF2File()), m_sf2FileLineEdit); #endif addPathEntry(tr("GIG directory"), m_gigDir, - SLOT(setGIGDir(const QString &)), + SLOT(setGIGDir(const QString&)), SLOT(openGIGDir()), m_gigDirLineEdit); addPathEntry(tr("Theme directory"), m_themeDir, - SLOT(setThemeDir(const QString &)), + SLOT(setThemeDir(const QString&)), SLOT(openThemeDir()), m_themeDirLineEdit); addPathEntry(tr("Background artwork"), m_backgroundPicFile, - SLOT(setBackgroundPicFile(const QString &)), + SLOT(setBackgroundPicFile(const QString&)), SLOT(openBackgroundPicFile()), m_backgroundPicFileLineEdit); diff --git a/src/gui/modals/VersionedSaveDialog.cpp b/src/gui/modals/VersionedSaveDialog.cpp index 06a576ea9..d93bd948c 100644 --- a/src/gui/modals/VersionedSaveDialog.cpp +++ b/src/gui/modals/VersionedSaveDialog.cpp @@ -80,8 +80,8 @@ VersionedSaveDialog::VersionedSaveDialog( QWidget *parent, } // Connect + and - buttons - connect( plusButton, SIGNAL( clicked() ), this, SLOT( incrementVersion() )); - connect( minusButton, SIGNAL( clicked() ), this, SLOT( decrementVersion() )); + connect( plusButton, SIGNAL(clicked()), this, SLOT(incrementVersion())); + connect( minusButton, SIGNAL(clicked()), this, SLOT(decrementVersion())); } diff --git a/src/gui/tracks/InstrumentTrackView.cpp b/src/gui/tracks/InstrumentTrackView.cpp index 4c16287ed..5d01c8ae0 100644 --- a/src/gui/tracks/InstrumentTrackView.cpp +++ b/src/gui/tracks/InstrumentTrackView.cpp @@ -66,14 +66,14 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV m_tlb->move( 3, 1 ); m_tlb->show(); - connect( m_tlb, SIGNAL( toggled( bool ) ), - this, SLOT( toggleInstrumentWindow( bool ) ) ); + connect( m_tlb, SIGNAL(toggled(bool)), + this, SLOT(toggleInstrumentWindow(bool))); - connect( _it, SIGNAL( nameChanged() ), - m_tlb, SLOT( update() ) ); + connect( _it, SIGNAL(nameChanged()), + m_tlb, SLOT(update())); - connect(ConfigManager::inst(), SIGNAL(valueChanged(QString, QString, QString)), - this, SLOT(handleConfigChange(QString, QString, QString))); + connect(ConfigManager::inst(), SIGNAL(valueChanged(QString,QString,QString)), + this, SLOT(handleConfigChange(QString,QString,QString))); // creation of widgets for track-settings-widget int widgetWidth; @@ -128,12 +128,12 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV m_midiOutputAction = m_midiMenu->addAction( "" ); m_midiInputAction->setCheckable( true ); m_midiOutputAction->setCheckable( true ); - connect( m_midiInputAction, SIGNAL( changed() ), this, - SLOT( midiInSelected() ) ); - connect( m_midiOutputAction, SIGNAL( changed() ), this, - SLOT( midiOutSelected() ) ); - connect( &_it->m_midiPort, SIGNAL( modeChanged() ), - this, SLOT( midiConfigChanged() ) ); + connect( m_midiInputAction, SIGNAL(changed()), this, + SLOT(midiInSelected())); + connect( m_midiOutputAction, SIGNAL(changed()), this, + SLOT(midiOutSelected())); + connect( &_it->m_midiPort, SIGNAL(modeChanged()), + this, SLOT(midiConfigChanged())); } m_midiInputAction->setText( tr( "Input" ) ); @@ -154,14 +154,14 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV m_activityIndicator->setGeometry( widgetWidth-2*24-11, 2, 8, 28 ); m_activityIndicator->show(); - connect( m_activityIndicator, SIGNAL( pressed() ), - this, SLOT( activityIndicatorPressed() ) ); - connect( m_activityIndicator, SIGNAL( released() ), - this, SLOT( activityIndicatorReleased() ) ); - connect( _it, SIGNAL( newNote() ), - m_activityIndicator, SLOT( activate() ) ); - connect( _it, SIGNAL( endNote() ), - m_activityIndicator, SLOT( noteEnd() ) ); + connect( m_activityIndicator, SIGNAL(pressed()), + this, SLOT(activityIndicatorPressed())); + connect( m_activityIndicator, SIGNAL(released()), + this, SLOT(activityIndicatorReleased())); + connect( _it, SIGNAL(newNote()), + m_activityIndicator, SLOT(activate())); + connect( _it, SIGNAL(endNote()), + m_activityIndicator, SLOT(noteEnd())); setModel( _it ); } @@ -368,7 +368,7 @@ QMenu * InstrumentTrackView::createMixerMenu(QString title, QString newMixerLabe QMenu *mixerMenu = new QMenu( title ); - mixerMenu->addAction( newMixerLabel, this, SLOT( createMixerLine() ) ); + mixerMenu->addAction( newMixerLabel, this, SLOT(createMixerLine())); mixerMenu->addSeparator(); for (int i = 0; i < Engine::mixer()->numChannels(); ++i) diff --git a/src/gui/tracks/PatternTrackView.cpp b/src/gui/tracks/PatternTrackView.cpp index 41195f5db..be039ba79 100644 --- a/src/gui/tracks/PatternTrackView.cpp +++ b/src/gui/tracks/PatternTrackView.cpp @@ -46,8 +46,8 @@ PatternTrackView::PatternTrackView(PatternTrack* pt, TrackContainerView* tcv) : m_trackLabel->setIcon( embed::getIconPixmap("pattern_track")); m_trackLabel->move( 3, 1 ); m_trackLabel->show(); - connect( m_trackLabel, SIGNAL( clicked( bool ) ), - this, SLOT( clickedTrackLabel() ) ); + connect( m_trackLabel, SIGNAL(clicked(bool)), + this, SLOT(clickedTrackLabel())); setModel(pt); } diff --git a/src/gui/tracks/SampleTrackView.cpp b/src/gui/tracks/SampleTrackView.cpp index 9897b3309..83331ad1e 100644 --- a/src/gui/tracks/SampleTrackView.cpp +++ b/src/gui/tracks/SampleTrackView.cpp @@ -53,7 +53,7 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) : m_tlb = new TrackLabelButton(this, getTrackSettingsWidget()); m_tlb->setCheckable(true); - connect(m_tlb, SIGNAL(clicked( bool )), + connect(m_tlb, SIGNAL(clicked(bool)), this, SLOT(showEffects())); m_tlb->setIcon(embed::getIconPixmap("sample_track")); m_tlb->move(3, 1); diff --git a/src/gui/tracks/TrackContentWidget.cpp b/src/gui/tracks/TrackContentWidget.cpp index 03e7487a6..5e6344ec4 100644 --- a/src/gui/tracks/TrackContentWidget.cpp +++ b/src/gui/tracks/TrackContentWidget.cpp @@ -71,8 +71,8 @@ TrackContentWidget::TrackContentWidget( TrackView * parent ) : setAcceptDrops( true ); connect( parent->trackContainerView(), - SIGNAL( positionChanged( const lmms::TimePos & ) ), - this, SLOT( changePosition( const lmms::TimePos & ) ) ); + SIGNAL( positionChanged( const lmms::TimePos& ) ), + this, SLOT( changePosition( const lmms::TimePos& ) ) ); setStyle( QApplication::style() ); diff --git a/src/gui/tracks/TrackLabelButton.cpp b/src/gui/tracks/TrackLabelButton.cpp index 6f3d13727..77e678617 100644 --- a/src/gui/tracks/TrackLabelButton.cpp +++ b/src/gui/tracks/TrackLabelButton.cpp @@ -62,12 +62,12 @@ TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : setFixedSize( 160, 29 ); m_renameLineEdit->move( 30, ( height() / 2 ) - ( m_renameLineEdit->sizeHint().height() / 2 ) ); m_renameLineEdit->setFixedWidth( width() - 33 ); - connect( m_renameLineEdit, SIGNAL( editingFinished() ), this, SLOT( renameFinished() ) ); + connect( m_renameLineEdit, SIGNAL(editingFinished()), this, SLOT(renameFinished())); } setIconSize( QSize( 24, 24 ) ); - connect( m_trackView->getTrack(), SIGNAL( dataChanged() ), this, SLOT( update() ) ); - connect( m_trackView->getTrack(), SIGNAL( nameChanged() ), this, SLOT( nameChanged() ) ); + connect( m_trackView->getTrack(), SIGNAL(dataChanged()), this, SLOT(update())); + connect( m_trackView->getTrack(), SIGNAL(nameChanged()), this, SLOT(nameChanged())); } diff --git a/src/gui/tracks/TrackOperationsWidget.cpp b/src/gui/tracks/TrackOperationsWidget.cpp index 2670f891d..bef6ddcbf 100644 --- a/src/gui/tracks/TrackOperationsWidget.cpp +++ b/src/gui/tracks/TrackOperationsWidget.cpp @@ -65,7 +65,7 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : QMenu * toMenu = new QMenu( this ); toMenu->setFont( pointSize<9>( toMenu->font() ) ); - connect( toMenu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) ); + connect( toMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu())); setObjectName( "automationEnabled" ); @@ -106,13 +106,13 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : m_soloBtn->show(); m_soloBtn->setToolTip(tr("Solo")); - connect( this, SIGNAL( trackRemovalScheduled( lmms::gui::TrackView * ) ), + connect( this, SIGNAL(trackRemovalScheduled(lmms::gui::TrackView*)), m_trackView->trackContainerView(), - SLOT( deleteTrackView( lmms::gui::TrackView * ) ), + SLOT(deleteTrackView(lmms::gui::TrackView*)), Qt::QueuedConnection ); - connect( m_trackView->getTrack()->getMutedModel(), SIGNAL( dataChanged() ), - this, SLOT( update() ) ); + connect( m_trackView->getTrack()->getMutedModel(), SIGNAL(dataChanged()), + this, SLOT(update())); connect(m_trackView->getTrack(), SIGNAL(colorChanged()), this, SLOT(update())); } @@ -330,14 +330,14 @@ void TrackOperationsWidget::updateMenu() toMenu->clear(); toMenu->addAction( embed::getIconPixmap( "edit_copy", 16, 16 ), tr( "Clone this track" ), - this, SLOT( cloneTrack() ) ); + this, SLOT(cloneTrack())); toMenu->addAction( embed::getIconPixmap( "cancel", 16, 16 ), tr( "Remove this track" ), - this, SLOT( removeTrack() ) ); + this, SLOT(removeTrack())); if( ! m_trackView->trackContainerView()->fixedClips() ) { - toMenu->addAction( tr( "Clear this track" ), this, SLOT( clearTrack() ) ); + toMenu->addAction( tr( "Clear this track" ), this, SLOT(clearTrack())); } if (QMenu *mixerMenu = m_trackView->createMixerMenu(tr("Channel %1: %2"), tr("Assign to new Mixer Channel"))) { @@ -351,8 +351,8 @@ void TrackOperationsWidget::updateMenu() } if( dynamic_cast( m_trackView ) ) { - toMenu->addAction( tr( "Turn all recording on" ), this, SLOT( recordingOn() ) ); - toMenu->addAction( tr( "Turn all recording off" ), this, SLOT( recordingOff() ) ); + toMenu->addAction( tr( "Turn all recording on" ), this, SLOT(recordingOn())); + toMenu->addAction( tr( "Turn all recording off" ), this, SLOT(recordingOff())); } toMenu->addSeparator(); diff --git a/src/gui/tracks/TrackView.cpp b/src/gui/tracks/TrackView.cpp index 61d598f6e..2065b0b53 100644 --- a/src/gui/tracks/TrackView.cpp +++ b/src/gui/tracks/TrackView.cpp @@ -88,20 +88,20 @@ TrackView::TrackView( Track * track, TrackContainerView * tcv ) : setAttribute( Qt::WA_DeleteOnClose, true ); - connect( m_track, SIGNAL( destroyedTrack() ), this, SLOT( close() ) ); + connect( m_track, SIGNAL(destroyedTrack()), this, SLOT(close())); connect( m_track, - SIGNAL( clipAdded( lmms::Clip * ) ), - this, SLOT( createClipView( lmms::Clip * ) ), + SIGNAL(clipAdded(lmms::Clip*)), + this, SLOT(createClipView(lmms::Clip*)), Qt::QueuedConnection ); - connect( &m_track->m_mutedModel, SIGNAL( dataChanged() ), - &m_trackContentWidget, SLOT( update() ) ); + connect( &m_track->m_mutedModel, SIGNAL(dataChanged()), + &m_trackContentWidget, SLOT(update())); connect(&m_track->m_mutedModel, SIGNAL(dataChanged()), this, SLOT(muteChanged())); - connect( &m_track->m_soloModel, SIGNAL( dataChanged() ), - m_track, SLOT( toggleSolo() ), Qt::DirectConnection ); + connect( &m_track->m_soloModel, SIGNAL(dataChanged()), + m_track, SLOT(toggleSolo()), Qt::DirectConnection ); // create views for already existing clips for( Track::clipVector::iterator it = m_track->m_clips.begin(); it != m_track->m_clips.end(); ++it ) @@ -196,7 +196,7 @@ void TrackView::modelChanged() { m_track = castModel(); Q_ASSERT( m_track != nullptr ); - connect( m_track, SIGNAL( destroyedTrack() ), this, SLOT( close() ) ); + connect( m_track, SIGNAL(destroyedTrack()), this, SLOT(close())); m_trackOperationsWidget.m_muteBtn->setModel( &m_track->m_mutedModel ); m_trackOperationsWidget.m_soloBtn->setModel( &m_track->m_soloModel ); ModelView::modelChanged(); diff --git a/src/gui/widgets/AutomatableButton.cpp b/src/gui/widgets/AutomatableButton.cpp index 29af4af86..49602a24f 100644 --- a/src/gui/widgets/AutomatableButton.cpp +++ b/src/gui/widgets/AutomatableButton.cpp @@ -246,8 +246,8 @@ void automatableButtonGroup::activateButton( AutomatableButton * _btn ) void automatableButtonGroup::modelChanged() { - connect( model(), SIGNAL( dataChanged() ), - this, SLOT( updateButtons() ) ); + connect( model(), SIGNAL(dataChanged()), + this, SLOT(updateButtons())); IntModelView::modelChanged(); updateButtons(); } diff --git a/src/gui/widgets/AutomatableSlider.cpp b/src/gui/widgets/AutomatableSlider.cpp index b7af54b32..13cd9771f 100644 --- a/src/gui/widgets/AutomatableSlider.cpp +++ b/src/gui/widgets/AutomatableSlider.cpp @@ -42,10 +42,10 @@ AutomatableSlider::AutomatableSlider( QWidget * _parent, { setWindowTitle( _name ); - connect( this, SIGNAL( valueChanged( int ) ), - this, SLOT( changeValue( int ) ) ); - connect( this, SIGNAL( sliderMoved( int ) ), - this, SLOT( moveSlider( int ) ) ); + connect( this, SIGNAL(valueChanged(int)), + this, SLOT(changeValue(int))); + connect( this, SIGNAL(sliderMoved(int)), + this, SLOT(moveSlider(int))); } @@ -109,8 +109,8 @@ void AutomatableSlider::modelChanged() { QSlider::setRange( model()->minValue(), model()->maxValue() ); updateSlider(); - connect( model(), SIGNAL( dataChanged() ), - this, SLOT( updateSlider() ) ); + connect( model(), SIGNAL(dataChanged()), + this, SLOT(updateSlider())); } diff --git a/src/gui/widgets/CPULoadWidget.cpp b/src/gui/widgets/CPULoadWidget.cpp index 01c36994e..3f465d347 100644 --- a/src/gui/widgets/CPULoadWidget.cpp +++ b/src/gui/widgets/CPULoadWidget.cpp @@ -51,8 +51,8 @@ CPULoadWidget::CPULoadWidget( QWidget * _parent ) : m_temp = QPixmap( width(), height() ); - connect( &m_updateTimer, SIGNAL( timeout() ), - this, SLOT( updateCpuLoad() ) ); + connect( &m_updateTimer, SIGNAL(timeout()), + this, SLOT(updateCpuLoad())); m_updateTimer.start( 100 ); // update cpu-load at 10 fps } diff --git a/src/gui/widgets/ComboBox.cpp b/src/gui/widgets/ComboBox.cpp index ab6b29b9d..7b6121b23 100644 --- a/src/gui/widgets/ComboBox.cpp +++ b/src/gui/widgets/ComboBox.cpp @@ -72,8 +72,8 @@ ComboBox::ComboBox( QWidget * _parent, const QString & _name ) : setFont( pointSize<9>( font() ) ); m_menu.setFont( pointSize<8>( m_menu.font() ) ); - connect( &m_menu, SIGNAL( triggered( QAction * ) ), - this, SLOT( setItem( QAction * ) ) ); + connect( &m_menu, SIGNAL(triggered(QAction*)), + this, SLOT(setItem(QAction*))); setWindowTitle( _name ); doConnections(); diff --git a/src/gui/widgets/Graph.cpp b/src/gui/widgets/Graph.cpp index f5639ff70..63d295ad1 100644 --- a/src/gui/widgets/Graph.cpp +++ b/src/gui/widgets/Graph.cpp @@ -52,11 +52,11 @@ Graph::Graph( QWidget * _parent, graphStyle _style, int _width, graphModel * gModel = castModel(); - QObject::connect( gModel, SIGNAL( samplesChanged( int, int ) ), - this, SLOT( updateGraph( int, int ) ) ); + QObject::connect( gModel, SIGNAL(samplesChanged(int,int)), + this, SLOT(updateGraph(int,int))); - QObject::connect( gModel, SIGNAL( lengthChanged() ), - this, SLOT( updateGraph() ) ); + QObject::connect( gModel, SIGNAL(lengthChanged()), + this, SLOT(updateGraph())); } void Graph::setForeground( const QPixmap &_pixmap ) @@ -435,11 +435,11 @@ void Graph::modelChanged() { graphModel * gModel = castModel(); - QObject::connect( gModel, SIGNAL( samplesChanged( int, int ) ), - this, SLOT( updateGraph( int, int ) ) ); + QObject::connect( gModel, SIGNAL(samplesChanged(int,int)), + this, SLOT(updateGraph(int,int))); - QObject::connect( gModel, SIGNAL( lengthChanged() ), - this, SLOT( updateGraph() ) ); + QObject::connect( gModel, SIGNAL(lengthChanged()), + this, SLOT(updateGraph())); } diff --git a/src/gui/widgets/Knob.cpp b/src/gui/widgets/Knob.cpp index f6a1163a7..5a3d220ed 100644 --- a/src/gui/widgets/Knob.cpp +++ b/src/gui/widgets/Knob.cpp @@ -515,7 +515,7 @@ void Knob::contextMenuEvent( QContextMenuEvent * ) addDefaultActions( &contextMenu ); contextMenu.addAction( QPixmap(), model()->isScaleLogarithmic() ? tr( "Set linear" ) : tr( "Set logarithmic" ), - this, SLOT( toggleScale() ) ); + this, SLOT(toggleScale())); contextMenu.addSeparator(); contextMenu.exec( QCursor::pos() ); } @@ -829,11 +829,11 @@ void Knob::doConnections() { if( model() != nullptr ) { - QObject::connect( model(), SIGNAL( dataChanged() ), - this, SLOT( friendlyUpdate() ) ); + QObject::connect( model(), SIGNAL(dataChanged()), + this, SLOT(friendlyUpdate())); - QObject::connect( model(), SIGNAL( propertiesChanged() ), - this, SLOT( update() ) ); + QObject::connect( model(), SIGNAL(propertiesChanged()), + this, SLOT(update())); } } diff --git a/src/gui/widgets/Oscilloscope.cpp b/src/gui/widgets/Oscilloscope.cpp index cd028f637..bec45c162 100644 --- a/src/gui/widgets/Oscilloscope.cpp +++ b/src/gui/widgets/Oscilloscope.cpp @@ -91,17 +91,17 @@ void Oscilloscope::setActive( bool _active ) if( m_active ) { connect( getGUI()->mainWindow(), - SIGNAL( periodicUpdate() ), - this, SLOT( update() ) ); + SIGNAL(periodicUpdate()), + this, SLOT(update())); connect( Engine::audioEngine(), - SIGNAL( nextAudioBuffer( const lmms::surroundSampleFrame* ) ), - this, SLOT( updateAudioBuffer( const lmms::surroundSampleFrame* ) ) ); + SIGNAL(nextAudioBuffer(const lmms::surroundSampleFrame*)), + this, SLOT(updateAudioBuffer(const lmms::surroundSampleFrame*)) ); } else { disconnect( getGUI()->mainWindow(), - SIGNAL( periodicUpdate() ), - this, SLOT( update() ) ); + SIGNAL(periodicUpdate()), + this, SLOT(update())); disconnect( Engine::audioEngine(), SIGNAL( nextAudioBuffer( const lmms::surroundSampleFrame* ) ), this, SLOT( updateAudioBuffer( const lmms::surroundSampleFrame* ) ) ); diff --git a/src/gui/widgets/TabBar.cpp b/src/gui/widgets/TabBar.cpp index 007f78194..ccb879db6 100644 --- a/src/gui/widgets/TabBar.cpp +++ b/src/gui/widgets/TabBar.cpp @@ -55,7 +55,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 ); - connect( b, SIGNAL( clicked( int ) ), this, SLOT( tabClicked( int ) ) ); + connect( b, SIGNAL(clicked(int)), this, SLOT(tabClicked(int))); b->setIconSize( QSize( 48, 48 ) ); b->setFixedSize( 64, 64 ); b->show(); diff --git a/src/gui/widgets/TempoSyncKnob.cpp b/src/gui/widgets/TempoSyncKnob.cpp index 47da424d4..86ee6df3c 100644 --- a/src/gui/widgets/TempoSyncKnob.cpp +++ b/src/gui/widgets/TempoSyncKnob.cpp @@ -75,10 +75,10 @@ void TempoSyncKnob::modelChanged() { m_custom->setModel( &model()->m_custom ); } - connect( model(), SIGNAL( syncModeChanged( lmms::TempoSyncKnobModel::TempoSyncMode ) ), - this, SLOT( updateDescAndIcon() ) ); - connect( this, SIGNAL( sliderMoved( float ) ), - model(), SLOT( disableSync() ) ); + connect( model(), SIGNAL(syncModeChanged(lmms::TempoSyncKnobModel::TempoSyncMode)), + this, SLOT(updateDescAndIcon())); + connect( this, SIGNAL(sliderMoved(float)), + model(), SLOT(disableSync())); updateDescAndIcon(); } @@ -101,8 +101,8 @@ void TempoSyncKnob::contextMenuEvent( QContextMenuEvent * ) if( limit / 8.0f <= model()->maxValue() ) { - connect( syncMenu, SIGNAL( triggered( QAction * ) ), - model(), SLOT( setTempoSync( QAction * ) ) ); + connect( syncMenu, SIGNAL(triggered(QAction*)), + model(), SLOT(setTempoSync(QAction*))); syncMenu->addAction( embed::getIconPixmap( "note_none" ), tr( "No Sync" ) )->setData( (int) TempoSyncKnobModel::SyncNone ); if( limit / 0.125f <= model()->maxValue() ) @@ -146,7 +146,7 @@ void TempoSyncKnob::contextMenuEvent( QContextMenuEvent * ) (int) TempoSyncKnobModel::SyncThirtysecondNote ); syncMenu->addAction( embed::getIconPixmap( "dont_know" ), tr( "Custom..." ), - this, SLOT( showCustom() ) + this, SLOT(showCustom()) )->setData( (int) TempoSyncKnobModel::SyncCustom ); contextMenu.addSeparator(); diff --git a/src/gui/widgets/TextFloat.cpp b/src/gui/widgets/TextFloat.cpp index a43c91c80..6b9871d3e 100644 --- a/src/gui/widgets/TextFloat.cpp +++ b/src/gui/widgets/TextFloat.cpp @@ -81,7 +81,7 @@ void TextFloat::setPixmap( const QPixmap & _pixmap ) void TextFloat::setVisibilityTimeOut( int _msecs ) { - QTimer::singleShot( _msecs, this, SLOT( hide() ) ); + QTimer::singleShot( _msecs, this, SLOT(hide())); show(); } @@ -106,7 +106,7 @@ TextFloat * TextFloat::displayMessage( const QString & _msg, int _timeout, if( _timeout > 0 ) { tf->setAttribute( Qt::WA_DeleteOnClose, true ); - QTimer::singleShot( _timeout, tf, SLOT( close() ) ); + QTimer::singleShot( _timeout, tf, SLOT(close())); } return( tf ); } diff --git a/src/gui/widgets/TimeDisplayWidget.cpp b/src/gui/widgets/TimeDisplayWidget.cpp index c2cd11b1b..cefa0fa8f 100644 --- a/src/gui/widgets/TimeDisplayWidget.cpp +++ b/src/gui/widgets/TimeDisplayWidget.cpp @@ -55,8 +55,8 @@ TimeDisplayWidget::TimeDisplayWidget() : // update labels of LCD spinboxes setDisplayMode( m_displayMode ); - connect( getGUI()->mainWindow(), SIGNAL( periodicUpdate() ), - this, SLOT( updateTime() ) ); + connect( getGUI()->mainWindow(), SIGNAL(periodicUpdate()), + this, SLOT(updateTime())); } void TimeDisplayWidget::setDisplayMode( DisplayMode displayMode ) diff --git a/src/gui/widgets/ToolButton.cpp b/src/gui/widgets/ToolButton.cpp index 4feb038f0..366fd21f2 100644 --- a/src/gui/widgets/ToolButton.cpp +++ b/src/gui/widgets/ToolButton.cpp @@ -38,7 +38,7 @@ ToolButton::ToolButton( const QPixmap & _pixmap, const QString & _tooltip, if( _receiver != nullptr && _slot != nullptr ) { - connect( this, SIGNAL( clicked() ), _receiver, _slot ); + connect( this, SIGNAL(clicked()), _receiver, _slot ); } setToolTip(_tooltip); setIcon( _pixmap ); diff --git a/src/tracks/MidiClip.cpp b/src/tracks/MidiClip.cpp index ef693ba5b..5b017a7f9 100644 --- a/src/tracks/MidiClip.cpp +++ b/src/tracks/MidiClip.cpp @@ -132,8 +132,8 @@ void MidiClip::resizeToFirstTrack() void MidiClip::init() { - connect( Engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ), - this, SLOT( changeTimeSignature() ) ); + connect( Engine::getSong(), SIGNAL(timeSignatureChanged(int,int)), + this, SLOT(changeTimeSignature())); saveJournallingState( false ); updateLength(); diff --git a/src/tracks/PatternTrack.cpp b/src/tracks/PatternTrack.cpp index df7766c57..851db7f6c 100644 --- a/src/tracks/PatternTrack.cpp +++ b/src/tracks/PatternTrack.cpp @@ -51,7 +51,7 @@ PatternTrack::PatternTrack(TrackContainer* tc) : Engine::patternStore()->setCurrentPattern(patternNum); Engine::patternStore()->updateComboBox(); - connect( this, SIGNAL( nameChanged() ), + connect( this, SIGNAL(nameChanged()), Engine::patternStore(), SLOT(updateComboBox())); } From c5cdab2601dd53f45c47e11ddd0f5eb5748b8ad5 Mon Sep 17 00:00:00 2001 From: Levin Oehlmann Date: Fri, 24 Jun 2022 19:38:44 +0200 Subject: [PATCH 11/17] clang-tidy: Apply modernize-use-bool-literals (#6448) ... and remove never-executed code: This removes a condition that was always true and two statements guarded by conditions that were always false. --- plugins/LadspaEffect/caps/Amp.cc | 7 ++----- plugins/LadspaEffect/caps/dsp/Delay.h | 3 --- plugins/MidiImport/MidiImport.cpp | 2 +- plugins/ZynAddSubFx/LocalZynAddSubFx.cpp | 2 +- src/core/audio/AudioOss.cpp | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/plugins/LadspaEffect/caps/Amp.cc b/plugins/LadspaEffect/caps/Amp.cc index 8bf49fd53..74bde2b75 100644 --- a/plugins/LadspaEffect/caps/Amp.cc +++ b/plugins/LadspaEffect/caps/Amp.cc @@ -388,9 +388,7 @@ AmpV::one_cycle (int frames) v = v * v * .06 + .46; a = filter[0].process (a + normal); - if (0) - a = filter[2].process (a); - + a = g * (a + supply * .001); a = v * tube.transfer_clip (up.upsample (a)); @@ -399,8 +397,7 @@ AmpV::one_cycle (int frames) a = down.process (a); a = filter[1].process (a - normal); - if (1) - a = filter[2].process (a + normal); + a = filter[2].process (a + normal); { for (int o = 1; o < OVERSAMPLE; ++o) diff --git a/plugins/LadspaEffect/caps/dsp/Delay.h b/plugins/LadspaEffect/caps/dsp/Delay.h index ab18d894c..29b03fd78 100644 --- a/plugins/LadspaEffect/caps/dsp/Delay.h +++ b/plugins/LadspaEffect/caps/dsp/Delay.h @@ -154,9 +154,6 @@ class DelayTapA int n; fistp (f, n); /* read: n = (int) f; relies on FPTruncateMode */ f -= n; - if (0 && f < .5) - f += 1, - n -= 1; sample_t x = d[n]; f = (1 - f) / (1 + f); diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index e9962838c..73ea4d8c2 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -605,7 +605,7 @@ invalid_format: } // search for "data" chunk - while( 1 ) + while( true ) { const int id = readID(); const int len = read32LE(); diff --git a/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp b/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp index fd1d2b838..2b0c0d974 100644 --- a/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp +++ b/plugins/ZynAddSubFx/LocalZynAddSubFx.cpp @@ -86,7 +86,7 @@ LocalZynAddSubFx::LocalZynAddSubFx() : m_ioEngine = new NulEngine; m_master = new Master(); - m_master->swaplr = 0; + m_master->swaplr = false; } diff --git a/src/core/audio/AudioOss.cpp b/src/core/audio/AudioOss.cpp index 76f10a61e..4480e399c 100644 --- a/src/core/audio/AudioOss.cpp +++ b/src/core/audio/AudioOss.cpp @@ -219,7 +219,7 @@ QString AudioOss::probeDevice() if( QFileInfo( dev ).isWritable() == false ) { int instance = -1; - while( 1 ) + while( true ) { dev = PATH_DEV_DSP + QString::number( ++instance ); if( !QFileInfo( dev ).exists() ) From e72d9d46b8e9d47e46843516fd4b6b1a7db2593e Mon Sep 17 00:00:00 2001 From: Levin Oehlmann Date: Sat, 25 Jun 2022 00:53:01 +0200 Subject: [PATCH 12/17] Add missing gui:: prefixes to types in AudioSoundIo (#6447) Fixup of #6174 . --- include/AudioSoundIo.h | 6 +++--- src/core/audio/AudioSoundIo.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/AudioSoundIo.h b/include/AudioSoundIo.h index 411f4ab22..c85f13252 100644 --- a/include/AudioSoundIo.h +++ b/include/AudioSoundIo.h @@ -70,7 +70,7 @@ public: return QT_TRANSLATE_NOOP( "AudioDeviceSetupWidget", "soundio" ); } - class setupWidget : public AudioDeviceSetupWidget + class setupWidget : public gui::AudioDeviceSetupWidget { public: setupWidget( QWidget * _parent ); @@ -84,8 +84,8 @@ public: private: AudioSoundIoSetupUtil m_setupUtil; - ComboBox * m_backend; - ComboBox * m_device; + gui::ComboBox * m_backend; + gui::ComboBox * m_device; ComboBoxModel m_backendModel; ComboBoxModel m_deviceModel; diff --git a/src/core/audio/AudioSoundIo.cpp b/src/core/audio/AudioSoundIo.cpp index a25d968df..165e38cde 100644 --- a/src/core/audio/AudioSoundIo.cpp +++ b/src/core/audio/AudioSoundIo.cpp @@ -455,14 +455,14 @@ AudioSoundIo::setupWidget::setupWidget( QWidget * _parent ) : { m_setupUtil.m_setupWidget = this; - m_backend = new ComboBox( this, "BACKEND" ); + m_backend = new gui::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 gui::ComboBox( this, "DEVICE" ); m_device->setGeometry( 64, 35, 260, 20 ); QLabel * dev_lbl = new QLabel( tr( "Device" ), this ); From cd7f26b36c6e2246b9dec0f96f162508c21bbd96 Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Sat, 25 Jun 2022 01:14:59 +0200 Subject: [PATCH 13/17] Split lines in .clang-tidy [ci skip] See, for example: https://stackoverflow.com/questions/60723010/clang-tidy-file-how-to-list-the-checks-in-multiple-lines --- .clang-tidy | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 0f978c1de..cc5b8d836 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,12 @@ --- -Checks: 'bugprone-macro-parentheses,bugprone-macro-repeated-side-effects,modernize-use-override,readability-identifier-naming,readability-misleading-indentation,readability-simplify-boolean-expr,readability-braces-around-statements' +Checks: > + bugprone-macro-parentheses, + bugprone-macro-repeated-side-effects, + modernize-use-override, + readability-identifier-naming, + readability-misleading-indentation, + readability-simplify-boolean-expr, + readability-braces-around-statements WarningsAsErrors: '' HeaderFilterRegex: '' # don't show errors from headers AnalyzeTemporaryDtors: false From 95843759cc60bcabea26f98cda6176ef261fe75c Mon Sep 17 00:00:00 2001 From: Johannes Lorenz Date: Sat, 25 Jun 2022 01:17:35 +0200 Subject: [PATCH 14/17] Update .clang-tidy [ci skip] --- .clang-tidy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index cc5b8d836..aff46bba6 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -2,7 +2,13 @@ Checks: > bugprone-macro-parentheses, bugprone-macro-repeated-side-effects, + modernize-redundant-void-arg, + modernize-use-bool-literals, + modernize-use-emplace, + modernize-use-equals-default, + modernize-use-equals-delete, modernize-use-override, + performance-trivially-destructible, readability-identifier-naming, readability-misleading-indentation, readability-simplify-boolean-expr, From 28ec71f91a37844012a2f2f84729419c73426f3b Mon Sep 17 00:00:00 2001 From: Levin Oehlmann Date: Sun, 26 Jun 2022 08:48:24 +0200 Subject: [PATCH 15/17] clang-tidy: Apply modernize-use-equals-default everywhere (#6450) --- include/AudioAlsa.h | 2 +- include/AudioDeviceSetupWidget.h | 2 +- include/AudioDummy.h | 4 +--- include/AudioEngineProfiler.h | 2 +- include/AudioSdl.h | 2 +- include/AudioSndio.h | 2 +- include/AudioSoundIo.h | 2 +- include/AutomatableSlider.h | 2 +- include/AutomationClipView.h | 2 +- include/AutomationEditor.h | 2 +- include/BandLimitedWave.h | 4 ++-- include/BasicFilters.h | 6 +++--- include/CPULoadWidget.h | 2 +- include/CaptionMenu.h | 2 +- include/ColorChooser.h | 2 +- include/ComboBox.h | 2 +- include/ControllerDialog.h | 2 +- include/ControllerRackView.h | 2 +- include/Controls.h | 10 ++++----- include/DataFile.h | 2 +- include/DetuningHelper.h | 4 +--- include/DrumSynth.h | 2 +- include/DummyEffect.h | 8 ++----- include/DummyInstrument.h | 4 +--- include/DummyPlugin.h | 4 +--- include/Editor.h | 2 +- include/EffectControlDialog.h | 2 +- include/EffectControls.h | 4 +--- include/EnvelopeAndLfoParameters.h | 8 ++----- include/ExportFilter.h | 2 +- include/FadeButton.h | 2 +- include/ImportFilter.h | 2 +- include/InstrumentFunctions.h | 4 ++-- include/InstrumentMidiIOView.h | 2 +- include/InstrumentPlayHandle.h | 4 +--- include/InstrumentSoundShaping.h | 2 +- include/InstrumentView.h | 2 +- include/Ladspa2LMMS.h | 2 +- include/LadspaControl.h | 2 +- include/LadspaControlView.h | 2 +- include/LinkedModelGroupViews.h | 2 +- include/LinkedModelGroups.h | 2 +- include/LmmsPalette.h | 2 +- include/LmmsStyle.h | 4 +--- include/LocklessAllocator.h | 4 +--- include/LocklessRingBuffer.h | 2 +- include/Lv2Ports.h | 6 +++--- include/Lv2ViewBase.h | 2 +- include/MeterDialog.h | 2 +- include/MeterModel.h | 4 ++-- include/MicroTimer.h | 2 +- include/MidiClient.h | 6 +++--- include/MidiController.h | 2 +- include/MidiDummy.h | 8 ++----- include/MidiEvent.h | 11 +--------- include/MidiEventProcessor.h | 8 ++----- include/MidiPortMenu.h | 2 +- include/Mixer.h | 2 +- include/MixerLineLcdSpinBox.h | 2 +- include/Model.h | 4 +--- include/ModelVisitor.h | 4 ++-- include/PatternEditor.h | 2 +- include/PatternStore.h | 2 +- include/PeakController.h | 2 +- include/PianoRoll.h | 2 +- include/PixmapButton.h | 2 +- include/Plugin.h | 6 ++---- include/PluginFactory.h | 2 +- include/ProjectJournal.h | 2 +- include/ProjectNotes.h | 2 +- include/ProjectRenderer.h | 2 +- include/RemotePluginBase.h | 6 +----- include/RenameDialog.h | 2 +- include/Rubberband.h | 6 ++---- include/SampleTrackWindow.h | 2 +- include/SideBar.h | 2 +- include/SideBarWidget.h | 2 +- include/SongEditor.h | 2 +- include/SweepOscillator.h | 4 +--- include/TabButton.h | 4 +--- include/TempoSyncKnobModel.h | 2 +- include/TextFloat.h | 4 +--- include/ToolPlugin.h | 2 +- include/TrackContainerView.h | 2 +- include/TrackContentWidget.h | 2 +- include/TrackLabelButton.h | 2 +- include/TrackOperationsWidget.h | 2 +- include/TrackView.h | 2 +- include/ValueBuffer.h | 2 +- include/embed.h | 4 +--- include/shared_object.h | 4 +--- plugins/Amplifier/Amplifier.cpp | 3 --- plugins/Amplifier/Amplifier.h | 2 +- plugins/Amplifier/AmplifierControlDialog.h | 4 +--- plugins/Amplifier/AmplifierControls.h | 4 +--- .../AudioFileProcessor/AudioFileProcessor.cpp | 3 --- .../AudioFileProcessor/AudioFileProcessor.h | 2 +- plugins/BassBooster/BassBooster.cpp | 3 --- plugins/BassBooster/BassBooster.h | 2 +- .../BassBooster/BassBoosterControlDialog.h | 4 +--- plugins/BassBooster/BassBoosterControls.h | 4 +--- plugins/BitInvader/BitInvader.cpp | 4 ---- plugins/BitInvader/BitInvader.h | 4 ++-- plugins/Bitcrush/BitcrushControlDialog.h | 4 +--- plugins/Bitcrush/BitcrushControls.cpp | 3 --- plugins/Bitcrush/BitcrushControls.h | 2 +- plugins/Compressor/Compressor.cpp | 5 ----- plugins/Compressor/Compressor.h | 2 +- .../CrossoverEQ/CrossoverEQControlDialog.h | 4 +--- plugins/CrossoverEQ/CrossoverEQControls.h | 2 +- plugins/Delay/DelayControls.h | 4 +--- plugins/Delay/DelayControlsDialog.h | 6 ++---- plugins/Delay/Lfo.h | 4 +--- plugins/DualFilter/DualFilterControlDialog.h | 4 +--- plugins/DualFilter/DualFilterControls.h | 4 +--- .../DynamicsProcessorControlDialog.h | 4 +--- .../DynamicsProcessorControls.h | 4 +--- plugins/Eq/EqControls.h | 4 +--- plugins/Eq/EqControlsDialog.h | 4 +--- plugins/Eq/EqEffect.cpp | 7 ------- plugins/Eq/EqEffect.h | 2 +- plugins/Eq/EqFader.h | 4 +--- plugins/Eq/EqSpectrumView.h | 4 +--- plugins/Flanger/FlangerControls.h | 4 +--- plugins/Flanger/FlangerControlsDialog.h | 4 +--- plugins/FreeBoy/FreeBoy.cpp | 10 --------- plugins/FreeBoy/FreeBoy.h | 4 ++-- plugins/FreeBoy/Gb_Apu_Buffer.cpp | 3 --- plugins/FreeBoy/Gb_Apu_Buffer.h | 4 ++-- plugins/GigPlayer/GigPlayer.cpp | 7 ------- plugins/GigPlayer/GigPlayer.h | 2 +- plugins/GigPlayer/PatchesDialog.cpp | 8 ------- plugins/GigPlayer/PatchesDialog.h | 2 +- plugins/HydrogenImport/HydrogenImport.cpp | 3 --- plugins/HydrogenImport/HydrogenImport.h | 2 +- plugins/Kicker/Kicker.cpp | 14 ------------- plugins/Kicker/Kicker.h | 4 ++-- plugins/Kicker/KickerOsc.h | 4 +--- plugins/LadspaBrowser/LadspaBrowser.cpp | 14 ------------- plugins/LadspaBrowser/LadspaBrowser.h | 4 ++-- plugins/LadspaBrowser/LadspaDescription.cpp | 7 ------- plugins/LadspaBrowser/LadspaDescription.h | 2 +- plugins/LadspaBrowser/LadspaPortDialog.cpp | 5 ----- plugins/LadspaBrowser/LadspaPortDialog.h | 2 +- plugins/LadspaEffect/LadspaControlDialog.cpp | 7 ------- plugins/LadspaEffect/LadspaControlDialog.h | 2 +- plugins/Lb302/Lb302.cpp | 5 ----- plugins/Lb302/Lb302.h | 4 ++-- plugins/MidiExport/MidiExport.cpp | 6 ------ plugins/MidiExport/MidiExport.h | 2 +- plugins/MidiImport/MidiImport.cpp | 7 ------- plugins/MidiImport/MidiImport.h | 2 +- plugins/MidiImport/portsmf/allegro.h | 10 ++++----- plugins/MidiImport/portsmf/allegrosmfwr.cpp | 7 +------ plugins/Monstro/Monstro.cpp | 15 ------------- plugins/Monstro/Monstro.h | 6 +++--- .../MultitapEcho/MultitapEchoControlDialog.h | 4 +--- plugins/MultitapEcho/MultitapEchoControls.cpp | 5 ----- plugins/MultitapEcho/MultitapEchoControls.h | 2 +- plugins/Nes/Nes.cpp | 15 ------------- plugins/Nes/Nes.h | 6 +++--- plugins/Organic/Organic.cpp | 7 ------- plugins/Organic/Organic.h | 6 ++---- plugins/Patman/Patman.cpp | 7 ------- plugins/Patman/Patman.h | 2 +- .../PeakControllerEffectControlDialog.h | 4 +--- .../PeakControllerEffectControls.h | 4 +--- plugins/ReverbSC/ReverbSCControlDialog.h | 4 +--- plugins/ReverbSC/ReverbSCControls.h | 4 +--- plugins/Sf2Player/PatchesDialog.cpp | 6 ------ plugins/Sf2Player/PatchesDialog.h | 2 +- plugins/Sf2Player/Sf2Player.cpp | 7 ------- plugins/Sf2Player/Sf2Player.h | 2 +- plugins/Sfxr/Sfxr.cpp | 15 ------------- plugins/Sfxr/Sfxr.h | 6 +++--- plugins/Sid/SidInstrument.cpp | 14 ------------- plugins/Sid/SidInstrument.h | 10 ++++----- plugins/SpectrumAnalyzer/SaControls.h | 2 +- plugins/SpectrumAnalyzer/SaControlsDialog.h | 2 +- plugins/SpectrumAnalyzer/SaSpectrumView.h | 2 +- plugins/SpectrumAnalyzer/SaWaterfallView.h | 2 +- .../StereoEnhancerControlDialog.h | 4 +--- .../StereoEnhancer/StereoEnhancerControls.h | 4 +--- plugins/StereoMatrix/StereoMatrix.cpp | 6 ------ plugins/StereoMatrix/StereoMatrix.h | 2 +- .../StereoMatrix/StereoMatrixControlDialog.h | 4 +--- plugins/StereoMatrix/StereoMatrixControls.h | 4 +--- plugins/Stk/Mallets/Mallets.cpp | 13 ------------ plugins/Stk/Mallets/Mallets.h | 4 ++-- plugins/TripleOscillator/TripleOscillator.cpp | 14 ------------- plugins/TripleOscillator/TripleOscillator.h | 8 +++---- plugins/Vectorscope/VecControls.h | 2 +- plugins/Vectorscope/VecControlsDialog.h | 2 +- plugins/Vectorscope/VectorView.h | 2 +- plugins/Vectorscope/Vectorscope.h | 2 +- plugins/Vestige/Vestige.cpp | 11 +--------- plugins/Vestige/Vestige.h | 2 +- plugins/Vibed/Vibed.h | 2 +- plugins/VstEffect/VstEffect.cpp | 7 ------- plugins/VstEffect/VstEffect.h | 2 +- plugins/Watsyn/Watsyn.cpp | 11 ---------- plugins/Watsyn/Watsyn.h | 4 ++-- plugins/WaveShaper/WaveShaper.cpp | 7 ------- plugins/WaveShaper/WaveShaper.h | 2 +- plugins/WaveShaper/WaveShaperControlDialog.h | 4 +--- plugins/WaveShaper/WaveShaperControls.h | 4 +--- src/common/SharedMemory.cpp | 5 ++--- src/core/AudioEngineProfiler.cpp | 5 ----- src/core/DataFile.cpp | 6 ------ src/core/ImportFilter.cpp | 6 ------ src/core/InstrumentFunctions.cpp | 9 -------- src/core/InstrumentSoundShaping.cpp | 5 ----- src/core/Ladspa2LMMS.cpp | 6 ------ src/core/LadspaControl.cpp | 7 ------- src/core/LinkedModelGroups.cpp | 5 ----- src/core/MeterModel.cpp | 9 -------- src/core/MicroTimer.cpp | 4 ---- src/core/Mixer.cpp | 5 ----- src/core/ModelVisitor.cpp | 4 ---- src/core/PatternStore.cpp | 7 ------- src/core/Plugin.cpp | 7 ------- src/core/PluginFactory.cpp | 4 ---- src/core/PresetPreviewPlayHandle.cpp | 4 +--- src/core/ProjectJournal.cpp | 7 ------- src/core/ProjectRenderer.cpp | 7 ------- src/core/TempoSyncKnobModel.cpp | 7 ------- src/core/ToolPlugin.cpp | 7 ------- src/core/ValueBuffer.cpp | 3 --- src/core/audio/AudioSdl.cpp | 7 ------- src/core/audio/AudioSndio.cpp | 6 ------ src/core/audio/AudioSoundIo.cpp | 4 ---- src/core/lv2/Lv2ControlBase.cpp | 2 +- src/core/lv2/Lv2Ports.cpp | 9 -------- src/core/lv2/Lv2Proc.cpp | 4 +--- src/core/midi/MidiClient.cpp | 21 ------------------- src/core/midi/MidiController.cpp | 7 ------- src/gui/AudioDeviceSetupWidget.cpp | 4 ---- src/gui/ControllerDialog.cpp | 6 ------ src/gui/ControllerRackView.cpp | 7 ------- src/gui/Controls.cpp | 16 -------------- src/gui/EffectControlDialog.cpp | 7 ------- src/gui/LadspaControlView.cpp | 6 ------ src/gui/LinkedModelGroupViews.cpp | 5 ----- src/gui/LmmsPalette.cpp | 4 ---- src/gui/Lv2ViewBase.cpp | 5 ----- src/gui/MixerView.cpp | 2 +- src/gui/PeakControllerDialog.cpp | 6 ------ src/gui/ProjectNotes.cpp | 7 ------- src/gui/SampleTrackWindow.cpp | 5 ----- src/gui/SideBar.cpp | 7 ------- src/gui/SideBarWidget.cpp | 7 ------- src/gui/clips/AutomationClipView.cpp | 7 ------- src/gui/editors/AutomationEditor.cpp | 5 ----- src/gui/editors/Editor.cpp | 5 ----- src/gui/editors/PatternEditor.cpp | 5 ----- src/gui/editors/PianoRoll.cpp | 5 ----- src/gui/editors/Rubberband.cpp | 7 ------- src/gui/editors/SongEditor.cpp | 4 ---- src/gui/editors/TrackContainerView.cpp | 7 ------- src/gui/instrument/InstrumentMidiIOView.cpp | 6 ------ src/gui/instrument/InstrumentView.cpp | 4 ---- src/gui/menus/MidiPortMenu.cpp | 6 ------ src/gui/modals/ControllerConnectionDialog.cpp | 4 +--- src/gui/modals/RenameDialog.cpp | 6 ------ src/gui/tracks/FadeButton.cpp | 5 ----- src/gui/tracks/TrackContentWidget.cpp | 8 ------- src/gui/tracks/TrackLabelButton.cpp | 5 ----- src/gui/tracks/TrackOperationsWidget.cpp | 7 ------- src/gui/tracks/TrackView.cpp | 6 ------ src/gui/widgets/AutomatableSlider.cpp | 4 ---- src/gui/widgets/CPULoadWidget.cpp | 4 ---- src/gui/widgets/CaptionMenu.cpp | 4 ---- src/gui/widgets/ComboBox.cpp | 4 ---- src/gui/widgets/MeterDialog.cpp | 4 ---- src/gui/widgets/PixmapButton.cpp | 4 ---- 275 files changed, 223 insertions(+), 1034 deletions(-) diff --git a/include/AudioAlsa.h b/include/AudioAlsa.h index 6bbd4aecd..7149aa320 100644 --- a/include/AudioAlsa.h +++ b/include/AudioAlsa.h @@ -54,7 +54,7 @@ public: m_deviceName(deviceName), m_deviceDescription(deviceDescription) {} - ~DeviceInfo() {} + ~DeviceInfo() = default; QString const & getDeviceName() const { return m_deviceName; } QString const & getDeviceDescription() const { return m_deviceDescription; } diff --git a/include/AudioDeviceSetupWidget.h b/include/AudioDeviceSetupWidget.h index 392cbd3a4..e984651e4 100644 --- a/include/AudioDeviceSetupWidget.h +++ b/include/AudioDeviceSetupWidget.h @@ -36,7 +36,7 @@ class AudioDeviceSetupWidget : public TabWidget public: AudioDeviceSetupWidget( const QString & _caption, QWidget * _parent ); - ~AudioDeviceSetupWidget() override; + ~AudioDeviceSetupWidget() override = default; virtual void saveSettings() = 0; diff --git a/include/AudioDummy.h b/include/AudioDummy.h index 3677bf451..30b125b3a 100644 --- a/include/AudioDummy.h +++ b/include/AudioDummy.h @@ -62,9 +62,7 @@ public: { } - ~setupWidget() override - { - } + ~setupWidget() override = default; void saveSettings() override { diff --git a/include/AudioEngineProfiler.h b/include/AudioEngineProfiler.h index 136c6dbea..38631c6a9 100644 --- a/include/AudioEngineProfiler.h +++ b/include/AudioEngineProfiler.h @@ -37,7 +37,7 @@ class AudioEngineProfiler { public: AudioEngineProfiler(); - ~AudioEngineProfiler(); + ~AudioEngineProfiler() = default; void startPeriod() { diff --git a/include/AudioSdl.h b/include/AudioSdl.h index c3b9d27d3..7e7710a2f 100644 --- a/include/AudioSdl.h +++ b/include/AudioSdl.h @@ -61,7 +61,7 @@ public: { public: setupWidget( QWidget * _parent ); - ~setupWidget() override; + ~setupWidget() override = default; void saveSettings() override; diff --git a/include/AudioSndio.h b/include/AudioSndio.h index 993a44432..b2da8eac0 100644 --- a/include/AudioSndio.h +++ b/include/AudioSndio.h @@ -63,7 +63,7 @@ public: { public: setupWidget( QWidget * _parent ); - ~setupWidget() override; + ~setupWidget() override = default; void saveSettings() override; diff --git a/include/AudioSoundIo.h b/include/AudioSoundIo.h index c85f13252..dc9afe7e4 100644 --- a/include/AudioSoundIo.h +++ b/include/AudioSoundIo.h @@ -51,7 +51,7 @@ class AudioSoundIoSetupUtil : public QObject { Q_OBJECT public: - virtual ~AudioSoundIoSetupUtil(); + virtual ~AudioSoundIoSetupUtil() = default; void *m_setupWidget; public slots: diff --git a/include/AutomatableSlider.h b/include/AutomatableSlider.h index cadaaf8db..1c74a05ad 100644 --- a/include/AutomatableSlider.h +++ b/include/AutomatableSlider.h @@ -39,7 +39,7 @@ class AutomatableSlider : public QSlider, public IntModelView Q_OBJECT public: AutomatableSlider( QWidget * _parent, const QString & _name = QString() ); - ~AutomatableSlider() override; + ~AutomatableSlider() override = default; bool showStatus() { diff --git a/include/AutomationClipView.h b/include/AutomationClipView.h index 1a2e80248..b4de7839c 100644 --- a/include/AutomationClipView.h +++ b/include/AutomationClipView.h @@ -45,7 +45,7 @@ class AutomationClipView : public ClipView public: AutomationClipView( AutomationClip * _clip, TrackView * _parent ); - ~AutomationClipView() override; + ~AutomationClipView() override = default; public slots: /// Opens this view's clip in the global automation editor diff --git a/include/AutomationEditor.h b/include/AutomationEditor.h index c710c5007..dfb983e9a 100644 --- a/include/AutomationEditor.h +++ b/include/AutomationEditor.h @@ -255,7 +255,7 @@ class AutomationEditorWindow : public Editor static const int INITIAL_HEIGHT = 480; public: AutomationEditorWindow(); - ~AutomationEditorWindow() override; + ~AutomationEditorWindow() override = default; void setCurrentClip(AutomationClip* clip); const AutomationClip* currentClip(); diff --git a/include/BandLimitedWave.h b/include/BandLimitedWave.h index 30d28d4a1..c65505327 100644 --- a/include/BandLimitedWave.h +++ b/include/BandLimitedWave.h @@ -97,8 +97,8 @@ public: NumBLWaveforms }; - BandLimitedWave() {}; - virtual ~BandLimitedWave() {}; + BandLimitedWave() = default; + virtual ~BandLimitedWave() = default; /*! \brief This method converts frequency to wavelength. The oscillate function takes wavelength as argument so * use this to convert your note frequency to wavelength before using it. diff --git a/include/BasicFilters.h b/include/BasicFilters.h index 10b5b24b7..da64c3bc5 100644 --- a/include/BasicFilters.h +++ b/include/BasicFilters.h @@ -58,7 +58,7 @@ public: m_sampleRate = sampleRate; clearHistory(); } - virtual ~LinkwitzRiley() {} + virtual ~LinkwitzRiley() = default; inline void clearHistory() { @@ -152,7 +152,7 @@ public: { clearHistory(); } - virtual ~BiQuad() {} + virtual ~BiQuad() = default; inline void setCoeffs( float a1, float a2, float b0, float b1, float b2 ) { @@ -200,7 +200,7 @@ public: m_z1[i] = 0.0; } } - virtual ~OnePole() {} + virtual ~OnePole() = default; inline void setCoeffs( float a0, float b1 ) { diff --git a/include/CPULoadWidget.h b/include/CPULoadWidget.h index 31aecb016..dd2747ef2 100644 --- a/include/CPULoadWidget.h +++ b/include/CPULoadWidget.h @@ -43,7 +43,7 @@ class CPULoadWidget : public QWidget Q_OBJECT public: CPULoadWidget( QWidget * _parent ); - ~CPULoadWidget() override; + ~CPULoadWidget() override = default; protected: diff --git a/include/CaptionMenu.h b/include/CaptionMenu.h index a3724e127..f6a2fff25 100644 --- a/include/CaptionMenu.h +++ b/include/CaptionMenu.h @@ -41,7 +41,7 @@ class LMMS_EXPORT CaptionMenu : public QMenu Q_OBJECT public: CaptionMenu( const QString & _title, QWidget * _parent = 0 ); - ~CaptionMenu() override; + ~CaptionMenu() override = default; } ; diff --git a/include/ColorChooser.h b/include/ColorChooser.h index 9b3389c47..5482a9a03 100644 --- a/include/ColorChooser.h +++ b/include/ColorChooser.h @@ -40,7 +40,7 @@ public: ColorChooser(const QColor &initial, QWidget *parent): QColorDialog(initial, parent) {}; ColorChooser(QWidget *parent): QColorDialog(parent) {}; //! For getting a color without having to initialise a color dialog - ColorChooser() {}; + ColorChooser() = default; enum class Palette {Default, Track, Mixer}; //! Set global palette via array, checking bounds void setPalette (QVector); diff --git a/include/ComboBox.h b/include/ComboBox.h index 9b51d87ab..9a0e5a517 100644 --- a/include/ComboBox.h +++ b/include/ComboBox.h @@ -40,7 +40,7 @@ class LMMS_EXPORT ComboBox : public QWidget, public IntModelView Q_OBJECT public: ComboBox( QWidget* parent = nullptr, const QString& name = QString() ); - ~ComboBox() override; + ~ComboBox() override = default; ComboBoxModel* model() { diff --git a/include/ControllerDialog.h b/include/ControllerDialog.h index 351afd66a..4f496ad77 100644 --- a/include/ControllerDialog.h +++ b/include/ControllerDialog.h @@ -44,7 +44,7 @@ class ControllerDialog : public QWidget, public ModelView public: ControllerDialog( Controller * _controller, QWidget * _parent ); - ~ControllerDialog() override; + ~ControllerDialog() override = default; signals: diff --git a/include/ControllerRackView.h b/include/ControllerRackView.h index a522071c8..904e523dd 100644 --- a/include/ControllerRackView.h +++ b/include/ControllerRackView.h @@ -53,7 +53,7 @@ class ControllerRackView : public QWidget, public SerializingObject Q_OBJECT public: ControllerRackView(); - ~ControllerRackView() override; + ~ControllerRackView() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/include/Controls.h b/include/Controls.h index af2a5fa71..9ffed465e 100644 --- a/include/Controls.h +++ b/include/Controls.h @@ -66,7 +66,7 @@ public: virtual AutomatableModel* model() = 0; virtual AutomatableModelView* modelView() = 0; - virtual ~Control(); + virtual ~Control() = default; }; @@ -83,7 +83,7 @@ public: AutomatableModelView* modelView() override; KnobControl(QWidget* parent = nullptr); - ~KnobControl() override; + ~KnobControl() override = default; }; @@ -102,7 +102,7 @@ public: AutomatableModelView* modelView() override; ComboControl(QWidget* parent = nullptr); - ~ComboControl() override; + ~ComboControl() override = default; }; @@ -119,7 +119,7 @@ public: AutomatableModelView* modelView() override; LcdControl(int numDigits, QWidget* parent = nullptr); - ~LcdControl() override; + ~LcdControl() override = default; }; @@ -138,7 +138,7 @@ public: AutomatableModelView* modelView() override; CheckControl(QWidget* parent = nullptr); - ~CheckControl() override; + ~CheckControl() override = default; }; diff --git a/include/DataFile.h b/include/DataFile.h index c17b3546f..42dc2eabd 100644 --- a/include/DataFile.h +++ b/include/DataFile.h @@ -67,7 +67,7 @@ public: DataFile( const QByteArray& data ); DataFile( Type type ); - virtual ~DataFile(); + virtual ~DataFile() = default; /// /// \brief validate diff --git a/include/DetuningHelper.h b/include/DetuningHelper.h index c67ae41c6..f90af3697 100644 --- a/include/DetuningHelper.h +++ b/include/DetuningHelper.h @@ -42,9 +42,7 @@ public: { } - ~DetuningHelper() override - { - } + ~DetuningHelper() override = default; float defaultValue() const override { diff --git a/include/DrumSynth.h b/include/DrumSynth.h index 28121fc75..98574f2d2 100644 --- a/include/DrumSynth.h +++ b/include/DrumSynth.h @@ -37,7 +37,7 @@ namespace lmms class DrumSynth { public: - DrumSynth() {}; + DrumSynth() = default; int GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sample_rate_t Fs); private: diff --git a/include/DummyEffect.h b/include/DummyEffect.h index 637feaba1..675249865 100644 --- a/include/DummyEffect.h +++ b/include/DummyEffect.h @@ -60,9 +60,7 @@ public: { } - ~DummyEffectControls() override - { - } + ~DummyEffectControls() override = default; int controlCount() override { @@ -102,9 +100,7 @@ public: setName(); } - ~DummyEffect() override - { - } + ~DummyEffect() override = default; EffectControls * controls() override { diff --git a/include/DummyInstrument.h b/include/DummyInstrument.h index 7f85d83b5..a40d8338f 100644 --- a/include/DummyInstrument.h +++ b/include/DummyInstrument.h @@ -47,9 +47,7 @@ public: { } - ~DummyInstrument() override - { - } + ~DummyInstrument() override = default; void playNote( NotePlayHandle *, sampleFrame * buffer ) override { diff --git a/include/DummyPlugin.h b/include/DummyPlugin.h index fd98b831c..cf36d2159 100644 --- a/include/DummyPlugin.h +++ b/include/DummyPlugin.h @@ -41,9 +41,7 @@ public: { } - ~DummyPlugin() override - { - } + ~DummyPlugin() override = default; void saveSettings( QDomDocument &, QDomElement & ) override { diff --git a/include/Editor.h b/include/Editor.h index 60760f2b4..1a39ea72f 100644 --- a/include/Editor.h +++ b/include/Editor.h @@ -81,7 +81,7 @@ protected: /// \param record If set true, the editor's toolbar will contain record /// buttons in addition to the play and stop buttons. Editor(bool record = false, bool record_step = false); - ~Editor() override; + ~Editor() override = default; DropToolBar* m_toolBar; diff --git a/include/EffectControlDialog.h b/include/EffectControlDialog.h index 59e422264..6389db4a3 100644 --- a/include/EffectControlDialog.h +++ b/include/EffectControlDialog.h @@ -44,7 +44,7 @@ class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView Q_OBJECT public: EffectControlDialog( EffectControls * _controls ); - ~EffectControlDialog() override; + ~EffectControlDialog() override = default; virtual bool isResizable() const {return false;} diff --git a/include/EffectControls.h b/include/EffectControls.h index 95ef0039c..994145a40 100644 --- a/include/EffectControls.h +++ b/include/EffectControls.h @@ -51,9 +51,7 @@ public: { } - ~EffectControls() override - { - } + ~EffectControls() override = default; virtual int controlCount() = 0; virtual gui::EffectControlDialog * createView() = 0; diff --git a/include/EnvelopeAndLfoParameters.h b/include/EnvelopeAndLfoParameters.h index 7b630b1b0..042068cce 100644 --- a/include/EnvelopeAndLfoParameters.h +++ b/include/EnvelopeAndLfoParameters.h @@ -50,13 +50,9 @@ public: class LfoInstances { public: - LfoInstances() - { - } + LfoInstances() = default; - ~LfoInstances() - { - } + ~LfoInstances() = default; inline bool isEmpty() const { diff --git a/include/ExportFilter.h b/include/ExportFilter.h index 3aaa2f986..29efef539 100644 --- a/include/ExportFilter.h +++ b/include/ExportFilter.h @@ -40,7 +40,7 @@ class LMMS_EXPORT ExportFilter : public Plugin { public: ExportFilter( const Descriptor * _descriptor ) : Plugin( _descriptor, nullptr ) {} - ~ExportFilter() override {} + ~ExportFilter() override = default; virtual bool tryExport(const TrackContainer::TrackList &tracks, diff --git a/include/FadeButton.h b/include/FadeButton.h index b4a78d5ee..d33900913 100644 --- a/include/FadeButton.h +++ b/include/FadeButton.h @@ -44,7 +44,7 @@ public: const QColor & _hold_color, QWidget * _parent ); - ~FadeButton() override; + ~FadeButton() override = default; void setActiveColor( const QColor & activated_color ); diff --git a/include/ImportFilter.h b/include/ImportFilter.h index 9635fedb5..b7a910e5d 100644 --- a/include/ImportFilter.h +++ b/include/ImportFilter.h @@ -42,7 +42,7 @@ class LMMS_EXPORT ImportFilter : public Plugin public: ImportFilter( const QString & _file_name, const Descriptor * _descriptor ); - ~ImportFilter() override; + ~ImportFilter() override = default; // tries to import given file to given track-container by having all diff --git a/include/InstrumentFunctions.h b/include/InstrumentFunctions.h index 76e522bc5..ede54144f 100644 --- a/include/InstrumentFunctions.h +++ b/include/InstrumentFunctions.h @@ -58,7 +58,7 @@ private: public: InstrumentFunctionNoteStacking( Model * _parent ); - ~InstrumentFunctionNoteStacking() override; + ~InstrumentFunctionNoteStacking() override = default; void processNote( NotePlayHandle* n ); @@ -180,7 +180,7 @@ public: } ; InstrumentFunctionArpeggio( Model * _parent ); - ~InstrumentFunctionArpeggio() override; + ~InstrumentFunctionArpeggio() override = default; void processNote( NotePlayHandle* n ); diff --git a/include/InstrumentMidiIOView.h b/include/InstrumentMidiIOView.h index 821488390..81feee082 100644 --- a/include/InstrumentMidiIOView.h +++ b/include/InstrumentMidiIOView.h @@ -50,7 +50,7 @@ class InstrumentMidiIOView : public QWidget, public ModelView Q_OBJECT public: InstrumentMidiIOView( QWidget* parent ); - ~InstrumentMidiIOView() override; + ~InstrumentMidiIOView() override = default; private: diff --git a/include/InstrumentPlayHandle.h b/include/InstrumentPlayHandle.h index 2935d36ba..e9516ab19 100644 --- a/include/InstrumentPlayHandle.h +++ b/include/InstrumentPlayHandle.h @@ -38,9 +38,7 @@ class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle public: InstrumentPlayHandle( Instrument * instrument, InstrumentTrack* instrumentTrack ); - ~InstrumentPlayHandle() override - { - } + ~InstrumentPlayHandle() override = default; void play( sampleFrame * _working_buffer ) override diff --git a/include/InstrumentSoundShaping.h b/include/InstrumentSoundShaping.h index 1df6b858b..11ed4f1c4 100644 --- a/include/InstrumentSoundShaping.h +++ b/include/InstrumentSoundShaping.h @@ -46,7 +46,7 @@ class InstrumentSoundShaping : public Model, public JournallingObject Q_OBJECT public: InstrumentSoundShaping( InstrumentTrack * _instrument_track ); - ~InstrumentSoundShaping() override; + ~InstrumentSoundShaping() override = default; void processAudioBuffer( sampleFrame * _ab, const fpp_t _frames, NotePlayHandle * _n ); diff --git a/include/InstrumentView.h b/include/InstrumentView.h index 695e8c477..ab18465eb 100644 --- a/include/InstrumentView.h +++ b/include/InstrumentView.h @@ -70,7 +70,7 @@ class LMMS_EXPORT InstrumentViewFixedSize : public InstrumentView public: using InstrumentView::InstrumentView; - ~InstrumentViewFixedSize() override; + ~InstrumentViewFixedSize() override = default; } ; diff --git a/include/Ladspa2LMMS.h b/include/Ladspa2LMMS.h index b1a21de70..4b7eb2482 100644 --- a/include/Ladspa2LMMS.h +++ b/include/Ladspa2LMMS.h @@ -68,7 +68,7 @@ public: private: Ladspa2LMMS(); - ~Ladspa2LMMS() override; + ~Ladspa2LMMS() override = default; l_sortable_plugin_t m_instruments; l_sortable_plugin_t m_validEffects; diff --git a/include/LadspaControl.h b/include/LadspaControl.h index 3a0ea5cc8..712c1ba1e 100644 --- a/include/LadspaControl.h +++ b/include/LadspaControl.h @@ -52,7 +52,7 @@ class LMMS_EXPORT LadspaControl : public Model, public JournallingObject public: LadspaControl( Model * _parent, port_desc_t * _port, bool _link = false ); - ~LadspaControl() override; + ~LadspaControl() override = default; LADSPA_Data value(); ValueBuffer * valueBuffer(); diff --git a/include/LadspaControlView.h b/include/LadspaControlView.h index c36135986..5dafa4e5c 100644 --- a/include/LadspaControlView.h +++ b/include/LadspaControlView.h @@ -43,7 +43,7 @@ class LMMS_EXPORT LadspaControlView : public QWidget, public ModelView Q_OBJECT public: LadspaControlView( QWidget * _parent, LadspaControl * _ctl ); - ~LadspaControlView() override; + ~LadspaControlView() override = default; private: LadspaControl * m_ctl; diff --git a/include/LinkedModelGroupViews.h b/include/LinkedModelGroupViews.h index 91a8d53ca..72598281b 100644 --- a/include/LinkedModelGroupViews.h +++ b/include/LinkedModelGroupViews.h @@ -70,7 +70,7 @@ public: */ LinkedModelGroupView(QWidget* parent, LinkedModelGroup* model, std::size_t colNum); - ~LinkedModelGroupView() override; + ~LinkedModelGroupView() override = default; //! Reconnect models if model changed void modelChanged(LinkedModelGroup* linkedModelGroup); diff --git a/include/LinkedModelGroups.h b/include/LinkedModelGroups.h index 9fa0fefa6..84a216f30 100644 --- a/include/LinkedModelGroups.h +++ b/include/LinkedModelGroups.h @@ -155,7 +155,7 @@ private: class LinkedModelGroups { public: - virtual ~LinkedModelGroups(); + virtual ~LinkedModelGroups() = default; void linkAllModels(); diff --git a/include/LmmsPalette.h b/include/LmmsPalette.h index 1840fb3eb..b07aa5c84 100644 --- a/include/LmmsPalette.h +++ b/include/LmmsPalette.h @@ -50,7 +50,7 @@ class LMMS_EXPORT LmmsPalette : public QWidget public: LmmsPalette( QWidget * parent, QStyle * stylearg ); - ~LmmsPalette() override; + ~LmmsPalette() override = default; #define ACCESSMET( read, write ) \ QColor read () const; \ diff --git a/include/LmmsStyle.h b/include/LmmsStyle.h index cfab2cd66..ae5b65f99 100644 --- a/include/LmmsStyle.h +++ b/include/LmmsStyle.h @@ -66,9 +66,7 @@ public: }; LmmsStyle(); - ~LmmsStyle() override - { - } + ~LmmsStyle() override = default; QPalette standardPalette() const override; diff --git a/include/LocklessAllocator.h b/include/LocklessAllocator.h index 054bb91e8..adde5fe6f 100644 --- a/include/LocklessAllocator.h +++ b/include/LocklessAllocator.h @@ -67,9 +67,7 @@ public: { } - ~LocklessAllocatorT() override - { - } + ~LocklessAllocatorT() override = default; T * alloc() { diff --git a/include/LocklessRingBuffer.h b/include/LocklessRingBuffer.h index 60f8ab989..e77c62ccb 100644 --- a/include/LocklessRingBuffer.h +++ b/include/LocklessRingBuffer.h @@ -46,7 +46,7 @@ public: { m_buffer.touch(); // reserve storage space before realtime operation starts } - ~LocklessRingBuffer() {}; + ~LocklessRingBuffer() = default; std::size_t capacity() const {return m_buffer.maximum_eventual_write_space();} std::size_t free() const {return m_buffer.write_space();} diff --git a/include/Lv2Ports.h b/include/Lv2Ports.h index 22a051a21..48c46dfb1 100644 --- a/include/Lv2Ports.h +++ b/include/Lv2Ports.h @@ -92,7 +92,7 @@ struct ConstVisitor virtual void visit(const Lv2Ports::AtomSeq& ) {} virtual void visit(const Lv2Ports::Unknown& ) {} - virtual ~ConstVisitor(); + virtual ~ConstVisitor() = default; }; struct Visitor @@ -104,7 +104,7 @@ struct Visitor virtual void visit(Lv2Ports::AtomSeq& ) {} virtual void visit(Lv2Ports::Unknown& ) {} - virtual ~Visitor(); + virtual ~Visitor() = default; }; struct Meta @@ -139,7 +139,7 @@ struct PortBase : public Meta QString name() const; QString uri() const; - virtual ~PortBase(); + virtual ~PortBase() = default; }; template diff --git a/include/Lv2ViewBase.h b/include/Lv2ViewBase.h index 2be5d72a4..605440814 100644 --- a/include/Lv2ViewBase.h +++ b/include/Lv2ViewBase.h @@ -58,7 +58,7 @@ class Lv2ViewProc : public LinkedModelGroupView public: //! @param colNum numbers of columns for the controls Lv2ViewProc(QWidget *parent, Lv2Proc *ctrlBase, int colNum); - ~Lv2ViewProc() override; + ~Lv2ViewProc() override = default; private: static AutoLilvNode uri(const char *uriStr); diff --git a/include/MeterDialog.h b/include/MeterDialog.h index e744ea9d4..67dca2568 100644 --- a/include/MeterDialog.h +++ b/include/MeterDialog.h @@ -41,7 +41,7 @@ class MeterDialog : public QWidget, public ModelView Q_OBJECT public: MeterDialog( QWidget * _parent, bool _simple = false ); - ~MeterDialog() override; + ~MeterDialog() override = default; void modelChanged() override; diff --git a/include/MeterModel.h b/include/MeterModel.h index 8ed4ba1aa..c2e715b79 100644 --- a/include/MeterModel.h +++ b/include/MeterModel.h @@ -31,14 +31,14 @@ namespace lmms { -class MeterModel : public Model +class LMMS_EXPORT MeterModel : public Model { Q_OBJECT mapPropertyFromModel(int,getNumerator,setNumerator,m_numeratorModel); mapPropertyFromModel(int,getDenominator,setDenominator,m_denominatorModel); public: MeterModel( Model * _parent ); - ~MeterModel() override; + ~MeterModel() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _this, const QString & _name ); diff --git a/include/MicroTimer.h b/include/MicroTimer.h index 4daf28edd..ea74e964d 100644 --- a/include/MicroTimer.h +++ b/include/MicroTimer.h @@ -36,7 +36,7 @@ class MicroTimer public: MicroTimer(); - ~MicroTimer(); + ~MicroTimer() = default; void reset(); int elapsed() const; diff --git a/include/MidiClient.h b/include/MidiClient.h index f5efc659a..954cd5ef5 100644 --- a/include/MidiClient.h +++ b/include/MidiClient.h @@ -45,7 +45,7 @@ class TimePos; class MidiClient { public: - MidiClient(); + MidiClient() = default; virtual ~MidiClient(); // to be implemented by sub-classes @@ -124,8 +124,8 @@ const uint32_t RAW_MIDI_PARSE_BUF_SIZE = 16; class MidiClientRaw : public MidiClient { public: - MidiClientRaw(); - ~MidiClientRaw() override; + MidiClientRaw() = default; + ~MidiClientRaw() override = default; // we are raw-clients for sure! bool isRaw() const override diff --git a/include/MidiController.h b/include/MidiController.h index 8b1db0476..500acc5f8 100644 --- a/include/MidiController.h +++ b/include/MidiController.h @@ -49,7 +49,7 @@ class MidiController : public Controller, public MidiEventProcessor Q_OBJECT public: MidiController( Model * _parent ); - ~MidiController() override; + ~MidiController() override = default; void processInEvent( const MidiEvent & _me, const TimePos & _time, f_cnt_t offset = 0 ) override; diff --git a/include/MidiDummy.h b/include/MidiDummy.h index e1c0e3e6a..67a91e326 100644 --- a/include/MidiDummy.h +++ b/include/MidiDummy.h @@ -35,12 +35,8 @@ namespace lmms class MidiDummy : public MidiClientRaw { public: - MidiDummy() - { - } - ~MidiDummy() override - { - } + MidiDummy() = default; + ~MidiDummy() override = default; inline static QString name() { diff --git a/include/MidiEvent.h b/include/MidiEvent.h index e73a7d1a8..6c2bfdd55 100644 --- a/include/MidiEvent.h +++ b/include/MidiEvent.h @@ -66,16 +66,7 @@ public: m_data.m_sysExDataLen = dataLen; } - MidiEvent( const MidiEvent& other ) : - m_type( other.m_type ), - m_metaEvent( other.m_metaEvent ), - m_channel( other.m_channel ), - m_data( other.m_data ), - m_sysExData( other.m_sysExData ), - m_sourcePort(other.m_sourcePort), - m_source(other.m_source) - { - } + MidiEvent( const MidiEvent& other ) = default; MidiEventTypes type() const { diff --git a/include/MidiEventProcessor.h b/include/MidiEventProcessor.h index 1398f4b6d..132a5fc42 100644 --- a/include/MidiEventProcessor.h +++ b/include/MidiEventProcessor.h @@ -37,13 +37,9 @@ class MidiEventProcessor { MM_OPERATORS public: - MidiEventProcessor() - { - } + MidiEventProcessor() = default; - virtual ~MidiEventProcessor() - { - } + virtual ~MidiEventProcessor() = default; // to be implemented by inheriting classes virtual void processInEvent( const MidiEvent& event, const TimePos& time = TimePos(), f_cnt_t offset = 0 ) = 0; diff --git a/include/MidiPortMenu.h b/include/MidiPortMenu.h index eb44ace57..215a73d06 100644 --- a/include/MidiPortMenu.h +++ b/include/MidiPortMenu.h @@ -41,7 +41,7 @@ class MidiPortMenu : public QMenu, public ModelView Q_OBJECT public: MidiPortMenu( MidiPort::Modes _mode ); - ~MidiPortMenu() override; + ~MidiPortMenu() override = default; public slots: diff --git a/include/Mixer.h b/include/Mixer.h index e6fdb2b06..efc103695 100644 --- a/include/Mixer.h +++ b/include/Mixer.h @@ -102,7 +102,7 @@ class MixerRoute : public QObject Q_OBJECT public: MixerRoute( MixerChannel * from, MixerChannel * to, float amount ); - ~MixerRoute() override; + ~MixerRoute() override = default; mix_ch_t senderIndex() const { diff --git a/include/MixerLineLcdSpinBox.h b/include/MixerLineLcdSpinBox.h index 51c7ab938..bfd6cd5c9 100644 --- a/include/MixerLineLcdSpinBox.h +++ b/include/MixerLineLcdSpinBox.h @@ -41,7 +41,7 @@ public: MixerLineLcdSpinBox(int numDigits, QWidget * parent, const QString& name, TrackView * tv = nullptr) : LcdSpinBox(numDigits, parent, name), m_tv(tv) {} - ~MixerLineLcdSpinBox() override {} + ~MixerLineLcdSpinBox() override = default; void setTrackView(TrackView * tv); diff --git a/include/Model.h b/include/Model.h index 1621d77e8..567d4ffd7 100644 --- a/include/Model.h +++ b/include/Model.h @@ -45,9 +45,7 @@ public: { } - ~Model() override - { - } + ~Model() override = default; bool isDefaultConstructed() { diff --git a/include/ModelVisitor.h b/include/ModelVisitor.h index cf0740b1c..8805e30e2 100644 --- a/include/ModelVisitor.h +++ b/include/ModelVisitor.h @@ -47,7 +47,7 @@ public: virtual void visit(FloatModel& m); virtual void visit(ComboBoxModel& m); virtual void visit(TempoSyncKnobModel& m); - virtual ~ModelVisitor(); + virtual ~ModelVisitor() = default; }; class ConstModelVisitor @@ -62,7 +62,7 @@ public: virtual void visit(const FloatModel& m); virtual void visit(const ComboBoxModel& m); virtual void visit(const TempoSyncKnobModel& m); - virtual ~ConstModelVisitor(); + virtual ~ConstModelVisitor() = default; }; diff --git a/include/PatternEditor.h b/include/PatternEditor.h index 15b141580..ffe08e335 100644 --- a/include/PatternEditor.h +++ b/include/PatternEditor.h @@ -80,7 +80,7 @@ class PatternEditorWindow : public Editor Q_OBJECT public: PatternEditorWindow(PatternStore* ps); - ~PatternEditorWindow(); + ~PatternEditorWindow() = default; QSize sizeHint() const override; diff --git a/include/PatternStore.h b/include/PatternStore.h index 58791e40d..7bd377941 100644 --- a/include/PatternStore.h +++ b/include/PatternStore.h @@ -68,7 +68,7 @@ class LMMS_EXPORT PatternStore : public TrackContainer mapPropertyFromModel(int, currentPattern, setCurrentPattern, m_patternComboBoxModel); public: PatternStore(); - ~PatternStore() override; + ~PatternStore() override = default; virtual bool play(TimePos start, const fpp_t frames, const f_cnt_t frameBase, int clipNum = -1); diff --git a/include/PeakController.h b/include/PeakController.h index 2999c5a2b..d8f721ea7 100644 --- a/include/PeakController.h +++ b/include/PeakController.h @@ -92,7 +92,7 @@ class PeakControllerDialog : public ControllerDialog Q_OBJECT public: PeakControllerDialog( Controller * _controller, QWidget * _parent ); - ~PeakControllerDialog() override; + ~PeakControllerDialog() override = default; protected: void contextMenuEvent( QContextMenuEvent * _me ) override; diff --git a/include/PianoRoll.h b/include/PianoRoll.h index 3d74a79d6..60cf01e1d 100644 --- a/include/PianoRoll.h +++ b/include/PianoRoll.h @@ -298,7 +298,7 @@ private: PianoRoll(); PianoRoll( const PianoRoll & ); - ~PianoRoll() override; + ~PianoRoll() override = default; void autoScroll(const TimePos & t ); diff --git a/include/PixmapButton.h b/include/PixmapButton.h index ec5ac1b28..6c37f9112 100644 --- a/include/PixmapButton.h +++ b/include/PixmapButton.h @@ -40,7 +40,7 @@ class LMMS_EXPORT PixmapButton : public AutomatableButton public: PixmapButton( QWidget * _parent, const QString & _name = QString() ); - ~PixmapButton() override; + ~PixmapButton() override = default; void setActiveGraphic( const QPixmap & _pm ); void setInactiveGraphic( const QPixmap & _pm, bool _update = true ); diff --git a/include/Plugin.h b/include/Plugin.h index da2deeaed..43164e0a5 100644 --- a/include/Plugin.h +++ b/include/Plugin.h @@ -187,9 +187,7 @@ public: { } - virtual ~SubPluginFeatures() - { - } + virtual ~SubPluginFeatures() = default; virtual void fillDescriptionWidget( QWidget *, const Key * ) const { @@ -244,7 +242,7 @@ public: //! See the key() function Plugin(const Descriptor * descriptor, Model * parent, const Descriptor::SubPluginFeatures::Key *key = nullptr); - ~Plugin() override; + ~Plugin() override = default; //! Return display-name out of sub plugin or descriptor QString displayName() const override; diff --git a/include/PluginFactory.h b/include/PluginFactory.h index c0e2ff8e0..2aa618f25 100644 --- a/include/PluginFactory.h +++ b/include/PluginFactory.h @@ -57,7 +57,7 @@ public: typedef QMultiMap DescriptorMap; PluginFactory(); - ~PluginFactory(); + ~PluginFactory() = default; static void setupSearchPaths(); diff --git a/include/ProjectJournal.h b/include/ProjectJournal.h index 69e0752cb..25207867b 100644 --- a/include/ProjectJournal.h +++ b/include/ProjectJournal.h @@ -46,7 +46,7 @@ public: static const int MAX_UNDO_STATES; ProjectJournal(); - virtual ~ProjectJournal(); + virtual ~ProjectJournal() = default; void undo(); void redo(); diff --git a/include/ProjectNotes.h b/include/ProjectNotes.h index 384f24f79..4b9476616 100644 --- a/include/ProjectNotes.h +++ b/include/ProjectNotes.h @@ -44,7 +44,7 @@ class LMMS_EXPORT ProjectNotes : public QMainWindow, public SerializingObject Q_OBJECT public: ProjectNotes(); - ~ProjectNotes() override; + ~ProjectNotes() override = default; void clear(); void setText( const QString & _text ); diff --git a/include/ProjectRenderer.h b/include/ProjectRenderer.h index 9fa0bc507..75537ed69 100644 --- a/include/ProjectRenderer.h +++ b/include/ProjectRenderer.h @@ -64,7 +64,7 @@ public: const OutputSettings & _os, ExportFileFormats _file_format, const QString & _out_file ); - ~ProjectRenderer() override; + ~ProjectRenderer() override = default; bool isReady() const { diff --git a/include/RemotePluginBase.h b/include/RemotePluginBase.h index 2abe59132..c5bf35bcb 100644 --- a/include/RemotePluginBase.h +++ b/include/RemotePluginBase.h @@ -390,11 +390,7 @@ public: { } - message( const message & _m ) : - id( _m.id ), - data( _m.data ) - { - } + message( const message & _m ) = default; message( int _id ) : id( _id ), diff --git a/include/RenameDialog.h b/include/RenameDialog.h index f2a289ee0..b543963d7 100644 --- a/include/RenameDialog.h +++ b/include/RenameDialog.h @@ -40,7 +40,7 @@ class RenameDialog : public QDialog Q_OBJECT public: RenameDialog( QString & _string ); - ~RenameDialog() override; + ~RenameDialog() override = default; protected: diff --git a/include/Rubberband.h b/include/Rubberband.h index b00d10dd6..d35233b4f 100644 --- a/include/Rubberband.h +++ b/include/Rubberband.h @@ -44,9 +44,7 @@ public: { } - ~selectableObject() override - { - } + ~selectableObject() override = default; inline void setSelected(bool selected) { @@ -80,7 +78,7 @@ class RubberBand : public QRubberBand { public: RubberBand( QWidget * _parent ); - ~RubberBand() override; + ~RubberBand() override = default; QVector selectedObjects() const; QVector selectableObjects() const; diff --git a/include/SampleTrackWindow.h b/include/SampleTrackWindow.h index fb4e3f5e8..d302b2c44 100644 --- a/include/SampleTrackWindow.h +++ b/include/SampleTrackWindow.h @@ -50,7 +50,7 @@ class SampleTrackWindow : public QWidget, public ModelView, public SerializingOb Q_OBJECT public: SampleTrackWindow(SampleTrackView * tv); - ~SampleTrackWindow() override; + ~SampleTrackWindow() override = default; SampleTrack * model() { diff --git a/include/SideBar.h b/include/SideBar.h index ba9fe11a6..6f1b15770 100644 --- a/include/SideBar.h +++ b/include/SideBar.h @@ -42,7 +42,7 @@ class SideBar : public QToolBar Q_OBJECT public: SideBar( Qt::Orientation _orientation, QWidget * _parent ); - ~SideBar() override; + ~SideBar() override = default; void appendTab( SideBarWidget * _sbw ); diff --git a/include/SideBarWidget.h b/include/SideBarWidget.h index 4b7ff4b2d..5df3ccb7a 100644 --- a/include/SideBarWidget.h +++ b/include/SideBarWidget.h @@ -41,7 +41,7 @@ class SideBarWidget : public QWidget public: SideBarWidget( const QString & _title, const QPixmap & _icon, QWidget * _parent ); - ~SideBarWidget() override; + ~SideBarWidget() override = default; inline const QPixmap & icon() const { diff --git a/include/SongEditor.h b/include/SongEditor.h index b848fe776..ea57cc125 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -66,7 +66,7 @@ public: }; SongEditor( Song * song ); - ~SongEditor() override; + ~SongEditor() override = default; void saveSettings( QDomDocument& doc, QDomElement& element ) override; void loadSettings( const QDomElement& element ) override; diff --git a/include/SweepOscillator.h b/include/SweepOscillator.h index 2e795be3b..f113ea0fa 100644 --- a/include/SweepOscillator.h +++ b/include/SweepOscillator.h @@ -41,9 +41,7 @@ public: { } - virtual ~SweepOscillator() - { - } + virtual ~SweepOscillator() = default; void update( sampleFrame* buf, const fpp_t frames, const float freq1, const float freq2, const float sampleRate ) { diff --git a/include/TabButton.h b/include/TabButton.h index 6d58cc10e..938230a91 100644 --- a/include/TabButton.h +++ b/include/TabButton.h @@ -45,9 +45,7 @@ public: SLOT( slotClicked() ) ); } - ~TabButton() override - { - } + ~TabButton() override = default; signals: diff --git a/include/TempoSyncKnobModel.h b/include/TempoSyncKnobModel.h index 1e6decfb9..1a18486ff 100644 --- a/include/TempoSyncKnobModel.h +++ b/include/TempoSyncKnobModel.h @@ -63,7 +63,7 @@ public: const float _max, const float _step, const float _scale, Model * _parent, const QString & _display_name = QString() ); - ~TempoSyncKnobModel() override; + ~TempoSyncKnobModel() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _this, const QString& name ) override; void loadSettings( const QDomElement & _this, const QString& name ) override; diff --git a/include/TextFloat.h b/include/TextFloat.h index 8a5ad9685..9fdabc06b 100644 --- a/include/TextFloat.h +++ b/include/TextFloat.h @@ -39,9 +39,7 @@ class LMMS_EXPORT TextFloat : public QWidget Q_OBJECT public: TextFloat(); - ~TextFloat() override - { - } + ~TextFloat() override = default; void setTitle( const QString & _title ); void setText( const QString & _text ); diff --git a/include/ToolPlugin.h b/include/ToolPlugin.h index 311757cf4..38f4d87b1 100644 --- a/include/ToolPlugin.h +++ b/include/ToolPlugin.h @@ -38,7 +38,7 @@ class LMMS_EXPORT ToolPlugin : public Plugin { public: ToolPlugin( const Descriptor * _descriptor, Model * _parent ); - ~ToolPlugin() override; + ~ToolPlugin() override = default; // instantiate tool-plugin with given name or return NULL // on failure diff --git a/include/TrackContainerView.h b/include/TrackContainerView.h index 7d9a648aa..7bc367c37 100644 --- a/include/TrackContainerView.h +++ b/include/TrackContainerView.h @@ -184,7 +184,7 @@ private: { public: scrollArea( TrackContainerView* parent ); - ~scrollArea() override; + ~scrollArea() override = default; protected: void wheelEvent( QWheelEvent * _we ) override; diff --git a/include/TrackContentWidget.h b/include/TrackContentWidget.h index 4fad4ceb0..bde2de33e 100644 --- a/include/TrackContentWidget.h +++ b/include/TrackContentWidget.h @@ -56,7 +56,7 @@ class TrackContentWidget : public QWidget, public JournallingObject public: TrackContentWidget( TrackView * parent ); - ~TrackContentWidget() override; + ~TrackContentWidget() override = default; /*! \brief Updates the background tile pixmap. */ void updateBackground(); diff --git a/include/TrackLabelButton.h b/include/TrackLabelButton.h index 30dd60d59..1a8d05e71 100644 --- a/include/TrackLabelButton.h +++ b/include/TrackLabelButton.h @@ -41,7 +41,7 @@ class TrackLabelButton : public QToolButton Q_OBJECT public: TrackLabelButton( TrackView * _tv, QWidget * _parent ); - ~TrackLabelButton() override; + ~TrackLabelButton() override = default; public slots: diff --git a/include/TrackOperationsWidget.h b/include/TrackOperationsWidget.h index 08b3e599e..edd9796ac 100644 --- a/include/TrackOperationsWidget.h +++ b/include/TrackOperationsWidget.h @@ -40,7 +40,7 @@ class TrackOperationsWidget : public QWidget Q_OBJECT public: TrackOperationsWidget( TrackView * parent ); - ~TrackOperationsWidget() override; + ~TrackOperationsWidget() override = default; protected: diff --git a/include/TrackView.h b/include/TrackView.h index f98579201..4b02c8015 100644 --- a/include/TrackView.h +++ b/include/TrackView.h @@ -64,7 +64,7 @@ class TrackView : public QWidget, public ModelView, public JournallingObject Q_OBJECT public: TrackView( Track * _track, TrackContainerView* tcv ); - ~TrackView() override; + ~TrackView() override = default; inline const Track * getTrack() const { diff --git a/include/ValueBuffer.h b/include/ValueBuffer.h index 24c8e0daa..950ad06f0 100644 --- a/include/ValueBuffer.h +++ b/include/ValueBuffer.h @@ -39,7 +39,7 @@ class LMMS_EXPORT ValueBuffer : public std::vector { MM_OPERATORS public: - ValueBuffer(); + ValueBuffer() = default; ValueBuffer(int length); void fill(float value); diff --git a/include/embed.h b/include/embed.h index d26fd643a..c8914ba47 100644 --- a/include/embed.h +++ b/include/embed.h @@ -96,9 +96,7 @@ public: return( QPixmap() ); } - virtual ~PixmapLoader() - { - } + virtual ~PixmapLoader() = default; virtual QString pixmapName() const { diff --git a/include/shared_object.h b/include/shared_object.h index e68186336..ac45d6cd7 100644 --- a/include/shared_object.h +++ b/include/shared_object.h @@ -39,9 +39,7 @@ public: { } - virtual ~sharedObject() - { - } + virtual ~sharedObject() = default; template static T* ref( T* object ) diff --git a/plugins/Amplifier/Amplifier.cpp b/plugins/Amplifier/Amplifier.cpp index 1212bcd6a..3fb03d3d9 100644 --- a/plugins/Amplifier/Amplifier.cpp +++ b/plugins/Amplifier/Amplifier.cpp @@ -60,9 +60,6 @@ AmplifierEffect::AmplifierEffect( Model* parent, const Descriptor::SubPluginFeat -AmplifierEffect::~AmplifierEffect() -{ -} diff --git a/plugins/Amplifier/Amplifier.h b/plugins/Amplifier/Amplifier.h index cc973cc27..38fd07c6f 100644 --- a/plugins/Amplifier/Amplifier.h +++ b/plugins/Amplifier/Amplifier.h @@ -37,7 +37,7 @@ class AmplifierEffect : public Effect { public: AmplifierEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - ~AmplifierEffect() override; + ~AmplifierEffect() override = default; bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; EffectControls* controls() override diff --git a/plugins/Amplifier/AmplifierControlDialog.h b/plugins/Amplifier/AmplifierControlDialog.h index fd2c7a338..ad0ed50ca 100644 --- a/plugins/Amplifier/AmplifierControlDialog.h +++ b/plugins/Amplifier/AmplifierControlDialog.h @@ -42,9 +42,7 @@ class AmplifierControlDialog : public EffectControlDialog Q_OBJECT public: AmplifierControlDialog( AmplifierControls* controls ); - ~AmplifierControlDialog() override - { - } + ~AmplifierControlDialog() override = default; } ; diff --git a/plugins/Amplifier/AmplifierControls.h b/plugins/Amplifier/AmplifierControls.h index 6382b27fe..573f6f896 100644 --- a/plugins/Amplifier/AmplifierControls.h +++ b/plugins/Amplifier/AmplifierControls.h @@ -45,9 +45,7 @@ class AmplifierControls : public EffectControls Q_OBJECT public: AmplifierControls( AmplifierEffect* effect ); - ~AmplifierControls() override - { - } + ~AmplifierControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/AudioFileProcessor/AudioFileProcessor.cpp b/plugins/AudioFileProcessor/AudioFileProcessor.cpp index 3d4319dd3..9f01a6499 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessor.cpp +++ b/plugins/AudioFileProcessor/AudioFileProcessor.cpp @@ -559,9 +559,6 @@ AudioFileProcessorView::AudioFileProcessorView( Instrument * _instrument, -AudioFileProcessorView::~AudioFileProcessorView() -{ -} diff --git a/plugins/AudioFileProcessor/AudioFileProcessor.h b/plugins/AudioFileProcessor/AudioFileProcessor.h index 30fcbc502..18edd2b4a 100644 --- a/plugins/AudioFileProcessor/AudioFileProcessor.h +++ b/plugins/AudioFileProcessor/AudioFileProcessor.h @@ -130,7 +130,7 @@ class AudioFileProcessorView : public gui::InstrumentViewFixedSize Q_OBJECT public: AudioFileProcessorView( Instrument * _instrument, QWidget * _parent ); - virtual ~AudioFileProcessorView(); + virtual ~AudioFileProcessorView() = default; void newWaveView(); protected slots: diff --git a/plugins/BassBooster/BassBooster.cpp b/plugins/BassBooster/BassBooster.cpp index 280accddb..77667c121 100644 --- a/plugins/BassBooster/BassBooster.cpp +++ b/plugins/BassBooster/BassBooster.cpp @@ -65,9 +65,6 @@ BassBoosterEffect::BassBoosterEffect( Model* parent, const Descriptor::SubPlugin -BassBoosterEffect::~BassBoosterEffect() -{ -} diff --git a/plugins/BassBooster/BassBooster.h b/plugins/BassBooster/BassBooster.h index 19eb9c50e..ea3ba2d98 100644 --- a/plugins/BassBooster/BassBooster.h +++ b/plugins/BassBooster/BassBooster.h @@ -37,7 +37,7 @@ class BassBoosterEffect : public Effect { public: BassBoosterEffect( Model* parent, const Descriptor::SubPluginFeatures::Key* key ); - ~BassBoosterEffect() override; + ~BassBoosterEffect() override = default; bool processAudioBuffer( sampleFrame* buf, const fpp_t frames ) override; EffectControls* controls() override diff --git a/plugins/BassBooster/BassBoosterControlDialog.h b/plugins/BassBooster/BassBoosterControlDialog.h index 968db7e60..6c510282e 100644 --- a/plugins/BassBooster/BassBoosterControlDialog.h +++ b/plugins/BassBooster/BassBoosterControlDialog.h @@ -40,9 +40,7 @@ class BassBoosterControlDialog : public EffectControlDialog Q_OBJECT public: BassBoosterControlDialog( BassBoosterControls* controls ); - ~BassBoosterControlDialog() override - { - } + ~BassBoosterControlDialog() override = default; } ; diff --git a/plugins/BassBooster/BassBoosterControls.h b/plugins/BassBooster/BassBoosterControls.h index 099862a02..bd93a5eb7 100644 --- a/plugins/BassBooster/BassBoosterControls.h +++ b/plugins/BassBooster/BassBoosterControls.h @@ -39,9 +39,7 @@ class BassBoosterControls : public EffectControls Q_OBJECT public: BassBoosterControls( BassBoosterEffect* effect ); - ~BassBoosterControls() override - { - } + ~BassBoosterControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/BitInvader/BitInvader.cpp b/plugins/BitInvader/BitInvader.cpp index 0bf063461..e319a9c24 100644 --- a/plugins/BitInvader/BitInvader.cpp +++ b/plugins/BitInvader/BitInvader.cpp @@ -171,10 +171,6 @@ BitInvader::BitInvader( InstrumentTrack * _instrument_track ) : -BitInvader::~BitInvader() -{ -} - diff --git a/plugins/BitInvader/BitInvader.h b/plugins/BitInvader/BitInvader.h index debdd37ea..a08640e99 100644 --- a/plugins/BitInvader/BitInvader.h +++ b/plugins/BitInvader/BitInvader.h @@ -74,7 +74,7 @@ class BitInvader : public Instrument Q_OBJECT public: BitInvader(InstrumentTrack * _instrument_track ); - ~BitInvader() override; + ~BitInvader() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -124,7 +124,7 @@ public: BitInvaderView( Instrument * _instrument, QWidget * _parent ); - ~BitInvaderView() override {}; + ~BitInvaderView() override = default; protected slots: //void sampleSizeChanged( float _new_sample_length ); diff --git a/plugins/Bitcrush/BitcrushControlDialog.h b/plugins/Bitcrush/BitcrushControlDialog.h index 9649d50f2..ac409c0ab 100644 --- a/plugins/Bitcrush/BitcrushControlDialog.h +++ b/plugins/Bitcrush/BitcrushControlDialog.h @@ -43,9 +43,7 @@ class BitcrushControlDialog : public EffectControlDialog Q_OBJECT public: BitcrushControlDialog( BitcrushControls * controls ); - ~BitcrushControlDialog() override - { - } + ~BitcrushControlDialog() override = default; }; diff --git a/plugins/Bitcrush/BitcrushControls.cpp b/plugins/Bitcrush/BitcrushControls.cpp index 9acd7d7c0..163c2c924 100644 --- a/plugins/Bitcrush/BitcrushControls.cpp +++ b/plugins/Bitcrush/BitcrushControls.cpp @@ -53,9 +53,6 @@ BitcrushControls::BitcrushControls( BitcrushEffect * eff ) : connect( Engine::audioEngine(), SIGNAL( sampleRateChanged() ), this, SLOT( sampleRateChanged() ) ); } -BitcrushControls::~BitcrushControls() -{ -} void BitcrushControls::saveSettings( QDomDocument & doc, QDomElement & elem ) { diff --git a/plugins/Bitcrush/BitcrushControls.h b/plugins/Bitcrush/BitcrushControls.h index 963fb298e..7514baae9 100644 --- a/plugins/Bitcrush/BitcrushControls.h +++ b/plugins/Bitcrush/BitcrushControls.h @@ -40,7 +40,7 @@ class BitcrushControls : public EffectControls Q_OBJECT public: BitcrushControls( BitcrushEffect * eff ); - ~BitcrushControls() override; + ~BitcrushControls() override = default; void saveSettings( QDomDocument & doc, QDomElement & elem ) override; void loadSettings( const QDomElement & elem ) override; diff --git a/plugins/Compressor/Compressor.cpp b/plugins/Compressor/Compressor.cpp index bf6928e21..312a40d3d 100755 --- a/plugins/Compressor/Compressor.cpp +++ b/plugins/Compressor/Compressor.cpp @@ -97,11 +97,6 @@ CompressorEffect::CompressorEffect(Model* parent, const Descriptor::SubPluginFea -CompressorEffect::~CompressorEffect() -{ -} - - float CompressorEffect::msToCoeff(float ms) { // Convert time in milliseconds to applicable lowpass coefficient diff --git a/plugins/Compressor/Compressor.h b/plugins/Compressor/Compressor.h index 9b81d9b70..121e0b88f 100755 --- a/plugins/Compressor/Compressor.h +++ b/plugins/Compressor/Compressor.h @@ -42,7 +42,7 @@ class CompressorEffect : public Effect Q_OBJECT public: CompressorEffect(Model* parent, const Descriptor::SubPluginFeatures::Key* key); - ~CompressorEffect() override; + ~CompressorEffect() override = default; bool processAudioBuffer(sampleFrame* buf, const fpp_t frames) override; EffectControls* controls() override diff --git a/plugins/CrossoverEQ/CrossoverEQControlDialog.h b/plugins/CrossoverEQ/CrossoverEQControlDialog.h index bad64a8bb..9ddb5d9bf 100644 --- a/plugins/CrossoverEQ/CrossoverEQControlDialog.h +++ b/plugins/CrossoverEQ/CrossoverEQControlDialog.h @@ -45,9 +45,7 @@ class CrossoverEQControlDialog : public EffectControlDialog Q_OBJECT public: CrossoverEQControlDialog( CrossoverEQControls * controls ); - ~CrossoverEQControlDialog() override - { - } + ~CrossoverEQControlDialog() override = default; private: QPixmap m_fader_bg; diff --git a/plugins/CrossoverEQ/CrossoverEQControls.h b/plugins/CrossoverEQ/CrossoverEQControls.h index 458300d89..715311aba 100644 --- a/plugins/CrossoverEQ/CrossoverEQControls.h +++ b/plugins/CrossoverEQ/CrossoverEQControls.h @@ -40,7 +40,7 @@ class CrossoverEQControls : public EffectControls Q_OBJECT public: CrossoverEQControls( CrossoverEQEffect * eff ); - ~CrossoverEQControls() override {} + ~CrossoverEQControls() override = default; void saveSettings( QDomDocument & doc, QDomElement & elem ) override; void loadSettings( const QDomElement & elem ) override; diff --git a/plugins/Delay/DelayControls.h b/plugins/Delay/DelayControls.h index 3d9393b76..b9eb663fc 100644 --- a/plugins/Delay/DelayControls.h +++ b/plugins/Delay/DelayControls.h @@ -40,9 +40,7 @@ class DelayControls : public EffectControls Q_OBJECT public: DelayControls( DelayEffect* effect ); - ~DelayControls() override - { - } + ~DelayControls() override = default; void saveSettings( QDomDocument& doc, QDomElement& parent ) override; void loadSettings( const QDomElement& _this ) override; inline QString nodeName() const override diff --git a/plugins/Delay/DelayControlsDialog.h b/plugins/Delay/DelayControlsDialog.h index 115287cda..c7ab58f45 100644 --- a/plugins/Delay/DelayControlsDialog.h +++ b/plugins/Delay/DelayControlsDialog.h @@ -42,9 +42,7 @@ class DelayControlsDialog : public EffectControlDialog Q_OBJECT public: DelayControlsDialog( DelayControls* controls ); - ~DelayControlsDialog() override - { - } + ~DelayControlsDialog() override = default; }; class XyPad : public QWidget @@ -52,7 +50,7 @@ class XyPad : public QWidget Q_OBJECT public: XyPad( QWidget *parent = 0, FloatModel *xModel = 0, FloatModel *yModel = 0 ); - ~XyPad() override {} + ~XyPad() override = default; protected: void paintEvent ( QPaintEvent * event ) override; diff --git a/plugins/Delay/Lfo.h b/plugins/Delay/Lfo.h index cb2d13f11..ea8435d13 100644 --- a/plugins/Delay/Lfo.h +++ b/plugins/Delay/Lfo.h @@ -36,9 +36,7 @@ class Lfo { public: Lfo( int samplerate ); - ~Lfo() - { - } + ~Lfo() = default; diff --git a/plugins/DualFilter/DualFilterControlDialog.h b/plugins/DualFilter/DualFilterControlDialog.h index 88b3fe17a..629eb2d9a 100644 --- a/plugins/DualFilter/DualFilterControlDialog.h +++ b/plugins/DualFilter/DualFilterControlDialog.h @@ -43,9 +43,7 @@ class DualFilterControlDialog : public EffectControlDialog Q_OBJECT public: DualFilterControlDialog( DualFilterControls* controls ); - ~DualFilterControlDialog() override - { - } + ~DualFilterControlDialog() override = default; } ; diff --git a/plugins/DualFilter/DualFilterControls.h b/plugins/DualFilter/DualFilterControls.h index a3676295d..379f96e32 100644 --- a/plugins/DualFilter/DualFilterControls.h +++ b/plugins/DualFilter/DualFilterControls.h @@ -42,9 +42,7 @@ class DualFilterControls : public EffectControls Q_OBJECT public: DualFilterControls( DualFilterEffect* effect ); - ~DualFilterControls() override - { - } + ~DualFilterControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h index 8b755620e..37608d4a3 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h +++ b/plugins/DynamicsProcessor/DynamicsProcessorControlDialog.h @@ -43,9 +43,7 @@ class DynProcControlDialog : public EffectControlDialog Q_OBJECT public: DynProcControlDialog( DynProcControls * _controls ); - ~DynProcControlDialog() override - { - } + ~DynProcControlDialog() override = default; private: diff --git a/plugins/DynamicsProcessor/DynamicsProcessorControls.h b/plugins/DynamicsProcessor/DynamicsProcessorControls.h index c68bdcc0c..cbe109eaf 100644 --- a/plugins/DynamicsProcessor/DynamicsProcessorControls.h +++ b/plugins/DynamicsProcessor/DynamicsProcessorControls.h @@ -49,9 +49,7 @@ public: NumStereoModes }; DynProcControls( DynProcEffect * _eff ); - ~DynProcControls() override - { - } + ~DynProcControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/Eq/EqControls.h b/plugins/Eq/EqControls.h index 9b0d67742..6db82f3e3 100644 --- a/plugins/Eq/EqControls.h +++ b/plugins/Eq/EqControls.h @@ -44,9 +44,7 @@ class EqControls : public EffectControls Q_OBJECT public: explicit EqControls( EqEffect* effect ); - ~EqControls() override - { - } + ~EqControls() override = default; void saveSettings ( QDomDocument& doc, QDomElement& parent ) override; diff --git a/plugins/Eq/EqControlsDialog.h b/plugins/Eq/EqControlsDialog.h index 1ec7e3e9a..52bb2ae19 100644 --- a/plugins/Eq/EqControlsDialog.h +++ b/plugins/Eq/EqControlsDialog.h @@ -47,9 +47,7 @@ class EqControlsDialog : public EffectControlDialog Q_OBJECT public: EqControlsDialog( EqControls * controls ); - ~EqControlsDialog() override - { - } + ~EqControlsDialog() override = default; EqBand * setBand( EqControls * controls ); diff --git a/plugins/Eq/EqEffect.cpp b/plugins/Eq/EqEffect.cpp index 12a10061b..be74defba 100644 --- a/plugins/Eq/EqEffect.cpp +++ b/plugins/Eq/EqEffect.cpp @@ -64,13 +64,6 @@ EqEffect::EqEffect( Model *parent, const Plugin::Descriptor::SubPluginFeatures:: -EqEffect::~EqEffect() -{ -} - - - - bool EqEffect::processAudioBuffer( sampleFrame *buf, const fpp_t frames ) { const int sampleRate = Engine::audioEngine()->processingSampleRate(); diff --git a/plugins/Eq/EqEffect.h b/plugins/Eq/EqEffect.h index e3bf6fd54..2d54c42a2 100644 --- a/plugins/Eq/EqEffect.h +++ b/plugins/Eq/EqEffect.h @@ -36,7 +36,7 @@ class EqEffect : public Effect { public: EqEffect( Model * parent , const Descriptor::SubPluginFeatures::Key * key ); - ~EqEffect() override; + ~EqEffect() override = default; bool processAudioBuffer( sampleFrame * buf, const fpp_t frames ) override; EffectControls * controls() override { diff --git a/plugins/Eq/EqFader.h b/plugins/Eq/EqFader.h index aec6a9e18..9db0fbe2d 100644 --- a/plugins/Eq/EqFader.h +++ b/plugins/Eq/EqFader.h @@ -72,9 +72,7 @@ public: - ~EqFader() override - { - } + ~EqFader() override = default; private slots: diff --git a/plugins/Eq/EqSpectrumView.h b/plugins/Eq/EqSpectrumView.h index f0a8fda3c..947c55434 100644 --- a/plugins/Eq/EqSpectrumView.h +++ b/plugins/Eq/EqSpectrumView.h @@ -74,9 +74,7 @@ class EqSpectrumView : public QWidget Q_OBJECT public: explicit EqSpectrumView( EqAnalyser *b, QWidget *_parent = 0 ); - ~EqSpectrumView() override - { - } + ~EqSpectrumView() override = default; QColor getColor() const; void setColor( const QColor &value ); diff --git a/plugins/Flanger/FlangerControls.h b/plugins/Flanger/FlangerControls.h index b004e5e33..079497962 100644 --- a/plugins/Flanger/FlangerControls.h +++ b/plugins/Flanger/FlangerControls.h @@ -39,9 +39,7 @@ class FlangerControls : public EffectControls Q_OBJECT public: FlangerControls( FlangerEffect* effect ); - ~FlangerControls() override - { - } + ~FlangerControls() override = default; void saveSettings ( QDomDocument& doc, QDomElement& parent ) override; void loadSettings ( const QDomElement &_this ) override; inline QString nodeName() const override diff --git a/plugins/Flanger/FlangerControlsDialog.h b/plugins/Flanger/FlangerControlsDialog.h index 587046ad7..47f746ef3 100644 --- a/plugins/Flanger/FlangerControlsDialog.h +++ b/plugins/Flanger/FlangerControlsDialog.h @@ -42,9 +42,7 @@ class FlangerControlsDialog : public EffectControlDialog Q_OBJECT public: FlangerControlsDialog( FlangerControls* controls ); - ~FlangerControlsDialog() override - { - } + ~FlangerControlsDialog() override = default; }; diff --git a/plugins/FreeBoy/FreeBoy.cpp b/plugins/FreeBoy/FreeBoy.cpp index 9f7085444..3829d691a 100644 --- a/plugins/FreeBoy/FreeBoy.cpp +++ b/plugins/FreeBoy/FreeBoy.cpp @@ -125,11 +125,6 @@ FreeBoyInstrument::FreeBoyInstrument( InstrumentTrack * _instrument_track ) : } -FreeBoyInstrument::~FreeBoyInstrument() -{ -} - - void FreeBoyInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this ) { @@ -684,11 +679,6 @@ FreeBoyInstrumentView::FreeBoyInstrumentView( Instrument * _instrument, } -FreeBoyInstrumentView::~FreeBoyInstrumentView() -{ -} - - void FreeBoyInstrumentView::modelChanged() { FreeBoyInstrument * p = castModel(); diff --git a/plugins/FreeBoy/FreeBoy.h b/plugins/FreeBoy/FreeBoy.h index 8b46a5e68..aecd2b188 100644 --- a/plugins/FreeBoy/FreeBoy.h +++ b/plugins/FreeBoy/FreeBoy.h @@ -52,7 +52,7 @@ class FreeBoyInstrument : public Instrument public: FreeBoyInstrument( InstrumentTrack * _instrument_track ); - ~FreeBoyInstrument() override; + ~FreeBoyInstrument() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -129,7 +129,7 @@ class FreeBoyInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: FreeBoyInstrumentView( Instrument * _instrument, QWidget * _parent ); - ~FreeBoyInstrumentView() override; + ~FreeBoyInstrumentView() override = default; private: void modelChanged() override; diff --git a/plugins/FreeBoy/Gb_Apu_Buffer.cpp b/plugins/FreeBoy/Gb_Apu_Buffer.cpp index f261bc9c0..ec1a36479 100644 --- a/plugins/FreeBoy/Gb_Apu_Buffer.cpp +++ b/plugins/FreeBoy/Gb_Apu_Buffer.cpp @@ -26,9 +26,6 @@ namespace lmms { -Gb_Apu_Buffer::Gb_Apu_Buffer() {} -Gb_Apu_Buffer::~Gb_Apu_Buffer() {} - void Gb_Apu_Buffer::end_frame(blip_time_t end_time) { Gb_Apu::end_frame(end_time); m_buf.end_frame(end_time); diff --git a/plugins/FreeBoy/Gb_Apu_Buffer.h b/plugins/FreeBoy/Gb_Apu_Buffer.h index 0b025bea0..980dfa3e5 100644 --- a/plugins/FreeBoy/Gb_Apu_Buffer.h +++ b/plugins/FreeBoy/Gb_Apu_Buffer.h @@ -34,8 +34,8 @@ namespace lmms class Gb_Apu_Buffer : public Gb_Apu { MM_OPERATORS public: - Gb_Apu_Buffer(); - ~Gb_Apu_Buffer(); + Gb_Apu_Buffer() = default; + ~Gb_Apu_Buffer() = default; void end_frame(blip_time_t); diff --git a/plugins/GigPlayer/GigPlayer.cpp b/plugins/GigPlayer/GigPlayer.cpp index 81a571ac7..5a6f39cc6 100644 --- a/plugins/GigPlayer/GigPlayer.cpp +++ b/plugins/GigPlayer/GigPlayer.cpp @@ -988,13 +988,6 @@ GigInstrumentView::GigInstrumentView( Instrument * _instrument, QWidget * _paren -GigInstrumentView::~GigInstrumentView() -{ -} - - - - void GigInstrumentView::modelChanged() { GigInstrument * k = castModel(); diff --git a/plugins/GigPlayer/GigPlayer.h b/plugins/GigPlayer/GigPlayer.h index 5adeddc3e..20058424b 100644 --- a/plugins/GigPlayer/GigPlayer.h +++ b/plugins/GigPlayer/GigPlayer.h @@ -352,7 +352,7 @@ class GigInstrumentView : public InstrumentViewFixedSize public: GigInstrumentView( Instrument * _instrument, QWidget * _parent ); - ~GigInstrumentView() override; + ~GigInstrumentView() override = default; private: void modelChanged() override; diff --git a/plugins/GigPlayer/PatchesDialog.cpp b/plugins/GigPlayer/PatchesDialog.cpp index 3f7035c61..c78c99f2c 100644 --- a/plugins/GigPlayer/PatchesDialog.cpp +++ b/plugins/GigPlayer/PatchesDialog.cpp @@ -107,14 +107,6 @@ PatchesDialog::PatchesDialog( QWidget * pParent, Qt::WindowFlags wflags ) -// Destructor. -PatchesDialog::~PatchesDialog() -{ -} - - - - // Dialog setup loader. void PatchesDialog::setup( GigInstance * pSynth, int iChan, const QString & chanName, diff --git a/plugins/GigPlayer/PatchesDialog.h b/plugins/GigPlayer/PatchesDialog.h index 4912f2bc1..c4aed9102 100644 --- a/plugins/GigPlayer/PatchesDialog.h +++ b/plugins/GigPlayer/PatchesDialog.h @@ -50,7 +50,7 @@ public: PatchesDialog(QWidget * pParent = 0, Qt::WindowFlags wflags = QFlag(0)); // Destructor. - ~PatchesDialog() override; + ~PatchesDialog() override = default; void setup( GigInstance * pSynth, int iChan, const QString & chanName, diff --git a/plugins/HydrogenImport/HydrogenImport.cpp b/plugins/HydrogenImport/HydrogenImport.cpp index 657597471..2f3a27e1f 100644 --- a/plugins/HydrogenImport/HydrogenImport.cpp +++ b/plugins/HydrogenImport/HydrogenImport.cpp @@ -134,9 +134,6 @@ HydrogenImport::HydrogenImport( const QString & _file ) : -HydrogenImport::~HydrogenImport() -{ -} Instrument * ins; bool HydrogenImport::readSong() { diff --git a/plugins/HydrogenImport/HydrogenImport.h b/plugins/HydrogenImport/HydrogenImport.h index a9398d18f..de4709051 100644 --- a/plugins/HydrogenImport/HydrogenImport.h +++ b/plugins/HydrogenImport/HydrogenImport.h @@ -15,7 +15,7 @@ public: HydrogenImport( const QString & _file ); bool readSong(); - ~HydrogenImport() override; + ~HydrogenImport() override = default; gui::PluginView* instantiateView( QWidget * ) override { diff --git a/plugins/Kicker/Kicker.cpp b/plugins/Kicker/Kicker.cpp index 6a3c0823a..f9f781aed 100644 --- a/plugins/Kicker/Kicker.cpp +++ b/plugins/Kicker/Kicker.cpp @@ -85,13 +85,6 @@ KickerInstrument::KickerInstrument( InstrumentTrack * _instrument_track ) : -KickerInstrument::~KickerInstrument() -{ -} - - - - void KickerInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this ) { @@ -342,13 +335,6 @@ KickerInstrumentView::KickerInstrumentView( Instrument * _instrument, -KickerInstrumentView::~KickerInstrumentView() -{ -} - - - - void KickerInstrumentView::modelChanged() { KickerInstrument * k = castModel(); diff --git a/plugins/Kicker/Kicker.h b/plugins/Kicker/Kicker.h index 10c77fe0f..22413c4db 100644 --- a/plugins/Kicker/Kicker.h +++ b/plugins/Kicker/Kicker.h @@ -54,7 +54,7 @@ class KickerInstrument : public Instrument Q_OBJECT public: KickerInstrument( InstrumentTrack * _instrument_track ); - ~KickerInstrument() override; + ~KickerInstrument() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -109,7 +109,7 @@ class KickerInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: KickerInstrumentView( Instrument * _instrument, QWidget * _parent ); - ~KickerInstrumentView() override; + ~KickerInstrumentView() override = default; private: void modelChanged() override; diff --git a/plugins/Kicker/KickerOsc.h b/plugins/Kicker/KickerOsc.h index 3a263ffc8..1accb50a4 100644 --- a/plugins/Kicker/KickerOsc.h +++ b/plugins/Kicker/KickerOsc.h @@ -60,9 +60,7 @@ public: { } - virtual ~KickerOsc() - { - } + virtual ~KickerOsc() = default; void update( sampleFrame* buf, const fpp_t frames, const float sampleRate ) { diff --git a/plugins/LadspaBrowser/LadspaBrowser.cpp b/plugins/LadspaBrowser/LadspaBrowser.cpp index cd10b47fd..503aa7443 100644 --- a/plugins/LadspaBrowser/LadspaBrowser.cpp +++ b/plugins/LadspaBrowser/LadspaBrowser.cpp @@ -82,13 +82,6 @@ LadspaBrowser::LadspaBrowser() : -LadspaBrowser::~LadspaBrowser() -{ -} - - - - QString LadspaBrowser::nodeName() const { return ladspabrowser_plugin_descriptor.name; @@ -166,13 +159,6 @@ LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) : -LadspaBrowserView::~LadspaBrowserView() -{ -} - - - - QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt, LadspaPluginType _type ) { diff --git a/plugins/LadspaBrowser/LadspaBrowser.h b/plugins/LadspaBrowser/LadspaBrowser.h index 93533906e..faf1136dd 100644 --- a/plugins/LadspaBrowser/LadspaBrowser.h +++ b/plugins/LadspaBrowser/LadspaBrowser.h @@ -46,7 +46,7 @@ class LadspaBrowserView : public ToolPluginView Q_OBJECT public: LadspaBrowserView( ToolPlugin * _tool ); - ~LadspaBrowserView() override; + ~LadspaBrowserView() override = default; public slots: @@ -69,7 +69,7 @@ class LadspaBrowser : public ToolPlugin { public: LadspaBrowser(); - ~LadspaBrowser() override; + ~LadspaBrowser() override = default; gui::PluginView* instantiateView( QWidget * ) override { diff --git a/plugins/LadspaBrowser/LadspaDescription.cpp b/plugins/LadspaBrowser/LadspaDescription.cpp index 5b2364d6f..b94490e52 100644 --- a/plugins/LadspaBrowser/LadspaDescription.cpp +++ b/plugins/LadspaBrowser/LadspaDescription.cpp @@ -116,13 +116,6 @@ LadspaDescription::LadspaDescription( QWidget * _parent, -LadspaDescription::~LadspaDescription() -{ -} - - - - void LadspaDescription::update( const ladspa_key_t & _key ) { QWidget * description = new QWidget; diff --git a/plugins/LadspaBrowser/LadspaDescription.h b/plugins/LadspaBrowser/LadspaDescription.h index 1d2b03fac..14fcf7d62 100644 --- a/plugins/LadspaBrowser/LadspaDescription.h +++ b/plugins/LadspaBrowser/LadspaDescription.h @@ -44,7 +44,7 @@ class LadspaDescription : public QWidget Q_OBJECT public: LadspaDescription( QWidget * _parent, LadspaPluginType _type ); - ~LadspaDescription() override; + ~LadspaDescription() override = default; signals: diff --git a/plugins/LadspaBrowser/LadspaPortDialog.cpp b/plugins/LadspaBrowser/LadspaPortDialog.cpp index ab542ce00..12706ca89 100644 --- a/plugins/LadspaBrowser/LadspaPortDialog.cpp +++ b/plugins/LadspaBrowser/LadspaPortDialog.cpp @@ -168,9 +168,4 @@ LadspaPortDialog::LadspaPortDialog( const ladspa_key_t & _key ) -LadspaPortDialog::~LadspaPortDialog() -{ -} - - } // namespace lmms::gui \ No newline at end of file diff --git a/plugins/LadspaBrowser/LadspaPortDialog.h b/plugins/LadspaBrowser/LadspaPortDialog.h index 3f7d83df7..946531de8 100644 --- a/plugins/LadspaBrowser/LadspaPortDialog.h +++ b/plugins/LadspaBrowser/LadspaPortDialog.h @@ -40,7 +40,7 @@ class LadspaPortDialog : public QDialog Q_OBJECT public: LadspaPortDialog( const ladspa_key_t & _key ); - ~LadspaPortDialog() override; + ~LadspaPortDialog() override = default; }; diff --git a/plugins/LadspaEffect/LadspaControlDialog.cpp b/plugins/LadspaEffect/LadspaControlDialog.cpp index 199982bb0..5774fcc11 100644 --- a/plugins/LadspaEffect/LadspaControlDialog.cpp +++ b/plugins/LadspaEffect/LadspaControlDialog.cpp @@ -67,13 +67,6 @@ LadspaControlDialog::LadspaControlDialog( LadspaControls * _ctl ) : -LadspaControlDialog::~LadspaControlDialog() -{ -} - - - - void LadspaControlDialog::updateEffectView( LadspaControls * _ctl ) { QList list = findChildren(); diff --git a/plugins/LadspaEffect/LadspaControlDialog.h b/plugins/LadspaEffect/LadspaControlDialog.h index 25df5ee11..8b7adb3aa 100644 --- a/plugins/LadspaEffect/LadspaControlDialog.h +++ b/plugins/LadspaEffect/LadspaControlDialog.h @@ -50,7 +50,7 @@ class LadspaControlDialog : public EffectControlDialog Q_OBJECT public: LadspaControlDialog( LadspaControls * _ctl ); - ~LadspaControlDialog() override; + ~LadspaControlDialog() override = default; private slots: diff --git a/plugins/Lb302/Lb302.cpp b/plugins/Lb302/Lb302.cpp index 8ebfe2d47..3621e034c 100644 --- a/plugins/Lb302/Lb302.cpp +++ b/plugins/Lb302/Lb302.cpp @@ -1010,11 +1010,6 @@ Lb302SynthView::Lb302SynthView( Instrument * _instrument, QWidget * _parent ) : } -Lb302SynthView::~Lb302SynthView() -{ -} - - void Lb302SynthView::modelChanged() { Lb302Synth * syn = castModel(); diff --git a/plugins/Lb302/Lb302.h b/plugins/Lb302/Lb302.h index 57acb9ef3..3abece98f 100644 --- a/plugins/Lb302/Lb302.h +++ b/plugins/Lb302/Lb302.h @@ -71,7 +71,7 @@ class Lb302Filter { public: Lb302Filter(Lb302FilterKnobState* p_fs); - virtual ~Lb302Filter() {}; + virtual ~Lb302Filter() = default; virtual void recalc(); virtual void envRecalc(); @@ -277,7 +277,7 @@ class Lb302SynthView : public InstrumentViewFixedSize public: Lb302SynthView( Instrument * _instrument, QWidget * _parent ); - ~Lb302SynthView() override; + ~Lb302SynthView() override = default; private: void modelChanged() override; diff --git a/plugins/MidiExport/MidiExport.cpp b/plugins/MidiExport/MidiExport.cpp index 1fde83f06..23164276c 100644 --- a/plugins/MidiExport/MidiExport.cpp +++ b/plugins/MidiExport/MidiExport.cpp @@ -67,12 +67,6 @@ MidiExport::MidiExport() : ExportFilter( &midiexport_plugin_descriptor) -MidiExport::~MidiExport() -{ -} - - - bool MidiExport::tryExport(const TrackContainer::TrackList &tracks, const TrackContainer::TrackList &patternStoreTracks, int tempo, int masterPitch, const QString &filename) diff --git a/plugins/MidiExport/MidiExport.h b/plugins/MidiExport/MidiExport.h index ccbb370ca..29306b903 100644 --- a/plugins/MidiExport/MidiExport.h +++ b/plugins/MidiExport/MidiExport.h @@ -63,7 +63,7 @@ class MidiExport: public ExportFilter // Q_OBJECT public: MidiExport(); - ~MidiExport() override; + ~MidiExport() override = default; gui::PluginView* instantiateView(QWidget *) override { diff --git a/plugins/MidiImport/MidiImport.cpp b/plugins/MidiImport/MidiImport.cpp index 73ea4d8c2..282bfa03b 100644 --- a/plugins/MidiImport/MidiImport.cpp +++ b/plugins/MidiImport/MidiImport.cpp @@ -90,13 +90,6 @@ MidiImport::MidiImport( const QString & _file ) : -MidiImport::~MidiImport() -{ -} - - - - bool MidiImport::tryImport( TrackContainer* tc ) { if( openFile() == false ) diff --git a/plugins/MidiImport/MidiImport.h b/plugins/MidiImport/MidiImport.h index 0d7c0e99e..12cfb46ae 100644 --- a/plugins/MidiImport/MidiImport.h +++ b/plugins/MidiImport/MidiImport.h @@ -41,7 +41,7 @@ class MidiImport : public ImportFilter Q_OBJECT public: MidiImport( const QString & _file ); - ~MidiImport() override; + ~MidiImport() override = default; gui::PluginView* instantiateView( QWidget * ) override { diff --git a/plugins/MidiImport/portsmf/allegro.h b/plugins/MidiImport/portsmf/allegro.h index e21a8f817..ca5859aef 100644 --- a/plugins/MidiImport/portsmf/allegro.h +++ b/plugins/MidiImport/portsmf/allegro.h @@ -287,7 +287,7 @@ public: const char *GetDescription(); // computes a text description of this event // the result is in a static buffer, not thread-safe, just for debugging. Alg_event() { selected = false; } - virtual ~Alg_event() {} + virtual ~Alg_event() = default; } *Alg_event_ptr; @@ -306,7 +306,7 @@ public: typedef class Alg_update : public Alg_event { public: - ~Alg_update() override {}; + ~Alg_update() override = default; Alg_update(Alg_update *); // copy constructor Alg_parameter parameter; // an update contains one attr/value pair @@ -437,7 +437,7 @@ typedef class Alg_beat { public: Alg_beat(double t, double b) { time = t; beat = b; } - Alg_beat() {}; + Alg_beat() = default; double time; double beat; } *Alg_beat_ptr; @@ -535,7 +535,7 @@ class Serial_buffer { ptr = nullptr; len = 0; } - virtual ~Serial_buffer() { } + virtual ~Serial_buffer() = default; long get_posn() { return (long) (ptr - buffer); } long get_len() { return len; } @@ -548,7 +548,7 @@ public: // setting buffer, but it is not the Serial_read_buffer's responsibility // to delete the buffer (owner might want to reuse it), so the destructor // does nothing. - ~Serial_read_buffer() override { } + ~Serial_read_buffer() override = default; #if defined(_WIN32) //#pragma warning(disable: 546) // cast to int is OK, we only want low 7 bits //#pragma warning(disable: 4311) // type cast pointer to long warning diff --git a/plugins/MidiImport/portsmf/allegrosmfwr.cpp b/plugins/MidiImport/portsmf/allegrosmfwr.cpp index fefccf12d..eadb4c3ae 100644 --- a/plugins/MidiImport/portsmf/allegrosmfwr.cpp +++ b/plugins/MidiImport/portsmf/allegrosmfwr.cpp @@ -29,7 +29,7 @@ public: class Alg_smf_write { public: Alg_smf_write(Alg_seq_ptr seq); - ~Alg_smf_write(); + ~Alg_smf_write() = default; long channels_per_track; // used to encode track number into chan field // chan is actual_channel + channels_per_track * track_number // default is 100, set this to 0 to merge all tracks to 16 channels @@ -98,11 +98,6 @@ Alg_smf_write::Alg_smf_write(Alg_seq_ptr a_seq) } -Alg_smf_write::~Alg_smf_write() -{ -} - - // sorting is quite subtle due to rounding // For example, suppose times from a MIDI file are exact, but in // decimal round to TW0.4167 Q0.3333. Since the time in whole notes diff --git a/plugins/Monstro/Monstro.cpp b/plugins/Monstro/Monstro.cpp index d5ad851ee..b5fc5545f 100644 --- a/plugins/Monstro/Monstro.cpp +++ b/plugins/Monstro/Monstro.cpp @@ -111,11 +111,6 @@ MonstroSynth::MonstroSynth( MonstroInstrument * _i, NotePlayHandle * _nph ) : } -MonstroSynth::~MonstroSynth() -{ -} - - void MonstroSynth::renderOutput( fpp_t _frames, sampleFrame * _buf ) { float modtmp; // temp variable for freq modulation @@ -1029,11 +1024,6 @@ MonstroInstrument::MonstroInstrument( InstrumentTrack * _instrument_track ) : } -MonstroInstrument::~MonstroInstrument() -{ -} - - void MonstroInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) { @@ -1490,11 +1480,6 @@ MonstroView::MonstroView( Instrument * _instrument, } -MonstroView::~MonstroView() -{ -} - - void MonstroView::updateLayout() { switch( m_selectedViewGroup->model()->value() ) diff --git a/plugins/Monstro/Monstro.h b/plugins/Monstro/Monstro.h index 52f607a32..319b7e000 100644 --- a/plugins/Monstro/Monstro.h +++ b/plugins/Monstro/Monstro.h @@ -176,7 +176,7 @@ class MonstroSynth MM_OPERATORS public: MonstroSynth( MonstroInstrument * _i, NotePlayHandle * _nph ); - virtual ~MonstroSynth(); + virtual ~MonstroSynth() = default; void renderOutput( fpp_t _frames, sampleFrame * _buf ); @@ -355,7 +355,7 @@ class MonstroInstrument : public Instrument public: MonstroInstrument( InstrumentTrack * _instrument_track ); - ~MonstroInstrument() override; + ~MonstroInstrument() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -593,7 +593,7 @@ class MonstroView : public InstrumentViewFixedSize public: MonstroView( Instrument * _instrument, QWidget * _parent ); - ~MonstroView() override; + ~MonstroView() override = default; protected slots: void updateLayout(); diff --git a/plugins/MultitapEcho/MultitapEchoControlDialog.h b/plugins/MultitapEcho/MultitapEchoControlDialog.h index 0989046c1..e016d1372 100644 --- a/plugins/MultitapEcho/MultitapEchoControlDialog.h +++ b/plugins/MultitapEcho/MultitapEchoControlDialog.h @@ -44,9 +44,7 @@ class MultitapEchoControlDialog : public EffectControlDialog Q_OBJECT public: MultitapEchoControlDialog( MultitapEchoControls * controls ); - ~MultitapEchoControlDialog() override - { - } + ~MultitapEchoControlDialog() override = default; }; diff --git a/plugins/MultitapEcho/MultitapEchoControls.cpp b/plugins/MultitapEcho/MultitapEchoControls.cpp index 4382151af..19564ba8a 100644 --- a/plugins/MultitapEcho/MultitapEchoControls.cpp +++ b/plugins/MultitapEcho/MultitapEchoControls.cpp @@ -58,11 +58,6 @@ MultitapEchoControls::MultitapEchoControls( MultitapEchoEffect * eff ) : } -MultitapEchoControls::~MultitapEchoControls() -{ -} - - void MultitapEchoControls::saveSettings( QDomDocument & doc, QDomElement & parent ) { m_steps.saveSettings( doc, parent, "steps" ); diff --git a/plugins/MultitapEcho/MultitapEchoControls.h b/plugins/MultitapEcho/MultitapEchoControls.h index 7ded68cc8..bd345bfe5 100644 --- a/plugins/MultitapEcho/MultitapEchoControls.h +++ b/plugins/MultitapEcho/MultitapEchoControls.h @@ -41,7 +41,7 @@ class MultitapEchoControls : public EffectControls Q_OBJECT public: MultitapEchoControls( MultitapEchoEffect * eff ); - ~MultitapEchoControls() override; + ~MultitapEchoControls() override = default; void saveSettings( QDomDocument & doc, QDomElement & parent ) override; void loadSettings( const QDomElement & elem ) override; diff --git a/plugins/Nes/Nes.cpp b/plugins/Nes/Nes.cpp index f3537d88c..4e5fdc59a 100644 --- a/plugins/Nes/Nes.cpp +++ b/plugins/Nes/Nes.cpp @@ -103,11 +103,6 @@ NesObject::NesObject( NesInstrument * nes, const sample_rate_t samplerate, NoteP } -NesObject::~NesObject() -{ -} - - void NesObject::renderOutput( sampleFrame * buf, fpp_t frames ) { //////////////////////////////// @@ -551,11 +546,6 @@ NesInstrument::NesInstrument( InstrumentTrack * instrumentTrack ) : -NesInstrument::~NesInstrument() -{ -} - - void NesInstrument::playNote( NotePlayHandle * n, sampleFrame * workingBuffer ) { const fpp_t frames = n->framesLeftForCurrentPeriod(); @@ -854,11 +844,6 @@ NesInstrumentView::NesInstrumentView( Instrument * instrument, QWidget * parent -NesInstrumentView::~NesInstrumentView() -{ -} - - void NesInstrumentView::modelChanged() { NesInstrument * nes = castModel(); diff --git a/plugins/Nes/Nes.h b/plugins/Nes/Nes.h index 41e7b0d7f..91e5e556c 100644 --- a/plugins/Nes/Nes.h +++ b/plugins/Nes/Nes.h @@ -95,7 +95,7 @@ class NesObject MM_OPERATORS public: NesObject( NesInstrument * nes, const sample_rate_t samplerate, NotePlayHandle * nph ); - virtual ~NesObject(); + virtual ~NesObject() = default; void renderOutput( sampleFrame * buf, fpp_t frames ); void updateVibrato( float * freq ); @@ -211,7 +211,7 @@ class NesInstrument : public Instrument Q_OBJECT public: NesInstrument( InstrumentTrack * instrumentTrack ); - ~NesInstrument() override; + ~NesInstrument() override = default; void playNote( NotePlayHandle * n, sampleFrame * workingBuffer ) override; @@ -313,7 +313,7 @@ class NesInstrumentView : public InstrumentViewFixedSize public: NesInstrumentView( Instrument * instrument, QWidget * parent ); - ~NesInstrumentView() override; + ~NesInstrumentView() override = default; private: void modelChanged() override; diff --git a/plugins/Organic/Organic.cpp b/plugins/Organic/Organic.cpp index 6271f6c40..c22a12168 100644 --- a/plugins/Organic/Organic.cpp +++ b/plugins/Organic/Organic.cpp @@ -583,13 +583,6 @@ OscillatorObject::OscillatorObject( Model * _parent, int _index ) : -OscillatorObject::~OscillatorObject() -{ -} - - - - void OscillatorObject::oscButtonChanged() { diff --git a/plugins/Organic/Organic.h b/plugins/Organic/Organic.h index bc951ad49..057a4a5b4 100644 --- a/plugins/Organic/Organic.h +++ b/plugins/Organic/Organic.h @@ -105,7 +105,7 @@ private: float m_phaseOffsetRight; OscillatorObject( Model * _parent, int _index ); - ~OscillatorObject() override; + ~OscillatorObject() override = default; friend class OrganicInstrument; friend class gui::OrganicInstrumentView; @@ -211,9 +211,7 @@ private: m_detuneKnob( dt ) { } - OscillatorKnobs() - { - } + OscillatorKnobs() = default; Knob * m_harmKnob; Knob * m_volKnob; diff --git a/plugins/Patman/Patman.cpp b/plugins/Patman/Patman.cpp index 32e8372eb..8b502e93d 100644 --- a/plugins/Patman/Patman.cpp +++ b/plugins/Patman/Patman.cpp @@ -495,13 +495,6 @@ PatmanView::PatmanView( Instrument * _instrument, QWidget * _parent ) : -PatmanView::~PatmanView() -{ -} - - - - void PatmanView::openFile() { FileDialog ofd( nullptr, tr( "Open patch file" ) ); diff --git a/plugins/Patman/Patman.h b/plugins/Patman/Patman.h index 60276f5aa..89f7f7250 100644 --- a/plugins/Patman/Patman.h +++ b/plugins/Patman/Patman.h @@ -131,7 +131,7 @@ class PatmanView : public InstrumentViewFixedSize Q_OBJECT public: PatmanView( Instrument * _instrument, QWidget * _parent ); - ~PatmanView() override; + ~PatmanView() override = default; public slots: diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h index 7ccb4a14c..9f5f45223 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h +++ b/plugins/PeakControllerEffect/PeakControllerEffectControlDialog.h @@ -45,9 +45,7 @@ class PeakControllerEffectControlDialog : public EffectControlDialog public: PeakControllerEffectControlDialog( PeakControllerEffectControls * _controls ); - ~PeakControllerEffectControlDialog() override - { - } + ~PeakControllerEffectControlDialog() override = default; protected: diff --git a/plugins/PeakControllerEffect/PeakControllerEffectControls.h b/plugins/PeakControllerEffect/PeakControllerEffectControls.h index 6eb3dad44..3bd96b3f9 100644 --- a/plugins/PeakControllerEffect/PeakControllerEffectControls.h +++ b/plugins/PeakControllerEffect/PeakControllerEffectControls.h @@ -41,9 +41,7 @@ class PeakControllerEffectControls : public EffectControls Q_OBJECT public: PeakControllerEffectControls( PeakControllerEffect * _eff ); - ~PeakControllerEffectControls() override - { - } + ~PeakControllerEffectControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/ReverbSC/ReverbSCControlDialog.h b/plugins/ReverbSC/ReverbSCControlDialog.h index 0c02d7865..0abc96896 100644 --- a/plugins/ReverbSC/ReverbSCControlDialog.h +++ b/plugins/ReverbSC/ReverbSCControlDialog.h @@ -42,9 +42,7 @@ class ReverbSCControlDialog : public EffectControlDialog Q_OBJECT public: ReverbSCControlDialog( ReverbSCControls* controls ); - ~ReverbSCControlDialog() override - { - } + ~ReverbSCControlDialog() override = default; } ; diff --git a/plugins/ReverbSC/ReverbSCControls.h b/plugins/ReverbSC/ReverbSCControls.h index b58254dcf..93f974a21 100644 --- a/plugins/ReverbSC/ReverbSCControls.h +++ b/plugins/ReverbSC/ReverbSCControls.h @@ -40,9 +40,7 @@ class ReverbSCControls : public EffectControls Q_OBJECT public: ReverbSCControls( ReverbSCEffect* effect ); - ~ReverbSCControls() override - { - } + ~ReverbSCControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/Sf2Player/PatchesDialog.cpp b/plugins/Sf2Player/PatchesDialog.cpp index 082a15c04..9c9a689a0 100644 --- a/plugins/Sf2Player/PatchesDialog.cpp +++ b/plugins/Sf2Player/PatchesDialog.cpp @@ -111,12 +111,6 @@ PatchesDialog::PatchesDialog( QWidget *pParent, Qt::WindowFlags wflags ) } -// Destructor. -PatchesDialog::~PatchesDialog() -{ -} - - // Dialog setup loader. void PatchesDialog::setup ( fluid_synth_t * pSynth, int iChan, const QString & _chanName, diff --git a/plugins/Sf2Player/PatchesDialog.h b/plugins/Sf2Player/PatchesDialog.h index af1207ce1..5309ce0bf 100644 --- a/plugins/Sf2Player/PatchesDialog.h +++ b/plugins/Sf2Player/PatchesDialog.h @@ -50,7 +50,7 @@ public: PatchesDialog(QWidget *pParent = 0, Qt::WindowFlags wflags = QFlag(0)); // Destructor. - ~PatchesDialog() override; + ~PatchesDialog() override = default; void setup(fluid_synth_t *pSynth, int iChan, const QString & _chanName, diff --git a/plugins/Sf2Player/Sf2Player.cpp b/plugins/Sf2Player/Sf2Player.cpp index 291f7fb76..dae94a332 100644 --- a/plugins/Sf2Player/Sf2Player.cpp +++ b/plugins/Sf2Player/Sf2Player.cpp @@ -1055,13 +1055,6 @@ Sf2InstrumentView::Sf2InstrumentView( Instrument * _instrument, QWidget * _paren -Sf2InstrumentView::~Sf2InstrumentView() -{ -} - - - - void Sf2InstrumentView::modelChanged() { Sf2Instrument * k = castModel(); diff --git a/plugins/Sf2Player/Sf2Player.h b/plugins/Sf2Player/Sf2Player.h index 1ce6d0fdd..275d7494c 100644 --- a/plugins/Sf2Player/Sf2Player.h +++ b/plugins/Sf2Player/Sf2Player.h @@ -203,7 +203,7 @@ class Sf2InstrumentView : public InstrumentViewFixedSize public: Sf2InstrumentView( Instrument * _instrument, QWidget * _parent ); - ~Sf2InstrumentView() override; + ~Sf2InstrumentView() override = default; private: void modelChanged() override; diff --git a/plugins/Sfxr/Sfxr.cpp b/plugins/Sfxr/Sfxr.cpp index a8bb81219..605416520 100644 --- a/plugins/Sfxr/Sfxr.cpp +++ b/plugins/Sfxr/Sfxr.cpp @@ -88,14 +88,6 @@ SfxrSynth::SfxrSynth( const SfxrInstrument * s ): -SfxrSynth::~SfxrSynth() -{ - -} - - - - void SfxrSynth::resetSample( bool restart ) { if(!restart) @@ -362,13 +354,6 @@ SfxrInstrument::SfxrInstrument( InstrumentTrack * _instrument_track ) : -SfxrInstrument::~SfxrInstrument() -{ -} - - - - void SfxrInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this ) { _this.setAttribute( "version", "1" ); diff --git a/plugins/Sfxr/Sfxr.h b/plugins/Sfxr/Sfxr.h index 6aafe9961..2011062d1 100644 --- a/plugins/Sfxr/Sfxr.h +++ b/plugins/Sfxr/Sfxr.h @@ -80,7 +80,7 @@ class SfxrSynth MM_OPERATORS public: SfxrSynth( const SfxrInstrument * s ); - virtual ~SfxrSynth(); + virtual ~SfxrSynth() = default; void resetSample( bool restart ); void update( sampleFrame * buffer, const int32_t frameNum ); @@ -176,7 +176,7 @@ class SfxrInstrument : public Instrument Q_OBJECT public: SfxrInstrument(InstrumentTrack * _instrument_track ); - ~SfxrInstrument() override; + ~SfxrInstrument() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; void deleteNotePluginData( NotePlayHandle * _n ) override; @@ -240,7 +240,7 @@ public: SfxrInstrumentView( Instrument * _instrument, QWidget * _parent ); - ~SfxrInstrumentView() override {}; + ~SfxrInstrumentView() override = default; protected slots: void genPickup(); diff --git a/plugins/Sid/SidInstrument.cpp b/plugins/Sid/SidInstrument.cpp index e075ed049..16710f4f9 100644 --- a/plugins/Sid/SidInstrument.cpp +++ b/plugins/Sid/SidInstrument.cpp @@ -116,11 +116,6 @@ VoiceObject::VoiceObject( Model * _parent, int _idx ) : } -VoiceObject::~VoiceObject() -{ -} - - SidInstrument::SidInstrument( InstrumentTrack * _instrument_track ) : Instrument( _instrument_track, &sid_plugin_descriptor ), // filter @@ -140,11 +135,6 @@ SidInstrument::SidInstrument( InstrumentTrack * _instrument_track ) : } -SidInstrument::~SidInstrument() -{ -} - - void SidInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this ) { @@ -662,10 +652,6 @@ SidInstrumentView::SidInstrumentView( Instrument * _instrument, } -SidInstrumentView::~SidInstrumentView() -{ -} - void SidInstrumentView::updateKnobHint() { SidInstrument * k = castModel(); diff --git a/plugins/Sid/SidInstrument.h b/plugins/Sid/SidInstrument.h index 1c8fecc95..203e52e7b 100644 --- a/plugins/Sid/SidInstrument.h +++ b/plugins/Sid/SidInstrument.h @@ -58,7 +58,7 @@ public: NumWaveShapes }; VoiceObject( Model * _parent, int _idx ); - ~VoiceObject() override; + ~VoiceObject() override = default; private: @@ -97,7 +97,7 @@ public: SidInstrument( InstrumentTrack * _instrument_track ); - ~SidInstrument() override; + ~SidInstrument() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -147,7 +147,7 @@ class SidInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: SidInstrumentView( Instrument * _instrument, QWidget * _parent ); - ~SidInstrumentView() override; + ~SidInstrumentView() override = default; private: void modelChanged() override; @@ -181,9 +181,7 @@ private: m_testButton( testb ) { } - voiceKnobs() - { - } + voiceKnobs() = default; Knob * m_attKnob; Knob * m_decKnob; Knob * m_sustKnob; diff --git a/plugins/SpectrumAnalyzer/SaControls.h b/plugins/SpectrumAnalyzer/SaControls.h index b2fc1cc87..48d8ee96e 100644 --- a/plugins/SpectrumAnalyzer/SaControls.h +++ b/plugins/SpectrumAnalyzer/SaControls.h @@ -49,7 +49,7 @@ class SaControls : public EffectControls Q_OBJECT public: explicit SaControls(Analyzer* effect); - ~SaControls() override {} + ~SaControls() override = default; gui::EffectControlDialog* createView() override; diff --git a/plugins/SpectrumAnalyzer/SaControlsDialog.h b/plugins/SpectrumAnalyzer/SaControlsDialog.h index ac28be4bf..83e12c1bf 100644 --- a/plugins/SpectrumAnalyzer/SaControlsDialog.h +++ b/plugins/SpectrumAnalyzer/SaControlsDialog.h @@ -47,7 +47,7 @@ class SaControlsDialog : public EffectControlDialog Q_OBJECT public: explicit SaControlsDialog(SaControls *controls, SaProcessor *processor); - ~SaControlsDialog() override {} + ~SaControlsDialog() override = default; bool isResizable() const override {return true;} QSize sizeHint() const override; diff --git a/plugins/SpectrumAnalyzer/SaSpectrumView.h b/plugins/SpectrumAnalyzer/SaSpectrumView.h index d50c893e5..e9bb47b1d 100644 --- a/plugins/SpectrumAnalyzer/SaSpectrumView.h +++ b/plugins/SpectrumAnalyzer/SaSpectrumView.h @@ -54,7 +54,7 @@ class SaSpectrumView : public QWidget Q_OBJECT public: explicit SaSpectrumView(SaControls *controls, SaProcessor *processor, QWidget *_parent = 0); - ~SaSpectrumView() override {} + ~SaSpectrumView() override = default; QSize sizeHint() const override {return QSize(400, 200);} diff --git a/plugins/SpectrumAnalyzer/SaWaterfallView.h b/plugins/SpectrumAnalyzer/SaWaterfallView.h index 2855eb925..5de00d7ad 100644 --- a/plugins/SpectrumAnalyzer/SaWaterfallView.h +++ b/plugins/SpectrumAnalyzer/SaWaterfallView.h @@ -49,7 +49,7 @@ class SaWaterfallView : public QWidget Q_OBJECT public: explicit SaWaterfallView(SaControls *controls, SaProcessor *processor, QWidget *_parent = 0); - ~SaWaterfallView() override {} + ~SaWaterfallView() override = default; QSize sizeHint() const override {return QSize(400, 350);} diff --git a/plugins/StereoEnhancer/StereoEnhancerControlDialog.h b/plugins/StereoEnhancer/StereoEnhancerControlDialog.h index 3f063ec63..459b1fa69 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControlDialog.h +++ b/plugins/StereoEnhancer/StereoEnhancerControlDialog.h @@ -42,9 +42,7 @@ class StereoEnhancerControlDialog : public EffectControlDialog Q_OBJECT public: StereoEnhancerControlDialog( StereoEnhancerControls * _controls ); - ~StereoEnhancerControlDialog() override - { - } + ~StereoEnhancerControlDialog() override = default; }; diff --git a/plugins/StereoEnhancer/StereoEnhancerControls.h b/plugins/StereoEnhancer/StereoEnhancerControls.h index 0b016aa2b..dea356fdb 100644 --- a/plugins/StereoEnhancer/StereoEnhancerControls.h +++ b/plugins/StereoEnhancer/StereoEnhancerControls.h @@ -39,9 +39,7 @@ class StereoEnhancerControls : public EffectControls Q_OBJECT public: StereoEnhancerControls( StereoEnhancerEffect( * _eff ) ); - ~StereoEnhancerControls() override - { - } + ~StereoEnhancerControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/StereoMatrix/StereoMatrix.cpp b/plugins/StereoMatrix/StereoMatrix.cpp index 34b2fc86b..2dff69b77 100644 --- a/plugins/StereoMatrix/StereoMatrix.cpp +++ b/plugins/StereoMatrix/StereoMatrix.cpp @@ -64,12 +64,6 @@ StereoMatrixEffect::StereoMatrixEffect( -StereoMatrixEffect::~StereoMatrixEffect() -{ -} - - - bool StereoMatrixEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) { diff --git a/plugins/StereoMatrix/StereoMatrix.h b/plugins/StereoMatrix/StereoMatrix.h index a8a373317..ae7a59724 100644 --- a/plugins/StereoMatrix/StereoMatrix.h +++ b/plugins/StereoMatrix/StereoMatrix.h @@ -38,7 +38,7 @@ class StereoMatrixEffect : public Effect public: StereoMatrixEffect( Model * parent, const Descriptor::SubPluginFeatures::Key * _key ); - ~StereoMatrixEffect() override; + ~StereoMatrixEffect() override = default; bool processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) override; diff --git a/plugins/StereoMatrix/StereoMatrixControlDialog.h b/plugins/StereoMatrix/StereoMatrixControlDialog.h index 41eb9cdb4..56592aa12 100644 --- a/plugins/StereoMatrix/StereoMatrixControlDialog.h +++ b/plugins/StereoMatrix/StereoMatrixControlDialog.h @@ -41,9 +41,7 @@ class StereoMatrixControlDialog : public EffectControlDialog Q_OBJECT public: StereoMatrixControlDialog( StereoMatrixControls * _controls ); - ~StereoMatrixControlDialog() override - { - } + ~StereoMatrixControlDialog() override = default; }; diff --git a/plugins/StereoMatrix/StereoMatrixControls.h b/plugins/StereoMatrix/StereoMatrixControls.h index 04a10f237..5eb506d16 100644 --- a/plugins/StereoMatrix/StereoMatrixControls.h +++ b/plugins/StereoMatrix/StereoMatrixControls.h @@ -39,9 +39,7 @@ class StereoMatrixControls : public EffectControls Q_OBJECT public: StereoMatrixControls( StereoMatrixEffect( * _eff ) ); - ~StereoMatrixControls() override - { - } + ~StereoMatrixControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/plugins/Stk/Mallets/Mallets.cpp b/plugins/Stk/Mallets/Mallets.cpp index 4adfb5347..6dcd8f563 100644 --- a/plugins/Stk/Mallets/Mallets.cpp +++ b/plugins/Stk/Mallets/Mallets.cpp @@ -130,13 +130,6 @@ MalletsInstrument::MalletsInstrument( InstrumentTrack * _instrument_track ): -MalletsInstrument::~MalletsInstrument() -{ -} - - - - void MalletsInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this ) { // ModalBar @@ -435,12 +428,6 @@ MalletsInstrumentView::MalletsInstrumentView( MalletsInstrument * _instrument, -MalletsInstrumentView::~MalletsInstrumentView() -{ -} - - - void MalletsInstrumentView::setWidgetBackground( QWidget * _widget, const QString & _pic ) { _widget->setAutoFillBackground( true ); diff --git a/plugins/Stk/Mallets/Mallets.h b/plugins/Stk/Mallets/Mallets.h index e8ec15360..4d5aed288 100644 --- a/plugins/Stk/Mallets/Mallets.h +++ b/plugins/Stk/Mallets/Mallets.h @@ -160,7 +160,7 @@ class MalletsInstrument : public Instrument Q_OBJECT public: MalletsInstrument( InstrumentTrack * _instrument_track ); - ~MalletsInstrument() override; + ~MalletsInstrument() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -219,7 +219,7 @@ class MalletsInstrumentView: public InstrumentViewFixedSize public: MalletsInstrumentView( MalletsInstrument * _instrument, QWidget * _parent ); - ~MalletsInstrumentView() override; + ~MalletsInstrumentView() override = default; public slots: void changePreset(); diff --git a/plugins/TripleOscillator/TripleOscillator.cpp b/plugins/TripleOscillator/TripleOscillator.cpp index f19754019..5a3a6d1dc 100644 --- a/plugins/TripleOscillator/TripleOscillator.cpp +++ b/plugins/TripleOscillator/TripleOscillator.cpp @@ -238,13 +238,6 @@ TripleOscillator::TripleOscillator( InstrumentTrack * _instrument_track ) : -TripleOscillator::~TripleOscillator() -{ -} - - - - void TripleOscillator::saveSettings( QDomDocument & _doc, QDomElement & _this ) { for( int i = 0; i < NUM_OF_OSCILLATORS; ++i ) @@ -714,13 +707,6 @@ TripleOscillatorView::TripleOscillatorView( Instrument * _instrument, -TripleOscillatorView::~TripleOscillatorView() -{ -} - - - - void TripleOscillatorView::modelChanged() { TripleOscillator * t = castModel(); diff --git a/plugins/TripleOscillator/TripleOscillator.h b/plugins/TripleOscillator/TripleOscillator.h index 0cb0e69a0..f3290153b 100644 --- a/plugins/TripleOscillator/TripleOscillator.h +++ b/plugins/TripleOscillator/TripleOscillator.h @@ -108,7 +108,7 @@ class TripleOscillator : public Instrument Q_OBJECT public: TripleOscillator( InstrumentTrack * _track ); - ~TripleOscillator() override; + ~TripleOscillator() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -157,7 +157,7 @@ class TripleOscillatorView : public InstrumentViewFixedSize Q_OBJECT public: TripleOscillatorView( Instrument * _instrument, QWidget * _parent ); - ~TripleOscillatorView() override; + ~TripleOscillatorView() override = default; private: @@ -191,9 +191,7 @@ private: m_multiBandWaveTableButton( wt ) { } - OscillatorKnobs() - { - } + OscillatorKnobs() = default; Knob * m_volKnob; Knob * m_panKnob; Knob * m_coarseKnob; diff --git a/plugins/Vectorscope/VecControls.h b/plugins/Vectorscope/VecControls.h index 76b0f388e..71b1c122e 100644 --- a/plugins/Vectorscope/VecControls.h +++ b/plugins/Vectorscope/VecControls.h @@ -47,7 +47,7 @@ class VecControls : public EffectControls Q_OBJECT public: explicit VecControls(Vectorscope *effect); - ~VecControls() override {} + ~VecControls() override = default; gui::EffectControlDialog* createView() override; diff --git a/plugins/Vectorscope/VecControlsDialog.h b/plugins/Vectorscope/VecControlsDialog.h index 616e55b44..8fee75b4b 100644 --- a/plugins/Vectorscope/VecControlsDialog.h +++ b/plugins/Vectorscope/VecControlsDialog.h @@ -43,7 +43,7 @@ class VecControlsDialog : public EffectControlDialog Q_OBJECT public: explicit VecControlsDialog(VecControls *controls); - ~VecControlsDialog() override {} + ~VecControlsDialog() override = default; bool isResizable() const override {return true;} QSize sizeHint() const override; diff --git a/plugins/Vectorscope/VectorView.h b/plugins/Vectorscope/VectorView.h index 347aa8a18..59ac99a77 100644 --- a/plugins/Vectorscope/VectorView.h +++ b/plugins/Vectorscope/VectorView.h @@ -44,7 +44,7 @@ class VectorView : public QWidget Q_OBJECT public: explicit VectorView(VecControls *controls, LocklessRingBuffer *inputBuffer, unsigned short displaySize, QWidget *parent = 0); - ~VectorView() override {} + ~VectorView() override = default; QSize sizeHint() const override {return QSize(300, 300);} diff --git a/plugins/Vectorscope/Vectorscope.h b/plugins/Vectorscope/Vectorscope.h index e3e92b205..54022ab90 100644 --- a/plugins/Vectorscope/Vectorscope.h +++ b/plugins/Vectorscope/Vectorscope.h @@ -37,7 +37,7 @@ class Vectorscope : public Effect { public: Vectorscope(Model *parent, const Descriptor::SubPluginFeatures::Key *key); - ~Vectorscope() override {}; + ~Vectorscope() override = default; bool processAudioBuffer(sampleFrame *buffer, const fpp_t frame_count) override; EffectControls *controls() override {return &m_controls;} diff --git a/plugins/Vestige/Vestige.cpp b/plugins/Vestige/Vestige.cpp index 30bef7141..7441370ec 100644 --- a/plugins/Vestige/Vestige.cpp +++ b/plugins/Vestige/Vestige.cpp @@ -103,9 +103,7 @@ public: setWindowFlags( Qt::WindowCloseButtonHint ); } - ~vstSubWin() override - { - } + ~vstSubWin() override = default; void closeEvent( QCloseEvent * e ) override { @@ -671,13 +669,6 @@ void VestigeInstrumentView::updateMenu( void ) } -VestigeInstrumentView::~VestigeInstrumentView() -{ -} - - - - void VestigeInstrumentView::modelChanged() { m_vi = castModel(); diff --git a/plugins/Vestige/Vestige.h b/plugins/Vestige/Vestige.h index 706e77b00..0a36c4924 100644 --- a/plugins/Vestige/Vestige.h +++ b/plugins/Vestige/Vestige.h @@ -150,7 +150,7 @@ class VestigeInstrumentView : public InstrumentViewFixedSize Q_OBJECT public: VestigeInstrumentView( Instrument * _instrument, QWidget * _parent ); - virtual ~VestigeInstrumentView(); + virtual ~VestigeInstrumentView() = default; protected slots: diff --git a/plugins/Vibed/Vibed.h b/plugins/Vibed/Vibed.h index c6fdee385..75f92157c 100644 --- a/plugins/Vibed/Vibed.h +++ b/plugins/Vibed/Vibed.h @@ -97,7 +97,7 @@ class VibedView : public InstrumentViewFixedSize public: VibedView( Instrument * _instrument, QWidget * _parent ); - ~VibedView() override {}; + ~VibedView() override = default; public slots: void showString( int _string ); diff --git a/plugins/VstEffect/VstEffect.cpp b/plugins/VstEffect/VstEffect.cpp index eee3919c4..c3e40cfa7 100644 --- a/plugins/VstEffect/VstEffect.cpp +++ b/plugins/VstEffect/VstEffect.cpp @@ -76,13 +76,6 @@ VstEffect::VstEffect( Model * _parent, -VstEffect::~VstEffect() -{ -} - - - - bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) { if( !isEnabled() || !isRunning () ) diff --git a/plugins/VstEffect/VstEffect.h b/plugins/VstEffect/VstEffect.h index 586d00d3b..987b1ecc2 100644 --- a/plugins/VstEffect/VstEffect.h +++ b/plugins/VstEffect/VstEffect.h @@ -43,7 +43,7 @@ class VstEffect : public Effect public: VstEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); - ~VstEffect() override; + ~VstEffect() override = default; bool processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) override; diff --git a/plugins/Watsyn/Watsyn.cpp b/plugins/Watsyn/Watsyn.cpp index 1c363d417..58f472edc 100644 --- a/plugins/Watsyn/Watsyn.cpp +++ b/plugins/Watsyn/Watsyn.cpp @@ -326,11 +326,6 @@ WatsynInstrument::WatsynInstrument( InstrumentTrack * _instrument_track ) : } -WatsynInstrument::~WatsynInstrument() -{ -} - - void WatsynInstrument::playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) { @@ -947,12 +942,6 @@ WatsynView::WatsynView( Instrument * _instrument, } -WatsynView::~WatsynView() -{ -} - - - void WatsynView::updateLayout() { switch( m_selectedGraphGroup->model()->value() ) diff --git a/plugins/Watsyn/Watsyn.h b/plugins/Watsyn/Watsyn.h index cee2d807b..3c69be06f 100644 --- a/plugins/Watsyn/Watsyn.h +++ b/plugins/Watsyn/Watsyn.h @@ -139,7 +139,7 @@ class WatsynInstrument : public Instrument Q_OBJECT public: WatsynInstrument( InstrumentTrack * _instrument_track ); - ~WatsynInstrument() override; + ~WatsynInstrument() override = default; void playNote( NotePlayHandle * _n, sampleFrame * _working_buffer ) override; @@ -310,7 +310,7 @@ class WatsynView : public InstrumentViewFixedSize public: WatsynView( Instrument * _instrument, QWidget * _parent ); - ~WatsynView() override; + ~WatsynView() override = default; protected slots: void updateLayout(); diff --git a/plugins/WaveShaper/WaveShaper.cpp b/plugins/WaveShaper/WaveShaper.cpp index 7f0cf732f..edbcb0ad8 100644 --- a/plugins/WaveShaper/WaveShaper.cpp +++ b/plugins/WaveShaper/WaveShaper.cpp @@ -66,13 +66,6 @@ WaveShaperEffect::WaveShaperEffect( Model * _parent, -WaveShaperEffect::~WaveShaperEffect() -{ -} - - - - bool WaveShaperEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) { diff --git a/plugins/WaveShaper/WaveShaper.h b/plugins/WaveShaper/WaveShaper.h index 075c0ec6b..4c63d5806 100644 --- a/plugins/WaveShaper/WaveShaper.h +++ b/plugins/WaveShaper/WaveShaper.h @@ -39,7 +39,7 @@ class WaveShaperEffect : public Effect public: WaveShaperEffect( Model * _parent, const Descriptor::SubPluginFeatures::Key * _key ); - ~WaveShaperEffect() override; + ~WaveShaperEffect() override = default; bool processAudioBuffer( sampleFrame * _buf, const fpp_t _frames ) override; diff --git a/plugins/WaveShaper/WaveShaperControlDialog.h b/plugins/WaveShaper/WaveShaperControlDialog.h index be3838f46..e76dcfccc 100644 --- a/plugins/WaveShaper/WaveShaperControlDialog.h +++ b/plugins/WaveShaper/WaveShaperControlDialog.h @@ -42,9 +42,7 @@ class WaveShaperControlDialog : public EffectControlDialog Q_OBJECT public: WaveShaperControlDialog( WaveShaperControls * _controls ); - ~WaveShaperControlDialog() override - { - } + ~WaveShaperControlDialog() override = default; private: diff --git a/plugins/WaveShaper/WaveShaperControls.h b/plugins/WaveShaper/WaveShaperControls.h index 2719514f5..9473aae5d 100644 --- a/plugins/WaveShaper/WaveShaperControls.h +++ b/plugins/WaveShaper/WaveShaperControls.h @@ -42,9 +42,7 @@ class WaveShaperControls : public EffectControls Q_OBJECT public: WaveShaperControls( WaveShaperEffect * _eff ); - ~WaveShaperControls() override - { - } + ~WaveShaperControls() override = default; void saveSettings( QDomDocument & _doc, QDomElement & _parent ) override; void loadSettings( const QDomElement & _this ) override; diff --git a/src/common/SharedMemory.cpp b/src/common/SharedMemory.cpp index 5c944dfab..005e726ed 100644 --- a/src/common/SharedMemory.cpp +++ b/src/common/SharedMemory.cpp @@ -177,8 +177,7 @@ private: #endif -SharedMemoryData::SharedMemoryData() noexcept -{ } +SharedMemoryData::SharedMemoryData() noexcept = default; SharedMemoryData::SharedMemoryData(std::string&& key, bool readOnly) : m_key{std::move(key)}, @@ -192,7 +191,7 @@ SharedMemoryData::SharedMemoryData(std::string&& key, std::size_t size, bool rea m_ptr{m_impl->get()} { } -SharedMemoryData::~SharedMemoryData() { } +SharedMemoryData::~SharedMemoryData() = default; SharedMemoryData::SharedMemoryData(SharedMemoryData&& other) noexcept : m_key{std::move(other.m_key)}, diff --git a/src/core/AudioEngineProfiler.cpp b/src/core/AudioEngineProfiler.cpp index 24c4dc5ae..5fd5a813c 100644 --- a/src/core/AudioEngineProfiler.cpp +++ b/src/core/AudioEngineProfiler.cpp @@ -36,11 +36,6 @@ AudioEngineProfiler::AudioEngineProfiler() : -AudioEngineProfiler::~AudioEngineProfiler() -{ -} - - void AudioEngineProfiler::finishPeriod( sample_rate_t sampleRate, fpp_t framesPerPeriod ) { int periodElapsed = m_periodTimer.elapsed(); diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 1cbacc2fd..3ae141281 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -176,12 +176,6 @@ DataFile::DataFile( const QByteArray & _data ) : -DataFile::~DataFile() -{ -} - - - bool DataFile::validate( QString extension ) { diff --git a/src/core/ImportFilter.cpp b/src/core/ImportFilter.cpp index 1caa62e7d..35c34078e 100644 --- a/src/core/ImportFilter.cpp +++ b/src/core/ImportFilter.cpp @@ -48,12 +48,6 @@ ImportFilter::ImportFilter( const QString & _file_name, -ImportFilter::~ImportFilter() -{ -} - - - void ImportFilter::import( const QString & _file_to_import, TrackContainer* tc ) diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 27c9e4f66..1f49fc80a 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -221,10 +221,6 @@ InstrumentFunctionNoteStacking::InstrumentFunctionNoteStacking( Model * _parent -InstrumentFunctionNoteStacking::~InstrumentFunctionNoteStacking() -{ -} - @@ -334,11 +330,6 @@ InstrumentFunctionArpeggio::InstrumentFunctionArpeggio( Model * _parent ) : -InstrumentFunctionArpeggio::~InstrumentFunctionArpeggio() -{ -} - - void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) diff --git a/src/core/InstrumentSoundShaping.cpp b/src/core/InstrumentSoundShaping.cpp index a9765d256..edf3b403c 100644 --- a/src/core/InstrumentSoundShaping.cpp +++ b/src/core/InstrumentSoundShaping.cpp @@ -107,11 +107,6 @@ InstrumentSoundShaping::InstrumentSoundShaping( -InstrumentSoundShaping::~InstrumentSoundShaping() -{ -} - - float InstrumentSoundShaping::volumeLevel( NotePlayHandle* n, const f_cnt_t frame ) diff --git a/src/core/Ladspa2LMMS.cpp b/src/core/Ladspa2LMMS.cpp index e16f5c98c..8ac6c3d86 100644 --- a/src/core/Ladspa2LMMS.cpp +++ b/src/core/Ladspa2LMMS.cpp @@ -82,12 +82,6 @@ Ladspa2LMMS::Ladspa2LMMS() -Ladspa2LMMS::~Ladspa2LMMS() -{ -} - - - QString Ladspa2LMMS::getShortName( const ladspa_key_t & _key ) { QString name = getName( _key ); diff --git a/src/core/LadspaControl.cpp b/src/core/LadspaControl.cpp index b166ccf9e..7e8e92623 100644 --- a/src/core/LadspaControl.cpp +++ b/src/core/LadspaControl.cpp @@ -112,13 +112,6 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port, -LadspaControl::~LadspaControl() -{ -} - - - - LADSPA_Data LadspaControl::value() { switch( m_port->data_type ) diff --git a/src/core/LinkedModelGroups.cpp b/src/core/LinkedModelGroups.cpp index 4fdf54fc0..83bebc2a0 100644 --- a/src/core/LinkedModelGroups.cpp +++ b/src/core/LinkedModelGroups.cpp @@ -140,11 +140,6 @@ bool LinkedModelGroup::containsModel(const QString &name) const -LinkedModelGroups::~LinkedModelGroups() {} - - - - void LinkedModelGroups::linkAllModels() { LinkedModelGroup* first = getGroup(0); diff --git a/src/core/MeterModel.cpp b/src/core/MeterModel.cpp index 3e24ae4d1..d9e5c0343 100644 --- a/src/core/MeterModel.cpp +++ b/src/core/MeterModel.cpp @@ -42,15 +42,6 @@ MeterModel::MeterModel( Model * _parent ) : } - - -MeterModel::~MeterModel() -{ -} - - - - void MeterModel::reset() { m_numeratorModel.setValue( 4 ); diff --git a/src/core/MicroTimer.cpp b/src/core/MicroTimer.cpp index 44506481e..499ba8dd3 100644 --- a/src/core/MicroTimer.cpp +++ b/src/core/MicroTimer.cpp @@ -14,10 +14,6 @@ MicroTimer::MicroTimer() reset(); } -MicroTimer::~MicroTimer() -{ -} - void MicroTimer::reset() { begin = steady_clock::now(); diff --git a/src/core/Mixer.cpp b/src/core/Mixer.cpp index 688190ee2..96d4fc8b2 100644 --- a/src/core/Mixer.cpp +++ b/src/core/Mixer.cpp @@ -51,11 +51,6 @@ MixerRoute::MixerRoute( MixerChannel * from, MixerChannel * to, float amount ) : } -MixerRoute::~MixerRoute() -{ -} - - void MixerRoute::updateName() { m_amount.setDisplayName( diff --git a/src/core/ModelVisitor.cpp b/src/core/ModelVisitor.cpp index 17e328587..665e16983 100644 --- a/src/core/ModelVisitor.cpp +++ b/src/core/ModelVisitor.cpp @@ -44,8 +44,4 @@ void ConstModelVisitor::visit(const FloatModel &m) { up(m); } void ConstModelVisitor::visit(const ComboBoxModel &m) { up(m); } void ConstModelVisitor::visit(const TempoSyncKnobModel &m) { up(m); } -ModelVisitor::~ModelVisitor() {} -ConstModelVisitor::~ConstModelVisitor() {} - - } // namespace lmms \ No newline at end of file diff --git a/src/core/PatternStore.cpp b/src/core/PatternStore.cpp index af1b9b3bb..f91c42b72 100644 --- a/src/core/PatternStore.cpp +++ b/src/core/PatternStore.cpp @@ -50,13 +50,6 @@ PatternStore::PatternStore() : -PatternStore::~PatternStore() -{ -} - - - - bool PatternStore::play(TimePos start, fpp_t frames, f_cnt_t offset, int clipNum) { bool notePlayed = false; diff --git a/src/core/Plugin.cpp b/src/core/Plugin.cpp index e71df15b8..edc183c23 100644 --- a/src/core/Plugin.cpp +++ b/src/core/Plugin.cpp @@ -74,13 +74,6 @@ Plugin::Plugin(const Descriptor * descriptor, Model * parent, const -Plugin::~Plugin() -{ -} - - - - template T use_this_or(T this_param, T or_param) { diff --git a/src/core/PluginFactory.cpp b/src/core/PluginFactory.cpp index 184dc0b94..81a6122d1 100644 --- a/src/core/PluginFactory.cpp +++ b/src/core/PluginFactory.cpp @@ -58,10 +58,6 @@ PluginFactory::PluginFactory() discoverPlugins(); } -PluginFactory::~PluginFactory() -{ -} - void PluginFactory::setupSearchPaths() { // Adds a search path relative to the main executable if the path exists. diff --git a/src/core/PresetPreviewPlayHandle.cpp b/src/core/PresetPreviewPlayHandle.cpp index 1734ef497..6a5b86424 100644 --- a/src/core/PresetPreviewPlayHandle.cpp +++ b/src/core/PresetPreviewPlayHandle.cpp @@ -53,9 +53,7 @@ public: m_previewInstrumentTrack->setPreviewMode( true ); } - ~PreviewTrackContainer() override - { - } + ~PreviewTrackContainer() override = default; QString nodeName() const override { diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index 2a59a2724..bc1fee5c0 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -49,13 +49,6 @@ ProjectJournal::ProjectJournal() : -ProjectJournal::~ProjectJournal() -{ -} - - - - void ProjectJournal::undo() { while( !m_undoCheckPoints.isEmpty() ) diff --git a/src/core/ProjectRenderer.cpp b/src/core/ProjectRenderer.cpp index bb5020c9b..5af4e428b 100644 --- a/src/core/ProjectRenderer.cpp +++ b/src/core/ProjectRenderer.cpp @@ -108,13 +108,6 @@ ProjectRenderer::ProjectRenderer( const AudioEngine::qualitySettings & qualitySe -ProjectRenderer::~ProjectRenderer() -{ -} - - - - // Little help function for getting file format from a file extension // (only for registered file-encoders). ProjectRenderer::ExportFileFormats ProjectRenderer::getFileFormatFromExtension( diff --git a/src/core/TempoSyncKnobModel.cpp b/src/core/TempoSyncKnobModel.cpp index 58437db24..6fb457f2c 100644 --- a/src/core/TempoSyncKnobModel.cpp +++ b/src/core/TempoSyncKnobModel.cpp @@ -53,13 +53,6 @@ TempoSyncKnobModel::TempoSyncKnobModel( const float _val, const float _min, -TempoSyncKnobModel::~TempoSyncKnobModel() -{ -} - - - - void TempoSyncKnobModel::setTempoSync( QAction * _item ) { setTempoSync( _item->data().toInt() ); diff --git a/src/core/ToolPlugin.cpp b/src/core/ToolPlugin.cpp index 99c3e5bec..137029137 100644 --- a/src/core/ToolPlugin.cpp +++ b/src/core/ToolPlugin.cpp @@ -38,13 +38,6 @@ ToolPlugin::ToolPlugin( const Descriptor * _descriptor, Model * _parent ) : -ToolPlugin::~ToolPlugin() -{ -} - - - - ToolPlugin * ToolPlugin::instantiate( const QString & _plugin_name, Model * _parent ) { Plugin * p = Plugin::instantiate( _plugin_name, _parent, nullptr ); diff --git a/src/core/ValueBuffer.cpp b/src/core/ValueBuffer.cpp index 09aee65bd..01003dc3b 100644 --- a/src/core/ValueBuffer.cpp +++ b/src/core/ValueBuffer.cpp @@ -6,9 +6,6 @@ namespace lmms { -ValueBuffer::ValueBuffer() -{} - ValueBuffer::ValueBuffer(int length) : std::vector(length) {} diff --git a/src/core/audio/AudioSdl.cpp b/src/core/audio/AudioSdl.cpp index cb622a941..d321e8566 100644 --- a/src/core/audio/AudioSdl.cpp +++ b/src/core/audio/AudioSdl.cpp @@ -340,13 +340,6 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) : -AudioSdl::setupWidget::~setupWidget() -{ -} - - - - void AudioSdl::setupWidget::saveSettings() { ConfigManager::inst()->setValue( "audiosdl", "device", diff --git a/src/core/audio/AudioSndio.cpp b/src/core/audio/AudioSndio.cpp index f6c94f32a..0ba801585 100644 --- a/src/core/audio/AudioSndio.cpp +++ b/src/core/audio/AudioSndio.cpp @@ -204,12 +204,6 @@ AudioSndio::setupWidget::setupWidget( QWidget * _parent ) : } -AudioSndio::setupWidget::~setupWidget() -{ - -} - - void AudioSndio::setupWidget::saveSettings() { ConfigManager::inst()->setValue( "audiosndio", "device", diff --git a/src/core/audio/AudioSoundIo.cpp b/src/core/audio/AudioSoundIo.cpp index 165e38cde..4d8c48708 100644 --- a/src/core/audio/AudioSoundIo.cpp +++ b/src/core/audio/AudioSoundIo.cpp @@ -345,10 +345,6 @@ void AudioSoundIo::writeCallback(int frameCountMin, int frameCountMax) } } -AudioSoundIoSetupUtil::~AudioSoundIoSetupUtil() -{ -} - void AudioSoundIoSetupUtil::reconnectSoundIo() { ((AudioSoundIo::setupWidget *)m_setupWidget)->reconnectSoundIo(); diff --git a/src/core/lv2/Lv2ControlBase.cpp b/src/core/lv2/Lv2ControlBase.cpp index 6fb5900ea..c1679aaef 100644 --- a/src/core/lv2/Lv2ControlBase.cpp +++ b/src/core/lv2/Lv2ControlBase.cpp @@ -89,7 +89,7 @@ Lv2ControlBase::Lv2ControlBase(Model* that, const QString &uri) : -Lv2ControlBase::~Lv2ControlBase() {} +Lv2ControlBase::~Lv2ControlBase() = default; diff --git a/src/core/lv2/Lv2Ports.cpp b/src/core/lv2/Lv2Ports.cpp index 9e7a9e80c..1ce1d6956 100644 --- a/src/core/lv2/Lv2Ports.cpp +++ b/src/core/lv2/Lv2Ports.cpp @@ -352,15 +352,6 @@ void AtomSeq::Lv2EvbufDeleter::operator()(LV2_Evbuf *n) { lv2_evbuf_free(n); } -// make the compiler happy, give each class with virtuals -// a function (the destructor here) which is in a cpp file -PortBase::~PortBase() {} -ConstVisitor::~ConstVisitor() {} -Visitor::~Visitor() {} - - - - } // namespace lmms::Lv2Ports #endif // LMMS_HAVE_LV2 diff --git a/src/core/lv2/Lv2Proc.cpp b/src/core/lv2/Lv2Proc.cpp index 20987b32f..1276a13b8 100644 --- a/src/core/lv2/Lv2Proc.cpp +++ b/src/core/lv2/Lv2Proc.cpp @@ -756,11 +756,9 @@ struct ConnectPortVisitor : public Lv2Ports::Visitor connectPort((audio.mustBeUsed()) ? audio.m_buffer.data() : nullptr); } void visit(Lv2Ports::Unknown&) override { connectPort(nullptr); } - ~ConnectPortVisitor() override; + ~ConnectPortVisitor() override = default; }; -ConnectPortVisitor::~ConnectPortVisitor() {} - // !This function must be realtime safe! // use createPort to create any port before connecting void Lv2Proc::connectPort(std::size_t num) diff --git a/src/core/midi/MidiClient.cpp b/src/core/midi/MidiClient.cpp index def556170..af7cfee0a 100644 --- a/src/core/midi/MidiClient.cpp +++ b/src/core/midi/MidiClient.cpp @@ -30,13 +30,6 @@ namespace lmms { -MidiClient::MidiClient() -{ -} - - - - MidiClient::~MidiClient() { //TODO: noteOffAll(); / clear all ports @@ -106,20 +99,6 @@ void MidiClient::subscribeWritablePort( MidiPort* , const QString& , bool ) -MidiClientRaw::MidiClientRaw() -{ -} - - - - -MidiClientRaw::~MidiClientRaw() -{ -} - - - - void MidiClientRaw::parseData( const unsigned char c ) { /*********************************************************************/ diff --git a/src/core/midi/MidiController.cpp b/src/core/midi/MidiController.cpp index 75f548a37..fbd48e945 100644 --- a/src/core/midi/MidiController.cpp +++ b/src/core/midi/MidiController.cpp @@ -47,13 +47,6 @@ MidiController::MidiController( Model * _parent ) : -MidiController::~MidiController() -{ -} - - - - void MidiController::updateValueBuffer() { if( m_previousValue != m_lastValue ) diff --git a/src/gui/AudioDeviceSetupWidget.cpp b/src/gui/AudioDeviceSetupWidget.cpp index ae559404c..b78800cec 100644 --- a/src/gui/AudioDeviceSetupWidget.cpp +++ b/src/gui/AudioDeviceSetupWidget.cpp @@ -32,10 +32,6 @@ AudioDeviceSetupWidget::AudioDeviceSetupWidget(const QString & caption, QWidget { } -AudioDeviceSetupWidget::~AudioDeviceSetupWidget() -{ -} - void AudioDeviceSetupWidget::show() { parentWidget()->show(); diff --git a/src/gui/ControllerDialog.cpp b/src/gui/ControllerDialog.cpp index be7d5dbef..344898808 100644 --- a/src/gui/ControllerDialog.cpp +++ b/src/gui/ControllerDialog.cpp @@ -41,12 +41,6 @@ ControllerDialog::ControllerDialog( Controller * _controller, -ControllerDialog::~ControllerDialog() -{ -} - - - void ControllerDialog::closeEvent( QCloseEvent * _ce ) { _ce->ignore(); diff --git a/src/gui/ControllerRackView.cpp b/src/gui/ControllerRackView.cpp index e9f23c767..e110067d6 100644 --- a/src/gui/ControllerRackView.cpp +++ b/src/gui/ControllerRackView.cpp @@ -93,13 +93,6 @@ ControllerRackView::ControllerRackView() : -ControllerRackView::~ControllerRackView() -{ -} - - - - void ControllerRackView::saveSettings( QDomDocument & _doc, QDomElement & _this ) { diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp index fa28c695f..088d54657 100644 --- a/src/gui/Controls.cpp +++ b/src/gui/Controls.cpp @@ -38,11 +38,6 @@ namespace lmms::gui { -Control::~Control() {} - - - - void KnobControl::setText(const QString &text) { m_knob->setLabel(text); } QWidget *KnobControl::topWidget() { return m_knob; } @@ -59,10 +54,6 @@ AutomatableModelView* KnobControl::modelView() { return m_knob; } KnobControl::KnobControl(QWidget *parent) : m_knob(new Knob(parent)) {} -KnobControl::~KnobControl() {} - - - void ComboControl::setText(const QString &text) { m_label->setText(text); } @@ -87,9 +78,6 @@ ComboControl::ComboControl(QWidget *parent) : m_combo->repaint(); } -ComboControl::~ComboControl() {} - - void CheckControl::setText(const QString &text) { m_label->setText(text); } @@ -115,8 +103,6 @@ CheckControl::CheckControl(QWidget *parent) : vbox->addWidget(m_label); } -CheckControl::~CheckControl() {} - @@ -138,7 +124,5 @@ LcdControl::LcdControl(int numDigits, QWidget *parent) : { } -LcdControl::~LcdControl() {} - } // namespace lmms::gui diff --git a/src/gui/EffectControlDialog.cpp b/src/gui/EffectControlDialog.cpp index a134435fa..1e0fbb802 100644 --- a/src/gui/EffectControlDialog.cpp +++ b/src/gui/EffectControlDialog.cpp @@ -44,13 +44,6 @@ EffectControlDialog::EffectControlDialog( EffectControls * _controls ) : -EffectControlDialog::~EffectControlDialog() -{ -} - - - - void EffectControlDialog::closeEvent( QCloseEvent * _ce ) { _ce->ignore(); diff --git a/src/gui/LadspaControlView.cpp b/src/gui/LadspaControlView.cpp index a82f2e33e..d8c167a1c 100644 --- a/src/gui/LadspaControlView.cpp +++ b/src/gui/LadspaControlView.cpp @@ -121,10 +121,4 @@ LadspaControlView::LadspaControlView( QWidget * _parent, -LadspaControlView::~LadspaControlView() -{ -} - - - } // namespace lmms::gui diff --git a/src/gui/LinkedModelGroupViews.cpp b/src/gui/LinkedModelGroupViews.cpp index 80b08f384..a16c930d5 100644 --- a/src/gui/LinkedModelGroupViews.cpp +++ b/src/gui/LinkedModelGroupViews.cpp @@ -55,11 +55,6 @@ LinkedModelGroupView::LinkedModelGroupView(QWidget* parent, -LinkedModelGroupView::~LinkedModelGroupView() {} - - - - void LinkedModelGroupView::modelChanged(LinkedModelGroup *group) { // reconnect models diff --git a/src/gui/LmmsPalette.cpp b/src/gui/LmmsPalette.cpp index 769405d3e..48d6de0df 100644 --- a/src/gui/LmmsPalette.cpp +++ b/src/gui/LmmsPalette.cpp @@ -52,10 +52,6 @@ LmmsPalette::LmmsPalette( QWidget * parent, QStyle * stylearg ) : ensurePolished(); } -LmmsPalette::~LmmsPalette() -{ -} - #define ACCESSMET( read, write ) \ QColor LmmsPalette:: read () const \ { return m_##read ; } \ diff --git a/src/gui/Lv2ViewBase.cpp b/src/gui/Lv2ViewBase.cpp index 7f7a06959..9e95fca2e 100644 --- a/src/gui/Lv2ViewBase.cpp +++ b/src/gui/Lv2ViewBase.cpp @@ -126,11 +126,6 @@ Lv2ViewProc::Lv2ViewProc(QWidget* parent, Lv2Proc* ctrlBase, int colNum) : -Lv2ViewProc::~Lv2ViewProc() {} - - - - AutoLilvNode Lv2ViewProc::uri(const char *uriStr) { return Engine::getLv2Manager()->uri(uriStr); diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp index 6e3d9f95a..32355edd6 100644 --- a/src/gui/MixerView.cpp +++ b/src/gui/MixerView.cpp @@ -113,7 +113,7 @@ MixerView::MixerView() : public: ChannelArea( QWidget * parent, MixerView * mv ) : QScrollArea( parent ), m_mv( mv ) {} - ~ChannelArea() override {} + ~ChannelArea() override = default; void keyPressEvent( QKeyEvent * e ) override { m_mv->keyPressEvent( e ); diff --git a/src/gui/PeakControllerDialog.cpp b/src/gui/PeakControllerDialog.cpp index 62307fc7d..760c42591 100644 --- a/src/gui/PeakControllerDialog.cpp +++ b/src/gui/PeakControllerDialog.cpp @@ -55,12 +55,6 @@ PeakControllerDialog::PeakControllerDialog( Controller * _model, QWidget * _pare -PeakControllerDialog::~PeakControllerDialog() -{ -} - - - /* void effectView::closeEffects() { diff --git a/src/gui/ProjectNotes.cpp b/src/gui/ProjectNotes.cpp index 22e806cdb..15e507889 100644 --- a/src/gui/ProjectNotes.cpp +++ b/src/gui/ProjectNotes.cpp @@ -84,13 +84,6 @@ ProjectNotes::ProjectNotes() : -ProjectNotes::~ProjectNotes() -{ -} - - - - void ProjectNotes::clear() { m_edit->setHtml( tr( "Enter project notes here" ) ); diff --git a/src/gui/SampleTrackWindow.cpp b/src/gui/SampleTrackWindow.cpp index c8901dda2..c12ab1b1a 100644 --- a/src/gui/SampleTrackWindow.cpp +++ b/src/gui/SampleTrackWindow.cpp @@ -163,11 +163,6 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) : subWin->hide(); } -SampleTrackWindow::~SampleTrackWindow() -{ -} - - void SampleTrackWindow::setSampleTrackView(SampleTrackView* tv) { diff --git a/src/gui/SideBar.cpp b/src/gui/SideBar.cpp index e16367a7b..d3935024d 100644 --- a/src/gui/SideBar.cpp +++ b/src/gui/SideBar.cpp @@ -101,13 +101,6 @@ SideBar::SideBar( Qt::Orientation _orientation, QWidget * _parent ) : -SideBar::~SideBar() -{ -} - - - - void SideBar::appendTab( SideBarWidget *widget ) { SideBarButton *button = new SideBarButton( orientation(), this ); diff --git a/src/gui/SideBarWidget.cpp b/src/gui/SideBarWidget.cpp index 600ed245c..cf0233af1 100644 --- a/src/gui/SideBarWidget.cpp +++ b/src/gui/SideBarWidget.cpp @@ -55,13 +55,6 @@ SideBarWidget::SideBarWidget( const QString & _title, const QPixmap & _icon, -SideBarWidget::~SideBarWidget() -{ -} - - - - void SideBarWidget::paintEvent( QPaintEvent * ) { QPainter p( this ); diff --git a/src/gui/clips/AutomationClipView.cpp b/src/gui/clips/AutomationClipView.cpp index 2bc29184c..1ecf78155 100644 --- a/src/gui/clips/AutomationClipView.cpp +++ b/src/gui/clips/AutomationClipView.cpp @@ -71,13 +71,6 @@ AutomationClipView::AutomationClipView( AutomationClip * _clip, -AutomationClipView::~AutomationClipView() -{ -} - - - - void AutomationClipView::openInAutomationEditor() { if(getGUI() != nullptr) diff --git a/src/gui/editors/AutomationEditor.cpp b/src/gui/editors/AutomationEditor.cpp index fba88643e..2cc9a6faf 100644 --- a/src/gui/editors/AutomationEditor.cpp +++ b/src/gui/editors/AutomationEditor.cpp @@ -1967,11 +1967,6 @@ AutomationEditorWindow::AutomationEditorWindow() : } -AutomationEditorWindow::~AutomationEditorWindow() -{ -} - - void AutomationEditorWindow::setCurrentClip(AutomationClip* clip) { // Disconnect our old clip diff --git a/src/gui/editors/Editor.cpp b/src/gui/editors/Editor.cpp index 19f64a65c..cd2a23f66 100644 --- a/src/gui/editors/Editor.cpp +++ b/src/gui/editors/Editor.cpp @@ -133,11 +133,6 @@ Editor::Editor(bool record, bool stepRecord) : addButton(m_stopAction, "stopButton"); } -Editor::~Editor() -{ - -} - QAction *Editor::playAction() const { return m_playAction; diff --git a/src/gui/editors/PatternEditor.cpp b/src/gui/editors/PatternEditor.cpp index 86a116dd2..4c00942db 100644 --- a/src/gui/editors/PatternEditor.cpp +++ b/src/gui/editors/PatternEditor.cpp @@ -301,11 +301,6 @@ PatternEditorWindow::PatternEditorWindow(PatternStore* ps) : } -PatternEditorWindow::~PatternEditorWindow() -{ -} - - QSize PatternEditorWindow::sizeHint() const { return {minimumWidth() + 10, 300}; diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index b9f0e1397..0a10fa354 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -625,11 +625,6 @@ void PianoRoll::markSemiTone(int i, bool fromMenu) } -PianoRoll::~PianoRoll() -{ -} - - void PianoRoll::setGhostMidiClip( MidiClip* newMidiClip ) { // Expects a pointer to a MIDI clip or nullptr. diff --git a/src/gui/editors/Rubberband.cpp b/src/gui/editors/Rubberband.cpp index c1ef329f0..cfff787e0 100644 --- a/src/gui/editors/Rubberband.cpp +++ b/src/gui/editors/Rubberband.cpp @@ -38,13 +38,6 @@ RubberBand::RubberBand( QWidget * _parent ) : -RubberBand::~RubberBand() -{ -} - - - - QVector RubberBand::selectedObjects() const { QVector so = selectableObjects(); diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index eaabf52ea..bd1269b2a 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -277,10 +277,6 @@ SongEditor::SongEditor( Song * song ) : -SongEditor::~SongEditor() -{ -} - void SongEditor::saveSettings( QDomDocument& doc, QDomElement& element ) { MainWindow::saveWidgetState( parentWidget(), element ); diff --git a/src/gui/editors/TrackContainerView.cpp b/src/gui/editors/TrackContainerView.cpp index 43309d96b..e7db85e43 100644 --- a/src/gui/editors/TrackContainerView.cpp +++ b/src/gui/editors/TrackContainerView.cpp @@ -487,13 +487,6 @@ TrackContainerView::scrollArea::scrollArea( TrackContainerView * _parent ) : -TrackContainerView::scrollArea::~scrollArea() -{ -} - - - - void TrackContainerView::scrollArea::wheelEvent( QWheelEvent * _we ) { // always pass wheel-event to parent-widget (song-editor diff --git a/src/gui/instrument/InstrumentMidiIOView.cpp b/src/gui/instrument/InstrumentMidiIOView.cpp index 68491d6e6..31eebca20 100644 --- a/src/gui/instrument/InstrumentMidiIOView.cpp +++ b/src/gui/instrument/InstrumentMidiIOView.cpp @@ -171,12 +171,6 @@ InstrumentMidiIOView::InstrumentMidiIOView( QWidget* parent ) : -InstrumentMidiIOView::~InstrumentMidiIOView() -{ -} - - - void InstrumentMidiIOView::modelChanged() { diff --git a/src/gui/instrument/InstrumentView.cpp b/src/gui/instrument/InstrumentView.cpp index 23e758cf2..fe2c04cfb 100644 --- a/src/gui/instrument/InstrumentView.cpp +++ b/src/gui/instrument/InstrumentView.cpp @@ -75,9 +75,5 @@ InstrumentTrackWindow * InstrumentView::instrumentTrackWindow() -InstrumentViewFixedSize::~InstrumentViewFixedSize() -{ -} - } // namespace lmms::gui \ No newline at end of file diff --git a/src/gui/menus/MidiPortMenu.cpp b/src/gui/menus/MidiPortMenu.cpp index 88e6a4f30..a7c61fb0c 100644 --- a/src/gui/menus/MidiPortMenu.cpp +++ b/src/gui/menus/MidiPortMenu.cpp @@ -42,12 +42,6 @@ MidiPortMenu::MidiPortMenu( MidiPort::Modes _mode ) : -MidiPortMenu::~MidiPortMenu() -{ -} - - - void MidiPortMenu::modelChanged() { diff --git a/src/gui/modals/ControllerConnectionDialog.cpp b/src/gui/modals/ControllerConnectionDialog.cpp index fb86328a1..12dd7c6ef 100644 --- a/src/gui/modals/ControllerConnectionDialog.cpp +++ b/src/gui/modals/ControllerConnectionDialog.cpp @@ -60,9 +60,7 @@ public: } - ~AutoDetectMidiController() override - { - } + ~AutoDetectMidiController() override = default; void processInEvent( const MidiEvent& event, const TimePos& time, f_cnt_t offset = 0 ) override diff --git a/src/gui/modals/RenameDialog.cpp b/src/gui/modals/RenameDialog.cpp index 0028cd1a0..381064f39 100644 --- a/src/gui/modals/RenameDialog.cpp +++ b/src/gui/modals/RenameDialog.cpp @@ -52,12 +52,6 @@ RenameDialog::RenameDialog( QString & _string ) : -RenameDialog::~RenameDialog() -{ -} - - - void RenameDialog::resizeEvent (QResizeEvent * event) { m_stringLE->setGeometry ( 10, 5, width() - 20, 20 ); diff --git a/src/gui/tracks/FadeButton.cpp b/src/gui/tracks/FadeButton.cpp index d4b75cbf1..2f4727e5e 100644 --- a/src/gui/tracks/FadeButton.cpp +++ b/src/gui/tracks/FadeButton.cpp @@ -55,11 +55,6 @@ FadeButton::FadeButton(const QColor & _normal_color, - -FadeButton::~FadeButton() -{ -} - void FadeButton::setActiveColor(const QColor & activated_color) { m_activatedColor = activated_color; diff --git a/src/gui/tracks/TrackContentWidget.cpp b/src/gui/tracks/TrackContentWidget.cpp index 5e6344ec4..e22750ce3 100644 --- a/src/gui/tracks/TrackContentWidget.cpp +++ b/src/gui/tracks/TrackContentWidget.cpp @@ -82,14 +82,6 @@ TrackContentWidget::TrackContentWidget( TrackView * parent ) : -/*! \brief Destroy this trackContentWidget - * - * Destroys the trackContentWidget. - */ -TrackContentWidget::~TrackContentWidget() -{ -} - diff --git a/src/gui/tracks/TrackLabelButton.cpp b/src/gui/tracks/TrackLabelButton.cpp index 77e678617..4e0b2be35 100644 --- a/src/gui/tracks/TrackLabelButton.cpp +++ b/src/gui/tracks/TrackLabelButton.cpp @@ -73,11 +73,6 @@ TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) : -TrackLabelButton::~TrackLabelButton() -{ -} - - void TrackLabelButton::rename() diff --git a/src/gui/tracks/TrackOperationsWidget.cpp b/src/gui/tracks/TrackOperationsWidget.cpp index bef6ddcbf..b3c8ac379 100644 --- a/src/gui/tracks/TrackOperationsWidget.cpp +++ b/src/gui/tracks/TrackOperationsWidget.cpp @@ -120,13 +120,6 @@ TrackOperationsWidget::TrackOperationsWidget( TrackView * parent ) : -/*! \brief Destroy an existing trackOperationsWidget - * - */ -TrackOperationsWidget::~TrackOperationsWidget() -{ -} - diff --git a/src/gui/tracks/TrackView.cpp b/src/gui/tracks/TrackView.cpp index 2065b0b53..4eece14d4 100644 --- a/src/gui/tracks/TrackView.cpp +++ b/src/gui/tracks/TrackView.cpp @@ -115,12 +115,6 @@ TrackView::TrackView( Track * track, TrackContainerView * tcv ) : -/*! \brief Destroy this track View. - * - */ -TrackView::~TrackView() -{ -} diff --git a/src/gui/widgets/AutomatableSlider.cpp b/src/gui/widgets/AutomatableSlider.cpp index 13cd9771f..7e1be0e06 100644 --- a/src/gui/widgets/AutomatableSlider.cpp +++ b/src/gui/widgets/AutomatableSlider.cpp @@ -51,10 +51,6 @@ AutomatableSlider::AutomatableSlider( QWidget * _parent, -AutomatableSlider::~AutomatableSlider() -{ -} - diff --git a/src/gui/widgets/CPULoadWidget.cpp b/src/gui/widgets/CPULoadWidget.cpp index 3f465d347..799e037ef 100644 --- a/src/gui/widgets/CPULoadWidget.cpp +++ b/src/gui/widgets/CPULoadWidget.cpp @@ -59,10 +59,6 @@ CPULoadWidget::CPULoadWidget( QWidget * _parent ) : -CPULoadWidget::~CPULoadWidget() -{ -} - diff --git a/src/gui/widgets/CaptionMenu.cpp b/src/gui/widgets/CaptionMenu.cpp index 032ee10b9..bfcd3003e 100644 --- a/src/gui/widgets/CaptionMenu.cpp +++ b/src/gui/widgets/CaptionMenu.cpp @@ -40,9 +40,5 @@ CaptionMenu::CaptionMenu( const QString & _title, QWidget * _parent ) : -CaptionMenu::~CaptionMenu() -{ -} - } // namespace lmms::gui diff --git a/src/gui/widgets/ComboBox.cpp b/src/gui/widgets/ComboBox.cpp index 7b6121b23..bdf78ccce 100644 --- a/src/gui/widgets/ComboBox.cpp +++ b/src/gui/widgets/ComboBox.cpp @@ -82,10 +82,6 @@ ComboBox::ComboBox( QWidget * _parent, const QString & _name ) : -ComboBox::~ComboBox() -{ -} - void ComboBox::selectNext() diff --git a/src/gui/widgets/MeterDialog.cpp b/src/gui/widgets/MeterDialog.cpp index f60f6bd06..c13fe3802 100644 --- a/src/gui/widgets/MeterDialog.cpp +++ b/src/gui/widgets/MeterDialog.cpp @@ -103,10 +103,6 @@ MeterDialog::MeterDialog( QWidget * _parent, bool _simple ) : -MeterDialog::~MeterDialog() -{ -} - diff --git a/src/gui/widgets/PixmapButton.cpp b/src/gui/widgets/PixmapButton.cpp index 938322b51..13c09c52e 100644 --- a/src/gui/widgets/PixmapButton.cpp +++ b/src/gui/widgets/PixmapButton.cpp @@ -47,10 +47,6 @@ PixmapButton::PixmapButton( QWidget * _parent, const QString & _name ) : -PixmapButton::~PixmapButton() -{ -} - From c075ba93fb77b38819a0e536be05c6b0b90e21ed Mon Sep 17 00:00:00 2001 From: Levin Oehlmann Date: Sun, 26 Jun 2022 08:54:59 +0200 Subject: [PATCH 16/17] clang-tidy: Run modernize-use-emplace everywhere (#6451) ... to avoid constructing and copying temp objects --- include/RemotePluginBase.h | 4 ++-- plugins/MidiExport/MidiExport.cpp | 2 +- src/core/Scale.cpp | 2 +- src/gui/MicrotunerConfig.cpp | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/RemotePluginBase.h b/include/RemotePluginBase.h index c5bf35bcb..8ecf47087 100644 --- a/include/RemotePluginBase.h +++ b/include/RemotePluginBase.h @@ -408,7 +408,7 @@ public: { char buf[32]; sprintf( buf, "%d", _i ); - data.push_back( std::string( buf ) ); + data.emplace_back( buf ); return *this; } @@ -416,7 +416,7 @@ public: { char buf[32]; sprintf( buf, "%f", _f ); - data.push_back( std::string( buf ) ); + data.emplace_back( buf ); return *this; } diff --git a/plugins/MidiExport/MidiExport.cpp b/plugins/MidiExport/MidiExport.cpp index 23164276c..cb8939778 100644 --- a/plugins/MidiExport/MidiExport.cpp +++ b/plugins/MidiExport/MidiExport.cpp @@ -157,7 +157,7 @@ bool MidiExport::tryExport(const TrackContainer::TrackList &tracks, QDomElement it = n.toElement(); int pos = it.attribute("pos", "0").toInt(); int len = it.attribute("len", "0").toInt(); - plist.push_back(std::pair(pos, pos+len)); + plist.emplace_back(pos, pos+len); } } std::sort(plist.begin(), plist.end()); diff --git a/src/core/Scale.cpp b/src/core/Scale.cpp index 762da4ff8..df0effe6b 100644 --- a/src/core/Scale.cpp +++ b/src/core/Scale.cpp @@ -75,7 +75,7 @@ void Interval::loadSettings(const QDomElement &element) Scale::Scale() : m_description(tr("empty")) { - m_intervals.push_back(Interval(1, 1)); + m_intervals.emplace_back(1, 1); } Scale::Scale(QString description, std::vector intervals) : diff --git a/src/gui/MicrotunerConfig.cpp b/src/gui/MicrotunerConfig.cpp index 4522da5c5..2f0f0edd9 100644 --- a/src/gui/MicrotunerConfig.cpp +++ b/src/gui/MicrotunerConfig.cpp @@ -397,7 +397,7 @@ bool MicrotunerConfig::applyScale() if (!validateScaleForm()) {return false;}; std::vector newIntervals; - newIntervals.push_back(Interval(1, 1)); + newIntervals.emplace_back(1, 1); #if (QT_VERSION >= QT_VERSION_CHECK(5,14,0)) QStringList input = m_keymapTextEdit->toPlainText().split('\n', Qt::SkipEmptyParts); @@ -411,7 +411,7 @@ bool MicrotunerConfig::applyScale() QString firstSection = line.section(QRegExp("\\s+|/"), 0, 0, QString::SectionSkipEmpty); if (firstSection.contains('.')) // cent mode { - newIntervals.push_back(Interval(firstSection.toFloat())); + newIntervals.emplace_back(firstSection.toFloat()); } else // ratio mode { @@ -421,7 +421,7 @@ bool MicrotunerConfig::applyScale() { den = line.split('/').at(1).section(QRegExp("\\s+"), 0, 0, QString::SectionSkipEmpty).toInt(); } - newIntervals.push_back(Interval(num, den)); + newIntervals.emplace_back(num, den); } } From 29efb5d6ba1e0e342a29a89cb53a1432c16bb09c Mon Sep 17 00:00:00 2001 From: Johannes Lorenz <1042576+JohannesLorenz@users.noreply.github.com> Date: Sat, 2 Jul 2022 10:20:46 +0200 Subject: [PATCH 17/17] MidiRawClient: Fix setting useless param (#6431) MidiChannelPressure and MidiProgramChange have only one param, so only set this one param for those. --- src/core/midi/MidiClient.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/midi/MidiClient.cpp b/src/core/midi/MidiClient.cpp index af7cfee0a..1c200bc1b 100644 --- a/src/core/midi/MidiClient.cpp +++ b/src/core/midi/MidiClient.cpp @@ -203,12 +203,15 @@ void MidiClientRaw::parseData( const unsigned char c ) case MidiNoteOff: case MidiNoteOn: case MidiKeyPressure: - case MidiChannelPressure: - case MidiProgramChange: m_midiParseData.m_midiEvent.setKey(m_midiParseData.m_buffer[0]); m_midiParseData.m_midiEvent.setVelocity(m_midiParseData.m_buffer[1]); break; + case MidiChannelPressure: + case MidiProgramChange: + m_midiParseData.m_midiEvent.setParam(0, m_midiParseData.m_buffer[0]); + break; + case MidiControlChange: m_midiParseData.m_midiEvent.setControllerNumber(m_midiParseData.m_buffer[0]); m_midiParseData.m_midiEvent.setControllerValue( m_midiParseData.m_buffer[1]);