1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-21 16:11:11 +01:00

Use an event so that ProjectSettings.cpp does not need TrackPanel.h

This commit is contained in:
Paul Licameli
2019-05-30 13:36:41 -04:00
parent 05efeeb5bd
commit 6dc5162614
4 changed files with 42 additions and 4 deletions

View File

@@ -11,11 +11,17 @@ Paul Licameli split from AudacityProject.h
#ifndef __AUDACITY_PROJECT_SETTINGS__
#define __AUDACITY_PROJECT_SETTINGS__
#include <wx/event.h> // to declare custom event type
#include "ClientData.h" // to inherit
#include "Prefs.h" // to inherit
class AudacityProject;
// Sent to the project when certain settings change
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API,
EVT_PROJECT_SETTINGS_CHANGE, wxCommandEvent);
///\brief Holds various per-project settings values, including the sample rate,
/// and sends events to the project when certain values change
class ProjectSettings final
@@ -26,6 +32,11 @@ public:
static ProjectSettings &Get( AudacityProject &project );
static const ProjectSettings &Get( const AudacityProject &project );
// Values retrievable from GetInt() of the event for settings change
enum EventCode : int {
ChangedSyncLock,
};
ProjectSettings( AudacityProject &project );
sampleFormat GetDefaultFormat() const { return mDefaultFormat; }