![]() |
Audacity 3.2.0
|
Public Member Functions | |
ParsedNumericConverterFormatter (NumericConverterType type, const TranslatableString &untranslatedFormat, const FormatterContext &context) | |
bool | IsTimeRelatedFormat () const |
void | ParseFormatString () |
void | UpdateFormat () |
ConversionResult | ValueToString (double rawValue, bool nearest) const override |
std::optional< double > | StringToValue (const wxString &valueString) const override |
double | SingleStep (double value, int digitIndex, bool upwards) const override |
void | UpdatePrefs () override |
![]() | |
virtual | ~NumericConverterFormatter () |
virtual void | UpdateFormatForValue (double value, bool canShrink) |
Potentially updates the format so it can fit the value . Default implementation is empty. More... | |
virtual ConversionResult | ValueToString (double value, bool nearest) const =0 |
virtual std::optional< double > | StringToValue (const wxString &value) const =0 |
virtual double | SingleStep (double value, int digitIndex, bool upwards) const =0 |
const wxString & | GetPrefix () const |
const NumericFields & | GetFields () const |
const DigitInfos & | GetDigitInfos () const |
![]() | |
Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
Constructor supporting type-erased custom allocation/deletion. More... | |
Publisher (Publisher &&)=default | |
Publisher & | operator= (Publisher &&)=default |
Subscription | Subscribe (Callback callback) |
Connect a callback to the Publisher; later-connected are called earlier. More... | |
Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
Overload of Subscribe takes an object and pointer-to-member-function. More... | |
![]() | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
Private Attributes | |
const FormatterContext | mContext |
const NumericConverterType | mType |
wxString | mFormat |
const TranslatableString | mUntranslatedFormat |
std::vector< FieldConfig > | mFieldConfigs |
double | mScalingFactor |
double | mSampleRate { 1.0 } |
Observer::Subscription | mProjectRateChangedSubscription |
bool | mScalingFactorIsSamples { false } |
bool | mNtscDrop |
Additional Inherited Members | |
![]() | |
using | message_type = NumericConverterFormatChangedMessage |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const NumericConverterFormatChangedMessage &) > |
Type of functions that can be connected to the Publisher. More... | |
![]() | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
![]() | |
static constexpr bool | notifies_all |
![]() | |
CallbackReturn | Publish (const NumericConverterFormatChangedMessage &message) |
Send a message to connected callbacks. More... | |
![]() | |
virtual void | UpdateSelectedPrefs (int id) |
![]() | |
wxString | mPrefix |
NumericFields | mFields |
DigitInfos | mDigits |
Definition at line 159 of file ParsedNumericConverterFormatter.cpp.
|
inline |
Definition at line 164 of file ParsedNumericConverterFormatter.cpp.
References ProjectRate::Get(), and project.
|
inline |
Definition at line 187 of file ParsedNumericConverterFormatter.cpp.
References NumericConverterType_DURATION(), and NumericConverterType_TIME().
|
inline |
Definition at line 194 of file ParsedNumericConverterFormatter.cpp.
References NumericField::ForRange(), and wxT().
|
inlineoverridevirtual |
Implements NumericConverterFormatter.
Definition at line 577 of file ParsedNumericConverterFormatter.cpp.
|
inlineoverridevirtual |
Implements NumericConverterFormatter.
Definition at line 511 of file ParsedNumericConverterFormatter.cpp.
|
inline |
Definition at line 374 of file ParsedNumericConverterFormatter.cpp.
|
inlineoverridevirtual |
Implements PrefsListener.
Definition at line 637 of file ParsedNumericConverterFormatter.cpp.
|
inlineoverridevirtual |
GetFields().size() == result.fieldValueStrings.size()
Implements NumericConverterFormatter.
Definition at line 386 of file ParsedNumericConverterFormatter.cpp.
References sampleCount::as_double(), sampleCount::as_long_long(), field, NumericConverterFormatter::ConversionResult::fieldValueStrings, fast_float::round(), NumericConverterFormatter::ConversionResult::valueString, and wxT().
|
private |
Definition at line 648 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 653 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 650 of file ParsedNumericConverterFormatter.cpp.
|
mutableprivate |
Definition at line 662 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 658 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 656 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 655 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 660 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 649 of file ParsedNumericConverterFormatter.cpp.
|
private |
Definition at line 651 of file ParsedNumericConverterFormatter.cpp.