Audacity 3.2.0
|
#include <UserPanel.h>
Public Types | |
enum class | LinkMode { Link , SignIn } |
Public Types inherited from Observer::Publisher< UserPanelStateChangedMessage > | |
using | message_type = UserPanelStateChangedMessage |
using | CallbackReturn = std::conditional_t< true, void, bool > |
using | Callback = std::function< CallbackReturn(const UserPanelStateChangedMessage &) > |
Type of functions that can be connected to the Publisher. More... | |
Public Member Functions | |
UserPanel (const ServiceConfig &serviceConfig, OAuthService &authService, UserService &userService, LinkMode linkMode, AudiocomTrace, wxWindow *parent=nullptr, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize) | |
~UserPanel () override | |
bool | IsAuthorized () const |
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 | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Public Member Functions inherited from Observer::Publisher< UserPanelStateChangedMessage > | |
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... | |
Private Member Functions | |
void | OnStateChanged (bool isAuthorized) |
void | UpdateUserData () |
void | OnLinkButtonPressed () |
void | SetAnonymousState () |
Private Attributes | |
const ServiceConfig & | mServiceConfig |
OAuthService & | mAuthService |
UserService & | mUserService |
const AudiocomTrace | mAudiocomTrace |
UserImage * | mUserImage {} |
wxStaticText * | mUserName {} |
wxButton * | mLinkButton {} |
Observer::Subscription | mUserDataChangedSubscription |
bool | mIsAuthorized { false } |
const LinkMode | mLinkMode |
Additional Inherited Members | |
Static Public Attributes inherited from Observer::Publisher< UserPanelStateChangedMessage > | |
static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< UserPanelStateChangedMessage > | |
CallbackReturn | Publish (const UserPanelStateChangedMessage &message) |
Send a message to connected callbacks. More... | |
Definition at line 33 of file UserPanel.h.
|
strong |
audacity::cloud::audiocom::UserPanel::UserPanel | ( | const ServiceConfig & | serviceConfig, |
OAuthService & | authService, | ||
UserService & | userService, | ||
LinkMode | linkMode, | ||
AudiocomTrace | trace, | ||
wxWindow * | parent = nullptr , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize |
||
) |
Definition at line 52 of file UserPanel.cpp.
References UpdateUserData().
|
overridedefault |
bool audacity::cloud::audiocom::UserPanel::IsAuthorized | ( | ) | const |
Definition at line 94 of file UserPanel.cpp.
Referenced by audacity::cloud::audiocom::sync::CloudProjectPropertiesDialog::OnSubmit().
|
private |
Definition at line 169 of file UserPanel.cpp.
References URLSchemesRegistry::Get(), audacity::cloud::audiocom::GetOAuthService(), URLSchemesRegistry::IsURLHandlingSupported(), BasicUI::OpenInDefaultBrowser(), and audacity::ToWXString().
|
private |
Definition at line 99 of file UserPanel.cpp.
|
private |
Definition at line 190 of file UserPanel.cpp.
References audacity::cloud::audiocom::anonymous_namespace{UserPanel.cpp}::anonymousText, ThemeBase::Bitmap(), wxDialogWrapper::SetLabel(), theTheme, and XXO().
|
private |
Definition at line 108 of file UserPanel.cpp.
References ThemeBase::Bitmap(), audacity::cloud::audiocom::anonymous_namespace{UserService.cpp}::displayName, audacity::cloud::audiocom::GetOAuthService(), audacity::cloud::audiocom::GetUserService(), theTheme, and XXO().
Referenced by UserPanel().
|
private |
Definition at line 65 of file UserPanel.h.
|
private |
Definition at line 63 of file UserPanel.h.
|
private |
Definition at line 73 of file UserPanel.h.
|
private |
Definition at line 69 of file UserPanel.h.
|
private |
Definition at line 74 of file UserPanel.h.
|
private |
Definition at line 62 of file UserPanel.h.
|
private |
Definition at line 71 of file UserPanel.h.
|
private |
Definition at line 67 of file UserPanel.h.
|
private |
Definition at line 68 of file UserPanel.h.
|
private |
Definition at line 64 of file UserPanel.h.