Skip to content

Commit

Permalink
Add predeclarations, #includes and gui::prefixes in some places that …
Browse files Browse the repository at this point in the history
…were missing them.
  • Loading branch information
irrenhaus3 committed Oct 2, 2021
1 parent 5970af1 commit c59e575
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 24 deletions.
7 changes: 6 additions & 1 deletion include/AutomationPattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ namespace lmms
class AutomationTrack;
class TimePos;

namespace gui
{
class AutomationPatternView;
} // namespace gui



class LMMS_EXPORT AutomationPattern : public TrackContentObject
Expand Down Expand Up @@ -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;

} ;
Expand Down
3 changes: 3 additions & 0 deletions include/LinkedModelGroups.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#include <memory>
#include <vector>

#include <QDomDocument>
#include <QDomElement>

#include "Model.h"


Expand Down
2 changes: 1 addition & 1 deletion include/Lv2Ports.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ struct Audio : public VisitablePort<Audio, PortBase>
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<AtomSeq, PortBase>
Expand Down
7 changes: 6 additions & 1 deletion include/MidiController.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ namespace lmms

class MidiPort;

namespace gui
{
class ControllerConnectionDialog;
}


class MidiController : public Controller, public MidiEventProcessor
{
Expand Down Expand Up @@ -79,7 +84,7 @@ public slots:
float m_lastValue;
float m_previousValue;

friend class ControllerConnectionDialog;
friend class gui::ControllerConnectionDialog;
friend class AutoDetectMidiController;

} ;
Expand Down
6 changes: 4 additions & 2 deletions include/MidiPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ namespace gui
{

class MidiPortMenu;
class ControllerConnectionDialog;
class InstrumentMidiIOView;

}

Expand Down Expand Up @@ -173,8 +175,8 @@ private slots:
Map m_writablePorts;


friend class ControllerConnectionDialog;
friend class InstrumentMidiIOView;
friend class gui::ControllerConnectionDialog;
friend class gui::InstrumentMidiIOView;


signals:
Expand Down
8 changes: 7 additions & 1 deletion include/Pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ namespace lmms

class InstrumentTrack;

namespace gui
{
class PatternView;
class BBTrackContainerView;
}


class LMMS_EXPORT Pattern : public TrackContentObject
{
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/SampleTCO.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include "LedCheckbox.h"
#include "embed.h"

namespace lmms::gui
{

PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
PeakControllerEffectControls * _controls ) :
Expand Down Expand Up @@ -103,3 +105,5 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
setLayout( mainLayout );
}


} // namespace lmms::gui
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@

#include "EffectControlDialog.h"

namespace lmms
{

class PeakControllerEffectControls;

namespace gui
{
class Knob;
class LedCheckBox;

Expand Down Expand Up @@ -57,5 +63,8 @@ class PeakControllerEffectControlDialog : public EffectControlDialog

} ;

} // namespace gui

} // namespace lmms

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace lmms

class PeakControllerEffect;


class PeakControllerEffectControls : public EffectControls
{
Q_OBJECT
Expand All @@ -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 );
}


Expand All @@ -74,7 +75,7 @@ class PeakControllerEffectControls : public EffectControls
BoolModel m_absModel;
FloatModel m_amountMultModel;

friend class PeakControllerEffectControlDialog;
friend class gui::PeakControllerEffectControlDialog;
friend class PeakControllerEffect;

} ;
Expand Down
2 changes: 0 additions & 2 deletions src/core/LinkedModelGroups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

#include "LinkedModelGroups.h"

#include <QDomDocument>
#include <QDomElement>

#include "AutomatableModel.h"

Expand Down
4 changes: 2 additions & 2 deletions src/core/SampleBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/core/SampleTCO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) );
Expand Down Expand Up @@ -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 );
}


Expand Down
2 changes: 1 addition & 1 deletion src/core/TrackContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/core/TrackContentObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/core/audio/AudioFileDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
2 changes: 2 additions & 0 deletions src/core/audio/AudioPortAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
6 changes: 3 additions & 3 deletions src/gui/AutomatableModelView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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 )
{
Expand Down
4 changes: 2 additions & 2 deletions src/tracks/Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}


Expand Down

0 comments on commit c59e575

Please sign in to comment.