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

#include <LinkFailedDialog.h>

Inheritance diagram for audacity::cloud::audiocom::LinkFailedDialog:
[legend]
Collaboration diagram for audacity::cloud::audiocom::LinkFailedDialog:
[legend]

Public Member Functions

 LinkFailedDialog (wxWindow *parent, AudiocomTrace trace)
 
 ~LinkFailedDialog () override
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Detailed Description

Definition at line 19 of file LinkFailedDialog.h.

Constructor & Destructor Documentation

◆ LinkFailedDialog()

audacity::cloud::audiocom::LinkFailedDialog::LinkFailedDialog ( wxWindow *  parent,
AudiocomTrace  trace 
)

Definition at line 26 of file LinkFailedDialog.cpp.

28 parent, wxID_ANY, XO("Link account"), wxDefaultPosition, { 442, -1 },
29 wxDEFAULT_DIALOG_STYLE)
30{
31 SetMinSize({ 442, -1 });
32 ShuttleGui s(this, eIsCreating);
33
34 s.StartVerticalLay();
35 {
36 s.StartInvisiblePanel(16);
37 {
38 s.SetBorder(0);
39
40 s.AddFixedText(
41 XO("We were unable to link your account. Please try again."),
42 false, 410);
43
44 s.AddSpace(0, 16, 0);
45
46 s.StartHorizontalLay(wxEXPAND, 0);
47 {
48 s.AddSpace(1, 0, 1);
49
50 s.AddButton(XO("&Cancel"))
51 ->Bind(wxEVT_BUTTON, [this](auto) { EndModal(wxID_CANCEL); });
52
53 auto btn = s.AddButton(XO("&Try again"));
54
55 btn->Bind(wxEVT_BUTTON, [this, trace](auto) {
57 GetServiceConfig().GetOAuthLoginPage(trace)) });
58 EndModal(wxID_RETRY);
59 });
60
61 btn->SetDefault();
62 }
63 s.EndHorizontalLay();
64
65 }
66 s.EndInvisiblePanel();
67 }
68 s.EndVerticalLay();
69
70 Layout();
71 Fit();
72 Center();
73
74 Bind(
75 wxEVT_CHAR_HOOK,
76 [this](auto& evt)
77 {
78 if (!IsEscapeKey(evt))
79 {
80 evt.Skip();
81 return;
82 }
83
84 EndModal(wxID_CANCEL);
85 });
86}
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
bool OpenInDefaultBrowser(const wxString &url)
Open an URL in default browser.
Definition: BasicUI.cpp:246
const ServiceConfig & GetServiceConfig()
Returns the instance of the ServiceConfig.
wxString ToWXString(const std::string &str)

◆ ~LinkFailedDialog()

audacity::cloud::audiocom::LinkFailedDialog::~LinkFailedDialog ( )
override

Definition at line 88 of file LinkFailedDialog.cpp.

89{
90}

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