Audacity  2.2.2
Classes | Macros | Enumerations | Functions | Variables
Tags.cpp File Reference
#include "Audacity.h"
#include "Tags.h"
#include <wx/wxprec.h>
#include <wx/window.h>
#include "FileNames.h"
#include "Internat.h"
#include "Prefs.h"
#include "ShuttleGui.h"
#include "TranslatableStringArray.h"
#include "widgets/Grid.h"
#include "widgets/ErrorDialog.h"
#include "xml/XMLFileReader.h"
#include <wx/button.h>
#include <wx/choice.h>
#include <wx/filedlg.h>
#include <wx/filename.h>
#include <wx/intl.h>
#include <wx/listctrl.h>
#include <wx/notebook.h>
#include <wx/radiobut.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/textctrl.h>
#include <wx/textfile.h>
#include <wx/combobox.h>
#include <wx/display.h>

Go to the source code of this file.

Classes

class  ComboEditor
 

Macros

#define LABEL_ARTIST   XO("Artist Name")
 
#define LABEL_TITLE   XO("Track Title")
 
#define LABEL_ALBUM   XO("Album Title")
 
#define LABEL_TRACK   XO("Track Number")
 
#define LABEL_YEAR   XO("Year")
 
#define LABEL_GENRE   XO("Genre")
 
#define LABEL_COMMENTS   XO("Comments")
 
#define STATICCNT   WXSIZEOF(labelmap)
 

Enumerations

enum  {
  ClearID = 10000, EditID, ResetID, LoadID,
  SaveID, SaveDefaultsID, AddID, RemoveID
}
 

Functions

bool operator== (const Tags &lhs, const Tags &rhs)
 
static wxArrayString names ()
 

Variables

static const wxChar * DefaultGenres []
 
struct {
   wxString   label
 
