Audacity 3.2.0
ProjectNumericFormats.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file ProjectNumericFormats.cpp
6
7 Paul Licameli split from ProjectSettings.cpp
8
9 **********************************************************************/
10#ifndef __AUDACITY_PROJECT_NUMERIC_FORMATS__
11#define __AUDACITY_PROJECT_NUMERIC_FORMATS__
12
13#include "ClientData.h"
16
17class AudacityProject;
18
19class NUMERIC_FORMATS_API ProjectNumericFormats final : public ClientData::Base
20{
21public:
23 static const ProjectNumericFormats &Get(const AudacityProject &project);
24
25 explicit ProjectNumericFormats(const AudacityProject& project);
27
28 // Selection Format
29 void SetSelectionFormat(const NumericFormatSymbol & format);
30 const NumericFormatSymbol & GetSelectionFormat() const;
31
32 // AudioTime format
33 void SetAudioTimeFormat(const NumericFormatSymbol & format);
34 const NumericFormatSymbol & GetAudioTimeFormat() const;
35
36 // Spectral Selection Formats
37 void SetFrequencySelectionFormatName(const NumericFormatSymbol & format);
38 const NumericFormatSymbol & GetFrequencySelectionFormatName() const;
39
40 void SetBandwidthSelectionFormatName(const NumericFormatSymbol & format);
41 const NumericFormatSymbol & GetBandwidthSelectionFormatName() const;
42
43 NumericFormatSymbol LookupFormat(const NumericConverterType& type, const wxString& identifier);
44
45private:
47
52};
53
54#endif
Utility ClientData::Site to register hooks into a host class that attach client data.
int format
Definition: ExportPCM.cpp:53
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
An explicitly nonlocalized string, not meant for the user to see.
Definition: Identifier.h:22
NumericFormatSymbol mFrequencySelectionFormatName
NumericFormatSymbol mBandwidthSelectionFormatName
const AudacityProject & mProject
NumericFormatSymbol mAudioTimeFormat
NumericFormatSymbol mSelectionFormat
~ProjectNumericFormats() override
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:196
A convenient default parameter for class template Site.
Definition: ClientData.h:28