diff --git a/include/AutomationPattern.h b/include/AutomationPattern.h index bca0701089a..5c0e9b4e8c2 100644 --- a/include/AutomationPattern.h +++ b/include/AutomationPattern.h @@ -40,6 +40,11 @@ namespace lmms class AutomationTrack; class TimePos; +namespace gui +{ +class AutomationPatternView; +} // namespace gui + class LMMS_EXPORT AutomationPattern : public TrackContentObject @@ -207,7 +212,7 @@ public slots: static const float DEFAULT_MIN_VALUE; static const float DEFAULT_MAX_VALUE; - friend class AutomationPatternView; + friend class gui::AutomationPatternView; friend class AutomationNode; } ; diff --git a/include/LinkedModelGroups.h b/include/LinkedModelGroups.h index 4f780cc6103..378836afa98 100644 --- a/include/LinkedModelGroups.h +++ b/include/LinkedModelGroups.h @@ -30,6 +30,9 @@ #include #include +#include +#include + #include "Model.h" diff --git a/include/Lv2Ports.h b/include/Lv2Ports.h index fbb917d6337..22a051a21b4 100644 --- a/include/Lv2Ports.h +++ b/include/Lv2Ports.h @@ -205,7 +205,7 @@ struct Audio : public VisitablePort 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 diff --git a/include/MidiController.h b/include/MidiController.h index 6d0f3d805c2..533f8ff032b 100644 --- a/include/MidiController.h +++ b/include/MidiController.h @@ -38,6 +38,11 @@ namespace lmms class MidiPort; +namespace gui +{ +class ControllerConnectionDialog; +} + class MidiController : public Controller, public MidiEventProcessor { @@ -79,7 +84,7 @@ public slots: float m_lastValue; float m_previousValue; - friend class ControllerConnectionDialog; + friend class gui::ControllerConnectionDialog; friend class AutoDetectMidiController; } ; diff --git a/include/MidiPort.h b/include/MidiPort.h index 9782f3fb6b2..980980597f6 100644 --- a/include/MidiPort.h +++ b/include/MidiPort.h @@ -45,6 +45,8 @@ namespace gui { class MidiPortMenu; +class ControllerConnectionDialog; +class InstrumentMidiIOView; } @@ -173,8 +175,8 @@ private slots: Map m_writablePorts; - friend class ControllerConnectionDialog; - friend class InstrumentMidiIOView; + friend class gui::ControllerConnectionDialog; + friend class gui::InstrumentMidiIOView; signals: diff --git a/include/Pattern.h b/include/Pattern.h index bade1446a2f..edc29cd3e40 100644 --- a/include/Pattern.h +++ b/include/Pattern.h @@ -39,6 +39,12 @@ namespace lmms class InstrumentTrack; +namespace gui +{ +class PatternView; +class BBTrackContainerView; +} + class LMMS_EXPORT Pattern : public TrackContentObject { @@ -106,7 +112,7 @@ class LMMS_EXPORT Pattern : public TrackContentObject bool empty(); - TrackContentObjectView * createView( TrackView * _tv ) override; + gui::TrackContentObjectView * createView( gui::TrackView * _tv ) override; using Model::dataChanged; diff --git a/include/SampleTCO.h b/include/SampleTCO.h index f4abce309ad..7824345b017 100644 --- a/include/SampleTCO.h +++ b/include/SampleTCO.h @@ -62,7 +62,7 @@ class SampleTCO : public TrackContentObject TimePos sampleLength() const; void setSampleStartFrame( f_cnt_t startFrame ); void setSamplePlayLength( f_cnt_t length ); - TrackContentObjectView * createView( TrackView * _tv ) override; + gui::TrackContentObjectView* createView( gui::TrackView* _tv ) override; bool isPlaying() const; diff --git a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp index 88538b813f2..2e261a364e3 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.cpp @@ -34,6 +34,8 @@ #include "LedCheckbox.h" #include "embed.h" +namespace lmms::gui +{ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog( PeakControllerEffectControls * _controls ) : @@ -103,3 +105,5 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog( setLayout( mainLayout ); } + +} // namespace lmms::gui diff --git a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h index cd6a99d2b37..7211679759e 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h +++ b/plugins/peak_controller_effect/peak_controller_effect_control_dialog.h @@ -28,7 +28,13 @@ #include "EffectControlDialog.h" +namespace lmms +{ + class PeakControllerEffectControls; + +namespace gui +{ class Knob; class LedCheckBox; @@ -57,5 +63,8 @@ class PeakControllerEffectControlDialog : public EffectControlDialog } ; +} // namespace gui + +} // namespace lmms #endif diff --git a/plugins/peak_controller_effect/peak_controller_effect_controls.h b/plugins/peak_controller_effect/peak_controller_effect_controls.h index 8375cf8d543..574fb622c5f 100644 --- a/plugins/peak_controller_effect/peak_controller_effect_controls.h +++ b/plugins/peak_controller_effect/peak_controller_effect_controls.h @@ -36,6 +36,7 @@ namespace lmms class PeakControllerEffect; + class PeakControllerEffectControls : public EffectControls { Q_OBJECT @@ -56,9 +57,9 @@ class PeakControllerEffectControls : public EffectControls { return 1; } - EffectControlDialog * createView() override + gui::EffectControlDialog * createView() override { - return new PeakControllerEffectControlDialog( this ); + return new gui::PeakControllerEffectControlDialog( this ); } @@ -74,7 +75,7 @@ class PeakControllerEffectControls : public EffectControls BoolModel m_absModel; FloatModel m_amountMultModel; - friend class PeakControllerEffectControlDialog; + friend class gui::PeakControllerEffectControlDialog; friend class PeakControllerEffect; } ; diff --git a/src/core/LinkedModelGroups.cpp b/src/core/LinkedModelGroups.cpp index 11d740bd1a7..0cbaedb33b4 100644 --- a/src/core/LinkedModelGroups.cpp +++ b/src/core/LinkedModelGroups.cpp @@ -24,8 +24,6 @@ #include "LinkedModelGroups.h" -#include -#include #include "AutomatableModel.h" diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index 3d550ece869..70ef2ea1119 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -1124,7 +1124,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()) @@ -1147,7 +1147,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; diff --git a/src/core/SampleTCO.cpp b/src/core/SampleTCO.cpp index 0dd94fd59de..8f4124695d7 100644 --- a/src/core/SampleTCO.cpp +++ b/src/core/SampleTCO.cpp @@ -51,7 +51,7 @@ SampleTCO::SampleTCO( Track * _track ) : 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() ) ); @@ -319,9 +319,9 @@ void SampleTCO::loadSettings( const QDomElement & _this ) -TrackContentObjectView * SampleTCO::createView( TrackView * _tv ) +gui::TrackContentObjectView* SampleTCO::createView( gui::TrackView* _tv ) { - return new SampleTCOView( this, _tv ); + return new gui::SampleTCOView( this, _tv ); } diff --git a/src/core/TrackContainer.cpp b/src/core/TrackContainer.cpp index 5ee249dbcbd..b5496f0c15f 100644 --- a/src/core/TrackContainer.cpp +++ b/src/core/TrackContainer.cpp @@ -118,7 +118,7 @@ void TrackContainer::loadSettings( const QDomElement & _this ) { if ( 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 ); diff --git a/src/core/TrackContentObject.cpp b/src/core/TrackContentObject.cpp index f8213aa5d0e..4d6a040a484 100644 --- a/src/core/TrackContentObject.cpp +++ b/src/core/TrackContentObject.cpp @@ -148,7 +148,7 @@ void TrackContentObject::copyStateTo( TrackContentObject *src, TrackContentObjec dst->movePosition( pos ); AutomationPattern::resolveAllIDs(); - GuiApplication::instance()->automationEditor()->m_editor->updateAfterPatternChange(); + getGUI()->automationEditor()->m_editor->updateAfterPatternChange(); } } diff --git a/src/core/audio/AudioFileDevice.cpp b/src/core/audio/AudioFileDevice.cpp index 485dc77b5e6..80db5897172 100644 --- a/src/core/audio/AudioFileDevice.cpp +++ b/src/core/audio/AudioFileDevice.cpp @@ -40,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 ) diff --git a/src/core/audio/AudioPortAudio.cpp b/src/core/audio/AudioPortAudio.cpp index 0b86bd56429..eecdf7f5ae2 100644 --- a/src/core/audio/AudioPortAudio.cpp +++ b/src/core/audio/AudioPortAudio.cpp @@ -411,6 +411,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 ); diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 9f7d1ba9418..a1f6c414250 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -44,7 +44,7 @@ namespace lmms 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 ) { @@ -174,7 +174,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 ) @@ -216,7 +216,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 ) { diff --git a/src/tracks/Pattern.cpp b/src/tracks/Pattern.cpp index 12f7cb791a2..50414b34174 100644 --- a/src/tracks/Pattern.cpp +++ b/src/tracks/Pattern.cpp @@ -554,9 +554,9 @@ void Pattern::removeSteps() -TrackContentObjectView * Pattern::createView( TrackView * _tv ) +gui::TrackContentObjectView * Pattern::createView( gui::TrackView * _tv ) { - return new PatternView( this, _tv ); + return new gui::PatternView( this, _tv ); }