Remove (or comment) ProgressDialog.h in headers...

... For ImportPlugin, use unique_ptr not Maybe to hold it, and take constructors
out-of-line.
This commit is contained in:
Paul Licameli 2019-03-31 16:12:07 -04:00
parent 14f9340182
commit 0b733eed3f
33 changed files with 52 additions and 15 deletions

View File

@ -26,6 +26,7 @@ text or binary format to a file.
#include "Sequence.h"
#include "ShuttleGui.h"
#include <wx/evtloop.h>
#include <wx/wxprec.h>
#include <wx/filefn.h>
#include <wx/listctrl.h>

View File

@ -59,6 +59,7 @@ AliasedFile s.
#include "WaveTrack.h"
#include "WaveClip.h"
#include "widgets/ErrorDialog.h"
#include "widgets/ProgressDialog.h"
#include <unordered_map>

View File

@ -22,6 +22,8 @@ Describes shared object that is used to access FFmpeg libraries.
#include "Internat.h"
#include "widgets/wxPanelWrapper.h" // to inherit
#if defined(__WXMSW__)
#include <wx/msw/registry.h> // for wxRegKey
#endif

View File

@ -40,6 +40,8 @@
#include "TimeTrack.h"
#include "float_cast.h"
#include "widgets/ProgressDialog.h"
//TODO-MB: wouldn't it make more sense to DELETE the time track after 'mix and render'?
void MixAndRender(TrackList *tracks, TrackFactory *trackFactory,
double rate, sampleFormat format,

View File

@ -51,6 +51,7 @@
#include "widgets/NumericTextCtrl.h"
#include "widgets/HelpSystem.h"
#include "widgets/ErrorDialog.h"
#include "widgets/ProgressDialog.h"
#include "commands/CommandContext.h"
#if wxUSE_ACCESSIBILITY

View File

@ -42,6 +42,7 @@
#include "UserException.h"
#include "prefs/SpectrogramSettings.h"
#include "widgets/ProgressDialog.h"
#ifdef _OPENMP
#include <omp.h>

View File

@ -16,7 +16,6 @@
#include "MemoryX.h"
#include "SampleFormat.h"
#include "widgets/ProgressDialog.h"
#include "ondemand/ODTaskThread.h"
#include "xml/XMLTagHandler.h"
@ -29,6 +28,7 @@
class BlockArray;
class DirManager;
class Envelope;
class ProgressDialog;
class Sequence;
class SpectrogramSettings;
class WaveCache;

View File

@ -13,13 +13,14 @@
#include "Track.h"
#include "SampleFormat.h"
#include "widgets/ProgressDialog.h"
#include <vector>
#include <wx/longlong.h>
#include "WaveTrackLocation.h"
class ProgressDialog;
class SpectrogramSettings;
class WaveformSettings;
class TimeWarper;

View File

@ -24,7 +24,6 @@ class wxWindow;
#include "../SampleFormat.h"
#include "../SelectedRegion.h"
#include "../Internat.h"
#include "../widgets/ProgressDialog.h"
#include "../include/audacity/ComponentInterface.h"
#include "../include/audacity/EffectAutomationParameters.h" // for command automation

View File

@ -58,7 +58,6 @@ and sends it to that message target.
#include "../MemoryX.h"
#include <vector>
//#include "../src/Project.h"
#include "../widgets/ProgressDialog.h"
#include "../commands/ResponseQueue.h"
class wxStatusBar;
@ -155,6 +154,10 @@ public:
void Update(double WXUNUSED(completed)) override {}
};
#if 0
#include "../widgets/ProgressDialog.h" // Member variable
/// Sends command progress information to a ProgressDialog
class GUIProgressTarget final : public CommandProgressTarget
{
@ -170,6 +173,7 @@ public:
mProgress.Update(completed);
}
};
#endif
///

View File

@ -34,10 +34,11 @@ class wxWindow;
#include "../SampleFormat.h"
#include "../SelectedRegion.h"
#include "../Internat.h"
#include "../widgets/ProgressDialog.h"
#include "../Track.h"
#include "../widgets/wxPanelWrapper.h" // to inherit
class wxArrayString;
class ShuttleGui;
class AudacityCommand;
@ -46,6 +47,7 @@ class AudacityCommand;
class AudacityProject;
class LabelTrack;
class ProgressDialog;
class SelectedRegion;
class EffectUIHost;
class Track;

View File

@ -34,6 +34,7 @@
#include "../ShuttleGui.h"
#include "../WaveTrack.h"
#include "../widgets/valnum.h"
#include "../widgets/ProgressDialog.h"
// Define keys, defaults, minimums, and maximums for the effect parameters
//

View File

@ -74,6 +74,7 @@ effects from this one class.
#include "../../wxFileNameWrapper.h"
#include "../../prefs/WaveformSettings.h"
#include "../../widgets/NumericTextCtrl.h"
#include "../../widgets/ProgressDialog.h"
#include "../lib-src/FileDialog/FileDialog.h"

View File

@ -75,6 +75,7 @@
#include "../Dependencies.h"
#include "../FileNames.h"
#include "../widgets/HelpSystem.h"
#include "../widgets/ProgressDialog.h"
//----------------------------------------------------------------------------
// ExportPlugin

View File

