Audacity 3.2.0
|
Derived from ExpandingToolBar, this dialog allows editing of Tags. More...
#include <TagsEditor.h>
Public Member Functions | |
TagsEditorDialog (wxWindow *parent, const TranslatableString &title, std::vector< Tags * > tags, std::vector< wxString > names, bool editTitle, bool editTrack) | |
virtual | ~TagsEditorDialog () |
void | PopulateOrExchange (ShuttleGui &S) |
void | OnHelp (wxCommandEvent &Evt) |
bool | TransferDataToWindow () override |
bool | TransferDataFromWindow () 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 |
Static Public Member Functions | |
static AUDACITY_DLL_API bool | ShowEditDialog (Tags &tags, wxWindow *parent, const TranslatableString &title) |
static AUDACITY_DLL_API bool | EditProjectMetadata (AudacityProject &project, const TranslatableString &title, const TranslatableString &shortUndoDescription) |
Private Member Functions | |
void | PopulateGenres () |
void | SetEditors () |
void | OnNext (wxCommandEvent &) |
void | OnPrev (wxCommandEvent &) |
void | OnChange (wxGridEvent &event) |
void | OnEdit (wxCommandEvent &event) |
void | OnReset (wxCommandEvent &event) |
void | OnClear (wxCommandEvent &event) |
void | OnLoad (wxCommandEvent &event) |
void | OnSave (wxCommandEvent &event) |
void | OnSaveDefaults (wxCommandEvent &event) |
void | OnAdd (wxCommandEvent &event) |
void | OnRemove (wxCommandEvent &event) |
void | OnOk (wxCommandEvent &event) |
void | DoCancel (bool escKey) |
void | OnCancel (wxCommandEvent &event) |
void | OnKeyDown (wxKeyEvent &event) |
bool | IsWindowRectValid (const wxRect *windowRect) const |
Private Attributes | |
std::vector< Tags * > | mTags |
std::vector< wxString > | mNames |
int | mSelectedIndex {0} |
bool | mEditTitle |
bool | mEditTrack |
std::vector< std::unique_ptr< Tags > > | mEditTags |
Grid * | mGrid |
wxStaticText * | mName {} |
wxButton * | mNext {} |
wxButton * | mPrev {} |
ComboEditor * | mComboEditor |
wxGridCellStringRenderer * | mStringRenderer |
Derived from ExpandingToolBar, this dialog allows editing of Tags.
Definition at line 21 of file TagsEditor.h.
TagsEditorDialog::TagsEditorDialog | ( | wxWindow * | parent, |
const TranslatableString & | title, | ||
std::vector< Tags * > | tags, | ||
std::vector< wxString > | names, | ||
bool | editTitle, | ||
bool | editTrack | ||
) |
Definition at line 212 of file TagsEditor.cpp.
References eIsCreating, gPrefs, min(), audacity::BasicSettings::Read(), S, and wxT().
|
virtual |
Definition at line 285 of file TagsEditor.cpp.
|
private |
Definition at line 891 of file TagsEditor.cpp.
References BasicUI::FindFocus(), and mGrid.
Referenced by OnCancel(), and OnKeyDown().
|
static |
Invoke ShowEditDialog on project's tags; commit change in undo history, return true if not cancelled
Definition at line 1003 of file TagsEditor.cpp.
References ProjectHistory::Get(), Tags::Get(), GetProjectFrame(), project, ProjectHistory::PushState(), Tags::Set(), ShowEditDialog(), and title.
Referenced by anonymous_namespace{TagsEditor.cpp}::OnEditMetadata(), TimerRecordExportDialog::OnEditMetadata(), and ExportAudioDialog::OnEditMetadata().
|
private |
Definition at line 981 of file TagsEditor.cpp.
|
private |
|
private |
Definition at line 886 of file TagsEditor.cpp.
References DoCancel().
|
private |
Definition at line 524 of file TagsEditor.cpp.
References key, anonymous_namespace{TracksPrefs.cpp}::key0, and mGrid.
|
private |
Definition at line 663 of file TagsEditor.cpp.
References mEditTags, mSelectedIndex, and TransferDataToWindow().
|
private |
Definition at line 561 of file TagsEditor.cpp.
References AudacityMessageBox(), FileNames::DataDir(), eIsCreating, fn, mEditTags, mGrid, mSelectedIndex, PopulateGenres(), S, wxDialogWrapper::SetName(), wxT(), and XO().
void TagsEditorDialog::OnHelp | ( | wxCommandEvent & | Evt | ) |
Definition at line 392 of file TagsEditor.cpp.
References HelpSystem::ShowHelp().
|
private |
Definition at line 912 of file TagsEditor.cpp.
References DoCancel().
|
private |
Definition at line 670 of file TagsEditor.cpp.
References AudacityMessageBox(), FileNames::DataDir(), fn, XMLFileReader::GetErrorStr(), mEditTags, mEditTitle, mEditTrack, mSelectedIndex, XMLFileReader::Parse(), SelectFile(), Tags::SetTag(), TAG_TITLE, TAG_TRACK, title, TransferDataToWindow(), wxT(), FileNames::XMLFiles, and XO().
|
private |
Definition at line 936 of file TagsEditor.cpp.
References mEditTags, mSelectedIndex, TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 856 of file TagsEditor.cpp.
References audacity::BasicSettings::Flush(), gPrefs, mEditTags, mGrid, mTags, TransferDataFromWindow(), audacity::BasicSettings::Write(), and wxT().
|
private |
Definition at line 946 of file TagsEditor.cpp.
References mSelectedIndex, TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 835 of file TagsEditor.cpp.
References LABEL_TITLE, LABEL_TRACK, mEditTitle, mEditTrack, mGrid, and STATICCNT.
|
private |
Definition at line 616 of file TagsEditor.cpp.
References AudacityMessageBox(), FileNames::DataDir(), fn, mEditTags, mSelectedIndex, PopulateGenres(), wxT(), and XO().
|
private |
Definition at line 727 of file TagsEditor.cpp.
References FileNames::DataDir(), fn, GuardedCall(), mEditTags, mEditTitle, mEditTrack, mSelectedIndex, SelectFile(), TAG_TITLE, TAG_TRACK, title, TransferDataFromWindow(), wxT(), FileNames::XMLFiles, and XO().
|
private |
Definition at line 788 of file TagsEditor.cpp.
References audacity::BasicSettings::DeleteGroup(), audacity::BasicSettings::Flush(), gPrefs, mEditTags, mEditTitle, mEditTrack, mSelectedIndex, TAG_TITLE, TAG_TRACK, title, TransferDataFromWindow(), audacity::BasicSettings::Write(), and wxT().
|
private |
Definition at line 956 of file TagsEditor.cpp.
References mEditTags, mGrid, mSelectedIndex, and wxT().
Referenced by OnEdit(), and OnReset().
void TagsEditorDialog::PopulateOrExchange | ( | ShuttleGui & | S | ) |
Definition at line 298 of file TagsEditor.cpp.
References _, AddID, ClearID, eCancelButton, EditID, eHelpButton, FormatterContext::EmptyContext(), eOkButton, LoadID, mComboEditor, mGrid, mName, mNext, mPrev, mStringRenderer, mTags, names, NextID, PrevID, RemoveID, ResetID, S, safenew, SaveDefaultsID, SaveID, TranslatableString::Translation(), wxT(), XO(), and XXO().
|
private |
Definition at line 920 of file TagsEditor.cpp.
References label, LABEL_GENRE, mGrid, and wxT().
Referenced by TransferDataToWindow().
|
static |
Definition at line 30 of file TagsEditor.cpp.
References title.
Referenced by EditProjectMetadata().
|
override |
Definition at line 397 of file TagsEditor.cpp.
References LABEL_ALBUM, LABEL_ARTIST, LABEL_COMMENTS, LABEL_GENRE, LABEL_TITLE, LABEL_TRACK, LABEL_YEAR, mEditTags, mGrid, mSelectedIndex, TAG_ALBUM, TAG_ARTIST, TAG_COMMENTS, TAG_GENRE, TAG_TITLE, TAG_TRACK, and TAG_YEAR.
Referenced by OnNext(), OnOk(), OnPrev(), OnSave(), and OnSaveDefaults().
|
override |
Definition at line 453 of file TagsEditor.cpp.
References label, LABEL_TITLE, LABEL_TRACK, labelmap, mEditTags, mEditTitle, mEditTrack, mGrid, mName, mNames, mNext, mPrev, mSelectedIndex, SetEditors(), STATICCNT, and TranslatableString::Translation().
Referenced by OnClear(), OnLoad(), OnNext(), and OnPrev().
|
private |
Definition at line 96 of file TagsEditor.h.
Referenced by PopulateOrExchange().
|
private |
Definition at line 90 of file TagsEditor.h.
Referenced by OnClear(), OnEdit(), OnLoad(), OnNext(), OnOk(), OnReset(), OnSave(), OnSaveDefaults(), PopulateGenres(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 87 of file TagsEditor.h.
Referenced by OnLoad(), OnRemove(), OnSave(), OnSaveDefaults(), and TransferDataToWindow().
|
private |
Definition at line 88 of file TagsEditor.h.
Referenced by OnLoad(), OnRemove(), OnSave(), OnSaveDefaults(), and TransferDataToWindow().
|
private |
Definition at line 92 of file TagsEditor.h.
Referenced by DoCancel(), OnAdd(), OnChange(), OnEdit(), OnOk(), OnRemove(), PopulateGenres(), PopulateOrExchange(), SetEditors(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 93 of file TagsEditor.h.
Referenced by PopulateOrExchange(), and TransferDataToWindow().
|
private |
Definition at line 84 of file TagsEditor.h.
Referenced by TransferDataToWindow().
|
private |
Definition at line 94 of file TagsEditor.h.
Referenced by PopulateOrExchange(), and TransferDataToWindow().
|
private |
Definition at line 95 of file TagsEditor.h.
Referenced by PopulateOrExchange(), and TransferDataToWindow().
|
private |
Definition at line 85 of file TagsEditor.h.
Referenced by OnClear(), OnEdit(), OnLoad(), OnNext(), OnPrev(), OnReset(), OnSave(), OnSaveDefaults(), PopulateGenres(), TransferDataFromWindow(), and TransferDataToWindow().
|
private |
Definition at line 97 of file TagsEditor.h.
Referenced by PopulateOrExchange().
|
private |
Definition at line 83 of file TagsEditor.h.
Referenced by OnOk(), and PopulateOrExchange().