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:
[legend]
Collaboration diagram for ProjectNumericFormats:
[legend]

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)
explicit

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 }
53{}
wxT("CloseDown"))
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 ( )
overridedefault

Member Function Documentation

◆ Get() [1/2]

ProjectNumericFormats & ProjectNumericFormats::Get ( AudacityProject project)
static

◆ Get() [2/2]

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

Definition at line 33 of file ProjectNumericFormats.cpp.

35{
36 return Get(const_cast<AudacityProject &>(project));
37}
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.

132{
133 return mAudioTimeFormat;
134}

References mAudioTimeFormat.

◆ GetBandwidthSelectionFormatName()

NumericFormatID ProjectNumericFormats::GetBandwidthSelectionFormatName ( ) const

Definition at line 77 of file ProjectNumericFormats.cpp.

78{
80}

References mBandwidthSelectionFormatName.

◆ GetFrequencySelectionFormatName()

NumericFormatID ProjectNumericFormats::GetFrequencySelectionFormatName ( ) const

Definition at line 58 of file ProjectNumericFormats.cpp.

59{
61}

References mFrequencySelectionFormatName.

◆ GetSelectionFormat()

NumericFormatID ProjectNumericFormats::GetSelectionFormat ( ) const

Definition at line 114 of file ProjectNumericFormats.cpp.

115{
116 return mSelectionFormat;
117}

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.

84{
87}
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
private

Definition at line 65 of file ProjectNumericFormats.h.

Referenced by GetAudioTimeFormat(), and SetAudioTimeFormat().

◆ mBandwidthSelectionFormatName

NumericFormatID ProjectNumericFormats::mBandwidthSelectionFormatName
private

◆ mFrequencySelectionFormatName

NumericFormatID ProjectNumericFormats::mFrequencySelectionFormatName
private

◆ mProject

const AudacityProject& ProjectNumericFormats::mProject
private

Definition at line 60 of file ProjectNumericFormats.h.

Referenced by LookupFormat().

◆ mSelectionFormat

NumericFormatID ProjectNumericFormats::mSelectionFormat
private

Definition at line 62 of file ProjectNumericFormats.h.

Referenced by GetSelectionFormat(), and SetSelectionFormat().


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