Audacity  2.2.0
FreqWindow Class Referencefinal

Displays a spectrum plot of the waveform. Has options for selecting parameters of the plot. More...

#include <FreqWindow.h>

Inheritance diagram for FreqWindow:
wxTabTraversalWrapper< Base >

Public Member Functions

 FreqWindow (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos)
 
virtual ~FreqWindow ()
 
bool Show (bool show=true) override
 
- Public Member Functions inherited from wxTabTraversalWrapper< Base >
template<typename... Args>
 wxTabTraversalWrapper (Args &&...args)
 
 ~wxTabTraversalWrapper ()
 

Private Member Functions

void GetAudio ()
 
void PlotMouseEvent (wxMouseEvent &event)
 
void PlotPaint (wxPaintEvent &event)
 
void OnCloseWindow (wxCloseEvent &event)
 
void OnCloseButton (wxCommandEvent &event)
 
void OnGetURL (wxCommandEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void OnPanScroller (wxScrollEvent &event)
 
void OnZoomSlider (wxCommandEvent &event)
 
void OnAlgChoice (wxCommandEvent &event)
 
void OnSizeChoice (wxCommandEvent &event)
 
void OnFuncChoice (wxCommandEvent &event)
 
void OnAxisChoice (wxCommandEvent &event)
 
void OnExport (wxCommandEvent &event)
 
void OnReplot (wxCommandEvent &event)
 
void OnGridOnOff (wxCommandEvent &event)
 
void OnRecalc (wxCommandEvent &event)
 
void SendRecalcEvent ()
 
void Recalc ()
 
void DrawPlot ()
 
void DrawBackground (wxMemoryDC &dc)
 

Private Attributes

bool mDrawGrid
 
int mSize
 
SpectrumAnalyst::Algorithm mAlg
 
int mFunc
 
int mAxis
 
int dBRange
 
AudacityProjectp
 
RulerPanelvRuler
 
RulerPanelhRuler
 
FreqPlotmFreqPlot
 
FreqGaugemProgress
 
wxRect mPlotRect
 
wxFont mFreqFont
 
std::unique_ptr< wxCursor > mArrowCursor
 
std::unique_ptr< wxCursor > mCrossCursor
 
wxButton * mCloseButton
 
wxButton * mExportButton
 
wxButton * mReplotButton
 
wxCheckBox * mGridOnOff
 
wxChoice * mAlgChoice
 
wxChoice * mSizeChoice
 
wxChoice * mFuncChoice
 
wxChoice * mAxisChoice
 
wxScrollBar * mPanScroller
 
wxSlider * mZoomSlider
 
wxTextCtrl * mCursorText
 
wxTextCtrl * mPeakText
 
double mRate
 
size_t mDataLen
 
Floats mData
 
size_t mWindowSize
 
bool mLogAxis
 
float mYMin
 
float mYMax
 
float mYStep
 
std::unique_ptr< wxBitmap > mBitmap
 
int mMouseX
 
int mMouseY
 
std::unique_ptr< SpectrumAnalystmAnalyst
 

Static Private Attributes

static const int fontSize = 10
 

Friends

class FreqPlot
 

Detailed Description

Displays a spectrum plot of the waveform. Has options for selecting parameters of the plot.

Has a feature that finds peaks and reports their value as you move the mouse around.

Constructor & Destructor Documentation

FreqWindow::FreqWindow ( wxWindow *  parent,
wxWindowID  id,
const wxString &  title,
const wxPoint &  pos 
)

References _(), ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddCheckBox(), ShuttleGuiBase::AddChoice(), ShuttleGuiBase::AddPrompt(), ShuttleGui::AddSpace(), ShuttleGui::AddStandardButtons(), ShuttleGuiBase::AddTextBox(), ShuttleGuiBase::AddWindow(), ThemeBase::Colour(), dBRange, eCloseButton, eHelpButton, eIsCreating, ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndVerticalLay(), ENV_DB_KEY, ENV_DB_RANGE, fontSize, FREQ_WINDOW_HEIGHT, FreqAlgChoiceID, FreqAxisChoiceID, FreqExportButtonID, FreqFuncChoiceID, FreqPanScrollerID, FreqPlot, FreqSizeChoiceID, FreqZoomSliderID, GetActiveProject(), Ruler::GetMaxSize(), gPrefs, GridOnOffID, hRuler, ShuttleGui::Id(), Ruler::LinearDBFormat, mAlg, mAlgChoice, mArrowCursor, mAxis, mAxisChoice, mCloseButton, mCrossCursor, mCursorText, mDataLen, mDrawGrid, mExportButton, mFreqFont, mFreqPlot, mFunc, mFuncChoice, mGridOnOff, mLogAxis, mMouseX, mMouseY, mPanScroller, mPeakText, mProgress, mRate, mReplotButton, mSize, mSizeChoice, mWindowSize, mZoomSlider, NumWindowFuncs(), p, ShuttleGui::Prop(), Ruler::RealFormat, ReplotButtonID, RulerPanel::ruler, safenew, ShuttleGuiBase::SetBorder(), Ruler::SetBounds(), Ruler::SetFlip(), Ruler::SetFormat(), Ruler::SetLabelEdges(), Ruler::SetLog(), Ruler::SetOrientation(), Ruler::SetRange(), ShuttleGui::SetSizeHints(), ShuttleGuiBase::SetSizerProportion(), ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::SetStretchyRow(), ShuttleGuiBase::SetStyle(), RulerPanel::SetTickColour(), Ruler::SetUnits(), SpectrumAnalyst::Spectrum, ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartVerticalLay(), theTheme, vRuler, WindowFuncName(), ZoomIn, and ZoomOut.

FreqWindow::~FreqWindow ( )
virtual

Member Function Documentation

void FreqWindow::DrawBackground ( wxMemoryDC &  dc)
private

References mBitmap, mFreqFont, mFreqPlot, and mPlotRect.

Referenced by DrawPlot().

void FreqWindow::OnAlgChoice ( wxCommandEvent &  event)
private
void FreqWindow::OnAxisChoice ( wxCommandEvent &  event)
private

References DrawPlot(), mAxisChoice, and mLogAxis.

void FreqWindow::OnCloseButton ( wxCommandEvent &  event)
private
void FreqWindow::OnCloseWindow ( wxCloseEvent &  event)
private

References Show().

void FreqWindow::OnExport ( wxCommandEvent &  event)
private
void FreqWindow::OnFuncChoice ( wxCommandEvent &  event)
private

References SendRecalcEvent().

void FreqWindow::OnGetURL ( wxCommandEvent &  event)
private
void FreqWindow::OnGridOnOff ( wxCommandEvent &  event)
private

References DrawPlot(), mDrawGrid, and mGridOnOff.

void FreqWindow::OnPanScroller ( wxScrollEvent &  event)
private

References DrawPlot().

void FreqWindow::OnRecalc ( wxCommandEvent &  event)
private

References Recalc().

void FreqWindow::OnReplot ( wxCommandEvent &  event)
private
void FreqWindow::OnSize ( wxSizeEvent &  event)
private

References DrawPlot().

void FreqWindow::OnSizeChoice ( wxCommandEvent &  event)
private
void FreqWindow::OnZoomSlider ( wxCommandEvent &  event)
private

References DrawPlot().

void FreqWindow::PlotMouseEvent ( wxMouseEvent &  event)
private
void FreqWindow::SendRecalcEvent ( )
private
bool FreqWindow::Show ( bool  show = true)
override

Friends And Related Function Documentation

friend class FreqPlot
friend

Referenced by FreqWindow().

Member Data Documentation

int FreqWindow::dBRange
private
const int FreqWindow::fontSize = 10
staticprivate

Referenced by FreqWindow().

RulerPanel* FreqWindow::hRuler
private

Referenced by DrawPlot(), and FreqWindow().

SpectrumAnalyst::Algorithm FreqWindow::mAlg
private
wxChoice* FreqWindow::mAlgChoice
private
std::unique_ptr<SpectrumAnalyst> FreqWindow::mAnalyst
private

Referenced by DrawPlot(), OnExport(), PlotPaint(), and Recalc().

std::unique_ptr<wxCursor> FreqWindow::mArrowCursor
private

Referenced by FreqWindow(), PlotMouseEvent(), and Show().

int FreqWindow::mAxis
private

Referenced by FreqWindow().

wxChoice* FreqWindow::mAxisChoice
private
std::unique_ptr<wxBitmap> FreqWindow::mBitmap
private

Referenced by DrawBackground(), and PlotPaint().

wxButton* FreqWindow::mCloseButton
private

Referenced by FreqWindow().

std::unique_ptr<wxCursor> FreqWindow::mCrossCursor
private

Referenced by FreqWindow(), and PlotMouseEvent().

wxTextCtrl* FreqWindow::mCursorText
private

Referenced by FreqWindow(), and PlotPaint().

Floats FreqWindow::mData
private

Referenced by DrawPlot(), GetAudio(), PlotPaint(), and Recalc().

size_t FreqWindow::mDataLen
private
bool FreqWindow::mDrawGrid
private
wxButton* FreqWindow::mExportButton
private

Referenced by FreqWindow().

wxFont FreqWindow::mFreqFont
private
FreqPlot* FreqWindow::mFreqPlot
private
int FreqWindow::mFunc
private

Referenced by FreqWindow().

wxChoice* FreqWindow::mFuncChoice
private

Referenced by FreqWindow(), OnCloseButton(), and Recalc().

wxCheckBox* FreqWindow::mGridOnOff
private

Referenced by FreqWindow(), and OnGridOnOff().

bool FreqWindow::mLogAxis
private
int FreqWindow::mMouseX
private
int FreqWindow::mMouseY
private
wxScrollBar* FreqWindow::mPanScroller
private

Referenced by DrawPlot(), FreqWindow(), and Recalc().

wxTextCtrl* FreqWindow::mPeakText
private

Referenced by FreqWindow(), and PlotPaint().

wxRect FreqWindow::mPlotRect
private
FreqGauge* FreqWindow::mProgress
private

Referenced by FreqWindow(), and Recalc().

double FreqWindow::mRate
private
wxButton* FreqWindow::mReplotButton
private

Referenced by FreqWindow().

int FreqWindow::mSize
private

Referenced by FreqWindow().

wxChoice* FreqWindow::mSizeChoice
private
size_t FreqWindow::mWindowSize
private
float FreqWindow::mYMax
private

Referenced by DrawPlot(), and Recalc().

float FreqWindow::mYMin
private

Referenced by DrawPlot(), and Recalc().

float FreqWindow::mYStep
private
wxSlider* FreqWindow::mZoomSlider
private

Referenced by DrawPlot(), and FreqWindow().

AudacityProject* FreqWindow::p
private

Referenced by FreqWindow(), and GetAudio().

RulerPanel* FreqWindow::vRuler
private

Referenced by DrawPlot(), and FreqWindow().


The documentation for this class was generated from the following files: