Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ProjectNumericFormats Class Referencefinal

#include <ProjectNumericFormats.h>

Inheritance diagram for ProjectNumericFormats:
Collaboration diagram for ProjectNumericFormats:

Public Member Functions

 ProjectNumericFormats (const AudacityProject &project)
 ~ProjectNumericFormats () override
void SetSelectionFormat (const NumericFormatID &format)
NumericFormatID GetSelectionFormat () const
void SetAudioTimeFormat (const NumericFormatID &format)
NumericFormatID GetAudioTimeFormat () const
void SetFrequencySelectionFormatName (const NumericFormatID &format)
NumericFormatID GetFrequencySelectionFormatName () const
void SetBandwidthSelectionFormatName (const NumericFormatID &format)
NumericFormatID GetBandwidthSelectionFormatName () const
NumericFormatSymbol LookupFormat (const NumericConverterType &type, const wxString &identifier)
- Public Member Functions inherited from ClientData::Base
virtual ~Base ()
- Public Member Functions inherited from Observer::Publisher< ProjectNumericFormatsEvent >
 Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={})
 Constructor supporting type-erased custom allocation/deletion. More...
 Publisher (Publisher &&)=default
Publisheroperator= (Publisher &&)=default
Subscription Subscribe (Callback callback)
 Connect a callback to the Publisher; later-connected are called earlier. More...
Subscription Subscribe (Object &obj, Return(Object::*callback)(Args...))
 Overload of Subscribe takes an object and pointer-to-member-function. More...

Static Public Member Functions

static ProjectNumericFormatsGet (AudacityProject &project)
static const ProjectNumericFormatsGet (const AudacityProject &project)

Private Attributes

const AudacityProjectmProject
NumericFormatID mSelectionFormat
NumericFormatID mFrequencySelectionFormatName
NumericFormatID mBandwidthSelectionFormatName
NumericFormatID mAudioTimeFormat

Additional Inherited Members

- Public Types inherited from Observer::Publisher< ProjectNumericFormatsEvent >
using message_type = ProjectNumericFormatsEvent
using CallbackReturn = std::conditional_t< true, void, bool >
using Callback = std::function< CallbackReturn(const ProjectNumericFormatsEvent &) >
 Type of functions that can be connected to the Publisher. More...
- Static Public Attributes inherited from Observer::Publisher< ProjectNumericFormatsEvent >
static constexpr bool notifies_all
- Protected Member Functions inherited from Observer::Publisher< ProjectNumericFormatsEvent >
CallbackReturn Publish (const ProjectNumericFormatsEvent &message)
 Send a message to connected callbacks. More...

Detailed Description

Definition at line 31 of file ProjectNumericFormats.h.

Constructor & Destructor Documentation

◆ ProjectNumericFormats()

ProjectNumericFormats::ProjectNumericFormats ( const AudacityProject project)

Definition at line 39 of file ProjectNumericFormats.cpp.

40 : mProject { project }
42 gPrefs->Read(wxT("/SelectionFormat"), wxT(""))
43 }
45 gPrefs->Read(wxT("/FrequencySelectionFormatName"), wxT(""))
46 }
48 gPrefs->Read(wxT("/BandwidthSelectionFormatName"), wxT(""))
49 }
51 gPrefs->Read(wxT("/AudioTimeFormat"), wxT("hh:mm:ss"))
52 }
audacity::BasicSettings * gPrefs
Definition: Prefs.cpp:68
const auto project
const AudacityProject & mProject
NumericFormatID mBandwidthSelectionFormatName
NumericFormatID mSelectionFormat
NumericFormatID mAudioTimeFormat
NumericFormatID mFrequencySelectionFormatName
virtual bool Read(const wxString &key, bool *value) const =0

◆ ~ProjectNumericFormats()

ProjectNumericFormats::~ProjectNumericFormats ( )

Member Function Documentation

◆ Get() [1/2]

ProjectNumericFormats & ProjectNumericFormats::Get ( AudacityProject project)

◆ Get() [2/2]

const ProjectNumericFormats & ProjectNumericFormats::Get ( const AudacityProject project)

Definition at line 33 of file ProjectNumericFormats.cpp.

36 return Get(const_cast<AudacityProject &>(project));
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static ProjectNumericFormats & Get(AudacityProject &project)

References Get(), and project.

Here is the call graph for this function:

◆ GetAudioTimeFormat()

