Audacity 3.2.0
|
Holds various per-project settings values, and sends events to the project when certain values change. More...
#include <ProjectSettings.h>
Public Member Functions | |
ProjectSettings (AudacityProject &project) | |
ProjectSettings (const ProjectSettings &)=delete | |
ProjectSettings & | operator= (const ProjectSettings &)=delete |
void | SetTool (int tool) |
int | GetTool () const |
void | SetBrushRadius (int brushRadius) |
int | GetBrushRadius () const |
void | SetSmartSelection (bool isSelected) |
bool | IsSmartSelection () const |
void | SetOvertones (bool isSelected) |
bool | IsOvertones () const |
bool | GetShowSplashScreen () const |
Public Member Functions inherited from ClientData::Base | |
virtual | ~Base () |
Public Member Functions inherited from Observer::Publisher< ProjectSettingsEvent > | |
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 ProjectSettings & | Get (AudacityProject &project) |
static const ProjectSettings & | Get (const AudacityProject &project) |
Private Member Functions | |
void | UpdatePrefs () override |
Private Member Functions inherited from PrefsListener | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
virtual void | UpdateSelectedPrefs (int id) |
Private Attributes | |
AudacityProject & | mProject |
int | mCurrentTool |
int | mCurrentBrushRadius |
int | mCurrentBrushHop |
bool | mbSmartSelection { false } |
bool | mbOvertones { false } |
bool | mShowSplashScreen |
Additional Inherited Members | |
Public Types inherited from Observer::Publisher< ProjectSettingsEvent > | |
using | message_type = ProjectSettingsEvent |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const ProjectSettingsEvent &) > |
Type of functions that can be connected to the Publisher. More... | |
Static Public Attributes inherited from Observer::Publisher< ProjectSettingsEvent > | |
static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< ProjectSettingsEvent > | |
CallbackReturn | Publish (const ProjectSettingsEvent &message) |
Send a message to connected callbacks. More... | |
Static Private Member Functions inherited from PrefsListener | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
Holds various per-project settings values, and sends events to the project when certain values change.
Definition at line 52 of file ProjectSettings.h.
|
explicit |
Definition at line 39 of file ProjectSettings.cpp.
References gPrefs, mCurrentTool, ToolCodes::multiTool, audacity::BasicSettings::Read(), ToolCodes::selectTool, UpdatePrefs(), and wxT().
|
delete |
|
static |
Definition at line 28 of file ProjectSettings.cpp.
References project, and sProjectSettingsKey.
Referenced by MacroCommands::ApplyCommandInBatchMode(), BrushHandleHitTest(), TimeShiftHandle::Click(), ProjectFileManager::DoSave(), ToolsToolBar::DoToolChanged(), TrackPanel::DrawTracks(), Get(), CommonChannelView::HitTest(), NoteTrackAffordanceControls::HitTest(), WaveTrackAffordanceControls::HitTest(), AudacityApp::InitPart2(), Scrubber::MaybeStartScrubbing(), anonymous_namespace{TrackMenus.cpp}::MuteTracks(), ProjectManager::OnCloseWindow(), anonymous_namespace{ToolsToolBar.cpp}::OnNextTool(), anonymous_namespace{ToolsToolBar.cpp}::OnPrevTool(), anonymous_namespace{TimerRecordDialog.cpp}::OnTimerRecord(), ToolsToolBar::OnTool(), SelectHandle::Preview(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), and ToolsToolBar::ToolsToolBar().
|
static |
Definition at line 34 of file ProjectSettings.cpp.
References Get(), and project.
|
inline |
Definition at line 72 of file ProjectSettings.h.
Referenced by BrushHandle::BrushHandle().
|
inline |
Definition at line 80 of file ProjectSettings.h.
Referenced by AudacityApp::InitPart2().
|
inline |
Definition at line 68 of file ProjectSettings.h.
Referenced by TimeShiftHandle::Click(), and SelectHandle::Preview().
|
inline |
Definition at line 78 of file ProjectSettings.h.
Referenced by BrushHandle::BrushHandle().
|
inline |
Definition at line 75 of file ProjectSettings.h.
Referenced by BrushHandle::BrushHandle().
|
delete |
|
inline |
Definition at line 71 of file ProjectSettings.h.
|
inline |
Definition at line 77 of file ProjectSettings.h.
|
inline |
Definition at line 74 of file ProjectSettings.h.
void ProjectSettings::SetTool | ( | int | tool | ) |
Definition at line 75 of file ProjectSettings.cpp.
References ProjectSettingsEvent::ChangedTool, mCurrentTool, and Observer::Publisher< ProjectSettingsEvent >::Publish().
Referenced by ToolsToolBar::OnTool(), and anonymous_namespace{ToolsToolBar.cpp}::SetTool().
|
overrideprivatevirtual |
Implements PrefsListener.
Definition at line 54 of file ProjectSettings.cpp.
References TrackList::Get(), SelectionBar::Get(), gPrefs, mShowSplashScreen, audacity::BasicSettings::Read(), and wxT().
Referenced by ProjectSettings().
|
private |
Definition at line 91 of file ProjectSettings.h.
|
private |
Definition at line 90 of file ProjectSettings.h.
|
private |
Definition at line 89 of file ProjectSettings.h.
|
private |
Definition at line 88 of file ProjectSettings.h.
|
private |
Definition at line 87 of file ProjectSettings.h.
Referenced by ProjectSettings(), and SetTool().
|
private |
Definition at line 85 of file ProjectSettings.h.
|
private |
Definition at line 93 of file ProjectSettings.h.
Referenced by UpdatePrefs().