Audacity  2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TimerRecordDialog Class Referencefinal

Dialog for Timer Record, i.e., timed or long recording. More...

#include <TimerRecordDialog.h>

Inheritance diagram for TimerRecordDialog:
wxDialogWrapper wxTabTraversalWrapper< wxDialog >

Public Member Functions

 TimerRecordDialog (wxWindow *parent, bool bAlreadySaved)
 
 ~TimerRecordDialog ()
 
void OnTimer (wxTimerEvent &event)
 
int RunWaitDialog ()
 Runs the wait for start dialog. Returns false if the user clicks stop. More...
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=_("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=_("Dialog"))
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&...args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Member Functions

void OnDatePicker_Start (wxDateEvent &event)
 
void OnTimeText_Start (wxCommandEvent &event)
 
void OnDatePicker_End (wxDateEvent &event)
 
void OnTimeText_End (wxCommandEvent &event)
 
void OnTimeText_Duration (wxCommandEvent &event)
 
void OnOK (wxCommandEvent &event)
 
void OnHelpButtonClick (wxCommandEvent &event)
 
wxString GetDisplayDate (wxDateTime &dt)
 
void PopulateOrExchange (ShuttleGui &S)
 
bool TransferDataFromWindow () override
 
void UpdateDuration ()
 
void UpdateEnd ()
 
ProgressResult WaitForStart ()
 
void OnAutoSavePathButton_Click (wxCommandEvent &event)
 
void OnAutoExportPathButton_Click (wxCommandEvent &event)
 
void OnAutoSaveCheckBox_Change (wxCommandEvent &event)
 
void OnAutoExportCheckBox_Change (wxCommandEvent &event)
 
void EnableDisableAutoControls (bool bEnable, int iControlGoup)
 
void UpdateTextBoxControls ()
 
bool HaveFilesToRecover ()
 
bool RemoveAllAutoSaveFiles ()
 
TimerRecordPathCtrlNewPathControl (wxWindow *wParent, const int iID, const wxString &sCaption, const wxString &sValue)
 
int ExecutePostRecordActions (bool bWasStopped)
 
ProgressResult PreActionDelay (int iActionIndex, TimerRecordCompletedActions eCompletedActions)
 

Private Attributes

wxDateTime m_DateTime_Start
 
wxDateTime m_DateTime_End
 
wxTimeSpan m_TimeSpan_Duration
 
wxDatePickerCtrl * m_pDatePickerCtrl_Start
 
NumericTextCtrlm_pTimeTextCtrl_Start
 
wxDatePickerCtrl * m_pDatePickerCtrl_End
 
NumericTextCtrlm_pTimeTextCtrl_End
 
NumericTextCtrlm_pTimeTextCtrl_Duration
 
wxTimer m_timer
 
wxCheckBox * m_pTimerAutoSaveCheckBoxCtrl
 
TimerRecordPathCtrlm_pTimerSavePathTextCtrl
 
wxButton * m_pTimerSavePathButtonCtrl
 
wxCheckBox * m_pTimerAutoExportCheckBoxCtrl
 
TimerRecordPathCtrlm_pTimerExportPathTextCtrl
 
wxButton * m_pTimerExportPathButtonCtrl
 
wxChoice * m_pTimerAfterCompleteChoiceCtrl
 
bool m_bProjectCleanupRequired
 
bool m_bAutoSaveEnabled
 
wxFileName m_fnAutoSaveFile
 
bool m_bAutoExportEnabled
 
wxFileName m_fnAutoExportFile
 
int m_iAutoExportFormat
 
int m_iAutoExportSubFormat
 
int m_iAutoExportFilterIndex
 
bool m_bProjectAlreadySaved
 
wxString m_sTimerAfterCompleteOption
 
wxArrayString m_sTimerAfterCompleteOptionsArray
 

Detailed Description

Dialog for Timer Record, i.e., timed or long recording.

Definition at line 57 of file TimerRecordDialog.h.

Constructor & Destructor Documentation

TimerRecordDialog::TimerRecordDialog ( wxWindow *  parent,
bool  bAlreadySaved 
)

Definition at line 148 of file TimerRecordDialog.cpp.

References eIsCreating, gPrefs, HaveFilesToRecover(), and kTimerInterval.

149 : wxDialogWrapper(parent, -1, _("Audacity Timer Record"), wxDefaultPosition,
150  wxDefaultSize, wxCAPTION)
151 {
152  SetName(GetTitle());
153 
154  m_DateTime_Start = wxDateTime::UNow();
155  long seconds; // default duration is 1 hour = 3600 seconds
156  gPrefs->Read(wxT("/TimerRecord/LastDuration"), &seconds, 3600);
157  m_TimeSpan_Duration = wxTimeSpan::Seconds(seconds);
159 
161  m_pTimeTextCtrl_Start = NULL;
162 
163  m_pDatePickerCtrl_End = NULL;
164  m_pTimeTextCtrl_End = NULL;
165 
167 
168  // Do we allow the user to change the Automatic Save file?
169  m_bProjectAlreadySaved = bAlreadySaved;
170 
171  ShuttleGui S(this, eIsCreating);
172  this->PopulateOrExchange(S);
173 
174  // Set initial focus to "1" of "01h" in Duration NumericTextCtrl,
175  // instead of OK button (default).
176  m_pTimeTextCtrl_Duration->SetFocus();
178 
179  m_timer.SetOwner(this, TIMER_ID);
180  m_timer.Start(kTimerInterval);
181 
182  // Do we need to tidy up when the timer recording has been completed?
184 
185 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
void PopulateOrExchange(ShuttleGui &S)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
wxTimeSpan m_TimeSpan_Duration
wxDatePickerCtrl * m_pDatePickerCtrl_Start
NumericTextCtrl * m_pTimeTextCtrl_End
wxDateTime m_DateTime_Start
const int kTimerInterval
NumericTextCtrl * m_pTimeTextCtrl_Duration
NumericTextCtrl * m_pTimeTextCtrl_Start
_("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
#define TIMER_ID
wxDatePickerCtrl * m_pDatePickerCtrl_End
TimerRecordDialog::~TimerRecordDialog ( )

Definition at line 187 of file TimerRecordDialog.cpp.

188 {
189 }

Member Function Documentation

void TimerRecordDialog::EnableDisableAutoControls ( bool  bEnable,
int  iControlGoup 
)
private

Definition at line 442 of file TimerRecordDialog.cpp.

References CONTROL_GROUP_EXPORT, CONTROL_GROUP_SAVE, m_pTimerAfterCompleteChoiceCtrl, m_pTimerAutoExportCheckBoxCtrl, m_pTimerAutoSaveCheckBoxCtrl, m_pTimerExportPathButtonCtrl, m_pTimerExportPathTextCtrl, m_pTimerSavePathButtonCtrl, m_pTimerSavePathTextCtrl, and POST_TIMER_RECORD_NOTHING.

Referenced by OnAutoExportCheckBox_Change(), OnAutoSaveCheckBox_Change(), and PopulateOrExchange().

442  {
443 
444  if (iControlGoup == CONTROL_GROUP_EXPORT) {
445  m_pTimerExportPathTextCtrl->Enable( bEnable );
446  m_pTimerExportPathButtonCtrl->Enable( bEnable);
447  } else if (iControlGoup == CONTROL_GROUP_SAVE) {
448  m_pTimerSavePathTextCtrl->Enable( bEnable);
449  m_pTimerSavePathButtonCtrl->Enable(bEnable );
450  }
451 
452  // Enable or disable the Choice box - if there is no Save or Export then this will be disabled
453  if (m_pTimerAutoSaveCheckBoxCtrl->GetValue() || m_pTimerAutoExportCheckBoxCtrl->GetValue()) {
455  } else {
458  }
459 }
wxCheckBox * m_pTimerAutoSaveCheckBoxCtrl
TimerRecordPathCtrl * m_pTimerExportPathTextCtrl
wxButton * m_pTimerSavePathButtonCtrl
TimerRecordPathCtrl * m_pTimerSavePathTextCtrl
wxChoice * m_pTimerAfterCompleteChoiceCtrl
wxButton * m_pTimerExportPathButtonCtrl
wxCheckBox * m_pTimerAutoExportCheckBoxCtrl
int TimerRecordDialog::ExecutePostRecordActions ( bool  bWasStopped)
private

Definition at line 586 of file TimerRecordDialog.cpp.

References _(), AudacityMessageBox(), DirManager::CleanTempDir(), AudacityProject::ExportFromTimerRecording(), GetActiveProject(), m_bAutoExportEnabled, m_bAutoSaveEnabled, m_bProjectAlreadySaved, m_bProjectCleanupRequired, m_fnAutoExportFile, m_fnAutoSaveFile, m_iAutoExportFilterIndex, m_iAutoExportFormat, m_iAutoExportSubFormat, m_pTimerAfterCompleteChoiceCtrl, POST_TIMER_RECORD_CLOSE, POST_TIMER_RECORD_NOTHING, PreActionDelay(), RemoveAllAutoSaveFiles(), AudacityProject::Save(), AudacityProject::SaveFromTimerRecording(), Success, TR_ACTION_EXPORTED, TR_ACTION_NOTHING, and TR_ACTION_SAVED.

Referenced by RunWaitDialog().

586  {
587  // MY: We no longer automatically (and silently) call ->Save() when the
588  // timer recording is completed. We can now Save and/or Export depending
589  // on the options selected by the user.
590  // Once completed, we can also close Audacity, restart the system or
591  // shutdown the system.
592  // If there was any error with the auto save or export then we will not do
593  // the actions requested and instead present an error mesasge to the user.
594  // Finally, if there is no post-record action selected then we output
595  // a dialog detailing what has been carried out instead.
596 
597  AudacityProject* pProject = GetActiveProject();
598 
599  bool bSaveOK = false;
600  bool bExportOK = false;
601  int iPostRecordAction = m_pTimerAfterCompleteChoiceCtrl->GetSelection();
602  int iOverriddenAction = iPostRecordAction;
603  bool bErrorOverride = false;
604 
605  // Do Automatic Save?
606  if (m_bAutoSaveEnabled) {
607 
608  // MY: If this project has already been saved then simply execute a Save here
610  bSaveOK = pProject->Save();
611  } else {
612  bSaveOK = pProject->SaveFromTimerRecording(m_fnAutoSaveFile);
613  }
614  }
615 
616  // Do Automatic Export?
617  if (m_bAutoExportEnabled) {
620  }
621 
622  // Check if we need to override the post recording action
623  bErrorOverride = ((m_bAutoSaveEnabled && !bSaveOK) || (m_bAutoExportEnabled && !bExportOK));
624  if (bErrorOverride || bWasStopped) {
625  iPostRecordAction = POST_TIMER_RECORD_NOTHING;
626  }
627 
628  if (iPostRecordAction == POST_TIMER_RECORD_NOTHING) {
629  // If there is no post-record action then we can show a message indicating what has been done
630 
631  wxString sMessage = (bWasStopped ? _("Timer Recording stopped.") :
632  _("Timer Recording completed."));
633 
634  if (m_bAutoSaveEnabled) {
635  if (bSaveOK) {
636  sMessage.Printf(_("%s\n\nRecording saved: %s"),
637  sMessage, m_fnAutoSaveFile.GetFullPath());
638  } else {
639  sMessage.Printf(_("%s\n\nError saving recording."), sMessage);
640  }
641  }
642  if (m_bAutoExportEnabled) {
643  if (bExportOK) {
644  sMessage.Printf(_("%s\n\nRecording exported: %s"),
645  sMessage, m_fnAutoExportFile.GetFullPath());
646  } else {
647  sMessage.Printf(_("%s\n\nError exporting recording."), sMessage);
648  }
649  }
650 
651  if (bErrorOverride) {
652 
653  if ((iOverriddenAction != iPostRecordAction) &&
654  (iOverriddenAction != POST_TIMER_RECORD_NOTHING)) {
655  // Inform the user that we have overridden the selected action
656  sMessage.Printf(_("%s\n\n'%s' has been canceled due to the error(s) noted above."),
657  sMessage,
658  m_pTimerAfterCompleteChoiceCtrl->GetString(iOverriddenAction));
659  }
660 
661  // Show Error Message Box
662  AudacityMessageBox(sMessage, _("Error"), wxICON_EXCLAMATION | wxOK);
663  } else {
664 
665  if (bWasStopped && (iOverriddenAction != POST_TIMER_RECORD_NOTHING)) {
666  sMessage.Printf(_("%s\n\n'%s' has been canceled as the recording was stopped."),
667  sMessage,
668  m_pTimerAfterCompleteChoiceCtrl->GetString(iOverriddenAction));
669  }
670 
671  AudacityMessageBox(sMessage, _("Timer Recording"), wxICON_INFORMATION | wxOK);
672  }
673  }
674 
675  // MY: Lets do some actions that only apply to Exit/Restart/Shutdown
676  if (iPostRecordAction >= POST_TIMER_RECORD_CLOSE) {
677  do {
678 
679  // Set the flags as appropriate based on what we have done
680  wxUint32 eActionFlags = TR_ACTION_NOTHING;
681  if (m_bAutoSaveEnabled && bSaveOK) {
682  eActionFlags |= TR_ACTION_SAVED;
683  }
684  if (m_bAutoExportEnabled && bExportOK) {
685  eActionFlags |= TR_ACTION_EXPORTED;
686  }
687 
688  // Lets show a warning dialog telling the user what is about to happen.
689  // If the user no longer wants to carry out this action then they can click
690  // Cancel and we will do POST_TIMER_RECORD_NOTHING instead.
691  auto iDelayOutcome = PreActionDelay(iPostRecordAction, (TimerRecordCompletedActions)eActionFlags);
692  if (iDelayOutcome != ProgressResult::Success) {
693  // Cancel the action!
694  iPostRecordAction = POST_TIMER_RECORD_NOTHING;
695  // Set this to true to avoid any chance of the temp files being deleted
696  bErrorOverride = true;
697  break;
698  }
699 
700 
701  // If we have simply recorded, exported and then plan to Exit/Restart/Shutdown
702  // then we will have a temporary project setup. Let's get rid of that!
704  // PRL: Move the following cleanup into a finally?
705  // No, I think you would want to skip this, in case recording
706  // succeeded but then save or export threw an exception.
708  }
709  } while (false);
710  }
711 
712  // Do we need to cleanup the orphaned temporary project?
713  if (m_bProjectCleanupRequired && !bErrorOverride) {
714  // PRL: Move the following cleanup into a finally?
715  // No, I think you would want to skip this, in case recording
716  // succeeded but then save or export threw an exception.
718  }
719 
720  // Return the action as required
721  return iPostRecordAction;
722 }
bool SaveFromTimerRecording(wxFileName fnFile)
Definition: Project.cpp:6004
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
TimerRecordCompletedActions
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
wxChoice * m_pTimerAfterCompleteChoiceCtrl
ProgressResult PreActionDelay(int iActionIndex, TimerRecordCompletedActions eCompletedActions)
bool ExportFromTimerRecording(wxFileName fnFile, int iFormat, int iSubFormat, int iFilterIndex)
Definition: Project.cpp:5984
_("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
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
wxFileName m_fnAutoExportFile
wxFileName m_fnAutoSaveFile
static void CleanTempDir()
Definition: DirManager.cpp:436
wxString TimerRecordDialog::GetDisplayDate ( wxDateTime &  dt)
private

Definition at line 724 of file TimerRecordDialog.cpp.

Referenced by RunWaitDialog(), and WaitForStart().

725 {
726 #if defined(__WXMSW__)
727  // On Windows, wxWidgets uses the system date control and it displays the
728  // date based on the Windows locale selected by the user. But, wxDateTime
729  // using the strftime function to return the formatted date. Since the
730  // default locale for the Windows CRT environment is "C", the dates come
731  // back in a different format.
732  //
733  // So, we make direct Windows calls to format the date like it the date
734  // control.
735  //
736  // (Most of this taken from src/msw/datectrl.cpp)
737 
738  const wxDateTime::Tm tm(dt.GetTm());
739  SYSTEMTIME st;
740  wxString s;
741  int len;
742 
743  st.wYear = (WXWORD)tm.year;
744  st.wMonth = (WXWORD)(tm.mon - wxDateTime::Jan + 1);
745  st.wDay = tm.mday;
746  st.wDayOfWeek = st.wMinute = st.wSecond = st.wMilliseconds = 0;
747 
748  len = ::GetDateFormat(LOCALE_USER_DEFAULT,
749  DATE_SHORTDATE,
750  &st,
751  NULL,
752  NULL,
753  0);
754  if (len > 0) {
755  len = ::GetDateFormat(LOCALE_USER_DEFAULT,
756  DATE_SHORTDATE,
757  &st,
758  NULL,
759  wxStringBuffer(s, len),
760  len);
761  if (len > 0) {
762  s += wxT(" ") + dt.FormatTime();
763  return s;
764  }
765  }
766 #endif
767 
768  // Use default formatting
769 wxPrintf(wxT("%s\n"), dt.Format());
770  return dt.FormatDate() + wxT(" ") + dt.FormatTime();
771 }
bool TimerRecordDialog::HaveFilesToRecover ( )
private

Definition at line 473 of file TimerRecordDialog.cpp.

References _(), AudacityMessageBox(), and FileNames::AutoSaveDir().

474 {
475  wxDir dir(FileNames::AutoSaveDir());
476  if (!dir.IsOpened()) {
477  AudacityMessageBox(_("Could not enumerate files in auto save directory."),
478  _("Error"), wxICON_STOP);
479  return false;
480  }
481 
482  wxString filename;
483  bool c = dir.GetFirst(&filename, wxT("*.autosave"), wxDIR_FILES);
484 
485  return c;
486 }
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
static wxString AutoSaveDir()
Definition: FileNames.cpp:109
_("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
TimerRecordPathCtrl * TimerRecordDialog::NewPathControl ( wxWindow *  wParent,
const int  iID,
const wxString &  sCaption,
const wxString &  sValue 
)
private

Definition at line 773 of file TimerRecordDialog.cpp.

References safenew.

Referenced by PopulateOrExchange().

775 {
776  TimerRecordPathCtrl * pTextCtrl;
777  wxASSERT(wParent); // to justify safenew
778  pTextCtrl = safenew TimerRecordPathCtrl(wParent, iID, sValue);
779  pTextCtrl->SetName(sCaption);
780  return pTextCtrl;
781 }
#define safenew
Definition: Audacity.h:230
void TimerRecordDialog::OnAutoExportCheckBox_Change ( wxCommandEvent &  event)
private
void TimerRecordDialog::OnAutoExportPathButton_Click ( wxCommandEvent &  event)
private

Definition at line 336 of file TimerRecordDialog.cpp.

References GetActiveProject(), Exporter::GetAutoExportFileName(), Exporter::GetAutoExportFilterIndex(), Exporter::GetAutoExportFormat(), Exporter::GetAutoExportSubFormat(), m_fnAutoExportFile, m_iAutoExportFilterIndex, m_iAutoExportFormat, m_iAutoExportSubFormat, Exporter::SetAutoExportOptions(), and UpdateTextBoxControls().

337 {
338  AudacityProject* pProject = GetActiveProject();
339  Exporter eExporter;
340 
341  // Call the Exporter to set the options required
342  if (eExporter.SetAutoExportOptions(pProject)) {
343  // Populate the options so that we can destroy this instance of the Exporter
348 
349  // Update the text controls
350  this->UpdateTextBoxControls();
351  }
352 }
wxFileName GetAutoExportFileName()
Definition: Export.cpp:986
bool SetAutoExportOptions(AudacityProject *project)
Definition: Export.cpp:990
int GetAutoExportFormat()
Definition: Export.cpp:974
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
int GetAutoExportFilterIndex()
Definition: Export.cpp:982
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
wxFileName m_fnAutoExportFile
int GetAutoExportSubFormat()
Definition: Export.cpp:978
void TimerRecordDialog::OnAutoSaveCheckBox_Change ( wxCommandEvent &  event)
private

Definition at line 354 of file TimerRecordDialog.cpp.

References CONTROL_GROUP_SAVE, EnableDisableAutoControls(), and m_pTimerAutoSaveCheckBoxCtrl.

354  {
356 }
wxCheckBox * m_pTimerAutoSaveCheckBoxCtrl
void EnableDisableAutoControls(bool bEnable, int iControlGoup)
void TimerRecordDialog::OnAutoSavePathButton_Click ( wxCommandEvent &  event)
private

Definition at line 298 of file TimerRecordDialog.cpp.

References _(), FileNames::Export, GetActiveProject(), AudacityProject::GetFileName(), m_bProjectAlreadySaved, m_fnAutoSaveFile, FileNames::SelectFile(), and UpdateTextBoxControls().

299 {
301  _("Save Timer Recording As"),
302  m_fnAutoSaveFile.GetPath(),
303  m_fnAutoSaveFile.GetFullName(),
304  wxT("aup"),
305  _("Audacity projects") + wxT(" (*.aup)|*.aup"),
306  wxFD_SAVE | wxRESIZE_BORDER,
307  this);
308 
309  if (fName == wxT(""))
310  return;
311 
312  AudacityProject* pProject = GetActiveProject();
313 
314  // If project already exists then abort - we do not allow users to overwrite an existing project
315  // unless it is the current project.
316  if (wxFileExists(fName) && (pProject->GetFileName() != fName)) {
318  NULL,
319  _("The selected file name could not be used\nfor Timer Recording because it \
320 would overwrite another project.\nPlease try again and select an original name."),
321  _("Error Saving Timer Recording Project"),
322  wxOK|wxICON_ERROR);
323  m.ShowModal();
324  return;
325  }
326 
327  // Set this boolean to false so we now do a SaveAs at the end of the recording
328  // unless we're saving the current project.
329  m_bProjectAlreadySaved = pProject->GetFileName() == fName? true : false;
330 
331  m_fnAutoSaveFile = fName;
332  m_fnAutoSaveFile.SetExt(wxT("aup"));
333  this->UpdateTextBoxControls();
334 }
Wrap wxMessageDialog so that caption IS translatable.
Definition: ErrorDialog.h:129
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:411
_("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
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
wxFileName m_fnAutoSaveFile
const wxString & GetFileName()
Definition: Project.h:302
void TimerRecordDialog::OnDatePicker_End ( wxDateEvent &  event)
private

Definition at line 244 of file TimerRecordDialog.cpp.

References NumericConverter::GetValue(), m_DateTime_End, m_DateTime_Start, m_pDatePickerCtrl_End, m_pTimeTextCtrl_End, min(), NumericTextCtrl::SetValue(), UpdateDuration(), and wxDateTime_to_AudacityTime().

Referenced by OnTimeText_End().

245 {
247  double dTime = m_pTimeTextCtrl_End->GetValue();
248  long hr = (long)(dTime / 3600.0);
249  long min = (long)((dTime - (hr * 3600.0)) / 60.0);
250  long sec = (long)(dTime - (hr * 3600.0) - (min * 60.0));
251  m_DateTime_End.SetHour(hr);
252  m_DateTime_End.SetMinute(min);
253  m_DateTime_End.SetSecond(sec);
254 
255  // DatePickerCtrls use SetRange to make sure End is never less than Start, but
256  // need to implement it for the TimeTextCtrls.
261  }
262 
263  this->UpdateDuration(); // Keep Start constant and update Duration for changed End.
264 }
NumericTextCtrl * m_pTimeTextCtrl_End
wxDateTime m_DateTime_Start
int min(int a, int b)
void SetValue(double newValue)
static double wxDateTime_to_AudacityTime(wxDateTime &dateTime)
wxDatePickerCtrl * m_pDatePickerCtrl_End
void TimerRecordDialog::OnDatePicker_Start ( wxDateEvent &  event)
private

Definition at line 202 of file TimerRecordDialog.cpp.

References NumericConverter::GetValue(), m_DateTime_Start, m_pDatePickerCtrl_Start, m_pTimeTextCtrl_Start, min(), OnTimer(), and UpdateEnd().

Referenced by OnTimeText_Start().

203 {
205  double dTime = m_pTimeTextCtrl_Start->GetValue();
206  long hr = (long)(dTime / 3600.0);
207  long min = (long)((dTime - (hr * 3600.0)) / 60.0);
208  long sec = (long)(dTime - (hr * 3600.0) - (min * 60.0));
209  m_DateTime_Start.SetHour(hr);
210  m_DateTime_Start.SetMinute(min);
211  m_DateTime_Start.SetSecond(sec);
212 
213  // User might have had the dialog up for a while, or
214  // had a future day, set hour of day less than now's, then changed day to today.
215  wxTimerEvent dummyTimerEvent;
216  this->OnTimer(dummyTimerEvent);
217 
218  // Always update End for changed Start, keeping Duration constant.
219  // Note that OnTimer sometimes calls UpdateEnd, so sometimes this is redundant,
220  // but OnTimer doesn't need to always call UpdateEnd, but we must here.
221  this->UpdateEnd();
222 }
wxDatePickerCtrl * m_pDatePickerCtrl_Start
wxDateTime m_DateTime_Start
int min(int a, int b)
NumericTextCtrl * m_pTimeTextCtrl_Start
void OnTimer(wxTimerEvent &event)
void TimerRecordDialog::OnHelpButtonClick ( wxCommandEvent &  event)
private

Definition at line 362 of file TimerRecordDialog.cpp.

References HelpSystem::ShowHelp().

363 {
364  HelpSystem::ShowHelp(this, wxT("Timer_Record"), true);
365 }
static void ShowHelp(wxWindow *parent, const wxString &localFileName, const wxString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:194
void TimerRecordDialog::OnOK ( wxCommandEvent &  event)
private

Definition at line 367 of file TimerRecordDialog.cpp.

References _(), AudacityMessageBox(), GetActiveProject(), AudacityProject::GetEstimatedRecordingMinsLeftOnDisk(), AudacityProject::GetHoursMinsString(), gPrefs, m_fnAutoExportFile, m_fnAutoSaveFile, m_pTimerAutoExportCheckBoxCtrl, m_pTimerAutoSaveCheckBoxCtrl, m_timer, m_TimeSpan_Duration, and TransferDataFromWindow().

368 {
369  this->TransferDataFromWindow();
370  if (!m_TimeSpan_Duration.IsPositive())
371  {
372  AudacityMessageBox(_("Duration is zero. Nothing will be recorded."),
373  _("Error in Duration"), wxICON_EXCLAMATION | wxOK);
374  return;
375  }
376 
377  // Validate that we have a Save and/or Export path setup if the appropriate check box is ticked
378  wxString sTemp = m_fnAutoSaveFile.GetFullPath();
379  if (m_pTimerAutoSaveCheckBoxCtrl->IsChecked()) {
380  if (!m_fnAutoSaveFile.IsOk() || m_fnAutoSaveFile.IsDir()) {
381  AudacityMessageBox(_("Automatic Save path is invalid."),
382  _("Error in Automatic Save"), wxICON_EXCLAMATION | wxOK);
383  return;
384  }
385  }
386  if (m_pTimerAutoExportCheckBoxCtrl->IsChecked()) {
387  if (!m_fnAutoExportFile.IsOk() || m_fnAutoExportFile.IsDir()) {
388  AudacityMessageBox(_("Automatic Export path is invalid."),
389  _("Error in Automatic Export"), wxICON_EXCLAMATION | wxOK);
390  return;
391  }
392  }
393 
394  // MY: Estimate here if we have enough disk space to
395  // complete this Timer Recording.
396  // If we dont think there is enough space then ask the user
397  // if they want to continue.
398  // We don't stop the user from starting the recording
399  // as its possible that they plan to free up some
400  // space before the recording begins
401  AudacityProject* pProject = GetActiveProject();
402 
403  // How many minutes do we have left on the disc?
404  int iMinsLeft = pProject->GetEstimatedRecordingMinsLeftOnDisk();
405 
406  // How many minutes will this recording require?
407  int iMinsRecording = m_TimeSpan_Duration.GetMinutes();
408 
409  // Do we have enough space?
410  if (iMinsRecording >= iMinsLeft) {
411 
412  // Format the strings
413  wxString sRemainingTime = "";
414  sRemainingTime = pProject->GetHoursMinsString(iMinsLeft);
415  wxString sPlannedTime = "";
416  sPlannedTime = pProject->GetHoursMinsString(iMinsRecording);
417 
418  // Create the message string
419  wxString sMessage = "";
420  sMessage.Printf(_("You may not have enough free disk space to complete this Timer Recording, based on your current settings.\n\nDo you wish to continue?\n\nPlanned recording duration: %s\nRecording time remaining on disk: %s"),
421  sPlannedTime,
422  sRemainingTime);
423 
424  AudacityMessageDialog dlgMessage(NULL,
425  sMessage,
426  _("Timer Recording Disk Space Warning"),
427  wxYES_NO | wxNO_DEFAULT | wxICON_WARNING);
428  if (dlgMessage.ShowModal() != wxID_YES) {
429  // User decided not to continue - bail out!
430  return;
431  }
432  }
433 
434  m_timer.Stop(); // Don't need to keep updating m_DateTime_Start to prevent backdating.
435  this->EndModal(wxID_OK);
436  wxLongLong duration = m_TimeSpan_Duration.GetSeconds();
437  // this will assert if the duration won't fit in a long
438  gPrefs->Write(wxT("/TimerRecord/LastDuration"), duration.ToLong());
439  gPrefs->Flush();
440 }
wxCheckBox * m_pTimerAutoSaveCheckBoxCtrl
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
wxTimeSpan m_TimeSpan_Duration
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
int GetEstimatedRecordingMinsLeftOnDisk(long lCaptureChannels=0)
Definition: Project.cpp:6081
Wrap wxMessageDialog so that caption IS translatable.
Definition: ErrorDialog.h:129
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
_("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
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
wxString GetHoursMinsString(int iMinutes)
Definition: Project.cpp:6052
wxFileName m_fnAutoExportFile
bool TransferDataFromWindow() override
wxFileName m_fnAutoSaveFile
wxCheckBox * m_pTimerAutoExportCheckBoxCtrl
void TimerRecordDialog::OnTimer ( wxTimerEvent &  event)

Definition at line 191 of file TimerRecordDialog.cpp.

References m_DateTime_Start, m_pDatePickerCtrl_Start, m_pTimeTextCtrl_Start, NumericTextCtrl::SetValue(), UpdateEnd(), and wxDateTime_to_AudacityTime().

Referenced by OnDatePicker_Start(), and RunWaitDialog().

192 {
193  wxDateTime dateTime_UNow = wxDateTime::UNow();
194  if (m_DateTime_Start < dateTime_UNow) {
195  m_DateTime_Start = dateTime_UNow;
198  this->UpdateEnd(); // Keep Duration constant and update End for changed Start.
199  }
200 }
wxDatePickerCtrl * m_pDatePickerCtrl_Start
wxDateTime m_DateTime_Start
void SetValue(double newValue)
NumericTextCtrl * m_pTimeTextCtrl_Start
static double wxDateTime_to_AudacityTime(wxDateTime &dateTime)
void TimerRecordDialog::OnTimeText_Duration ( wxCommandEvent &  event)
private

Definition at line 286 of file TimerRecordDialog.cpp.

References NumericConverter::GetValue(), m_pTimeTextCtrl_Duration, m_TimeSpan_Duration, min(), and UpdateEnd().

287 {
288  double dTime = m_pTimeTextCtrl_Duration->GetValue();
289  long hr = (long)(dTime / 3600.0);
290  long min = (long)((dTime - (hr * 3600.0)) / 60.0);
291  long sec = (long)(dTime - (hr * 3600.0) - (min * 60.0));
292  m_TimeSpan_Duration = wxTimeSpan(hr, min, sec); //v milliseconds?
293 
294  this->UpdateEnd(); // Keep Start constant and update End for changed Duration.
295 }
wxTimeSpan m_TimeSpan_Duration
int min(int a, int b)
NumericTextCtrl * m_pTimeTextCtrl_Duration
void TimerRecordDialog::OnTimeText_End ( wxCommandEvent &  event)
private

Definition at line 266 of file TimerRecordDialog.cpp.

References NumericConverter::GetValue(), m_DateTime_End, m_pDatePickerCtrl_End, m_pTimeTextCtrl_End, OnDatePicker_End(), and NumericTextCtrl::SetValue().

267 {
268  //v NumericTextCtrl doesn't implement upper ranges, i.e.,
269  // if I tell it "024 h 060 m 060 s", then
270  // user increments the hours past 23, it rolls over to 0
271  // (although if you increment below 0, it stays at 0).
272  // So instead, set the max to 99 and just catch hours > 24 and fix the ctrls.
273  double dTime = m_pTimeTextCtrl_End->GetValue();
274  long days = (long)(dTime / (24.0 * 3600.0));
275  if (days > 0) {
276  dTime -= (double)days * 24.0 * 3600.0;
277  m_DateTime_End += wxTimeSpan::Days(days);
280  }
281 
282  wxDateEvent dummyDateEvent;
283  this->OnDatePicker_End(dummyDateEvent);
284 }
void OnDatePicker_End(wxDateEvent &event)
NumericTextCtrl * m_pTimeTextCtrl_End
void SetValue(double newValue)
wxDatePickerCtrl * m_pDatePickerCtrl_End
void TimerRecordDialog::OnTimeText_Start ( wxCommandEvent &  event)
private

Definition at line 224 of file TimerRecordDialog.cpp.

References NumericConverter::GetValue(), m_DateTime_Start, m_pDatePickerCtrl_Start, m_pTimeTextCtrl_Start, OnDatePicker_Start(), and NumericTextCtrl::SetValue().

225 {
226  //v NumericTextCtrl doesn't implement upper ranges, i.e.,
227  // if I tell it "024 h 060 m 060 s", then
228  // user increments the hours past 23, it rolls over to 0
229  // (although if you increment below 0, it stays at 0).
230  // So instead, set the max to 99 and just catch hours > 24 and fix the ctrls.
231  double dTime = m_pTimeTextCtrl_Start->GetValue();
232  long days = (long)(dTime / (24.0 * 3600.0));
233  if (days > 0) {
234  dTime -= (double)days * 24.0 * 3600.0;
235  m_DateTime_Start += wxTimeSpan::Days(days);
238  }
239 
240  wxDateEvent dummyDateEvent;
241  this->OnDatePicker_Start(dummyDateEvent);
242 }
wxDatePickerCtrl * m_pDatePickerCtrl_Start
void OnDatePicker_Start(wxDateEvent &event)
wxDateTime m_DateTime_Start
void SetValue(double newValue)
NumericTextCtrl * m_pTimeTextCtrl_Start
void TimerRecordDialog::PopulateOrExchange ( ShuttleGui S)
private

Definition at line 783 of file TimerRecordDialog.cpp.

References _(), ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddCheckBox(), ShuttleGuiBase::AddChoice(), ShuttleGuiBase::AddPrompt(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::AddWindow(), CONTROL_GROUP_EXPORT, CONTROL_GROUP_SAVE, eCancelButton, eHelpButton, EnableDisableAutoControls(), ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::EndVerticalLay(), eOkButton, GetActiveProject(), AudacityProject::GetFileName(), gPrefs, ShuttleGui::Id(), ID_AUTOEXPORT_CHECKBOX, ID_AUTOEXPORTPATH_BUTTON, ID_AUTOEXPORTPATH_TEXT, ID_AUTOSAVE_CHECKBOX, ID_AUTOSAVEPATH_BUTTON, ID_AUTOSAVEPATH_TEXT, ID_DATEPICKER_END, ID_DATEPICKER_START, ID_TIMETEXT_DURATION, ID_TIMETEXT_END, ID_TIMETEXT_START, m_DateTime_End, m_DateTime_Start, m_fnAutoSaveFile, m_pDatePickerCtrl_End, m_pDatePickerCtrl_Start, m_pTimerAfterCompleteChoiceCtrl, m_pTimerAutoExportCheckBoxCtrl, m_pTimerAutoSaveCheckBoxCtrl, m_pTimerExportPathButtonCtrl, m_pTimerExportPathTextCtrl, m_pTimerSavePathButtonCtrl, m_pTimerSavePathTextCtrl, m_pTimeTextCtrl_Duration, m_pTimeTextCtrl_End, m_pTimeTextCtrl_Start, m_sTimerAfterCompleteOption, m_sTimerAfterCompleteOptionsArray, m_TimeSpan_Duration, NewPathControl(), safenew, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::StartVerticalLay(), NumericConverter::TIME, and wxDateTime_to_AudacityTime().

784 {
785  bool bAutoSave = gPrefs->ReadBool("/TimerRecord/AutoSave", false);
786  bool bAutoExport = gPrefs->ReadBool("/TimerRecord/AutoExport", false);
787  int iPostTimerRecordAction = gPrefs->ReadLong("/TimerRecord/PostAction", 0);
788 
789  S.SetBorder(5);
790  S.StartMultiColumn(2, wxCENTER);
791  {
792  S.StartVerticalLay(true);
793  {
794  /* i18n-hint: This string is used to configure the controls for times when the recording is
795  * started and stopped. As such it is important that only the alphabetic parts of the string
796  * are translated, with the numbers left exactly as they are.
797  * The 'h' indicates the first number displayed is hours, the 'm' indicates the second number
798  * displayed is minutes, and the 's' indicates that the third number displayed is seconds.
799  */
800  auto strFormat = _("099 h 060 m 060 s");
801  using Options = NumericTextCtrl::Options;
802  S.StartStatic(_("Start Date and Time"), true);
803  {
805  safenew wxDatePickerCtrl(this, // wxWindow *parent,
806  ID_DATEPICKER_START, // wxWindowID id,
807  m_DateTime_Start); // const wxDateTime& dt = wxDefaultDateTime,
808  // const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = "datectrl")
809  m_pDatePickerCtrl_Start->SetName(_("Start Date"));
810  m_pDatePickerCtrl_Start->SetRange(wxDateTime::Today(), wxInvalidDateTime); // No backdating.
811 #if wxUSE_ACCESSIBILITY
812  m_pDatePickerCtrl_Start->SetAccessible( safenew DatePickerCtrlAx(m_pDatePickerCtrl_Start));
813 #endif
815 
818  {}, 0, 44100,
819  Options{}
820  .MenuEnabled(false)
821  .Format(strFormat)
823  m_pTimeTextCtrl_Start->SetName(_("Start Time"));
825  }
826  S.EndStatic();
827 
828  S.StartStatic(_("End Date and Time"), true);
829  {
831  safenew wxDatePickerCtrl(this, // wxWindow *parent,
832  ID_DATEPICKER_END, // wxWindowID id,
833  m_DateTime_End); // const wxDateTime& dt = wxDefaultDateTime,
834  // const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
835  // long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
836  // const wxValidator& validator = wxDefaultValidator,
837  // const wxString& name = "datectrl")
838  m_pDatePickerCtrl_End->SetRange(m_DateTime_Start, wxInvalidDateTime); // No backdating.
839  m_pDatePickerCtrl_End->SetName(_("End Date"));
840 #if wxUSE_ACCESSIBILITY
841  m_pDatePickerCtrl_End->SetAccessible( safenew DatePickerCtrlAx(m_pDatePickerCtrl_End));
842 #endif
844 
847  {}, 0, 44100,
848  Options{}
849  .MenuEnabled(false)
850  .Format(strFormat)
852  m_pTimeTextCtrl_End->SetName(_("End Time"));
854  }
855  S.EndStatic();
856 
857  S.StartStatic(_("Duration"), true);
858  {
859  /* i18n-hint: This string is used to configure the controls which shows the recording
860  * duration. As such it is important that only the alphabetic parts of the string
861  * are translated, with the numbers left exactly as they are.
862  * The string 'days' indicates that the first number in the control will be the number of days,
863  * then the 'h' indicates the second number displayed is hours, the 'm' indicates the third
864  * number displayed is minutes, and the 's' indicates that the fourth number displayed is
865  * seconds.
866  */
867  auto strFormat1 = _("099 days 024 h 060 m 060 s");
870  {}, 0, 44100,
871  Options{}
872  .MenuEnabled(false)
873  .Format(strFormat1)
874  .Value(true, m_TimeSpan_Duration.GetSeconds().ToDouble()));
875  m_pTimeTextCtrl_Duration->SetName(_("Duration"));
877  }
878  S.EndStatic();
879  }
880  S.EndVerticalLay();
881 
882  S.StartVerticalLay(true);
883  {
884  S.StartStatic(_("Automatic Save"), true);
885  {
886  // If checked, the project will be saved when the recording is completed
887  m_pTimerAutoSaveCheckBoxCtrl = S.Id(ID_AUTOSAVE_CHECKBOX).AddCheckBox(_("Enable &Automatic Save?"),
888  (bAutoSave ? "true" : "false"));
889  S.StartMultiColumn(3, wxEXPAND);
890  {
891  wxString sInitialValue = wxT("");
892  AudacityProject* pProject = GetActiveProject();
893  wxString sSaveValue = pProject->GetFileName();
894  if (sSaveValue != wxEmptyString) {
895  m_fnAutoSaveFile.Assign(sSaveValue);
896  sInitialValue = _("Current Project");
897  }
898  S.AddPrompt(_("Save Project As:"));
899  m_pTimerSavePathTextCtrl = NewPathControl(this, ID_AUTOSAVEPATH_TEXT, _("Save Project As:"), sInitialValue);
900  m_pTimerSavePathTextCtrl->SetEditable(false);
903  }
904  S.EndMultiColumn();
905  }
906  S.EndStatic();
907 
908  S.StartStatic(_("Automatic Export"), true);
909  {
910  m_pTimerAutoExportCheckBoxCtrl = S.Id(ID_AUTOEXPORT_CHECKBOX).AddCheckBox(_("Enable Automatic &Export?"), (bAutoExport ? "true" : "false"));
911  S.StartMultiColumn(3, wxEXPAND);
912  {
913  S.AddPrompt(_("Export Project As:"));
914  m_pTimerExportPathTextCtrl = NewPathControl(this, ID_AUTOEXPORTPATH_TEXT, _("Export Project As:"), wxT(""));
915  m_pTimerExportPathTextCtrl->SetEditable(false);
918  }
919  S.EndMultiColumn();
920  }
921  S.EndStatic();
922 
923  S.StartStatic(_("Options"), true);
924  {
925 
926  S.StartMultiColumn(1, wxEXPAND);
927  {
928  S.SetStretchyCol( 0 );
929  wxArrayString arrayOptions;
930  arrayOptions.Add(_("Do nothing"));
931  arrayOptions.Add(_("Exit Audacity"));
932  arrayOptions.Add(_("Restart system"));
933  arrayOptions.Add(_("Shutdown system"));
934 
935  m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(0));
936  m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(1));
937 #ifdef __WINDOWS__
938  m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(2));
939  m_sTimerAfterCompleteOptionsArray.Add(arrayOptions.Item(3));
940 #endif
941  m_sTimerAfterCompleteOption = arrayOptions.Item(iPostTimerRecordAction);
942 
943  m_pTimerAfterCompleteChoiceCtrl = S.AddChoice(_("After Recording completes:"),
946  }
947  S.EndMultiColumn();
948  }
949  S.EndStatic();
950 
951  }
952  S.EndVerticalLay();
953  }
954  S.EndMultiColumn();
955 
956  // MY: Added the help button here
958 
959  Layout();
960  Fit();
961  SetMinSize(GetSize());
962  Center();
963 
966 }
wxCheckBox * m_pTimerAutoSaveCheckBoxCtrl
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
TimerRecordPathCtrl * m_pTimerExportPathTextCtrl
wxTimeSpan m_TimeSpan_Duration
wxWindow * AddWindow(wxWindow *pWindow, int Flags=wxALIGN_CENTRE|wxALL)
Definition: ShuttleGui.cpp:288
void EndMultiColumn()
wxButton * m_pTimerSavePathButtonCtrl
wxDatePickerCtrl * m_pDatePickerCtrl_Start
void EnableDisableAutoControls(bool bEnable, int iControlGoup)
#define safenew
Definition: Audacity.h:230
void AddPrompt(const wxString &Prompt)
Right aligned text string.
Definition: ShuttleGui.cpp:239
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
void EndVerticalLay()
wxCheckBox * AddCheckBox(const wxString &Prompt, const wxString &Selected)
Definition: ShuttleGui.cpp:298
TimerRecordPathCtrl * NewPathControl(wxWindow *wParent, const int iID, const wxString &sCaption, const wxString &sValue)
TimerRecordPathCtrl * m_pTimerSavePathTextCtrl
NumericTextCtrl * m_pTimeTextCtrl_End
wxDateTime m_DateTime_Start
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
wxChoice * m_pTimerAfterCompleteChoiceCtrl
wxChoice * AddChoice(const wxString &Prompt, const wxString &Selected, const wxArrayString *pChoices)
Definition: ShuttleGui.cpp:371
ShuttleGui & Id(int id)
NumericTextCtrl * m_pTimeTextCtrl_Duration
wxArrayString m_sTimerAfterCompleteOptionsArray
wxButton * m_pTimerExportPathButtonCtrl
NumericTextCtrl * m_pTimeTextCtrl_Start
static double wxDateTime_to_AudacityTime(wxDateTime &dateTime)
_("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
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:763
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxButton *extra=NULL)
wxFileName m_fnAutoSaveFile
void SetBorder(int Border)
Definition: ShuttleGui.h:286
const wxString & GetFileName()
Definition: Project.h:302
wxString m_sTimerAfterCompleteOption
wxCheckBox * m_pTimerAutoExportCheckBoxCtrl
wxButton * AddButton(const wxString &Text, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:341
wxDatePickerCtrl * m_pDatePickerCtrl_End
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:203
void StartVerticalLay(int iProp=1)
ProgressResult TimerRecordDialog::PreActionDelay ( int  iActionIndex,
TimerRecordCompletedActions  eCompletedActions 
)
private

Definition at line 1078 of file TimerRecordDialog.cpp.

References _(), kTimerInterval, m_pTimerAfterCompleteChoiceCtrl, pdlgHideElapsedTime, pdlgHideStopButton, Success, TR_ACTION_EXPORTED, and TR_ACTION_SAVED.

Referenced by ExecutePostRecordActions().

1079 {
1080  wxString sAction = m_pTimerAfterCompleteChoiceCtrl->GetString(iActionIndex);
1081  wxString sCountdownLabel;
1082  sCountdownLabel.Printf("%s in:", sAction);
1083 
1084  // Two column layout.
1086  auto &column1 = columns[0];
1087  auto &column2 = columns[1];
1088 
1089  column1.push_back(_("Timer Recording completed."));
1090  column2.push_back( {} );
1091 
1092  column1.push_back( {} );
1093  column2.push_back( {} );
1094 
1095  column1.push_back(_("Recording Saved:"));
1096  column2.push_back(((eCompletedActions & TR_ACTION_SAVED) ? _("Yes") : _("No")));
1097 
1098  column1.push_back(_("Recording Exported:"));
1099  column2.push_back(((eCompletedActions & TR_ACTION_EXPORTED) ? _("Yes") : _("No")));
1100 
1101  column1.push_back(_("Action after Timer Recording:"));
1102  column2.push_back(sAction);
1103 
1104  wxDateTime dtNow = wxDateTime::UNow();
1105  wxTimeSpan tsWait = wxTimeSpan(0, 1, 0, 0);
1106  wxDateTime dtActionTime = dtNow.Add(tsWait);
1107 
1108  TimerProgressDialog dlgAction(tsWait.GetMilliseconds().GetValue(),
1109  _("Audacity Timer Record - Waiting"),
1110  columns,
1112  sCountdownLabel);
1113 
1114  auto iUpdateResult = ProgressResult::Success;
1115  bool bIsTime = false;
1116  while (iUpdateResult == ProgressResult::Success && !bIsTime)
1117  {
1118  iUpdateResult = dlgAction.UpdateProgress();
1119  wxMilliSleep(kTimerInterval);
1120  bIsTime = (dtActionTime <= wxDateTime::UNow());
1121  }
1122  return iUpdateResult;
1123 }
std::vector< MessageColumn > MessageTable
const int kTimerInterval
wxChoice * m_pTimerAfterCompleteChoiceCtrl
_("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
bool TimerRecordDialog::RemoveAllAutoSaveFiles ( )
private

Definition at line 488 of file TimerRecordDialog.cpp.

References FileNames::AutoSaveDir().

Referenced by ExecutePostRecordActions().

489 {
490  wxArrayString files;
491  wxDir::GetAllFiles(FileNames::AutoSaveDir(), &files,
492  wxT("*.autosave"), wxDIR_FILES);
493 
494  for (unsigned int i = 0; i < files.GetCount(); i++)
495  {
496  if (!wxRemoveFile(files[i]))
497  {
498  // I don't think this error message is actually useful.
499  // -dmazzoni
500  //AudacityMessageBox(_("Could not remove auto save file: " + files[i]),
501  // _("Error"), wxICON_STOP);
502  return false;
503  }
504  }
505 
506  return true;
507 }
static wxString AutoSaveDir()
Definition: FileNames.cpp:109
int TimerRecordDialog::RunWaitDialog ( )

Runs the wait for start dialog. Returns false if the user clicks stop.

Runs the wait for start dialog. Returns -1 if the user clicks stop while we are recording or if the post recording actions fail.

Definition at line 511 of file TimerRecordDialog.cpp.

References _(), Cancelled, ExecutePostRecordActions(), Failed, GetActiveProject(), GetDisplayDate(), kTimerInterval, m_bAutoExportEnabled, m_bAutoSaveEnabled, m_DateTime_End, m_DateTime_Start, m_pTimerAfterCompleteChoiceCtrl, m_TimeSpan_Duration, AudacityProject::OnRecord(), AudacityProject::OnStop(), OnTimer(), pdlgConfirmStopCancel, pdlgHideCancelButton, POST_TIMER_RECORD_CANCEL, POST_TIMER_RECORD_CANCEL_WAIT, Stopped, Success, and WaitForStart().

Referenced by AudacityProject::OnTimerRecord().

512 {
513  AudacityProject* pProject = GetActiveProject();
514 
515  auto updateResult = ProgressResult::Success;
516 
517  if (m_DateTime_Start > wxDateTime::UNow())
518  updateResult = this->WaitForStart();
519 
520  if (updateResult != ProgressResult::Success) {
521  // Don't proceed, but don't treat it as canceled recording. User just canceled waiting.
523  } else {
524  // Record for specified time.
525  pProject->OnRecord(*pProject);
526  bool bIsRecording = true;
527 
528  wxString sPostAction = m_pTimerAfterCompleteChoiceCtrl->GetString(m_pTimerAfterCompleteChoiceCtrl->GetSelection());
529 
530  // Two column layout.
532  auto &column1 = columns[0];
533  auto &column2 = columns[1];
534 
535  column1.push_back( _("Recording start:") );
536  column2.push_back( GetDisplayDate(m_DateTime_Start) );
537 
538  column1.push_back( _("Duration:") );
539  column2.push_back( m_TimeSpan_Duration.Format() );
540 
541  column1.push_back( _("Recording end:") );
542  column2.push_back( GetDisplayDate(m_DateTime_End) );
543 
544  column1.push_back( {} );
545  column2.push_back( {} );
546 
547  column1.push_back( _("Automatic Save enabled:") );
548  column2.push_back( (m_bAutoSaveEnabled ? _("Yes") : _("No")) );
549 
550  column1.push_back( _("Automatic Export enabled:") );
551  column2.push_back( (m_bAutoExportEnabled ? _("Yes") : _("No")) );
552 
553  column1.push_back( _("Action after Timer Recording:") );
554  column2.push_back( sPostAction );
555 
557  progress(m_TimeSpan_Duration.GetMilliseconds().GetValue(),
558  _("Audacity Timer Record Progress"),
559  columns,
561 
562  // Make sure that start and end time are updated, so we always get the full
563  // duration, even if there's some delay getting here.
564  wxTimerEvent dummyTimerEvent;
565  this->OnTimer(dummyTimerEvent);
566 
567  // Loop for progress display during recording.
568  while (bIsRecording && (updateResult == ProgressResult::Success)) {
569  updateResult = progress.UpdateProgress();
570  wxMilliSleep(kTimerInterval);
571  bIsRecording = (wxDateTime::UNow() <= m_DateTime_End); // Call UNow() again for extra accuracy...
572  }
573  }
574 
575  // Must do this AFTER the timer project dialog has been deleted to ensure the application
576  // responds to the AUDIOIO events...see not about bug #334 in the ProgressDialog constructor.
577  pProject->OnStop(*pProject);
578 
579  // Let the caller handle cancellation or failure from recording progress.
580  if (updateResult == ProgressResult::Cancelled || updateResult == ProgressResult::Failed)
582 
583  return ExecutePostRecordActions((updateResult == ProgressResult::Stopped));
584 }
wxTimeSpan m_TimeSpan_Duration
std::vector< MessageColumn > MessageTable
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:176
int ExecutePostRecordActions(bool bWasStopped)
void OnStop(const CommandContext &context)
Definition: Menus.cpp:2869
wxDateTime m_DateTime_Start
const int kTimerInterval
wxChoice * m_pTimerAfterCompleteChoiceCtrl
_("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
AUDACITY_DLL_API AudacityProject * GetActiveProject()
Definition: Project.cpp:308
ProgressResult WaitForStart()
wxString GetDisplayDate(wxDateTime &dt)
void OnTimer(wxTimerEvent &event)
void OnRecord(const CommandContext &context)
Definition: Menus.cpp:2883
bool TimerRecordDialog::TransferDataFromWindow ( )
overrideprivate

Definition at line 968 of file TimerRecordDialog.cpp.

References NumericConverter::GetValue(), gPrefs, m_bAutoExportEnabled, m_bAutoSaveEnabled, m_DateTime_End, m_DateTime_Start, m_pDatePickerCtrl_End, m_pDatePickerCtrl_Start, m_pTimerAfterCompleteChoiceCtrl, m_pTimerAutoExportCheckBoxCtrl, m_pTimerAutoSaveCheckBoxCtrl, m_pTimeTextCtrl_End, m_pTimeTextCtrl_Start, m_TimeSpan_Duration, and min().

Referenced by OnOK().

969 {
970  double dTime;
971  long hr;
972  long min;
973  long sec;
974 
976  dTime = m_pTimeTextCtrl_Start->GetValue();
977  hr = (long)(dTime / 3600.0);
978  min = (long)((dTime - (hr * 3600.0)) / 60.0);
979  sec = (long)(dTime - (hr * 3600.0) - (min * 60.0));
980  m_DateTime_Start.SetHour(hr);
981  m_DateTime_Start.SetMinute(min);
982  m_DateTime_Start.SetSecond(sec);
983 
985  dTime = m_pTimeTextCtrl_End->GetValue();
986  hr = (long)(dTime / 3600.0);
987  min = (long)((dTime - (hr * 3600.0)) / 60.0);
988  sec = (long)(dTime - (hr * 3600.0) - (min * 60.0));
989  m_DateTime_End.SetHour(hr);
990  m_DateTime_End.SetMinute(min);
991  m_DateTime_End.SetSecond(sec);
992 
994 
995  // Pull the settings from the auto save/export controls and write to the pref file
998 
999  // MY: Obtain the index from the choice control so we can save to the prefs file
1000  int iPostRecordAction = m_pTimerAfterCompleteChoiceCtrl->GetSelection();
1001 
1002  // Save the options back to the prefs file
1003  gPrefs->Write("/TimerRecord/AutoSave", m_bAutoSaveEnabled);
1004  gPrefs->Write("/TimerRecord/AutoExport", m_bAutoExportEnabled);
1005  gPrefs->Write("/TimerRecord/PostAction", iPostRecordAction);
1006 
1007  return true;
1008 }
wxCheckBox * m_pTimerAutoSaveCheckBoxCtrl
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
wxTimeSpan m_TimeSpan_Duration
wxDatePickerCtrl * m_pDatePickerCtrl_Start
NumericTextCtrl * m_pTimeTextCtrl_End
wxDateTime m_DateTime_Start
wxChoice * m_pTimerAfterCompleteChoiceCtrl
int min(int a, int b)
NumericTextCtrl * m_pTimeTextCtrl_Start
wxCheckBox * m_pTimerAutoExportCheckBoxCtrl
wxDatePickerCtrl * m_pDatePickerCtrl_End
void TimerRecordDialog::UpdateDuration ( )
private

Definition at line 1011 of file TimerRecordDialog.cpp.

References m_DateTime_End, m_DateTime_Start, m_pTimeTextCtrl_Duration, m_TimeSpan_Duration, and NumericTextCtrl::SetValue().

Referenced by OnDatePicker_End().

1012 {
1014  m_pTimeTextCtrl_Duration->SetValue(m_TimeSpan_Duration.GetSeconds().ToDouble());
1015 }
wxTimeSpan m_TimeSpan_Duration
wxDateTime m_DateTime_Start
NumericTextCtrl * m_pTimeTextCtrl_Duration
void SetValue(double newValue)
void TimerRecordDialog::UpdateEnd ( )
private

Definition at line 1018 of file TimerRecordDialog.cpp.

References m_DateTime_End, m_DateTime_Start, m_pDatePickerCtrl_End, m_pTimeTextCtrl_End, m_TimeSpan_Duration, NumericTextCtrl::SetValue(), and wxDateTime_to_AudacityTime().

Referenced by OnDatePicker_Start(), OnTimer(), and OnTimeText_Duration().

1019 {
1020  //v Use remaining disk -> record time calcs from AudacityProject::OnTimer to set range?
1023  m_pDatePickerCtrl_End->SetRange(m_DateTime_Start, wxInvalidDateTime); // No backdating.
1024  m_pDatePickerCtrl_End->Refresh();
1026 }
wxTimeSpan m_TimeSpan_Duration
NumericTextCtrl * m_pTimeTextCtrl_End
wxDateTime m_DateTime_Start
void SetValue(double newValue)
static double wxDateTime_to_AudacityTime(wxDateTime &dateTime)
wxDatePickerCtrl * m_pDatePickerCtrl_End
void TimerRecordDialog::UpdateTextBoxControls ( )
private

Definition at line 461 of file TimerRecordDialog.cpp.

References _(), m_bProjectAlreadySaved, m_fnAutoExportFile, m_fnAutoSaveFile, m_pTimerExportPathTextCtrl, and m_pTimerSavePathTextCtrl.

Referenced by OnAutoExportPathButton_Click(), and OnAutoSavePathButton_Click().

461  {
462  // Will update the text box controls
463  m_pTimerSavePathTextCtrl->SetValue(m_fnAutoSaveFile.GetFullPath());
464  m_pTimerExportPathTextCtrl->SetValue(m_fnAutoExportFile.GetFullPath());
465 
466  // MY: Ensure we still display "Current Project" if this has already been saved
468  m_pTimerSavePathTextCtrl->SetValue(_("Current Project"));
469  }
470 }
TimerRecordPathCtrl * m_pTimerExportPathTextCtrl
TimerRecordPathCtrl * m_pTimerSavePathTextCtrl
_("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
wxFileName m_fnAutoExportFile
wxFileName m_fnAutoSaveFile
ProgressResult TimerRecordDialog::WaitForStart ( )
private

Definition at line 1028 of file TimerRecordDialog.cpp.

References _(), GetDisplayDate(), kTimerInterval, m_bAutoExportEnabled, m_bAutoSaveEnabled, m_DateTime_End, m_DateTime_Start, m_pTimerAfterCompleteChoiceCtrl, m_TimeSpan_Duration, pdlgConfirmStopCancel, pdlgHideElapsedTime, pdlgHideStopButton, and Success.

Referenced by RunWaitDialog().

1029 {
1030  // MY: The Waiting For Start dialog now shows what actions will occur after recording has completed
1031  wxString sPostAction = m_pTimerAfterCompleteChoiceCtrl->GetString(m_pTimerAfterCompleteChoiceCtrl->GetSelection());
1032 
1033  // Two column layout.
1035  auto &column1 = columns[0];
1036  auto &column2 = columns[1];
1037 
1038  column1.push_back(_("Waiting to start recording at:"));
1039  column2.push_back(GetDisplayDate(m_DateTime_Start));
1040 
1041  column1.push_back(_("Recording duration:"));
1042  column2.push_back(m_TimeSpan_Duration.Format());
1043 
1044  column1.push_back(_("Scheduled to stop at:"));
1045  column2.push_back(GetDisplayDate(m_DateTime_End));
1046 
1047  column1.push_back( {} );
1048  column2.push_back( {} );
1049 
1050  column1.push_back(_("Automatic Save enabled:"));
1051  column2.push_back((m_bAutoSaveEnabled ? _("Yes") : _("No")));
1052 
1053  column1.push_back(_("Automatic Export enabled:"));
1054  column2.push_back((m_bAutoExportEnabled ? _("Yes") : _("No")));
1055 
1056  column1.push_back(_("Action after Timer Recording:"));
1057  column2.push_back(sPostAction);
1058 
1059  wxDateTime startWait_DateTime = wxDateTime::UNow();
1060  wxTimeSpan waitDuration = m_DateTime_Start - startWait_DateTime;
1061  TimerProgressDialog progress(waitDuration.GetMilliseconds().GetValue(),
1062  _("Audacity Timer Record - Waiting for Start"),
1063  columns,
1065  _("Recording will commence in:"));
1066 
1067  auto updateResult = ProgressResult::Success;
1068  bool bIsRecording = false;
1069  while (updateResult == ProgressResult::Success && !bIsRecording)
1070  {
1071  updateResult = progress.UpdateProgress();
1072  wxMilliSleep(kTimerInterval);
1073  bIsRecording = (m_DateTime_Start <= wxDateTime::UNow());
1074  }
1075  return updateResult;
1076 }
wxTimeSpan m_TimeSpan_Duration
std::vector< MessageColumn > MessageTable
wxDateTime m_DateTime_Start
const int kTimerInterval
wxChoice * m_pTimerAfterCompleteChoiceCtrl
_("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
wxString GetDisplayDate(wxDateTime &dt)

Member Data Documentation

bool TimerRecordDialog::m_bAutoExportEnabled
private
bool TimerRecordDialog::m_bAutoSaveEnabled
private
bool TimerRecordDialog::m_bProjectAlreadySaved
private
bool TimerRecordDialog::m_bProjectCleanupRequired
private

Definition at line 135 of file TimerRecordDialog.h.

Referenced by ExecutePostRecordActions().

wxDateTime TimerRecordDialog::m_DateTime_End
private
wxDateTime TimerRecordDialog::m_DateTime_Start
private
wxFileName TimerRecordDialog::m_fnAutoExportFile
private
wxFileName TimerRecordDialog::m_fnAutoSaveFile
private
int TimerRecordDialog::m_iAutoExportFilterIndex
private

Definition at line 144 of file TimerRecordDialog.h.

Referenced by ExecutePostRecordActions(), and OnAutoExportPathButton_Click().

int TimerRecordDialog::m_iAutoExportFormat
private

Definition at line 142 of file TimerRecordDialog.h.

Referenced by ExecutePostRecordActions(), and OnAutoExportPathButton_Click().

int TimerRecordDialog::m_iAutoExportSubFormat
private

Definition at line 143 of file TimerRecordDialog.h.

Referenced by ExecutePostRecordActions(), and OnAutoExportPathButton_Click().

wxDatePickerCtrl* TimerRecordDialog::m_pDatePickerCtrl_End
private
wxDatePickerCtrl* TimerRecordDialog::m_pDatePickerCtrl_Start
private
wxChoice* TimerRecordDialog::m_pTimerAfterCompleteChoiceCtrl
private
wxCheckBox* TimerRecordDialog::m_pTimerAutoExportCheckBoxCtrl
private
wxCheckBox* TimerRecordDialog::m_pTimerAutoSaveCheckBoxCtrl
private
wxButton* TimerRecordDialog::m_pTimerExportPathButtonCtrl
private

Definition at line 129 of file TimerRecordDialog.h.

Referenced by EnableDisableAutoControls(), and PopulateOrExchange().

TimerRecordPathCtrl* TimerRecordDialog::m_pTimerExportPathTextCtrl
private
wxButton* TimerRecordDialog::m_pTimerSavePathButtonCtrl
private

Definition at line 126 of file TimerRecordDialog.h.

Referenced by EnableDisableAutoControls(), and PopulateOrExchange().

TimerRecordPathCtrl* TimerRecordDialog::m_pTimerSavePathTextCtrl
private
NumericTextCtrl* TimerRecordDialog::m_pTimeTextCtrl_Duration
private

Definition at line 119 of file TimerRecordDialog.h.

Referenced by OnTimeText_Duration(), PopulateOrExchange(), and UpdateDuration().

NumericTextCtrl* TimerRecordDialog::m_pTimeTextCtrl_End
private
NumericTextCtrl* TimerRecordDialog::m_pTimeTextCtrl_Start
private
wxString TimerRecordDialog::m_sTimerAfterCompleteOption
private

Definition at line 148 of file TimerRecordDialog.h.

Referenced by PopulateOrExchange().

wxArrayString TimerRecordDialog::m_sTimerAfterCompleteOptionsArray
private

Definition at line 149 of file TimerRecordDialog.h.

Referenced by PopulateOrExchange().

wxTimer TimerRecordDialog::m_timer
private

Definition at line 121 of file TimerRecordDialog.h.

Referenced by OnOK().

wxTimeSpan TimerRecordDialog::m_TimeSpan_Duration
private

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