Audacity  2.2.2
Public Member Functions | Public Attributes | List of all members
SaveProjectCommand Class Reference

Command for saving an Audacity project. More...

#include <OpenSaveCommands.h>

Inheritance diagram for SaveProjectCommand:
AudacityCommand CommandDefinitionInterface IdentInterface ParamsInterface

Public Member Functions

IdentInterfaceSymbol GetSymbol () override
 
wxString GetDescription () override
 
bool DefineParams (ShuttleParams &S) override
 
void PopulateOrExchange (ShuttleGui &S) override
 
bool Apply (const CommandContext &context) override
 
wxString ManualPage () override
 
- Public Member Functions inherited from AudacityCommand
 AudacityCommand ()
 
virtual ~AudacityCommand ()
 
wxString GetPath () override
 
IdentInterfaceSymbol GetVendor () override
 
wxString GetVersion () override
 
virtual bool IsBatchProcessing ()
 
virtual void SetBatchProcessing (bool start)
 
virtual bool Apply (const CommandContext &WXUNUSED(context))
 
virtual bool Apply ()
 
bool ShowInterface (wxWindow *parent, bool forceModal=false)
 
virtual void SetHostUI (EffectUIHostInterface *WXUNUSED(host))
 
bool PopulateUI (wxWindow *parent)
 
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
 
virtual bool GetAutomationParameters (wxString &parms)
 
virtual bool SetAutomationParameters (const wxString &parms)
 
bool DoAudacityCommand (wxWindow *parent, const CommandContext &context, bool shouldPrompt=true)
 
int MessageBox (const wxString &message, long style=DefaultMessageBoxStyle, const wxString &titleStr=wxString{})
 
virtual bool Init ()
 
virtual bool PromptUser (wxWindow *parent)
 
virtual bool CheckWhetherSkipAudacityCommand ()
 
virtual void End ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 
- Public Member Functions inherited from CommandDefinitionInterface
virtual ~CommandDefinitionInterface ()
 
- Public Member Functions inherited from IdentInterface
virtual ~IdentInterface ()
 
const wxString & GetTranslatedName ()
 
- Public Member Functions inherited from ParamsInterface
virtual ~ParamsInterface ()
 
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))
 

Public Attributes

wxString mFileName
 
bool mbAddToHistory
 
bool mbCompress
 
bool bHasAddToHistory
 
bool bHasCompress
 

Additional Inherited Members

- Public Types inherited from AudacityCommand
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Protected Attributes inherited from AudacityCommand
ProgressDialogmProgress
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 
int mUIResultID
 

Detailed Description

Command for saving an Audacity project.

Definition at line 46 of file OpenSaveCommands.h.

Member Function Documentation

bool SaveProjectCommand::Apply ( const CommandContext context)
override

Definition at line 83 of file OpenSaveCommands.cpp.

References CommandContext::GetProject(), mbAddToHistory, mbCompress, mFileName, and AudacityProject::SaveAs().

84 {
85  if(mFileName.IsEmpty())
86  return context.GetProject()->SaveAs(mbCompress);
87  else
89 }
AudacityProject * GetProject() const
bool SaveAs(bool bWantSaveCopy=false, bool bLossless=false)
Definition: Project.cpp:4496
bool SaveProjectCommand::DefineParams ( ShuttleParams S)
override

Definition at line 63 of file OpenSaveCommands.cpp.

References bHasAddToHistory, bHasCompress, ShuttleParams::Define(), mbAddToHistory, mbCompress, mFileName, and ShuttleParams::OptionalN().

63  {
64  S.Define( mFileName, wxT("Filename"), "name.aup" );
65  S.OptionalN(bHasAddToHistory).Define( mbAddToHistory, wxT("AddToHistory"), false );
66  S.OptionalN(bHasCompress).Define( mbCompress, wxT("Compress"), false );
67  return true;
68 }
virtual ShuttleParams & OptionalN(bool &var)
Definition: Shuttle.h:72
virtual void Define(bool &var, const wxChar *key, const bool vdefault, const bool vmin=false, const bool vmax=false, const bool vscl=false)
Definition: Shuttle.cpp:339
wxString SaveProjectCommand::GetDescription ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 51 of file OpenSaveCommands.h.

References _().

51 {return _("Saves a project.");};
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
IdentInterfaceSymbol SaveProjectCommand::GetSymbol ( )
inlineoverridevirtual

Implements AudacityCommand.

Definition at line 50 of file OpenSaveCommands.h.

References SAVE_PROJECT_PLUGIN_SYMBOL.

#define SAVE_PROJECT_PLUGIN_SYMBOL
wxString SaveProjectCommand::ManualPage ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 57 of file OpenSaveCommands.h.

57 {return wxT("Save");};
void SaveProjectCommand::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 70 of file OpenSaveCommands.cpp.

References _(), ShuttleGui::AddSpace(), ShuttleGuiBase::EndMultiColumn(), mbAddToHistory, mbCompress, mFileName, ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::TieCheckBox(), and ShuttleGuiBase::TieTextBox().

71 {
72  S.AddSpace(0, 5);
73 
74  S.StartMultiColumn(2, wxALIGN_CENTER);
75  {
76  S.TieTextBox(_("File Name:"),mFileName);
77  S.TieCheckBox(_("Add to History:"), mbAddToHistory );
78  S.TieCheckBox(_("Compress:"), mbCompress );
79  }
80  S.EndMultiColumn();
81 }
void EndMultiColumn()
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxCheckBox * TieCheckBox(const wxString &Prompt, WrappedType &WrappedRef)
wxSizerItem * AddSpace(int width, int height)
wxTextCtrl * TieTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)

Member Data Documentation

bool SaveProjectCommand::bHasAddToHistory

Definition at line 62 of file OpenSaveCommands.h.

Referenced by DefineParams().

bool SaveProjectCommand::bHasCompress

Definition at line 63 of file OpenSaveCommands.h.

Referenced by DefineParams().

bool SaveProjectCommand::mbAddToHistory

Definition at line 60 of file OpenSaveCommands.h.

Referenced by Apply(), DefineParams(), and PopulateOrExchange().

bool SaveProjectCommand::mbCompress

Definition at line 61 of file OpenSaveCommands.h.

Referenced by Apply(), DefineParams(), and PopulateOrExchange().

wxString SaveProjectCommand::mFileName

Definition at line 57 of file OpenSaveCommands.h.

Referenced by Apply(), DefineParams(), and PopulateOrExchange().


The documentation for this class was generated from the following files: