mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-19 01:20:04 +02:00
... writes global preferences explicitly, and only when it is the default settings object. Also impose validation of settings when constructing from preferences.
92 lines
1.7 KiB
C++
92 lines
1.7 KiB
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
SpectrumPrefs.h
|
|
|
|
Dominic Mazzoni
|
|
James Crook
|
|
|
|
**********************************************************************/
|
|
/*
|
|
Salvo Ventura
|
|
November 2006
|
|
|
|
Added selection box for windowType
|
|
|
|
All params are saved in config file.
|
|
*/
|
|
|
|
|
|
#ifndef __AUDACITY_SPECTRUM_PREFS__
|
|
#define __AUDACITY_SPECTRUM_PREFS__
|
|
|
|
#include <wx/defs.h>
|
|
#include <wx/string.h>
|
|
#include <wx/window.h>
|
|
|
|
#include "../Experimental.h"
|
|
|
|
#include "PrefsPanel.h"
|
|
#include "SpectrogramSettings.h"
|
|
|
|
class wxTextCtrl;
|
|
struct FFTParam;
|
|
class ShuttleGui;
|
|
class SpectrogramSettings;
|
|
class WaveTrack;
|
|
|
|
class SpectrumPrefs:public PrefsPanel
|
|
{
|
|
public:
|
|
SpectrumPrefs(wxWindow * parent, WaveTrack *wt);
|
|
virtual ~SpectrumPrefs();
|
|
virtual bool Apply();
|
|
virtual bool Validate();
|
|
|
|
private:
|
|
void Populate(int windowSize);
|
|
void PopulatePaddingChoices(int windowSize);
|
|
void PopulateOrExchange(ShuttleGui & S);
|
|
|
|
void OnWindowSize(wxCommandEvent &event);
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
WaveTrack *const mWt;
|
|
|
|
wxTextCtrl *mMinFreq;
|
|
wxTextCtrl *mMaxFreq;
|
|
wxTextCtrl *mGain;
|
|
wxTextCtrl *mRange;
|
|
wxTextCtrl *mFrequencyGain;
|
|
|
|
wxArrayString mSizeChoices;
|
|
|
|
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
|
int mZeroPaddingChoice;
|
|
wxArrayString mZeroPaddingChoices;
|
|
#endif
|
|
|
|
wxArrayString mTypeChoices;
|
|
|
|
|
|
#ifdef EXPERIMENTAL_FIND_NOTES
|
|
wxTextCtrl *mFindNotesMinA;
|
|
wxTextCtrl *mFindNotesN;
|
|
#endif
|
|
|
|
SpectrogramSettings mTempSettings;
|
|
};
|
|
|
|
class SpectrumPrefsFactory : public PrefsPanelFactory
|
|
{
|
|
public:
|
|
explicit SpectrumPrefsFactory(WaveTrack *wt = 0);
|
|
virtual PrefsPanel *Create(wxWindow *parent);
|
|
|
|
private:
|
|
WaveTrack *const mWt;
|
|
};
|
|
|
|
#endif
|