Audacity 3.2.0
TimerRecordDialog.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 TimerRecordDialog.h
6
7 Copyright 2006 by Vaughan Johnson
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14**********************************************************************/
15
16#ifndef __AUDACITY_TIMERRECORD_DIALOG__
17#define __AUDACITY_TIMERRECORD_DIALOG__
18
19#include <wx/textctrl.h> // to inherit
20#include <wx/timer.h> // member variable
21#include "export/Export.h"
22
23class wxCheckBox;
24class wxChoice;
25class wxDateEvent;
26class wxDatePickerCtrl;
27class wxTimerEvent;
28
29class NumericTextCtrl;
30class ShuttleGui;
32
34 TR_ACTION_NOTHING = 0x00000000,
35 TR_ACTION_SAVED = 0x00000001,
36 TR_ACTION_EXPORTED = 0x00000002
37};
38
39enum {
43
46
47#ifdef __WINDOWS__
48 POST_TIMER_RECORD_RESTART,
49 POST_TIMER_RECORD_SHUTDOWN
50#endif
51};
52
53class AudacityProject;
54
56{
57public:
59
61 wxWindow* parent, AudacityProject &project, bool bAlreadySaved);
63
64 void OnTimer(wxTimerEvent& event);
66 int RunWaitDialog();
67
68private:
69 void OnDatePicker_Start(wxDateEvent& event);
70 void OnTimeText_Start(wxCommandEvent& event);
71
72 void OnDatePicker_End(wxDateEvent& event);
73 void OnTimeText_End(wxCommandEvent& event);
74
75 void OnTimeText_Duration(wxCommandEvent & event);
76
77 void OnOK(wxCommandEvent& event);
78 void OnHelpButtonClick(wxCommandEvent& event);
79
80 TranslatableString GetDisplayDate(wxDateTime & dt);
82
83 bool TransferDataFromWindow() override;
84 // no TransferDataFromWindow() because ??
85
86 void UpdateDuration(); // Update m_TimeSpan_Duration and ctrl based on m_DateTime_Start and m_DateTime_End.
87 void UpdateEnd(); // Update m_DateTime_End and ctrls based on m_DateTime_Start and m_TimeSpan_Duration.
89
90 // Timer Recording Automation Control Events
91 void OnAutoSavePathButton_Click(wxCommandEvent& event);
92 void OnAutoExportPathButton_Click(wxCommandEvent& event);
93 void OnAutoSaveCheckBox_Change(wxCommandEvent& event);
94 void OnAutoExportCheckBox_Change(wxCommandEvent& event);
95 // Timer Recording Automation Routines
96 void EnableDisableAutoControls(bool bEnable, int iControlGoup);
98
99 // Add Path Controls to Form
101 wxWindow *wParent, const int iID,
102 const TranslatableString &sCaption, const TranslatableString &sValue);
103
104 int ExecutePostRecordActions(bool bWasStopped);
105 ProgressResult PreActionDelay(int iActionIndex, TimerRecordCompletedActions eCompletedActions);
106
107private:
109
111 wxDateTime m_DateTime_End;
113
114 // controls
115 wxDatePickerCtrl* m_pDatePickerCtrl_Start;
117
118 wxDatePickerCtrl* m_pDatePickerCtrl_End;
120
122
123 wxTimer m_timer;
124
125 // Controls for Auto Save/Export
132
133 // After Timer Record Options Choice
135
136 // After Timer Record do we need to clean up?
138
139 // Variables for the Auto Save/Export
148
149 DECLARE_EVENT_TABLE()
150};
151
152#endif
@ POST_TIMER_RECORD_CLOSE
@ POST_TIMER_RECORD_CANCEL
@ POST_TIMER_RECORD_CANCEL_WAIT
@ POST_TIMER_RECORD_NOTHING
@ POST_TIMER_RECORD_STOPPED
TimerRecordCompletedActions
@ TR_ACTION_NOTHING
@ TR_ACTION_EXPORTED
@ TR_ACTION_SAVED
#define S(N)
Definition: ToChars.cpp:64
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
Dialog for Timer Record, i.e., timed or long recording.
void OnAutoSaveCheckBox_Change(wxCommandEvent &event)
wxDatePickerCtrl * m_pDatePickerCtrl_Start
NumericTextCtrl * m_pTimeTextCtrl_Duration
void OnHelpButtonClick(wxCommandEvent &event)
void OnTimeText_Duration(wxCommandEvent &event)
NumericTextCtrl * m_pTimeTextCtrl_End
AudacityProject & mProject
TranslatableString GetDisplayDate(wxDateTime &dt)
wxButton * m_pTimerSavePathButtonCtrl
void EnableDisableAutoControls(bool bEnable, int iControlGoup)
wxCheckBox * m_pTimerAutoSaveCheckBoxCtrl
int ExecutePostRecordActions(bool bWasStopped)
void OnOK(wxCommandEvent &event)
void PopulateOrExchange(ShuttleGui &S)
NumericTextCtrl * m_pTimeTextCtrl_Start
wxTextCtrlWrapper * m_pTimerExportPathTextCtrl
wxDateTime m_DateTime_Start
TimerRecordDialog(wxWindow *parent, AudacityProject &project, bool bAlreadySaved)
void OnAutoExportPathButton_Click(wxCommandEvent &event)
void OnAutoExportCheckBox_Change(wxCommandEvent &event)
bool TransferDataFromWindow() override
wxChoice * m_pTimerAfterCompleteChoiceCtrl
wxFileName m_fnAutoSaveFile
void OnDatePicker_End(wxDateEvent &event)
ProgressResult WaitForStart()
wxTextCtrlWrapper * NewPathControl(wxWindow *wParent, const int iID, const TranslatableString &sCaption, const TranslatableString &sValue)
wxCheckBox * m_pTimerAutoExportCheckBoxCtrl
wxFileName m_fnAutoExportFile
void OnTimeText_Start(wxCommandEvent &event)
wxTimeSpan m_TimeSpan_Duration
wxDatePickerCtrl * m_pDatePickerCtrl_End
void OnAutoSavePathButton_Click(wxCommandEvent &event)
wxTextCtrlWrapper * m_pTimerSavePathTextCtrl
void OnTimeText_End(wxCommandEvent &event)
wxButton * m_pTimerExportPathButtonCtrl
void OnTimer(wxTimerEvent &event)
int RunWaitDialog()
Runs the wait for start dialog. Returns false if the user clicks stop.
void OnDatePicker_Start(wxDateEvent &event)
ProgressResult PreActionDelay(int iActionIndex, TimerRecordCompletedActions eCompletedActions)
Holds a msgid for the translation catalog; may also bind format arguments.
ProgressResult
Definition: BasicUI.h:145