mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-17 16:50:26 +02:00
New files for ProjectFileIO
This commit is contained in:
parent
7b8bfd1d02
commit
3fc961f74a
@ -160,6 +160,8 @@ src/Project.cpp
|
||||
src/Project.h
|
||||
src/ProjectAudioIO.cpp
|
||||
src/ProjectAudioIO.h
|
||||
src/ProjectFileIO.cpp
|
||||
src/ProjectFileIO.h
|
||||
src/ProjectFileIORegistry.cpp
|
||||
src/ProjectFileIORegistry.h
|
||||
src/ProjectFSCK.cpp
|
||||
|
@ -1214,6 +1214,7 @@
|
||||
5E135A36229EDBE80076E983 /* ProjectSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A34229EDBE80076E983 /* ProjectSettings.cpp */; };
|
||||
5E135A39229EDEBA0076E983 /* ProjectAudioIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A37229EDEBA0076E983 /* ProjectAudioIO.cpp */; };
|
||||
5E135A3C229EDF2E0076E983 /* ProjectManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A3A229EDF2E0076E983 /* ProjectManager.cpp */; };
|
||||
5E135A45229EE4DE0076E983 /* ProjectFileIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E135A43229EE4DE0076E983 /* ProjectFileIO.cpp */; };
|
||||
5E15123D1DB000C000702E29 /* UIHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E15123B1DB000C000702E29 /* UIHandle.cpp */; };
|
||||
5E15125A1DB000DC00702E29 /* LabelTrackControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E1512401DB000DC00702E29 /* LabelTrackControls.cpp */; };
|
||||
5E15125B1DB000DC00702E29 /* LabelTrackUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E1512421DB000DC00702E29 /* LabelTrackUI.cpp */; };
|
||||
@ -3184,6 +3185,8 @@
|
||||
5E135A38229EDEBA0076E983 /* ProjectAudioIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectAudioIO.h; sourceTree = "<group>"; };
|
||||
5E135A3A229EDF2E0076E983 /* ProjectManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectManager.cpp; sourceTree = "<group>"; };
|
||||
5E135A3B229EDF2E0076E983 /* ProjectManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectManager.h; sourceTree = "<group>"; };
|
||||
5E135A43229EE4DE0076E983 /* ProjectFileIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProjectFileIO.cpp; sourceTree = "<group>"; };
|
||||
5E135A44229EE4DE0076E983 /* ProjectFileIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectFileIO.h; sourceTree = "<group>"; };
|
||||
5E1512381DB000C000702E29 /* HitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HitTestResult.h; sourceTree = "<group>"; };
|
||||
5E1512391DB000C000702E29 /* RefreshCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefreshCode.h; sourceTree = "<group>"; };
|
||||
5E15123A1DB000C000702E29 /* TrackPanelMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrackPanelMouseEvent.h; sourceTree = "<group>"; };
|
||||
@ -4368,6 +4371,7 @@
|
||||
186CCEA30E523C8E00659159 /* Profiler.cpp */,
|
||||
1790B0D009883BFD008A330A /* Project.cpp */,
|
||||
5E135A37229EDEBA0076E983 /* ProjectAudioIO.cpp */,
|
||||
5E135A43229EE4DE0076E983 /* ProjectFileIO.cpp */,
|
||||
5E18CFEE2291C31000E75250 /* ProjectFileIORegistry.cpp */,
|
||||
5ECF728C228B307E007F2A35 /* ProjectFSCK.cpp */,
|
||||
5E135A3A229EDF2E0076E983 /* ProjectManager.cpp */,
|
||||
@ -4486,6 +4490,7 @@
|
||||
186CCEA20E523C8D00659159 /* Profiler.h */,
|
||||
1790B0D109883BFD008A330A /* Project.h */,
|
||||
5E135A38229EDEBA0076E983 /* ProjectAudioIO.h */,
|
||||
5E135A44229EE4DE0076E983 /* ProjectFileIO.h */,
|
||||
5E18CFEF2291C31000E75250 /* ProjectFileIORegistry.h */,
|
||||
5ECF728B228B307E007F2A35 /* ProjectFSCK.h */,
|
||||
5E135A3B229EDF2E0076E983 /* ProjectManager.h */,
|
||||
@ -8401,6 +8406,7 @@
|
||||
5E667A601F0BEE5F00C942A5 /* WaveTrackVZoomHandle.cpp in Sources */,
|
||||
1790B19A09883BFD008A330A /* TrackPanelAx.cpp in Sources */,
|
||||
1790B19C09883BFD008A330A /* UndoManager.cpp in Sources */,
|
||||
5E135A45229EE4DE0076E983 /* ProjectFileIO.cpp in Sources */,
|
||||
1790B19E09883BFD008A330A /* VoiceKey.cpp in Sources */,
|
||||
1790B19F09883BFD008A330A /* WaveClip.cpp in Sources */,
|
||||
1790B1A009883BFD008A330A /* WaveTrack.cpp in Sources */,
|
||||
|
@ -211,6 +211,8 @@ audacity_SOURCES = \
|
||||
Project.h \
|
||||
ProjectAudioIO.cpp \
|
||||
ProjectAudioIO.h \
|
||||
ProjectFileIO.cpp \
|
||||
ProjectFileIO.h \
|
||||
ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h \
|
||||
ProjectFSCK.cpp \
|
||||
|
@ -320,7 +320,8 @@ am__audacity_SOURCES_DIST = BlockFile.cpp BlockFile.h DirManager.cpp \
|
||||
PlatformCompatibility.cpp PlatformCompatibility.h \
|
||||
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
||||
Profiler.cpp Profiler.h Project.cpp Project.h \
|
||||
ProjectAudioIO.cpp ProjectAudioIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectAudioIO.cpp ProjectAudioIO.h ProjectFileIO.cpp \
|
||||
ProjectFileIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h ProjectFSCK.cpp ProjectFSCK.h \
|
||||
ProjectManager.cpp ProjectManager.h ProjectSettings.cpp \
|
||||
ProjectSettings.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \
|
||||
@ -666,6 +667,7 @@ am_audacity_OBJECTS = $(am__objects_1) audacity-AboutDialog.$(OBJEXT) \
|
||||
audacity-PluginManager.$(OBJEXT) audacity-Printing.$(OBJEXT) \
|
||||
audacity-Profiler.$(OBJEXT) audacity-Project.$(OBJEXT) \
|
||||
audacity-ProjectAudioIO.$(OBJEXT) \
|
||||
audacity-ProjectFileIO.$(OBJEXT) \
|
||||
audacity-ProjectFileIORegistry.$(OBJEXT) \
|
||||
audacity-ProjectFSCK.$(OBJEXT) \
|
||||
audacity-ProjectManager.$(OBJEXT) \
|
||||
@ -1386,7 +1388,8 @@ audacity_SOURCES = $(libaudacity_la_SOURCES) AboutDialog.cpp \
|
||||
PlatformCompatibility.cpp PlatformCompatibility.h \
|
||||
PluginManager.cpp PluginManager.h Printing.cpp Printing.h \
|
||||
Profiler.cpp Profiler.h Project.cpp Project.h \
|
||||
ProjectAudioIO.cpp ProjectAudioIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectAudioIO.cpp ProjectAudioIO.h ProjectFileIO.cpp \
|
||||
ProjectFileIO.h ProjectFileIORegistry.cpp \
|
||||
ProjectFileIORegistry.h ProjectFSCK.cpp ProjectFSCK.h \
|
||||
ProjectManager.cpp ProjectManager.h ProjectSettings.cpp \
|
||||
ProjectSettings.h RealFFTf.cpp RealFFTf.h RealFFTf48x.cpp \
|
||||
@ -2564,6 +2567,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-Project.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectAudioIO.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFSCK.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFileIO.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectFileIORegistry.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectManager.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audacity-ProjectSettings.Po@am__quote@
|
||||
@ -3982,6 +3986,20 @@ audacity-ProjectAudioIO.obj: ProjectAudioIO.cpp
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ProjectAudioIO.obj `if test -f 'ProjectAudioIO.cpp'; then $(CYGPATH_W) 'ProjectAudioIO.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectAudioIO.cpp'; fi`
|
||||
|
||||
audacity-ProjectFileIO.o: ProjectFileIO.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectFileIO.o -MD -MP -MF $(DEPDIR)/audacity-ProjectFileIO.Tpo -c -o audacity-ProjectFileIO.o `test -f 'ProjectFileIO.cpp' || echo '$(srcdir)/'`ProjectFileIO.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectFileIO.Tpo $(DEPDIR)/audacity-ProjectFileIO.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectFileIO.cpp' object='audacity-ProjectFileIO.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ProjectFileIO.o `test -f 'ProjectFileIO.cpp' || echo '$(srcdir)/'`ProjectFileIO.cpp
|
||||
|
||||
audacity-ProjectFileIO.obj: ProjectFileIO.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectFileIO.obj -MD -MP -MF $(DEPDIR)/audacity-ProjectFileIO.Tpo -c -o audacity-ProjectFileIO.obj `if test -f 'ProjectFileIO.cpp'; then $(CYGPATH_W) 'ProjectFileIO.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectFileIO.cpp'; fi`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectFileIO.Tpo $(DEPDIR)/audacity-ProjectFileIO.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ProjectFileIO.cpp' object='audacity-ProjectFileIO.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -c -o audacity-ProjectFileIO.obj `if test -f 'ProjectFileIO.cpp'; then $(CYGPATH_W) 'ProjectFileIO.cpp'; else $(CYGPATH_W) '$(srcdir)/ProjectFileIO.cpp'; fi`
|
||||
|
||||
audacity-ProjectFileIORegistry.o: ProjectFileIORegistry.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(audacity_CPPFLAGS) $(CPPFLAGS) $(audacity_CXXFLAGS) $(CXXFLAGS) -MT audacity-ProjectFileIORegistry.o -MD -MP -MF $(DEPDIR)/audacity-ProjectFileIORegistry.Tpo -c -o audacity-ProjectFileIORegistry.o `test -f 'ProjectFileIORegistry.cpp' || echo '$(srcdir)/'`ProjectFileIORegistry.cpp
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/audacity-ProjectFileIORegistry.Tpo $(DEPDIR)/audacity-ProjectFileIORegistry.Po
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "Prefs.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "ProjectSettings.h"
|
||||
#include "TrackPanel.h"
|
||||
|
1465
src/Project.cpp
1465
src/Project.cpp
File diff suppressed because it is too large
Load Diff
@ -21,15 +21,12 @@
|
||||
#include "Audacity.h"
|
||||
|
||||
#include "ClientData.h"
|
||||
#include "Prefs.h"
|
||||
|
||||
#include "TrackPanelListener.h"
|
||||
|
||||
#include <memory>
|
||||
#include <wx/frame.h> // to inherit
|
||||
|
||||
#include "xml/XMLTagHandler.h" // to inherit
|
||||
|
||||
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
|
||||
EVT_PROJECT_STATUS_UPDATE, wxCommandEvent);
|
||||
|
||||
@ -40,7 +37,6 @@ class wxPanel;
|
||||
|
||||
class AudacityProject;
|
||||
class ODLock;
|
||||
class TrackList;
|
||||
|
||||
|
||||
AUDACITY_DLL_API AudacityProject *GetActiveProject();
|
||||
@ -328,99 +324,6 @@ inline const wxFrame *FindProjectFrame( const AudacityProject *project ) {
|
||||
return project ? &GetProjectFrame( *project ) : nullptr;
|
||||
}
|
||||
|
||||
class ProjectFileIO final
|
||||
: public ClientData::Base
|
||||
, private XMLTagHandler
|
||||
, private PrefsListener
|
||||
{
|
||||
public:
|
||||
static ProjectFileIO &Get( AudacityProject &project );
|
||||
static const ProjectFileIO &Get( const AudacityProject &project );
|
||||
|
||||
explicit ProjectFileIO( AudacityProject &project );
|
||||
~ProjectFileIO();
|
||||
|
||||
struct ReadProjectResults
|
||||
{
|
||||
bool decodeError;
|
||||
bool parseSuccess;
|
||||
bool trackError;
|
||||
wxString errorString;
|
||||
};
|
||||
ReadProjectResults ReadProjectFile( const FilePath &fileName );
|
||||
|
||||
void EnqueueODTasks();
|
||||
|
||||
bool WarnOfLegacyFile( );
|
||||
|
||||
// To be called when closing a project that has been saved, so that
|
||||
// block files are not erased
|
||||
void CloseLock();
|
||||
|
||||
bool Save();
|
||||
bool SaveAs(bool bWantSaveCopy = false, bool bLossless = false);
|
||||
bool SaveAs(const wxString & newFileName, bool bWantSaveCopy = false,
|
||||
bool addToHistory = true);
|
||||
// strProjectPathName is full path for aup except extension
|
||||
bool SaveFromTimerRecording( wxFileName fnFile );
|
||||
|
||||
const FilePath &GetAutoSaveFileName() { return mAutoSaveFileName; }
|
||||
|
||||
// It seems odd to put this method in this class, but the results do depend
|
||||
// on what is discovered while opening the file, such as whether it is a
|
||||
// recovery file
|
||||
void SetProjectTitle( int number = -1 );
|
||||
|
||||
bool IsProjectSaved();
|
||||
|
||||
void ResetProjectFileIO();
|
||||
|
||||
void AutoSave();
|
||||
void DeleteCurrentAutoSaveFile();
|
||||
|
||||
bool IsRecovered() const { return mIsRecovered; }
|
||||
void SetImportedDependencies( bool value ) { mImportedDependencies = value; }
|
||||
void SetLoadedFromAup( bool value ) { mbLoadedFromAup = value; }
|
||||
|
||||
private:
|
||||
bool SaveCopyWaveTracks(const FilePath & strProjectPathName,
|
||||
bool bLossless = false);
|
||||
bool DoSave(bool fromSaveAs, bool bWantSaveCopy, bool bLossless = false);
|
||||
|
||||
void UpdatePrefs() override;
|
||||
|
||||
// XMLTagHandler callback methods
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXMLHeader(XMLWriter &xmlFile) const;
|
||||
void WriteXML(
|
||||
XMLWriter &xmlFile, bool bWantSaveCopy) /* not override */;
|
||||
|
||||
// non-staic data members
|
||||
AudacityProject &mProject;
|
||||
|
||||
std::shared_ptr<TrackList> mLastSavedTracks;
|
||||
|
||||
FilePaths mStrOtherNamesArray; // used to make sure compressed file names are unique
|
||||
|
||||
// Last auto-save file name and path (empty if none)
|
||||
FilePath mAutoSaveFileName;
|
||||
|
||||
// The auto-save data dir the project has been recovered from
|
||||
FilePath mRecoveryAutoSaveDataDir;
|
||||
|
||||
// Are we currently auto-saving or not?
|
||||
bool mAutoSaving{ false };
|
||||
|
||||
// Has this project been recovered from an auto-saved version
|
||||
bool mIsRecovered{ false };
|
||||
|
||||
bool mbLoadedFromAup{ false };
|
||||
|
||||
// Dependencies have been imported and a warning should be shown on save
|
||||
bool mImportedDependencies{ false };
|
||||
};
|
||||
|
||||
// TitleRestorer restores project window titles to what they were, in its destructor.
|
||||
class TitleRestorer{
|
||||
public:
|
||||
|
1477
src/ProjectFileIO.cpp
Normal file
1477
src/ProjectFileIO.cpp
Normal file
File diff suppressed because it is too large
Load Diff
116
src/ProjectFileIO.h
Normal file
116
src/ProjectFileIO.h
Normal file
@ -0,0 +1,116 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectFileIO.h
|
||||
|
||||
Paul Licameli split from AudacityProject.h
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_PROJECT_FILE_IO__
|
||||
#define __AUDACITY_PROJECT_FILE_IO__
|
||||
|
||||
#include "ClientData.h" // to inherit
|
||||
#include "Prefs.h" // to inherit
|
||||
#include "xml/XMLTagHandler.h" // to inherit
|
||||
|
||||
class AudacityProject;
|
||||
class TrackList;
|
||||
|
||||
///\brief Object associated with a project that manages reading and writing
|
||||
/// of Audacity project file formats, and autosave
|
||||
class ProjectFileIO final
|
||||
: public ClientData::Base
|
||||
, private XMLTagHandler
|
||||
, private PrefsListener
|
||||
{
|
||||
public:
|
||||
static ProjectFileIO &Get( AudacityProject &project );
|
||||
static const ProjectFileIO &Get( const AudacityProject &project );
|
||||
|
||||
explicit ProjectFileIO( AudacityProject &project );
|
||||
~ProjectFileIO();
|
||||
|
||||
struct ReadProjectResults
|
||||
{
|
||||
bool decodeError;
|
||||
bool parseSuccess;
|
||||
bool trackError;
|
||||
wxString errorString;
|
||||
};
|
||||
ReadProjectResults ReadProjectFile( const FilePath &fileName );
|
||||
|
||||
void EnqueueODTasks();
|
||||
|
||||
bool WarnOfLegacyFile( );
|
||||
|
||||
// To be called when closing a project that has been saved, so that
|
||||
// block files are not erased
|
||||
void CloseLock();
|
||||
|
||||
bool Save();
|
||||
bool SaveAs(bool bWantSaveCopy = false, bool bLossless = false);
|
||||
bool SaveAs(const wxString & newFileName, bool bWantSaveCopy = false,
|
||||
bool addToHistory = true);
|
||||
// strProjectPathName is full path for aup except extension
|
||||
bool SaveFromTimerRecording( wxFileName fnFile );
|
||||
|
||||
const FilePath &GetAutoSaveFileName() { return mAutoSaveFileName; }
|
||||
|
||||
// It seems odd to put this method in this class, but the results do depend
|
||||
// on what is discovered while opening the file, such as whether it is a
|
||||
// recovery file
|
||||
void SetProjectTitle( int number = -1 );
|
||||
|
||||
bool IsProjectSaved();
|
||||
|
||||
void ResetProjectFileIO();
|
||||
|
||||
void AutoSave();
|
||||
void DeleteCurrentAutoSaveFile();
|
||||
|
||||
bool IsRecovered() const { return mIsRecovered; }
|
||||
void SetImportedDependencies( bool value ) { mImportedDependencies = value; }
|
||||
void SetLoadedFromAup( bool value ) { mbLoadedFromAup = value; }
|
||||
|
||||
private:
|
||||
bool SaveCopyWaveTracks(const FilePath & strProjectPathName,
|
||||
bool bLossless = false);
|
||||
bool DoSave(bool fromSaveAs, bool bWantSaveCopy, bool bLossless = false);
|
||||
|
||||
void UpdatePrefs() override;
|
||||
|
||||
// XMLTagHandler callback methods
|
||||
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs) override;
|
||||
XMLTagHandler *HandleXMLChild(const wxChar *tag) override;
|
||||
void WriteXMLHeader(XMLWriter &xmlFile) const;
|
||||
void WriteXML(
|
||||
XMLWriter &xmlFile, bool bWantSaveCopy) /* not override */;
|
||||
|
||||
// non-staic data members
|
||||
AudacityProject &mProject;
|
||||
|
||||
std::shared_ptr<TrackList> mLastSavedTracks;
|
||||
|
||||
FilePaths mStrOtherNamesArray; // used to make sure compressed file names are unique
|
||||
|
||||
// Last auto-save file name and path (empty if none)
|
||||
FilePath mAutoSaveFileName;
|
||||
|
||||
// The auto-save data dir the project has been recovered from
|
||||
FilePath mRecoveryAutoSaveDataDir;
|
||||
|
||||
// Are we currently auto-saving or not?
|
||||
bool mAutoSaving{ false };
|
||||
|
||||
// Has this project been recovered from an auto-saved version
|
||||
bool mIsRecovered{ false };
|
||||
|
||||
bool mbLoadedFromAup{ false };
|
||||
|
||||
// Dependencies have been imported and a warning should be shown on save
|
||||
bool mImportedDependencies{ false };
|
||||
};
|
||||
|
||||
#endif
|
@ -25,6 +25,7 @@ Paul Licameli split from AudacityProject.cpp
|
||||
#include "PlatformCompatibility.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectAudioIO.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "ProjectFileIORegistry.h"
|
||||
#include "ProjectFSCK.h"
|
||||
#include "ProjectSettings.h"
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "Menus.h"
|
||||
#include "MissingAliasFileDialog.h"
|
||||
#include "Project.h"
|
||||
#include "ProjectFileIO.h"
|
||||
#include "ProjectManager.h"
|
||||
#include "Prefs.h"
|
||||
#include "Track.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "OpenSaveCommands.h"
|
||||
|
||||
#include "../Project.h"
|
||||
#include "../ProjectFileIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../export/Export.h"
|
||||
#include "../Shuttle.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "../Prefs.h"
|
||||
#include "../Printing.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectFileIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../TrackPanel.h"
|
||||
#include "../ViewInfo.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ProjectAudioIO.h"
|
||||
#include "../ProjectFileIO.h"
|
||||
#include "../ProjectManager.h"
|
||||
#include "../ProjectSettings.h"
|
||||
#include "../SoundActivatedRecord.h"
|
||||
|
@ -222,6 +222,7 @@
|
||||
<ClCompile Include="..\..\..\src\Profiler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\Project.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectAudioIO.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIO.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIORegistry.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectFSCK.cpp" />
|
||||
<ClCompile Include="..\..\..\src\ProjectManager.cpp" />
|
||||
@ -652,6 +653,7 @@
|
||||
<ClInclude Include="..\..\..\src\Profiler.h" />
|
||||
<ClInclude Include="..\..\..\src\Project.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectAudioIO.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIO.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIORegistry.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectFSCK.h" />
|
||||
<ClInclude Include="..\..\..\src\ProjectManager.h" />
|
||||
|
@ -263,6 +263,9 @@
|
||||
<ClCompile Include="..\..\..\src\ProjectAudioIO.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIO.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\ProjectFileIORegistry.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
@ -1330,6 +1333,9 @@
|
||||
<ClInclude Include="..\..\..\src\ProjectAudioIO.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIO.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\ProjectFileIORegistry.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
|
Loading…
x
Reference in New Issue
Block a user