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#include "Observer.h"
17
18class AudacityProject;
19
21 const enum Type : int {
29};
30
31class NUMERIC_FORMATS_API ProjectNumericFormats final
32 : public ClientData::Base
33 , public Observer::Publisher<ProjectNumericFormatsEvent>
34{
35public:
38
41
42 // Selection Format
43 void SetSelectionFormat(const NumericFormatID & format);
44 NumericFormatID GetSelectionFormat() const;
45
46 // AudioTime format
47 void SetAudioTimeFormat(const NumericFormatID & format);
48 NumericFormatID GetAudioTimeFormat() const;
49
50 // Spectral Selection Formats
51 void SetFrequencySelectionFormatName(const NumericFormatID & format);
52 NumericFormatID GetFrequencySelectionFormatName() const;
53
54 void SetBandwidthSelectionFormatName(const NumericFormatID & format);
55 NumericFormatID GetBandwidthSelectionFormatName() const;
56
57 NumericFormatSymbol LookupFormat(const NumericConverterType& type, const wxString& identifier);
58
59private:
61
66};
67
68#endif
Utility ClientData::Site to register hooks into a host class that attach client data.
const auto 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
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
An object that sends messages to an open-ended list of subscribed callbacks.
Definition: Observer.h:108
const AudacityProject & mProject
NumericFormatID mBandwidthSelectionFormatName
NumericFormatID mSelectionFormat
NumericFormatID mAudioTimeFormat
NumericFormatID mFrequencySelectionFormatName
~ProjectNumericFormats() override
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:202
A convenient default parameter for class template Site.
Definition: ClientData.h:29
const NumericFormatID oldValue
const NumericFormatID newValue
enum ProjectNumericFormatsEvent::Type type