Audacity 3.2.0
Public Member Functions | Static Public Member Functions | List of all members
audacity::cloud::audiocom::sync::ProjectVersionConflictDialog Class Referencefinal

#include <ProjectVersionConflictDialog.h>

Inheritance diagram for audacity::cloud::audiocom::sync::ProjectVersionConflictDialog:
[legend]
Collaboration diagram for audacity::cloud::audiocom::sync::ProjectVersionConflictDialog:
[legend]

Public Member Functions

 ProjectVersionConflictDialog (const AudacityProject *project, ProjectVersionConflictDialogMode openMode)
 
- Public Member Functions inherited from audacity::cloud::audiocom::sync::AudioComDialogBase
DialogButtonIdentifier ShowDialog (std::function< DialogButtonIdentifier()> poller={})
 

Static Public Member Functions

static DialogButtonIdentifier UseLocalIdentifier ()
 
static DialogButtonIdentifier UseRemoteIdentifier ()
 
- Static Public Member Functions inherited from audacity::cloud::audiocom::sync::AudioComDialogBase
static DialogButtonIdentifier CancelButtonIdentifier ()
 

Additional Inherited Members

- Protected Types inherited from audacity::cloud::audiocom::sync::AudioComDialogBase
enum class  DialogMode { Opening , Saving }
 
enum  ButtonType { None = 0 , DefaultButton = 1 , EscButton = 2 }
 
- Protected Member Functions inherited from audacity::cloud::audiocom::sync::AudioComDialogBase
 AudioComDialogBase (const AudacityProject *project, const DialogIdentifier &optionalPrefsIdentifier={}, DialogMode dialogMode=DialogMode::Saving)
 
virtual ~AudioComDialogBase ()=default
 
void AddTitle (const TranslatableString &title)
 
void AddParagraph (const TranslatableString &paragraph)
 
void AddButton (DialogButtonIdentifier identifier, const TranslatableString &text, int type=None)
 
void SetDialogTitle (const TranslatableString &dialog)
 
virtual bool HasSeparator () const
 
void EndDialog (DialogButtonIdentifier identifier)
 

Detailed Description

Definition at line 25 of file ProjectVersionConflictDialog.h.

Constructor & Destructor Documentation

◆ ProjectVersionConflictDialog()

audacity::cloud::audiocom::sync::ProjectVersionConflictDialog::ProjectVersionConflictDialog ( const AudacityProject project,
ProjectVersionConflictDialogMode  openMode 
)

Definition at line 40 of file ProjectVersionConflictDialog.cpp.

43{
44 const auto& properties = dialogProperties[static_cast<int>(openMode)];
45
46 AddTitle(properties.Title);
47 AddParagraph(properties.Message);
48
49 if (properties.HasCancelButton)
51
53 UseLocalIdentifier(), properties.LocalButtonText,
54 !properties.HasCancelButton ? EscButton : 0);
55
56 AddButton(UseRemoteIdentifier(), properties.RemoteButtonText, DefaultButton);
57}
XO("Cut/Copy/Paste")
const auto project
void AddTitle(const TranslatableString &title)
void AddButton(DialogButtonIdentifier identifier, const TranslatableString &text, int type=None)
AudioComDialogBase(const AudacityProject *project, const DialogIdentifier &optionalPrefsIdentifier={}, DialogMode dialogMode=DialogMode::Saving)
void AddParagraph(const TranslatableString &paragraph)

References audacity::cloud::audiocom::sync::AudioComDialogBase::AddButton(), audacity::cloud::audiocom::sync::AudioComDialogBase::AddParagraph(), audacity::cloud::audiocom::sync::AudioComDialogBase::AddTitle(), audacity::cloud::audiocom::sync::AudioComDialogBase::CancelButtonIdentifier(), audacity::cloud::audiocom::sync::AudioComDialogBase::DefaultButton, audacity::cloud::audiocom::sync::anonymous_namespace{ProjectVersionConflictDialog.cpp}::dialogProperties, audacity::cloud::audiocom::sync::AudioComDialogBase::EscButton, UseLocalIdentifier(), UseRemoteIdentifier(), and XO().

Here is the call graph for this function:

Member Function Documentation

◆ UseLocalIdentifier()

DialogButtonIdentifier audacity::cloud::audiocom::sync::ProjectVersionConflictDialog::UseLocalIdentifier ( )
static

Definition at line 59 of file ProjectVersionConflictDialog.cpp.

60{
61 return { L"local" };
62}

Referenced by audacity::cloud::audiocom::sync::anonymous_namespace{CloudProjectOpenUtils.cpp}::GetConfilctResolution(), and ProjectVersionConflictDialog().

Here is the caller graph for this function:

◆ UseRemoteIdentifier()

DialogButtonIdentifier audacity::cloud::audiocom::sync::ProjectVersionConflictDialog::UseRemoteIdentifier ( )
static

Definition at line 64 of file ProjectVersionConflictDialog.cpp.

65{
66 return { L"remote" };
67}

Referenced by audacity::cloud::audiocom::sync::anonymous_namespace{CloudProjectOpenUtils.cpp}::GetConfilctResolution(), audacity::cloud::audiocom::sync::OpenProjectFromCloud(), and ProjectVersionConflictDialog().

Here is the caller graph for this function:

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