@ -38,6 +38,7 @@
#include "../float_cast.h"
#include "../widgets/FileHistory.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#include "../Track.h"

View File

@ -43,6 +43,7 @@ function.
#include "../Tags.h"
#include "../Track.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#include "Export.h"

View File

@ -42,6 +42,7 @@ and libvorbis examples, Monty <monty@xiph.org>
#include "../Track.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
//----------------------------------------------------------------------------
// ExportFLACOptions Class

View File

@ -56,6 +56,7 @@
#include "../Tags.h"
#include "../Track.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#define LIBTWOLAME_STATIC
#include "twolame.h"

View File

@ -92,6 +92,7 @@
#include "../widgets/HelpSystem.h"
#include "../widgets/LinkingHtmlWindow.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#include "Export.h"

View File

@ -52,6 +52,7 @@
#include "../WaveTrack.h"
#include "../widgets/HelpSystem.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
namespace {

View File

@ -37,6 +37,7 @@
#include "../Tags.h"
#include "../Track.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
//----------------------------------------------------------------------------
// ExportOGGOptions

View File

@ -36,6 +36,7 @@
#include "../Track.h"
#include "../ondemand/ODManager.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#include "Export.h"

View File

@ -37,9 +37,9 @@ and ImportLOF.cpp.
#include "../Audacity.h" // for USE_* macros
#include "Import.h"
#include "ImportPlugin.h"
#include <algorithm>
#include "ImportPlugin.h"
#include <wx/textctrl.h>
#include <wx/string.h>
@ -62,6 +62,8 @@ and ImportLOF.cpp.
#include "ImportGStreamer.h"
#include "../Prefs.h"
#include "../widgets/ProgressDialog.h"
// ============================================================================
//
// Return reference to singleton
@ -747,6 +749,11 @@ void ImportStreamDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
EndModal( wxID_CANCEL );
}
ImportFileHandle::ImportFileHandle(const FilePath & filename)
: mFilename(filename)
{
}
ImportFileHandle::~ImportFileHandle()
{
}
@ -757,6 +764,6 @@ void ImportFileHandle::CreateProgress()
wxString title;
title.Printf(_("Importing %s"), GetFileDescription());
mProgress.create(title, ff.GetFullName());
mProgress = std::make_unique< ProgressDialog >( title, ff.GetFullName() );
}

View File

@ -36,6 +36,7 @@ Licensed under the GNU General Public License v2 or later
#endif
#include "../MemoryX.h"
#include "../widgets/ProgressDialog.h"
#define DESC _("FFmpeg-compatible files")

View File

@ -45,6 +45,7 @@
#include "../Tags.h"
#include "../prefs/QualityPrefs.h"
#include "../widgets/ProgressDialog.h"
#define FLAC_HEADER "fLaC"

View File

@ -91,6 +91,7 @@
#include "../Prefs.h"
#include "../Internat.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#define BINARY_FILE_CHECK_BUFFER_SIZE 1024

View File

@ -46,6 +46,7 @@
#include "../Internat.h"
#include "../Tags.h"
#include "../prefs/QualityPrefs.h"
#include "../widgets/ProgressDialog.h"
#define DESC _("MP3 files")

View File

@ -43,6 +43,7 @@
#include "../Internat.h"
#include "../Tags.h"
#include "../prefs/QualityPrefs.h"
#include "../widgets/ProgressDialog.h"
#define DESC _("Ogg Vorbis files")

View File

@ -40,6 +40,7 @@
#include "../ondemand/ODManager.h"
#include "../ondemand/ODComputeSummaryTask.h"
#include "../prefs/QualityPrefs.h"
#include "../widgets/ProgressDialog.h"
//If OD is enabled, he minimum number of samples a file has to use it.
//Otherwise, we use the older PCMAliasBlockFile method since it should be fast enough.

View File

@ -61,11 +61,11 @@ but little else.
#include "../Internat.h"
#include "../MemoryX.h"
#include "../widgets/ProgressDialog.h"
#include "ImportRaw.h" // defines TrackHolders
class wxArrayString;
class ProgressDialog;
enum class ProgressResult : unsigned;
class TrackFactory;
class Track;
class Tags;
@ -121,11 +121,7 @@ protected:
class ImportFileHandle /* not final */
{
public:
ImportFileHandle(const FilePath & filename)
: mFilename(filename),
mProgress{}
{
}
ImportFileHandle(const FilePath & filename);
virtual ~ImportFileHandle();
@ -166,7 +162,7 @@ public:
protected:
FilePath mFilename;
Maybe<ProgressDialog> mProgress;
std::unique_ptr<ProgressDialog> mProgress;
};

View File

@ -18,6 +18,7 @@
#include "ImportPlugin.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#define DESC _("QuickTime files")

View File

@ -35,6 +35,7 @@ and sample size to help you importing data of an unknown format.
#include "../UserException.h"
#include "../WaveTrack.h"
#include "../prefs/QualityPrefs.h"
#include "../widgets/ProgressDialog.h"
#include <cmath>
#include <cstdio>

View File

@ -20,6 +20,7 @@
#include "../effects/EffectManager.h"
#include "../widgets/ASlider.h"
#include "../widgets/ErrorDialog.h"
#include "../widgets/ProgressDialog.h"
#include <wx/combobox.h>