Audacity 3.2.0
ExportOptionsEditor.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ExportOptionsEditor.h
6
7 Vitaly Sverchinsky
8
9**********************************************************************/
10
11#pragma once
12
13#include "ExportTypes.h"
14
15namespace audacity
16{
17 class BasicSettings;
18}
19
23class IMPORT_EXPORT_API ExportOptionsEditor
24{
25public:
26 using SampleRateList = std::vector<int>;
27
29 class IMPORT_EXPORT_API Listener
30 {
31 public:
32 virtual ~Listener();
33
35 virtual void OnExportOptionChangeBegin() = 0;
37 virtual void OnExportOptionChangeEnd() = 0;
39 virtual void OnExportOptionChange(const ExportOption& option) = 0;
41 virtual void OnFormatInfoChange() = 0;
42
43 virtual void OnSampleRateListChange() = 0;
44 };
45
47
48 virtual int GetOptionsCount() const = 0;
49 virtual bool GetOption(int index, ExportOption& option) const = 0;
50
51 virtual bool GetValue(ExportOptionID id, ExportValue& value) const = 0;
52 virtual bool SetValue(ExportOptionID id, const ExportValue& value) = 0;
53
54 virtual SampleRateList GetSampleRateList() const = 0;
55
56 virtual void Store(audacity::BasicSettings& settings) const = 0;
57 virtual void Load(const audacity::BasicSettings& config) = 0;
58};
int ExportOptionID
Definition: ExportTypes.h:21
std::variant< bool, int, double, std::string > ExportValue
A type of option values (parameters) used by exporting plugins.
Definition: ExportTypes.h:38
static Settings & settings()
Definition: TrackInfo.cpp:51
Listener object that is used to report on option changes.
virtual void OnExportOptionChangeEnd()=0
Called after OnExportOptionChange
virtual void OnFormatInfoChange()=0
Called when format extension change (usually in response parameter change)
virtual void OnExportOptionChangeBegin()=0
Called before OnExportOptionChange
virtual void OnExportOptionChange(const ExportOption &option)=0
Called when option change.
virtual void OnSampleRateListChange()=0
Editor objects are used to retrieve a set of export options, and configure exporting parameters accor...
virtual void Store(audacity::BasicSettings &settings) const =0
virtual bool GetValue(ExportOptionID id, ExportValue &value) const =0
std::vector< int > SampleRateList
virtual bool SetValue(ExportOptionID id, const ExportValue &value)=0
virtual bool GetOption(int index, ExportOption &option) const =0
virtual ~ExportOptionsEditor()
virtual int GetOptionsCount() const =0
virtual void Load(const audacity::BasicSettings &config)=0
virtual SampleRateList GetSampleRateList() const =0
Base class for objects that provide facility to store data persistently, and access it with string ke...
Definition: BasicSettings.h:31
A type that provides a description of an exporting option. Isn't allowed to change except non-type re...
Definition: ExportTypes.h:43