Audacity 3.2.0
Public Member Functions | Private Member Functions | List of all members
ApplicationPrefs Class Referencefinal

A PrefsPanel to enable/disable certain general application options like checking updates, etc. More...

#include <ApplicationPrefs.h>

Inheritance diagram for ApplicationPrefs:
[legend]
Collaboration diagram for ApplicationPrefs:
[legend]

Public Member Functions

 ApplicationPrefs (wxWindow *parent, wxWindowID winid)
 
 ~ApplicationPrefs ()
 
ComponentInterfaceSymbol GetSymbol () const override
 
TranslatableString GetDescription () const override
 
bool Commit () override
 
ManualPageID HelpPageName () override
 If not empty string, the Help button is added below the panel. More...
 
- Public Member Functions inherited from PrefsPanel
 PrefsPanel (wxWindow *parent, wxWindowID winid, const TranslatableString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
virtual bool Commit ()=0
 
virtual PluginPath GetPath () const override
 
virtual VendorSymbol GetVendor () const override
 
virtual wxString GetVersion () const override
 
virtual bool ShowsPreviewButton ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual ManualPageID HelpPageName ()
 If not empty string, the Help button is added below the panel. More...
 
virtual void Cancel ()
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Member Functions

void Populate ()
 
void PopulateOrExchange (ShuttleGui &S) override
 

Additional Inherited Members

- Public Types inherited from PrefsPanel
using Factories = std::vector< PrefsPanel::PrefsNode >
 
using Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) >
 
- Static Public Member Functions inherited from PrefsPanel
static FactoriesDefaultFactories ()
 

Detailed Description

A PrefsPanel to enable/disable certain general application options like checking updates, etc.

Definition at line 21 of file ApplicationPrefs.h.

Constructor & Destructor Documentation

◆ ApplicationPrefs()

ApplicationPrefs::ApplicationPrefs ( wxWindow *  parent,
wxWindowID  winid 
)

Definition at line 33 of file ApplicationPrefs.cpp.

34: PrefsPanel(parent, winid, XO("Application"))
35{
36 Populate();
37}
XO("Cut/Copy/Paste")
PrefsPanel(wxWindow *parent, wxWindowID winid, const TranslatableString &title)
Definition: PrefsPanel.h:94

References Populate().

Here is the call graph for this function:

◆ ~ApplicationPrefs()

ApplicationPrefs::~ApplicationPrefs ( )

Definition at line 39 of file ApplicationPrefs.cpp.

40{
41}

Member Function Documentation

◆ Commit()

bool ApplicationPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 106 of file ApplicationPrefs.cpp.

107{
110 DefaultUpdatesCheckingFlag->Invalidate();
111
112 return true;
113}
StickySetting< BoolSetting > DefaultUpdatesCheckingFlag
Definition: Prefs.cpp:63
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
void PopulateOrExchange(ShuttleGui &S) override
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640

References DefaultUpdatesCheckingFlag, eIsSavingToPrefs, PopulateOrExchange(), and S.

Here is the call graph for this function:

◆ GetDescription()

TranslatableString ApplicationPrefs::GetDescription ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 48 of file ApplicationPrefs.cpp.

49{
50 return XO("Preferences for Application");
51}

References XO().

Here is the call graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol ApplicationPrefs::GetSymbol ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 43 of file ApplicationPrefs.cpp.

44{
46}
static ComponentInterfaceSymbol s_ComponentInterfaceSymbol

References s_ComponentInterfaceSymbol.

◆ HelpPageName()

ManualPageID ApplicationPrefs::HelpPageName ( )
overridevirtual

If not empty string, the Help button is added below the panel.

Default returns empty string.

Reimplemented from PrefsPanel.

Definition at line 53 of file ApplicationPrefs.cpp.

54{
55 return "Application_Preferences";
56}

◆ Populate()

void ApplicationPrefs::Populate ( )
private

Definition at line 58 of file ApplicationPrefs.cpp.

59{
60 //------------------------- Main section --------------------
61 // Now construct the GUI itself.
62 // Use 'eIsCreatingFromPrefs' so that the GUI is
63 // initialised with values from gPrefs.
66 // ----------------------- End of main section --------------
67}
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46

References eIsCreatingFromPrefs, PopulateOrExchange(), and S.

Referenced by ApplicationPrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PopulateOrExchange()

void ApplicationPrefs::PopulateOrExchange ( ShuttleGui S)
overrideprivate

Definition at line 69 of file ApplicationPrefs.cpp.

70{
71 S.SetBorder(2);
72 S.StartScroller();
73
74 /* i18n-hint: Title for the update notifications panel in the preferences dialog. */
75 S.StartStatic(XO("Update notifications"));
76 {
77 S.TieCheckBox(
78 /* i18n-hint: Check-box title that configures periodic updates checking. */
79 XXC("&Check for updates", "application preferences"),
81
82 S.StartVerticalLay();
83 {
84 S.AddFixedText(XO(
85 "App update checking requires network access. In order to protect your privacy, Audacity does not store any personal information."),
86 false, 470);
87
88 /* i18n-hint: %s will be replaced with "our Privacy Policy" */
89 AccessibleLinksFormatter privacyPolicy(XO("See %s for more info."));
90
91 privacyPolicy.FormatLink(
92 /* i18n-hint: Title of hyperlink to the privacy policy. This is an object of "See". */
93 wxT("%s"), XO("our Privacy Policy"),
94 "https://www.audacityteam.org/about/desktop-privacy-notice/");
95
96 privacyPolicy.Populate(S);
97 }
98
99 S.EndVerticalLay();
100 }
101
102 S.EndStatic();
103 S.EndScroller();
104}
wxT("CloseDown"))
#define XXC(s, c)
Definition: Internat.h:47

References DefaultUpdatesCheckingFlag, AccessibleLinksFormatter::FormatLink(), AccessibleLinksFormatter::Populate(), S, wxT(), XO(), and XXC.

Referenced by Commit(), and Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

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