Audacity 3.2.0
CloudProjectPropertiesDialog.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 CloudProjectPropertiesDialog.h
7
8 Dmitry Vedenko
9
10**********************************************************************/
11#pragma once
12
13#include <string>
14#include <utility>
15
16#include "wxPanelWrapper.h"
17
18#include "Observer.h"
19
20class wxTextCtrl;
21class wxChoice;
22class wxButton;
23class wxStaticText;
24
26{
27class ServiceConfig;
28class OAuthService;
29class UserService;
30class UserPanel;
31} // namespace audacity::cloud::audiocom
32
34{
35
37{
39 const ServiceConfig& serviceConfig, OAuthService& authService,
40 UserService& userService, const wxString& projectName, wxWindow* parent);
42
43public:
44 enum class Action
45 {
46 Cancel,
48 SaveLocally
49 };
50
51 static std::pair<Action, std::string> Show(
52 const ServiceConfig& serviceConfig, OAuthService& authService,
53 UserService& userService, const wxString& projectName, wxWindow* parent, bool allowLocalSave);
54
55private:
56 bool OnSubmit();
57 void LayoutControls();
58 void SetupEvents();
59
60 std::string GetProjectName() const;
62
64 wxTextCtrl* mProjectName {};
65
66
67 wxButton* mSaveToCloud {};
68 wxButton* mSaveLocally {};
69 wxButton* mCancel {};
70 wxStaticText* mAnonStateText {};
71
73};
74} // namespace audacity::cloud::audiocom::sync
A move-only handle representing a connection to a Publisher.
Definition: Observer.h:70
Service responsible for OAuth authentication against the audio.com service.
Definition: OAuthService.h:40
Configuration for the audio.com.
Definition: ServiceConfig.h:23
Service for providing information about the user profile.
Definition: UserService.h:28
CloudProjectPropertiesDialog(const ServiceConfig &serviceConfig, OAuthService &authService, UserService &userService, const wxString &projectName, wxWindow *parent)
static std::pair< Action, std::string > Show(const ServiceConfig &serviceConfig, OAuthService &authService, UserService &userService, const wxString &projectName, wxWindow *parent, bool allowLocalSave)
void SaveToCloud(AudacityProject &project, UploadMode mode, CreateSnapshotCallback snapshotCallback)