Audacity 3.2.0
|
Dialog for editing labels. More...
#include <LabelDialog.h>
Public Member Functions | |
LabelDialog (wxWindow *parent, AudacityProject &project, TrackList *tracks, LabelTrack *selectedTrack, int index, ViewInfo &viewinfo, const NumericFormatID &format, const NumericFormatID &freqFormat) | |
~LabelDialog () | |
bool | Show (bool show=true) override |
Public Member Functions inherited from wxDialogWrapper | |
wxDialogWrapper () | |
wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) | |
bool | Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) |
void | SetTitle (const TranslatableString &title) |
void | SetLabel (const TranslatableString &title) |
void | SetName (const TranslatableString &title) |
void | SetName () |
Public Member Functions inherited from wxTabTraversalWrapper< wxDialog > | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Private Member Functions | |
void | Populate () |
Creates the dialog and its contents. More... | |
void | PopulateOrExchange (ShuttleGui &S) |
void | PopulateLabels () |
void | OnHelp (wxCommandEvent &event) |
ManualPageID | GetHelpPageName () |
bool | TransferDataToWindow () override |
bool | TransferDataFromWindow () override |
bool | Validate () override |
void | FindAllLabels () |
void | AddLabels (const LabelTrack *t) |
void | FindInitialRow () |
wxString | TrackName (int &index, const wxString &dflt=_("Label Track")) |
void | OnUpdate (wxCommandEvent &event) |
void | OnFreqUpdate (wxCommandEvent &event) |
void | OnInsert (wxCommandEvent &event) |
void | OnRemove (wxCommandEvent &event) |
void | OnImport (wxCommandEvent &event) |
void | OnExport (wxCommandEvent &event) |
void | OnSelectCell (wxGridEvent &event) |
void | OnCellChange (wxGridEvent &event) |
void | OnChangeTrack (wxGridEvent &event, int row, RowData *rd) |
void | OnChangeLabel (wxGridEvent &event, int row, RowData *rd) |
void | OnChangeStime (wxGridEvent &event, int row, RowData *rd) |
void | OnChangeEtime (wxGridEvent &event, int row, RowData *rd) |
void | OnChangeLfreq (wxGridEvent &event, int row, RowData *rd) |
void | OnChangeHfreq (wxGridEvent &event, int row, RowData *rd) |
void | OnOK (wxCommandEvent &event) |
void | OnCancel (wxCommandEvent &event) |
void | ReadSize () |
void | WriteSize () |
Private Attributes | |
AudacityProject & | mProject |
Grid * | mGrid |
ChoiceEditor * | mChoiceEditor |
NumericEditor * | mTimeEditor |
NumericEditor * | mFrequencyEditor |
RowDataArray | mData |
TrackList * | mTracks |
LabelTrack * | mSelectedTrack {} |
int | mIndex { -1 } |
ViewInfo * | mViewInfo |
wxArrayString | mTrackNames |
NumericFormatID | mFormat |
NumericFormatID | mFreqFormat |
int | mInitialRow |
Dialog for editing labels.
Definition at line 35 of file LabelDialog.h.
LabelDialog::LabelDialog | ( | wxWindow * | parent, |
AudacityProject & | project, | ||
TrackList * | tracks, | ||
LabelTrack * | selectedTrack, | ||
int | index, | ||
ViewInfo & | viewinfo, | ||
const NumericFormatID & | format, | ||
const NumericFormatID & | freqFormat | ||
) |
LabelDialog::~LabelDialog | ( | ) |
Definition at line 120 of file LabelDialog.cpp.
|
private |
Definition at line 467 of file LabelDialog.cpp.
References LabelTrack::GetLabel(), Track::GetName(), LabelTrack::GetNumLabels(), mData, mIndex, mSelectedTrack, LabelStruct::selectedRegion, LabelStruct::title, and TrackName().
Referenced by FindAllLabels(), and OnImport().
|
private |
Definition at line 452 of file LabelDialog.cpp.
References AddLabels(), TrackList::Any(), FindInitialRow(), mData, mTracks, and OnInsert().
Referenced by PopulateLabels().
|
private |
Definition at line 487 of file LabelDialog.cpp.
References mData, mInitialRow, mViewInfo, ViewInfo::selectedRegion, and NotifyingSelectedRegion::t0().
Referenced by FindAllLabels().
|
inlineprivate |
Definition at line 63 of file LabelDialog.h.
Referenced by OnHelp().
|
private |
Definition at line 939 of file LabelDialog.cpp.
References mGrid, and WriteSize().
|
private |
Definition at line 762 of file LabelDialog.cpp.
References Col_Etime, Col_Hfreq, Col_Label, Col_Lfreq, Col_Stime, Col_Track, mData, OnChangeEtime(), OnChangeHfreq(), OnChangeLabel(), OnChangeLfreq(), OnChangeStime(), and OnChangeTrack().
|
private |
Definition at line 867 of file LabelDialog.cpp.
References Col_Etime, Col_Stime, mGrid, RowData::selectedRegion, SelectedRegion::setT1(), SelectedRegion::t0(), and wxT().
Referenced by OnCellChange().
|
private |
Definition at line 891 of file LabelDialog.cpp.
References Col_Hfreq, Col_Lfreq, SelectedRegion::f0(), mGrid, RowData::selectedRegion, SelectedRegion::setF1(), and wxT().
Referenced by OnCellChange().
|
private |
Definition at line 847 of file LabelDialog.cpp.
References Col_Label, mGrid, and RowData::title.
Referenced by OnCellChange().
|
private |
Definition at line 879 of file LabelDialog.cpp.
References Col_Hfreq, Col_Lfreq, SelectedRegion::f1(), mGrid, RowData::selectedRegion, SelectedRegion::setF0(), and wxT().
Referenced by OnCellChange().
|
private |
Definition at line 855 of file LabelDialog.cpp.
References Col_Etime, Col_Stime, mGrid, RowData::selectedRegion, SelectedRegion::setT0(), SelectedRegion::t1(), and wxT().
Referenced by OnCellChange().
|
private |
Definition at line 813 of file LabelDialog.cpp.
References Col_Track, RowData::index, make_iterator_range(), mGrid, mTrackNames, TrackName(), TransferDataToWindow(), and XO().
Referenced by OnCellChange().
|
private |
Definition at line 669 of file LabelDialog.cpp.
References AudacityMessageBox(), anonymous_namespace{ExportPCM.cpp}::format, LabelTrack::FormatForFileName(), mData, mTrackNames, RowData::selectedRegion, SelectFile(), LabelTrack::SubripFiles, FileNames::TextFiles, RowData::title, LabelTrack::WebVTTFiles, wxT(), and XO().
|
private |
Definition at line 538 of file LabelDialog.cpp.
References ComponentInterfaceSymbol::Internal(), NumericConverterFormats::Lookup(), mFreqFormat, mProject, NumericConverterType_FREQUENCY(), FormatterContext::ProjectContext(), and TransferDataToWindow().
|
private |
Definition at line 284 of file LabelDialog.cpp.
References GetHelpPageName(), and HelpSystem::ShowHelp().
|
private |
Definition at line 627 of file LabelDialog.cpp.
References AddLabels(), FileNames::AllFiles, AudacityMessageBox(), anonymous_namespace{ExportPCM.cpp}::format, LabelTrack::FormatForFileName(), SelectFile(), LabelTrack::SubripFiles, FileNames::TextFiles, TransferDataToWindow(), wxT(), and XO().
|
private |
Definition at line 549 of file LabelDialog.cpp.
References Col_Label, Col_Track, ID_INSERTA, make_iterator_range(), mData, mGrid, mTrackNames, TransferDataToWindow(), and wxT().
Referenced by FindAllLabels().
|
private |
Definition at line 922 of file LabelDialog.cpp.
References mGrid, TransferDataFromWindow(), Validate(), and WriteSize().
|
private |
Definition at line 589 of file LabelDialog.cpp.
References BasicUI::FindFocus(), mData, mGrid, and TransferDataToWindow().
|
private |
Definition at line 746 of file LabelDialog.cpp.
References Viewport::Get(), mData, mProject, mTracks, mViewInfo, Viewport::Redraw(), ViewInfo::selectedRegion, and RowData::selectedRegion.
|
private |
Definition at line 527 of file LabelDialog.cpp.
References ComponentInterfaceSymbol::Internal(), NumericConverterFormats::Lookup(), mFormat, mProject, NumericConverterType_TIME(), FormatterContext::ProjectContext(), and TransferDataToWindow().
|
private |
Creates the dialog and its contents.
Definition at line 211 of file LabelDialog.cpp.
References eIsCreating, ID_IMPORT, mGrid, PopulateLabels(), PopulateOrExchange(), ReadSize(), and S.
|
private |
Definition at line 124 of file LabelDialog.cpp.
References _, Col_Etime, Col_Hfreq, Col_Label, Col_Lfreq, Col_Max, Col_Stime, Col_Track, FindAllLabels(), GRID_VALUE_CHOICE, GRID_VALUE_FREQUENCY, GRID_VALUE_TIME, label, mChoiceEditor, mFrequencyEditor, mGrid, mTimeEditor, mTrackNames, safenew, TransferDataToWindow(), TranslatableString::Translation(), and XO().
Referenced by Populate().
|
private |
Definition at line 251 of file LabelDialog.cpp.
References eCancelButton, eHelpButton, eOkButton, ID_EXPORT, ID_IMPORT, ID_INSERTB, ID_REMOVE, mGrid, mProject, FormatterContext::ProjectContext(), S, safenew, XO(), and XXO().
Referenced by Populate().
|
private |
Definition at line 903 of file LabelDialog.cpp.
References gPrefs, audacity::BasicSettings::Read(), and wxT().
Referenced by Populate().
|
override |
Definition at line 351 of file LabelDialog.cpp.
References Col_Label, mGrid, mInitialRow, and ExportProgressUI::Show().
Definition at line 440 of file LabelDialog.cpp.
References mTrackNames, and wxT().
Referenced by AddLabels(), OnChangeTrack(), and TransferDataToWindow().
|
overrideprivate |
Definition at line 370 of file LabelDialog.cpp.
References TrackList::Add(), TrackList::Any(), LabelTrackView::Get(), RowData::index, mData, mIndex, mSelectedTrack, mTrackNames, mTracks, name, LabelTrackView::ResetTextSelection(), RowData::selectedRegion, RowData::title, and wxT().
Referenced by OnOK().
|
overrideprivate |
Definition at line 291 of file LabelDialog.cpp.
References Col_Etime, Col_Hfreq, Col_Label, Col_Lfreq, Col_Stime, Col_Track, SelectedRegion::f0(), SelectedRegion::f1(), RowData::index, mChoiceEditor, mData, mFormat, mFreqFormat, mFrequencyEditor, mGrid, mTimeEditor, mTrackNames, RowData::selectedRegion, ChoiceEditor::SetChoices(), NumericEditor::SetFormat(), SelectedRegion::t0(), SelectedRegion::t1(), RowData::title, TrackName(), and wxT().
Referenced by OnChangeTrack(), OnFreqUpdate(), OnImport(), OnInsert(), OnRemove(), OnUpdate(), and PopulateLabels().
|
overrideprivate |
|
private |
Definition at line 915 of file LabelDialog.cpp.
References audacity::BasicSettings::Flush(), gPrefs, audacity::BasicSettings::Write(), and wxT().
Referenced by OnCancel(), and OnOK().
|
private |
Definition at line 98 of file LabelDialog.h.
Referenced by PopulateLabels(), and TransferDataToWindow().
|
private |
Definition at line 102 of file LabelDialog.h.
Referenced by AddLabels(), FindAllLabels(), FindInitialRow(), OnCellChange(), OnExport(), OnInsert(), OnRemove(), OnSelectCell(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 109 of file LabelDialog.h.
Referenced by OnUpdate(), and TransferDataToWindow().
|
private |
Definition at line 109 of file LabelDialog.h.
Referenced by OnFreqUpdate(), and TransferDataToWindow().
|
private |
Definition at line 100 of file LabelDialog.h.
Referenced by PopulateLabels(), and TransferDataToWindow().
|
private |
Definition at line 97 of file LabelDialog.h.
Referenced by OnCancel(), OnChangeEtime(), OnChangeHfreq(), OnChangeLabel(), OnChangeLfreq(), OnChangeStime(), OnChangeTrack(), OnInsert(), OnOK(), OnRemove(), Populate(), PopulateLabels(), PopulateOrExchange(), Show(), TransferDataToWindow(), and Validate().
|
private |
Definition at line 106 of file LabelDialog.h.
Referenced by AddLabels(), and TransferDataFromWindow().
|
private |
Definition at line 111 of file LabelDialog.h.
Referenced by FindInitialRow(), and Show().
|
private |
Definition at line 95 of file LabelDialog.h.
Referenced by OnFreqUpdate(), OnSelectCell(), OnUpdate(), and PopulateOrExchange().
|
private |
Definition at line 105 of file LabelDialog.h.
Referenced by AddLabels(), and TransferDataFromWindow().
|
private |
Definition at line 99 of file LabelDialog.h.
Referenced by PopulateLabels(), and TransferDataToWindow().
|
private |
Definition at line 108 of file LabelDialog.h.
Referenced by OnChangeTrack(), OnExport(), OnInsert(), PopulateLabels(), TrackName(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 104 of file LabelDialog.h.
Referenced by FindAllLabels(), OnSelectCell(), and TransferDataFromWindow().
|
private |
Definition at line 107 of file LabelDialog.h.
Referenced by FindInitialRow(), and OnSelectCell().