   wxString   name
 
labelmap []
 

Macro Definition Documentation

#define LABEL_ALBUM   XO("Album Title")

Definition at line 691 of file Tags.cpp.

Referenced by names(), and TagsEditor::TransferDataFromWindow().

#define LABEL_ARTIST   XO("Artist Name")

Definition at line 689 of file Tags.cpp.

Referenced by names(), and TagsEditor::TransferDataFromWindow().

#define LABEL_COMMENTS   XO("Comments")

Definition at line 695 of file Tags.cpp.

Referenced by names(), and TagsEditor::TransferDataFromWindow().

#define LABEL_GENRE   XO("Genre")

Definition at line 694 of file Tags.cpp.

Referenced by names(), TagsEditor::SetEditors(), and TagsEditor::TransferDataFromWindow().

#define LABEL_TITLE   XO("Track Title")
#define LABEL_TRACK   XO("Track Number")
#define LABEL_YEAR   XO("Year")

Definition at line 693 of file Tags.cpp.

Referenced by names(), and TagsEditor::TransferDataFromWindow().

#define STATICCNT   WXSIZEOF(labelmap)

Definition at line 741 of file Tags.cpp.

Referenced by TagsEditor::OnRemove(), and TagsEditor::TransferDataToWindow().

Enumeration Type Documentation

anonymous enum
Enumerator
ClearID 
EditID 
ResetID 
LoadID 
SaveID 
SaveDefaultsID 
AddID 
RemoveID 

Definition at line 743 of file Tags.cpp.

743  {
744  ClearID = 10000,
745  EditID,
746  ResetID,
747  LoadID,
748  SaveID,
750  AddID,
751  RemoveID
752 };
Definition: Tags.cpp:750
Definition: Tags.cpp:748
Definition: Tags.cpp:747
Definition: Tags.cpp:745

Function Documentation

static wxArrayString names ( )
static

Definition at line 697 of file Tags.cpp.

References LABEL_ALBUM, LABEL_ARTIST, LABEL_COMMENTS, LABEL_GENRE, LABEL_TITLE, LABEL_TRACK, LABEL_YEAR, name, and TranslatableArray< ArrayType >::Populate().

Referenced by BuiltinEffectsModule::AutoRegisterPlugins(), BuiltinCommandsModule::AutoRegisterPlugins(), AudacityProject::CreateMenusAndCommands(), defaultLabel(), PluginManager::DropFile(), EffectReverb::GetFactoryPresets(), EffectDistortion::GetFactoryPresets(), MacroCommands::GetNames(), ExportMP3Options::GetNames(), BuiltinEffectsModule::Initialize(), BuiltinCommandsModule::Initialize(), MacroCommands::MacroCommands(), ApplyMacroDialog::PopulateMacros(), AudacityProject::PopulateMacrosMenu(), TagsEditor::PopulateOrExchange(), and CommandManager::SetCommandFlags().

698 {
699  static wxString theNames[] =
700  {
701  LABEL_ARTIST,
702  LABEL_TITLE,
703  LABEL_ALBUM,
704  LABEL_TRACK,
705  LABEL_YEAR,
706  LABEL_GENRE,
708  };
709 
710  class NamesArray final : public TranslatableStringArray
711  {
712  void Populate() override
713  {
714  for (auto &name : theNames)
715  mContents.push_back( wxGetTranslation( name ) );
716  }
717  };
718 
719  static NamesArray theArray;
720 
721  // Yes, return array by value
722  return theArray.Get();
723 }
#define LABEL_TRACK
Definition: Tags.cpp:692
#define LABEL_TITLE
Definition: Tags.cpp:690
#define LABEL_ALBUM
Definition: Tags.cpp:691
#define LABEL_YEAR
Definition: Tags.cpp:693
#define LABEL_COMMENTS
Definition: Tags.cpp:695
#define LABEL_GENRE
Definition: Tags.cpp:694
wxString name
Definition: Tags.cpp:728
virtual void Populate()=0
#define LABEL_ARTIST
Definition: Tags.cpp:689
bool operator== ( const Tags lhs,
const Tags rhs 
)

Definition at line 324 of file Tags.cpp.

References Tags::mEditTitle, Tags::mEditTrackNumber, Tags::mGenres, Tags::mMap, and Tags::mXref.

325 {
326  if (!EqualMaps(lhs.mXref, rhs.mXref))
327  return false;
328 
329  if (!EqualMaps(lhs.mMap, rhs.mMap))
330  return false;
331 
332  return
333  lhs.mGenres == rhs.mGenres
334  &&
335  lhs.mEditTitle == rhs.mEditTitle
336  &&
338  ;
339 }
TagMap mXref
Definition: Tags.h:117
bool mEditTrackNumber
Definition: Tags.h:123
wxArrayString mGenres
Definition: Tags.h:120
bool mEditTitle
Definition: Tags.h:122
TagMap mMap
Definition: Tags.h:118

Variable Documentation

const wxChar* DefaultGenres[]
static

Definition at line 69 of file Tags.cpp.

Referenced by Tags::GetGenre(), and Tags::LoadDefaultGenres().

wxString label
const { ... } labelmap[]
Initial value:
=
{
}
#define TAG_TRACK
Definition: Tags.h:63
#define TAG_TITLE
Definition: Tags.h:60
#define LABEL_TRACK
Definition: Tags.cpp:692
#define TAG_ARTIST
Definition: Tags.h:61
#define LABEL_TITLE
Definition: Tags.cpp:690
#define LABEL_ALBUM
Definition: Tags.cpp:691
#define LABEL_YEAR
Definition: Tags.cpp:693
#define LABEL_COMMENTS
Definition: Tags.cpp:695
#define LABEL_GENRE
Definition: Tags.cpp:694
#define TAG_COMMENTS
Definition: Tags.h:66
#define TAG_GENRE
Definition: Tags.h:65
#define LABEL_ARTIST
Definition: Tags.cpp:689
#define TAG_ALBUM
Definition: Tags.h:62
#define TAG_YEAR
Definition: Tags.h:64

Referenced by TagsEditor::TransferDataToWindow().

wxString name

Definition at line 728 of file Tags.cpp.

Referenced by Tags::GetTag(), Tags::HasTag(), Tags::LoadDefaults(), names(), and Tags::SetTag().