Audacity 3.2.0
|
#include <BeatsFormat.h>
Classes | |
struct | Tick |
struct | Ticks |
Public Member Functions | |
BeatsFormat (const ProjectTimeSignature &timeSignature) | |
BeatsFormat ()=delete | |
~BeatsFormat () override | |
void | SetTickSizes (double units, double &major, double &minor, double &minorMinor, int &mDigits) const override |
void | SetLabelString (wxString &s, double d, double units, double minor, int mDigits, TickType tickType) const override |
void | SetData (double bpm, int timeSigUpper, int timeSigLower) |
void | UpdateSubdivision (double units) |
const Ticks & | GetSubdivision () const |
RulerFormat () | |
Public Member Functions inherited from RulerFormat | |
RulerFormat () | |
virtual | ~RulerFormat () |
virtual void | SetTickSizes (double units, double &major, double &minor, double &minorMinor, int &mDigits) const =0 |
virtual void | SetLabelString (wxString &s, double d, double units, double minor, int mDigits, TickType tickType) const =0 |
Private Attributes | |
double | mBpm { 60.0 } |
int | mTimeSigUpper { 4 } |
int | mTimeSigLower { 4 } |
Ticks | mTicks |
Additional Inherited Members | |
Public Types inherited from RulerFormat | |
enum | TickType { t_major , t_minor , t_minorMinor } |
Definition at line 18 of file BeatsFormat.h.
BeatsFormat::BeatsFormat | ( | const ProjectTimeSignature & | timeSignature | ) |
Definition at line 182 of file BeatsFormat.cpp.
References ProjectTimeSignature::GetLowerTimeSignature(), ProjectTimeSignature::GetTempo(), ProjectTimeSignature::GetUpperTimeSignature(), and SetData().
|
delete |
|
overridedefault |
const BeatsFormat::Ticks & BeatsFormat::GetSubdivision | ( | ) | const |
Definition at line 177 of file BeatsFormat.cpp.
References mTicks.
Referenced by anonymous_namespace{TrackArt.cpp}::BeatsGridlinePainter::GetMinorTick().
|
inlineexplicit |
Definition at line 22 of file RulerFormat.h.
void BeatsFormat::SetData | ( | double | bpm, |
int | timeSigUpper, | ||
int | timeSigLower | ||
) |
bpm > 0
timeSigUpper > 0
timeSigLower > 1
(timeSigLower & (timeSigLower - 1)) == 0
Definition at line 70 of file BeatsFormat.cpp.
References mBpm, mTimeSigLower, and mTimeSigUpper.
Referenced by BeatsFormat(), and ProjectTimeRuler::Impl::Impl().
|
overridevirtual |
Implements RulerFormat.
Definition at line 30 of file BeatsFormat.cpp.
References mBpm, mTimeSigLower, mTimeSigUpper, fast_float::round(), RulerFormat::t_major, RulerFormat::t_minor, and wxT().
|
overridevirtual |
Implements RulerFormat.
Definition at line 16 of file BeatsFormat.cpp.
References BeatsFormat::Tick::duration, BeatsFormat::Ticks::major, BeatsFormat::Ticks::minor, BeatsFormat::Ticks::minorMinor, mTicks, and UpdateSubdivision().
void BeatsFormat::UpdateSubdivision | ( | double | units | ) |
Definition at line 89 of file BeatsFormat.cpp.
References BeatsFormat::Ticks::major, mBpm, BeatsFormat::Ticks::minor, BeatsFormat::Ticks::minorMinor, mTicks, mTimeSigLower, and mTimeSigUpper.
Referenced by SetTickSizes().
|
private |
Definition at line 63 of file BeatsFormat.h.
Referenced by SetData(), SetLabelString(), and UpdateSubdivision().
|
private |
Definition at line 67 of file BeatsFormat.h.
Referenced by GetSubdivision(), SetTickSizes(), and UpdateSubdivision().
|
private |
Definition at line 65 of file BeatsFormat.h.
Referenced by SetData(), SetLabelString(), and UpdateSubdivision().
|
private |
Definition at line 64 of file BeatsFormat.h.
Referenced by SetData(), SetLabelString(), and UpdateSubdivision().