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

Command for importing audio. More...

#include <ImportExportCommands.h>

Inheritance diagram for ImportCommand:
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
 

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 importing audio.

Definition at line 28 of file ImportExportCommands.h.

Member Function Documentation

bool ImportCommand::Apply ( const CommandContext context)
override

Definition at line 41 of file ImportExportCommands.cpp.

References CommandContext::GetProject(), AudacityProject::Import(), and mFileName.

41  {
42  return context.GetProject()->Import(mFileName);
43 }
AudacityProject * GetProject() const
bool Import(const wxString &fileName, WaveTrackArray *pTrackArray=NULL)
Definition: Project.cpp:4379
bool ImportCommand::DefineParams ( ShuttleParams S)
override

Definition at line 25 of file ImportExportCommands.cpp.

References ShuttleParams::Define(), and mFileName.

25  {
26  S.Define( mFileName, wxT("Filename"), "" );
27  return true;
28 }
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 ImportCommand::GetDescription ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 33 of file ImportExportCommands.h.

References _().

33 {return _("Imports from a file.");};
_("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 ImportCommand::GetSymbol ( )
inlineoverridevirtual

Implements AudacityCommand.

Definition at line 32 of file ImportExportCommands.h.

References IMPORT_PLUGIN_SYMBOL.

32 {return IMPORT_PLUGIN_SYMBOL;};
#define IMPORT_PLUGIN_SYMBOL
wxString ImportCommand::ManualPage ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 39 of file ImportExportCommands.h.

39 {return wxT("Import");};
void ImportCommand::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 30 of file ImportExportCommands.cpp.

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

31 {
32  S.AddSpace(0, 5);
33 
34  S.StartMultiColumn(2, wxALIGN_CENTER);
35  {
36  S.TieTextBox(_("File Name:"),mFileName);
37  }
38  S.EndMultiColumn();
39 }
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
wxSizerItem * AddSpace(int width, int height)
wxTextCtrl * TieTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)

Member Data Documentation

wxString ImportCommand::mFileName

Definition at line 39 of file ImportExportCommands.h.

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


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