NumericFormatID ProjectNumericFormats::GetAudioTimeFormat ( ) const

Definition at line 131 of file ProjectNumericFormats.cpp.

133 return mAudioTimeFormat;

References mAudioTimeFormat.

◆ GetBandwidthSelectionFormatName()

NumericFormatID ProjectNumericFormats::GetBandwidthSelectionFormatName ( ) const

Definition at line 77 of file ProjectNumericFormats.cpp.


References mBandwidthSelectionFormatName.

◆ GetFrequencySelectionFormatName()

NumericFormatID ProjectNumericFormats::GetFrequencySelectionFormatName ( ) const

Definition at line 58 of file ProjectNumericFormats.cpp.


References mFrequencySelectionFormatName.

◆ GetSelectionFormat()

NumericFormatID ProjectNumericFormats::GetSelectionFormat ( ) const

Definition at line 114 of file ProjectNumericFormats.cpp.

116 return mSelectionFormat;

References mSelectionFormat.

Referenced by Effect::GetSelectionFormat().

Here is the caller graph for this function:

◆ LookupFormat()

NumericFormatSymbol ProjectNumericFormats::LookupFormat ( const NumericConverterType type,
const wxString &  identifier 

Definition at line 82 of file ProjectNumericFormats.cpp.

static FormatterContext ProjectContext(const AudacityProject &project)
NUMERIC_FORMATS_API NumericFormatSymbol Lookup(const FormatterContext &context, const NumericConverterType &type, const NumericFormatID &formatIdentifier)
Looks up the format, returns Default for the type if the format is not registered.

References NumericConverterFormats::Lookup(), mProject, and FormatterContext::ProjectContext().

Here is the call graph for this function:

◆ SetAudioTimeFormat()

void ProjectNumericFormats::SetAudioTimeFormat ( const NumericFormatID format)

Definition at line 119 of file ProjectNumericFormats.cpp.

References ProjectNumericFormatsEvent::ChangedAudioTimeFormat, anonymous_namespace{ExportPCM.cpp}::format, mAudioTimeFormat, and Observer::Publisher< ProjectNumericFormatsEvent >::Publish().

Here is the call graph for this function:

◆ SetBandwidthSelectionFormatName()

void ProjectNumericFormats::SetBandwidthSelectionFormatName ( const NumericFormatID format)

Definition at line 89 of file ProjectNumericFormats.cpp.

References ProjectNumericFormatsEvent::ChangedBandwidthFormat, mBandwidthSelectionFormatName, and Observer::Publisher< ProjectNumericFormatsEvent >::Publish().

Here is the call graph for this function:

◆ SetFrequencySelectionFormatName()

void ProjectNumericFormats::SetFrequencySelectionFormatName ( const NumericFormatID format)

Definition at line 63 of file ProjectNumericFormats.cpp.

References ProjectNumericFormatsEvent::ChangedFrequencyFormat, mFrequencySelectionFormatName, and Observer::Publisher< ProjectNumericFormatsEvent >::Publish().

Here is the call graph for this function:

◆ SetSelectionFormat()

void ProjectNumericFormats::SetSelectionFormat ( const NumericFormatID format)

Definition at line 102 of file ProjectNumericFormats.cpp.

References ProjectNumericFormatsEvent::ChangedSelectionFormat, anonymous_namespace{ExportPCM.cpp}::format, mSelectionFormat, and Observer::Publisher< ProjectNumericFormatsEvent >::Publish().

Here is the call graph for this function:

Member Data Documentation

◆ mAudioTimeFormat

NumericFormatID ProjectNumericFormats::mAudioTimeFormat

Definition at line 65 of file ProjectNumericFormats.h.

Referenced by GetAudioTimeFormat(), and SetAudioTimeFormat().

◆ mBandwidthSelectionFormatName

NumericFormatID ProjectNumericFormats::mBandwidthSelectionFormatName

◆ mFrequencySelectionFormatName

NumericFormatID ProjectNumericFormats::mFrequencySelectionFormatName

◆ mProject

const AudacityProject& ProjectNumericFormats::mProject

Definition at line 60 of file ProjectNumericFormats.h.

Referenced by LookupFormat().

◆ mSelectionFormat

NumericFormatID ProjectNumericFormats::mSelectionFormat

Definition at line 62 of file ProjectNumericFormats.h.

Referenced by GetSelectionFormat(), and SetSelectionFormat().

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