Audacity 3.2.0
|
#include <ProjectTimeSignature.h>
Public Member Functions | |
ProjectTimeSignature () | |
~ProjectTimeSignature () override | |
double | GetTempo () const |
void | SetTempo (double tempo) |
int | GetUpperTimeSignature () const |
void | SetUpperTimeSignature (int upperTimeSignature) |
int | GetLowerTimeSignature () const |
void | SetLowerTimeSignature (int lowerTimeSignature) |
double | GetQuarterDuration () const |
double | GetBeatDuration () const |
double | GetBarDuration () const |
Public Member Functions inherited from ClientData::Base | |
virtual | ~Base () |
Public Member Functions inherited from Observer::Publisher< TimeSignatureChangedMessage > | |
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... | |
Static Public Member Functions | |
static ProjectTimeSignature & | Get (AudacityProject &project) |
static const ProjectTimeSignature & | Get (const AudacityProject &project) |
Private Member Functions | |
void | PublishSignatureChange () |
Private Attributes | |
double | mTempo |
int | mUpperTimeSignature |
int | mLowerTimeSignature |
Additional Inherited Members | |
Public Types inherited from Observer::Publisher< TimeSignatureChangedMessage > | |
using | message_type = TimeSignatureChangedMessage |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const TimeSignatureChangedMessage &) > |
Type of functions that can be connected to the Publisher. More... | |
Static Public Attributes inherited from Observer::Publisher< TimeSignatureChangedMessage > | |
static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< TimeSignatureChangedMessage > | |
CallbackReturn | Publish (const TimeSignatureChangedMessage &message) |
Send a message to connected callbacks. More... | |
Definition at line 25 of file ProjectTimeSignature.h.
ProjectTimeSignature::ProjectTimeSignature | ( | ) |
Definition at line 35 of file ProjectTimeSignature.cpp.
|
overridedefault |
|
static |
Definition at line 24 of file ProjectTimeSignature.cpp.
Referenced by BarStepCase(), BeatsCase(), anonymous_namespace{BeatsNumericConverterFormatter.cpp}::BeatsFormatter::BeatsFormatter(), ProjectFileManager::DoImport(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), Get(), BenchmarkDialog::OnRun(), TimeSignatureToolBar::Populate(), ProjectTempoListener::ProjectTempoListener(), AudacityMirProject::ReconfigureMusicGrid(), anonymous_namespace{TimeSignatureToolBar.cpp}::TimeSignatureRestorer::RestoreUndoRedoState(), anonymous_namespace{BeatsSnapFunctions.cpp}::SnapToBar(), anonymous_namespace{BeatsSnapFunctions.cpp}::SnapToBeat(), anonymous_namespace{BeatsSnapFunctions.cpp}::SnapToTriplets(), TEST_CASE(), and anonymous_namespace{BeatsNumericConverterFormatter.cpp}::BeatsFormatter::UpdateFormat().
|
static |
Definition at line 30 of file ProjectTimeSignature.cpp.
References Get(), and project.
double ProjectTimeSignature::GetBarDuration | ( | ) | const |
Definition at line 107 of file ProjectTimeSignature.cpp.
References GetBeatDuration(), and mUpperTimeSignature.
double ProjectTimeSignature::GetBeatDuration | ( | ) | const |
Definition at line 102 of file ProjectTimeSignature.cpp.
References GetQuarterDuration(), and mLowerTimeSignature.
Referenced by GetBarDuration().
int ProjectTimeSignature::GetLowerTimeSignature | ( | ) | const |
Definition at line 79 of file ProjectTimeSignature.cpp.
References mLowerTimeSignature.
Referenced by BeatsFormat::BeatsFormat().
double ProjectTimeSignature::GetQuarterDuration | ( | ) | const |
Definition at line 97 of file ProjectTimeSignature.cpp.
References mTempo.
Referenced by GetBeatDuration().
double ProjectTimeSignature::GetTempo | ( | ) | const |
Definition at line 43 of file ProjectTimeSignature.cpp.
References mTempo.
Referenced by BeatsFormat::BeatsFormat(), ProjectFileManager::DoImport(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), BenchmarkDialog::OnRun(), and ProjectTempoListener::ProjectTempoListener().
int ProjectTimeSignature::GetUpperTimeSignature | ( | ) | const |
Definition at line 61 of file ProjectTimeSignature.cpp.
References mUpperTimeSignature.
Referenced by BeatsFormat::BeatsFormat().
|
private |
Definition at line 112 of file ProjectTimeSignature.cpp.
References mLowerTimeSignature, mTempo, mUpperTimeSignature, and Observer::Publisher< TimeSignatureChangedMessage >::Publish().
Referenced by SetLowerTimeSignature(), SetTempo(), and SetUpperTimeSignature().
void ProjectTimeSignature::SetLowerTimeSignature | ( | int | lowerTimeSignature | ) |
Definition at line 84 of file ProjectTimeSignature.cpp.
References audacity::BasicSettings::Flush(), gPrefs, LowerTimeSignature, mLowerTimeSignature, PublishSignatureChange(), and Setting< T >::Write().
Referenced by TimeSignatureToolBar::Populate().
void ProjectTimeSignature::SetTempo | ( | double | tempo | ) |
Definition at line 48 of file ProjectTimeSignature.cpp.
References BeatsPerMinute, audacity::BasicSettings::Flush(), gPrefs, mTempo, PublishSignatureChange(), and Setting< T >::Write().
Referenced by TimeSignatureToolBar::Populate().
void ProjectTimeSignature::SetUpperTimeSignature | ( | int | upperTimeSignature | ) |
Definition at line 66 of file ProjectTimeSignature.cpp.
References audacity::BasicSettings::Flush(), gPrefs, mUpperTimeSignature, PublishSignatureChange(), UpperTimeSignature, and Setting< T >::Write().
Referenced by TimeSignatureToolBar::Populate().
|
private |
Definition at line 54 of file ProjectTimeSignature.h.
Referenced by GetBeatDuration(), GetLowerTimeSignature(), PublishSignatureChange(), and SetLowerTimeSignature().
|
private |
Definition at line 52 of file ProjectTimeSignature.h.
Referenced by GetQuarterDuration(), GetTempo(), PublishSignatureChange(), and SetTempo().
|
private |
Definition at line 53 of file ProjectTimeSignature.h.
Referenced by GetBarDuration(), GetUpperTimeSignature(), PublishSignatureChange(), and SetUpperTimeSignature().